annotate CSP2/CSP2_env/env-d9b9114564458d9d-741b3de822f2aaca6c6caa4325c4afce/lib/python3.8/site-packages/pysam/libctabix.c @ 68:5028fdace37b

planemo upload commit 2e9511a184a1ca667c7be0c6321a36dc4e3d116d
author jpayne
date Tue, 18 Mar 2025 16:23:26 -0400
parents
children
rev   line source
jpayne@68 1 /* Generated by Cython 3.0.11 */
jpayne@68 2
jpayne@68 3 /* BEGIN: Cython Metadata
jpayne@68 4 {
jpayne@68 5 "distutils": {
jpayne@68 6 "define_macros": [
jpayne@68 7 [
jpayne@68 8 "BUILDING_WHEEL",
jpayne@68 9 null
jpayne@68 10 ]
jpayne@68 11 ],
jpayne@68 12 "depends": [
jpayne@68 13 "/project/htslib/htslib/bgzf.h",
jpayne@68 14 "/project/htslib/htslib/cram.h",
jpayne@68 15 "/project/htslib/htslib/faidx.h",
jpayne@68 16 "/project/htslib/htslib/hfile.h",
jpayne@68 17 "/project/htslib/htslib/hts.h",
jpayne@68 18 "/project/htslib/htslib/kstring.h",
jpayne@68 19 "/project/htslib/htslib/sam.h",
jpayne@68 20 "/project/htslib/htslib/tbx.h",
jpayne@68 21 "/project/htslib/htslib/vcf.h",
jpayne@68 22 "/project/htslib/htslib/vcfutils.h",
jpayne@68 23 "/project/pysam/htslib_util.h",
jpayne@68 24 "/project/pysam/pysam_stream.h"
jpayne@68 25 ],
jpayne@68 26 "extra_compile_args": [
jpayne@68 27 "-Wno-unused",
jpayne@68 28 "-Wno-strict-prototypes",
jpayne@68 29 "-Wno-sign-compare",
jpayne@68 30 "-Wno-error=declaration-after-statement"
jpayne@68 31 ],
jpayne@68 32 "extra_link_args": [
jpayne@68 33 "-Wl,-rpath,$ORIGIN"
jpayne@68 34 ],
jpayne@68 35 "include_dirs": [
jpayne@68 36 "pysam",
jpayne@68 37 "/project/pysam",
jpayne@68 38 "/project/htslib",
jpayne@68 39 "/project/samtools",
jpayne@68 40 "/project/samtools/lz4",
jpayne@68 41 "/project/bcftools",
jpayne@68 42 "/project"
jpayne@68 43 ],
jpayne@68 44 "language": "c",
jpayne@68 45 "libraries": [
jpayne@68 46 "z",
jpayne@68 47 "lzma",
jpayne@68 48 "bz2",
jpayne@68 49 "z",
jpayne@68 50 "m",
jpayne@68 51 "curl",
jpayne@68 52 "crypto",
jpayne@68 53 "chtslib.cpython-37m-x86_64-linux-gnu",
jpayne@68 54 "cutils.cpython-37m-x86_64-linux-gnu"
jpayne@68 55 ],
jpayne@68 56 "library_dirs": [
jpayne@68 57 "/project/pysam",
jpayne@68 58 "/project",
jpayne@68 59 "build/lib.linux-x86_64-cpython-37/pysam",
jpayne@68 60 "build/lib.linux-x86_64-cpython-37/pysam",
jpayne@68 61 "build/lib.linux-x86_64-cpython-37/pysam",
jpayne@68 62 "build/lib.linux-x86_64-cpython-37/pysam",
jpayne@68 63 "build/lib.linux-x86_64-cpython-37/pysam",
jpayne@68 64 "build/lib.linux-x86_64-cpython-37/pysam",
jpayne@68 65 "build/lib.linux-x86_64-cpython-37/pysam",
jpayne@68 66 "build/lib.linux-x86_64-cpython-37/pysam"
jpayne@68 67 ],
jpayne@68 68 "name": "pysam.libctabix",
jpayne@68 69 "sources": [
jpayne@68 70 "pysam/libctabix.pyx"
jpayne@68 71 ]
jpayne@68 72 },
jpayne@68 73 "module_name": "pysam.libctabix"
jpayne@68 74 }
jpayne@68 75 END: Cython Metadata */
jpayne@68 76
jpayne@68 77 #ifndef PY_SSIZE_T_CLEAN
jpayne@68 78 #define PY_SSIZE_T_CLEAN
jpayne@68 79 #endif /* PY_SSIZE_T_CLEAN */
jpayne@68 80 #if defined(CYTHON_LIMITED_API) && 0
jpayne@68 81 #ifndef Py_LIMITED_API
jpayne@68 82 #if CYTHON_LIMITED_API+0 > 0x03030000
jpayne@68 83 #define Py_LIMITED_API CYTHON_LIMITED_API
jpayne@68 84 #else
jpayne@68 85 #define Py_LIMITED_API 0x03030000
jpayne@68 86 #endif
jpayne@68 87 #endif
jpayne@68 88 #endif
jpayne@68 89
jpayne@68 90 #include "Python.h"
jpayne@68 91
jpayne@68 92 #if PY_MAJOR_VERSION >= 3
jpayne@68 93 #define __Pyx_PyFloat_FromString(obj) PyFloat_FromString(obj)
jpayne@68 94 #else
jpayne@68 95 #define __Pyx_PyFloat_FromString(obj) PyFloat_FromString(obj, NULL)
jpayne@68 96 #endif
jpayne@68 97
jpayne@68 98
jpayne@68 99 #if PY_MAJOR_VERSION <= 2
jpayne@68 100 #define PyDict_GetItemWithError _PyDict_GetItemWithError
jpayne@68 101 #endif
jpayne@68 102
jpayne@68 103
jpayne@68 104 #if (PY_VERSION_HEX < 0x030700b1 || (CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM < 0x07030600)) && !defined(PyContextVar_Get)
jpayne@68 105 #define PyContextVar_Get(var, d, v) ((d) ? ((void)(var), Py_INCREF(d), (v)[0] = (d), 0) : ((v)[0] = NULL, 0) )
jpayne@68 106 #endif
jpayne@68 107
jpayne@68 108 #ifndef Py_PYTHON_H
jpayne@68 109 #error Python headers needed to compile C extensions, please install development version of Python.
jpayne@68 110 #elif PY_VERSION_HEX < 0x02070000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000)
jpayne@68 111 #error Cython requires Python 2.7+ or Python 3.3+.
jpayne@68 112 #else
jpayne@68 113 #if defined(CYTHON_LIMITED_API) && CYTHON_LIMITED_API
jpayne@68 114 #define __PYX_EXTRA_ABI_MODULE_NAME "limited"
jpayne@68 115 #else
jpayne@68 116 #define __PYX_EXTRA_ABI_MODULE_NAME ""
jpayne@68 117 #endif
jpayne@68 118 #define CYTHON_ABI "3_0_11" __PYX_EXTRA_ABI_MODULE_NAME
jpayne@68 119 #define __PYX_ABI_MODULE_NAME "_cython_" CYTHON_ABI
jpayne@68 120 #define __PYX_TYPE_MODULE_PREFIX __PYX_ABI_MODULE_NAME "."
jpayne@68 121 #define CYTHON_HEX_VERSION 0x03000BF0
jpayne@68 122 #define CYTHON_FUTURE_DIVISION 1
jpayne@68 123 #include <stddef.h>
jpayne@68 124 #ifndef offsetof
jpayne@68 125 #define offsetof(type, member) ( (size_t) & ((type*)0) -> member )
jpayne@68 126 #endif
jpayne@68 127 #if !defined(_WIN32) && !defined(WIN32) && !defined(MS_WINDOWS)
jpayne@68 128 #ifndef __stdcall
jpayne@68 129 #define __stdcall
jpayne@68 130 #endif
jpayne@68 131 #ifndef __cdecl
jpayne@68 132 #define __cdecl
jpayne@68 133 #endif
jpayne@68 134 #ifndef __fastcall
jpayne@68 135 #define __fastcall
jpayne@68 136 #endif
jpayne@68 137 #endif
jpayne@68 138 #ifndef DL_IMPORT
jpayne@68 139 #define DL_IMPORT(t) t
jpayne@68 140 #endif
jpayne@68 141 #ifndef DL_EXPORT
jpayne@68 142 #define DL_EXPORT(t) t
jpayne@68 143 #endif
jpayne@68 144 #define __PYX_COMMA ,
jpayne@68 145 #ifndef HAVE_LONG_LONG
jpayne@68 146 #define HAVE_LONG_LONG
jpayne@68 147 #endif
jpayne@68 148 #ifndef PY_LONG_LONG
jpayne@68 149 #define PY_LONG_LONG LONG_LONG
jpayne@68 150 #endif
jpayne@68 151 #ifndef Py_HUGE_VAL
jpayne@68 152 #define Py_HUGE_VAL HUGE_VAL
jpayne@68 153 #endif
jpayne@68 154 #define __PYX_LIMITED_VERSION_HEX PY_VERSION_HEX
jpayne@68 155 #if defined(GRAALVM_PYTHON)
jpayne@68 156 /* For very preliminary testing purposes. Most variables are set the same as PyPy.
jpayne@68 157 The existence of this section does not imply that anything works or is even tested */
jpayne@68 158 #define CYTHON_COMPILING_IN_PYPY 0
jpayne@68 159 #define CYTHON_COMPILING_IN_CPYTHON 0
jpayne@68 160 #define CYTHON_COMPILING_IN_LIMITED_API 0
jpayne@68 161 #define CYTHON_COMPILING_IN_GRAAL 1
jpayne@68 162 #define CYTHON_COMPILING_IN_NOGIL 0
jpayne@68 163 #undef CYTHON_USE_TYPE_SLOTS
jpayne@68 164 #define CYTHON_USE_TYPE_SLOTS 0
jpayne@68 165 #undef CYTHON_USE_TYPE_SPECS
jpayne@68 166 #define CYTHON_USE_TYPE_SPECS 0
jpayne@68 167 #undef CYTHON_USE_PYTYPE_LOOKUP
jpayne@68 168 #define CYTHON_USE_PYTYPE_LOOKUP 0
jpayne@68 169 #if PY_VERSION_HEX < 0x03050000
jpayne@68 170 #undef CYTHON_USE_ASYNC_SLOTS
jpayne@68 171 #define CYTHON_USE_ASYNC_SLOTS 0
jpayne@68 172 #elif !defined(CYTHON_USE_ASYNC_SLOTS)
jpayne@68 173 #define CYTHON_USE_ASYNC_SLOTS 1
jpayne@68 174 #endif
jpayne@68 175 #undef CYTHON_USE_PYLIST_INTERNALS
jpayne@68 176 #define CYTHON_USE_PYLIST_INTERNALS 0
jpayne@68 177 #undef CYTHON_USE_UNICODE_INTERNALS
jpayne@68 178 #define CYTHON_USE_UNICODE_INTERNALS 0
jpayne@68 179 #undef CYTHON_USE_UNICODE_WRITER
jpayne@68 180 #define CYTHON_USE_UNICODE_WRITER 0
jpayne@68 181 #undef CYTHON_USE_PYLONG_INTERNALS
jpayne@68 182 #define CYTHON_USE_PYLONG_INTERNALS 0
jpayne@68 183 #undef CYTHON_AVOID_BORROWED_REFS
jpayne@68 184 #define CYTHON_AVOID_BORROWED_REFS 1
jpayne@68 185 #undef CYTHON_ASSUME_SAFE_MACROS
jpayne@68 186 #define CYTHON_ASSUME_SAFE_MACROS 0
jpayne@68 187 #undef CYTHON_UNPACK_METHODS
jpayne@68 188 #define CYTHON_UNPACK_METHODS 0
jpayne@68 189 #undef CYTHON_FAST_THREAD_STATE
jpayne@68 190 #define CYTHON_FAST_THREAD_STATE 0
jpayne@68 191 #undef CYTHON_FAST_GIL
jpayne@68 192 #define CYTHON_FAST_GIL 0
jpayne@68 193 #undef CYTHON_METH_FASTCALL
jpayne@68 194 #define CYTHON_METH_FASTCALL 0
jpayne@68 195 #undef CYTHON_FAST_PYCALL
jpayne@68 196 #define CYTHON_FAST_PYCALL 0
jpayne@68 197 #ifndef CYTHON_PEP487_INIT_SUBCLASS
jpayne@68 198 #define CYTHON_PEP487_INIT_SUBCLASS (PY_MAJOR_VERSION >= 3)
jpayne@68 199 #endif
jpayne@68 200 #undef CYTHON_PEP489_MULTI_PHASE_INIT
jpayne@68 201 #define CYTHON_PEP489_MULTI_PHASE_INIT 1
jpayne@68 202 #undef CYTHON_USE_MODULE_STATE
jpayne@68 203 #define CYTHON_USE_MODULE_STATE 0
jpayne@68 204 #undef CYTHON_USE_TP_FINALIZE
jpayne@68 205 #define CYTHON_USE_TP_FINALIZE 0
jpayne@68 206 #undef CYTHON_USE_DICT_VERSIONS
jpayne@68 207 #define CYTHON_USE_DICT_VERSIONS 0
jpayne@68 208 #undef CYTHON_USE_EXC_INFO_STACK
jpayne@68 209 #define CYTHON_USE_EXC_INFO_STACK 0
jpayne@68 210 #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
jpayne@68 211 #define CYTHON_UPDATE_DESCRIPTOR_DOC 0
jpayne@68 212 #endif
jpayne@68 213 #undef CYTHON_USE_FREELISTS
jpayne@68 214 #define CYTHON_USE_FREELISTS 0
jpayne@68 215 #elif defined(PYPY_VERSION)
jpayne@68 216 #define CYTHON_COMPILING_IN_PYPY 1
jpayne@68 217 #define CYTHON_COMPILING_IN_CPYTHON 0
jpayne@68 218 #define CYTHON_COMPILING_IN_LIMITED_API 0
jpayne@68 219 #define CYTHON_COMPILING_IN_GRAAL 0
jpayne@68 220 #define CYTHON_COMPILING_IN_NOGIL 0
jpayne@68 221 #undef CYTHON_USE_TYPE_SLOTS
jpayne@68 222 #define CYTHON_USE_TYPE_SLOTS 0
jpayne@68 223 #ifndef CYTHON_USE_TYPE_SPECS
jpayne@68 224 #define CYTHON_USE_TYPE_SPECS 0
jpayne@68 225 #endif
jpayne@68 226 #undef CYTHON_USE_PYTYPE_LOOKUP
jpayne@68 227 #define CYTHON_USE_PYTYPE_LOOKUP 0
jpayne@68 228 #if PY_VERSION_HEX < 0x03050000
jpayne@68 229 #undef CYTHON_USE_ASYNC_SLOTS
jpayne@68 230 #define CYTHON_USE_ASYNC_SLOTS 0
jpayne@68 231 #elif !defined(CYTHON_USE_ASYNC_SLOTS)
jpayne@68 232 #define CYTHON_USE_ASYNC_SLOTS 1
jpayne@68 233 #endif
jpayne@68 234 #undef CYTHON_USE_PYLIST_INTERNALS
jpayne@68 235 #define CYTHON_USE_PYLIST_INTERNALS 0
jpayne@68 236 #undef CYTHON_USE_UNICODE_INTERNALS
jpayne@68 237 #define CYTHON_USE_UNICODE_INTERNALS 0
jpayne@68 238 #undef CYTHON_USE_UNICODE_WRITER
jpayne@68 239 #define CYTHON_USE_UNICODE_WRITER 0
jpayne@68 240 #undef CYTHON_USE_PYLONG_INTERNALS
jpayne@68 241 #define CYTHON_USE_PYLONG_INTERNALS 0
jpayne@68 242 #undef CYTHON_AVOID_BORROWED_REFS
jpayne@68 243 #define CYTHON_AVOID_BORROWED_REFS 1
jpayne@68 244 #undef CYTHON_ASSUME_SAFE_MACROS
jpayne@68 245 #define CYTHON_ASSUME_SAFE_MACROS 0
jpayne@68 246 #undef CYTHON_UNPACK_METHODS
jpayne@68 247 #define CYTHON_UNPACK_METHODS 0
jpayne@68 248 #undef CYTHON_FAST_THREAD_STATE
jpayne@68 249 #define CYTHON_FAST_THREAD_STATE 0
jpayne@68 250 #undef CYTHON_FAST_GIL
jpayne@68 251 #define CYTHON_FAST_GIL 0
jpayne@68 252 #undef CYTHON_METH_FASTCALL
jpayne@68 253 #define CYTHON_METH_FASTCALL 0
jpayne@68 254 #undef CYTHON_FAST_PYCALL
jpayne@68 255 #define CYTHON_FAST_PYCALL 0
jpayne@68 256 #ifndef CYTHON_PEP487_INIT_SUBCLASS
jpayne@68 257 #define CYTHON_PEP487_INIT_SUBCLASS (PY_MAJOR_VERSION >= 3)
jpayne@68 258 #endif
jpayne@68 259 #if PY_VERSION_HEX < 0x03090000
jpayne@68 260 #undef CYTHON_PEP489_MULTI_PHASE_INIT
jpayne@68 261 #define CYTHON_PEP489_MULTI_PHASE_INIT 0
jpayne@68 262 #elif !defined(CYTHON_PEP489_MULTI_PHASE_INIT)
jpayne@68 263 #define CYTHON_PEP489_MULTI_PHASE_INIT 1
jpayne@68 264 #endif
jpayne@68 265 #undef CYTHON_USE_MODULE_STATE
jpayne@68 266 #define CYTHON_USE_MODULE_STATE 0
jpayne@68 267 #undef CYTHON_USE_TP_FINALIZE
jpayne@68 268 #define CYTHON_USE_TP_FINALIZE (PY_VERSION_HEX >= 0x030400a1 && PYPY_VERSION_NUM >= 0x07030C00)
jpayne@68 269 #undef CYTHON_USE_DICT_VERSIONS
jpayne@68 270 #define CYTHON_USE_DICT_VERSIONS 0
jpayne@68 271 #undef CYTHON_USE_EXC_INFO_STACK
jpayne@68 272 #define CYTHON_USE_EXC_INFO_STACK 0
jpayne@68 273 #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
jpayne@68 274 #define CYTHON_UPDATE_DESCRIPTOR_DOC 0
jpayne@68 275 #endif
jpayne@68 276 #undef CYTHON_USE_FREELISTS
jpayne@68 277 #define CYTHON_USE_FREELISTS 0
jpayne@68 278 #elif defined(CYTHON_LIMITED_API)
jpayne@68 279 #ifdef Py_LIMITED_API
jpayne@68 280 #undef __PYX_LIMITED_VERSION_HEX
jpayne@68 281 #define __PYX_LIMITED_VERSION_HEX Py_LIMITED_API
jpayne@68 282 #endif
jpayne@68 283 #define CYTHON_COMPILING_IN_PYPY 0
jpayne@68 284 #define CYTHON_COMPILING_IN_CPYTHON 0
jpayne@68 285 #define CYTHON_COMPILING_IN_LIMITED_API 1
jpayne@68 286 #define CYTHON_COMPILING_IN_GRAAL 0
jpayne@68 287 #define CYTHON_COMPILING_IN_NOGIL 0
jpayne@68 288 #undef CYTHON_CLINE_IN_TRACEBACK
jpayne@68 289 #define CYTHON_CLINE_IN_TRACEBACK 0
jpayne@68 290 #undef CYTHON_USE_TYPE_SLOTS
jpayne@68 291 #define CYTHON_USE_TYPE_SLOTS 0
jpayne@68 292 #undef CYTHON_USE_TYPE_SPECS
jpayne@68 293 #define CYTHON_USE_TYPE_SPECS 1
jpayne@68 294 #undef CYTHON_USE_PYTYPE_LOOKUP
jpayne@68 295 #define CYTHON_USE_PYTYPE_LOOKUP 0
jpayne@68 296 #undef CYTHON_USE_ASYNC_SLOTS
jpayne@68 297 #define CYTHON_USE_ASYNC_SLOTS 0
jpayne@68 298 #undef CYTHON_USE_PYLIST_INTERNALS
jpayne@68 299 #define CYTHON_USE_PYLIST_INTERNALS 0
jpayne@68 300 #undef CYTHON_USE_UNICODE_INTERNALS
jpayne@68 301 #define CYTHON_USE_UNICODE_INTERNALS 0
jpayne@68 302 #ifndef CYTHON_USE_UNICODE_WRITER
jpayne@68 303 #define CYTHON_USE_UNICODE_WRITER 0
jpayne@68 304 #endif
jpayne@68 305 #undef CYTHON_USE_PYLONG_INTERNALS
jpayne@68 306 #define CYTHON_USE_PYLONG_INTERNALS 0
jpayne@68 307 #ifndef CYTHON_AVOID_BORROWED_REFS
jpayne@68 308 #define CYTHON_AVOID_BORROWED_REFS 0
jpayne@68 309 #endif
jpayne@68 310 #undef CYTHON_ASSUME_SAFE_MACROS
jpayne@68 311 #define CYTHON_ASSUME_SAFE_MACROS 0
jpayne@68 312 #undef CYTHON_UNPACK_METHODS
jpayne@68 313 #define CYTHON_UNPACK_METHODS 0
jpayne@68 314 #undef CYTHON_FAST_THREAD_STATE
jpayne@68 315 #define CYTHON_FAST_THREAD_STATE 0
jpayne@68 316 #undef CYTHON_FAST_GIL
jpayne@68 317 #define CYTHON_FAST_GIL 0
jpayne@68 318 #undef CYTHON_METH_FASTCALL
jpayne@68 319 #define CYTHON_METH_FASTCALL 0
jpayne@68 320 #undef CYTHON_FAST_PYCALL
jpayne@68 321 #define CYTHON_FAST_PYCALL 0
jpayne@68 322 #ifndef CYTHON_PEP487_INIT_SUBCLASS
jpayne@68 323 #define CYTHON_PEP487_INIT_SUBCLASS 1
jpayne@68 324 #endif
jpayne@68 325 #undef CYTHON_PEP489_MULTI_PHASE_INIT
jpayne@68 326 #define CYTHON_PEP489_MULTI_PHASE_INIT 0
jpayne@68 327 #undef CYTHON_USE_MODULE_STATE
jpayne@68 328 #define CYTHON_USE_MODULE_STATE 1
jpayne@68 329 #ifndef CYTHON_USE_TP_FINALIZE
jpayne@68 330 #define CYTHON_USE_TP_FINALIZE 0
jpayne@68 331 #endif
jpayne@68 332 #undef CYTHON_USE_DICT_VERSIONS
jpayne@68 333 #define CYTHON_USE_DICT_VERSIONS 0
jpayne@68 334 #undef CYTHON_USE_EXC_INFO_STACK
jpayne@68 335 #define CYTHON_USE_EXC_INFO_STACK 0
jpayne@68 336 #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
jpayne@68 337 #define CYTHON_UPDATE_DESCRIPTOR_DOC 0
jpayne@68 338 #endif
jpayne@68 339 #undef CYTHON_USE_FREELISTS
jpayne@68 340 #define CYTHON_USE_FREELISTS 0
jpayne@68 341 #elif defined(Py_GIL_DISABLED) || defined(Py_NOGIL)
jpayne@68 342 #define CYTHON_COMPILING_IN_PYPY 0
jpayne@68 343 #define CYTHON_COMPILING_IN_CPYTHON 0
jpayne@68 344 #define CYTHON_COMPILING_IN_LIMITED_API 0
jpayne@68 345 #define CYTHON_COMPILING_IN_GRAAL 0
jpayne@68 346 #define CYTHON_COMPILING_IN_NOGIL 1
jpayne@68 347 #ifndef CYTHON_USE_TYPE_SLOTS
jpayne@68 348 #define CYTHON_USE_TYPE_SLOTS 1
jpayne@68 349 #endif
jpayne@68 350 #ifndef CYTHON_USE_TYPE_SPECS
jpayne@68 351 #define CYTHON_USE_TYPE_SPECS 0
jpayne@68 352 #endif
jpayne@68 353 #undef CYTHON_USE_PYTYPE_LOOKUP
jpayne@68 354 #define CYTHON_USE_PYTYPE_LOOKUP 0
jpayne@68 355 #ifndef CYTHON_USE_ASYNC_SLOTS
jpayne@68 356 #define CYTHON_USE_ASYNC_SLOTS 1
jpayne@68 357 #endif
jpayne@68 358 #ifndef CYTHON_USE_PYLONG_INTERNALS
jpayne@68 359 #define CYTHON_USE_PYLONG_INTERNALS 0
jpayne@68 360 #endif
jpayne@68 361 #undef CYTHON_USE_PYLIST_INTERNALS
jpayne@68 362 #define CYTHON_USE_PYLIST_INTERNALS 0
jpayne@68 363 #ifndef CYTHON_USE_UNICODE_INTERNALS
jpayne@68 364 #define CYTHON_USE_UNICODE_INTERNALS 1
jpayne@68 365 #endif
jpayne@68 366 #undef CYTHON_USE_UNICODE_WRITER
jpayne@68 367 #define CYTHON_USE_UNICODE_WRITER 0
jpayne@68 368 #ifndef CYTHON_AVOID_BORROWED_REFS
jpayne@68 369 #define CYTHON_AVOID_BORROWED_REFS 0
jpayne@68 370 #endif
jpayne@68 371 #ifndef CYTHON_ASSUME_SAFE_MACROS
jpayne@68 372 #define CYTHON_ASSUME_SAFE_MACROS 1
jpayne@68 373 #endif
jpayne@68 374 #ifndef CYTHON_UNPACK_METHODS
jpayne@68 375 #define CYTHON_UNPACK_METHODS 1
jpayne@68 376 #endif
jpayne@68 377 #undef CYTHON_FAST_THREAD_STATE
jpayne@68 378 #define CYTHON_FAST_THREAD_STATE 0
jpayne@68 379 #undef CYTHON_FAST_GIL
jpayne@68 380 #define CYTHON_FAST_GIL 0
jpayne@68 381 #ifndef CYTHON_METH_FASTCALL
jpayne@68 382 #define CYTHON_METH_FASTCALL 1
jpayne@68 383 #endif
jpayne@68 384 #undef CYTHON_FAST_PYCALL
jpayne@68 385 #define CYTHON_FAST_PYCALL 0
jpayne@68 386 #ifndef CYTHON_PEP487_INIT_SUBCLASS
jpayne@68 387 #define CYTHON_PEP487_INIT_SUBCLASS 1
jpayne@68 388 #endif
jpayne@68 389 #ifndef CYTHON_PEP489_MULTI_PHASE_INIT
jpayne@68 390 #define CYTHON_PEP489_MULTI_PHASE_INIT 1
jpayne@68 391 #endif
jpayne@68 392 #ifndef CYTHON_USE_MODULE_STATE
jpayne@68 393 #define CYTHON_USE_MODULE_STATE 0
jpayne@68 394 #endif
jpayne@68 395 #ifndef CYTHON_USE_TP_FINALIZE
jpayne@68 396 #define CYTHON_USE_TP_FINALIZE 1
jpayne@68 397 #endif
jpayne@68 398 #undef CYTHON_USE_DICT_VERSIONS
jpayne@68 399 #define CYTHON_USE_DICT_VERSIONS 0
jpayne@68 400 #undef CYTHON_USE_EXC_INFO_STACK
jpayne@68 401 #define CYTHON_USE_EXC_INFO_STACK 0
jpayne@68 402 #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
jpayne@68 403 #define CYTHON_UPDATE_DESCRIPTOR_DOC 1
jpayne@68 404 #endif
jpayne@68 405 #ifndef CYTHON_USE_FREELISTS
jpayne@68 406 #define CYTHON_USE_FREELISTS 0
jpayne@68 407 #endif
jpayne@68 408 #else
jpayne@68 409 #define CYTHON_COMPILING_IN_PYPY 0
jpayne@68 410 #define CYTHON_COMPILING_IN_CPYTHON 1
jpayne@68 411 #define CYTHON_COMPILING_IN_LIMITED_API 0
jpayne@68 412 #define CYTHON_COMPILING_IN_GRAAL 0
jpayne@68 413 #define CYTHON_COMPILING_IN_NOGIL 0
jpayne@68 414 #ifndef CYTHON_USE_TYPE_SLOTS
jpayne@68 415 #define CYTHON_USE_TYPE_SLOTS 1
jpayne@68 416 #endif
jpayne@68 417 #ifndef CYTHON_USE_TYPE_SPECS
jpayne@68 418 #define CYTHON_USE_TYPE_SPECS 0
jpayne@68 419 #endif
jpayne@68 420 #ifndef CYTHON_USE_PYTYPE_LOOKUP
jpayne@68 421 #define CYTHON_USE_PYTYPE_LOOKUP 1
jpayne@68 422 #endif
jpayne@68 423 #if PY_MAJOR_VERSION < 3
jpayne@68 424 #undef CYTHON_USE_ASYNC_SLOTS
jpayne@68 425 #define CYTHON_USE_ASYNC_SLOTS 0
jpayne@68 426 #elif !defined(CYTHON_USE_ASYNC_SLOTS)
jpayne@68 427 #define CYTHON_USE_ASYNC_SLOTS 1
jpayne@68 428 #endif
jpayne@68 429 #ifndef CYTHON_USE_PYLONG_INTERNALS
jpayne@68 430 #define CYTHON_USE_PYLONG_INTERNALS 1
jpayne@68 431 #endif
jpayne@68 432 #ifndef CYTHON_USE_PYLIST_INTERNALS
jpayne@68 433 #define CYTHON_USE_PYLIST_INTERNALS 1
jpayne@68 434 #endif
jpayne@68 435 #ifndef CYTHON_USE_UNICODE_INTERNALS
jpayne@68 436 #define CYTHON_USE_UNICODE_INTERNALS 1
jpayne@68 437 #endif
jpayne@68 438 #if PY_VERSION_HEX < 0x030300F0 || PY_VERSION_HEX >= 0x030B00A2
jpayne@68 439 #undef CYTHON_USE_UNICODE_WRITER
jpayne@68 440 #define CYTHON_USE_UNICODE_WRITER 0
jpayne@68 441 #elif !defined(CYTHON_USE_UNICODE_WRITER)
jpayne@68 442 #define CYTHON_USE_UNICODE_WRITER 1
jpayne@68 443 #endif
jpayne@68 444 #ifndef CYTHON_AVOID_BORROWED_REFS
jpayne@68 445 #define CYTHON_AVOID_BORROWED_REFS 0
jpayne@68 446 #endif
jpayne@68 447 #ifndef CYTHON_ASSUME_SAFE_MACROS
jpayne@68 448 #define CYTHON_ASSUME_SAFE_MACROS 1
jpayne@68 449 #endif
jpayne@68 450 #ifndef CYTHON_UNPACK_METHODS
jpayne@68 451 #define CYTHON_UNPACK_METHODS 1
jpayne@68 452 #endif
jpayne@68 453 #ifndef CYTHON_FAST_THREAD_STATE
jpayne@68 454 #define CYTHON_FAST_THREAD_STATE 1
jpayne@68 455 #endif
jpayne@68 456 #ifndef CYTHON_FAST_GIL
jpayne@68 457 #define CYTHON_FAST_GIL (PY_MAJOR_VERSION < 3 || PY_VERSION_HEX >= 0x03060000 && PY_VERSION_HEX < 0x030C00A6)
jpayne@68 458 #endif
jpayne@68 459 #ifndef CYTHON_METH_FASTCALL
jpayne@68 460 #define CYTHON_METH_FASTCALL (PY_VERSION_HEX >= 0x030700A1)
jpayne@68 461 #endif
jpayne@68 462 #ifndef CYTHON_FAST_PYCALL
jpayne@68 463 #define CYTHON_FAST_PYCALL 1
jpayne@68 464 #endif
jpayne@68 465 #ifndef CYTHON_PEP487_INIT_SUBCLASS
jpayne@68 466 #define CYTHON_PEP487_INIT_SUBCLASS 1
jpayne@68 467 #endif
jpayne@68 468 #if PY_VERSION_HEX < 0x03050000
jpayne@68 469 #undef CYTHON_PEP489_MULTI_PHASE_INIT
jpayne@68 470 #define CYTHON_PEP489_MULTI_PHASE_INIT 0
jpayne@68 471 #elif !defined(CYTHON_PEP489_MULTI_PHASE_INIT)
jpayne@68 472 #define CYTHON_PEP489_MULTI_PHASE_INIT 1
jpayne@68 473 #endif
jpayne@68 474 #ifndef CYTHON_USE_MODULE_STATE
jpayne@68 475 #define CYTHON_USE_MODULE_STATE 0
jpayne@68 476 #endif
jpayne@68 477 #if PY_VERSION_HEX < 0x030400a1
jpayne@68 478 #undef CYTHON_USE_TP_FINALIZE
jpayne@68 479 #define CYTHON_USE_TP_FINALIZE 0
jpayne@68 480 #elif !defined(CYTHON_USE_TP_FINALIZE)
jpayne@68 481 #define CYTHON_USE_TP_FINALIZE 1
jpayne@68 482 #endif
jpayne@68 483 #if PY_VERSION_HEX < 0x030600B1
jpayne@68 484 #undef CYTHON_USE_DICT_VERSIONS
jpayne@68 485 #define CYTHON_USE_DICT_VERSIONS 0
jpayne@68 486 #elif !defined(CYTHON_USE_DICT_VERSIONS)
jpayne@68 487 #define CYTHON_USE_DICT_VERSIONS (PY_VERSION_HEX < 0x030C00A5)
jpayne@68 488 #endif
jpayne@68 489 #if PY_VERSION_HEX < 0x030700A3
jpayne@68 490 #undef CYTHON_USE_EXC_INFO_STACK
jpayne@68 491 #define CYTHON_USE_EXC_INFO_STACK 0
jpayne@68 492 #elif !defined(CYTHON_USE_EXC_INFO_STACK)
jpayne@68 493 #define CYTHON_USE_EXC_INFO_STACK 1
jpayne@68 494 #endif
jpayne@68 495 #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
jpayne@68 496 #define CYTHON_UPDATE_DESCRIPTOR_DOC 1
jpayne@68 497 #endif
jpayne@68 498 #ifndef CYTHON_USE_FREELISTS
jpayne@68 499 #define CYTHON_USE_FREELISTS 1
jpayne@68 500 #endif
jpayne@68 501 #endif
jpayne@68 502 #if !defined(CYTHON_FAST_PYCCALL)
jpayne@68 503 #define CYTHON_FAST_PYCCALL (CYTHON_FAST_PYCALL && PY_VERSION_HEX >= 0x030600B1)
jpayne@68 504 #endif
jpayne@68 505 #if !defined(CYTHON_VECTORCALL)
jpayne@68 506 #define CYTHON_VECTORCALL (CYTHON_FAST_PYCCALL && PY_VERSION_HEX >= 0x030800B1)
jpayne@68 507 #endif
jpayne@68 508 #define CYTHON_BACKPORT_VECTORCALL (CYTHON_METH_FASTCALL && PY_VERSION_HEX < 0x030800B1)
jpayne@68 509 #if CYTHON_USE_PYLONG_INTERNALS
jpayne@68 510 #if PY_MAJOR_VERSION < 3
jpayne@68 511 #include "longintrepr.h"
jpayne@68 512 #endif
jpayne@68 513 #undef SHIFT
jpayne@68 514 #undef BASE
jpayne@68 515 #undef MASK
jpayne@68 516 #ifdef SIZEOF_VOID_P
jpayne@68 517 enum { __pyx_check_sizeof_voidp = 1 / (int)(SIZEOF_VOID_P == sizeof(void*)) };
jpayne@68 518 #endif
jpayne@68 519 #endif
jpayne@68 520 #ifndef __has_attribute
jpayne@68 521 #define __has_attribute(x) 0
jpayne@68 522 #endif
jpayne@68 523 #ifndef __has_cpp_attribute
jpayne@68 524 #define __has_cpp_attribute(x) 0
jpayne@68 525 #endif
jpayne@68 526 #ifndef CYTHON_RESTRICT
jpayne@68 527 #if defined(__GNUC__)
jpayne@68 528 #define CYTHON_RESTRICT __restrict__
jpayne@68 529 #elif defined(_MSC_VER) && _MSC_VER >= 1400
jpayne@68 530 #define CYTHON_RESTRICT __restrict
jpayne@68 531 #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
jpayne@68 532 #define CYTHON_RESTRICT restrict
jpayne@68 533 #else
jpayne@68 534 #define CYTHON_RESTRICT
jpayne@68 535 #endif
jpayne@68 536 #endif
jpayne@68 537 #ifndef CYTHON_UNUSED
jpayne@68 538 #if defined(__cplusplus)
jpayne@68 539 /* for clang __has_cpp_attribute(maybe_unused) is true even before C++17
jpayne@68 540 * but leads to warnings with -pedantic, since it is a C++17 feature */
jpayne@68 541 #if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || __cplusplus >= 201703L)
jpayne@68 542 #if __has_cpp_attribute(maybe_unused)
jpayne@68 543 #define CYTHON_UNUSED [[maybe_unused]]
jpayne@68 544 #endif
jpayne@68 545 #endif
jpayne@68 546 #endif
jpayne@68 547 #endif
jpayne@68 548 #ifndef CYTHON_UNUSED
jpayne@68 549 # if defined(__GNUC__)
jpayne@68 550 # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
jpayne@68 551 # define CYTHON_UNUSED __attribute__ ((__unused__))
jpayne@68 552 # else
jpayne@68 553 # define CYTHON_UNUSED
jpayne@68 554 # endif
jpayne@68 555 # elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER))
jpayne@68 556 # define CYTHON_UNUSED __attribute__ ((__unused__))
jpayne@68 557 # else
jpayne@68 558 # define CYTHON_UNUSED
jpayne@68 559 # endif
jpayne@68 560 #endif
jpayne@68 561 #ifndef CYTHON_UNUSED_VAR
jpayne@68 562 # if defined(__cplusplus)
jpayne@68 563 template<class T> void CYTHON_UNUSED_VAR( const T& ) { }
jpayne@68 564 # else
jpayne@68 565 # define CYTHON_UNUSED_VAR(x) (void)(x)
jpayne@68 566 # endif
jpayne@68 567 #endif
jpayne@68 568 #ifndef CYTHON_MAYBE_UNUSED_VAR
jpayne@68 569 #define CYTHON_MAYBE_UNUSED_VAR(x) CYTHON_UNUSED_VAR(x)
jpayne@68 570 #endif
jpayne@68 571 #ifndef CYTHON_NCP_UNUSED
jpayne@68 572 # if CYTHON_COMPILING_IN_CPYTHON
jpayne@68 573 # define CYTHON_NCP_UNUSED
jpayne@68 574 # else
jpayne@68 575 # define CYTHON_NCP_UNUSED CYTHON_UNUSED
jpayne@68 576 # endif
jpayne@68 577 #endif
jpayne@68 578 #ifndef CYTHON_USE_CPP_STD_MOVE
jpayne@68 579 #if defined(__cplusplus) && (\
jpayne@68 580 __cplusplus >= 201103L || (defined(_MSC_VER) && _MSC_VER >= 1600))
jpayne@68 581 #define CYTHON_USE_CPP_STD_MOVE 1
jpayne@68 582 #else
jpayne@68 583 #define CYTHON_USE_CPP_STD_MOVE 0
jpayne@68 584 #endif
jpayne@68 585 #endif
jpayne@68 586 #define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None)
jpayne@68 587 #ifdef _MSC_VER
jpayne@68 588 #ifndef _MSC_STDINT_H_
jpayne@68 589 #if _MSC_VER < 1300
jpayne@68 590 typedef unsigned char uint8_t;
jpayne@68 591 typedef unsigned short uint16_t;
jpayne@68 592 typedef unsigned int uint32_t;
jpayne@68 593 #else
jpayne@68 594 typedef unsigned __int8 uint8_t;
jpayne@68 595 typedef unsigned __int16 uint16_t;
jpayne@68 596 typedef unsigned __int32 uint32_t;
jpayne@68 597 #endif
jpayne@68 598 #endif
jpayne@68 599 #if _MSC_VER < 1300
jpayne@68 600 #ifdef _WIN64
jpayne@68 601 typedef unsigned long long __pyx_uintptr_t;
jpayne@68 602 #else
jpayne@68 603 typedef unsigned int __pyx_uintptr_t;
jpayne@68 604 #endif
jpayne@68 605 #else
jpayne@68 606 #ifdef _WIN64
jpayne@68 607 typedef unsigned __int64 __pyx_uintptr_t;
jpayne@68 608 #else
jpayne@68 609 typedef unsigned __int32 __pyx_uintptr_t;
jpayne@68 610 #endif
jpayne@68 611 #endif
jpayne@68 612 #else
jpayne@68 613 #include <stdint.h>
jpayne@68 614 typedef uintptr_t __pyx_uintptr_t;
jpayne@68 615 #endif
jpayne@68 616 #ifndef CYTHON_FALLTHROUGH
jpayne@68 617 #if defined(__cplusplus)
jpayne@68 618 /* for clang __has_cpp_attribute(fallthrough) is true even before C++17
jpayne@68 619 * but leads to warnings with -pedantic, since it is a C++17 feature */
jpayne@68 620 #if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || __cplusplus >= 201703L)
jpayne@68 621 #if __has_cpp_attribute(fallthrough)
jpayne@68 622 #define CYTHON_FALLTHROUGH [[fallthrough]]
jpayne@68 623 #endif
jpayne@68 624 #endif
jpayne@68 625 #ifndef CYTHON_FALLTHROUGH
jpayne@68 626 #if __has_cpp_attribute(clang::fallthrough)
jpayne@68 627 #define CYTHON_FALLTHROUGH [[clang::fallthrough]]
jpayne@68 628 #elif __has_cpp_attribute(gnu::fallthrough)
jpayne@68 629 #define CYTHON_FALLTHROUGH [[gnu::fallthrough]]
jpayne@68 630 #endif
jpayne@68 631 #endif
jpayne@68 632 #endif
jpayne@68 633 #ifndef CYTHON_FALLTHROUGH
jpayne@68 634 #if __has_attribute(fallthrough)
jpayne@68 635 #define CYTHON_FALLTHROUGH __attribute__((fallthrough))
jpayne@68 636 #else
jpayne@68 637 #define CYTHON_FALLTHROUGH
jpayne@68 638 #endif
jpayne@68 639 #endif
jpayne@68 640 #if defined(__clang__) && defined(__apple_build_version__)
jpayne@68 641 #if __apple_build_version__ < 7000000
jpayne@68 642 #undef CYTHON_FALLTHROUGH
jpayne@68 643 #define CYTHON_FALLTHROUGH
jpayne@68 644 #endif
jpayne@68 645 #endif
jpayne@68 646 #endif
jpayne@68 647 #ifdef __cplusplus
jpayne@68 648 template <typename T>
jpayne@68 649 struct __PYX_IS_UNSIGNED_IMPL {static const bool value = T(0) < T(-1);};
jpayne@68 650 #define __PYX_IS_UNSIGNED(type) (__PYX_IS_UNSIGNED_IMPL<type>::value)
jpayne@68 651 #else
jpayne@68 652 #define __PYX_IS_UNSIGNED(type) (((type)-1) > 0)
jpayne@68 653 #endif
jpayne@68 654 #if CYTHON_COMPILING_IN_PYPY == 1
jpayne@68 655 #define __PYX_NEED_TP_PRINT_SLOT (PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x030A0000)
jpayne@68 656 #else
jpayne@68 657 #define __PYX_NEED_TP_PRINT_SLOT (PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000)
jpayne@68 658 #endif
jpayne@68 659 #define __PYX_REINTERPRET_FUNCION(func_pointer, other_pointer) ((func_pointer)(void(*)(void))(other_pointer))
jpayne@68 660
jpayne@68 661 #ifndef CYTHON_INLINE
jpayne@68 662 #if defined(__clang__)
jpayne@68 663 #define CYTHON_INLINE __inline__ __attribute__ ((__unused__))
jpayne@68 664 #elif defined(__GNUC__)
jpayne@68 665 #define CYTHON_INLINE __inline__
jpayne@68 666 #elif defined(_MSC_VER)
jpayne@68 667 #define CYTHON_INLINE __inline
jpayne@68 668 #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
jpayne@68 669 #define CYTHON_INLINE inline
jpayne@68 670 #else
jpayne@68 671 #define CYTHON_INLINE
jpayne@68 672 #endif
jpayne@68 673 #endif
jpayne@68 674
jpayne@68 675 #define __PYX_BUILD_PY_SSIZE_T "n"
jpayne@68 676 #define CYTHON_FORMAT_SSIZE_T "z"
jpayne@68 677 #if PY_MAJOR_VERSION < 3
jpayne@68 678 #define __Pyx_BUILTIN_MODULE_NAME "__builtin__"
jpayne@68 679 #define __Pyx_DefaultClassType PyClass_Type
jpayne@68 680 #define __Pyx_PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
jpayne@68 681 PyCode_New(a+k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
jpayne@68 682 #else
jpayne@68 683 #define __Pyx_BUILTIN_MODULE_NAME "builtins"
jpayne@68 684 #define __Pyx_DefaultClassType PyType_Type
jpayne@68 685 #if CYTHON_COMPILING_IN_LIMITED_API
jpayne@68 686 static CYTHON_INLINE PyObject* __Pyx_PyCode_New(int a, int p, int k, int l, int s, int f,
jpayne@68 687 PyObject *code, PyObject *c, PyObject* n, PyObject *v,
jpayne@68 688 PyObject *fv, PyObject *cell, PyObject* fn,
jpayne@68 689 PyObject *name, int fline, PyObject *lnos) {
jpayne@68 690 PyObject *exception_table = NULL;
jpayne@68 691 PyObject *types_module=NULL, *code_type=NULL, *result=NULL;
jpayne@68 692 #if __PYX_LIMITED_VERSION_HEX < 0x030B0000
jpayne@68 693 PyObject *version_info;
jpayne@68 694 PyObject *py_minor_version = NULL;
jpayne@68 695 #endif
jpayne@68 696 long minor_version = 0;
jpayne@68 697 PyObject *type, *value, *traceback;
jpayne@68 698 PyErr_Fetch(&type, &value, &traceback);
jpayne@68 699 #if __PYX_LIMITED_VERSION_HEX >= 0x030B0000
jpayne@68 700 minor_version = 11;
jpayne@68 701 #else
jpayne@68 702 if (!(version_info = PySys_GetObject("version_info"))) goto end;
jpayne@68 703 if (!(py_minor_version = PySequence_GetItem(version_info, 1))) goto end;
jpayne@68 704 minor_version = PyLong_AsLong(py_minor_version);
jpayne@68 705 Py_DECREF(py_minor_version);
jpayne@68 706 if (minor_version == -1 && PyErr_Occurred()) goto end;
jpayne@68 707 #endif
jpayne@68 708 if (!(types_module = PyImport_ImportModule("types"))) goto end;
jpayne@68 709 if (!(code_type = PyObject_GetAttrString(types_module, "CodeType"))) goto end;
jpayne@68 710 if (minor_version <= 7) {
jpayne@68 711 (void)p;
jpayne@68 712 result = PyObject_CallFunction(code_type, "iiiiiOOOOOOiOO", a, k, l, s, f, code,
jpayne@68 713 c, n, v, fn, name, fline, lnos, fv, cell);
jpayne@68 714 } else if (minor_version <= 10) {
jpayne@68 715 result = PyObject_CallFunction(code_type, "iiiiiiOOOOOOiOO", a,p, k, l, s, f, code,
jpayne@68 716 c, n, v, fn, name, fline, lnos, fv, cell);
jpayne@68 717 } else {
jpayne@68 718 if (!(exception_table = PyBytes_FromStringAndSize(NULL, 0))) goto end;
jpayne@68 719 result = PyObject_CallFunction(code_type, "iiiiiiOOOOOOOiOO", a,p, k, l, s, f, code,
jpayne@68 720 c, n, v, fn, name, name, fline, lnos, exception_table, fv, cell);
jpayne@68 721 }
jpayne@68 722 end:
jpayne@68 723 Py_XDECREF(code_type);
jpayne@68 724 Py_XDECREF(exception_table);
jpayne@68 725 Py_XDECREF(types_module);
jpayne@68 726 if (type) {
jpayne@68 727 PyErr_Restore(type, value, traceback);
jpayne@68 728 }
jpayne@68 729 return result;
jpayne@68 730 }
jpayne@68 731 #ifndef CO_OPTIMIZED
jpayne@68 732 #define CO_OPTIMIZED 0x0001
jpayne@68 733 #endif
jpayne@68 734 #ifndef CO_NEWLOCALS
jpayne@68 735 #define CO_NEWLOCALS 0x0002
jpayne@68 736 #endif
jpayne@68 737 #ifndef CO_VARARGS
jpayne@68 738 #define CO_VARARGS 0x0004
jpayne@68 739 #endif
jpayne@68 740 #ifndef CO_VARKEYWORDS
jpayne@68 741 #define CO_VARKEYWORDS 0x0008
jpayne@68 742 #endif
jpayne@68 743 #ifndef CO_ASYNC_GENERATOR
jpayne@68 744 #define CO_ASYNC_GENERATOR 0x0200
jpayne@68 745 #endif
jpayne@68 746 #ifndef CO_GENERATOR
jpayne@68 747 #define CO_GENERATOR 0x0020
jpayne@68 748 #endif
jpayne@68 749 #ifndef CO_COROUTINE
jpayne@68 750 #define CO_COROUTINE 0x0080
jpayne@68 751 #endif
jpayne@68 752 #elif PY_VERSION_HEX >= 0x030B0000
jpayne@68 753 static CYTHON_INLINE PyCodeObject* __Pyx_PyCode_New(int a, int p, int k, int l, int s, int f,
jpayne@68 754 PyObject *code, PyObject *c, PyObject* n, PyObject *v,
jpayne@68 755 PyObject *fv, PyObject *cell, PyObject* fn,
jpayne@68 756 PyObject *name, int fline, PyObject *lnos) {
jpayne@68 757 PyCodeObject *result;
jpayne@68 758 PyObject *empty_bytes = PyBytes_FromStringAndSize("", 0);
jpayne@68 759 if (!empty_bytes) return NULL;
jpayne@68 760 result =
jpayne@68 761 #if PY_VERSION_HEX >= 0x030C0000
jpayne@68 762 PyUnstable_Code_NewWithPosOnlyArgs
jpayne@68 763 #else
jpayne@68 764 PyCode_NewWithPosOnlyArgs
jpayne@68 765 #endif
jpayne@68 766 (a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, name, fline, lnos, empty_bytes);
jpayne@68 767 Py_DECREF(empty_bytes);
jpayne@68 768 return result;
jpayne@68 769 }
jpayne@68 770 #elif PY_VERSION_HEX >= 0x030800B2 && !CYTHON_COMPILING_IN_PYPY
jpayne@68 771 #define __Pyx_PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
jpayne@68 772 PyCode_NewWithPosOnlyArgs(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
jpayne@68 773 #else
jpayne@68 774 #define __Pyx_PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
jpayne@68 775 PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
jpayne@68 776 #endif
jpayne@68 777 #endif
jpayne@68 778 #if PY_VERSION_HEX >= 0x030900A4 || defined(Py_IS_TYPE)
jpayne@68 779 #define __Pyx_IS_TYPE(ob, type) Py_IS_TYPE(ob, type)
jpayne@68 780 #else
jpayne@68 781 #define __Pyx_IS_TYPE(ob, type) (((const PyObject*)ob)->ob_type == (type))
jpayne@68 782 #endif
jpayne@68 783 #if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_Is)
jpayne@68 784 #define __Pyx_Py_Is(x, y) Py_Is(x, y)
jpayne@68 785 #else
jpayne@68 786 #define __Pyx_Py_Is(x, y) ((x) == (y))
jpayne@68 787 #endif
jpayne@68 788 #if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsNone)
jpayne@68 789 #define __Pyx_Py_IsNone(ob) Py_IsNone(ob)
jpayne@68 790 #else
jpayne@68 791 #define __Pyx_Py_IsNone(ob) __Pyx_Py_Is((ob), Py_None)
jpayne@68 792 #endif
jpayne@68 793 #if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsTrue)
jpayne@68 794 #define __Pyx_Py_IsTrue(ob) Py_IsTrue(ob)
jpayne@68 795 #else
jpayne@68 796 #define __Pyx_Py_IsTrue(ob) __Pyx_Py_Is((ob), Py_True)
jpayne@68 797 #endif
jpayne@68 798 #if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsFalse)
jpayne@68 799 #define __Pyx_Py_IsFalse(ob) Py_IsFalse(ob)
jpayne@68 800 #else
jpayne@68 801 #define __Pyx_Py_IsFalse(ob) __Pyx_Py_Is((ob), Py_False)
jpayne@68 802 #endif
jpayne@68 803 #define __Pyx_NoneAsNull(obj) (__Pyx_Py_IsNone(obj) ? NULL : (obj))
jpayne@68 804 #if PY_VERSION_HEX >= 0x030900F0 && !CYTHON_COMPILING_IN_PYPY
jpayne@68 805 #define __Pyx_PyObject_GC_IsFinalized(o) PyObject_GC_IsFinalized(o)
jpayne@68 806 #else
jpayne@68 807 #define __Pyx_PyObject_GC_IsFinalized(o) _PyGC_FINALIZED(o)
jpayne@68 808 #endif
jpayne@68 809 #ifndef CO_COROUTINE
jpayne@68 810 #define CO_COROUTINE 0x80
jpayne@68 811 #endif
jpayne@68 812 #ifndef CO_ASYNC_GENERATOR
jpayne@68 813 #define CO_ASYNC_GENERATOR 0x200
jpayne@68 814 #endif
jpayne@68 815 #ifndef Py_TPFLAGS_CHECKTYPES
jpayne@68 816 #define Py_TPFLAGS_CHECKTYPES 0
jpayne@68 817 #endif
jpayne@68 818 #ifndef Py_TPFLAGS_HAVE_INDEX
jpayne@68 819 #define Py_TPFLAGS_HAVE_INDEX 0
jpayne@68 820 #endif
jpayne@68 821 #ifndef Py_TPFLAGS_HAVE_NEWBUFFER
jpayne@68 822 #define Py_TPFLAGS_HAVE_NEWBUFFER 0
jpayne@68 823 #endif
jpayne@68 824 #ifndef Py_TPFLAGS_HAVE_FINALIZE
jpayne@68 825 #define Py_TPFLAGS_HAVE_FINALIZE 0
jpayne@68 826 #endif
jpayne@68 827 #ifndef Py_TPFLAGS_SEQUENCE
jpayne@68 828 #define Py_TPFLAGS_SEQUENCE 0
jpayne@68 829 #endif
jpayne@68 830 #ifndef Py_TPFLAGS_MAPPING
jpayne@68 831 #define Py_TPFLAGS_MAPPING 0
jpayne@68 832 #endif
jpayne@68 833 #ifndef METH_STACKLESS
jpayne@68 834 #define METH_STACKLESS 0
jpayne@68 835 #endif
jpayne@68 836 #if PY_VERSION_HEX <= 0x030700A3 || !defined(METH_FASTCALL)
jpayne@68 837 #ifndef METH_FASTCALL
jpayne@68 838 #define METH_FASTCALL 0x80
jpayne@68 839 #endif
jpayne@68 840 typedef PyObject *(*__Pyx_PyCFunctionFast) (PyObject *self, PyObject *const *args, Py_ssize_t nargs);
jpayne@68 841 typedef PyObject *(*__Pyx_PyCFunctionFastWithKeywords) (PyObject *self, PyObject *const *args,
jpayne@68 842 Py_ssize_t nargs, PyObject *kwnames);
jpayne@68 843 #else
jpayne@68 844 #if PY_VERSION_HEX >= 0x030d00A4
jpayne@68 845 # define __Pyx_PyCFunctionFast PyCFunctionFast
jpayne@68 846 # define __Pyx_PyCFunctionFastWithKeywords PyCFunctionFastWithKeywords
jpayne@68 847 #else
jpayne@68 848 # define __Pyx_PyCFunctionFast _PyCFunctionFast
jpayne@68 849 # define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords
jpayne@68 850 #endif
jpayne@68 851 #endif
jpayne@68 852 #if CYTHON_METH_FASTCALL
jpayne@68 853 #define __Pyx_METH_FASTCALL METH_FASTCALL
jpayne@68 854 #define __Pyx_PyCFunction_FastCall __Pyx_PyCFunctionFast
jpayne@68 855 #define __Pyx_PyCFunction_FastCallWithKeywords __Pyx_PyCFunctionFastWithKeywords
jpayne@68 856 #else
jpayne@68 857 #define __Pyx_METH_FASTCALL METH_VARARGS
jpayne@68 858 #define __Pyx_PyCFunction_FastCall PyCFunction
jpayne@68 859 #define __Pyx_PyCFunction_FastCallWithKeywords PyCFunctionWithKeywords
jpayne@68 860 #endif
jpayne@68 861 #if CYTHON_VECTORCALL
jpayne@68 862 #define __pyx_vectorcallfunc vectorcallfunc
jpayne@68 863 #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET PY_VECTORCALL_ARGUMENTS_OFFSET
jpayne@68 864 #define __Pyx_PyVectorcall_NARGS(n) PyVectorcall_NARGS((size_t)(n))
jpayne@68 865 #elif CYTHON_BACKPORT_VECTORCALL
jpayne@68 866 typedef PyObject *(*__pyx_vectorcallfunc)(PyObject *callable, PyObject *const *args,
jpayne@68 867 size_t nargsf, PyObject *kwnames);
jpayne@68 868 #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET ((size_t)1 << (8 * sizeof(size_t) - 1))
jpayne@68 869 #define __Pyx_PyVectorcall_NARGS(n) ((Py_ssize_t)(((size_t)(n)) & ~__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET))
jpayne@68 870 #else
jpayne@68 871 #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET 0
jpayne@68 872 #define __Pyx_PyVectorcall_NARGS(n) ((Py_ssize_t)(n))
jpayne@68 873 #endif
jpayne@68 874 #if PY_MAJOR_VERSION >= 0x030900B1
jpayne@68 875 #define __Pyx_PyCFunction_CheckExact(func) PyCFunction_CheckExact(func)
jpayne@68 876 #else
jpayne@68 877 #define __Pyx_PyCFunction_CheckExact(func) PyCFunction_Check(func)
jpayne@68 878 #endif
jpayne@68 879 #define __Pyx_CyOrPyCFunction_Check(func) PyCFunction_Check(func)
jpayne@68 880 #if CYTHON_COMPILING_IN_CPYTHON
jpayne@68 881 #define __Pyx_CyOrPyCFunction_GET_FUNCTION(func) (((PyCFunctionObject*)(func))->m_ml->ml_meth)
jpayne@68 882 #elif !CYTHON_COMPILING_IN_LIMITED_API
jpayne@68 883 #define __Pyx_CyOrPyCFunction_GET_FUNCTION(func) PyCFunction_GET_FUNCTION(func)
jpayne@68 884 #endif
jpayne@68 885 #if CYTHON_COMPILING_IN_CPYTHON
jpayne@68 886 #define __Pyx_CyOrPyCFunction_GET_FLAGS(func) (((PyCFunctionObject*)(func))->m_ml->ml_flags)
jpayne@68 887 static CYTHON_INLINE PyObject* __Pyx_CyOrPyCFunction_GET_SELF(PyObject *func) {
jpayne@68 888 return (__Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_STATIC) ? NULL : ((PyCFunctionObject*)func)->m_self;
jpayne@68 889 }
jpayne@68 890 #endif
jpayne@68 891 static CYTHON_INLINE int __Pyx__IsSameCFunction(PyObject *func, void *cfunc) {
jpayne@68 892 #if CYTHON_COMPILING_IN_LIMITED_API
jpayne@68 893 return PyCFunction_Check(func) && PyCFunction_GetFunction(func) == (PyCFunction) cfunc;
jpayne@68 894 #else
jpayne@68 895 return PyCFunction_Check(func) && PyCFunction_GET_FUNCTION(func) == (PyCFunction) cfunc;
jpayne@68 896 #endif
jpayne@68 897 }
jpayne@68 898 #define __Pyx_IsSameCFunction(func, cfunc) __Pyx__IsSameCFunction(func, cfunc)
jpayne@68 899 #if __PYX_LIMITED_VERSION_HEX < 0x030900B1
jpayne@68 900 #define __Pyx_PyType_FromModuleAndSpec(m, s, b) ((void)m, PyType_FromSpecWithBases(s, b))
jpayne@68 901 typedef PyObject *(*__Pyx_PyCMethod)(PyObject *, PyTypeObject *, PyObject *const *, size_t, PyObject *);
jpayne@68 902 #else
jpayne@68 903 #define __Pyx_PyType_FromModuleAndSpec(m, s, b) PyType_FromModuleAndSpec(m, s, b)
jpayne@68 904 #define __Pyx_PyCMethod PyCMethod
jpayne@68 905 #endif
jpayne@68 906 #ifndef METH_METHOD
jpayne@68 907 #define METH_METHOD 0x200
jpayne@68 908 #endif
jpayne@68 909 #if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc)
jpayne@68 910 #define PyObject_Malloc(s) PyMem_Malloc(s)
jpayne@68 911 #define PyObject_Free(p) PyMem_Free(p)
jpayne@68 912 #define PyObject_Realloc(p) PyMem_Realloc(p)
jpayne@68 913 #endif
jpayne@68 914 #if CYTHON_COMPILING_IN_LIMITED_API
jpayne@68 915 #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0)
jpayne@68 916 #define __Pyx_PyFrame_SetLineNumber(frame, lineno)
jpayne@68 917 #else
jpayne@68 918 #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0)
jpayne@68 919 #define __Pyx_PyFrame_SetLineNumber(frame, lineno) (frame)->f_lineno = (lineno)
jpayne@68 920 #endif
jpayne@68 921 #if CYTHON_COMPILING_IN_LIMITED_API
jpayne@68 922 #define __Pyx_PyThreadState_Current PyThreadState_Get()
jpayne@68 923 #elif !CYTHON_FAST_THREAD_STATE
jpayne@68 924 #define __Pyx_PyThreadState_Current PyThreadState_GET()
jpayne@68 925 #elif PY_VERSION_HEX >= 0x030d00A1
jpayne@68 926 #define __Pyx_PyThreadState_Current PyThreadState_GetUnchecked()
jpayne@68 927 #elif PY_VERSION_HEX >= 0x03060000
jpayne@68 928 #define __Pyx_PyThreadState_Current _PyThreadState_UncheckedGet()
jpayne@68 929 #elif PY_VERSION_HEX >= 0x03000000
jpayne@68 930 #define __Pyx_PyThreadState_Current PyThreadState_GET()
jpayne@68 931 #else
jpayne@68 932 #define __Pyx_PyThreadState_Current _PyThreadState_Current
jpayne@68 933 #endif
jpayne@68 934 #if CYTHON_COMPILING_IN_LIMITED_API
jpayne@68 935 static CYTHON_INLINE void *__Pyx_PyModule_GetState(PyObject *op)
jpayne@68 936 {
jpayne@68 937 void *result;
jpayne@68 938 result = PyModule_GetState(op);
jpayne@68 939 if (!result)
jpayne@68 940 Py_FatalError("Couldn't find the module state");
jpayne@68 941 return result;
jpayne@68 942 }
jpayne@68 943 #endif
jpayne@68 944 #define __Pyx_PyObject_GetSlot(obj, name, func_ctype) __Pyx_PyType_GetSlot(Py_TYPE(obj), name, func_ctype)
jpayne@68 945 #if CYTHON_COMPILING_IN_LIMITED_API
jpayne@68 946 #define __Pyx_PyType_GetSlot(type, name, func_ctype) ((func_ctype) PyType_GetSlot((type), Py_##name))
jpayne@68 947 #else
jpayne@68 948 #define __Pyx_PyType_GetSlot(type, name, func_ctype) ((type)->name)
jpayne@68 949 #endif
jpayne@68 950 #if PY_VERSION_HEX < 0x030700A2 && !defined(PyThread_tss_create) && !defined(Py_tss_NEEDS_INIT)
jpayne@68 951 #include "pythread.h"
jpayne@68 952 #define Py_tss_NEEDS_INIT 0
jpayne@68 953 typedef int Py_tss_t;
jpayne@68 954 static CYTHON_INLINE int PyThread_tss_create(Py_tss_t *key) {
jpayne@68 955 *key = PyThread_create_key();
jpayne@68 956 return 0;
jpayne@68 957 }
jpayne@68 958 static CYTHON_INLINE Py_tss_t * PyThread_tss_alloc(void) {
jpayne@68 959 Py_tss_t *key = (Py_tss_t *)PyObject_Malloc(sizeof(Py_tss_t));
jpayne@68 960 *key = Py_tss_NEEDS_INIT;
jpayne@68 961 return key;
jpayne@68 962 }
jpayne@68 963 static CYTHON_INLINE void PyThread_tss_free(Py_tss_t *key) {
jpayne@68 964 PyObject_Free(key);
jpayne@68 965 }
jpayne@68 966 static CYTHON_INLINE int PyThread_tss_is_created(Py_tss_t *key) {
jpayne@68 967 return *key != Py_tss_NEEDS_INIT;
jpayne@68 968 }
jpayne@68 969 static CYTHON_INLINE void PyThread_tss_delete(Py_tss_t *key) {
jpayne@68 970 PyThread_delete_key(*key);
jpayne@68 971 *key = Py_tss_NEEDS_INIT;
jpayne@68 972 }
jpayne@68 973 static CYTHON_INLINE int PyThread_tss_set(Py_tss_t *key, void *value) {
jpayne@68 974 return PyThread_set_key_value(*key, value);
jpayne@68 975 }
jpayne@68 976 static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) {
jpayne@68 977 return PyThread_get_key_value(*key);
jpayne@68 978 }
jpayne@68 979 #endif
jpayne@68 980 #if PY_MAJOR_VERSION < 3
jpayne@68 981 #if CYTHON_COMPILING_IN_PYPY
jpayne@68 982 #if PYPY_VERSION_NUM < 0x07030600
jpayne@68 983 #if defined(__cplusplus) && __cplusplus >= 201402L
jpayne@68 984 [[deprecated("`with nogil:` inside a nogil function will not release the GIL in PyPy2 < 7.3.6")]]
jpayne@68 985 #elif defined(__GNUC__) || defined(__clang__)
jpayne@68 986 __attribute__ ((__deprecated__("`with nogil:` inside a nogil function will not release the GIL in PyPy2 < 7.3.6")))
jpayne@68 987 #elif defined(_MSC_VER)
jpayne@68 988 __declspec(deprecated("`with nogil:` inside a nogil function will not release the GIL in PyPy2 < 7.3.6"))
jpayne@68 989 #endif
jpayne@68 990 static CYTHON_INLINE int PyGILState_Check(void) {
jpayne@68 991 return 0;
jpayne@68 992 }
jpayne@68 993 #else // PYPY_VERSION_NUM < 0x07030600
jpayne@68 994 #endif // PYPY_VERSION_NUM < 0x07030600
jpayne@68 995 #else
jpayne@68 996 static CYTHON_INLINE int PyGILState_Check(void) {
jpayne@68 997 PyThreadState * tstate = _PyThreadState_Current;
jpayne@68 998 return tstate && (tstate == PyGILState_GetThisThreadState());
jpayne@68 999 }
jpayne@68 1000 #endif
jpayne@68 1001 #endif
jpayne@68 1002 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030d0000 || defined(_PyDict_NewPresized)
jpayne@68 1003 #define __Pyx_PyDict_NewPresized(n) ((n <= 8) ? PyDict_New() : _PyDict_NewPresized(n))
jpayne@68 1004 #else
jpayne@68 1005 #define __Pyx_PyDict_NewPresized(n) PyDict_New()
jpayne@68 1006 #endif
jpayne@68 1007 #if PY_MAJOR_VERSION >= 3 || CYTHON_FUTURE_DIVISION
jpayne@68 1008 #define __Pyx_PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y)
jpayne@68 1009 #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceTrueDivide(x,y)
jpayne@68 1010 #else
jpayne@68 1011 #define __Pyx_PyNumber_Divide(x,y) PyNumber_Divide(x,y)
jpayne@68 1012 #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceDivide(x,y)
jpayne@68 1013 #endif
jpayne@68 1014 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX > 0x030600B4 && PY_VERSION_HEX < 0x030d0000 && CYTHON_USE_UNICODE_INTERNALS
jpayne@68 1015 #define __Pyx_PyDict_GetItemStrWithError(dict, name) _PyDict_GetItem_KnownHash(dict, name, ((PyASCIIObject *) name)->hash)
jpayne@68 1016 static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStr(PyObject *dict, PyObject *name) {
jpayne@68 1017 PyObject *res = __Pyx_PyDict_GetItemStrWithError(dict, name);
jpayne@68 1018 if (res == NULL) PyErr_Clear();
jpayne@68 1019 return res;
jpayne@68 1020 }
jpayne@68 1021 #elif PY_MAJOR_VERSION >= 3 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07020000)
jpayne@68 1022 #define __Pyx_PyDict_GetItemStrWithError PyDict_GetItemWithError
jpayne@68 1023 #define __Pyx_PyDict_GetItemStr PyDict_GetItem
jpayne@68 1024 #else
jpayne@68 1025 static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStrWithError(PyObject *dict, PyObject *name) {
jpayne@68 1026 #if CYTHON_COMPILING_IN_PYPY
jpayne@68 1027 return PyDict_GetItem(dict, name);
jpayne@68 1028 #else
jpayne@68 1029 PyDictEntry *ep;
jpayne@68 1030 PyDictObject *mp = (PyDictObject*) dict;
jpayne@68 1031 long hash = ((PyStringObject *) name)->ob_shash;
jpayne@68 1032 assert(hash != -1);
jpayne@68 1033 ep = (mp->ma_lookup)(mp, name, hash);
jpayne@68 1034 if (ep == NULL) {
jpayne@68 1035 return NULL;
jpayne@68 1036 }
jpayne@68 1037 return ep->me_value;
jpayne@68 1038 #endif
jpayne@68 1039 }
jpayne@68 1040 #define __Pyx_PyDict_GetItemStr PyDict_GetItem
jpayne@68 1041 #endif
jpayne@68 1042 #if CYTHON_USE_TYPE_SLOTS
jpayne@68 1043 #define __Pyx_PyType_GetFlags(tp) (((PyTypeObject *)tp)->tp_flags)
jpayne@68 1044 #define __Pyx_PyType_HasFeature(type, feature) ((__Pyx_PyType_GetFlags(type) & (feature)) != 0)
jpayne@68 1045 #define __Pyx_PyObject_GetIterNextFunc(obj) (Py_TYPE(obj)->tp_iternext)
jpayne@68 1046 #else
jpayne@68 1047 #define __Pyx_PyType_GetFlags(tp) (PyType_GetFlags((PyTypeObject *)tp))
jpayne@68 1048 #define __Pyx_PyType_HasFeature(type, feature) PyType_HasFeature(type, feature)
jpayne@68 1049 #define __Pyx_PyObject_GetIterNextFunc(obj) PyIter_Next
jpayne@68 1050 #endif
jpayne@68 1051 #if CYTHON_COMPILING_IN_LIMITED_API
jpayne@68 1052 #define __Pyx_SetItemOnTypeDict(tp, k, v) PyObject_GenericSetAttr((PyObject*)tp, k, v)
jpayne@68 1053 #else
jpayne@68 1054 #define __Pyx_SetItemOnTypeDict(tp, k, v) PyDict_SetItem(tp->tp_dict, k, v)
jpayne@68 1055 #endif
jpayne@68 1056 #if CYTHON_USE_TYPE_SPECS && PY_VERSION_HEX >= 0x03080000
jpayne@68 1057 #define __Pyx_PyHeapTypeObject_GC_Del(obj) {\
jpayne@68 1058 PyTypeObject *type = Py_TYPE((PyObject*)obj);\
jpayne@68 1059 assert(__Pyx_PyType_HasFeature(type, Py_TPFLAGS_HEAPTYPE));\
jpayne@68 1060 PyObject_GC_Del(obj);\
jpayne@68 1061 Py_DECREF(type);\
jpayne@68 1062 }
jpayne@68 1063 #else
jpayne@68 1064 #define __Pyx_PyHeapTypeObject_GC_Del(obj) PyObject_GC_Del(obj)
jpayne@68 1065 #endif
jpayne@68 1066 #if CYTHON_COMPILING_IN_LIMITED_API
jpayne@68 1067 #define CYTHON_PEP393_ENABLED 1
jpayne@68 1068 #define __Pyx_PyUnicode_READY(op) (0)
jpayne@68 1069 #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GetLength(u)
jpayne@68 1070 #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_ReadChar(u, i)
jpayne@68 1071 #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) ((void)u, 1114111U)
jpayne@68 1072 #define __Pyx_PyUnicode_KIND(u) ((void)u, (0))
jpayne@68 1073 #define __Pyx_PyUnicode_DATA(u) ((void*)u)
jpayne@68 1074 #define __Pyx_PyUnicode_READ(k, d, i) ((void)k, PyUnicode_ReadChar((PyObject*)(d), i))
jpayne@68 1075 #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GetLength(u))
jpayne@68 1076 #elif PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND)
jpayne@68 1077 #define CYTHON_PEP393_ENABLED 1
jpayne@68 1078 #if PY_VERSION_HEX >= 0x030C0000
jpayne@68 1079 #define __Pyx_PyUnicode_READY(op) (0)
jpayne@68 1080 #else
jpayne@68 1081 #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ?\
jpayne@68 1082 0 : _PyUnicode_Ready((PyObject *)(op)))
jpayne@68 1083 #endif
jpayne@68 1084 #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_LENGTH(u)
jpayne@68 1085 #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i)
jpayne@68 1086 #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) PyUnicode_MAX_CHAR_VALUE(u)
jpayne@68 1087 #define __Pyx_PyUnicode_KIND(u) ((int)PyUnicode_KIND(u))
jpayne@68 1088 #define __Pyx_PyUnicode_DATA(u) PyUnicode_DATA(u)
jpayne@68 1089 #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i)
jpayne@68 1090 #define __Pyx_PyUnicode_WRITE(k, d, i, ch) PyUnicode_WRITE(k, d, i, (Py_UCS4) ch)
jpayne@68 1091 #if PY_VERSION_HEX >= 0x030C0000
jpayne@68 1092 #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_LENGTH(u))
jpayne@68 1093 #else
jpayne@68 1094 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03090000
jpayne@68 1095 #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : ((PyCompactUnicodeObject *)(u))->wstr_length))
jpayne@68 1096 #else
jpayne@68 1097 #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u)))
jpayne@68 1098 #endif
jpayne@68 1099 #endif
jpayne@68 1100 #else
jpayne@68 1101 #define CYTHON_PEP393_ENABLED 0
jpayne@68 1102 #define PyUnicode_1BYTE_KIND 1
jpayne@68 1103 #define PyUnicode_2BYTE_KIND 2
jpayne@68 1104 #define PyUnicode_4BYTE_KIND 4
jpayne@68 1105 #define __Pyx_PyUnicode_READY(op) (0)
jpayne@68 1106 #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_SIZE(u)
jpayne@68 1107 #define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i]))
jpayne@68 1108 #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) ((sizeof(Py_UNICODE) == 2) ? 65535U : 1114111U)
jpayne@68 1109 #define __Pyx_PyUnicode_KIND(u) ((int)sizeof(Py_UNICODE))
jpayne@68 1110 #define __Pyx_PyUnicode_DATA(u) ((void*)PyUnicode_AS_UNICODE(u))
jpayne@68 1111 #define __Pyx_PyUnicode_READ(k, d, i) ((void)(k), (Py_UCS4)(((Py_UNICODE*)d)[i]))
jpayne@68 1112 #define __Pyx_PyUnicode_WRITE(k, d, i, ch) (((void)(k)), ((Py_UNICODE*)d)[i] = (Py_UNICODE) ch)
jpayne@68 1113 #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_SIZE(u))
jpayne@68 1114 #endif
jpayne@68 1115 #if CYTHON_COMPILING_IN_PYPY
jpayne@68 1116 #define __Pyx_PyUnicode_Concat(a, b) PyNumber_Add(a, b)
jpayne@68 1117 #define __Pyx_PyUnicode_ConcatSafe(a, b) PyNumber_Add(a, b)
jpayne@68 1118 #else
jpayne@68 1119 #define __Pyx_PyUnicode_Concat(a, b) PyUnicode_Concat(a, b)
jpayne@68 1120 #define __Pyx_PyUnicode_ConcatSafe(a, b) ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ?\
jpayne@68 1121 PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b))
jpayne@68 1122 #endif
jpayne@68 1123 #if CYTHON_COMPILING_IN_PYPY
jpayne@68 1124 #if !defined(PyUnicode_DecodeUnicodeEscape)
jpayne@68 1125 #define PyUnicode_DecodeUnicodeEscape(s, size, errors) PyUnicode_Decode(s, size, "unicode_escape", errors)
jpayne@68 1126 #endif
jpayne@68 1127 #if !defined(PyUnicode_Contains) || (PY_MAJOR_VERSION == 2 && PYPY_VERSION_NUM < 0x07030500)
jpayne@68 1128 #undef PyUnicode_Contains
jpayne@68 1129 #define PyUnicode_Contains(u, s) PySequence_Contains(u, s)
jpayne@68 1130 #endif
jpayne@68 1131 #if !defined(PyByteArray_Check)
jpayne@68 1132 #define PyByteArray_Check(obj) PyObject_TypeCheck(obj, &PyByteArray_Type)
jpayne@68 1133 #endif
jpayne@68 1134 #if !defined(PyObject_Format)
jpayne@68 1135 #define PyObject_Format(obj, fmt) PyObject_CallMethod(obj, "__format__", "O", fmt)
jpayne@68 1136 #endif
jpayne@68 1137 #endif
jpayne@68 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@68 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@68 1140 #if PY_MAJOR_VERSION >= 3
jpayne@68 1141 #define __Pyx_PyString_Format(a, b) PyUnicode_Format(a, b)
jpayne@68 1142 #else
jpayne@68 1143 #define __Pyx_PyString_Format(a, b) PyString_Format(a, b)
jpayne@68 1144 #endif
jpayne@68 1145 #if PY_MAJOR_VERSION < 3 && !defined(PyObject_ASCII)
jpayne@68 1146 #define PyObject_ASCII(o) PyObject_Repr(o)
jpayne@68 1147 #endif
jpayne@68 1148 #if PY_MAJOR_VERSION >= 3
jpayne@68 1149 #define PyBaseString_Type PyUnicode_Type
jpayne@68 1150 #define PyStringObject PyUnicodeObject
jpayne@68 1151 #define PyString_Type PyUnicode_Type
jpayne@68 1152 #define PyString_Check PyUnicode_Check
jpayne@68 1153 #define PyString_CheckExact PyUnicode_CheckExact
jpayne@68 1154 #ifndef PyObject_Unicode
jpayne@68 1155 #define PyObject_Unicode PyObject_Str
jpayne@68 1156 #endif
jpayne@68 1157 #endif
jpayne@68 1158 #if PY_MAJOR_VERSION >= 3
jpayne@68 1159 #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj)
jpayne@68 1160 #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj)
jpayne@68 1161 #else
jpayne@68 1162 #define __Pyx_PyBaseString_Check(obj) (PyString_Check(obj) || PyUnicode_Check(obj))
jpayne@68 1163 #define __Pyx_PyBaseString_CheckExact(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj))
jpayne@68 1164 #endif
jpayne@68 1165 #if CYTHON_COMPILING_IN_CPYTHON
jpayne@68 1166 #define __Pyx_PySequence_ListKeepNew(obj)\
jpayne@68 1167 (likely(PyList_CheckExact(obj) && Py_REFCNT(obj) == 1) ? __Pyx_NewRef(obj) : PySequence_List(obj))
jpayne@68 1168 #else
jpayne@68 1169 #define __Pyx_PySequence_ListKeepNew(obj) PySequence_List(obj)
jpayne@68 1170 #endif
jpayne@68 1171 #ifndef PySet_CheckExact
jpayne@68 1172 #define PySet_CheckExact(obj) __Pyx_IS_TYPE(obj, &PySet_Type)
jpayne@68 1173 #endif
jpayne@68 1174 #if PY_VERSION_HEX >= 0x030900A4
jpayne@68 1175 #define __Pyx_SET_REFCNT(obj, refcnt) Py_SET_REFCNT(obj, refcnt)
jpayne@68 1176 #define __Pyx_SET_SIZE(obj, size) Py_SET_SIZE(obj, size)
jpayne@68 1177 #else
jpayne@68 1178 #define __Pyx_SET_REFCNT(obj, refcnt) Py_REFCNT(obj) = (refcnt)
jpayne@68 1179 #define __Pyx_SET_SIZE(obj, size) Py_SIZE(obj) = (size)
jpayne@68 1180 #endif
jpayne@68 1181 #if CYTHON_ASSUME_SAFE_MACROS
jpayne@68 1182 #define __Pyx_PySequence_ITEM(o, i) PySequence_ITEM(o, i)
jpayne@68 1183 #define __Pyx_PySequence_SIZE(seq) Py_SIZE(seq)
jpayne@68 1184 #define __Pyx_PyTuple_SET_ITEM(o, i, v) (PyTuple_SET_ITEM(o, i, v), (0))
jpayne@68 1185 #define __Pyx_PyList_SET_ITEM(o, i, v) (PyList_SET_ITEM(o, i, v), (0))
jpayne@68 1186 #define __Pyx_PyTuple_GET_SIZE(o) PyTuple_GET_SIZE(o)
jpayne@68 1187 #define __Pyx_PyList_GET_SIZE(o) PyList_GET_SIZE(o)
jpayne@68 1188 #define __Pyx_PySet_GET_SIZE(o) PySet_GET_SIZE(o)
jpayne@68 1189 #define __Pyx_PyBytes_GET_SIZE(o) PyBytes_GET_SIZE(o)
jpayne@68 1190 #define __Pyx_PyByteArray_GET_SIZE(o) PyByteArray_GET_SIZE(o)
jpayne@68 1191 #else
jpayne@68 1192 #define __Pyx_PySequence_ITEM(o, i) PySequence_GetItem(o, i)
jpayne@68 1193 #define __Pyx_PySequence_SIZE(seq) PySequence_Size(seq)
jpayne@68 1194 #define __Pyx_PyTuple_SET_ITEM(o, i, v) PyTuple_SetItem(o, i, v)
jpayne@68 1195 #define __Pyx_PyList_SET_ITEM(o, i, v) PyList_SetItem(o, i, v)
jpayne@68 1196 #define __Pyx_PyTuple_GET_SIZE(o) PyTuple_Size(o)
jpayne@68 1197 #define __Pyx_PyList_GET_SIZE(o) PyList_Size(o)
jpayne@68 1198 #define __Pyx_PySet_GET_SIZE(o) PySet_Size(o)
jpayne@68 1199 #define __Pyx_PyBytes_GET_SIZE(o) PyBytes_Size(o)
jpayne@68 1200 #define __Pyx_PyByteArray_GET_SIZE(o) PyByteArray_Size(o)
jpayne@68 1201 #endif
jpayne@68 1202 #if __PYX_LIMITED_VERSION_HEX >= 0x030d00A1
jpayne@68 1203 #define __Pyx_PyImport_AddModuleRef(name) PyImport_AddModuleRef(name)
jpayne@68 1204 #else
jpayne@68 1205 static CYTHON_INLINE PyObject *__Pyx_PyImport_AddModuleRef(const char *name) {
jpayne@68 1206 PyObject *module = PyImport_AddModule(name);
jpayne@68 1207 Py_XINCREF(module);
jpayne@68 1208 return module;
jpayne@68 1209 }
jpayne@68 1210 #endif
jpayne@68 1211 #if PY_MAJOR_VERSION >= 3
jpayne@68 1212 #define PyIntObject PyLongObject
jpayne@68 1213 #define PyInt_Type PyLong_Type
jpayne@68 1214 #define PyInt_Check(op) PyLong_Check(op)
jpayne@68 1215 #define PyInt_CheckExact(op) PyLong_CheckExact(op)
jpayne@68 1216 #define __Pyx_Py3Int_Check(op) PyLong_Check(op)
jpayne@68 1217 #define __Pyx_Py3Int_CheckExact(op) PyLong_CheckExact(op)
jpayne@68 1218 #define PyInt_FromString PyLong_FromString
jpayne@68 1219 #define PyInt_FromUnicode PyLong_FromUnicode
jpayne@68 1220 #define PyInt_FromLong PyLong_FromLong
jpayne@68 1221 #define PyInt_FromSize_t PyLong_FromSize_t
jpayne@68 1222 #define PyInt_FromSsize_t PyLong_FromSsize_t
jpayne@68 1223 #define PyInt_AsLong PyLong_AsLong
jpayne@68 1224 #define PyInt_AS_LONG PyLong_AS_LONG
jpayne@68 1225 #define PyInt_AsSsize_t PyLong_AsSsize_t
jpayne@68 1226 #define PyInt_AsUnsignedLongMask PyLong_AsUnsignedLongMask
jpayne@68 1227 #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask
jpayne@68 1228 #define PyNumber_Int PyNumber_Long
jpayne@68 1229 #else
jpayne@68 1230 #define __Pyx_Py3Int_Check(op) (PyLong_Check(op) || PyInt_Check(op))
jpayne@68 1231 #define __Pyx_Py3Int_CheckExact(op) (PyLong_CheckExact(op) || PyInt_CheckExact(op))
jpayne@68 1232 #endif
jpayne@68 1233 #if PY_MAJOR_VERSION >= 3
jpayne@68 1234 #define PyBoolObject PyLongObject
jpayne@68 1235 #endif
jpayne@68 1236 #if PY_MAJOR_VERSION >= 3 && CYTHON_COMPILING_IN_PYPY
jpayne@68 1237 #ifndef PyUnicode_InternFromString
jpayne@68 1238 #define PyUnicode_InternFromString(s) PyUnicode_FromString(s)
jpayne@68 1239 #endif
jpayne@68 1240 #endif
jpayne@68 1241 #if PY_VERSION_HEX < 0x030200A4
jpayne@68 1242 typedef long Py_hash_t;
jpayne@68 1243 #define __Pyx_PyInt_FromHash_t PyInt_FromLong
jpayne@68 1244 #define __Pyx_PyInt_AsHash_t __Pyx_PyIndex_AsHash_t
jpayne@68 1245 #else
jpayne@68 1246 #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t
jpayne@68 1247 #define __Pyx_PyInt_AsHash_t __Pyx_PyIndex_AsSsize_t
jpayne@68 1248 #endif
jpayne@68 1249 #if CYTHON_USE_ASYNC_SLOTS
jpayne@68 1250 #if PY_VERSION_HEX >= 0x030500B1
jpayne@68 1251 #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods
jpayne@68 1252 #define __Pyx_PyType_AsAsync(obj) (Py_TYPE(obj)->tp_as_async)
jpayne@68 1253 #else
jpayne@68 1254 #define __Pyx_PyType_AsAsync(obj) ((__Pyx_PyAsyncMethodsStruct*) (Py_TYPE(obj)->tp_reserved))
jpayne@68 1255 #endif
jpayne@68 1256 #else
jpayne@68 1257 #define __Pyx_PyType_AsAsync(obj) NULL
jpayne@68 1258 #endif
jpayne@68 1259 #ifndef __Pyx_PyAsyncMethodsStruct
jpayne@68 1260 typedef struct {
jpayne@68 1261 unaryfunc am_await;
jpayne@68 1262 unaryfunc am_aiter;
jpayne@68 1263 unaryfunc am_anext;
jpayne@68 1264 } __Pyx_PyAsyncMethodsStruct;
jpayne@68 1265 #endif
jpayne@68 1266
jpayne@68 1267 #if defined(_WIN32) || defined(WIN32) || defined(MS_WINDOWS)
jpayne@68 1268 #if !defined(_USE_MATH_DEFINES)
jpayne@68 1269 #define _USE_MATH_DEFINES
jpayne@68 1270 #endif
jpayne@68 1271 #endif
jpayne@68 1272 #include <math.h>
jpayne@68 1273 #ifdef NAN
jpayne@68 1274 #define __PYX_NAN() ((float) NAN)
jpayne@68 1275 #else
jpayne@68 1276 static CYTHON_INLINE float __PYX_NAN() {
jpayne@68 1277 float value;
jpayne@68 1278 memset(&value, 0xFF, sizeof(value));
jpayne@68 1279 return value;
jpayne@68 1280 }
jpayne@68 1281 #endif
jpayne@68 1282 #if defined(__CYGWIN__) && defined(_LDBL_EQ_DBL)
jpayne@68 1283 #define __Pyx_truncl trunc
jpayne@68 1284 #else
jpayne@68 1285 #define __Pyx_truncl truncl
jpayne@68 1286 #endif
jpayne@68 1287
jpayne@68 1288 #define __PYX_MARK_ERR_POS(f_index, lineno) \
jpayne@68 1289 { __pyx_filename = __pyx_f[f_index]; (void)__pyx_filename; __pyx_lineno = lineno; (void)__pyx_lineno; __pyx_clineno = __LINE__; (void)__pyx_clineno; }
jpayne@68 1290 #define __PYX_ERR(f_index, lineno, Ln_error) \
jpayne@68 1291 { __PYX_MARK_ERR_POS(f_index, lineno) goto Ln_error; }
jpayne@68 1292
jpayne@68 1293 #ifdef CYTHON_EXTERN_C
jpayne@68 1294 #undef __PYX_EXTERN_C
jpayne@68 1295 #define __PYX_EXTERN_C CYTHON_EXTERN_C
jpayne@68 1296 #elif defined(__PYX_EXTERN_C)
jpayne@68 1297 #ifdef _MSC_VER
jpayne@68 1298 #pragma message ("Please do not define the '__PYX_EXTERN_C' macro externally. Use 'CYTHON_EXTERN_C' instead.")
jpayne@68 1299 #else
jpayne@68 1300 #warning Please do not define the '__PYX_EXTERN_C' macro externally. Use 'CYTHON_EXTERN_C' instead.
jpayne@68 1301 #endif
jpayne@68 1302 #else
jpayne@68 1303 #ifdef __cplusplus
jpayne@68 1304 #define __PYX_EXTERN_C extern "C"
jpayne@68 1305 #else
jpayne@68 1306 #define __PYX_EXTERN_C extern
jpayne@68 1307 #endif
jpayne@68 1308 #endif
jpayne@68 1309
jpayne@68 1310 #define __PYX_HAVE__pysam__libctabix
jpayne@68 1311 #define __PYX_HAVE_API__pysam__libctabix
jpayne@68 1312 /* Early includes */
jpayne@68 1313 #include <stdint.h>
jpayne@68 1314 #include <string.h>
jpayne@68 1315 #include <stdlib.h>
jpayne@68 1316 #include <stdio.h>
jpayne@68 1317 #include "fcntl.h"
jpayne@68 1318 #include "unistd.h"
jpayne@68 1319 #include <sys/types.h>
jpayne@68 1320 #include "stdarg.h"
jpayne@68 1321 #include "htslib/kstring.h"
jpayne@68 1322 #include "htslib_util.h"
jpayne@68 1323 #include "htslib/hfile.h"
jpayne@68 1324 #include "htslib/bgzf.h"
jpayne@68 1325 #include "htslib/hts.h"
jpayne@68 1326 #include "htslib/sam.h"
jpayne@68 1327 #include "htslib/faidx.h"
jpayne@68 1328 #include "htslib/tbx.h"
jpayne@68 1329 #include "htslib/vcf.h"
jpayne@68 1330 #include "htslib/vcfutils.h"
jpayne@68 1331 #include "htslib/cram.h"
jpayne@68 1332 #include "pysam_stream.h"
jpayne@68 1333 #include <errno.h>
jpayne@68 1334 #include <unistd.h>
jpayne@68 1335 #include <stddef.h>
jpayne@68 1336 #include "pythread.h"
jpayne@68 1337
jpayne@68 1338 #if CYTHON_COMPILING_IN_PYPY
jpayne@68 1339 #ifdef _MSC_VER
jpayne@68 1340 #pragma message ("This module uses CPython specific internals of 'array.array', which are not available in PyPy.")
jpayne@68 1341 #else
jpayne@68 1342 #warning This module uses CPython specific internals of 'array.array', which are not available in PyPy.
jpayne@68 1343 #endif
jpayne@68 1344 #endif
jpayne@68 1345
jpayne@68 1346 #ifdef _OPENMP
jpayne@68 1347 #include <omp.h>
jpayne@68 1348 #endif /* _OPENMP */
jpayne@68 1349
jpayne@68 1350 #if defined(PYREX_WITHOUT_ASSERTIONS) && !defined(CYTHON_WITHOUT_ASSERTIONS)
jpayne@68 1351 #define CYTHON_WITHOUT_ASSERTIONS
jpayne@68 1352 #endif
jpayne@68 1353
jpayne@68 1354 typedef struct {PyObject **p; const char *s; const Py_ssize_t n; const char* encoding;
jpayne@68 1355 const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry;
jpayne@68 1356
jpayne@68 1357 #define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0
jpayne@68 1358 #define __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 0
jpayne@68 1359 #define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT (PY_MAJOR_VERSION >= 3 && __PYX_DEFAULT_STRING_ENCODING_IS_UTF8)
jpayne@68 1360 #define __PYX_DEFAULT_STRING_ENCODING ""
jpayne@68 1361 #define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString
jpayne@68 1362 #define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
jpayne@68 1363 #define __Pyx_uchar_cast(c) ((unsigned char)c)
jpayne@68 1364 #define __Pyx_long_cast(x) ((long)x)
jpayne@68 1365 #define __Pyx_fits_Py_ssize_t(v, type, is_signed) (\
jpayne@68 1366 (sizeof(type) < sizeof(Py_ssize_t)) ||\
jpayne@68 1367 (sizeof(type) > sizeof(Py_ssize_t) &&\
jpayne@68 1368 likely(v < (type)PY_SSIZE_T_MAX ||\
jpayne@68 1369 v == (type)PY_SSIZE_T_MAX) &&\
jpayne@68 1370 (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\
jpayne@68 1371 v == (type)PY_SSIZE_T_MIN))) ||\
jpayne@68 1372 (sizeof(type) == sizeof(Py_ssize_t) &&\
jpayne@68 1373 (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\
jpayne@68 1374 v == (type)PY_SSIZE_T_MAX))) )
jpayne@68 1375 static CYTHON_INLINE int __Pyx_is_valid_index(Py_ssize_t i, Py_ssize_t limit) {
jpayne@68 1376 return (size_t) i < (size_t) limit;
jpayne@68 1377 }
jpayne@68 1378 #if defined (__cplusplus) && __cplusplus >= 201103L
jpayne@68 1379 #include <cstdlib>
jpayne@68 1380 #define __Pyx_sst_abs(value) std::abs(value)
jpayne@68 1381 #elif SIZEOF_INT >= SIZEOF_SIZE_T
jpayne@68 1382 #define __Pyx_sst_abs(value) abs(value)
jpayne@68 1383 #elif SIZEOF_LONG >= SIZEOF_SIZE_T
jpayne@68 1384 #define __Pyx_sst_abs(value) labs(value)
jpayne@68 1385 #elif defined (_MSC_VER)
jpayne@68 1386 #define __Pyx_sst_abs(value) ((Py_ssize_t)_abs64(value))
jpayne@68 1387 #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
jpayne@68 1388 #define __Pyx_sst_abs(value) llabs(value)
jpayne@68 1389 #elif defined (__GNUC__)
jpayne@68 1390 #define __Pyx_sst_abs(value) __builtin_llabs(value)
jpayne@68 1391 #else
jpayne@68 1392 #define __Pyx_sst_abs(value) ((value<0) ? -value : value)
jpayne@68 1393 #endif
jpayne@68 1394 static CYTHON_INLINE Py_ssize_t __Pyx_ssize_strlen(const char *s);
jpayne@68 1395 static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject*);
jpayne@68 1396 static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length);
jpayne@68 1397 static CYTHON_INLINE PyObject* __Pyx_PyByteArray_FromString(const char*);
jpayne@68 1398 #define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l)
jpayne@68 1399 #define __Pyx_PyBytes_FromString PyBytes_FromString
jpayne@68 1400 #define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize
jpayne@68 1401 static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*);
jpayne@68 1402 #if PY_MAJOR_VERSION < 3
jpayne@68 1403 #define __Pyx_PyStr_FromString __Pyx_PyBytes_FromString
jpayne@68 1404 #define __Pyx_PyStr_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
jpayne@68 1405 #else
jpayne@68 1406 #define __Pyx_PyStr_FromString __Pyx_PyUnicode_FromString
jpayne@68 1407 #define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize
jpayne@68 1408 #endif
jpayne@68 1409 #define __Pyx_PyBytes_AsWritableString(s) ((char*) PyBytes_AS_STRING(s))
jpayne@68 1410 #define __Pyx_PyBytes_AsWritableSString(s) ((signed char*) PyBytes_AS_STRING(s))
jpayne@68 1411 #define __Pyx_PyBytes_AsWritableUString(s) ((unsigned char*) PyBytes_AS_STRING(s))
jpayne@68 1412 #define __Pyx_PyBytes_AsString(s) ((const char*) PyBytes_AS_STRING(s))
jpayne@68 1413 #define __Pyx_PyBytes_AsSString(s) ((const signed char*) PyBytes_AS_STRING(s))
jpayne@68 1414 #define __Pyx_PyBytes_AsUString(s) ((const unsigned char*) PyBytes_AS_STRING(s))
jpayne@68 1415 #define __Pyx_PyObject_AsWritableString(s) ((char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s))
jpayne@68 1416 #define __Pyx_PyObject_AsWritableSString(s) ((signed char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s))
jpayne@68 1417 #define __Pyx_PyObject_AsWritableUString(s) ((unsigned char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s))
jpayne@68 1418 #define __Pyx_PyObject_AsSString(s) ((const signed char*) __Pyx_PyObject_AsString(s))
jpayne@68 1419 #define __Pyx_PyObject_AsUString(s) ((const unsigned char*) __Pyx_PyObject_AsString(s))
jpayne@68 1420 #define __Pyx_PyObject_FromCString(s) __Pyx_PyObject_FromString((const char*)s)
jpayne@68 1421 #define __Pyx_PyBytes_FromCString(s) __Pyx_PyBytes_FromString((const char*)s)
jpayne@68 1422 #define __Pyx_PyByteArray_FromCString(s) __Pyx_PyByteArray_FromString((const char*)s)
jpayne@68 1423 #define __Pyx_PyStr_FromCString(s) __Pyx_PyStr_FromString((const char*)s)
jpayne@68 1424 #define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s)
jpayne@68 1425 #define __Pyx_PyUnicode_FromOrdinal(o) PyUnicode_FromOrdinal((int)o)
jpayne@68 1426 #define __Pyx_PyUnicode_AsUnicode PyUnicode_AsUnicode
jpayne@68 1427 #define __Pyx_NewRef(obj) (Py_INCREF(obj), obj)
jpayne@68 1428 #define __Pyx_Owned_Py_None(b) __Pyx_NewRef(Py_None)
jpayne@68 1429 static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b);
jpayne@68 1430 static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*);
jpayne@68 1431 static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject*);
jpayne@68 1432 static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x);
jpayne@68 1433 #define __Pyx_PySequence_Tuple(obj)\
jpayne@68 1434 (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj))
jpayne@68 1435 static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*);
jpayne@68 1436 static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t);
jpayne@68 1437 static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject*);
jpayne@68 1438 #if CYTHON_ASSUME_SAFE_MACROS
jpayne@68 1439 #define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x))
jpayne@68 1440 #else
jpayne@68 1441 #define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x)
jpayne@68 1442 #endif
jpayne@68 1443 #define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x))
jpayne@68 1444 #if PY_MAJOR_VERSION >= 3
jpayne@68 1445 #define __Pyx_PyNumber_Int(x) (PyLong_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Long(x))
jpayne@68 1446 #else
jpayne@68 1447 #define __Pyx_PyNumber_Int(x) (PyInt_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Int(x))
jpayne@68 1448 #endif
jpayne@68 1449 #if CYTHON_USE_PYLONG_INTERNALS
jpayne@68 1450 #if PY_VERSION_HEX >= 0x030C00A7
jpayne@68 1451 #ifndef _PyLong_SIGN_MASK
jpayne@68 1452 #define _PyLong_SIGN_MASK 3
jpayne@68 1453 #endif
jpayne@68 1454 #ifndef _PyLong_NON_SIZE_BITS
jpayne@68 1455 #define _PyLong_NON_SIZE_BITS 3
jpayne@68 1456 #endif
jpayne@68 1457 #define __Pyx_PyLong_Sign(x) (((PyLongObject*)x)->long_value.lv_tag & _PyLong_SIGN_MASK)
jpayne@68 1458 #define __Pyx_PyLong_IsNeg(x) ((__Pyx_PyLong_Sign(x) & 2) != 0)
jpayne@68 1459 #define __Pyx_PyLong_IsNonNeg(x) (!__Pyx_PyLong_IsNeg(x))
jpayne@68 1460 #define __Pyx_PyLong_IsZero(x) (__Pyx_PyLong_Sign(x) & 1)
jpayne@68 1461 #define __Pyx_PyLong_IsPos(x) (__Pyx_PyLong_Sign(x) == 0)
jpayne@68 1462 #define __Pyx_PyLong_CompactValueUnsigned(x) (__Pyx_PyLong_Digits(x)[0])
jpayne@68 1463 #define __Pyx_PyLong_DigitCount(x) ((Py_ssize_t) (((PyLongObject*)x)->long_value.lv_tag >> _PyLong_NON_SIZE_BITS))
jpayne@68 1464 #define __Pyx_PyLong_SignedDigitCount(x)\
jpayne@68 1465 ((1 - (Py_ssize_t) __Pyx_PyLong_Sign(x)) * __Pyx_PyLong_DigitCount(x))
jpayne@68 1466 #if defined(PyUnstable_Long_IsCompact) && defined(PyUnstable_Long_CompactValue)
jpayne@68 1467 #define __Pyx_PyLong_IsCompact(x) PyUnstable_Long_IsCompact((PyLongObject*) x)
jpayne@68 1468 #define __Pyx_PyLong_CompactValue(x) PyUnstable_Long_CompactValue((PyLongObject*) x)
jpayne@68 1469 #else
jpayne@68 1470 #define __Pyx_PyLong_IsCompact(x) (((PyLongObject*)x)->long_value.lv_tag < (2 << _PyLong_NON_SIZE_BITS))
jpayne@68 1471 #define __Pyx_PyLong_CompactValue(x) ((1 - (Py_ssize_t) __Pyx_PyLong_Sign(x)) * (Py_ssize_t) __Pyx_PyLong_Digits(x)[0])
jpayne@68 1472 #endif
jpayne@68 1473 typedef Py_ssize_t __Pyx_compact_pylong;
jpayne@68 1474 typedef size_t __Pyx_compact_upylong;
jpayne@68 1475 #else
jpayne@68 1476 #define __Pyx_PyLong_IsNeg(x) (Py_SIZE(x) < 0)
jpayne@68 1477 #define __Pyx_PyLong_IsNonNeg(x) (Py_SIZE(x) >= 0)
jpayne@68 1478 #define __Pyx_PyLong_IsZero(x) (Py_SIZE(x) == 0)
jpayne@68 1479 #define __Pyx_PyLong_IsPos(x) (Py_SIZE(x) > 0)
jpayne@68 1480 #define __Pyx_PyLong_CompactValueUnsigned(x) ((Py_SIZE(x) == 0) ? 0 : __Pyx_PyLong_Digits(x)[0])
jpayne@68 1481 #define __Pyx_PyLong_DigitCount(x) __Pyx_sst_abs(Py_SIZE(x))
jpayne@68 1482 #define __Pyx_PyLong_SignedDigitCount(x) Py_SIZE(x)
jpayne@68 1483 #define __Pyx_PyLong_IsCompact(x) (Py_SIZE(x) == 0 || Py_SIZE(x) == 1 || Py_SIZE(x) == -1)
jpayne@68 1484 #define __Pyx_PyLong_CompactValue(x)\
jpayne@68 1485 ((Py_SIZE(x) == 0) ? (sdigit) 0 : ((Py_SIZE(x) < 0) ? -(sdigit)__Pyx_PyLong_Digits(x)[0] : (sdigit)__Pyx_PyLong_Digits(x)[0]))
jpayne@68 1486 typedef sdigit __Pyx_compact_pylong;
jpayne@68 1487 typedef digit __Pyx_compact_upylong;
jpayne@68 1488 #endif
jpayne@68 1489 #if PY_VERSION_HEX >= 0x030C00A5
jpayne@68 1490 #define __Pyx_PyLong_Digits(x) (((PyLongObject*)x)->long_value.ob_digit)
jpayne@68 1491 #else
jpayne@68 1492 #define __Pyx_PyLong_Digits(x) (((PyLongObject*)x)->ob_digit)
jpayne@68 1493 #endif
jpayne@68 1494 #endif
jpayne@68 1495 #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
jpayne@68 1496 #include <string.h>
jpayne@68 1497 static int __Pyx_sys_getdefaultencoding_not_ascii;
jpayne@68 1498 static int __Pyx_init_sys_getdefaultencoding_params(void) {
jpayne@68 1499 PyObject* sys;
jpayne@68 1500 PyObject* default_encoding = NULL;
jpayne@68 1501 PyObject* ascii_chars_u = NULL;
jpayne@68 1502 PyObject* ascii_chars_b = NULL;
jpayne@68 1503 const char* default_encoding_c;
jpayne@68 1504 sys = PyImport_ImportModule("sys");
jpayne@68 1505 if (!sys) goto bad;
jpayne@68 1506 default_encoding = PyObject_CallMethod(sys, (char*) "getdefaultencoding", NULL);
jpayne@68 1507 Py_DECREF(sys);
jpayne@68 1508 if (!default_encoding) goto bad;
jpayne@68 1509 default_encoding_c = PyBytes_AsString(default_encoding);
jpayne@68 1510 if (!default_encoding_c) goto bad;
jpayne@68 1511 if (strcmp(default_encoding_c, "ascii") == 0) {
jpayne@68 1512 __Pyx_sys_getdefaultencoding_not_ascii = 0;
jpayne@68 1513 } else {
jpayne@68 1514 char ascii_chars[128];
jpayne@68 1515 int c;
jpayne@68 1516 for (c = 0; c < 128; c++) {
jpayne@68 1517 ascii_chars[c] = (char) c;
jpayne@68 1518 }
jpayne@68 1519 __Pyx_sys_getdefaultencoding_not_ascii = 1;
jpayne@68 1520 ascii_chars_u = PyUnicode_DecodeASCII(ascii_chars, 128, NULL);
jpayne@68 1521 if (!ascii_chars_u) goto bad;
jpayne@68 1522 ascii_chars_b = PyUnicode_AsEncodedString(ascii_chars_u, default_encoding_c, NULL);
jpayne@68 1523 if (!ascii_chars_b || !PyBytes_Check(ascii_chars_b) || memcmp(ascii_chars, PyBytes_AS_STRING(ascii_chars_b), 128) != 0) {
jpayne@68 1524 PyErr_Format(
jpayne@68 1525 PyExc_ValueError,
jpayne@68 1526 "This module compiled with c_string_encoding=ascii, but default encoding '%.200s' is not a superset of ascii.",
jpayne@68 1527 default_encoding_c);
jpayne@68 1528 goto bad;
jpayne@68 1529 }
jpayne@68 1530 Py_DECREF(ascii_chars_u);
jpayne@68 1531 Py_DECREF(ascii_chars_b);
jpayne@68 1532 }
jpayne@68 1533 Py_DECREF(default_encoding);
jpayne@68 1534 return 0;
jpayne@68 1535 bad:
jpayne@68 1536 Py_XDECREF(default_encoding);
jpayne@68 1537 Py_XDECREF(ascii_chars_u);
jpayne@68 1538 Py_XDECREF(ascii_chars_b);
jpayne@68 1539 return -1;
jpayne@68 1540 }
jpayne@68 1541 #endif
jpayne@68 1542 #if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT && PY_MAJOR_VERSION >= 3
jpayne@68 1543 #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL)
jpayne@68 1544 #else
jpayne@68 1545 #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL)
jpayne@68 1546 #if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
jpayne@68 1547 #include <string.h>
jpayne@68 1548 static char* __PYX_DEFAULT_STRING_ENCODING;
jpayne@68 1549 static int __Pyx_init_sys_getdefaultencoding_params(void) {
jpayne@68 1550 PyObject* sys;
jpayne@68 1551 PyObject* default_encoding = NULL;
jpayne@68 1552 char* default_encoding_c;
jpayne@68 1553 sys = PyImport_ImportModule("sys");
jpayne@68 1554 if (!sys) goto bad;
jpayne@68 1555 default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL);
jpayne@68 1556 Py_DECREF(sys);
jpayne@68 1557 if (!default_encoding) goto bad;
jpayne@68 1558 default_encoding_c = PyBytes_AsString(default_encoding);
jpayne@68 1559 if (!default_encoding_c) goto bad;
jpayne@68 1560 __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c) + 1);
jpayne@68 1561 if (!__PYX_DEFAULT_STRING_ENCODING) goto bad;
jpayne@68 1562 strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c);
jpayne@68 1563 Py_DECREF(default_encoding);
jpayne@68 1564 return 0;
jpayne@68 1565 bad:
jpayne@68 1566 Py_XDECREF(default_encoding);
jpayne@68 1567 return -1;
jpayne@68 1568 }
jpayne@68 1569 #endif
jpayne@68 1570 #endif
jpayne@68 1571
jpayne@68 1572
jpayne@68 1573 /* Test for GCC > 2.95 */
jpayne@68 1574 #if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)))
jpayne@68 1575 #define likely(x) __builtin_expect(!!(x), 1)
jpayne@68 1576 #define unlikely(x) __builtin_expect(!!(x), 0)
jpayne@68 1577 #else /* !__GNUC__ or GCC < 2.95 */
jpayne@68 1578 #define likely(x) (x)
jpayne@68 1579 #define unlikely(x) (x)
jpayne@68 1580 #endif /* __GNUC__ */
jpayne@68 1581 static CYTHON_INLINE void __Pyx_pretend_to_initialize(void* ptr) { (void)ptr; }
jpayne@68 1582
jpayne@68 1583 #if !CYTHON_USE_MODULE_STATE
jpayne@68 1584 static PyObject *__pyx_m = NULL;
jpayne@68 1585 #endif
jpayne@68 1586 static int __pyx_lineno;
jpayne@68 1587 static int __pyx_clineno = 0;
jpayne@68 1588 static const char * __pyx_cfilenm = __FILE__;
jpayne@68 1589 static const char *__pyx_filename;
jpayne@68 1590
jpayne@68 1591 /* #### Code section: filename_table ### */
jpayne@68 1592
jpayne@68 1593 static const char *__pyx_f[] = {
jpayne@68 1594 "pysam/libctabix.pyx",
jpayne@68 1595 "<stringsource>",
jpayne@68 1596 "contextvars.pxd",
jpayne@68 1597 "array.pxd",
jpayne@68 1598 "pysam/libctabix.pxd",
jpayne@68 1599 "type.pxd",
jpayne@68 1600 "bool.pxd",
jpayne@68 1601 "complex.pxd",
jpayne@68 1602 "pysam/libctabixproxies.pxd",
jpayne@68 1603 };
jpayne@68 1604 /* #### Code section: utility_code_proto_before_types ### */
jpayne@68 1605 /* ForceInitThreads.proto */
jpayne@68 1606 #ifndef __PYX_FORCE_INIT_THREADS
jpayne@68 1607 #define __PYX_FORCE_INIT_THREADS 0
jpayne@68 1608 #endif
jpayne@68 1609
jpayne@68 1610 /* NoFastGil.proto */
jpayne@68 1611 #define __Pyx_PyGILState_Ensure PyGILState_Ensure
jpayne@68 1612 #define __Pyx_PyGILState_Release PyGILState_Release
jpayne@68 1613 #define __Pyx_FastGIL_Remember()
jpayne@68 1614 #define __Pyx_FastGIL_Forget()
jpayne@68 1615 #define __Pyx_FastGilFuncInit()
jpayne@68 1616
jpayne@68 1617 /* #### Code section: numeric_typedefs ### */
jpayne@68 1618 /* #### Code section: complex_type_declarations ### */
jpayne@68 1619 /* #### Code section: type_declarations ### */
jpayne@68 1620
jpayne@68 1621 /*--- Type declarations ---*/
jpayne@68 1622 #ifndef _ARRAYARRAY_H
jpayne@68 1623 struct arrayobject;
jpayne@68 1624 typedef struct arrayobject arrayobject;
jpayne@68 1625 #endif
jpayne@68 1626 struct __pyx_obj_5pysam_10libchtslib_HTSFile;
jpayne@68 1627 struct __pyx_obj_5pysam_16libctabixproxies_TupleProxy;
jpayne@68 1628 struct __pyx_obj_5pysam_16libctabixproxies_TupleProxyIterator;
jpayne@68 1629 struct __pyx_obj_5pysam_16libctabixproxies_NamedTupleProxy;
jpayne@68 1630 struct __pyx_obj_5pysam_16libctabixproxies_GTFProxy;
jpayne@68 1631 struct __pyx_obj_5pysam_16libctabixproxies_GFF3Proxy;
jpayne@68 1632 struct __pyx_obj_5pysam_16libctabixproxies_BedProxy;
jpayne@68 1633 struct __pyx_obj_5pysam_16libctabixproxies_VCFProxy;
jpayne@68 1634 struct __pyx_obj_5pysam_9libctabix_tabix_file_iterator;
jpayne@68 1635 struct __pyx_obj_5pysam_9libctabix_TabixFile;
jpayne@68 1636 struct __pyx_obj_5pysam_9libctabix_Parser;
jpayne@68 1637 struct __pyx_obj_5pysam_9libctabix_asTuple;
jpayne@68 1638 struct __pyx_obj_5pysam_9libctabix_asGTF;
jpayne@68 1639 struct __pyx_obj_5pysam_9libctabix_asGFF3;
jpayne@68 1640 struct __pyx_obj_5pysam_9libctabix_asBed;
jpayne@68 1641 struct __pyx_obj_5pysam_9libctabix_asVCF;
jpayne@68 1642 struct __pyx_obj_5pysam_9libctabix_TabixIterator;
jpayne@68 1643 struct __pyx_obj_5pysam_9libctabix_TabixIteratorParsed;
jpayne@68 1644 struct __pyx_obj_5pysam_9libctabix_GZIterator;
jpayne@68 1645 struct __pyx_obj_5pysam_9libctabix_GZIteratorHead;
jpayne@68 1646 struct __pyx_obj_5pysam_9libctabix_GZIteratorParsed;
jpayne@68 1647 struct __pyx_obj_5pysam_9libctabix_Tabixfile;
jpayne@68 1648 struct __pyx_opt_args_7cpython_11contextvars_get_value;
jpayne@68 1649 struct __pyx_opt_args_7cpython_11contextvars_get_value_no_default;
jpayne@68 1650
jpayne@68 1651 /* "cpython/contextvars.pxd":112
jpayne@68 1652 *
jpayne@68 1653 *
jpayne@68 1654 * cdef inline object get_value(var, default_value=None): # <<<<<<<<<<<<<<
jpayne@68 1655 * """Return a new reference to the value of the context variable,
jpayne@68 1656 * or the default value of the context variable,
jpayne@68 1657 */
jpayne@68 1658 struct __pyx_opt_args_7cpython_11contextvars_get_value {
jpayne@68 1659 int __pyx_n;
jpayne@68 1660 PyObject *default_value;
jpayne@68 1661 };
jpayne@68 1662
jpayne@68 1663 /* "cpython/contextvars.pxd":129
jpayne@68 1664 *
jpayne@68 1665 *
jpayne@68 1666 * cdef inline object get_value_no_default(var, default_value=None): # <<<<<<<<<<<<<<
jpayne@68 1667 * """Return a new reference to the value of the context variable,
jpayne@68 1668 * or the provided default value if no such value was found.
jpayne@68 1669 */
jpayne@68 1670 struct __pyx_opt_args_7cpython_11contextvars_get_value_no_default {
jpayne@68 1671 int __pyx_n;
jpayne@68 1672 PyObject *default_value;
jpayne@68 1673 };
jpayne@68 1674 struct __pyx_opt_args_5pysam_16libctabixproxies_10TupleProxy_copy;
jpayne@68 1675
jpayne@68 1676 /* "pysam/libctabixproxies.pxd":23
jpayne@68 1677 * cdef take(self, char * buffer, size_t nbytes)
jpayne@68 1678 * cdef present(self, char * buffer, size_t nbytes)
jpayne@68 1679 * cdef copy(self, char * buffer, size_t nbytes, bint reset=*) # <<<<<<<<<<<<<<
jpayne@68 1680 * cdef update(self, char * buffer, size_t nbytes)
jpayne@68 1681 *
jpayne@68 1682 */
jpayne@68 1683 struct __pyx_opt_args_5pysam_16libctabixproxies_10TupleProxy_copy {
jpayne@68 1684 int __pyx_n;
jpayne@68 1685 int reset;
jpayne@68 1686 };
jpayne@68 1687 struct __pyx_opt_args_5pysam_9libcutils_parse_region;
jpayne@68 1688 struct __pyx_opt_args_5pysam_9libcutils_qualitystring_to_array;
jpayne@68 1689 struct __pyx_opt_args_5pysam_9libcutils_array_to_qualitystring;
jpayne@68 1690 struct __pyx_opt_args_5pysam_9libcutils_qualities_to_qualitystring;
jpayne@68 1691 struct __pyx_opt_args_5pysam_9libcutils_charptr_to_str;
jpayne@68 1692 struct __pyx_opt_args_5pysam_9libcutils_charptr_to_bytes;
jpayne@68 1693 struct __pyx_opt_args_5pysam_9libcutils_charptr_to_str_w_len;
jpayne@68 1694 struct __pyx_opt_args_5pysam_9libcutils_force_str;
jpayne@68 1695 struct __pyx_opt_args_5pysam_9libcutils_force_bytes;
jpayne@68 1696 struct __pyx_opt_args_5pysam_9libcutils_decode_bytes;
jpayne@68 1697
jpayne@68 1698 /* "pysam/libcutils.pxd":8
jpayne@68 1699 * from cpython cimport array as c_array
jpayne@68 1700 *
jpayne@68 1701 * cpdef parse_region(contig=*, start=*, stop=*, region=*, reference=*, end=*) # <<<<<<<<<<<<<<
jpayne@68 1702 *
jpayne@68 1703 * cdef int libc_whence_from_io(int whence)
jpayne@68 1704 */
jpayne@68 1705 struct __pyx_opt_args_5pysam_9libcutils_parse_region {
jpayne@68 1706 int __pyx_n;
jpayne@68 1707 PyObject *contig;
jpayne@68 1708 PyObject *start;
jpayne@68 1709 PyObject *stop;
jpayne@68 1710 PyObject *region;
jpayne@68 1711 PyObject *reference;
jpayne@68 1712 PyObject *end;
jpayne@68 1713 };
jpayne@68 1714
jpayne@68 1715 /* "pysam/libcutils.pxd":15
jpayne@68 1716 * # Utility functions for quality string conversions
jpayne@68 1717 *
jpayne@68 1718 * cpdef c_array.array qualitystring_to_array(input_str, int offset=*) # <<<<<<<<<<<<<<
jpayne@68 1719 * cpdef array_to_qualitystring(c_array.array arr, int offset=*)
jpayne@68 1720 * cpdef qualities_to_qualitystring(qualities, int offset=*)
jpayne@68 1721 */
jpayne@68 1722 struct __pyx_opt_args_5pysam_9libcutils_qualitystring_to_array {
jpayne@68 1723 int __pyx_n;
jpayne@68 1724 int offset;
jpayne@68 1725 };
jpayne@68 1726
jpayne@68 1727 /* "pysam/libcutils.pxd":16
jpayne@68 1728 *
jpayne@68 1729 * cpdef c_array.array qualitystring_to_array(input_str, int offset=*)
jpayne@68 1730 * cpdef array_to_qualitystring(c_array.array arr, int offset=*) # <<<<<<<<<<<<<<
jpayne@68 1731 * cpdef qualities_to_qualitystring(qualities, int offset=*)
jpayne@68 1732 *
jpayne@68 1733 */
jpayne@68 1734 struct __pyx_opt_args_5pysam_9libcutils_array_to_qualitystring {
jpayne@68 1735 int __pyx_n;
jpayne@68 1736 int offset;
jpayne@68 1737 };
jpayne@68 1738
jpayne@68 1739 /* "pysam/libcutils.pxd":17
jpayne@68 1740 * cpdef c_array.array qualitystring_to_array(input_str, int offset=*)
jpayne@68 1741 * cpdef array_to_qualitystring(c_array.array arr, int offset=*)
jpayne@68 1742 * cpdef qualities_to_qualitystring(qualities, int offset=*) # <<<<<<<<<<<<<<
jpayne@68 1743 *
jpayne@68 1744 * ########################################################################
jpayne@68 1745 */
jpayne@68 1746 struct __pyx_opt_args_5pysam_9libcutils_qualities_to_qualitystring {
jpayne@68 1747 int __pyx_n;
jpayne@68 1748 int offset;
jpayne@68 1749 };
jpayne@68 1750
jpayne@68 1751 /* "pysam/libcutils.pxd":29
jpayne@68 1752 * ## Python 3 compatibility functions
jpayne@68 1753 * ########################################################################
jpayne@68 1754 * cdef charptr_to_str(const char *s, encoding=*, errors=*) # <<<<<<<<<<<<<<
jpayne@68 1755 * cdef bytes charptr_to_bytes(const char *s, encoding=*, errors=*)
jpayne@68 1756 * cdef charptr_to_str_w_len(const char* s, size_t n, encoding=*, errors=*)
jpayne@68 1757 */
jpayne@68 1758 struct __pyx_opt_args_5pysam_9libcutils_charptr_to_str {
jpayne@68 1759 int __pyx_n;
jpayne@68 1760 PyObject *encoding;
jpayne@68 1761 PyObject *errors;
jpayne@68 1762 };
jpayne@68 1763
jpayne@68 1764 /* "pysam/libcutils.pxd":30
jpayne@68 1765 * ########################################################################
jpayne@68 1766 * cdef charptr_to_str(const char *s, encoding=*, errors=*)
jpayne@68 1767 * cdef bytes charptr_to_bytes(const char *s, encoding=*, errors=*) # <<<<<<<<<<<<<<
jpayne@68 1768 * cdef charptr_to_str_w_len(const char* s, size_t n, encoding=*, errors=*)
jpayne@68 1769 * cdef force_str(object s, encoding=*, errors=*)
jpayne@68 1770 */
jpayne@68 1771 struct __pyx_opt_args_5pysam_9libcutils_charptr_to_bytes {
jpayne@68 1772 int __pyx_n;
jpayne@68 1773 PyObject *encoding;
jpayne@68 1774 PyObject *errors;
jpayne@68 1775 };
jpayne@68 1776
jpayne@68 1777 /* "pysam/libcutils.pxd":31
jpayne@68 1778 * cdef charptr_to_str(const char *s, encoding=*, errors=*)
jpayne@68 1779 * cdef bytes charptr_to_bytes(const char *s, encoding=*, errors=*)
jpayne@68 1780 * cdef charptr_to_str_w_len(const char* s, size_t n, encoding=*, errors=*) # <<<<<<<<<<<<<<
jpayne@68 1781 * cdef force_str(object s, encoding=*, errors=*)
jpayne@68 1782 * cdef bytes force_bytes(object s, encoding=*, errors=*)
jpayne@68 1783 */
jpayne@68 1784 struct __pyx_opt_args_5pysam_9libcutils_charptr_to_str_w_len {
jpayne@68 1785 int __pyx_n;
jpayne@68 1786 PyObject *encoding;
jpayne@68 1787 PyObject *errors;
jpayne@68 1788 };
jpayne@68 1789
jpayne@68 1790 /* "pysam/libcutils.pxd":32
jpayne@68 1791 * cdef bytes charptr_to_bytes(const char *s, encoding=*, errors=*)
jpayne@68 1792 * cdef charptr_to_str_w_len(const char* s, size_t n, encoding=*, errors=*)
jpayne@68 1793 * cdef force_str(object s, encoding=*, errors=*) # <<<<<<<<<<<<<<
jpayne@68 1794 * cdef bytes force_bytes(object s, encoding=*, errors=*)
jpayne@68 1795 * cdef decode_bytes(bytes s, encoding=*, errors=*)
jpayne@68 1796 */
jpayne@68 1797 struct __pyx_opt_args_5pysam_9libcutils_force_str {
jpayne@68 1798 int __pyx_n;
jpayne@68 1799 PyObject *encoding;
jpayne@68 1800 PyObject *errors;
jpayne@68 1801 };
jpayne@68 1802
jpayne@68 1803 /* "pysam/libcutils.pxd":33
jpayne@68 1804 * cdef charptr_to_str_w_len(const char* s, size_t n, encoding=*, errors=*)
jpayne@68 1805 * cdef force_str(object s, encoding=*, errors=*)
jpayne@68 1806 * cdef bytes force_bytes(object s, encoding=*, errors=*) # <<<<<<<<<<<<<<
jpayne@68 1807 * cdef decode_bytes(bytes s, encoding=*, errors=*)
jpayne@68 1808 * cdef bytes encode_filename(object filename)
jpayne@68 1809 */
jpayne@68 1810 struct __pyx_opt_args_5pysam_9libcutils_force_bytes {
jpayne@68 1811 int __pyx_n;
jpayne@68 1812 PyObject *encoding;
jpayne@68 1813 PyObject *errors;
jpayne@68 1814 };
jpayne@68 1815
jpayne@68 1816 /* "pysam/libcutils.pxd":34
jpayne@68 1817 * cdef force_str(object s, encoding=*, errors=*)
jpayne@68 1818 * cdef bytes force_bytes(object s, encoding=*, errors=*)
jpayne@68 1819 * cdef decode_bytes(bytes s, encoding=*, errors=*) # <<<<<<<<<<<<<<
jpayne@68 1820 * cdef bytes encode_filename(object filename)
jpayne@68 1821 * cdef from_string_and_size(const char *s, size_t length)
jpayne@68 1822 */
jpayne@68 1823 struct __pyx_opt_args_5pysam_9libcutils_decode_bytes {
jpayne@68 1824 int __pyx_n;
jpayne@68 1825 PyObject *encoding;
jpayne@68 1826 PyObject *errors;
jpayne@68 1827 };
jpayne@68 1828
jpayne@68 1829 /* "pysam/libchtslib.pxd":2706
jpayne@68 1830 *
jpayne@68 1831 *
jpayne@68 1832 * cdef class HTSFile(object): # <<<<<<<<<<<<<<
jpayne@68 1833 * cdef htsFile *htsfile # pointer to htsFile structure
jpayne@68 1834 * cdef int64_t start_offset # BGZF offset of first record
jpayne@68 1835 */
jpayne@68 1836 struct __pyx_obj_5pysam_10libchtslib_HTSFile {
jpayne@68 1837 PyObject_HEAD
jpayne@68 1838 struct __pyx_vtabstruct_5pysam_10libchtslib_HTSFile *__pyx_vtab;
jpayne@68 1839 htsFile *htsfile;
jpayne@68 1840 int64_t start_offset;
jpayne@68 1841 PyObject *filename;
jpayne@68 1842 PyObject *mode;
jpayne@68 1843 PyObject *threads;
jpayne@68 1844 PyObject *index_filename;
jpayne@68 1845 int is_stream;
jpayne@68 1846 int is_remote;
jpayne@68 1847 int duplicate_filehandle;
jpayne@68 1848 };
jpayne@68 1849
jpayne@68 1850
jpayne@68 1851 /* "pysam/libctabixproxies.pxd":5
jpayne@68 1852 * from libc.stdint cimport uint8_t, int32_t, uint32_t, int64_t, uint64_t
jpayne@68 1853 *
jpayne@68 1854 * cdef class TupleProxy: # <<<<<<<<<<<<<<
jpayne@68 1855 *
jpayne@68 1856 * cdef:
jpayne@68 1857 */
jpayne@68 1858 struct __pyx_obj_5pysam_16libctabixproxies_TupleProxy {
jpayne@68 1859 PyObject_HEAD
jpayne@68 1860 struct __pyx_vtabstruct_5pysam_16libctabixproxies_TupleProxy *__pyx_vtab;
jpayne@68 1861 char *data;
jpayne@68 1862 char **fields;
jpayne@68 1863 int nfields;
jpayne@68 1864 int nbytes;
jpayne@68 1865 int offset;
jpayne@68 1866 int is_modified;
jpayne@68 1867 PyObject *encoding;
jpayne@68 1868 };
jpayne@68 1869
jpayne@68 1870
jpayne@68 1871 /* "pysam/libctabixproxies.pxd":27
jpayne@68 1872 *
jpayne@68 1873 *
jpayne@68 1874 * cdef class TupleProxyIterator: # <<<<<<<<<<<<<<
jpayne@68 1875 * cdef TupleProxy proxy
jpayne@68 1876 * cdef int index
jpayne@68 1877 */
jpayne@68 1878 struct __pyx_obj_5pysam_16libctabixproxies_TupleProxyIterator {
jpayne@68 1879 PyObject_HEAD
jpayne@68 1880 struct __pyx_obj_5pysam_16libctabixproxies_TupleProxy *proxy;
jpayne@68 1881 int index;
jpayne@68 1882 };
jpayne@68 1883
jpayne@68 1884
jpayne@68 1885 /* "pysam/libctabixproxies.pxd":32
jpayne@68 1886 *
jpayne@68 1887 *
jpayne@68 1888 * cdef class NamedTupleProxy(TupleProxy): # <<<<<<<<<<<<<<
jpayne@68 1889 * pass
jpayne@68 1890 *
jpayne@68 1891 */
jpayne@68 1892 struct __pyx_obj_5pysam_16libctabixproxies_NamedTupleProxy {
jpayne@68 1893 struct __pyx_obj_5pysam_16libctabixproxies_TupleProxy __pyx_base;
jpayne@68 1894 };
jpayne@68 1895
jpayne@68 1896
jpayne@68 1897 /* "pysam/libctabixproxies.pxd":36
jpayne@68 1898 *
jpayne@68 1899 *
jpayne@68 1900 * cdef class GTFProxy(NamedTupleProxy): # <<<<<<<<<<<<<<
jpayne@68 1901 * cdef object attribute_dict
jpayne@68 1902 * cpdef int getMaxFields(self)
jpayne@68 1903 */
jpayne@68 1904 struct __pyx_obj_5pysam_16libctabixproxies_GTFProxy {
jpayne@68 1905 struct __pyx_obj_5pysam_16libctabixproxies_NamedTupleProxy __pyx_base;
jpayne@68 1906 PyObject *attribute_dict;
jpayne@68 1907 };
jpayne@68 1908
jpayne@68 1909
jpayne@68 1910 /* "pysam/libctabixproxies.pxd":42
jpayne@68 1911 *
jpayne@68 1912 *
jpayne@68 1913 * cdef class GFF3Proxy(GTFProxy): # <<<<<<<<<<<<<<
jpayne@68 1914 * pass
jpayne@68 1915 *
jpayne@68 1916 */
jpayne@68 1917 struct __pyx_obj_5pysam_16libctabixproxies_GFF3Proxy {
jpayne@68 1918 struct __pyx_obj_5pysam_16libctabixproxies_GTFProxy __pyx_base;
jpayne@68 1919 };
jpayne@68 1920
jpayne@68 1921
jpayne@68 1922 /* "pysam/libctabixproxies.pxd":46
jpayne@68 1923 *
jpayne@68 1924 *
jpayne@68 1925 * cdef class BedProxy(NamedTupleProxy): # <<<<<<<<<<<<<<
jpayne@68 1926 *
jpayne@68 1927 * cdef:
jpayne@68 1928 */
jpayne@68 1929 struct __pyx_obj_5pysam_16libctabixproxies_BedProxy {
jpayne@68 1930 struct __pyx_obj_5pysam_16libctabixproxies_NamedTupleProxy __pyx_base;
jpayne@68 1931 char *contig;
jpayne@68 1932 uint32_t start;
jpayne@68 1933 uint32_t end;
jpayne@68 1934 int bedfields;
jpayne@68 1935 };
jpayne@68 1936
jpayne@68 1937
jpayne@68 1938 /* "pysam/libctabixproxies.pxd":58
jpayne@68 1939 * cdef update(self, char * buffer, size_t nbytes)
jpayne@68 1940 *
jpayne@68 1941 * cdef class VCFProxy(NamedTupleProxy) : # <<<<<<<<<<<<<<
jpayne@68 1942 *
jpayne@68 1943 * cdef:
jpayne@68 1944 */
jpayne@68 1945 struct __pyx_obj_5pysam_16libctabixproxies_VCFProxy {
jpayne@68 1946 struct __pyx_obj_5pysam_16libctabixproxies_NamedTupleProxy __pyx_base;
jpayne@68 1947 char *contig;
jpayne@68 1948 uint32_t pos;
jpayne@68 1949 };
jpayne@68 1950
jpayne@68 1951
jpayne@68 1952 /* "pysam/libctabix.pxd":48
jpayne@68 1953 *
jpayne@68 1954 *
jpayne@68 1955 * cdef class tabix_file_iterator: # <<<<<<<<<<<<<<
jpayne@68 1956 * cdef BGZF * fh
jpayne@68 1957 * cdef kstream_t * kstream
jpayne@68 1958 */
jpayne@68 1959 struct __pyx_obj_5pysam_9libctabix_tabix_file_iterator {
jpayne@68 1960 PyObject_HEAD
jpayne@68 1961 struct __pyx_vtabstruct_5pysam_9libctabix_tabix_file_iterator *__pyx_vtab;
jpayne@68 1962 BGZF *fh;
jpayne@68 1963 kstream_t *kstream;
jpayne@68 1964 kstring_t buffer;
jpayne@68 1965 size_t size;
jpayne@68 1966 struct __pyx_obj_5pysam_9libctabix_Parser *parser;
jpayne@68 1967 int fd;
jpayne@68 1968 int duplicated_fd;
jpayne@68 1969 PyObject *infile;
jpayne@68 1970 };
jpayne@68 1971
jpayne@68 1972
jpayne@68 1973 /* "pysam/libctabix.pxd":61
jpayne@68 1974 *
jpayne@68 1975 *
jpayne@68 1976 * cdef class TabixFile(HTSFile): # <<<<<<<<<<<<<<
jpayne@68 1977 * # pointer to index structure
jpayne@68 1978 * cdef tbx_t * index
jpayne@68 1979 */
jpayne@68 1980 struct __pyx_obj_5pysam_9libctabix_TabixFile {
jpayne@68 1981 struct __pyx_obj_5pysam_10libchtslib_HTSFile __pyx_base;
jpayne@68 1982 tbx_t *index;
jpayne@68 1983 PyObject *filename_index;
jpayne@68 1984 struct __pyx_obj_5pysam_9libctabix_Parser *parser;
jpayne@68 1985 PyObject *encoding;
jpayne@68 1986 };
jpayne@68 1987
jpayne@68 1988
jpayne@68 1989 /* "pysam/libctabix.pxd":72
jpayne@68 1990 *
jpayne@68 1991 *
jpayne@68 1992 * cdef class Parser: # <<<<<<<<<<<<<<
jpayne@68 1993 * cdef encoding
jpayne@68 1994 * cdef parse(self, char * buffer, int len)
jpayne@68 1995 */
jpayne@68 1996 struct __pyx_obj_5pysam_9libctabix_Parser {
jpayne@68 1997 PyObject_HEAD
jpayne@68 1998 struct __pyx_vtabstruct_5pysam_9libctabix_Parser *__pyx_vtab;
jpayne@68 1999 PyObject *encoding;
jpayne@68 2000 };
jpayne@68 2001
jpayne@68 2002
jpayne@68 2003 /* "pysam/libctabix.pxd":77
jpayne@68 2004 *
jpayne@68 2005 *
jpayne@68 2006 * cdef class asTuple(Parser): # <<<<<<<<<<<<<<
jpayne@68 2007 * cdef parse(self, char * buffer, int len)
jpayne@68 2008 *
jpayne@68 2009 */
jpayne@68 2010 struct __pyx_obj_5pysam_9libctabix_asTuple {
jpayne@68 2011 struct __pyx_obj_5pysam_9libctabix_Parser __pyx_base;
jpayne@68 2012 };
jpayne@68 2013
jpayne@68 2014
jpayne@68 2015 /* "pysam/libctabix.pxd":81
jpayne@68 2016 *
jpayne@68 2017 *
jpayne@68 2018 * cdef class asGTF(Parser): # <<<<<<<<<<<<<<
jpayne@68 2019 * pass
jpayne@68 2020 *
jpayne@68 2021 */
jpayne@68 2022 struct __pyx_obj_5pysam_9libctabix_asGTF {
jpayne@68 2023 struct __pyx_obj_5pysam_9libctabix_Parser __pyx_base;
jpayne@68 2024 };
jpayne@68 2025
jpayne@68 2026
jpayne@68 2027 /* "pysam/libctabix.pxd":85
jpayne@68 2028 *
jpayne@68 2029 *
jpayne@68 2030 * cdef class asGFF3(Parser): # <<<<<<<<<<<<<<
jpayne@68 2031 * pass
jpayne@68 2032 *
jpayne@68 2033 */
jpayne@68 2034 struct __pyx_obj_5pysam_9libctabix_asGFF3 {
jpayne@68 2035 struct __pyx_obj_5pysam_9libctabix_Parser __pyx_base;
jpayne@68 2036 };
jpayne@68 2037
jpayne@68 2038
jpayne@68 2039 /* "pysam/libctabix.pxd":89
jpayne@68 2040 *
jpayne@68 2041 *
jpayne@68 2042 * cdef class asBed(Parser): # <<<<<<<<<<<<<<
jpayne@68 2043 * pass
jpayne@68 2044 *
jpayne@68 2045 */
jpayne@68 2046 struct __pyx_obj_5pysam_9libctabix_asBed {
jpayne@68 2047 struct __pyx_obj_5pysam_9libctabix_Parser __pyx_base;
jpayne@68 2048 };
jpayne@68 2049
jpayne@68 2050
jpayne@68 2051 /* "pysam/libctabix.pxd":93
jpayne@68 2052 *
jpayne@68 2053 *
jpayne@68 2054 * cdef class asVCF(Parser): # <<<<<<<<<<<<<<
jpayne@68 2055 * pass
jpayne@68 2056 *
jpayne@68 2057 */
jpayne@68 2058 struct __pyx_obj_5pysam_9libctabix_asVCF {
jpayne@68 2059 struct __pyx_obj_5pysam_9libctabix_Parser __pyx_base;
jpayne@68 2060 };
jpayne@68 2061
jpayne@68 2062
jpayne@68 2063 /* "pysam/libctabix.pxd":97
jpayne@68 2064 *
jpayne@68 2065 *
jpayne@68 2066 * cdef class TabixIterator: # <<<<<<<<<<<<<<
jpayne@68 2067 * cdef hts_itr_t * iterator
jpayne@68 2068 * cdef TabixFile tabixfile
jpayne@68 2069 */
jpayne@68 2070 struct __pyx_obj_5pysam_9libctabix_TabixIterator {
jpayne@68 2071 PyObject_HEAD
jpayne@68 2072 struct __pyx_vtabstruct_5pysam_9libctabix_TabixIterator *__pyx_vtab;
jpayne@68 2073 hts_itr_t *iterator;
jpayne@68 2074 struct __pyx_obj_5pysam_9libctabix_TabixFile *tabixfile;
jpayne@68 2075 kstring_t buffer;
jpayne@68 2076 PyObject *encoding;
jpayne@68 2077 };
jpayne@68 2078
jpayne@68 2079
jpayne@68 2080 /* "pysam/libctabix.pxd":105
jpayne@68 2081 *
jpayne@68 2082 *
jpayne@68 2083 * cdef class TabixIteratorParsed(TabixIterator): # <<<<<<<<<<<<<<
jpayne@68 2084 * cdef Parser parser
jpayne@68 2085 *
jpayne@68 2086 */
jpayne@68 2087 struct __pyx_obj_5pysam_9libctabix_TabixIteratorParsed {
jpayne@68 2088 struct __pyx_obj_5pysam_9libctabix_TabixIterator __pyx_base;
jpayne@68 2089 struct __pyx_obj_5pysam_9libctabix_Parser *parser;
jpayne@68 2090 };
jpayne@68 2091
jpayne@68 2092
jpayne@68 2093 /* "pysam/libctabix.pxd":109
jpayne@68 2094 *
jpayne@68 2095 *
jpayne@68 2096 * cdef class GZIterator: # <<<<<<<<<<<<<<
jpayne@68 2097 * cdef object _filename
jpayne@68 2098 * cdef BGZF * gzipfile
jpayne@68 2099 */
jpayne@68 2100 struct __pyx_obj_5pysam_9libctabix_GZIterator {
jpayne@68 2101 PyObject_HEAD
jpayne@68 2102 struct __pyx_vtabstruct_5pysam_9libctabix_GZIterator *__pyx_vtab;
jpayne@68 2103 PyObject *_filename;
jpayne@68 2104 BGZF *gzipfile;
jpayne@68 2105 kstream_t *kstream;
jpayne@68 2106 kstring_t buffer;
jpayne@68 2107 PyObject *encoding;
jpayne@68 2108 };
jpayne@68 2109
jpayne@68 2110
jpayne@68 2111 /* "pysam/libctabix.pxd":118
jpayne@68 2112 *
jpayne@68 2113 *
jpayne@68 2114 * cdef class GZIteratorHead(GZIterator): # <<<<<<<<<<<<<<
jpayne@68 2115 * pass
jpayne@68 2116 *
jpayne@68 2117 */
jpayne@68 2118 struct __pyx_obj_5pysam_9libctabix_GZIteratorHead {
jpayne@68 2119 struct __pyx_obj_5pysam_9libctabix_GZIterator __pyx_base;
jpayne@68 2120 };
jpayne@68 2121
jpayne@68 2122
jpayne@68 2123 /* "pysam/libctabix.pxd":122
jpayne@68 2124 *
jpayne@68 2125 *
jpayne@68 2126 * cdef class GZIteratorParsed(GZIterator): # <<<<<<<<<<<<<<
jpayne@68 2127 * cdef Parser parser
jpayne@68 2128 *
jpayne@68 2129 */
jpayne@68 2130 struct __pyx_obj_5pysam_9libctabix_GZIteratorParsed {
jpayne@68 2131 struct __pyx_obj_5pysam_9libctabix_GZIterator __pyx_base;
jpayne@68 2132 struct __pyx_obj_5pysam_9libctabix_Parser *parser;
jpayne@68 2133 };
jpayne@68 2134
jpayne@68 2135
jpayne@68 2136 /* "pysam/libctabix.pxd":127
jpayne@68 2137 *
jpayne@68 2138 * # Compatibility Layer for pysam < 0.8
jpayne@68 2139 * cdef class Tabixfile(TabixFile): # <<<<<<<<<<<<<<
jpayne@68 2140 * pass
jpayne@68 2141 */
jpayne@68 2142 struct __pyx_obj_5pysam_9libctabix_Tabixfile {
jpayne@68 2143 struct __pyx_obj_5pysam_9libctabix_TabixFile __pyx_base;
jpayne@68 2144 };
jpayne@68 2145
jpayne@68 2146
jpayne@68 2147
jpayne@68 2148 /* "pysam/libchtslib.pxd":2706
jpayne@68 2149 *
jpayne@68 2150 *
jpayne@68 2151 * cdef class HTSFile(object): # <<<<<<<<<<<<<<
jpayne@68 2152 * cdef htsFile *htsfile # pointer to htsFile structure
jpayne@68 2153 * cdef int64_t start_offset # BGZF offset of first record
jpayne@68 2154 */
jpayne@68 2155
jpayne@68 2156 struct __pyx_vtabstruct_5pysam_10libchtslib_HTSFile {
jpayne@68 2157 htsFile *(*_open_htsfile)(struct __pyx_obj_5pysam_10libchtslib_HTSFile *);
jpayne@68 2158 };
jpayne@68 2159 static struct __pyx_vtabstruct_5pysam_10libchtslib_HTSFile *__pyx_vtabptr_5pysam_10libchtslib_HTSFile;
jpayne@68 2160
jpayne@68 2161
jpayne@68 2162 /* "pysam/libctabixproxies.pxd":5
jpayne@68 2163 * from libc.stdint cimport uint8_t, int32_t, uint32_t, int64_t, uint64_t
jpayne@68 2164 *
jpayne@68 2165 * cdef class TupleProxy: # <<<<<<<<<<<<<<
jpayne@68 2166 *
jpayne@68 2167 * cdef:
jpayne@68 2168 */
jpayne@68 2169
jpayne@68 2170 struct __pyx_vtabstruct_5pysam_16libctabixproxies_TupleProxy {
jpayne@68 2171 int (*getMaxFields)(struct __pyx_obj_5pysam_16libctabixproxies_TupleProxy *, int __pyx_skip_dispatch);
jpayne@68 2172 int (*getMinFields)(struct __pyx_obj_5pysam_16libctabixproxies_TupleProxy *, int __pyx_skip_dispatch);
jpayne@68 2173 PyObject *(*take)(struct __pyx_obj_5pysam_16libctabixproxies_TupleProxy *, char *, size_t);
jpayne@68 2174 PyObject *(*present)(struct __pyx_obj_5pysam_16libctabixproxies_TupleProxy *, char *, size_t);
jpayne@68 2175 PyObject *(*copy)(struct __pyx_obj_5pysam_16libctabixproxies_TupleProxy *, char *, size_t, struct __pyx_opt_args_5pysam_16libctabixproxies_10TupleProxy_copy *__pyx_optional_args);
jpayne@68 2176 PyObject *(*update)(struct __pyx_obj_5pysam_16libctabixproxies_TupleProxy *, char *, size_t);
jpayne@68 2177 };
jpayne@68 2178 static struct __pyx_vtabstruct_5pysam_16libctabixproxies_TupleProxy *__pyx_vtabptr_5pysam_16libctabixproxies_TupleProxy;
jpayne@68 2179
jpayne@68 2180
jpayne@68 2181 /* "pysam/libctabixproxies.pxd":32
jpayne@68 2182 *
jpayne@68 2183 *
jpayne@68 2184 * cdef class NamedTupleProxy(TupleProxy): # <<<<<<<<<<<<<<
jpayne@68 2185 * pass
jpayne@68 2186 *
jpayne@68 2187 */
jpayne@68 2188
jpayne@68 2189 struct __pyx_vtabstruct_5pysam_16libctabixproxies_NamedTupleProxy {
jpayne@68 2190 struct __pyx_vtabstruct_5pysam_16libctabixproxies_TupleProxy __pyx_base;
jpayne@68 2191 };
jpayne@68 2192 static struct __pyx_vtabstruct_5pysam_16libctabixproxies_NamedTupleProxy *__pyx_vtabptr_5pysam_16libctabixproxies_NamedTupleProxy;
jpayne@68 2193
jpayne@68 2194
jpayne@68 2195 /* "pysam/libctabixproxies.pxd":36
jpayne@68 2196 *
jpayne@68 2197 *
jpayne@68 2198 * cdef class GTFProxy(NamedTupleProxy): # <<<<<<<<<<<<<<
jpayne@68 2199 * cdef object attribute_dict
jpayne@68 2200 * cpdef int getMaxFields(self)
jpayne@68 2201 */
jpayne@68 2202
jpayne@68 2203 struct __pyx_vtabstruct_5pysam_16libctabixproxies_GTFProxy {
jpayne@68 2204 struct __pyx_vtabstruct_5pysam_16libctabixproxies_NamedTupleProxy __pyx_base;
jpayne@68 2205 };
jpayne@68 2206 static struct __pyx_vtabstruct_5pysam_16libctabixproxies_GTFProxy *__pyx_vtabptr_5pysam_16libctabixproxies_GTFProxy;
jpayne@68 2207
jpayne@68 2208
jpayne@68 2209 /* "pysam/libctabixproxies.pxd":42
jpayne@68 2210 *
jpayne@68 2211 *
jpayne@68 2212 * cdef class GFF3Proxy(GTFProxy): # <<<<<<<<<<<<<<
jpayne@68 2213 * pass
jpayne@68 2214 *
jpayne@68 2215 */
jpayne@68 2216
jpayne@68 2217 struct __pyx_vtabstruct_5pysam_16libctabixproxies_GFF3Proxy {
jpayne@68 2218 struct __pyx_vtabstruct_5pysam_16libctabixproxies_GTFProxy __pyx_base;
jpayne@68 2219 };
jpayne@68 2220 static struct __pyx_vtabstruct_5pysam_16libctabixproxies_GFF3Proxy *__pyx_vtabptr_5pysam_16libctabixproxies_GFF3Proxy;
jpayne@68 2221
jpayne@68 2222
jpayne@68 2223 /* "pysam/libctabixproxies.pxd":46
jpayne@68 2224 *
jpayne@68 2225 *
jpayne@68 2226 * cdef class BedProxy(NamedTupleProxy): # <<<<<<<<<<<<<<
jpayne@68 2227 *
jpayne@68 2228 * cdef:
jpayne@68 2229 */
jpayne@68 2230
jpayne@68 2231 struct __pyx_vtabstruct_5pysam_16libctabixproxies_BedProxy {
jpayne@68 2232 struct __pyx_vtabstruct_5pysam_16libctabixproxies_NamedTupleProxy __pyx_base;
jpayne@68 2233 };
jpayne@68 2234 static struct __pyx_vtabstruct_5pysam_16libctabixproxies_BedProxy *__pyx_vtabptr_5pysam_16libctabixproxies_BedProxy;
jpayne@68 2235
jpayne@68 2236
jpayne@68 2237 /* "pysam/libctabixproxies.pxd":58
jpayne@68 2238 * cdef update(self, char * buffer, size_t nbytes)
jpayne@68 2239 *
jpayne@68 2240 * cdef class VCFProxy(NamedTupleProxy) : # <<<<<<<<<<<<<<
jpayne@68 2241 *
jpayne@68 2242 * cdef:
jpayne@68 2243 */
jpayne@68 2244
jpayne@68 2245 struct __pyx_vtabstruct_5pysam_16libctabixproxies_VCFProxy {
jpayne@68 2246 struct __pyx_vtabstruct_5pysam_16libctabixproxies_NamedTupleProxy __pyx_base;
jpayne@68 2247 };
jpayne@68 2248 static struct __pyx_vtabstruct_5pysam_16libctabixproxies_VCFProxy *__pyx_vtabptr_5pysam_16libctabixproxies_VCFProxy;
jpayne@68 2249
jpayne@68 2250
jpayne@68 2251 /* "pysam/libctabix.pyx":1098
jpayne@68 2252 *
jpayne@68 2253 *
jpayne@68 2254 * cdef class tabix_file_iterator: # <<<<<<<<<<<<<<
jpayne@68 2255 * '''iterate over a compressed or uncompressed ``infile``.
jpayne@68 2256 * '''
jpayne@68 2257 */
jpayne@68 2258
jpayne@68 2259 struct __pyx_vtabstruct_5pysam_9libctabix_tabix_file_iterator {
jpayne@68 2260 PyObject *(*__pyx___cnext__)(struct __pyx_obj_5pysam_9libctabix_tabix_file_iterator *);
jpayne@68 2261 };
jpayne@68 2262 static struct __pyx_vtabstruct_5pysam_9libctabix_tabix_file_iterator *__pyx_vtabptr_5pysam_9libctabix_tabix_file_iterator;
jpayne@68 2263
jpayne@68 2264
jpayne@68 2265 /* "pysam/libctabix.pyx":287
jpayne@68 2266 *
jpayne@68 2267 *
jpayne@68 2268 * cdef class TabixFile: # <<<<<<<<<<<<<<
jpayne@68 2269 * """Random access to bgzf formatted files that
jpayne@68 2270 * have been indexed by :term:`tabix`.
jpayne@68 2271 */
jpayne@68 2272
jpayne@68 2273 struct __pyx_vtabstruct_5pysam_9libctabix_TabixFile {
jpayne@68 2274 struct __pyx_vtabstruct_5pysam_10libchtslib_HTSFile __pyx_base;
jpayne@68 2275 };
jpayne@68 2276 static struct __pyx_vtabstruct_5pysam_9libctabix_TabixFile *__pyx_vtabptr_5pysam_9libctabix_TabixFile;
jpayne@68 2277
jpayne@68 2278
jpayne@68 2279 /* "pysam/libctabix.pyx":82
jpayne@68 2280 * from pysam.libcutils cimport encode_filename, from_string_and_size
jpayne@68 2281 *
jpayne@68 2282 * cdef class Parser: # <<<<<<<<<<<<<<
jpayne@68 2283 *
jpayne@68 2284 * def __init__(self, encoding="ascii"):
jpayne@68 2285 */
jpayne@68 2286
jpayne@68 2287 struct __pyx_vtabstruct_5pysam_9libctabix_Parser {
jpayne@68 2288 PyObject *(*parse)(struct __pyx_obj_5pysam_9libctabix_Parser *, char *, int);
jpayne@68 2289 };
jpayne@68 2290 static struct __pyx_vtabstruct_5pysam_9libctabix_Parser *__pyx_vtabptr_5pysam_9libctabix_Parser;
jpayne@68 2291
jpayne@68 2292
jpayne@68 2293 /* "pysam/libctabix.pyx":101
jpayne@68 2294 *
jpayne@68 2295 *
jpayne@68 2296 * cdef class asTuple(Parser): # <<<<<<<<<<<<<<
jpayne@68 2297 * '''converts a :term:`tabix row` into a python tuple.
jpayne@68 2298 *
jpayne@68 2299 */
jpayne@68 2300
jpayne@68 2301 struct __pyx_vtabstruct_5pysam_9libctabix_asTuple {
jpayne@68 2302 struct __pyx_vtabstruct_5pysam_9libctabix_Parser __pyx_base;
jpayne@68 2303 };
jpayne@68 2304 static struct __pyx_vtabstruct_5pysam_9libctabix_asTuple *__pyx_vtabptr_5pysam_9libctabix_asTuple;
jpayne@68 2305
jpayne@68 2306
jpayne@68 2307 /* "pysam/libctabix.pyx":151
jpayne@68 2308 *
jpayne@68 2309 *
jpayne@68 2310 * cdef class asGTF(Parser): # <<<<<<<<<<<<<<
jpayne@68 2311 * '''converts a :term:`tabix row` into a GTF record with the following
jpayne@68 2312 * fields:
jpayne@68 2313 */
jpayne@68 2314
jpayne@68 2315 struct __pyx_vtabstruct_5pysam_9libctabix_asGTF {
jpayne@68 2316 struct __pyx_vtabstruct_5pysam_9libctabix_Parser __pyx_base;
jpayne@68 2317 };
jpayne@68 2318 static struct __pyx_vtabstruct_5pysam_9libctabix_asGTF *__pyx_vtabptr_5pysam_9libctabix_asGTF;
jpayne@68 2319
jpayne@68 2320
jpayne@68 2321 /* "pysam/libctabix.pyx":115
jpayne@68 2322 *
jpayne@68 2323 *
jpayne@68 2324 * cdef class asGFF3(Parser): # <<<<<<<<<<<<<<
jpayne@68 2325 * '''converts a :term:`tabix row` into a GFF record with the following
jpayne@68 2326 * fields:
jpayne@68 2327 */
jpayne@68 2328
jpayne@68 2329 struct __pyx_vtabstruct_5pysam_9libctabix_asGFF3 {
jpayne@68 2330 struct __pyx_vtabstruct_5pysam_9libctabix_Parser __pyx_base;
jpayne@68 2331 };
jpayne@68 2332 static struct __pyx_vtabstruct_5pysam_9libctabix_asGFF3 *__pyx_vtabptr_5pysam_9libctabix_asGFF3;
jpayne@68 2333
jpayne@68 2334
jpayne@68 2335 /* "pysam/libctabix.pyx":198
jpayne@68 2336 *
jpayne@68 2337 *
jpayne@68 2338 * cdef class asBed(Parser): # <<<<<<<<<<<<<<
jpayne@68 2339 * '''converts a :term:`tabix row` into a bed record
jpayne@68 2340 * with the following fields:
jpayne@68 2341 */
jpayne@68 2342
jpayne@68 2343 struct __pyx_vtabstruct_5pysam_9libctabix_asBed {
jpayne@68 2344 struct __pyx_vtabstruct_5pysam_9libctabix_Parser __pyx_base;
jpayne@68 2345 };
jpayne@68 2346 static struct __pyx_vtabstruct_5pysam_9libctabix_asBed *__pyx_vtabptr_5pysam_9libctabix_asBed;
jpayne@68 2347
jpayne@68 2348
jpayne@68 2349 /* "pysam/libctabix.pyx":246
jpayne@68 2350 *
jpayne@68 2351 *
jpayne@68 2352 * cdef class asVCF(Parser): # <<<<<<<<<<<<<<
jpayne@68 2353 * '''converts a :term:`tabix row` into a VCF record with
jpayne@68 2354 * the following fields:
jpayne@68 2355 */
jpayne@68 2356
jpayne@68 2357 struct __pyx_vtabstruct_5pysam_9libctabix_asVCF {
jpayne@68 2358 struct __pyx_vtabstruct_5pysam_9libctabix_Parser __pyx_base;
jpayne@68 2359 };
jpayne@68 2360 static struct __pyx_vtabstruct_5pysam_9libctabix_asVCF *__pyx_vtabptr_5pysam_9libctabix_asVCF;
jpayne@68 2361
jpayne@68 2362
jpayne@68 2363 /* "pysam/libctabix.pyx":619
jpayne@68 2364 *
jpayne@68 2365 *
jpayne@68 2366 * cdef class TabixIterator: # <<<<<<<<<<<<<<
jpayne@68 2367 * """iterates over rows in *tabixfile* in region
jpayne@68 2368 * given by *tid*, *start* and *end*.
jpayne@68 2369 */
jpayne@68 2370
jpayne@68 2371 struct __pyx_vtabstruct_5pysam_9libctabix_TabixIterator {
jpayne@68 2372 int (*__pyx___cnext__)(struct __pyx_obj_5pysam_9libctabix_TabixIterator *);
jpayne@68 2373 };
jpayne@68 2374 static struct __pyx_vtabstruct_5pysam_9libctabix_TabixIterator *__pyx_vtabptr_5pysam_9libctabix_TabixIterator;
jpayne@68 2375
jpayne@68 2376
jpayne@68 2377 /* "pysam/libctabix.pyx":692
jpayne@68 2378 *
jpayne@68 2379 *
jpayne@68 2380 * cdef class TabixIteratorParsed(TabixIterator): # <<<<<<<<<<<<<<
jpayne@68 2381 * """iterates over mapped reads in a region.
jpayne@68 2382 *
jpayne@68 2383 */
jpayne@68 2384
jpayne@68 2385 struct __pyx_vtabstruct_5pysam_9libctabix_TabixIteratorParsed {
jpayne@68 2386 struct __pyx_vtabstruct_5pysam_9libctabix_TabixIterator __pyx_base;
jpayne@68 2387 };
jpayne@68 2388 static struct __pyx_vtabstruct_5pysam_9libctabix_TabixIteratorParsed *__pyx_vtabptr_5pysam_9libctabix_TabixIteratorParsed;
jpayne@68 2389
jpayne@68 2390
jpayne@68 2391 /* "pysam/libctabix.pyx":720
jpayne@68 2392 *
jpayne@68 2393 *
jpayne@68 2394 * cdef class GZIterator: # <<<<<<<<<<<<<<
jpayne@68 2395 * def __init__(self, filename, int buffer_size=65536, encoding="ascii"):
jpayne@68 2396 * '''iterate line-by-line through gzip (or bgzip)
jpayne@68 2397 */
jpayne@68 2398
jpayne@68 2399 struct __pyx_vtabstruct_5pysam_9libctabix_GZIterator {
jpayne@68 2400 int (*__pyx___cnext__)(struct __pyx_obj_5pysam_9libctabix_GZIterator *);
jpayne@68 2401 };
jpayne@68 2402 static struct __pyx_vtabstruct_5pysam_9libctabix_GZIterator *__pyx_vtabptr_5pysam_9libctabix_GZIterator;
jpayne@68 2403
jpayne@68 2404
jpayne@68 2405 /* "pysam/libctabix.pyx":775
jpayne@68 2406 *
jpayne@68 2407 *
jpayne@68 2408 * cdef class GZIteratorHead(GZIterator): # <<<<<<<<<<<<<<
jpayne@68 2409 * '''iterate line-by-line through gzip (or bgzip)
jpayne@68 2410 * compressed file returning comments at top of file.
jpayne@68 2411 */
jpayne@68 2412
jpayne@68 2413 struct __pyx_vtabstruct_5pysam_9libctabix_GZIteratorHead {
jpayne@68 2414 struct __pyx_vtabstruct_5pysam_9libctabix_GZIterator __pyx_base;
jpayne@68 2415 };
jpayne@68 2416 static struct __pyx_vtabstruct_5pysam_9libctabix_GZIteratorHead *__pyx_vtabptr_5pysam_9libctabix_GZIteratorHead;
jpayne@68 2417
jpayne@68 2418
jpayne@68 2419 /* "pysam/libctabix.pyx":792
jpayne@68 2420 *
jpayne@68 2421 *
jpayne@68 2422 * cdef class GZIteratorParsed(GZIterator): # <<<<<<<<<<<<<<
jpayne@68 2423 * '''iterate line-by-line through gzip (or bgzip)
jpayne@68 2424 * compressed file returning comments at top of file.
jpayne@68 2425 */
jpayne@68 2426
jpayne@68 2427 struct __pyx_vtabstruct_5pysam_9libctabix_GZIteratorParsed {
jpayne@68 2428 struct __pyx_vtabstruct_5pysam_9libctabix_GZIterator __pyx_base;
jpayne@68 2429 };
jpayne@68 2430 static struct __pyx_vtabstruct_5pysam_9libctabix_GZIteratorParsed *__pyx_vtabptr_5pysam_9libctabix_GZIteratorParsed;
jpayne@68 2431
jpayne@68 2432
jpayne@68 2433 /* "pysam/libctabix.pyx":1251
jpayne@68 2434 *
jpayne@68 2435 *
jpayne@68 2436 * cdef class Tabixfile(TabixFile): # <<<<<<<<<<<<<<
jpayne@68 2437 * """Tabixfile is deprecated: use TabixFile instead"""
jpayne@68 2438 * pass
jpayne@68 2439 */
jpayne@68 2440
jpayne@68 2441 struct __pyx_vtabstruct_5pysam_9libctabix_Tabixfile {
jpayne@68 2442 struct __pyx_vtabstruct_5pysam_9libctabix_TabixFile __pyx_base;
jpayne@68 2443 };
jpayne@68 2444 static struct __pyx_vtabstruct_5pysam_9libctabix_Tabixfile *__pyx_vtabptr_5pysam_9libctabix_Tabixfile;
jpayne@68 2445 /* #### Code section: utility_code_proto ### */
jpayne@68 2446
jpayne@68 2447 /* --- Runtime support code (head) --- */
jpayne@68 2448 /* Refnanny.proto */
jpayne@68 2449 #ifndef CYTHON_REFNANNY
jpayne@68 2450 #define CYTHON_REFNANNY 0
jpayne@68 2451 #endif
jpayne@68 2452 #if CYTHON_REFNANNY
jpayne@68 2453 typedef struct {
jpayne@68 2454 void (*INCREF)(void*, PyObject*, Py_ssize_t);
jpayne@68 2455 void (*DECREF)(void*, PyObject*, Py_ssize_t);
jpayne@68 2456 void (*GOTREF)(void*, PyObject*, Py_ssize_t);
jpayne@68 2457 void (*GIVEREF)(void*, PyObject*, Py_ssize_t);
jpayne@68 2458 void* (*SetupContext)(const char*, Py_ssize_t, const char*);
jpayne@68 2459 void (*FinishContext)(void**);
jpayne@68 2460 } __Pyx_RefNannyAPIStruct;
jpayne@68 2461 static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL;
jpayne@68 2462 static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname);
jpayne@68 2463 #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL;
jpayne@68 2464 #ifdef WITH_THREAD
jpayne@68 2465 #define __Pyx_RefNannySetupContext(name, acquire_gil)\
jpayne@68 2466 if (acquire_gil) {\
jpayne@68 2467 PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\
jpayne@68 2468 __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), (__LINE__), (__FILE__));\
jpayne@68 2469 PyGILState_Release(__pyx_gilstate_save);\
jpayne@68 2470 } else {\
jpayne@68 2471 __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), (__LINE__), (__FILE__));\
jpayne@68 2472 }
jpayne@68 2473 #define __Pyx_RefNannyFinishContextNogil() {\
jpayne@68 2474 PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\
jpayne@68 2475 __Pyx_RefNannyFinishContext();\
jpayne@68 2476 PyGILState_Release(__pyx_gilstate_save);\
jpayne@68 2477 }
jpayne@68 2478 #else
jpayne@68 2479 #define __Pyx_RefNannySetupContext(name, acquire_gil)\
jpayne@68 2480 __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), (__LINE__), (__FILE__))
jpayne@68 2481 #define __Pyx_RefNannyFinishContextNogil() __Pyx_RefNannyFinishContext()
jpayne@68 2482 #endif
jpayne@68 2483 #define __Pyx_RefNannyFinishContextNogil() {\
jpayne@68 2484 PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\
jpayne@68 2485 __Pyx_RefNannyFinishContext();\
jpayne@68 2486 PyGILState_Release(__pyx_gilstate_save);\
jpayne@68 2487 }
jpayne@68 2488 #define __Pyx_RefNannyFinishContext()\
jpayne@68 2489 __Pyx_RefNanny->FinishContext(&__pyx_refnanny)
jpayne@68 2490 #define __Pyx_INCREF(r) __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), (__LINE__))
jpayne@68 2491 #define __Pyx_DECREF(r) __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), (__LINE__))
jpayne@68 2492 #define __Pyx_GOTREF(r) __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), (__LINE__))
jpayne@68 2493 #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), (__LINE__))
jpayne@68 2494 #define __Pyx_XINCREF(r) do { if((r) == NULL); else {__Pyx_INCREF(r); }} while(0)
jpayne@68 2495 #define __Pyx_XDECREF(r) do { if((r) == NULL); else {__Pyx_DECREF(r); }} while(0)
jpayne@68 2496 #define __Pyx_XGOTREF(r) do { if((r) == NULL); else {__Pyx_GOTREF(r); }} while(0)
jpayne@68 2497 #define __Pyx_XGIVEREF(r) do { if((r) == NULL); else {__Pyx_GIVEREF(r);}} while(0)
jpayne@68 2498 #else
jpayne@68 2499 #define __Pyx_RefNannyDeclarations
jpayne@68 2500 #define __Pyx_RefNannySetupContext(name, acquire_gil)
jpayne@68 2501 #define __Pyx_RefNannyFinishContextNogil()
jpayne@68 2502 #define __Pyx_RefNannyFinishContext()
jpayne@68 2503 #define __Pyx_INCREF(r) Py_INCREF(r)
jpayne@68 2504 #define __Pyx_DECREF(r) Py_DECREF(r)
jpayne@68 2505 #define __Pyx_GOTREF(r)
jpayne@68 2506 #define __Pyx_GIVEREF(r)
jpayne@68 2507 #define __Pyx_XINCREF(r) Py_XINCREF(r)
jpayne@68 2508 #define __Pyx_XDECREF(r) Py_XDECREF(r)
jpayne@68 2509 #define __Pyx_XGOTREF(r)
jpayne@68 2510 #define __Pyx_XGIVEREF(r)
jpayne@68 2511 #endif
jpayne@68 2512 #define __Pyx_Py_XDECREF_SET(r, v) do {\
jpayne@68 2513 PyObject *tmp = (PyObject *) r;\
jpayne@68 2514 r = v; Py_XDECREF(tmp);\
jpayne@68 2515 } while (0)
jpayne@68 2516 #define __Pyx_XDECREF_SET(r, v) do {\
jpayne@68 2517 PyObject *tmp = (PyObject *) r;\
jpayne@68 2518 r = v; __Pyx_XDECREF(tmp);\
jpayne@68 2519 } while (0)
jpayne@68 2520 #define __Pyx_DECREF_SET(r, v) do {\
jpayne@68 2521 PyObject *tmp = (PyObject *) r;\
jpayne@68 2522 r = v; __Pyx_DECREF(tmp);\
jpayne@68 2523 } while (0)
jpayne@68 2524 #define __Pyx_CLEAR(r) do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0)
jpayne@68 2525 #define __Pyx_XCLEAR(r) do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0)
jpayne@68 2526
jpayne@68 2527 /* PyErrExceptionMatches.proto */
jpayne@68 2528 #if CYTHON_FAST_THREAD_STATE
jpayne@68 2529 #define __Pyx_PyErr_ExceptionMatches(err) __Pyx_PyErr_ExceptionMatchesInState(__pyx_tstate, err)
jpayne@68 2530 static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err);
jpayne@68 2531 #else
jpayne@68 2532 #define __Pyx_PyErr_ExceptionMatches(err) PyErr_ExceptionMatches(err)
jpayne@68 2533 #endif
jpayne@68 2534
jpayne@68 2535 /* PyThreadStateGet.proto */
jpayne@68 2536 #if CYTHON_FAST_THREAD_STATE
jpayne@68 2537 #define __Pyx_PyThreadState_declare PyThreadState *__pyx_tstate;
jpayne@68 2538 #define __Pyx_PyThreadState_assign __pyx_tstate = __Pyx_PyThreadState_Current;
jpayne@68 2539 #if PY_VERSION_HEX >= 0x030C00A6
jpayne@68 2540 #define __Pyx_PyErr_Occurred() (__pyx_tstate->current_exception != NULL)
jpayne@68 2541 #define __Pyx_PyErr_CurrentExceptionType() (__pyx_tstate->current_exception ? (PyObject*) Py_TYPE(__pyx_tstate->current_exception) : (PyObject*) NULL)
jpayne@68 2542 #else
jpayne@68 2543 #define __Pyx_PyErr_Occurred() (__pyx_tstate->curexc_type != NULL)
jpayne@68 2544 #define __Pyx_PyErr_CurrentExceptionType() (__pyx_tstate->curexc_type)
jpayne@68 2545 #endif
jpayne@68 2546 #else
jpayne@68 2547 #define __Pyx_PyThreadState_declare
jpayne@68 2548 #define __Pyx_PyThreadState_assign
jpayne@68 2549 #define __Pyx_PyErr_Occurred() (PyErr_Occurred() != NULL)
jpayne@68 2550 #define __Pyx_PyErr_CurrentExceptionType() PyErr_Occurred()
jpayne@68 2551 #endif
jpayne@68 2552
jpayne@68 2553 /* PyErrFetchRestore.proto */
jpayne@68 2554 #if CYTHON_FAST_THREAD_STATE
jpayne@68 2555 #define __Pyx_PyErr_Clear() __Pyx_ErrRestore(NULL, NULL, NULL)
jpayne@68 2556 #define __Pyx_ErrRestoreWithState(type, value, tb) __Pyx_ErrRestoreInState(PyThreadState_GET(), type, value, tb)
jpayne@68 2557 #define __Pyx_ErrFetchWithState(type, value, tb) __Pyx_ErrFetchInState(PyThreadState_GET(), type, value, tb)
jpayne@68 2558 #define __Pyx_ErrRestore(type, value, tb) __Pyx_ErrRestoreInState(__pyx_tstate, type, value, tb)
jpayne@68 2559 #define __Pyx_ErrFetch(type, value, tb) __Pyx_ErrFetchInState(__pyx_tstate, type, value, tb)
jpayne@68 2560 static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
jpayne@68 2561 static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
jpayne@68 2562 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A6
jpayne@68 2563 #define __Pyx_PyErr_SetNone(exc) (Py_INCREF(exc), __Pyx_ErrRestore((exc), NULL, NULL))
jpayne@68 2564 #else
jpayne@68 2565 #define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
jpayne@68 2566 #endif
jpayne@68 2567 #else
jpayne@68 2568 #define __Pyx_PyErr_Clear() PyErr_Clear()
jpayne@68 2569 #define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
jpayne@68 2570 #define __Pyx_ErrRestoreWithState(type, value, tb) PyErr_Restore(type, value, tb)
jpayne@68 2571 #define __Pyx_ErrFetchWithState(type, value, tb) PyErr_Fetch(type, value, tb)
jpayne@68 2572 #define __Pyx_ErrRestoreInState(tstate, type, value, tb) PyErr_Restore(type, value, tb)
jpayne@68 2573 #define __Pyx_ErrFetchInState(tstate, type, value, tb) PyErr_Fetch(type, value, tb)
jpayne@68 2574 #define __Pyx_ErrRestore(type, value, tb) PyErr_Restore(type, value, tb)
jpayne@68 2575 #define __Pyx_ErrFetch(type, value, tb) PyErr_Fetch(type, value, tb)
jpayne@68 2576 #endif
jpayne@68 2577
jpayne@68 2578 /* PyObjectGetAttrStr.proto */
jpayne@68 2579 #if CYTHON_USE_TYPE_SLOTS
jpayne@68 2580 static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name);
jpayne@68 2581 #else
jpayne@68 2582 #define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n)
jpayne@68 2583 #endif
jpayne@68 2584
jpayne@68 2585 /* PyObjectGetAttrStrNoError.proto */
jpayne@68 2586 static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name);
jpayne@68 2587
jpayne@68 2588 /* GetBuiltinName.proto */
jpayne@68 2589 static PyObject *__Pyx_GetBuiltinName(PyObject *name);
jpayne@68 2590
jpayne@68 2591 /* TupleAndListFromArray.proto */
jpayne@68 2592 #if CYTHON_COMPILING_IN_CPYTHON
jpayne@68 2593 static CYTHON_INLINE PyObject* __Pyx_PyList_FromArray(PyObject *const *src, Py_ssize_t n);
jpayne@68 2594 static CYTHON_INLINE PyObject* __Pyx_PyTuple_FromArray(PyObject *const *src, Py_ssize_t n);
jpayne@68 2595 #endif
jpayne@68 2596
jpayne@68 2597 /* IncludeStringH.proto */
jpayne@68 2598 #include <string.h>
jpayne@68 2599
jpayne@68 2600 /* BytesEquals.proto */
jpayne@68 2601 static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals);
jpayne@68 2602
jpayne@68 2603 /* UnicodeEquals.proto */
jpayne@68 2604 static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals);
jpayne@68 2605
jpayne@68 2606 /* fastcall.proto */
jpayne@68 2607 #if CYTHON_AVOID_BORROWED_REFS
jpayne@68 2608 #define __Pyx_Arg_VARARGS(args, i) PySequence_GetItem(args, i)
jpayne@68 2609 #elif CYTHON_ASSUME_SAFE_MACROS
jpayne@68 2610 #define __Pyx_Arg_VARARGS(args, i) PyTuple_GET_ITEM(args, i)
jpayne@68 2611 #else
jpayne@68 2612 #define __Pyx_Arg_VARARGS(args, i) PyTuple_GetItem(args, i)
jpayne@68 2613 #endif
jpayne@68 2614 #if CYTHON_AVOID_BORROWED_REFS
jpayne@68 2615 #define __Pyx_Arg_NewRef_VARARGS(arg) __Pyx_NewRef(arg)
jpayne@68 2616 #define __Pyx_Arg_XDECREF_VARARGS(arg) Py_XDECREF(arg)
jpayne@68 2617 #else
jpayne@68 2618 #define __Pyx_Arg_NewRef_VARARGS(arg) arg
jpayne@68 2619 #define __Pyx_Arg_XDECREF_VARARGS(arg)
jpayne@68 2620 #endif
jpayne@68 2621 #define __Pyx_NumKwargs_VARARGS(kwds) PyDict_Size(kwds)
jpayne@68 2622 #define __Pyx_KwValues_VARARGS(args, nargs) NULL
jpayne@68 2623 #define __Pyx_GetKwValue_VARARGS(kw, kwvalues, s) __Pyx_PyDict_GetItemStrWithError(kw, s)
jpayne@68 2624 #define __Pyx_KwargsAsDict_VARARGS(kw, kwvalues) PyDict_Copy(kw)
jpayne@68 2625 #if CYTHON_METH_FASTCALL
jpayne@68 2626 #define __Pyx_Arg_FASTCALL(args, i) args[i]
jpayne@68 2627 #define __Pyx_NumKwargs_FASTCALL(kwds) PyTuple_GET_SIZE(kwds)
jpayne@68 2628 #define __Pyx_KwValues_FASTCALL(args, nargs) ((args) + (nargs))
jpayne@68 2629 static CYTHON_INLINE PyObject * __Pyx_GetKwValue_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues, PyObject *s);
jpayne@68 2630 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000
jpayne@68 2631 CYTHON_UNUSED static PyObject *__Pyx_KwargsAsDict_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues);
jpayne@68 2632 #else
jpayne@68 2633 #define __Pyx_KwargsAsDict_FASTCALL(kw, kwvalues) _PyStack_AsDict(kwvalues, kw)
jpayne@68 2634 #endif
jpayne@68 2635 #define __Pyx_Arg_NewRef_FASTCALL(arg) arg /* no-op, __Pyx_Arg_FASTCALL is direct and this needs
jpayne@68 2636 to have the same reference counting */
jpayne@68 2637 #define __Pyx_Arg_XDECREF_FASTCALL(arg)
jpayne@68 2638 #else
jpayne@68 2639 #define __Pyx_Arg_FASTCALL __Pyx_Arg_VARARGS
jpayne@68 2640 #define __Pyx_NumKwargs_FASTCALL __Pyx_NumKwargs_VARARGS
jpayne@68 2641 #define __Pyx_KwValues_FASTCALL __Pyx_KwValues_VARARGS
jpayne@68 2642 #define __Pyx_GetKwValue_FASTCALL __Pyx_GetKwValue_VARARGS
jpayne@68 2643 #define __Pyx_KwargsAsDict_FASTCALL __Pyx_KwargsAsDict_VARARGS
jpayne@68 2644 #define __Pyx_Arg_NewRef_FASTCALL(arg) __Pyx_Arg_NewRef_VARARGS(arg)
jpayne@68 2645 #define __Pyx_Arg_XDECREF_FASTCALL(arg) __Pyx_Arg_XDECREF_VARARGS(arg)
jpayne@68 2646 #endif
jpayne@68 2647 #if CYTHON_COMPILING_IN_CPYTHON && CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
jpayne@68 2648 #define __Pyx_ArgsSlice_VARARGS(args, start, stop) __Pyx_PyTuple_FromArray(&__Pyx_Arg_VARARGS(args, start), stop - start)
jpayne@68 2649 #define __Pyx_ArgsSlice_FASTCALL(args, start, stop) __Pyx_PyTuple_FromArray(&__Pyx_Arg_FASTCALL(args, start), stop - start)
jpayne@68 2650 #else
jpayne@68 2651 #define __Pyx_ArgsSlice_VARARGS(args, start, stop) PyTuple_GetSlice(args, start, stop)
jpayne@68 2652 #define __Pyx_ArgsSlice_FASTCALL(args, start, stop) PyTuple_GetSlice(args, start, stop)
jpayne@68 2653 #endif
jpayne@68 2654
jpayne@68 2655 /* RaiseDoubleKeywords.proto */
jpayne@68 2656 static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name);
jpayne@68 2657
jpayne@68 2658 /* ParseKeywords.proto */
jpayne@68 2659 static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject *const *kwvalues,
jpayne@68 2660 PyObject **argnames[],
jpayne@68 2661 PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args,
jpayne@68 2662 const char* function_name);
jpayne@68 2663
jpayne@68 2664 /* RaiseArgTupleInvalid.proto */
jpayne@68 2665 static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact,
jpayne@68 2666 Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found);
jpayne@68 2667
jpayne@68 2668 /* Profile.proto */
jpayne@68 2669 #ifndef CYTHON_PROFILE
jpayne@68 2670 #if CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_PYPY
jpayne@68 2671 #define CYTHON_PROFILE 0
jpayne@68 2672 #else
jpayne@68 2673 #define CYTHON_PROFILE 1
jpayne@68 2674 #endif
jpayne@68 2675 #endif
jpayne@68 2676 #ifndef CYTHON_TRACE_NOGIL
jpayne@68 2677 #define CYTHON_TRACE_NOGIL 0
jpayne@68 2678 #else
jpayne@68 2679 #if CYTHON_TRACE_NOGIL && !defined(CYTHON_TRACE)
jpayne@68 2680 #define CYTHON_TRACE 1
jpayne@68 2681 #endif
jpayne@68 2682 #endif
jpayne@68 2683 #ifndef CYTHON_TRACE
jpayne@68 2684 #define CYTHON_TRACE 0
jpayne@68 2685 #endif
jpayne@68 2686 #if CYTHON_TRACE
jpayne@68 2687 #undef CYTHON_PROFILE_REUSE_FRAME
jpayne@68 2688 #endif
jpayne@68 2689 #ifndef CYTHON_PROFILE_REUSE_FRAME
jpayne@68 2690 #define CYTHON_PROFILE_REUSE_FRAME 0
jpayne@68 2691 #endif
jpayne@68 2692 #if CYTHON_PROFILE || CYTHON_TRACE
jpayne@68 2693 #include "compile.h"
jpayne@68 2694 #include "frameobject.h"
jpayne@68 2695 #include "traceback.h"
jpayne@68 2696 #if PY_VERSION_HEX >= 0x030b00a6
jpayne@68 2697 #ifndef Py_BUILD_CORE
jpayne@68 2698 #define Py_BUILD_CORE 1
jpayne@68 2699 #endif
jpayne@68 2700 #include "internal/pycore_frame.h"
jpayne@68 2701 #endif
jpayne@68 2702 #if CYTHON_PROFILE_REUSE_FRAME
jpayne@68 2703 #define CYTHON_FRAME_MODIFIER static
jpayne@68 2704 #define CYTHON_FRAME_DEL(frame)
jpayne@68 2705 #else
jpayne@68 2706 #define CYTHON_FRAME_MODIFIER
jpayne@68 2707 #define CYTHON_FRAME_DEL(frame) Py_CLEAR(frame)
jpayne@68 2708 #endif
jpayne@68 2709 #define __Pyx_TraceDeclarations\
jpayne@68 2710 static PyCodeObject *__pyx_frame_code = NULL;\
jpayne@68 2711 CYTHON_FRAME_MODIFIER PyFrameObject *__pyx_frame = NULL;\
jpayne@68 2712 int __Pyx_use_tracing = 0;
jpayne@68 2713 #define __Pyx_TraceFrameInit(codeobj)\
jpayne@68 2714 if (codeobj) __pyx_frame_code = (PyCodeObject*) codeobj;
jpayne@68 2715 #if PY_VERSION_HEX >= 0x030b00a2
jpayne@68 2716 #if PY_VERSION_HEX >= 0x030C00b1
jpayne@68 2717 #define __Pyx_IsTracing(tstate, check_tracing, check_funcs)\
jpayne@68 2718 ((!(check_tracing) || !(tstate)->tracing) &&\
jpayne@68 2719 (!(check_funcs) || (tstate)->c_profilefunc || (CYTHON_TRACE && (tstate)->c_tracefunc)))
jpayne@68 2720 #else
jpayne@68 2721 #define __Pyx_IsTracing(tstate, check_tracing, check_funcs)\
jpayne@68 2722 (unlikely((tstate)->cframe->use_tracing) &&\
jpayne@68 2723 (!(check_tracing) || !(tstate)->tracing) &&\
jpayne@68 2724 (!(check_funcs) || (tstate)->c_profilefunc || (CYTHON_TRACE && (tstate)->c_tracefunc)))
jpayne@68 2725 #endif
jpayne@68 2726 #define __Pyx_EnterTracing(tstate) PyThreadState_EnterTracing(tstate)
jpayne@68 2727 #define __Pyx_LeaveTracing(tstate) PyThreadState_LeaveTracing(tstate)
jpayne@68 2728 #elif PY_VERSION_HEX >= 0x030a00b1
jpayne@68 2729 #define __Pyx_IsTracing(tstate, check_tracing, check_funcs)\
jpayne@68 2730 (unlikely((tstate)->cframe->use_tracing) &&\
jpayne@68 2731 (!(check_tracing) || !(tstate)->tracing) &&\
jpayne@68 2732 (!(check_funcs) || (tstate)->c_profilefunc || (CYTHON_TRACE && (tstate)->c_tracefunc)))
jpayne@68 2733 #define __Pyx_EnterTracing(tstate)\
jpayne@68 2734 do { tstate->tracing++; tstate->cframe->use_tracing = 0; } while (0)
jpayne@68 2735 #define __Pyx_LeaveTracing(tstate)\
jpayne@68 2736 do {\
jpayne@68 2737 tstate->tracing--;\
jpayne@68 2738 tstate->cframe->use_tracing = ((CYTHON_TRACE && tstate->c_tracefunc != NULL)\
jpayne@68 2739 || tstate->c_profilefunc != NULL);\
jpayne@68 2740 } while (0)
jpayne@68 2741 #else
jpayne@68 2742 #define __Pyx_IsTracing(tstate, check_tracing, check_funcs)\
jpayne@68 2743 (unlikely((tstate)->use_tracing) &&\
jpayne@68 2744 (!(check_tracing) || !(tstate)->tracing) &&\
jpayne@68 2745 (!(check_funcs) || (tstate)->c_profilefunc || (CYTHON_TRACE && (tstate)->c_tracefunc)))
jpayne@68 2746 #define __Pyx_EnterTracing(tstate)\
jpayne@68 2747 do { tstate->tracing++; tstate->use_tracing = 0; } while (0)
jpayne@68 2748 #define __Pyx_LeaveTracing(tstate)\
jpayne@68 2749 do {\
jpayne@68 2750 tstate->tracing--;\
jpayne@68 2751 tstate->use_tracing = ((CYTHON_TRACE && tstate->c_tracefunc != NULL)\
jpayne@68 2752 || tstate->c_profilefunc != NULL);\
jpayne@68 2753 } while (0)
jpayne@68 2754 #endif
jpayne@68 2755 #ifdef WITH_THREAD
jpayne@68 2756 #define __Pyx_TraceCall(funcname, srcfile, firstlineno, nogil, goto_error)\
jpayne@68 2757 if (nogil) {\
jpayne@68 2758 if (CYTHON_TRACE_NOGIL) {\
jpayne@68 2759 PyThreadState *tstate;\
jpayne@68 2760 PyGILState_STATE state = PyGILState_Ensure();\
jpayne@68 2761 tstate = __Pyx_PyThreadState_Current;\
jpayne@68 2762 if (__Pyx_IsTracing(tstate, 1, 1)) {\
jpayne@68 2763 __Pyx_use_tracing = __Pyx_TraceSetupAndCall(&__pyx_frame_code, &__pyx_frame, tstate, funcname, srcfile, firstlineno);\
jpayne@68 2764 }\
jpayne@68 2765 PyGILState_Release(state);\
jpayne@68 2766 if (unlikely(__Pyx_use_tracing < 0)) goto_error;\
jpayne@68 2767 }\
jpayne@68 2768 } else {\
jpayne@68 2769 PyThreadState* tstate = PyThreadState_GET();\
jpayne@68 2770 if (__Pyx_IsTracing(tstate, 1, 1)) {\
jpayne@68 2771 __Pyx_use_tracing = __Pyx_TraceSetupAndCall(&__pyx_frame_code, &__pyx_frame, tstate, funcname, srcfile, firstlineno);\
jpayne@68 2772 if (unlikely(__Pyx_use_tracing < 0)) goto_error;\
jpayne@68 2773 }\
jpayne@68 2774 }
jpayne@68 2775 #else
jpayne@68 2776 #define __Pyx_TraceCall(funcname, srcfile, firstlineno, nogil, goto_error)\
jpayne@68 2777 { PyThreadState* tstate = PyThreadState_GET();\
jpayne@68 2778 if (__Pyx_IsTracing(tstate, 1, 1)) {\
jpayne@68 2779 __Pyx_use_tracing = __Pyx_TraceSetupAndCall(&__pyx_frame_code, &__pyx_frame, tstate, funcname, srcfile, firstlineno);\
jpayne@68 2780 if (unlikely(__Pyx_use_tracing < 0)) goto_error;\
jpayne@68 2781 }\
jpayne@68 2782 }
jpayne@68 2783 #endif
jpayne@68 2784 #define __Pyx_TraceException()\
jpayne@68 2785 if (likely(!__Pyx_use_tracing)); else {\
jpayne@68 2786 PyThreadState* tstate = __Pyx_PyThreadState_Current;\
jpayne@68 2787 if (__Pyx_IsTracing(tstate, 0, 1)) {\
jpayne@68 2788 __Pyx_EnterTracing(tstate);\
jpayne@68 2789 PyObject *exc_info = __Pyx_GetExceptionTuple(tstate);\
jpayne@68 2790 if (exc_info) {\
jpayne@68 2791 if (CYTHON_TRACE && tstate->c_tracefunc)\
jpayne@68 2792 tstate->c_tracefunc(\
jpayne@68 2793 tstate->c_traceobj, __pyx_frame, PyTrace_EXCEPTION, exc_info);\
jpayne@68 2794 tstate->c_profilefunc(\
jpayne@68 2795 tstate->c_profileobj, __pyx_frame, PyTrace_EXCEPTION, exc_info);\
jpayne@68 2796 Py_DECREF(exc_info);\
jpayne@68 2797 }\
jpayne@68 2798 __Pyx_LeaveTracing(tstate);\
jpayne@68 2799 }\
jpayne@68 2800 }
jpayne@68 2801 static void __Pyx_call_return_trace_func(PyThreadState *tstate, PyFrameObject *frame, PyObject *result) {
jpayne@68 2802 PyObject *type, *value, *traceback;
jpayne@68 2803 __Pyx_ErrFetchInState(tstate, &type, &value, &traceback);
jpayne@68 2804 __Pyx_EnterTracing(tstate);
jpayne@68 2805 if (CYTHON_TRACE && tstate->c_tracefunc)
jpayne@68 2806 tstate->c_tracefunc(tstate->c_traceobj, frame, PyTrace_RETURN, result);
jpayne@68 2807 if (tstate->c_profilefunc)
jpayne@68 2808 tstate->c_profilefunc(tstate->c_profileobj, frame, PyTrace_RETURN, result);
jpayne@68 2809 CYTHON_FRAME_DEL(frame);
jpayne@68 2810 __Pyx_LeaveTracing(tstate);
jpayne@68 2811 __Pyx_ErrRestoreInState(tstate, type, value, traceback);
jpayne@68 2812 }
jpayne@68 2813 #ifdef WITH_THREAD
jpayne@68 2814 #define __Pyx_TraceReturn(result, nogil)\
jpayne@68 2815 if (likely(!__Pyx_use_tracing)); else {\
jpayne@68 2816 if (nogil) {\
jpayne@68 2817 if (CYTHON_TRACE_NOGIL) {\
jpayne@68 2818 PyThreadState *tstate;\
jpayne@68 2819 PyGILState_STATE state = PyGILState_Ensure();\
jpayne@68 2820 tstate = __Pyx_PyThreadState_Current;\
jpayne@68 2821 if (__Pyx_IsTracing(tstate, 0, 0)) {\
jpayne@68 2822 __Pyx_call_return_trace_func(tstate, __pyx_frame, (PyObject*)result);\
jpayne@68 2823 }\
jpayne@68 2824 PyGILState_Release(state);\
jpayne@68 2825 }\
jpayne@68 2826 } else {\
jpayne@68 2827 PyThreadState* tstate = __Pyx_PyThreadState_Current;\
jpayne@68 2828 if (__Pyx_IsTracing(tstate, 0, 0)) {\
jpayne@68 2829 __Pyx_call_return_trace_func(tstate, __pyx_frame, (PyObject*)result);\
jpayne@68 2830 }\
jpayne@68 2831 }\
jpayne@68 2832 }
jpayne@68 2833 #else
jpayne@68 2834 #define __Pyx_TraceReturn(result, nogil)\
jpayne@68 2835 if (likely(!__Pyx_use_tracing)); else {\
jpayne@68 2836 PyThreadState* tstate = __Pyx_PyThreadState_Current;\
jpayne@68 2837 if (__Pyx_IsTracing(tstate, 0, 0)) {\
jpayne@68 2838 __Pyx_call_return_trace_func(tstate, __pyx_frame, (PyObject*)result);\
jpayne@68 2839 }\
jpayne@68 2840 }
jpayne@68 2841 #endif
jpayne@68 2842 static PyCodeObject *__Pyx_createFrameCodeObject(const char *funcname, const char *srcfile, int firstlineno);
jpayne@68 2843 static int __Pyx_TraceSetupAndCall(PyCodeObject** code, PyFrameObject** frame, PyThreadState* tstate, const char *funcname, const char *srcfile, int firstlineno);
jpayne@68 2844 #else
jpayne@68 2845 #define __Pyx_TraceDeclarations
jpayne@68 2846 #define __Pyx_TraceFrameInit(codeobj)
jpayne@68 2847 #define __Pyx_TraceCall(funcname, srcfile, firstlineno, nogil, goto_error) if ((1)); else goto_error;
jpayne@68 2848 #define __Pyx_TraceException()
jpayne@68 2849 #define __Pyx_TraceReturn(result, nogil)
jpayne@68 2850 #endif
jpayne@68 2851 #if CYTHON_TRACE
jpayne@68 2852 static int __Pyx_call_line_trace_func(PyThreadState *tstate, PyFrameObject *frame, int lineno) {
jpayne@68 2853 int ret;
jpayne@68 2854 PyObject *type, *value, *traceback;
jpayne@68 2855 __Pyx_ErrFetchInState(tstate, &type, &value, &traceback);
jpayne@68 2856 __Pyx_PyFrame_SetLineNumber(frame, lineno);
jpayne@68 2857 __Pyx_EnterTracing(tstate);
jpayne@68 2858 ret = tstate->c_tracefunc(tstate->c_traceobj, frame, PyTrace_LINE, NULL);
jpayne@68 2859 __Pyx_LeaveTracing(tstate);
jpayne@68 2860 if (likely(!ret)) {
jpayne@68 2861 __Pyx_ErrRestoreInState(tstate, type, value, traceback);
jpayne@68 2862 } else {
jpayne@68 2863 Py_XDECREF(type);
jpayne@68 2864 Py_XDECREF(value);
jpayne@68 2865 Py_XDECREF(traceback);
jpayne@68 2866 }
jpayne@68 2867 return ret;
jpayne@68 2868 }
jpayne@68 2869 #ifdef WITH_THREAD
jpayne@68 2870 #define __Pyx_TraceLine(lineno, nogil, goto_error)\
jpayne@68 2871 if (likely(!__Pyx_use_tracing)); else {\
jpayne@68 2872 if (nogil) {\
jpayne@68 2873 if (CYTHON_TRACE_NOGIL) {\
jpayne@68 2874 int ret = 0;\
jpayne@68 2875 PyThreadState *tstate;\
jpayne@68 2876 PyGILState_STATE state = __Pyx_PyGILState_Ensure();\
jpayne@68 2877 tstate = __Pyx_PyThreadState_Current;\
jpayne@68 2878 if (__Pyx_IsTracing(tstate, 0, 0) && tstate->c_tracefunc && __pyx_frame->f_trace) {\
jpayne@68 2879 ret = __Pyx_call_line_trace_func(tstate, __pyx_frame, lineno);\
jpayne@68 2880 }\
jpayne@68 2881 __Pyx_PyGILState_Release(state);\
jpayne@68 2882 if (unlikely(ret)) goto_error;\
jpayne@68 2883 }\
jpayne@68 2884 } else {\
jpayne@68 2885 PyThreadState* tstate = __Pyx_PyThreadState_Current;\
jpayne@68 2886 if (__Pyx_IsTracing(tstate, 0, 0) && tstate->c_tracefunc && __pyx_frame->f_trace) {\
jpayne@68 2887 int ret = __Pyx_call_line_trace_func(tstate, __pyx_frame, lineno);\
jpayne@68 2888 if (unlikely(ret)) goto_error;\
jpayne@68 2889 }\
jpayne@68 2890 }\
jpayne@68 2891 }
jpayne@68 2892 #else
jpayne@68 2893 #define __Pyx_TraceLine(lineno, nogil, goto_error)\
jpayne@68 2894 if (likely(!__Pyx_use_tracing)); else {\
jpayne@68 2895 PyThreadState* tstate = __Pyx_PyThreadState_Current;\
jpayne@68 2896 if (__Pyx_IsTracing(tstate, 0, 0) && tstate->c_tracefunc && __pyx_frame->f_trace) {\
jpayne@68 2897 int ret = __Pyx_call_line_trace_func(tstate, __pyx_frame, lineno);\
jpayne@68 2898 if (unlikely(ret)) goto_error;\
jpayne@68 2899 }\
jpayne@68 2900 }
jpayne@68 2901 #endif
jpayne@68 2902 #else
jpayne@68 2903 #define __Pyx_TraceLine(lineno, nogil, goto_error) if ((1)); else goto_error;
jpayne@68 2904 #endif
jpayne@68 2905
jpayne@68 2906 /* KeywordStringCheck.proto */
jpayne@68 2907 static int __Pyx_CheckKeywordStrings(PyObject *kw, const char* function_name, int kw_allowed);
jpayne@68 2908
jpayne@68 2909 /* PyObject_Unicode.proto */
jpayne@68 2910 #if PY_MAJOR_VERSION >= 3
jpayne@68 2911 #define __Pyx_PyObject_Unicode(obj)\
jpayne@68 2912 (likely(PyUnicode_CheckExact(obj)) ? __Pyx_NewRef(obj) : PyObject_Str(obj))
jpayne@68 2913 #else
jpayne@68 2914 #define __Pyx_PyObject_Unicode(obj)\
jpayne@68 2915 (likely(PyUnicode_CheckExact(obj)) ? __Pyx_NewRef(obj) : PyObject_Unicode(obj))
jpayne@68 2916 #endif
jpayne@68 2917
jpayne@68 2918 /* PyFunctionFastCall.proto */
jpayne@68 2919 #if CYTHON_FAST_PYCALL
jpayne@68 2920 #if !CYTHON_VECTORCALL
jpayne@68 2921 #define __Pyx_PyFunction_FastCall(func, args, nargs)\
jpayne@68 2922 __Pyx_PyFunction_FastCallDict((func), (args), (nargs), NULL)
jpayne@68 2923 static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs);
jpayne@68 2924 #endif
jpayne@68 2925 #define __Pyx_BUILD_ASSERT_EXPR(cond)\
jpayne@68 2926 (sizeof(char [1 - 2*!(cond)]) - 1)
jpayne@68 2927 #ifndef Py_MEMBER_SIZE
jpayne@68 2928 #define Py_MEMBER_SIZE(type, member) sizeof(((type *)0)->member)
jpayne@68 2929 #endif
jpayne@68 2930 #if !CYTHON_VECTORCALL
jpayne@68 2931 #if PY_VERSION_HEX >= 0x03080000
jpayne@68 2932 #include "frameobject.h"
jpayne@68 2933 #if PY_VERSION_HEX >= 0x030b00a6 && !CYTHON_COMPILING_IN_LIMITED_API
jpayne@68 2934 #ifndef Py_BUILD_CORE
jpayne@68 2935 #define Py_BUILD_CORE 1
jpayne@68 2936 #endif
jpayne@68 2937 #include "internal/pycore_frame.h"
jpayne@68 2938 #endif
jpayne@68 2939 #define __Pxy_PyFrame_Initialize_Offsets()
jpayne@68 2940 #define __Pyx_PyFrame_GetLocalsplus(frame) ((frame)->f_localsplus)
jpayne@68 2941 #else
jpayne@68 2942 static size_t __pyx_pyframe_localsplus_offset = 0;
jpayne@68 2943 #include "frameobject.h"
jpayne@68 2944 #define __Pxy_PyFrame_Initialize_Offsets()\
jpayne@68 2945 ((void)__Pyx_BUILD_ASSERT_EXPR(sizeof(PyFrameObject) == offsetof(PyFrameObject, f_localsplus) + Py_MEMBER_SIZE(PyFrameObject, f_localsplus)),\
jpayne@68 2946 (void)(__pyx_pyframe_localsplus_offset = ((size_t)PyFrame_Type.tp_basicsize) - Py_MEMBER_SIZE(PyFrameObject, f_localsplus)))
jpayne@68 2947 #define __Pyx_PyFrame_GetLocalsplus(frame)\
jpayne@68 2948 (assert(__pyx_pyframe_localsplus_offset), (PyObject **)(((char *)(frame)) + __pyx_pyframe_localsplus_offset))
jpayne@68 2949 #endif
jpayne@68 2950 #endif
jpayne@68 2951 #endif
jpayne@68 2952
jpayne@68 2953 /* PyObjectCall.proto */
jpayne@68 2954 #if CYTHON_COMPILING_IN_CPYTHON
jpayne@68 2955 static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw);
jpayne@68 2956 #else
jpayne@68 2957 #define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw)
jpayne@68 2958 #endif
jpayne@68 2959
jpayne@68 2960 /* PyObjectCallMethO.proto */
jpayne@68 2961 #if CYTHON_COMPILING_IN_CPYTHON
jpayne@68 2962 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg);
jpayne@68 2963 #endif
jpayne@68 2964
jpayne@68 2965 /* PyObjectFastCall.proto */
jpayne@68 2966 #define __Pyx_PyObject_FastCall(func, args, nargs) __Pyx_PyObject_FastCallDict(func, args, (size_t)(nargs), NULL)
jpayne@68 2967 static CYTHON_INLINE PyObject* __Pyx_PyObject_FastCallDict(PyObject *func, PyObject **args, size_t nargs, PyObject *kwargs);
jpayne@68 2968
jpayne@68 2969 /* PyObjectCallOneArg.proto */
jpayne@68 2970 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg);
jpayne@68 2971
jpayne@68 2972 /* RaiseException.proto */
jpayne@68 2973 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause);
jpayne@68 2974
jpayne@68 2975 /* GetAttr3.proto */
jpayne@68 2976 static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *, PyObject *, PyObject *);
jpayne@68 2977
jpayne@68 2978 /* PyDictVersioning.proto */
jpayne@68 2979 #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS
jpayne@68 2980 #define __PYX_DICT_VERSION_INIT ((PY_UINT64_T) -1)
jpayne@68 2981 #define __PYX_GET_DICT_VERSION(dict) (((PyDictObject*)(dict))->ma_version_tag)
jpayne@68 2982 #define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)\
jpayne@68 2983 (version_var) = __PYX_GET_DICT_VERSION(dict);\
jpayne@68 2984 (cache_var) = (value);
jpayne@68 2985 #define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) {\
jpayne@68 2986 static PY_UINT64_T __pyx_dict_version = 0;\
jpayne@68 2987 static PyObject *__pyx_dict_cached_value = NULL;\
jpayne@68 2988 if (likely(__PYX_GET_DICT_VERSION(DICT) == __pyx_dict_version)) {\
jpayne@68 2989 (VAR) = __pyx_dict_cached_value;\
jpayne@68 2990 } else {\
jpayne@68 2991 (VAR) = __pyx_dict_cached_value = (LOOKUP);\
jpayne@68 2992 __pyx_dict_version = __PYX_GET_DICT_VERSION(DICT);\
jpayne@68 2993 }\
jpayne@68 2994 }
jpayne@68 2995 static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj);
jpayne@68 2996 static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj);
jpayne@68 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@68 2998 #else
jpayne@68 2999 #define __PYX_GET_DICT_VERSION(dict) (0)
jpayne@68 3000 #define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)
jpayne@68 3001 #define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) (VAR) = (LOOKUP);
jpayne@68 3002 #endif
jpayne@68 3003
jpayne@68 3004 /* GetModuleGlobalName.proto */
jpayne@68 3005 #if CYTHON_USE_DICT_VERSIONS
jpayne@68 3006 #define __Pyx_GetModuleGlobalName(var, name) do {\
jpayne@68 3007 static PY_UINT64_T __pyx_dict_version = 0;\
jpayne@68 3008 static PyObject *__pyx_dict_cached_value = NULL;\
jpayne@68 3009 (var) = (likely(__pyx_dict_version == __PYX_GET_DICT_VERSION(__pyx_d))) ?\
jpayne@68 3010 (likely(__pyx_dict_cached_value) ? __Pyx_NewRef(__pyx_dict_cached_value) : __Pyx_GetBuiltinName(name)) :\
jpayne@68 3011 __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\
jpayne@68 3012 } while(0)
jpayne@68 3013 #define __Pyx_GetModuleGlobalNameUncached(var, name) do {\
jpayne@68 3014 PY_UINT64_T __pyx_dict_version;\
jpayne@68 3015 PyObject *__pyx_dict_cached_value;\
jpayne@68 3016 (var) = __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\
jpayne@68 3017 } while(0)
jpayne@68 3018 static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value);
jpayne@68 3019 #else
jpayne@68 3020 #define __Pyx_GetModuleGlobalName(var, name) (var) = __Pyx__GetModuleGlobalName(name)
jpayne@68 3021 #define __Pyx_GetModuleGlobalNameUncached(var, name) (var) = __Pyx__GetModuleGlobalName(name)
jpayne@68 3022 static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name);
jpayne@68 3023 #endif
jpayne@68 3024
jpayne@68 3025 /* RaiseUnexpectedTypeError.proto */
jpayne@68 3026 static int __Pyx_RaiseUnexpectedTypeError(const char *expected, PyObject *obj);
jpayne@68 3027
jpayne@68 3028 /* ExtTypeTest.proto */
jpayne@68 3029 static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type);
jpayne@68 3030
jpayne@68 3031 /* PyIntBinop.proto */
jpayne@68 3032 #if !CYTHON_COMPILING_IN_PYPY
jpayne@68 3033 static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check);
jpayne@68 3034 #else
jpayne@68 3035 #define __Pyx_PyInt_AddObjC(op1, op2, intval, inplace, zerodivision_check)\
jpayne@68 3036 (inplace ? PyNumber_InPlaceAdd(op1, op2) : PyNumber_Add(op1, op2))
jpayne@68 3037 #endif
jpayne@68 3038
jpayne@68 3039 /* ListAppend.proto */
jpayne@68 3040 #if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS
jpayne@68 3041 static CYTHON_INLINE int __Pyx_PyList_Append(PyObject* list, PyObject* x) {
jpayne@68 3042 PyListObject* L = (PyListObject*) list;
jpayne@68 3043 Py_ssize_t len = Py_SIZE(list);
jpayne@68 3044 if (likely(L->allocated > len) & likely(len > (L->allocated >> 1))) {
jpayne@68 3045 Py_INCREF(x);
jpayne@68 3046 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000
jpayne@68 3047 L->ob_item[len] = x;
jpayne@68 3048 #else
jpayne@68 3049 PyList_SET_ITEM(list, len, x);
jpayne@68 3050 #endif
jpayne@68 3051 __Pyx_SET_SIZE(list, len + 1);
jpayne@68 3052 return 0;
jpayne@68 3053 }
jpayne@68 3054 return PyList_Append(list, x);
jpayne@68 3055 }
jpayne@68 3056 #else
jpayne@68 3057 #define __Pyx_PyList_Append(L,x) PyList_Append(L,x)
jpayne@68 3058 #endif
jpayne@68 3059
jpayne@68 3060 /* WriteUnraisableException.proto */
jpayne@68 3061 static void __Pyx_WriteUnraisable(const char *name, int clineno,
jpayne@68 3062 int lineno, const char *filename,
jpayne@68 3063 int full_traceback, int nogil);
jpayne@68 3064
jpayne@68 3065 /* PyObjectCallNoArg.proto */
jpayne@68 3066 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func);
jpayne@68 3067
jpayne@68 3068 /* ArgTypeTest.proto */
jpayne@68 3069 #define __Pyx_ArgTypeTest(obj, type, none_allowed, name, exact)\
jpayne@68 3070 ((likely(__Pyx_IS_TYPE(obj, type) | (none_allowed && (obj == Py_None)))) ? 1 :\
jpayne@68 3071 __Pyx__ArgTypeTest(obj, type, name, exact))
jpayne@68 3072 static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact);
jpayne@68 3073
jpayne@68 3074 /* PyObjectFormatAndDecref.proto */
jpayne@68 3075 static CYTHON_INLINE PyObject* __Pyx_PyObject_FormatSimpleAndDecref(PyObject* s, PyObject* f);
jpayne@68 3076 static CYTHON_INLINE PyObject* __Pyx_PyObject_FormatAndDecref(PyObject* s, PyObject* f);
jpayne@68 3077
jpayne@68 3078 /* JoinPyUnicode.proto */
jpayne@68 3079 static PyObject* __Pyx_PyUnicode_Join(PyObject* value_tuple, Py_ssize_t value_count, Py_ssize_t result_ulength,
jpayne@68 3080 Py_UCS4 max_char);
jpayne@68 3081
jpayne@68 3082 /* DictGetItem.proto */
jpayne@68 3083 #if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY
jpayne@68 3084 static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key);
jpayne@68 3085 #define __Pyx_PyObject_Dict_GetItem(obj, name)\
jpayne@68 3086 (likely(PyDict_CheckExact(obj)) ?\
jpayne@68 3087 __Pyx_PyDict_GetItem(obj, name) : PyObject_GetItem(obj, name))
jpayne@68 3088 #else
jpayne@68 3089 #define __Pyx_PyDict_GetItem(d, key) PyObject_GetItem(d, key)
jpayne@68 3090 #define __Pyx_PyObject_Dict_GetItem(obj, name) PyObject_GetItem(obj, name)
jpayne@68 3091 #endif
jpayne@68 3092
jpayne@68 3093 /* GetTopmostException.proto */
jpayne@68 3094 #if CYTHON_USE_EXC_INFO_STACK && CYTHON_FAST_THREAD_STATE
jpayne@68 3095 static _PyErr_StackItem * __Pyx_PyErr_GetTopmostException(PyThreadState *tstate);
jpayne@68 3096 #endif
jpayne@68 3097
jpayne@68 3098 /* SaveResetException.proto */
jpayne@68 3099 #if CYTHON_FAST_THREAD_STATE
jpayne@68 3100 #define __Pyx_ExceptionSave(type, value, tb) __Pyx__ExceptionSave(__pyx_tstate, type, value, tb)
jpayne@68 3101 static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
jpayne@68 3102 #define __Pyx_ExceptionReset(type, value, tb) __Pyx__ExceptionReset(__pyx_tstate, type, value, tb)
jpayne@68 3103 static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
jpayne@68 3104 #else
jpayne@68 3105 #define __Pyx_ExceptionSave(type, value, tb) PyErr_GetExcInfo(type, value, tb)
jpayne@68 3106 #define __Pyx_ExceptionReset(type, value, tb) PyErr_SetExcInfo(type, value, tb)
jpayne@68 3107 #endif
jpayne@68 3108
jpayne@68 3109 /* GetException.proto */
jpayne@68 3110 #if CYTHON_FAST_THREAD_STATE
jpayne@68 3111 #define __Pyx_GetException(type, value, tb) __Pyx__GetException(__pyx_tstate, type, value, tb)
jpayne@68 3112 static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
jpayne@68 3113 #else
jpayne@68 3114 static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb);
jpayne@68 3115 #endif
jpayne@68 3116
jpayne@68 3117 /* py_dict_keys.proto */
jpayne@68 3118 static CYTHON_INLINE PyObject* __Pyx_PyDict_Keys(PyObject* d);
jpayne@68 3119
jpayne@68 3120 /* UnpackUnboundCMethod.proto */
jpayne@68 3121 typedef struct {
jpayne@68 3122 PyObject *type;
jpayne@68 3123 PyObject **method_name;
jpayne@68 3124 PyCFunction func;
jpayne@68 3125 PyObject *method;
jpayne@68 3126 int flag;
jpayne@68 3127 } __Pyx_CachedCFunction;
jpayne@68 3128
jpayne@68 3129 /* CallUnboundCMethod0.proto */
jpayne@68 3130 static PyObject* __Pyx__CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self);
jpayne@68 3131 #if CYTHON_COMPILING_IN_CPYTHON
jpayne@68 3132 #define __Pyx_CallUnboundCMethod0(cfunc, self)\
jpayne@68 3133 (likely((cfunc)->func) ?\
jpayne@68 3134 (likely((cfunc)->flag == METH_NOARGS) ? (*((cfunc)->func))(self, NULL) :\
jpayne@68 3135 (PY_VERSION_HEX >= 0x030600B1 && likely((cfunc)->flag == METH_FASTCALL) ?\
jpayne@68 3136 (PY_VERSION_HEX >= 0x030700A0 ?\
jpayne@68 3137 (*(__Pyx_PyCFunctionFast)(void*)(PyCFunction)(cfunc)->func)(self, &__pyx_empty_tuple, 0) :\
jpayne@68 3138 (*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)(cfunc)->func)(self, &__pyx_empty_tuple, 0, NULL)) :\
jpayne@68 3139 (PY_VERSION_HEX >= 0x030700A0 && (cfunc)->flag == (METH_FASTCALL | METH_KEYWORDS) ?\
jpayne@68 3140 (*(__Pyx_PyCFunctionFastWithKeywords)(void*)(PyCFunction)(cfunc)->func)(self, &__pyx_empty_tuple, 0, NULL) :\
jpayne@68 3141 (likely((cfunc)->flag == (METH_VARARGS | METH_KEYWORDS)) ? ((*(PyCFunctionWithKeywords)(void*)(PyCFunction)(cfunc)->func)(self, __pyx_empty_tuple, NULL)) :\
jpayne@68 3142 ((cfunc)->flag == METH_VARARGS ? (*((cfunc)->func))(self, __pyx_empty_tuple) :\
jpayne@68 3143 __Pyx__CallUnboundCMethod0(cfunc, self)))))) :\
jpayne@68 3144 __Pyx__CallUnboundCMethod0(cfunc, self))
jpayne@68 3145 #else
jpayne@68 3146 #define __Pyx_CallUnboundCMethod0(cfunc, self) __Pyx__CallUnboundCMethod0(cfunc, self)
jpayne@68 3147 #endif
jpayne@68 3148
jpayne@68 3149 /* UnicodeAsUCS4.proto */
jpayne@68 3150 static CYTHON_INLINE Py_UCS4 __Pyx_PyUnicode_AsPy_UCS4(PyObject*);
jpayne@68 3151
jpayne@68 3152 /* object_ord.proto */
jpayne@68 3153 #if PY_MAJOR_VERSION >= 3
jpayne@68 3154 #define __Pyx_PyObject_Ord(c)\
jpayne@68 3155 (likely(PyUnicode_Check(c)) ? (long)__Pyx_PyUnicode_AsPy_UCS4(c) : __Pyx__PyObject_Ord(c))
jpayne@68 3156 #else
jpayne@68 3157 #define __Pyx_PyObject_Ord(c) __Pyx__PyObject_Ord(c)
jpayne@68 3158 #endif
jpayne@68 3159 static long __Pyx__PyObject_Ord(PyObject* c);
jpayne@68 3160
jpayne@68 3161 /* RaiseTooManyValuesToUnpack.proto */
jpayne@68 3162 static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected);
jpayne@68 3163
jpayne@68 3164 /* RaiseNeedMoreValuesToUnpack.proto */
jpayne@68 3165 static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index);
jpayne@68 3166
jpayne@68 3167 /* IterFinish.proto */
jpayne@68 3168 static CYTHON_INLINE int __Pyx_IterFinish(void);
jpayne@68 3169
jpayne@68 3170 /* UnpackItemEndCheck.proto */
jpayne@68 3171 static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected);
jpayne@68 3172
jpayne@68 3173 /* PyObjectSetAttrStr.proto */
jpayne@68 3174 #if CYTHON_USE_TYPE_SLOTS
jpayne@68 3175 #define __Pyx_PyObject_DelAttrStr(o,n) __Pyx_PyObject_SetAttrStr(o, n, NULL)
jpayne@68 3176 static CYTHON_INLINE int __Pyx_PyObject_SetAttrStr(PyObject* obj, PyObject* attr_name, PyObject* value);
jpayne@68 3177 #else
jpayne@68 3178 #define __Pyx_PyObject_DelAttrStr(o,n) PyObject_DelAttr(o,n)
jpayne@68 3179 #define __Pyx_PyObject_SetAttrStr(o,n,v) PyObject_SetAttr(o,n,v)
jpayne@68 3180 #endif
jpayne@68 3181
jpayne@68 3182 /* AssertionsEnabled.proto */
jpayne@68 3183 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x02070600 && !defined(Py_OptimizeFlag)
jpayne@68 3184 #define __Pyx_init_assertions_enabled() (0)
jpayne@68 3185 #define __pyx_assertions_enabled() (1)
jpayne@68 3186 #elif CYTHON_COMPILING_IN_LIMITED_API || (CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030C0000)
jpayne@68 3187 static int __pyx_assertions_enabled_flag;
jpayne@68 3188 #define __pyx_assertions_enabled() (__pyx_assertions_enabled_flag)
jpayne@68 3189 static int __Pyx_init_assertions_enabled(void) {
jpayne@68 3190 PyObject *builtins, *debug, *debug_str;
jpayne@68 3191 int flag;
jpayne@68 3192 builtins = PyEval_GetBuiltins();
jpayne@68 3193 if (!builtins) goto bad;
jpayne@68 3194 debug_str = PyUnicode_FromStringAndSize("__debug__", 9);
jpayne@68 3195 if (!debug_str) goto bad;
jpayne@68 3196 debug = PyObject_GetItem(builtins, debug_str);
jpayne@68 3197 Py_DECREF(debug_str);
jpayne@68 3198 if (!debug) goto bad;
jpayne@68 3199 flag = PyObject_IsTrue(debug);
jpayne@68 3200 Py_DECREF(debug);
jpayne@68 3201 if (flag == -1) goto bad;
jpayne@68 3202 __pyx_assertions_enabled_flag = flag;
jpayne@68 3203 return 0;
jpayne@68 3204 bad:
jpayne@68 3205 __pyx_assertions_enabled_flag = 1;
jpayne@68 3206 return -1;
jpayne@68 3207 }
jpayne@68 3208 #else
jpayne@68 3209 #define __Pyx_init_assertions_enabled() (0)
jpayne@68 3210 #define __pyx_assertions_enabled() (!Py_OptimizeFlag)
jpayne@68 3211 #endif
jpayne@68 3212
jpayne@68 3213 /* PySequenceContains.proto */
jpayne@68 3214 static CYTHON_INLINE int __Pyx_PySequence_ContainsTF(PyObject* item, PyObject* seq, int eq) {
jpayne@68 3215 int result = PySequence_Contains(seq, item);
jpayne@68 3216 return unlikely(result < 0) ? result : (result == (eq == Py_EQ));
jpayne@68 3217 }
jpayne@68 3218
jpayne@68 3219 /* Import.proto */
jpayne@68 3220 static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level);
jpayne@68 3221
jpayne@68 3222 /* ImportFrom.proto */
jpayne@68 3223 static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name);
jpayne@68 3224
jpayne@68 3225 /* GetItemInt.proto */
jpayne@68 3226 #define __Pyx_GetItemInt(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
jpayne@68 3227 (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
jpayne@68 3228 __Pyx_GetItemInt_Fast(o, (Py_ssize_t)i, is_list, wraparound, boundscheck) :\
jpayne@68 3229 (is_list ? (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL) :\
jpayne@68 3230 __Pyx_GetItemInt_Generic(o, to_py_func(i))))
jpayne@68 3231 #define __Pyx_GetItemInt_List(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
jpayne@68 3232 (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
jpayne@68 3233 __Pyx_GetItemInt_List_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\
jpayne@68 3234 (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL))
jpayne@68 3235 static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
jpayne@68 3236 int wraparound, int boundscheck);
jpayne@68 3237 #define __Pyx_GetItemInt_Tuple(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
jpayne@68 3238 (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
jpayne@68 3239 __Pyx_GetItemInt_Tuple_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\
jpayne@68 3240 (PyErr_SetString(PyExc_IndexError, "tuple index out of range"), (PyObject*)NULL))
jpayne@68 3241 static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
jpayne@68 3242 int wraparound, int boundscheck);
jpayne@68 3243 static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j);
jpayne@68 3244 static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i,
jpayne@68 3245 int is_list, int wraparound, int boundscheck);
jpayne@68 3246
jpayne@68 3247 /* GetAttr.proto */
jpayne@68 3248 static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *, PyObject *);
jpayne@68 3249
jpayne@68 3250 /* HasAttr.proto */
jpayne@68 3251 static CYTHON_INLINE int __Pyx_HasAttr(PyObject *, PyObject *);
jpayne@68 3252
jpayne@68 3253 /* CallNextTpDealloc.proto */
jpayne@68 3254 static void __Pyx_call_next_tp_dealloc(PyObject* obj, destructor current_tp_dealloc);
jpayne@68 3255
jpayne@68 3256 /* CallNextTpTraverse.proto */
jpayne@68 3257 static int __Pyx_call_next_tp_traverse(PyObject* obj, visitproc v, void *a, traverseproc current_tp_traverse);
jpayne@68 3258
jpayne@68 3259 /* CallNextTpClear.proto */
jpayne@68 3260 static void __Pyx_call_next_tp_clear(PyObject* obj, inquiry current_tp_clear);
jpayne@68 3261
jpayne@68 3262 /* IncludeStructmemberH.proto */
jpayne@68 3263 #include <structmember.h>
jpayne@68 3264
jpayne@68 3265 /* FixUpExtensionType.proto */
jpayne@68 3266 #if CYTHON_USE_TYPE_SPECS
jpayne@68 3267 static int __Pyx_fix_up_extension_type_from_spec(PyType_Spec *spec, PyTypeObject *type);
jpayne@68 3268 #endif
jpayne@68 3269
jpayne@68 3270 /* PyObjectGetMethod.proto */
jpayne@68 3271 static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method);
jpayne@68 3272
jpayne@68 3273 /* PyObjectCallMethod0.proto */
jpayne@68 3274 static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name);
jpayne@68 3275
jpayne@68 3276 /* ValidateBasesTuple.proto */
jpayne@68 3277 #if CYTHON_COMPILING_IN_CPYTHON || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_USE_TYPE_SPECS
jpayne@68 3278 static int __Pyx_validate_bases_tuple(const char *type_name, Py_ssize_t dictoffset, PyObject *bases);
jpayne@68 3279 #endif
jpayne@68 3280
jpayne@68 3281 /* PyType_Ready.proto */
jpayne@68 3282 CYTHON_UNUSED static int __Pyx_PyType_Ready(PyTypeObject *t);
jpayne@68 3283
jpayne@68 3284 /* PyObject_GenericGetAttrNoDict.proto */
jpayne@68 3285 #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
jpayne@68 3286 static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name);
jpayne@68 3287 #else
jpayne@68 3288 #define __Pyx_PyObject_GenericGetAttrNoDict PyObject_GenericGetAttr
jpayne@68 3289 #endif
jpayne@68 3290
jpayne@68 3291 /* PyObject_GenericGetAttr.proto */
jpayne@68 3292 #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
jpayne@68 3293 static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_name);
jpayne@68 3294 #else
jpayne@68 3295 #define __Pyx_PyObject_GenericGetAttr PyObject_GenericGetAttr
jpayne@68 3296 #endif
jpayne@68 3297
jpayne@68 3298 /* SetVTable.proto */
jpayne@68 3299 static int __Pyx_SetVtable(PyTypeObject* typeptr , void* vtable);
jpayne@68 3300
jpayne@68 3301 /* GetVTable.proto */
jpayne@68 3302 static void* __Pyx_GetVtable(PyTypeObject *type);
jpayne@68 3303
jpayne@68 3304 /* MergeVTables.proto */
jpayne@68 3305 #if !CYTHON_COMPILING_IN_LIMITED_API
jpayne@68 3306 static int __Pyx_MergeVtables(PyTypeObject *type);
jpayne@68 3307 #endif
jpayne@68 3308
jpayne@68 3309 /* SetupReduce.proto */
jpayne@68 3310 #if !CYTHON_COMPILING_IN_LIMITED_API
jpayne@68 3311 static int __Pyx_setup_reduce(PyObject* type_obj);
jpayne@68 3312 #endif
jpayne@68 3313
jpayne@68 3314 /* TypeImport.proto */
jpayne@68 3315 #ifndef __PYX_HAVE_RT_ImportType_proto_3_0_11
jpayne@68 3316 #define __PYX_HAVE_RT_ImportType_proto_3_0_11
jpayne@68 3317 #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 201112L
jpayne@68 3318 #include <stdalign.h>
jpayne@68 3319 #endif
jpayne@68 3320 #if (defined (__STDC_VERSION__) && __STDC_VERSION__ >= 201112L) || __cplusplus >= 201103L
jpayne@68 3321 #define __PYX_GET_STRUCT_ALIGNMENT_3_0_11(s) alignof(s)
jpayne@68 3322 #else
jpayne@68 3323 #define __PYX_GET_STRUCT_ALIGNMENT_3_0_11(s) sizeof(void*)
jpayne@68 3324 #endif
jpayne@68 3325 enum __Pyx_ImportType_CheckSize_3_0_11 {
jpayne@68 3326 __Pyx_ImportType_CheckSize_Error_3_0_11 = 0,
jpayne@68 3327 __Pyx_ImportType_CheckSize_Warn_3_0_11 = 1,
jpayne@68 3328 __Pyx_ImportType_CheckSize_Ignore_3_0_11 = 2
jpayne@68 3329 };
jpayne@68 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@68 3331 #endif
jpayne@68 3332
jpayne@68 3333 /* ImportDottedModule.proto */
jpayne@68 3334 static PyObject *__Pyx_ImportDottedModule(PyObject *name, PyObject *parts_tuple);
jpayne@68 3335 #if PY_MAJOR_VERSION >= 3
jpayne@68 3336 static PyObject *__Pyx_ImportDottedModule_WalkParts(PyObject *module, PyObject *name, PyObject *parts_tuple);
jpayne@68 3337 #endif
jpayne@68 3338
jpayne@68 3339 /* FetchSharedCythonModule.proto */
jpayne@68 3340 static PyObject *__Pyx_FetchSharedCythonABIModule(void);
jpayne@68 3341
jpayne@68 3342 /* FetchCommonType.proto */
jpayne@68 3343 #if !CYTHON_USE_TYPE_SPECS
jpayne@68 3344 static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type);
jpayne@68 3345 #else
jpayne@68 3346 static PyTypeObject* __Pyx_FetchCommonTypeFromSpec(PyObject *module, PyType_Spec *spec, PyObject *bases);
jpayne@68 3347 #endif
jpayne@68 3348
jpayne@68 3349 /* PyMethodNew.proto */
jpayne@68 3350 #if CYTHON_COMPILING_IN_LIMITED_API
jpayne@68 3351 static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ) {
jpayne@68 3352 PyObject *typesModule=NULL, *methodType=NULL, *result=NULL;
jpayne@68 3353 CYTHON_UNUSED_VAR(typ);
jpayne@68 3354 if (!self)
jpayne@68 3355 return __Pyx_NewRef(func);
jpayne@68 3356 typesModule = PyImport_ImportModule("types");
jpayne@68 3357 if (!typesModule) return NULL;
jpayne@68 3358 methodType = PyObject_GetAttrString(typesModule, "MethodType");
jpayne@68 3359 Py_DECREF(typesModule);
jpayne@68 3360 if (!methodType) return NULL;
jpayne@68 3361 result = PyObject_CallFunctionObjArgs(methodType, func, self, NULL);
jpayne@68 3362 Py_DECREF(methodType);
jpayne@68 3363 return result;
jpayne@68 3364 }
jpayne@68 3365 #elif PY_MAJOR_VERSION >= 3
jpayne@68 3366 static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ) {
jpayne@68 3367 CYTHON_UNUSED_VAR(typ);
jpayne@68 3368 if (!self)
jpayne@68 3369 return __Pyx_NewRef(func);
jpayne@68 3370 return PyMethod_New(func, self);
jpayne@68 3371 }
jpayne@68 3372 #else
jpayne@68 3373 #define __Pyx_PyMethod_New PyMethod_New
jpayne@68 3374 #endif
jpayne@68 3375
jpayne@68 3376 /* PyVectorcallFastCallDict.proto */
jpayne@68 3377 #if CYTHON_METH_FASTCALL
jpayne@68 3378 static CYTHON_INLINE PyObject *__Pyx_PyVectorcall_FastCallDict(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw);
jpayne@68 3379 #endif
jpayne@68 3380
jpayne@68 3381 /* CythonFunctionShared.proto */
jpayne@68 3382 #define __Pyx_CyFunction_USED
jpayne@68 3383 #define __Pyx_CYFUNCTION_STATICMETHOD 0x01
jpayne@68 3384 #define __Pyx_CYFUNCTION_CLASSMETHOD 0x02
jpayne@68 3385 #define __Pyx_CYFUNCTION_CCLASS 0x04
jpayne@68 3386 #define __Pyx_CYFUNCTION_COROUTINE 0x08
jpayne@68 3387 #define __Pyx_CyFunction_GetClosure(f)\
jpayne@68 3388 (((__pyx_CyFunctionObject *) (f))->func_closure)
jpayne@68 3389 #if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API
jpayne@68 3390 #define __Pyx_CyFunction_GetClassObj(f)\
jpayne@68 3391 (((__pyx_CyFunctionObject *) (f))->func_classobj)
jpayne@68 3392 #else
jpayne@68 3393 #define __Pyx_CyFunction_GetClassObj(f)\
jpayne@68 3394 ((PyObject*) ((PyCMethodObject *) (f))->mm_class)
jpayne@68 3395 #endif
jpayne@68 3396 #define __Pyx_CyFunction_SetClassObj(f, classobj)\
jpayne@68 3397 __Pyx__CyFunction_SetClassObj((__pyx_CyFunctionObject *) (f), (classobj))
jpayne@68 3398 #define __Pyx_CyFunction_Defaults(type, f)\
jpayne@68 3399 ((type *)(((__pyx_CyFunctionObject *) (f))->defaults))
jpayne@68 3400 #define __Pyx_CyFunction_SetDefaultsGetter(f, g)\
jpayne@68 3401 ((__pyx_CyFunctionObject *) (f))->defaults_getter = (g)
jpayne@68 3402 typedef struct {
jpayne@68 3403 #if CYTHON_COMPILING_IN_LIMITED_API
jpayne@68 3404 PyObject_HEAD
jpayne@68 3405 PyObject *func;
jpayne@68 3406 #elif PY_VERSION_HEX < 0x030900B1
jpayne@68 3407 PyCFunctionObject func;
jpayne@68 3408 #else
jpayne@68 3409 PyCMethodObject func;
jpayne@68 3410 #endif
jpayne@68 3411 #if CYTHON_BACKPORT_VECTORCALL
jpayne@68 3412 __pyx_vectorcallfunc func_vectorcall;
jpayne@68 3413 #endif
jpayne@68 3414 #if PY_VERSION_HEX < 0x030500A0 || CYTHON_COMPILING_IN_LIMITED_API
jpayne@68 3415 PyObject *func_weakreflist;
jpayne@68 3416 #endif
jpayne@68 3417 PyObject *func_dict;
jpayne@68 3418 PyObject *func_name;
jpayne@68 3419 PyObject *func_qualname;
jpayne@68 3420 PyObject *func_doc;
jpayne@68 3421 PyObject *func_globals;
jpayne@68 3422 PyObject *func_code;
jpayne@68 3423 PyObject *func_closure;
jpayne@68 3424 #if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API
jpayne@68 3425 PyObject *func_classobj;
jpayne@68 3426 #endif
jpayne@68 3427 void *defaults;
jpayne@68 3428 int defaults_pyobjects;
jpayne@68 3429 size_t defaults_size;
jpayne@68 3430 int flags;
jpayne@68 3431 PyObject *defaults_tuple;
jpayne@68 3432 PyObject *defaults_kwdict;
jpayne@68 3433 PyObject *(*defaults_getter)(PyObject *);
jpayne@68 3434 PyObject *func_annotations;
jpayne@68 3435 PyObject *func_is_coroutine;
jpayne@68 3436 } __pyx_CyFunctionObject;
jpayne@68 3437 #undef __Pyx_CyOrPyCFunction_Check
jpayne@68 3438 #define __Pyx_CyFunction_Check(obj) __Pyx_TypeCheck(obj, __pyx_CyFunctionType)
jpayne@68 3439 #define __Pyx_CyOrPyCFunction_Check(obj) __Pyx_TypeCheck2(obj, __pyx_CyFunctionType, &PyCFunction_Type)
jpayne@68 3440 #define __Pyx_CyFunction_CheckExact(obj) __Pyx_IS_TYPE(obj, __pyx_CyFunctionType)
jpayne@68 3441 static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void *cfunc);
jpayne@68 3442 #undef __Pyx_IsSameCFunction
jpayne@68 3443 #define __Pyx_IsSameCFunction(func, cfunc) __Pyx__IsSameCyOrCFunction(func, cfunc)
jpayne@68 3444 static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject* op, PyMethodDef *ml,
jpayne@68 3445 int flags, PyObject* qualname,
jpayne@68 3446 PyObject *closure,
jpayne@68 3447 PyObject *module, PyObject *globals,
jpayne@68 3448 PyObject* code);
jpayne@68 3449 static CYTHON_INLINE void __Pyx__CyFunction_SetClassObj(__pyx_CyFunctionObject* f, PyObject* classobj);
jpayne@68 3450 static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *m,
jpayne@68 3451 size_t size,
jpayne@68 3452 int pyobjects);
jpayne@68 3453 static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *m,
jpayne@68 3454 PyObject *tuple);
jpayne@68 3455 static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *m,
jpayne@68 3456 PyObject *dict);
jpayne@68 3457 static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *m,
jpayne@68 3458 PyObject *dict);
jpayne@68 3459 static int __pyx_CyFunction_init(PyObject *module);
jpayne@68 3460 #if CYTHON_METH_FASTCALL
jpayne@68 3461 static PyObject * __Pyx_CyFunction_Vectorcall_NOARGS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames);
jpayne@68 3462 static PyObject * __Pyx_CyFunction_Vectorcall_O(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames);
jpayne@68 3463 static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames);
jpayne@68 3464 static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames);
jpayne@68 3465 #if CYTHON_BACKPORT_VECTORCALL
jpayne@68 3466 #define __Pyx_CyFunction_func_vectorcall(f) (((__pyx_CyFunctionObject*)f)->func_vectorcall)
jpayne@68 3467 #else
jpayne@68 3468 #define __Pyx_CyFunction_func_vectorcall(f) (((PyCFunctionObject*)f)->vectorcall)
jpayne@68 3469 #endif
jpayne@68 3470 #endif
jpayne@68 3471
jpayne@68 3472 /* CythonFunction.proto */
jpayne@68 3473 static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml,
jpayne@68 3474 int flags, PyObject* qualname,
jpayne@68 3475 PyObject *closure,
jpayne@68 3476 PyObject *module, PyObject *globals,
jpayne@68 3477 PyObject* code);
jpayne@68 3478
jpayne@68 3479 /* SetNameInClass.proto */
jpayne@68 3480 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1 && PY_VERSION_HEX < 0x030d0000
jpayne@68 3481 #define __Pyx_SetNameInClass(ns, name, value)\
jpayne@68 3482 (likely(PyDict_CheckExact(ns)) ? _PyDict_SetItem_KnownHash(ns, name, value, ((PyASCIIObject *) name)->hash) : PyObject_SetItem(ns, name, value))
jpayne@68 3483 #elif CYTHON_COMPILING_IN_CPYTHON
jpayne@68 3484 #define __Pyx_SetNameInClass(ns, name, value)\
jpayne@68 3485 (likely(PyDict_CheckExact(ns)) ? PyDict_SetItem(ns, name, value) : PyObject_SetItem(ns, name, value))
jpayne@68 3486 #else
jpayne@68 3487 #define __Pyx_SetNameInClass(ns, name, value) PyObject_SetItem(ns, name, value)
jpayne@68 3488 #endif
jpayne@68 3489
jpayne@68 3490 /* CalculateMetaclass.proto */
jpayne@68 3491 static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases);
jpayne@68 3492
jpayne@68 3493 /* PyObjectCall2Args.proto */
jpayne@68 3494 static CYTHON_INLINE PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2);
jpayne@68 3495
jpayne@68 3496 /* PyObjectLookupSpecial.proto */
jpayne@68 3497 #if CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
jpayne@68 3498 #define __Pyx_PyObject_LookupSpecialNoError(obj, attr_name) __Pyx__PyObject_LookupSpecial(obj, attr_name, 0)
jpayne@68 3499 #define __Pyx_PyObject_LookupSpecial(obj, attr_name) __Pyx__PyObject_LookupSpecial(obj, attr_name, 1)
jpayne@68 3500 static CYTHON_INLINE PyObject* __Pyx__PyObject_LookupSpecial(PyObject* obj, PyObject* attr_name, int with_error);
jpayne@68 3501 #else
jpayne@68 3502 #define __Pyx_PyObject_LookupSpecialNoError(o,n) __Pyx_PyObject_GetAttrStrNoError(o,n)
jpayne@68 3503 #define __Pyx_PyObject_LookupSpecial(o,n) __Pyx_PyObject_GetAttrStr(o,n)
jpayne@68 3504 #endif
jpayne@68 3505
jpayne@68 3506 /* Py3ClassCreate.proto */
jpayne@68 3507 static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name, PyObject *qualname,
jpayne@68 3508 PyObject *mkw, PyObject *modname, PyObject *doc);
jpayne@68 3509 static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases, PyObject *dict,
jpayne@68 3510 PyObject *mkw, int calculate_metaclass, int allow_py2_metaclass);
jpayne@68 3511
jpayne@68 3512 /* CLineInTraceback.proto */
jpayne@68 3513 #ifdef CYTHON_CLINE_IN_TRACEBACK
jpayne@68 3514 #define __Pyx_CLineForTraceback(tstate, c_line) (((CYTHON_CLINE_IN_TRACEBACK)) ? c_line : 0)
jpayne@68 3515 #else
jpayne@68 3516 static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line);
jpayne@68 3517 #endif
jpayne@68 3518
jpayne@68 3519 /* CodeObjectCache.proto */
jpayne@68 3520 #if !CYTHON_COMPILING_IN_LIMITED_API
jpayne@68 3521 typedef struct {
jpayne@68 3522 PyCodeObject* code_object;
jpayne@68 3523 int code_line;
jpayne@68 3524 } __Pyx_CodeObjectCacheEntry;
jpayne@68 3525 struct __Pyx_CodeObjectCache {
jpayne@68 3526 int count;
jpayne@68 3527 int max_count;
jpayne@68 3528 __Pyx_CodeObjectCacheEntry* entries;
jpayne@68 3529 };
jpayne@68 3530 static struct __Pyx_CodeObjectCache __pyx_code_cache = {0,0,NULL};
jpayne@68 3531 static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line);
jpayne@68 3532 static PyCodeObject *__pyx_find_code_object(int code_line);
jpayne@68 3533 static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object);
jpayne@68 3534 #endif
jpayne@68 3535
jpayne@68 3536 /* AddTraceback.proto */
jpayne@68 3537 static void __Pyx_AddTraceback(const char *funcname, int c_line,
jpayne@68 3538 int py_line, const char *filename);
jpayne@68 3539
jpayne@68 3540 /* GCCDiagnostics.proto */
jpayne@68 3541 #if !defined(__INTEL_COMPILER) && defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6))
jpayne@68 3542 #define __Pyx_HAS_GCC_DIAGNOSTIC
jpayne@68 3543 #endif
jpayne@68 3544
jpayne@68 3545 /* ArrayAPI.proto */
jpayne@68 3546 #ifndef _ARRAYARRAY_H
jpayne@68 3547 #define _ARRAYARRAY_H
jpayne@68 3548 typedef struct arraydescr {
jpayne@68 3549 int typecode;
jpayne@68 3550 int itemsize;
jpayne@68 3551 PyObject * (*getitem)(struct arrayobject *, Py_ssize_t);
jpayne@68 3552 int (*setitem)(struct arrayobject *, Py_ssize_t, PyObject *);
jpayne@68 3553 #if PY_MAJOR_VERSION >= 3
jpayne@68 3554 char *formats;
jpayne@68 3555 #endif
jpayne@68 3556 } arraydescr;
jpayne@68 3557 struct arrayobject {
jpayne@68 3558 PyObject_HEAD
jpayne@68 3559 Py_ssize_t ob_size;
jpayne@68 3560 union {
jpayne@68 3561 char *ob_item;
jpayne@68 3562 float *as_floats;
jpayne@68 3563 double *as_doubles;
jpayne@68 3564 int *as_ints;
jpayne@68 3565 unsigned int *as_uints;
jpayne@68 3566 unsigned char *as_uchars;
jpayne@68 3567 signed char *as_schars;
jpayne@68 3568 char *as_chars;
jpayne@68 3569 unsigned long *as_ulongs;
jpayne@68 3570 long *as_longs;
jpayne@68 3571 #if PY_MAJOR_VERSION >= 3
jpayne@68 3572 unsigned long long *as_ulonglongs;
jpayne@68 3573 long long *as_longlongs;
jpayne@68 3574 #endif
jpayne@68 3575 short *as_shorts;
jpayne@68 3576 unsigned short *as_ushorts;
jpayne@68 3577 Py_UNICODE *as_pyunicodes;
jpayne@68 3578 void *as_voidptr;
jpayne@68 3579 } data;
jpayne@68 3580 Py_ssize_t allocated;
jpayne@68 3581 struct arraydescr *ob_descr;
jpayne@68 3582 PyObject *weakreflist;
jpayne@68 3583 #if PY_MAJOR_VERSION >= 3
jpayne@68 3584 int ob_exports;
jpayne@68 3585 #endif
jpayne@68 3586 };
jpayne@68 3587 #ifndef NO_NEWARRAY_INLINE
jpayne@68 3588 static CYTHON_INLINE PyObject * newarrayobject(PyTypeObject *type, Py_ssize_t size,
jpayne@68 3589 struct arraydescr *descr) {
jpayne@68 3590 arrayobject *op;
jpayne@68 3591 size_t nbytes;
jpayne@68 3592 if (size < 0) {
jpayne@68 3593 PyErr_BadInternalCall();
jpayne@68 3594 return NULL;
jpayne@68 3595 }
jpayne@68 3596 nbytes = size * descr->itemsize;
jpayne@68 3597 if (nbytes / descr->itemsize != (size_t)size) {
jpayne@68 3598 return PyErr_NoMemory();
jpayne@68 3599 }
jpayne@68 3600 op = (arrayobject *) type->tp_alloc(type, 0);
jpayne@68 3601 if (op == NULL) {
jpayne@68 3602 return NULL;
jpayne@68 3603 }
jpayne@68 3604 op->ob_descr = descr;
jpayne@68 3605 op->allocated = size;
jpayne@68 3606 op->weakreflist = NULL;
jpayne@68 3607 __Pyx_SET_SIZE(op, size);
jpayne@68 3608 if (size <= 0) {
jpayne@68 3609 op->data.ob_item = NULL;
jpayne@68 3610 }
jpayne@68 3611 else {
jpayne@68 3612 op->data.ob_item = PyMem_NEW(char, nbytes);
jpayne@68 3613 if (op->data.ob_item == NULL) {
jpayne@68 3614 Py_DECREF(op);
jpayne@68 3615 return PyErr_NoMemory();
jpayne@68 3616 }
jpayne@68 3617 }
jpayne@68 3618 return (PyObject *) op;
jpayne@68 3619 }
jpayne@68 3620 #else
jpayne@68 3621 PyObject* newarrayobject(PyTypeObject *type, Py_ssize_t size,
jpayne@68 3622 struct arraydescr *descr);
jpayne@68 3623 #endif
jpayne@68 3624 static CYTHON_INLINE int resize(arrayobject *self, Py_ssize_t n) {
jpayne@68 3625 void *items = (void*) self->data.ob_item;
jpayne@68 3626 PyMem_Resize(items, char, (size_t)(n * self->ob_descr->itemsize));
jpayne@68 3627 if (items == NULL) {
jpayne@68 3628 PyErr_NoMemory();
jpayne@68 3629 return -1;
jpayne@68 3630 }
jpayne@68 3631 self->data.ob_item = (char*) items;
jpayne@68 3632 __Pyx_SET_SIZE(self, n);
jpayne@68 3633 self->allocated = n;
jpayne@68 3634 return 0;
jpayne@68 3635 }
jpayne@68 3636 static CYTHON_INLINE int resize_smart(arrayobject *self, Py_ssize_t n) {
jpayne@68 3637 void *items = (void*) self->data.ob_item;
jpayne@68 3638 Py_ssize_t newsize;
jpayne@68 3639 if (n < self->allocated && n*4 > self->allocated) {
jpayne@68 3640 __Pyx_SET_SIZE(self, n);
jpayne@68 3641 return 0;
jpayne@68 3642 }
jpayne@68 3643 newsize = n + (n / 2) + 1;
jpayne@68 3644 if (newsize <= n) {
jpayne@68 3645 PyErr_NoMemory();
jpayne@68 3646 return -1;
jpayne@68 3647 }
jpayne@68 3648 PyMem_Resize(items, char, (size_t)(newsize * self->ob_descr->itemsize));
jpayne@68 3649 if (items == NULL) {
jpayne@68 3650 PyErr_NoMemory();
jpayne@68 3651 return -1;
jpayne@68 3652 }
jpayne@68 3653 self->data.ob_item = (char*) items;
jpayne@68 3654 __Pyx_SET_SIZE(self, n);
jpayne@68 3655 self->allocated = newsize;
jpayne@68 3656 return 0;
jpayne@68 3657 }
jpayne@68 3658 #endif
jpayne@68 3659
jpayne@68 3660 /* CIntFromPy.proto */
jpayne@68 3661 static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *);
jpayne@68 3662
jpayne@68 3663 /* CIntToPy.proto */
jpayne@68 3664 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value);
jpayne@68 3665
jpayne@68 3666 /* CIntFromPy.proto */
jpayne@68 3667 static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *);
jpayne@68 3668
jpayne@68 3669 /* CIntFromPy.proto */
jpayne@68 3670 static CYTHON_INLINE int64_t __Pyx_PyInt_As_int64_t(PyObject *);
jpayne@68 3671
jpayne@68 3672 /* CIntToPy.proto */
jpayne@68 3673 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int32_t(int32_t value);
jpayne@68 3674
jpayne@68 3675 /* CIntToPy.proto */
jpayne@68 3676 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value);
jpayne@68 3677
jpayne@68 3678 /* CIntFromPy.proto */
jpayne@68 3679 static CYTHON_INLINE int32_t __Pyx_PyInt_As_int32_t(PyObject *);
jpayne@68 3680
jpayne@68 3681 /* FormatTypeName.proto */
jpayne@68 3682 #if CYTHON_COMPILING_IN_LIMITED_API
jpayne@68 3683 typedef PyObject *__Pyx_TypeName;
jpayne@68 3684 #define __Pyx_FMT_TYPENAME "%U"
jpayne@68 3685 static __Pyx_TypeName __Pyx_PyType_GetName(PyTypeObject* tp);
jpayne@68 3686 #define __Pyx_DECREF_TypeName(obj) Py_XDECREF(obj)
jpayne@68 3687 #else
jpayne@68 3688 typedef const char *__Pyx_TypeName;
jpayne@68 3689 #define __Pyx_FMT_TYPENAME "%.200s"
jpayne@68 3690 #define __Pyx_PyType_GetName(tp) ((tp)->tp_name)
jpayne@68 3691 #define __Pyx_DECREF_TypeName(obj)
jpayne@68 3692 #endif
jpayne@68 3693
jpayne@68 3694 /* FastTypeChecks.proto */
jpayne@68 3695 #if CYTHON_COMPILING_IN_CPYTHON
jpayne@68 3696 #define __Pyx_TypeCheck(obj, type) __Pyx_IsSubtype(Py_TYPE(obj), (PyTypeObject *)type)
jpayne@68 3697 #define __Pyx_TypeCheck2(obj, type1, type2) __Pyx_IsAnySubtype2(Py_TYPE(obj), (PyTypeObject *)type1, (PyTypeObject *)type2)
jpayne@68 3698 static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b);
jpayne@68 3699 static CYTHON_INLINE int __Pyx_IsAnySubtype2(PyTypeObject *cls, PyTypeObject *a, PyTypeObject *b);
jpayne@68 3700 static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject *type);
jpayne@68 3701 static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2);
jpayne@68 3702 #else
jpayne@68 3703 #define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type)
jpayne@68 3704 #define __Pyx_TypeCheck2(obj, type1, type2) (PyObject_TypeCheck(obj, (PyTypeObject *)type1) || PyObject_TypeCheck(obj, (PyTypeObject *)type2))
jpayne@68 3705 #define __Pyx_PyErr_GivenExceptionMatches(err, type) PyErr_GivenExceptionMatches(err, type)
jpayne@68 3706 #define __Pyx_PyErr_GivenExceptionMatches2(err, type1, type2) (PyErr_GivenExceptionMatches(err, type1) || PyErr_GivenExceptionMatches(err, type2))
jpayne@68 3707 #endif
jpayne@68 3708 #define __Pyx_PyErr_ExceptionMatches2(err1, err2) __Pyx_PyErr_GivenExceptionMatches2(__Pyx_PyErr_CurrentExceptionType(), err1, err2)
jpayne@68 3709 #define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception)
jpayne@68 3710
jpayne@68 3711 /* CheckBinaryVersion.proto */
jpayne@68 3712 static unsigned long __Pyx_get_runtime_version(void);
jpayne@68 3713 static int __Pyx_check_binary_version(unsigned long ct_version, unsigned long rt_version, int allow_newer);
jpayne@68 3714
jpayne@68 3715 /* FunctionImport.proto */
jpayne@68 3716 static int __Pyx_ImportFunction_3_0_11(PyObject *module, const char *funcname, void (**f)(void), const char *sig);
jpayne@68 3717
jpayne@68 3718 /* InitStrings.proto */
jpayne@68 3719 static int __Pyx_InitStrings(__Pyx_StringTabEntry *t);
jpayne@68 3720
jpayne@68 3721 /* #### Code section: module_declarations ### */
jpayne@68 3722 static CYTHON_INLINE double __pyx_f_7cpython_7complex_7complex_4real_real(PyComplexObject *__pyx_v_self); /* proto*/
jpayne@68 3723 static CYTHON_INLINE double __pyx_f_7cpython_7complex_7complex_4imag_imag(PyComplexObject *__pyx_v_self); /* proto*/
jpayne@68 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@68 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@68 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@68 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@68 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@68 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@68 3730 static int __pyx_f_5pysam_9libctabix_13TabixIterator___cnext__(struct __pyx_obj_5pysam_9libctabix_TabixIterator *__pyx_v_self); /* proto*/
jpayne@68 3731 static int __pyx_f_5pysam_9libctabix_10GZIterator___cnext__(struct __pyx_obj_5pysam_9libctabix_GZIterator *__pyx_v_self); /* proto*/
jpayne@68 3732 static PyObject *__pyx_f_5pysam_9libctabix_19tabix_file_iterator___cnext__(struct __pyx_obj_5pysam_9libctabix_tabix_file_iterator *__pyx_v_self); /* proto*/
jpayne@68 3733
jpayne@68 3734 /* Module declarations from "libc.stdint" */
jpayne@68 3735
jpayne@68 3736 /* Module declarations from "libc.string" */
jpayne@68 3737
jpayne@68 3738 /* Module declarations from "libc.stdlib" */
jpayne@68 3739
jpayne@68 3740 /* Module declarations from "libc.stdio" */
jpayne@68 3741
jpayne@68 3742 /* Module declarations from "posix.types" */
jpayne@68 3743
jpayne@68 3744 /* Module declarations from "pysam.libchtslib" */
jpayne@68 3745
jpayne@68 3746 /* Module declarations from "libc.errno" */
jpayne@68 3747
jpayne@68 3748 /* Module declarations from "posix.unistd" */
jpayne@68 3749
jpayne@68 3750 /* Module declarations from "cpython.version" */
jpayne@68 3751
jpayne@68 3752 /* Module declarations from "__builtin__" */
jpayne@68 3753
jpayne@68 3754 /* Module declarations from "cpython.type" */
jpayne@68 3755
jpayne@68 3756 /* Module declarations from "cpython.object" */
jpayne@68 3757
jpayne@68 3758 /* Module declarations from "cpython.ref" */
jpayne@68 3759
jpayne@68 3760 /* Module declarations from "cpython.exc" */
jpayne@68 3761
jpayne@68 3762 /* Module declarations from "cpython.module" */
jpayne@68 3763
jpayne@68 3764 /* Module declarations from "cpython.mem" */
jpayne@68 3765
jpayne@68 3766 /* Module declarations from "cpython.tuple" */
jpayne@68 3767
jpayne@68 3768 /* Module declarations from "cpython.list" */
jpayne@68 3769
jpayne@68 3770 /* Module declarations from "cpython.sequence" */
jpayne@68 3771
jpayne@68 3772 /* Module declarations from "cpython.mapping" */
jpayne@68 3773
jpayne@68 3774 /* Module declarations from "cpython.iterator" */
jpayne@68 3775
jpayne@68 3776 /* Module declarations from "cpython.number" */
jpayne@68 3777
jpayne@68 3778 /* Module declarations from "cpython.int" */
jpayne@68 3779
jpayne@68 3780 /* Module declarations from "__builtin__" */
jpayne@68 3781
jpayne@68 3782 /* Module declarations from "cpython.bool" */
jpayne@68 3783
jpayne@68 3784 /* Module declarations from "cpython.long" */
jpayne@68 3785
jpayne@68 3786 /* Module declarations from "cpython.float" */
jpayne@68 3787
jpayne@68 3788 /* Module declarations from "__builtin__" */
jpayne@68 3789
jpayne@68 3790 /* Module declarations from "cpython.complex" */
jpayne@68 3791
jpayne@68 3792 /* Module declarations from "cpython.string" */
jpayne@68 3793
jpayne@68 3794 /* Module declarations from "libc.stddef" */
jpayne@68 3795
jpayne@68 3796 /* Module declarations from "cpython.unicode" */
jpayne@68 3797
jpayne@68 3798 /* Module declarations from "cpython.pyport" */
jpayne@68 3799
jpayne@68 3800 /* Module declarations from "cpython.dict" */
jpayne@68 3801
jpayne@68 3802 /* Module declarations from "cpython.instance" */
jpayne@68 3803
jpayne@68 3804 /* Module declarations from "cpython.function" */
jpayne@68 3805
jpayne@68 3806 /* Module declarations from "cpython.method" */
jpayne@68 3807
jpayne@68 3808 /* Module declarations from "cpython.weakref" */
jpayne@68 3809
jpayne@68 3810 /* Module declarations from "cpython.getargs" */
jpayne@68 3811
jpayne@68 3812 /* Module declarations from "cpython.pythread" */
jpayne@68 3813
jpayne@68 3814 /* Module declarations from "cpython.pystate" */
jpayne@68 3815
jpayne@68 3816 /* Module declarations from "cpython.cobject" */
jpayne@68 3817
jpayne@68 3818 /* Module declarations from "cpython.oldbuffer" */
jpayne@68 3819
jpayne@68 3820 /* Module declarations from "cpython.set" */
jpayne@68 3821
jpayne@68 3822 /* Module declarations from "cpython.buffer" */
jpayne@68 3823
jpayne@68 3824 /* Module declarations from "cpython.bytes" */
jpayne@68 3825
jpayne@68 3826 /* Module declarations from "cpython.pycapsule" */
jpayne@68 3827
jpayne@68 3828 /* Module declarations from "cpython.contextvars" */
jpayne@68 3829
jpayne@68 3830 /* Module declarations from "cpython" */
jpayne@68 3831
jpayne@68 3832 /* Module declarations from "pysam.libctabixproxies" */
jpayne@68 3833
jpayne@68 3834 /* Module declarations from "cython" */
jpayne@68 3835
jpayne@68 3836 /* Module declarations from "array" */
jpayne@68 3837
jpayne@68 3838 /* Module declarations from "cpython.array" */
jpayne@68 3839 static CYTHON_INLINE int __pyx_f_7cpython_5array_extend_buffer(arrayobject *, char *, Py_ssize_t); /*proto*/
jpayne@68 3840
jpayne@68 3841 /* Module declarations from "pysam.libcutils" */
jpayne@68 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@68 3843 static PyObject *(*__pyx_f_5pysam_9libcutils_force_str)(PyObject *, struct __pyx_opt_args_5pysam_9libcutils_force_str *__pyx_optional_args); /*proto*/
jpayne@68 3844 static PyObject *(*__pyx_f_5pysam_9libcutils_force_bytes)(PyObject *, struct __pyx_opt_args_5pysam_9libcutils_force_bytes *__pyx_optional_args); /*proto*/
jpayne@68 3845 static PyObject *(*__pyx_f_5pysam_9libcutils_encode_filename)(PyObject *); /*proto*/
jpayne@68 3846 static PyObject *(*__pyx_f_5pysam_9libcutils_from_string_and_size)(char const *, size_t); /*proto*/
jpayne@68 3847
jpayne@68 3848 /* Module declarations from "pysam.libctabix" */
jpayne@68 3849 static PyObject *__pyx_f_5pysam_9libctabix___pyx_unpickle_Parser__set_state(struct __pyx_obj_5pysam_9libctabix_Parser *, PyObject *); /*proto*/
jpayne@68 3850 static PyObject *__pyx_f_5pysam_9libctabix___pyx_unpickle_asTuple__set_state(struct __pyx_obj_5pysam_9libctabix_asTuple *, PyObject *); /*proto*/
jpayne@68 3851 static PyObject *__pyx_f_5pysam_9libctabix___pyx_unpickle_asGFF3__set_state(struct __pyx_obj_5pysam_9libctabix_asGFF3 *, PyObject *); /*proto*/
jpayne@68 3852 static PyObject *__pyx_f_5pysam_9libctabix___pyx_unpickle_asGTF__set_state(struct __pyx_obj_5pysam_9libctabix_asGTF *, PyObject *); /*proto*/
jpayne@68 3853 static PyObject *__pyx_f_5pysam_9libctabix___pyx_unpickle_asBed__set_state(struct __pyx_obj_5pysam_9libctabix_asBed *, PyObject *); /*proto*/
jpayne@68 3854 static PyObject *__pyx_f_5pysam_9libctabix___pyx_unpickle_asVCF__set_state(struct __pyx_obj_5pysam_9libctabix_asVCF *, PyObject *); /*proto*/
jpayne@68 3855 /* #### Code section: typeinfo ### */
jpayne@68 3856 /* #### Code section: before_global_var ### */
jpayne@68 3857 #define __Pyx_MODULE_NAME "pysam.libctabix"
jpayne@68 3858 extern int __pyx_module_is_main_pysam__libctabix;
jpayne@68 3859 int __pyx_module_is_main_pysam__libctabix = 0;
jpayne@68 3860
jpayne@68 3861 /* Implementation of "pysam.libctabix" */
jpayne@68 3862 /* #### Code section: global_var ### */
jpayne@68 3863 static PyObject *__pyx_builtin_NotImplementedError;
jpayne@68 3864 static PyObject *__pyx_builtin_ValueError;
jpayne@68 3865 static PyObject *__pyx_builtin_IOError;
jpayne@68 3866 static PyObject *__pyx_builtin_OSError;
jpayne@68 3867 static PyObject *__pyx_builtin_TypeError;
jpayne@68 3868 static PyObject *__pyx_builtin_StopIteration;
jpayne@68 3869 static PyObject *__pyx_builtin_super;
jpayne@68 3870 static PyObject *__pyx_builtin_KeyError;
jpayne@68 3871 static PyObject *__pyx_builtin_AssertionError;
jpayne@68 3872 static PyObject *__pyx_builtin_MemoryError;
jpayne@68 3873 /* #### Code section: string_decls ### */
jpayne@68 3874 static const char __pyx_k_a[] = "a";
jpayne@68 3875 static const char __pyx_k_b[] = "b";
jpayne@68 3876 static const char __pyx_k_c[] = "c";
jpayne@68 3877 static const char __pyx_k_r[] = "r";
jpayne@68 3878 static const char __pyx_k_s[] = "%s";
jpayne@68 3879 static const char __pyx_k_fn[] = "fn";
jpayne@68 3880 static const char __pyx_k_fp[] = "fp";
jpayne@68 3881 static const char __pyx_k_gc[] = "gc";
jpayne@68 3882 static const char __pyx_k_gz[] = ".gz";
jpayne@68 3883 static const char __pyx_k_os[] = "os";
jpayne@68 3884 static const char __pyx_k__16[] = "-";
jpayne@68 3885 static const char __pyx_k__39[] = "#";
jpayne@68 3886 static const char __pyx_k__42[] = "': ";
jpayne@68 3887 static const char __pyx_k__43[] = ",";
jpayne@68 3888 static const char __pyx_k__44[] = "'";
jpayne@68 3889 static const char __pyx_k__56[] = ".";
jpayne@68 3890 static const char __pyx_k__62[] = "*";
jpayne@68 3891 static const char __pyx_k__78[] = "?";
jpayne@68 3892 static const char __pyx_k_all[] = "__all__";
jpayne@68 3893 static const char __pyx_k_bcf[] = "bcf";
jpayne@68 3894 static const char __pyx_k_bed[] = "bed";
jpayne@68 3895 static const char __pyx_k_cfn[] = "cfn";
jpayne@68 3896 static const char __pyx_k_cpy[] = "cpy";
jpayne@68 3897 static const char __pyx_k_csi[] = "csi";
jpayne@68 3898 static const char __pyx_k_doc[] = "__doc__";
jpayne@68 3899 static const char __pyx_k_dup[] = "_dup";
jpayne@68 3900 static const char __pyx_k_end[] = "end";
jpayne@68 3901 static const char __pyx_k_fmt[] = "fmt";
jpayne@68 3902 static const char __pyx_k_gff[] = "gff";
jpayne@68 3903 static const char __pyx_k_itr[] = "itr";
jpayne@68 3904 static const char __pyx_k_new[] = "__new__";
jpayne@68 3905 static const char __pyx_k_s_2[] = "s";
jpayne@68 3906 static const char __pyx_k_s_i[] = "%s:%i";
jpayne@68 3907 static const char __pyx_k_sam[] = "sam";
jpayne@68 3908 static const char __pyx_k_sys[] = "sys";
jpayne@68 3909 static const char __pyx_k_tbi[] = ".tbi";
jpayne@68 3910 static const char __pyx_k_vcf[] = "vcf";
jpayne@68 3911 static const char __pyx_k_conf[] = "conf";
jpayne@68 3912 static const char __pyx_k_cstr[] = "cstr";
jpayne@68 3913 static const char __pyx_k_dict[] = "__dict__";
jpayne@68 3914 static const char __pyx_k_init[] = "__init__";
jpayne@68 3915 static const char __pyx_k_iter[] = "__iter__";
jpayne@68 3916 static const char __pyx_k_keys[] = "keys";
jpayne@68 3917 static const char __pyx_k_line[] = "line";
jpayne@68 3918 static const char __pyx_k_main[] = "__main__";
jpayne@68 3919 static const char __pyx_k_mode[] = "mode";
jpayne@68 3920 static const char __pyx_k_name[] = "__name__";
jpayne@68 3921 static const char __pyx_k_next[] = "__next__";
jpayne@68 3922 static const char __pyx_k_open[] = "_open";
jpayne@68 3923 static const char __pyx_k_path[] = "path";
jpayne@68 3924 static const char __pyx_k_self[] = "self";
jpayne@68 3925 static const char __pyx_k_spec[] = "__spec__";
jpayne@68 3926 static const char __pyx_k_tell[] = "tell";
jpayne@68 3927 static const char __pyx_k_test[] = "__test__";
jpayne@68 3928 static const char __pyx_k_asBed[] = "asBed";
jpayne@68 3929 static const char __pyx_k_asGTF[] = "asGTF";
jpayne@68 3930 static const char __pyx_k_asVCF[] = "asVCF";
jpayne@68 3931 static const char __pyx_k_ascii[] = "ascii";
jpayne@68 3932 static const char __pyx_k_close[] = "close";
jpayne@68 3933 static const char __pyx_k_csi_2[] = ".csi";
jpayne@68 3934 static const char __pyx_k_fetch[] = "fetch";
jpayne@68 3935 static const char __pyx_k_fnidx[] = "fnidx";
jpayne@68 3936 static const char __pyx_k_force[] = "force";
jpayne@68 3937 static const char __pyx_k_index[] = "index";
jpayne@68 3938 static const char __pyx_k_s_i_i[] = "%s:%i-%i";
jpayne@68 3939 static const char __pyx_k_start[] = "start";
jpayne@68 3940 static const char __pyx_k_state[] = "state";
jpayne@68 3941 static const char __pyx_k_super[] = "super";
jpayne@68 3942 static const char __pyx_k_Parser[] = "Parser";
jpayne@68 3943 static const char __pyx_k_asGFF3[] = "asGFF3";
jpayne@68 3944 static const char __pyx_k_buffer[] = "buffer";
jpayne@68 3945 static const char __pyx_k_closed[] = "closed";
jpayne@68 3946 static const char __pyx_k_dict_2[] = "_dict";
jpayne@68 3947 static const char __pyx_k_enable[] = "enable";
jpayne@68 3948 static const char __pyx_k_exists[] = "exists";
jpayne@68 3949 static const char __pyx_k_fd_src[] = "fd_src";
jpayne@68 3950 static const char __pyx_k_format[] = "format";
jpayne@68 3951 static const char __pyx_k_import[] = "__import__";
jpayne@68 3952 static const char __pyx_k_infile[] = "infile";
jpayne@68 3953 static const char __pyx_k_length[] = "length";
jpayne@68 3954 static const char __pyx_k_module[] = "__module__";
jpayne@68 3955 static const char __pyx_k_nbytes[] = "nbytes";
jpayne@68 3956 static const char __pyx_k_parser[] = "parser";
jpayne@68 3957 static const char __pyx_k_pickle[] = "pickle";
jpayne@68 3958 static const char __pyx_k_preset[] = "preset";
jpayne@68 3959 static const char __pyx_k_psltbl[] = "psltbl";
jpayne@68 3960 static const char __pyx_k_reduce[] = "__reduce__";
jpayne@68 3961 static const char __pyx_k_region[] = "region";
jpayne@68 3962 static const char __pyx_k_retval[] = "retval";
jpayne@68 3963 static const char __pyx_k_suffix[] = "suffix";
jpayne@68 3964 static const char __pyx_k_unlink[] = "unlink";
jpayne@68 3965 static const char __pyx_k_update[] = "update";
jpayne@68 3966 static const char __pyx_k_IOError[] = "IOError";
jpayne@68 3967 static const char __pyx_k_OSError[] = "OSError";
jpayne@68 3968 static const char __pyx_k_asTuple[] = "asTuple";
jpayne@68 3969 static const char __pyx_k_contigs[] = "contigs";
jpayne@68 3970 static const char __pyx_k_disable[] = "disable";
jpayne@68 3971 static const char __pyx_k_end_col[] = "end_col";
jpayne@68 3972 static const char __pyx_k_fileobj[] = "fileobj";
jpayne@68 3973 static const char __pyx_k_is_open[] = "is_open";
jpayne@68 3974 static const char __pyx_k_prepare[] = "__prepare__";
jpayne@68 3975 static const char __pyx_k_seq_col[] = "seq_col";
jpayne@68 3976 static const char __pyx_k_threads[] = "threads";
jpayne@68 3977 static const char __pyx_k_KeyError[] = "KeyError";
jpayne@68 3978 static const char __pyx_k_O_RDONLY[] = "O_RDONLY";
jpayne@68 3979 static const char __pyx_k_encoding[] = "encoding";
jpayne@68 3980 static const char __pyx_k_filename[] = "filename";
jpayne@68 3981 static const char __pyx_k_fn_index[] = "fn_index";
jpayne@68 3982 static const char __pyx_k_getstate[] = "__getstate__";
jpayne@68 3983 static const char __pyx_k_is_empty[] = "is_empty";
jpayne@68 3984 static const char __pyx_k_pyx_type[] = "__pyx_type";
jpayne@68 3985 static const char __pyx_k_qualname[] = "__qualname__";
jpayne@68 3986 static const char __pyx_k_readline[] = "readline";
jpayne@68 3987 static const char __pyx_k_set_name[] = "__set_name__";
jpayne@68 3988 static const char __pyx_k_setstate[] = "__setstate__";
jpayne@68 3989 static const char __pyx_k_TabixFile[] = "TabixFile";
jpayne@68 3990 static const char __pyx_k_Tabixfile[] = "Tabixfile";
jpayne@68 3991 static const char __pyx_k_TypeError[] = "TypeError";
jpayne@68 3992 static const char __pyx_k_bytes_cpy[] = "bytes_cpy";
jpayne@68 3993 static const char __pyx_k_cfilename[] = "cfilename";
jpayne@68 3994 static const char __pyx_k_conf_data[] = "conf_data";
jpayne@68 3995 static const char __pyx_k_isenabled[] = "isenabled";
jpayne@68 3996 static const char __pyx_k_line_skip[] = "line_skip";
jpayne@68 3997 static const char __pyx_k_meta_char[] = "meta_char";
jpayne@68 3998 static const char __pyx_k_metaclass[] = "__metaclass__";
jpayne@68 3999 static const char __pyx_k_min_shift[] = "min_shift";
jpayne@68 4000 static const char __pyx_k_pyx_state[] = "__pyx_state";
jpayne@68 4001 static const char __pyx_k_reduce_ex[] = "__reduce_ex__";
jpayne@68 4002 static const char __pyx_k_reference[] = "reference";
jpayne@68 4003 static const char __pyx_k_start_col[] = "start_col";
jpayne@68 4004 static const char __pyx_k_zerobased[] = "zerobased";
jpayne@68 4005 static const char __pyx_k_GZIterator[] = "GZIterator";
jpayne@68 4006 static const char __pyx_k_ValueError[] = "ValueError";
jpayne@68 4007 static const char __pyx_k_pyx_result[] = "__pyx_result";
jpayne@68 4008 static const char __pyx_k_pyx_vtable[] = "__pyx_vtable__";
jpayne@68 4009 static const char __pyx_k_MemoryError[] = "MemoryError";
jpayne@68 4010 static const char __pyx_k_PickleError[] = "PickleError";
jpayne@68 4011 static const char __pyx_k_WINDOW_SIZE[] = "WINDOW_SIZE";
jpayne@68 4012 static const char __pyx_k_buffer_size[] = "buffer_size";
jpayne@68 4013 static const char __pyx_k_filename_in[] = "filename_in";
jpayne@68 4014 static const char __pyx_k_preset2conf[] = "preset2conf";
jpayne@68 4015 static const char __pyx_k_tabix_index[] = "tabix_index";
jpayne@68 4016 static const char __pyx_k_filename_out[] = "filename_out";
jpayne@68 4017 static const char __pyx_k_get_encoding[] = "get_encoding";
jpayne@68 4018 static const char __pyx_k_initializing[] = "_initializing";
jpayne@68 4019 static const char __pyx_k_is_coroutine[] = "_is_coroutine";
jpayne@68 4020 static const char __pyx_k_pyx_checksum[] = "__pyx_checksum";
jpayne@68 4021 static const char __pyx_k_set_encoding[] = "set_encoding";
jpayne@68 4022 static const char __pyx_k_stringsource[] = "<stringsource>";
jpayne@68 4023 static const char __pyx_k_use_setstate[] = "use_setstate";
jpayne@68 4024 static const char __pyx_k_EmptyIterator[] = "EmptyIterator";
jpayne@68 4025 static const char __pyx_k_StopIteration[] = "StopIteration";
jpayne@68 4026 static const char __pyx_k_TabixIterator[] = "TabixIterator";
jpayne@68 4027 static const char __pyx_k_init_subclass[] = "__init_subclass__";
jpayne@68 4028 static const char __pyx_k_keep_original[] = "keep_original";
jpayne@68 4029 static const char __pyx_k_reduce_cython[] = "__reduce_cython__";
jpayne@68 4030 static const char __pyx_k_start_i_end_i[] = "start (%i) >= end (%i)";
jpayne@68 4031 static const char __pyx_k_AssertionError[] = "AssertionError";
jpayne@68 4032 static const char __pyx_k_GZIteratorHead[] = "GZIteratorHead";
jpayne@68 4033 static const char __pyx_k_TabixFile__dup[] = "TabixFile._dup";
jpayne@68 4034 static const char __pyx_k_empty_iterator[] = "empty iterator";
jpayne@68 4035 static const char __pyx_k_filename_index[] = "filename_index";
jpayne@68 4036 static const char __pyx_k_tabix_compress[] = "tabix_compress";
jpayne@68 4037 static const char __pyx_k_tabix_iterator[] = "tabix_iterator";
jpayne@68 4038 static const char __pyx_k_unknown_preset[] = "unknown preset '";
jpayne@68 4039 static const char __pyx_k_writing_failed[] = "writing failed";
jpayne@68 4040 static const char __pyx_k_TabixFile__open[] = "TabixFile._open";
jpayne@68 4041 static const char __pyx_k_TabixFile_close[] = "TabixFile.close";
jpayne@68 4042 static const char __pyx_k_TabixFile_fetch[] = "TabixFile.fetch";
jpayne@68 4043 static const char __pyx_k_cfilename_index[] = "cfilename_index";
jpayne@68 4044 static const char __pyx_k_pysam_libctabix[] = "pysam.libctabix";
jpayne@68 4045 static const char __pyx_k_pyx_PickleError[] = "__pyx_PickleError";
jpayne@68 4046 static const char __pyx_k_setstate_cython[] = "__setstate_cython__";
jpayne@68 4047 static const char __pyx_k_GZIteratorParsed[] = "GZIteratorParsed";
jpayne@68 4048 static const char __pyx_k_file_s_not_found[] = "file `%s` not found";
jpayne@68 4049 static const char __pyx_k_index_s_not_found[] = "index `%s` not found";
jpayne@68 4050 static const char __pyx_k_valid_presets_are[] = "', valid presets are '";
jpayne@68 4051 static const char __pyx_k_asyncio_coroutines[] = "asyncio.coroutines";
jpayne@68 4052 static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback";
jpayne@68 4053 static const char __pyx_k_end_out_of_range_i[] = "end out of range (%i)";
jpayne@68 4054 static const char __pyx_k_multiple_iterators[] = "multiple_iterators";
jpayne@68 4055 static const char __pyx_k_pyx_unpickle_asBed[] = "__pyx_unpickle_asBed";
jpayne@68 4056 static const char __pyx_k_pyx_unpickle_asGTF[] = "__pyx_unpickle_asGTF";
jpayne@68 4057 static const char __pyx_k_pyx_unpickle_asVCF[] = "__pyx_unpickle_asVCF";
jpayne@68 4058 static const char __pyx_k_Could_not_open_file[] = "Could not open file '";
jpayne@68 4059 static const char __pyx_k_NotImplementedError[] = "NotImplementedError";
jpayne@68 4060 static const char __pyx_k_Parser_get_encoding[] = "Parser.get_encoding";
jpayne@68 4061 static const char __pyx_k_Parser_set_encoding[] = "Parser.set_encoding";
jpayne@68 4062 static const char __pyx_k_TabixIteratorParsed[] = "TabixIteratorParsed";
jpayne@68 4063 static const char __pyx_k_pysam_libctabix_pyx[] = "pysam/libctabix.pyx";
jpayne@68 4064 static const char __pyx_k_pyx_unpickle_Parser[] = "__pyx_unpickle_Parser";
jpayne@68 4065 static const char __pyx_k_pyx_unpickle_asGFF3[] = "__pyx_unpickle_asGFF3";
jpayne@68 4066 static const char __pyx_k_tabix_file_iterator[] = "tabix_file_iterator";
jpayne@68 4067 static const char __pyx_k_EmptyIterator___iter[] = "EmptyIterator.__iter__";
jpayne@68 4068 static const char __pyx_k_EmptyIterator___next[] = "EmptyIterator.__next__";
jpayne@68 4069 static const char __pyx_k_incomplete_line_at_s[] = "incomplete line at %s";
jpayne@68 4070 static const char __pyx_k_pyx_unpickle_asTuple[] = "__pyx_unpickle_asTuple";
jpayne@68 4071 static const char __pyx_k_start_out_of_range_i[] = "start out of range (%i)";
jpayne@68 4072 static const char __pyx_k_asBed___reduce_cython[] = "asBed.__reduce_cython__";
jpayne@68 4073 static const char __pyx_k_asGTF___reduce_cython[] = "asGTF.__reduce_cython__";
jpayne@68 4074 static const char __pyx_k_asVCF___reduce_cython[] = "asVCF.__reduce_cython__";
jpayne@68 4075 static const char __pyx_k_could_not_open_file_s[] = "could not open file `%s`";
jpayne@68 4076 static const char __pyx_k_Parser___reduce_cython[] = "Parser.__reduce_cython__";
jpayne@68 4077 static const char __pyx_k_asGFF3___reduce_cython[] = "asGFF3.__reduce_cython__";
jpayne@68 4078 static const char __pyx_k_tabix_generic_iterator[] = "tabix_generic_iterator";
jpayne@68 4079 static const char __pyx_k_asBed___setstate_cython[] = "asBed.__setstate_cython__";
jpayne@68 4080 static const char __pyx_k_asGTF___setstate_cython[] = "asGTF.__setstate_cython__";
jpayne@68 4081 static const char __pyx_k_asTuple___reduce_cython[] = "asTuple.__reduce_cython__";
jpayne@68 4082 static const char __pyx_k_asVCF___setstate_cython[] = "asVCF.__setstate_cython__";
jpayne@68 4083 static const char __pyx_k_Parser___setstate_cython[] = "Parser.__setstate_cython__";
jpayne@68 4084 static const char __pyx_k_asGFF3___setstate_cython[] = "asGFF3.__setstate_cython__";
jpayne@68 4085 static const char __pyx_k_iteration_on_closed_file[] = "iteration on closed file";
jpayne@68 4086 static const char __pyx_k_TabixFile___reduce_cython[] = "TabixFile.__reduce_cython__";
jpayne@68 4087 static const char __pyx_k_Tabixfile___reduce_cython[] = "Tabixfile.__reduce_cython__";
jpayne@68 4088 static const char __pyx_k_asTuple___setstate_cython[] = "asTuple.__setstate_cython__";
jpayne@68 4089 static const char __pyx_k_GZIterator___reduce_cython[] = "GZIterator.__reduce_cython__";
jpayne@68 4090 static const char __pyx_k_could_not_open_index_for_s[] = "could not open index for `%s`";
jpayne@68 4091 static const char __pyx_k_No_such_file_or_directory_s[] = "No such file or directory: %s";
jpayne@68 4092 static const char __pyx_k_TabixFile___setstate_cython[] = "TabixFile.__setstate_cython__";
jpayne@68 4093 static const char __pyx_k_Tabixfile___setstate_cython[] = "Tabixfile.__setstate_cython__";
jpayne@68 4094 static const char __pyx_k_error_i_when_closing_file_s[] = "error %i when closing file %s";
jpayne@68 4095 static const char __pyx_k_invalid_file_opening_mode_s[] = "invalid file opening mode `%s`";
jpayne@68 4096 static const char __pyx_k_GZIterator___setstate_cython[] = "GZIterator.__setstate_cython__";
jpayne@68 4097 static const char __pyx_k_I_O_operation_on_closed_file[] = "I/O operation on closed file";
jpayne@68 4098 static const char __pyx_k_building_of_index_for_failed[] = "building of index for {} failed";
jpayne@68 4099 static const char __pyx_k_could_not_open_s_for_reading[] = "could not open '%s' for reading";
jpayne@68 4100 static const char __pyx_k_could_not_open_s_for_writing[] = "could not open '%s' for writing";
jpayne@68 4101 static const char __pyx_k_TabixIterator___reduce_cython[] = "TabixIterator.__reduce_cython__";
jpayne@68 4102 static const char __pyx_k_tabix_generic_iterator___init[] = "tabix_generic_iterator.__init__";
jpayne@68 4103 static const char __pyx_k_tabix_generic_iterator___iter[] = "tabix_generic_iterator.__iter__";
jpayne@68 4104 static const char __pyx_k_tabix_generic_iterator___next[] = "tabix_generic_iterator.__next__";
jpayne@68 4105 static const char __pyx_k_GZIteratorHead___reduce_cython[] = "GZIteratorHead.__reduce_cython__";
jpayne@68 4106 static const char __pyx_k_I_O_operation_on_closed_file_2[] = "I/O operation on closed file.";
jpayne@68 4107 static const char __pyx_k_error_i_when_writing_to_file_s[] = "error %i when writing to file %s";
jpayne@68 4108 static const char __pyx_k_TabixIterator___setstate_cython[] = "TabixIterator.__setstate_cython__";
jpayne@68 4109 static const char __pyx_k_could_not_load_tbi_csi_index_of[] = "could not load .tbi/.csi index of {}";
jpayne@68 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@68 4111 static const char __pyx_k_Filename_s_already_exists_use_fo[] = "Filename '%s' already exists, use *force* to overwrite";
jpayne@68 4112 static const char __pyx_k_GZIteratorHead___setstate_cython[] = "GZIteratorHead.__setstate_cython__";
jpayne@68 4113 static const char __pyx_k_GZIteratorParsed___reduce_cython[] = "GZIteratorParsed.__reduce_cython__";
jpayne@68 4114 static const char __pyx_k_GZIteratorParsed___setstate_cyth[] = "GZIteratorParsed.__setstate_cython__";
jpayne@68 4115 static const char __pyx_k_Incompatible_checksums_0x_x_vs_0[] = "Incompatible checksums (0x%x vs (0xe8424ea, 0x14a9dc0, 0x84bea1f) = (encoding))";
jpayne@68 4116 static const char __pyx_k_TabixIteratorParsed___reduce_cyt[] = "TabixIteratorParsed.__reduce_cython__";
jpayne@68 4117 static const char __pyx_k_TabixIteratorParsed___setstate_c[] = "TabixIteratorParsed.__setstate_cython__";
jpayne@68 4118 static const char __pyx_k_could_not_create_iterator_for_re[] = "could not create iterator for region '%s'";
jpayne@68 4119 static const char __pyx_k_could_not_create_iterator_possib[] = "could not create iterator, possible tabix version mismatch";
jpayne@68 4120 static const char __pyx_k_could_not_open_for_reading_heade[] = "could not open {} for reading header";
jpayne@68 4121 static const char __pyx_k_filename_s_already_exists_use_fo[] = "filename '%s' already exists, use *force* to overwrite";
jpayne@68 4122 static const char __pyx_k_neither_preset_nor_seq_col_start[] = "neither preset nor seq_col,start_col and end_col given";
jpayne@68 4123 static const char __pyx_k_no_default___reduce___due_to_non[] = "no default __reduce__ due to non-trivial __cinit__";
jpayne@68 4124 static const char __pyx_k_parse_method_of_s_not_implemente[] = "parse method of %s not implemented";
jpayne@68 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@68 4126 static const char __pyx_k_self_iterator_cannot_be_converte[] = "self.iterator cannot be converted to a Python object for pickling";
jpayne@68 4127 static const char __pyx_k_tabix_file_iterator___reduce_cyt[] = "tabix_file_iterator.__reduce_cython__";
jpayne@68 4128 static const char __pyx_k_tabix_file_iterator___setstate_c[] = "tabix_file_iterator.__setstate_cython__";
jpayne@68 4129 /* #### Code section: decls ### */
jpayne@68 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@68 4131 static void __pyx_pf_7cpython_5array_5array_2__releasebuffer__(CYTHON_UNUSED arrayobject *__pyx_v_self, Py_buffer *__pyx_v_info); /* proto */
jpayne@68 4132 static int __pyx_pf_5pysam_9libctabix_6Parser___init__(struct __pyx_obj_5pysam_9libctabix_Parser *__pyx_v_self, PyObject *__pyx_v_encoding); /* proto */
jpayne@68 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@68 4134 static PyObject *__pyx_pf_5pysam_9libctabix_6Parser_4get_encoding(struct __pyx_obj_5pysam_9libctabix_Parser *__pyx_v_self); /* proto */
jpayne@68 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@68 4136 static PyObject *__pyx_pf_5pysam_9libctabix_6Parser_8__reduce_cython__(struct __pyx_obj_5pysam_9libctabix_Parser *__pyx_v_self); /* proto */
jpayne@68 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@68 4138 static PyObject *__pyx_pf_5pysam_9libctabix_7asTuple___reduce_cython__(struct __pyx_obj_5pysam_9libctabix_asTuple *__pyx_v_self); /* proto */
jpayne@68 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@68 4140 static PyObject *__pyx_pf_5pysam_9libctabix_6asGFF3___reduce_cython__(struct __pyx_obj_5pysam_9libctabix_asGFF3 *__pyx_v_self); /* proto */
jpayne@68 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@68 4142 static PyObject *__pyx_pf_5pysam_9libctabix_5asGTF___reduce_cython__(struct __pyx_obj_5pysam_9libctabix_asGTF *__pyx_v_self); /* proto */
jpayne@68 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@68 4144 static PyObject *__pyx_pf_5pysam_9libctabix_5asBed___reduce_cython__(struct __pyx_obj_5pysam_9libctabix_asBed *__pyx_v_self); /* proto */
jpayne@68 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@68 4146 static PyObject *__pyx_pf_5pysam_9libctabix_5asVCF___reduce_cython__(struct __pyx_obj_5pysam_9libctabix_asVCF *__pyx_v_self); /* proto */
jpayne@68 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@68 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@68 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@68 4150 static PyObject *__pyx_pf_5pysam_9libctabix_9TabixFile_4_dup(struct __pyx_obj_5pysam_9libctabix_TabixFile *__pyx_v_self); /* proto */
jpayne@68 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@68 4152 static PyObject *__pyx_pf_5pysam_9libctabix_9TabixFile_6header___get__(struct __pyx_obj_5pysam_9libctabix_TabixFile *__pyx_v_self); /* proto */
jpayne@68 4153 static PyObject *__pyx_pf_5pysam_9libctabix_9TabixFile_7contigs___get__(struct __pyx_obj_5pysam_9libctabix_TabixFile *__pyx_v_self); /* proto */
jpayne@68 4154 static PyObject *__pyx_pf_5pysam_9libctabix_9TabixFile_8close(struct __pyx_obj_5pysam_9libctabix_TabixFile *__pyx_v_self); /* proto */
jpayne@68 4155 static void __pyx_pf_5pysam_9libctabix_9TabixFile_10__dealloc__(struct __pyx_obj_5pysam_9libctabix_TabixFile *__pyx_v_self); /* proto */
jpayne@68 4156 static PyObject *__pyx_pf_5pysam_9libctabix_9TabixFile_14filename_index___get__(struct __pyx_obj_5pysam_9libctabix_TabixFile *__pyx_v_self); /* proto */
jpayne@68 4157 static PyObject *__pyx_pf_5pysam_9libctabix_9TabixFile_12__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5pysam_9libctabix_TabixFile *__pyx_v_self); /* proto */
jpayne@68 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@68 4159 static int __pyx_pf_5pysam_9libctabix_13TabixIterator___init__(struct __pyx_obj_5pysam_9libctabix_TabixIterator *__pyx_v_self, PyObject *__pyx_v_encoding); /* proto */
jpayne@68 4160 static PyObject *__pyx_pf_5pysam_9libctabix_13TabixIterator_2__iter__(struct __pyx_obj_5pysam_9libctabix_TabixIterator *__pyx_v_self); /* proto */
jpayne@68 4161 static PyObject *__pyx_pf_5pysam_9libctabix_13TabixIterator_4__next__(struct __pyx_obj_5pysam_9libctabix_TabixIterator *__pyx_v_self); /* proto */
jpayne@68 4162 static void __pyx_pf_5pysam_9libctabix_13TabixIterator_6__dealloc__(struct __pyx_obj_5pysam_9libctabix_TabixIterator *__pyx_v_self); /* proto */
jpayne@68 4163 static PyObject *__pyx_pf_5pysam_9libctabix_13TabixIterator_8__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5pysam_9libctabix_TabixIterator *__pyx_v_self); /* proto */
jpayne@68 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@68 4165 static PyObject *__pyx_pf_5pysam_9libctabix_13EmptyIterator___iter__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
jpayne@68 4166 static PyObject *__pyx_pf_5pysam_9libctabix_13EmptyIterator_2__next__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self); /* proto */
jpayne@68 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@68 4168 static PyObject *__pyx_pf_5pysam_9libctabix_19TabixIteratorParsed_2__next__(struct __pyx_obj_5pysam_9libctabix_TabixIteratorParsed *__pyx_v_self); /* proto */
jpayne@68 4169 static PyObject *__pyx_pf_5pysam_9libctabix_19TabixIteratorParsed_4__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5pysam_9libctabix_TabixIteratorParsed *__pyx_v_self); /* proto */
jpayne@68 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@68 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@68 4172 static void __pyx_pf_5pysam_9libctabix_10GZIterator_2__dealloc__(struct __pyx_obj_5pysam_9libctabix_GZIterator *__pyx_v_self); /* proto */
jpayne@68 4173 static PyObject *__pyx_pf_5pysam_9libctabix_10GZIterator_4__iter__(struct __pyx_obj_5pysam_9libctabix_GZIterator *__pyx_v_self); /* proto */
jpayne@68 4174 static PyObject *__pyx_pf_5pysam_9libctabix_10GZIterator_6__next__(struct __pyx_obj_5pysam_9libctabix_GZIterator *__pyx_v_self); /* proto */
jpayne@68 4175 static PyObject *__pyx_pf_5pysam_9libctabix_10GZIterator_8__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5pysam_9libctabix_GZIterator *__pyx_v_self); /* proto */
jpayne@68 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@68 4177 static PyObject *__pyx_pf_5pysam_9libctabix_14GZIteratorHead___next__(struct __pyx_obj_5pysam_9libctabix_GZIteratorHead *__pyx_v_self); /* proto */
jpayne@68 4178 static PyObject *__pyx_pf_5pysam_9libctabix_14GZIteratorHead_2__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5pysam_9libctabix_GZIteratorHead *__pyx_v_self); /* proto */
jpayne@68 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@68 4180 static int __pyx_pf_5pysam_9libctabix_16GZIteratorParsed___init__(struct __pyx_obj_5pysam_9libctabix_GZIteratorParsed *__pyx_v_self, PyObject *__pyx_v_parser); /* proto */
jpayne@68 4181 static PyObject *__pyx_pf_5pysam_9libctabix_16GZIteratorParsed_2__next__(struct __pyx_obj_5pysam_9libctabix_GZIteratorParsed *__pyx_v_self); /* proto */
jpayne@68 4182 static PyObject *__pyx_pf_5pysam_9libctabix_16GZIteratorParsed_4__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5pysam_9libctabix_GZIteratorParsed *__pyx_v_self); /* proto */
jpayne@68 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@68 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@68 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@68 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@68 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@68 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@68 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@68 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@68 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@68 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@68 4193 static PyObject *__pyx_pf_5pysam_9libctabix_22tabix_generic_iterator_2__iter__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
jpayne@68 4194 static PyObject *__pyx_pf_5pysam_9libctabix_22tabix_generic_iterator_4__next__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self); /* proto */
jpayne@68 4195 static PyObject *__pyx_pf_5pysam_9libctabix_4tabix_iterator(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_infile, PyObject *__pyx_v_parser); /* proto */
jpayne@68 4196 static PyObject *__pyx_pf_5pysam_9libctabix_9Tabixfile___reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5pysam_9libctabix_Tabixfile *__pyx_v_self); /* proto */
jpayne@68 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@68 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@68 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@68 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@68 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@68 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@68 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@68 4204 static PyObject *__pyx_tp_new_5pysam_9libctabix_tabix_file_iterator(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
jpayne@68 4205 static PyObject *__pyx_tp_new_5pysam_9libctabix_TabixFile(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
jpayne@68 4206 static PyObject *__pyx_tp_new_5pysam_9libctabix_Parser(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
jpayne@68 4207 static PyObject *__pyx_tp_new_5pysam_9libctabix_asTuple(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
jpayne@68 4208 static PyObject *__pyx_tp_new_5pysam_9libctabix_asGTF(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
jpayne@68 4209 static PyObject *__pyx_tp_new_5pysam_9libctabix_asGFF3(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
jpayne@68 4210 static PyObject *__pyx_tp_new_5pysam_9libctabix_asBed(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
jpayne@68 4211 static PyObject *__pyx_tp_new_5pysam_9libctabix_asVCF(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
jpayne@68 4212 static PyObject *__pyx_tp_new_5pysam_9libctabix_TabixIterator(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
jpayne@68 4213 static PyObject *__pyx_tp_new_5pysam_9libctabix_TabixIteratorParsed(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
jpayne@68 4214 static PyObject *__pyx_tp_new_5pysam_9libctabix_GZIterator(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
jpayne@68 4215 static PyObject *__pyx_tp_new_5pysam_9libctabix_GZIteratorHead(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
jpayne@68 4216 static PyObject *__pyx_tp_new_5pysam_9libctabix_GZIteratorParsed(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
jpayne@68 4217 static PyObject *__pyx_tp_new_5pysam_9libctabix_Tabixfile(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
jpayne@68 4218 static __Pyx_CachedCFunction __pyx_umethod_PyDict_Type_keys = {0, 0, 0, 0, 0};
jpayne@68 4219 /* #### Code section: late_includes ### */
jpayne@68 4220 /* #### Code section: module_state ### */
jpayne@68 4221 typedef struct {
jpayne@68 4222 PyObject *__pyx_d;
jpayne@68 4223 PyObject *__pyx_b;
jpayne@68 4224 PyObject *__pyx_cython_runtime;
jpayne@68 4225 PyObject *__pyx_empty_tuple;
jpayne@68 4226 PyObject *__pyx_empty_bytes;
jpayne@68 4227 PyObject *__pyx_empty_unicode;
jpayne@68 4228 #ifdef __Pyx_CyFunction_USED
jpayne@68 4229 PyTypeObject *__pyx_CyFunctionType;
jpayne@68 4230 #endif
jpayne@68 4231 #ifdef __Pyx_FusedFunction_USED
jpayne@68 4232 PyTypeObject *__pyx_FusedFunctionType;
jpayne@68 4233 #endif
jpayne@68 4234 #ifdef __Pyx_Generator_USED
jpayne@68 4235 PyTypeObject *__pyx_GeneratorType;
jpayne@68 4236 #endif
jpayne@68 4237 #ifdef __Pyx_IterableCoroutine_USED
jpayne@68 4238 PyTypeObject *__pyx_IterableCoroutineType;
jpayne@68 4239 #endif
jpayne@68 4240 #ifdef __Pyx_Coroutine_USED
jpayne@68 4241 PyTypeObject *__pyx_CoroutineAwaitType;
jpayne@68 4242 #endif
jpayne@68 4243 #ifdef __Pyx_Coroutine_USED
jpayne@68 4244 PyTypeObject *__pyx_CoroutineType;
jpayne@68 4245 #endif
jpayne@68 4246 #if CYTHON_USE_MODULE_STATE
jpayne@68 4247 #endif
jpayne@68 4248 #if CYTHON_USE_MODULE_STATE
jpayne@68 4249 #endif
jpayne@68 4250 #if CYTHON_USE_MODULE_STATE
jpayne@68 4251 #endif
jpayne@68 4252 #if CYTHON_USE_MODULE_STATE
jpayne@68 4253 #endif
jpayne@68 4254 #if CYTHON_USE_MODULE_STATE
jpayne@68 4255 #endif
jpayne@68 4256 #if CYTHON_USE_MODULE_STATE
jpayne@68 4257 #endif
jpayne@68 4258 PyTypeObject *__pyx_ptype_5pysam_10libchtslib_HTSFile;
jpayne@68 4259 #if CYTHON_USE_MODULE_STATE
jpayne@68 4260 #endif
jpayne@68 4261 #if CYTHON_USE_MODULE_STATE
jpayne@68 4262 #endif
jpayne@68 4263 #if CYTHON_USE_MODULE_STATE
jpayne@68 4264 #endif
jpayne@68 4265 #if CYTHON_USE_MODULE_STATE
jpayne@68 4266 #endif
jpayne@68 4267 #if CYTHON_USE_MODULE_STATE
jpayne@68 4268 #endif
jpayne@68 4269 PyTypeObject *__pyx_ptype_7cpython_4type_type;
jpayne@68 4270 #if CYTHON_USE_MODULE_STATE
jpayne@68 4271 #endif
jpayne@68 4272 #if CYTHON_USE_MODULE_STATE
jpayne@68 4273 #endif
jpayne@68 4274 #if CYTHON_USE_MODULE_STATE
jpayne@68 4275 #endif
jpayne@68 4276 #if CYTHON_USE_MODULE_STATE
jpayne@68 4277 #endif
jpayne@68 4278 #if CYTHON_USE_MODULE_STATE
jpayne@68 4279 #endif
jpayne@68 4280 #if CYTHON_USE_MODULE_STATE
jpayne@68 4281 #endif
jpayne@68 4282 #if CYTHON_USE_MODULE_STATE
jpayne@68 4283 #endif
jpayne@68 4284 #if CYTHON_USE_MODULE_STATE
jpayne@68 4285 #endif
jpayne@68 4286 #if CYTHON_USE_MODULE_STATE
jpayne@68 4287 #endif
jpayne@68 4288 #if CYTHON_USE_MODULE_STATE
jpayne@68 4289 #endif
jpayne@68 4290 #if CYTHON_USE_MODULE_STATE
jpayne@68 4291 #endif
jpayne@68 4292 #if CYTHON_USE_MODULE_STATE
jpayne@68 4293 #endif
jpayne@68 4294 #if CYTHON_USE_MODULE_STATE
jpayne@68 4295 #endif
jpayne@68 4296 #if CYTHON_USE_MODULE_STATE
jpayne@68 4297 #endif
jpayne@68 4298 PyTypeObject *__pyx_ptype_7cpython_4bool_bool;
jpayne@68 4299 #if CYTHON_USE_MODULE_STATE
jpayne@68 4300 #endif
jpayne@68 4301 #if CYTHON_USE_MODULE_STATE
jpayne@68 4302 #endif
jpayne@68 4303 #if CYTHON_USE_MODULE_STATE
jpayne@68 4304 #endif
jpayne@68 4305 #if CYTHON_USE_MODULE_STATE
jpayne@68 4306 #endif
jpayne@68 4307 PyTypeObject *__pyx_ptype_7cpython_7complex_complex;
jpayne@68 4308 #if CYTHON_USE_MODULE_STATE
jpayne@68 4309 #endif
jpayne@68 4310 #if CYTHON_USE_MODULE_STATE
jpayne@68 4311 #endif
jpayne@68 4312 #if CYTHON_USE_MODULE_STATE
jpayne@68 4313 #endif
jpayne@68 4314 #if CYTHON_USE_MODULE_STATE
jpayne@68 4315 #endif
jpayne@68 4316 #if CYTHON_USE_MODULE_STATE
jpayne@68 4317 #endif
jpayne@68 4318 #if CYTHON_USE_MODULE_STATE
jpayne@68 4319 #endif
jpayne@68 4320 #if CYTHON_USE_MODULE_STATE
jpayne@68 4321 #endif
jpayne@68 4322 #if CYTHON_USE_MODULE_STATE
jpayne@68 4323 #endif
jpayne@68 4324 #if CYTHON_USE_MODULE_STATE
jpayne@68 4325 #endif
jpayne@68 4326 #if CYTHON_USE_MODULE_STATE
jpayne@68 4327 #endif
jpayne@68 4328 #if CYTHON_USE_MODULE_STATE
jpayne@68 4329 #endif
jpayne@68 4330 #if CYTHON_USE_MODULE_STATE
jpayne@68 4331 #endif
jpayne@68 4332 #if CYTHON_USE_MODULE_STATE
jpayne@68 4333 #endif
jpayne@68 4334 #if CYTHON_USE_MODULE_STATE
jpayne@68 4335 #endif
jpayne@68 4336 #if CYTHON_USE_MODULE_STATE
jpayne@68 4337 #endif
jpayne@68 4338 #if CYTHON_USE_MODULE_STATE
jpayne@68 4339 #endif
jpayne@68 4340 #if CYTHON_USE_MODULE_STATE
jpayne@68 4341 #endif
jpayne@68 4342 #if CYTHON_USE_MODULE_STATE
jpayne@68 4343 #endif
jpayne@68 4344 #if CYTHON_USE_MODULE_STATE
jpayne@68 4345 #endif
jpayne@68 4346 #if CYTHON_USE_MODULE_STATE
jpayne@68 4347 #endif
jpayne@68 4348 #if CYTHON_USE_MODULE_STATE
jpayne@68 4349 #endif
jpayne@68 4350 PyTypeObject *__pyx_ptype_5pysam_16libctabixproxies_TupleProxy;
jpayne@68 4351 PyTypeObject *__pyx_ptype_5pysam_16libctabixproxies_TupleProxyIterator;
jpayne@68 4352 PyTypeObject *__pyx_ptype_5pysam_16libctabixproxies_NamedTupleProxy;
jpayne@68 4353 PyTypeObject *__pyx_ptype_5pysam_16libctabixproxies_GTFProxy;
jpayne@68 4354 PyTypeObject *__pyx_ptype_5pysam_16libctabixproxies_GFF3Proxy;
jpayne@68 4355 PyTypeObject *__pyx_ptype_5pysam_16libctabixproxies_BedProxy;
jpayne@68 4356 PyTypeObject *__pyx_ptype_5pysam_16libctabixproxies_VCFProxy;
jpayne@68 4357 #if CYTHON_USE_MODULE_STATE
jpayne@68 4358 #endif
jpayne@68 4359 #if CYTHON_USE_MODULE_STATE
jpayne@68 4360 #endif
jpayne@68 4361 #if CYTHON_USE_MODULE_STATE
jpayne@68 4362 #endif
jpayne@68 4363 PyTypeObject *__pyx_ptype_7cpython_5array_array;
jpayne@68 4364 #if CYTHON_USE_MODULE_STATE
jpayne@68 4365 #endif
jpayne@68 4366 #if CYTHON_USE_MODULE_STATE
jpayne@68 4367 PyObject *__pyx_type_5pysam_9libctabix_tabix_file_iterator;
jpayne@68 4368 PyObject *__pyx_type_5pysam_9libctabix_TabixFile;
jpayne@68 4369 PyObject *__pyx_type_5pysam_9libctabix_Parser;
jpayne@68 4370 PyObject *__pyx_type_5pysam_9libctabix_asTuple;
jpayne@68 4371 PyObject *__pyx_type_5pysam_9libctabix_asGTF;
jpayne@68 4372 PyObject *__pyx_type_5pysam_9libctabix_asGFF3;
jpayne@68 4373 PyObject *__pyx_type_5pysam_9libctabix_asBed;
jpayne@68 4374 PyObject *__pyx_type_5pysam_9libctabix_asVCF;
jpayne@68 4375 PyObject *__pyx_type_5pysam_9libctabix_TabixIterator;
jpayne@68 4376 PyObject *__pyx_type_5pysam_9libctabix_TabixIteratorParsed;
jpayne@68 4377 PyObject *__pyx_type_5pysam_9libctabix_GZIterator;
jpayne@68 4378 PyObject *__pyx_type_5pysam_9libctabix_GZIteratorHead;
jpayne@68 4379 PyObject *__pyx_type_5pysam_9libctabix_GZIteratorParsed;
jpayne@68 4380 PyObject *__pyx_type_5pysam_9libctabix_Tabixfile;
jpayne@68 4381 #endif
jpayne@68 4382 PyTypeObject *__pyx_ptype_5pysam_9libctabix_tabix_file_iterator;
jpayne@68 4383 PyTypeObject *__pyx_ptype_5pysam_9libctabix_TabixFile;
jpayne@68 4384 PyTypeObject *__pyx_ptype_5pysam_9libctabix_Parser;
jpayne@68 4385 PyTypeObject *__pyx_ptype_5pysam_9libctabix_asTuple;
jpayne@68 4386 PyTypeObject *__pyx_ptype_5pysam_9libctabix_asGTF;
jpayne@68 4387 PyTypeObject *__pyx_ptype_5pysam_9libctabix_asGFF3;
jpayne@68 4388 PyTypeObject *__pyx_ptype_5pysam_9libctabix_asBed;
jpayne@68 4389 PyTypeObject *__pyx_ptype_5pysam_9libctabix_asVCF;
jpayne@68 4390 PyTypeObject *__pyx_ptype_5pysam_9libctabix_TabixIterator;
jpayne@68 4391 PyTypeObject *__pyx_ptype_5pysam_9libctabix_TabixIteratorParsed;
jpayne@68 4392 PyTypeObject *__pyx_ptype_5pysam_9libctabix_GZIterator;
jpayne@68 4393 PyTypeObject *__pyx_ptype_5pysam_9libctabix_GZIteratorHead;
jpayne@68 4394 PyTypeObject *__pyx_ptype_5pysam_9libctabix_GZIteratorParsed;
jpayne@68 4395 PyTypeObject *__pyx_ptype_5pysam_9libctabix_Tabixfile;
jpayne@68 4396 PyObject *__pyx_n_s_AssertionError;
jpayne@68 4397 PyObject *__pyx_kp_u_Could_not_open_file;
jpayne@68 4398 PyObject *__pyx_n_s_EmptyIterator;
jpayne@68 4399 PyObject *__pyx_n_s_EmptyIterator___iter;
jpayne@68 4400 PyObject *__pyx_n_s_EmptyIterator___next;
jpayne@68 4401 PyObject *__pyx_kp_u_Filename_s_already_exists_use_fo;
jpayne@68 4402 PyObject *__pyx_n_s_GZIterator;
jpayne@68 4403 PyObject *__pyx_n_u_GZIterator;
jpayne@68 4404 PyObject *__pyx_n_s_GZIteratorHead;
jpayne@68 4405 PyObject *__pyx_n_u_GZIteratorHead;
jpayne@68 4406 PyObject *__pyx_n_s_GZIteratorHead___reduce_cython;
jpayne@68 4407 PyObject *__pyx_n_s_GZIteratorHead___setstate_cython;
jpayne@68 4408 PyObject *__pyx_n_s_GZIteratorParsed;
jpayne@68 4409 PyObject *__pyx_n_s_GZIteratorParsed___reduce_cython;
jpayne@68 4410 PyObject *__pyx_n_s_GZIteratorParsed___setstate_cyth;
jpayne@68 4411 PyObject *__pyx_n_s_GZIterator___reduce_cython;
jpayne@68 4412 PyObject *__pyx_n_s_GZIterator___setstate_cython;
jpayne@68 4413 PyObject *__pyx_n_s_IOError;
jpayne@68 4414 PyObject *__pyx_kp_u_I_O_operation_on_closed_file;
jpayne@68 4415 PyObject *__pyx_kp_u_I_O_operation_on_closed_file_2;
jpayne@68 4416 PyObject *__pyx_kp_s_Incompatible_checksums_0x_x_vs_0;
jpayne@68 4417 PyObject *__pyx_n_s_KeyError;
jpayne@68 4418 PyObject *__pyx_n_s_MemoryError;
jpayne@68 4419 PyObject *__pyx_kp_u_No_such_file_or_directory_s;
jpayne@68 4420 PyObject *__pyx_n_s_NotImplementedError;
jpayne@68 4421 PyObject *__pyx_n_s_OSError;
jpayne@68 4422 PyObject *__pyx_n_s_O_RDONLY;
jpayne@68 4423 PyObject *__pyx_n_s_Parser;
jpayne@68 4424 PyObject *__pyx_n_s_Parser___reduce_cython;
jpayne@68 4425 PyObject *__pyx_n_s_Parser___setstate_cython;
jpayne@68 4426 PyObject *__pyx_n_s_Parser_get_encoding;
jpayne@68 4427 PyObject *__pyx_n_s_Parser_set_encoding;
jpayne@68 4428 PyObject *__pyx_n_s_PickleError;
jpayne@68 4429 PyObject *__pyx_n_s_StopIteration;
jpayne@68 4430 PyObject *__pyx_n_s_TabixFile;
jpayne@68 4431 PyObject *__pyx_n_u_TabixFile;
jpayne@68 4432 PyObject *__pyx_n_s_TabixFile___reduce_cython;
jpayne@68 4433 PyObject *__pyx_n_s_TabixFile___setstate_cython;
jpayne@68 4434 PyObject *__pyx_n_s_TabixFile__dup;
jpayne@68 4435 PyObject *__pyx_n_s_TabixFile__open;
jpayne@68 4436 PyObject *__pyx_n_s_TabixFile_close;
jpayne@68 4437 PyObject *__pyx_n_s_TabixFile_fetch;
jpayne@68 4438 PyObject *__pyx_n_s_TabixIterator;
jpayne@68 4439 PyObject *__pyx_n_s_TabixIteratorParsed;
jpayne@68 4440 PyObject *__pyx_n_s_TabixIteratorParsed___reduce_cyt;
jpayne@68 4441 PyObject *__pyx_n_s_TabixIteratorParsed___setstate_c;
jpayne@68 4442 PyObject *__pyx_n_s_TabixIterator___reduce_cython;
jpayne@68 4443 PyObject *__pyx_n_s_TabixIterator___setstate_cython;
jpayne@68 4444 PyObject *__pyx_n_s_Tabixfile;
jpayne@68 4445 PyObject *__pyx_n_u_Tabixfile;
jpayne@68 4446 PyObject *__pyx_n_s_Tabixfile___reduce_cython;
jpayne@68 4447 PyObject *__pyx_n_s_Tabixfile___setstate_cython;
jpayne@68 4448 PyObject *__pyx_n_s_TypeError;
jpayne@68 4449 PyObject *__pyx_n_s_ValueError;
jpayne@68 4450 PyObject *__pyx_n_s_WINDOW_SIZE;
jpayne@68 4451 PyObject *__pyx_kp_b__16;
jpayne@68 4452 PyObject *__pyx_kp_u__39;
jpayne@68 4453 PyObject *__pyx_kp_u__42;
jpayne@68 4454 PyObject *__pyx_kp_u__43;
jpayne@68 4455 PyObject *__pyx_kp_u__44;
jpayne@68 4456 PyObject *__pyx_kp_u__56;
jpayne@68 4457 PyObject *__pyx_n_s__62;
jpayne@68 4458 PyObject *__pyx_n_s__78;
jpayne@68 4459 PyObject *__pyx_n_s_a;
jpayne@68 4460 PyObject *__pyx_n_s_all;
jpayne@68 4461 PyObject *__pyx_n_s_asBed;
jpayne@68 4462 PyObject *__pyx_n_u_asBed;
jpayne@68 4463 PyObject *__pyx_n_s_asBed___reduce_cython;
jpayne@68 4464 PyObject *__pyx_n_s_asBed___setstate_cython;
jpayne@68 4465 PyObject *__pyx_n_s_asGFF3;
jpayne@68 4466 PyObject *__pyx_n_u_asGFF3;
jpayne@68 4467 PyObject *__pyx_n_s_asGFF3___reduce_cython;
jpayne@68 4468 PyObject *__pyx_n_s_asGFF3___setstate_cython;
jpayne@68 4469 PyObject *__pyx_n_s_asGTF;
jpayne@68 4470 PyObject *__pyx_n_u_asGTF;
jpayne@68 4471 PyObject *__pyx_n_s_asGTF___reduce_cython;
jpayne@68 4472 PyObject *__pyx_n_s_asGTF___setstate_cython;
jpayne@68 4473 PyObject *__pyx_n_s_asTuple;
jpayne@68 4474 PyObject *__pyx_n_u_asTuple;
jpayne@68 4475 PyObject *__pyx_n_s_asTuple___reduce_cython;
jpayne@68 4476 PyObject *__pyx_n_s_asTuple___setstate_cython;
jpayne@68 4477 PyObject *__pyx_n_s_asVCF;
jpayne@68 4478 PyObject *__pyx_n_u_asVCF;
jpayne@68 4479 PyObject *__pyx_n_s_asVCF___reduce_cython;
jpayne@68 4480 PyObject *__pyx_n_s_asVCF___setstate_cython;
jpayne@68 4481 PyObject *__pyx_n_u_ascii;
jpayne@68 4482 PyObject *__pyx_n_s_asyncio_coroutines;
jpayne@68 4483 PyObject *__pyx_n_s_b;
jpayne@68 4484 PyObject *__pyx_n_u_bcf;
jpayne@68 4485 PyObject *__pyx_n_u_bed;
jpayne@68 4486 PyObject *__pyx_n_s_buffer;
jpayne@68 4487 PyObject *__pyx_n_s_buffer_size;
jpayne@68 4488 PyObject *__pyx_kp_u_building_of_index_for_failed;
jpayne@68 4489 PyObject *__pyx_n_s_bytes_cpy;
jpayne@68 4490 PyObject *__pyx_n_s_c;
jpayne@68 4491 PyObject *__pyx_n_s_cfilename;
jpayne@68 4492 PyObject *__pyx_n_s_cfilename_index;
jpayne@68 4493 PyObject *__pyx_n_s_cfn;
jpayne@68 4494 PyObject *__pyx_n_s_cline_in_traceback;
jpayne@68 4495 PyObject *__pyx_n_s_close;
jpayne@68 4496 PyObject *__pyx_n_s_closed;
jpayne@68 4497 PyObject *__pyx_n_s_conf;
jpayne@68 4498 PyObject *__pyx_n_s_conf_data;
jpayne@68 4499 PyObject *__pyx_n_s_contigs;
jpayne@68 4500 PyObject *__pyx_kp_u_could_not_create_iterator_for_re;
jpayne@68 4501 PyObject *__pyx_kp_u_could_not_create_iterator_possib;
jpayne@68 4502 PyObject *__pyx_kp_u_could_not_load_tbi_csi_index_of;
jpayne@68 4503 PyObject *__pyx_kp_u_could_not_open_file_s;
jpayne@68 4504 PyObject *__pyx_kp_u_could_not_open_for_reading_heade;
jpayne@68 4505 PyObject *__pyx_kp_u_could_not_open_index_for_s;
jpayne@68 4506 PyObject *__pyx_kp_u_could_not_open_s_for_reading;
jpayne@68 4507 PyObject *__pyx_kp_u_could_not_open_s_for_writing;
jpayne@68 4508 PyObject *__pyx_n_s_cpy;
jpayne@68 4509 PyObject *__pyx_n_s_csi;
jpayne@68 4510 PyObject *__pyx_kp_u_csi_2;
jpayne@68 4511 PyObject *__pyx_n_s_cstr;
jpayne@68 4512 PyObject *__pyx_n_s_dict;
jpayne@68 4513 PyObject *__pyx_n_s_dict_2;
jpayne@68 4514 PyObject *__pyx_kp_u_disable;
jpayne@68 4515 PyObject *__pyx_n_s_doc;
jpayne@68 4516 PyObject *__pyx_n_s_dup;
jpayne@68 4517 PyObject *__pyx_kp_s_empty_iterator;
jpayne@68 4518 PyObject *__pyx_kp_u_enable;
jpayne@68 4519 PyObject *__pyx_n_s_encoding;
jpayne@68 4520 PyObject *__pyx_n_s_end;
jpayne@68 4521 PyObject *__pyx_n_s_end_col;
jpayne@68 4522 PyObject *__pyx_kp_u_end_out_of_range_i;
jpayne@68 4523 PyObject *__pyx_kp_u_error_i_when_closing_file_s;
jpayne@68 4524 PyObject *__pyx_kp_u_error_i_when_writing_to_file_s;
jpayne@68 4525 PyObject *__pyx_n_s_exists;
jpayne@68 4526 PyObject *__pyx_n_s_fd_src;
jpayne@68 4527 PyObject *__pyx_n_s_fetch;
jpayne@68 4528 PyObject *__pyx_kp_u_file_s_not_found;
jpayne@68 4529 PyObject *__pyx_n_s_filename;
jpayne@68 4530 PyObject *__pyx_n_s_filename_in;
jpayne@68 4531 PyObject *__pyx_n_s_filename_index;
jpayne@68 4532 PyObject *__pyx_n_s_filename_out;
jpayne@68 4533 PyObject *__pyx_kp_u_filename_s_already_exists_use_fo;
jpayne@68 4534 PyObject *__pyx_n_s_fileobj;
jpayne@68 4535 PyObject *__pyx_n_s_fmt;
jpayne@68 4536 PyObject *__pyx_n_s_fn;
jpayne@68 4537 PyObject *__pyx_n_s_fn_index;
jpayne@68 4538 PyObject *__pyx_n_s_fnidx;
jpayne@68 4539 PyObject *__pyx_n_s_force;
jpayne@68 4540 PyObject *__pyx_n_s_format;
jpayne@68 4541 PyObject *__pyx_n_s_fp;
jpayne@68 4542 PyObject *__pyx_kp_u_gc;
jpayne@68 4543 PyObject *__pyx_n_s_get_encoding;
jpayne@68 4544 PyObject *__pyx_n_s_getstate;
jpayne@68 4545 PyObject *__pyx_n_u_gff;
jpayne@68 4546 PyObject *__pyx_kp_u_gz;
jpayne@68 4547 PyObject *__pyx_n_s_import;
jpayne@68 4548 PyObject *__pyx_kp_u_incomplete_line_at_s;
jpayne@68 4549 PyObject *__pyx_n_s_index;
jpayne@68 4550 PyObject *__pyx_kp_u_index_s_not_found;
jpayne@68 4551 PyObject *__pyx_n_s_infile;
jpayne@68 4552 PyObject *__pyx_n_s_init;
jpayne@68 4553 PyObject *__pyx_n_s_init_subclass;
jpayne@68 4554 PyObject *__pyx_n_s_initializing;
jpayne@68 4555 PyObject *__pyx_kp_u_invalid_file_opening_mode_s;
jpayne@68 4556 PyObject *__pyx_n_s_is_coroutine;
jpayne@68 4557 PyObject *__pyx_n_s_is_empty;
jpayne@68 4558 PyObject *__pyx_n_s_is_open;
jpayne@68 4559 PyObject *__pyx_kp_u_isenabled;
jpayne@68 4560 PyObject *__pyx_n_s_iter;
jpayne@68 4561 PyObject *__pyx_kp_s_iterate_over_infile_Permits_the;
jpayne@68 4562 PyObject *__pyx_kp_u_iteration_on_closed_file;
jpayne@68 4563 PyObject *__pyx_n_s_itr;
jpayne@68 4564 PyObject *__pyx_n_s_keep_original;
jpayne@68 4565 PyObject *__pyx_n_s_keys;
jpayne@68 4566 PyObject *__pyx_n_s_length;
jpayne@68 4567 PyObject *__pyx_n_s_line;
jpayne@68 4568 PyObject *__pyx_n_s_line_skip;
jpayne@68 4569 PyObject *__pyx_n_s_main;
jpayne@68 4570 PyObject *__pyx_n_s_meta_char;
jpayne@68 4571 PyObject *__pyx_n_s_metaclass;
jpayne@68 4572 PyObject *__pyx_n_s_min_shift;
jpayne@68 4573 PyObject *__pyx_n_s_mode;
jpayne@68 4574 PyObject *__pyx_n_s_module;
jpayne@68 4575 PyObject *__pyx_n_s_multiple_iterators;
jpayne@68 4576 PyObject *__pyx_n_s_name;
jpayne@68 4577 PyObject *__pyx_n_s_nbytes;
jpayne@68 4578 PyObject *__pyx_kp_u_neither_preset_nor_seq_col_start;
jpayne@68 4579 PyObject *__pyx_n_s_new;
jpayne@68 4580 PyObject *__pyx_n_s_next;
jpayne@68 4581 PyObject *__pyx_kp_s_no_default___reduce___due_to_non;
jpayne@68 4582 PyObject *__pyx_n_s_open;
jpayne@68 4583 PyObject *__pyx_n_s_os;
jpayne@68 4584 PyObject *__pyx_kp_u_parse_method_of_s_not_implemente;
jpayne@68 4585 PyObject *__pyx_n_s_parser;
jpayne@68 4586 PyObject *__pyx_n_s_path;
jpayne@68 4587 PyObject *__pyx_n_s_pickle;
jpayne@68 4588 PyObject *__pyx_n_s_prepare;
jpayne@68 4589 PyObject *__pyx_n_s_preset;
jpayne@68 4590 PyObject *__pyx_n_s_preset2conf;
jpayne@68 4591 PyObject *__pyx_n_u_psltbl;
jpayne@68 4592 PyObject *__pyx_n_s_pysam_libctabix;
jpayne@68 4593 PyObject *__pyx_kp_s_pysam_libctabix_pyx;
jpayne@68 4594 PyObject *__pyx_n_s_pyx_PickleError;
jpayne@68 4595 PyObject *__pyx_n_s_pyx_checksum;
jpayne@68 4596 PyObject *__pyx_n_s_pyx_result;
jpayne@68 4597 PyObject *__pyx_n_s_pyx_state;
jpayne@68 4598 PyObject *__pyx_n_s_pyx_type;
jpayne@68 4599 PyObject *__pyx_n_s_pyx_unpickle_Parser;
jpayne@68 4600 PyObject *__pyx_n_s_pyx_unpickle_asBed;
jpayne@68 4601 PyObject *__pyx_n_s_pyx_unpickle_asGFF3;
jpayne@68 4602 PyObject *__pyx_n_s_pyx_unpickle_asGTF;
jpayne@68 4603 PyObject *__pyx_n_s_pyx_unpickle_asTuple;
jpayne@68 4604 PyObject *__pyx_n_s_pyx_unpickle_asVCF;
jpayne@68 4605 PyObject *__pyx_n_s_pyx_vtable;
jpayne@68 4606 PyObject *__pyx_n_s_qualname;
jpayne@68 4607 PyObject *__pyx_n_s_r;
jpayne@68 4608 PyObject *__pyx_n_u_r;
jpayne@68 4609 PyObject *__pyx_n_s_readline;
jpayne@68 4610 PyObject *__pyx_n_s_reduce;
jpayne@68 4611 PyObject *__pyx_n_s_reduce_cython;
jpayne@68 4612 PyObject *__pyx_n_s_reduce_ex;
jpayne@68 4613 PyObject *__pyx_n_s_reference;
jpayne@68 4614 PyObject *__pyx_n_s_region;
jpayne@68 4615 PyObject *__pyx_n_s_retval;
jpayne@68 4616 PyObject *__pyx_kp_u_s;
jpayne@68 4617 PyObject *__pyx_n_s_s_2;
jpayne@68 4618 PyObject *__pyx_kp_u_s_i;
jpayne@68 4619 PyObject *__pyx_kp_u_s_i_i;
jpayne@68 4620 PyObject *__pyx_n_u_sam;
jpayne@68 4621 PyObject *__pyx_n_s_self;
jpayne@68 4622 PyObject *__pyx_kp_s_self_gzipfile_self_kstream_canno;
jpayne@68 4623 PyObject *__pyx_kp_s_self_iterator_cannot_be_converte;
jpayne@68 4624 PyObject *__pyx_n_s_seq_col;
jpayne@68 4625 PyObject *__pyx_n_s_set_encoding;
jpayne@68 4626 PyObject *__pyx_n_s_set_name;
jpayne@68 4627 PyObject *__pyx_n_s_setstate;
jpayne@68 4628 PyObject *__pyx_n_s_setstate_cython;
jpayne@68 4629 PyObject *__pyx_n_s_spec;
jpayne@68 4630 PyObject *__pyx_n_s_start;
jpayne@68 4631 PyObject *__pyx_n_s_start_col;
jpayne@68 4632 PyObject *__pyx_kp_u_start_i_end_i;
jpayne@68 4633 PyObject *__pyx_kp_u_start_out_of_range_i;
jpayne@68 4634 PyObject *__pyx_n_s_state;
jpayne@68 4635 PyObject *__pyx_kp_s_stringsource;
jpayne@68 4636 PyObject *__pyx_n_s_suffix;
jpayne@68 4637 PyObject *__pyx_n_s_super;
jpayne@68 4638 PyObject *__pyx_n_s_sys;
jpayne@68 4639 PyObject *__pyx_n_s_tabix_compress;
jpayne@68 4640 PyObject *__pyx_n_u_tabix_compress;
jpayne@68 4641 PyObject *__pyx_n_s_tabix_file_iterator;
jpayne@68 4642 PyObject *__pyx_n_u_tabix_file_iterator;
jpayne@68 4643 PyObject *__pyx_n_s_tabix_file_iterator___reduce_cyt;
jpayne@68 4644 PyObject *__pyx_n_s_tabix_file_iterator___setstate_c;
jpayne@68 4645 PyObject *__pyx_n_s_tabix_generic_iterator;
jpayne@68 4646 PyObject *__pyx_n_u_tabix_generic_iterator;
jpayne@68 4647 PyObject *__pyx_n_s_tabix_generic_iterator___init;
jpayne@68 4648 PyObject *__pyx_n_s_tabix_generic_iterator___iter;
jpayne@68 4649 PyObject *__pyx_n_s_tabix_generic_iterator___next;
jpayne@68 4650 PyObject *__pyx_n_s_tabix_index;
jpayne@68 4651 PyObject *__pyx_n_u_tabix_index;
jpayne@68 4652 PyObject *__pyx_n_s_tabix_iterator;
jpayne@68 4653 PyObject *__pyx_n_u_tabix_iterator;
jpayne@68 4654 PyObject *__pyx_kp_u_tbi;
jpayne@68 4655 PyObject *__pyx_n_s_tell;
jpayne@68 4656 PyObject *__pyx_n_s_test;
jpayne@68 4657 PyObject *__pyx_n_s_threads;
jpayne@68 4658 PyObject *__pyx_kp_u_unknown_preset;
jpayne@68 4659 PyObject *__pyx_n_s_unlink;
jpayne@68 4660 PyObject *__pyx_n_s_update;
jpayne@68 4661 PyObject *__pyx_n_s_use_setstate;
jpayne@68 4662 PyObject *__pyx_kp_u_valid_presets_are;
jpayne@68 4663 PyObject *__pyx_n_u_vcf;
jpayne@68 4664 PyObject *__pyx_kp_u_writing_failed;
jpayne@68 4665 PyObject *__pyx_n_s_zerobased;
jpayne@68 4666 PyObject *__pyx_int_0;
jpayne@68 4667 PyObject *__pyx_int_1;
jpayne@68 4668 PyObject *__pyx_int_2;
jpayne@68 4669 PyObject *__pyx_int_3;
jpayne@68 4670 PyObject *__pyx_int_4;
jpayne@68 4671 PyObject *__pyx_int_5;
jpayne@68 4672 PyObject *__pyx_int_15;
jpayne@68 4673 PyObject *__pyx_int_17;
jpayne@68 4674 PyObject *__pyx_int_18;
jpayne@68 4675 PyObject *__pyx_int_35;
jpayne@68 4676 PyObject *__pyx_int_64;
jpayne@68 4677 PyObject *__pyx_int_21667264;
jpayne@68 4678 PyObject *__pyx_int_139192863;
jpayne@68 4679 PyObject *__pyx_int_243541226;
jpayne@68 4680 PyObject *__pyx_int_neg_1;
jpayne@68 4681 PyObject *__pyx_codeobj_;
jpayne@68 4682 PyObject *__pyx_tuple__19;
jpayne@68 4683 PyObject *__pyx_tuple__20;
jpayne@68 4684 PyObject *__pyx_tuple__24;
jpayne@68 4685 PyObject *__pyx_tuple__38;
jpayne@68 4686 PyObject *__pyx_tuple__41;
jpayne@68 4687 PyObject *__pyx_tuple__45;
jpayne@68 4688 PyObject *__pyx_tuple__55;
jpayne@68 4689 PyObject *__pyx_tuple__63;
jpayne@68 4690 PyObject *__pyx_tuple__64;
jpayne@68 4691 PyObject *__pyx_tuple__65;
jpayne@68 4692 PyObject *__pyx_tuple__66;
jpayne@68 4693 PyObject *__pyx_tuple__67;
jpayne@68 4694 PyObject *__pyx_tuple__68;
jpayne@68 4695 PyObject *__pyx_tuple__69;
jpayne@68 4696 PyObject *__pyx_tuple__70;
jpayne@68 4697 PyObject *__pyx_tuple__71;
jpayne@68 4698 PyObject *__pyx_tuple__72;
jpayne@68 4699 PyObject *__pyx_tuple__73;
jpayne@68 4700 PyObject *__pyx_tuple__74;
jpayne@68 4701 PyObject *__pyx_tuple__75;
jpayne@68 4702 PyObject *__pyx_tuple__76;
jpayne@68 4703 PyObject *__pyx_tuple__77;
jpayne@68 4704 PyObject *__pyx_codeobj__2;
jpayne@68 4705 PyObject *__pyx_codeobj__3;
jpayne@68 4706 PyObject *__pyx_codeobj__4;
jpayne@68 4707 PyObject *__pyx_codeobj__5;
jpayne@68 4708 PyObject *__pyx_codeobj__6;
jpayne@68 4709 PyObject *__pyx_codeobj__7;
jpayne@68 4710 PyObject *__pyx_codeobj__8;
jpayne@68 4711 PyObject *__pyx_codeobj__9;
jpayne@68 4712 PyObject *__pyx_codeobj__10;
jpayne@68 4713 PyObject *__pyx_codeobj__11;
jpayne@68 4714 PyObject *__pyx_codeobj__12;
jpayne@68 4715 PyObject *__pyx_codeobj__13;
jpayne@68 4716 PyObject *__pyx_codeobj__14;
jpayne@68 4717 PyObject *__pyx_codeobj__15;
jpayne@68 4718 PyObject *__pyx_codeobj__17;
jpayne@68 4719 PyObject *__pyx_codeobj__18;
jpayne@68 4720 PyObject *__pyx_codeobj__21;
jpayne@68 4721 PyObject *__pyx_codeobj__22;
jpayne@68 4722 PyObject *__pyx_codeobj__23;
jpayne@68 4723 PyObject *__pyx_codeobj__25;
jpayne@68 4724 PyObject *__pyx_codeobj__26;
jpayne@68 4725 PyObject *__pyx_codeobj__27;
jpayne@68 4726 PyObject *__pyx_codeobj__28;
jpayne@68 4727 PyObject *__pyx_codeobj__29;
jpayne@68 4728 PyObject *__pyx_codeobj__30;
jpayne@68 4729 PyObject *__pyx_codeobj__31;
jpayne@68 4730 PyObject *__pyx_codeobj__32;
jpayne@68 4731 PyObject *__pyx_codeobj__33;
jpayne@68 4732 PyObject *__pyx_codeobj__34;
jpayne@68 4733 PyObject *__pyx_codeobj__35;
jpayne@68 4734 PyObject *__pyx_codeobj__36;
jpayne@68 4735 PyObject *__pyx_codeobj__37;
jpayne@68 4736 PyObject *__pyx_codeobj__40;
jpayne@68 4737 PyObject *__pyx_codeobj__46;
jpayne@68 4738 PyObject *__pyx_codeobj__47;
jpayne@68 4739 PyObject *__pyx_codeobj__48;
jpayne@68 4740 PyObject *__pyx_codeobj__49;
jpayne@68 4741 PyObject *__pyx_codeobj__50;
jpayne@68 4742 PyObject *__pyx_codeobj__51;
jpayne@68 4743 PyObject *__pyx_codeobj__52;
jpayne@68 4744 PyObject *__pyx_codeobj__53;
jpayne@68 4745 PyObject *__pyx_codeobj__54;
jpayne@68 4746 PyObject *__pyx_codeobj__57;
jpayne@68 4747 PyObject *__pyx_codeobj__58;
jpayne@68 4748 PyObject *__pyx_codeobj__59;
jpayne@68 4749 PyObject *__pyx_codeobj__60;
jpayne@68 4750 PyObject *__pyx_codeobj__61;
jpayne@68 4751 } __pyx_mstate;
jpayne@68 4752
jpayne@68 4753 #if CYTHON_USE_MODULE_STATE
jpayne@68 4754 #ifdef __cplusplus
jpayne@68 4755 namespace {
jpayne@68 4756 extern struct PyModuleDef __pyx_moduledef;
jpayne@68 4757 } /* anonymous namespace */
jpayne@68 4758 #else
jpayne@68 4759 static struct PyModuleDef __pyx_moduledef;
jpayne@68 4760 #endif
jpayne@68 4761
jpayne@68 4762 #define __pyx_mstate(o) ((__pyx_mstate *)__Pyx_PyModule_GetState(o))
jpayne@68 4763
jpayne@68 4764 #define __pyx_mstate_global (__pyx_mstate(PyState_FindModule(&__pyx_moduledef)))
jpayne@68 4765
jpayne@68 4766 #define __pyx_m (PyState_FindModule(&__pyx_moduledef))
jpayne@68 4767 #else
jpayne@68 4768 static __pyx_mstate __pyx_mstate_global_static =
jpayne@68 4769 #ifdef __cplusplus
jpayne@68 4770 {};
jpayne@68 4771 #else
jpayne@68 4772 {0};
jpayne@68 4773 #endif
jpayne@68 4774 static __pyx_mstate *__pyx_mstate_global = &__pyx_mstate_global_static;
jpayne@68 4775 #endif
jpayne@68 4776 /* #### Code section: module_state_clear ### */
jpayne@68 4777 #if CYTHON_USE_MODULE_STATE
jpayne@68 4778 static int __pyx_m_clear(PyObject *m) {
jpayne@68 4779 __pyx_mstate *clear_module_state = __pyx_mstate(m);
jpayne@68 4780 if (!clear_module_state) return 0;
jpayne@68 4781 Py_CLEAR(clear_module_state->__pyx_d);
jpayne@68 4782 Py_CLEAR(clear_module_state->__pyx_b);
jpayne@68 4783 Py_CLEAR(clear_module_state->__pyx_cython_runtime);
jpayne@68 4784 Py_CLEAR(clear_module_state->__pyx_empty_tuple);
jpayne@68 4785 Py_CLEAR(clear_module_state->__pyx_empty_bytes);
jpayne@68 4786 Py_CLEAR(clear_module_state->__pyx_empty_unicode);
jpayne@68 4787 #ifdef __Pyx_CyFunction_USED
jpayne@68 4788 Py_CLEAR(clear_module_state->__pyx_CyFunctionType);
jpayne@68 4789 #endif
jpayne@68 4790 #ifdef __Pyx_FusedFunction_USED
jpayne@68 4791 Py_CLEAR(clear_module_state->__pyx_FusedFunctionType);
jpayne@68 4792 #endif
jpayne@68 4793 Py_CLEAR(clear_module_state->__pyx_ptype_5pysam_10libchtslib_HTSFile);
jpayne@68 4794 Py_CLEAR(clear_module_state->__pyx_ptype_7cpython_4type_type);
jpayne@68 4795 Py_CLEAR(clear_module_state->__pyx_ptype_7cpython_4bool_bool);
jpayne@68 4796 Py_CLEAR(clear_module_state->__pyx_ptype_7cpython_7complex_complex);
jpayne@68 4797 Py_CLEAR(clear_module_state->__pyx_ptype_5pysam_16libctabixproxies_TupleProxy);
jpayne@68 4798 Py_CLEAR(clear_module_state->__pyx_ptype_5pysam_16libctabixproxies_TupleProxyIterator);
jpayne@68 4799 Py_CLEAR(clear_module_state->__pyx_ptype_5pysam_16libctabixproxies_NamedTupleProxy);
jpayne@68 4800 Py_CLEAR(clear_module_state->__pyx_ptype_5pysam_16libctabixproxies_GTFProxy);
jpayne@68 4801 Py_CLEAR(clear_module_state->__pyx_ptype_5pysam_16libctabixproxies_GFF3Proxy);
jpayne@68 4802 Py_CLEAR(clear_module_state->__pyx_ptype_5pysam_16libctabixproxies_BedProxy);
jpayne@68 4803 Py_CLEAR(clear_module_state->__pyx_ptype_5pysam_16libctabixproxies_VCFProxy);
jpayne@68 4804 Py_CLEAR(clear_module_state->__pyx_ptype_7cpython_5array_array);
jpayne@68 4805 Py_CLEAR(clear_module_state->__pyx_ptype_5pysam_9libctabix_tabix_file_iterator);
jpayne@68 4806 Py_CLEAR(clear_module_state->__pyx_type_5pysam_9libctabix_tabix_file_iterator);
jpayne@68 4807 Py_CLEAR(clear_module_state->__pyx_ptype_5pysam_9libctabix_TabixFile);
jpayne@68 4808 Py_CLEAR(clear_module_state->__pyx_type_5pysam_9libctabix_TabixFile);
jpayne@68 4809 Py_CLEAR(clear_module_state->__pyx_ptype_5pysam_9libctabix_Parser);
jpayne@68 4810 Py_CLEAR(clear_module_state->__pyx_type_5pysam_9libctabix_Parser);
jpayne@68 4811 Py_CLEAR(clear_module_state->__pyx_ptype_5pysam_9libctabix_asTuple);
jpayne@68 4812 Py_CLEAR(clear_module_state->__pyx_type_5pysam_9libctabix_asTuple);
jpayne@68 4813 Py_CLEAR(clear_module_state->__pyx_ptype_5pysam_9libctabix_asGTF);
jpayne@68 4814 Py_CLEAR(clear_module_state->__pyx_type_5pysam_9libctabix_asGTF);
jpayne@68 4815 Py_CLEAR(clear_module_state->__pyx_ptype_5pysam_9libctabix_asGFF3);
jpayne@68 4816 Py_CLEAR(clear_module_state->__pyx_type_5pysam_9libctabix_asGFF3);
jpayne@68 4817 Py_CLEAR(clear_module_state->__pyx_ptype_5pysam_9libctabix_asBed);
jpayne@68 4818 Py_CLEAR(clear_module_state->__pyx_type_5pysam_9libctabix_asBed);
jpayne@68 4819 Py_CLEAR(clear_module_state->__pyx_ptype_5pysam_9libctabix_asVCF);
jpayne@68 4820 Py_CLEAR(clear_module_state->__pyx_type_5pysam_9libctabix_asVCF);
jpayne@68 4821 Py_CLEAR(clear_module_state->__pyx_ptype_5pysam_9libctabix_TabixIterator);
jpayne@68 4822 Py_CLEAR(clear_module_state->__pyx_type_5pysam_9libctabix_TabixIterator);
jpayne@68 4823 Py_CLEAR(clear_module_state->__pyx_ptype_5pysam_9libctabix_TabixIteratorParsed);
jpayne@68 4824 Py_CLEAR(clear_module_state->__pyx_type_5pysam_9libctabix_TabixIteratorParsed);
jpayne@68 4825 Py_CLEAR(clear_module_state->__pyx_ptype_5pysam_9libctabix_GZIterator);
jpayne@68 4826 Py_CLEAR(clear_module_state->__pyx_type_5pysam_9libctabix_GZIterator);
jpayne@68 4827 Py_CLEAR(clear_module_state->__pyx_ptype_5pysam_9libctabix_GZIteratorHead);
jpayne@68 4828 Py_CLEAR(clear_module_state->__pyx_type_5pysam_9libctabix_GZIteratorHead);
jpayne@68 4829 Py_CLEAR(clear_module_state->__pyx_ptype_5pysam_9libctabix_GZIteratorParsed);
jpayne@68 4830 Py_CLEAR(clear_module_state->__pyx_type_5pysam_9libctabix_GZIteratorParsed);
jpayne@68 4831 Py_CLEAR(clear_module_state->__pyx_ptype_5pysam_9libctabix_Tabixfile);
jpayne@68 4832 Py_CLEAR(clear_module_state->__pyx_type_5pysam_9libctabix_Tabixfile);
jpayne@68 4833 Py_CLEAR(clear_module_state->__pyx_n_s_AssertionError);
jpayne@68 4834 Py_CLEAR(clear_module_state->__pyx_kp_u_Could_not_open_file);
jpayne@68 4835 Py_CLEAR(clear_module_state->__pyx_n_s_EmptyIterator);
jpayne@68 4836 Py_CLEAR(clear_module_state->__pyx_n_s_EmptyIterator___iter);
jpayne@68 4837 Py_CLEAR(clear_module_state->__pyx_n_s_EmptyIterator___next);
jpayne@68 4838 Py_CLEAR(clear_module_state->__pyx_kp_u_Filename_s_already_exists_use_fo);
jpayne@68 4839 Py_CLEAR(clear_module_state->__pyx_n_s_GZIterator);
jpayne@68 4840 Py_CLEAR(clear_module_state->__pyx_n_u_GZIterator);
jpayne@68 4841 Py_CLEAR(clear_module_state->__pyx_n_s_GZIteratorHead);
jpayne@68 4842 Py_CLEAR(clear_module_state->__pyx_n_u_GZIteratorHead);
jpayne@68 4843 Py_CLEAR(clear_module_state->__pyx_n_s_GZIteratorHead___reduce_cython);
jpayne@68 4844 Py_CLEAR(clear_module_state->__pyx_n_s_GZIteratorHead___setstate_cython);
jpayne@68 4845 Py_CLEAR(clear_module_state->__pyx_n_s_GZIteratorParsed);
jpayne@68 4846 Py_CLEAR(clear_module_state->__pyx_n_s_GZIteratorParsed___reduce_cython);
jpayne@68 4847 Py_CLEAR(clear_module_state->__pyx_n_s_GZIteratorParsed___setstate_cyth);
jpayne@68 4848 Py_CLEAR(clear_module_state->__pyx_n_s_GZIterator___reduce_cython);
jpayne@68 4849 Py_CLEAR(clear_module_state->__pyx_n_s_GZIterator___setstate_cython);
jpayne@68 4850 Py_CLEAR(clear_module_state->__pyx_n_s_IOError);
jpayne@68 4851 Py_CLEAR(clear_module_state->__pyx_kp_u_I_O_operation_on_closed_file);
jpayne@68 4852 Py_CLEAR(clear_module_state->__pyx_kp_u_I_O_operation_on_closed_file_2);
jpayne@68 4853 Py_CLEAR(clear_module_state->__pyx_kp_s_Incompatible_checksums_0x_x_vs_0);
jpayne@68 4854 Py_CLEAR(clear_module_state->__pyx_n_s_KeyError);
jpayne@68 4855 Py_CLEAR(clear_module_state->__pyx_n_s_MemoryError);
jpayne@68 4856 Py_CLEAR(clear_module_state->__pyx_kp_u_No_such_file_or_directory_s);
jpayne@68 4857 Py_CLEAR(clear_module_state->__pyx_n_s_NotImplementedError);
jpayne@68 4858 Py_CLEAR(clear_module_state->__pyx_n_s_OSError);
jpayne@68 4859 Py_CLEAR(clear_module_state->__pyx_n_s_O_RDONLY);
jpayne@68 4860 Py_CLEAR(clear_module_state->__pyx_n_s_Parser);
jpayne@68 4861 Py_CLEAR(clear_module_state->__pyx_n_s_Parser___reduce_cython);
jpayne@68 4862 Py_CLEAR(clear_module_state->__pyx_n_s_Parser___setstate_cython);
jpayne@68 4863 Py_CLEAR(clear_module_state->__pyx_n_s_Parser_get_encoding);
jpayne@68 4864 Py_CLEAR(clear_module_state->__pyx_n_s_Parser_set_encoding);
jpayne@68 4865 Py_CLEAR(clear_module_state->__pyx_n_s_PickleError);
jpayne@68 4866 Py_CLEAR(clear_module_state->__pyx_n_s_StopIteration);
jpayne@68 4867 Py_CLEAR(clear_module_state->__pyx_n_s_TabixFile);
jpayne@68 4868 Py_CLEAR(clear_module_state->__pyx_n_u_TabixFile);
jpayne@68 4869 Py_CLEAR(clear_module_state->__pyx_n_s_TabixFile___reduce_cython);
jpayne@68 4870 Py_CLEAR(clear_module_state->__pyx_n_s_TabixFile___setstate_cython);
jpayne@68 4871 Py_CLEAR(clear_module_state->__pyx_n_s_TabixFile__dup);
jpayne@68 4872 Py_CLEAR(clear_module_state->__pyx_n_s_TabixFile__open);
jpayne@68 4873 Py_CLEAR(clear_module_state->__pyx_n_s_TabixFile_close);
jpayne@68 4874 Py_CLEAR(clear_module_state->__pyx_n_s_TabixFile_fetch);
jpayne@68 4875 Py_CLEAR(clear_module_state->__pyx_n_s_TabixIterator);
jpayne@68 4876 Py_CLEAR(clear_module_state->__pyx_n_s_TabixIteratorParsed);
jpayne@68 4877 Py_CLEAR(clear_module_state->__pyx_n_s_TabixIteratorParsed___reduce_cyt);
jpayne@68 4878 Py_CLEAR(clear_module_state->__pyx_n_s_TabixIteratorParsed___setstate_c);
jpayne@68 4879 Py_CLEAR(clear_module_state->__pyx_n_s_TabixIterator___reduce_cython);
jpayne@68 4880 Py_CLEAR(clear_module_state->__pyx_n_s_TabixIterator___setstate_cython);
jpayne@68 4881 Py_CLEAR(clear_module_state->__pyx_n_s_Tabixfile);
jpayne@68 4882 Py_CLEAR(clear_module_state->__pyx_n_u_Tabixfile);
jpayne@68 4883 Py_CLEAR(clear_module_state->__pyx_n_s_Tabixfile___reduce_cython);
jpayne@68 4884 Py_CLEAR(clear_module_state->__pyx_n_s_Tabixfile___setstate_cython);
jpayne@68 4885 Py_CLEAR(clear_module_state->__pyx_n_s_TypeError);
jpayne@68 4886 Py_CLEAR(clear_module_state->__pyx_n_s_ValueError);
jpayne@68 4887 Py_CLEAR(clear_module_state->__pyx_n_s_WINDOW_SIZE);
jpayne@68 4888 Py_CLEAR(clear_module_state->__pyx_kp_b__16);
jpayne@68 4889 Py_CLEAR(clear_module_state->__pyx_kp_u__39);
jpayne@68 4890 Py_CLEAR(clear_module_state->__pyx_kp_u__42);
jpayne@68 4891 Py_CLEAR(clear_module_state->__pyx_kp_u__43);
jpayne@68 4892 Py_CLEAR(clear_module_state->__pyx_kp_u__44);
jpayne@68 4893 Py_CLEAR(clear_module_state->__pyx_kp_u__56);
jpayne@68 4894 Py_CLEAR(clear_module_state->__pyx_n_s__62);
jpayne@68 4895 Py_CLEAR(clear_module_state->__pyx_n_s__78);
jpayne@68 4896 Py_CLEAR(clear_module_state->__pyx_n_s_a);
jpayne@68 4897 Py_CLEAR(clear_module_state->__pyx_n_s_all);
jpayne@68 4898 Py_CLEAR(clear_module_state->__pyx_n_s_asBed);
jpayne@68 4899 Py_CLEAR(clear_module_state->__pyx_n_u_asBed);
jpayne@68 4900 Py_CLEAR(clear_module_state->__pyx_n_s_asBed___reduce_cython);
jpayne@68 4901 Py_CLEAR(clear_module_state->__pyx_n_s_asBed___setstate_cython);
jpayne@68 4902 Py_CLEAR(clear_module_state->__pyx_n_s_asGFF3);
jpayne@68 4903 Py_CLEAR(clear_module_state->__pyx_n_u_asGFF3);
jpayne@68 4904 Py_CLEAR(clear_module_state->__pyx_n_s_asGFF3___reduce_cython);
jpayne@68 4905 Py_CLEAR(clear_module_state->__pyx_n_s_asGFF3___setstate_cython);
jpayne@68 4906 Py_CLEAR(clear_module_state->__pyx_n_s_asGTF);
jpayne@68 4907 Py_CLEAR(clear_module_state->__pyx_n_u_asGTF);
jpayne@68 4908 Py_CLEAR(clear_module_state->__pyx_n_s_asGTF___reduce_cython);
jpayne@68 4909 Py_CLEAR(clear_module_state->__pyx_n_s_asGTF___setstate_cython);
jpayne@68 4910 Py_CLEAR(clear_module_state->__pyx_n_s_asTuple);
jpayne@68 4911 Py_CLEAR(clear_module_state->__pyx_n_u_asTuple);
jpayne@68 4912 Py_CLEAR(clear_module_state->__pyx_n_s_asTuple___reduce_cython);
jpayne@68 4913 Py_CLEAR(clear_module_state->__pyx_n_s_asTuple___setstate_cython);
jpayne@68 4914 Py_CLEAR(clear_module_state->__pyx_n_s_asVCF);
jpayne@68 4915 Py_CLEAR(clear_module_state->__pyx_n_u_asVCF);
jpayne@68 4916 Py_CLEAR(clear_module_state->__pyx_n_s_asVCF___reduce_cython);
jpayne@68 4917 Py_CLEAR(clear_module_state->__pyx_n_s_asVCF___setstate_cython);
jpayne@68 4918 Py_CLEAR(clear_module_state->__pyx_n_u_ascii);
jpayne@68 4919 Py_CLEAR(clear_module_state->__pyx_n_s_asyncio_coroutines);
jpayne@68 4920 Py_CLEAR(clear_module_state->__pyx_n_s_b);
jpayne@68 4921 Py_CLEAR(clear_module_state->__pyx_n_u_bcf);
jpayne@68 4922 Py_CLEAR(clear_module_state->__pyx_n_u_bed);
jpayne@68 4923 Py_CLEAR(clear_module_state->__pyx_n_s_buffer);
jpayne@68 4924 Py_CLEAR(clear_module_state->__pyx_n_s_buffer_size);
jpayne@68 4925 Py_CLEAR(clear_module_state->__pyx_kp_u_building_of_index_for_failed);
jpayne@68 4926 Py_CLEAR(clear_module_state->__pyx_n_s_bytes_cpy);
jpayne@68 4927 Py_CLEAR(clear_module_state->__pyx_n_s_c);
jpayne@68 4928 Py_CLEAR(clear_module_state->__pyx_n_s_cfilename);
jpayne@68 4929 Py_CLEAR(clear_module_state->__pyx_n_s_cfilename_index);
jpayne@68 4930 Py_CLEAR(clear_module_state->__pyx_n_s_cfn);
jpayne@68 4931 Py_CLEAR(clear_module_state->__pyx_n_s_cline_in_traceback);
jpayne@68 4932 Py_CLEAR(clear_module_state->__pyx_n_s_close);
jpayne@68 4933 Py_CLEAR(clear_module_state->__pyx_n_s_closed);
jpayne@68 4934 Py_CLEAR(clear_module_state->__pyx_n_s_conf);
jpayne@68 4935 Py_CLEAR(clear_module_state->__pyx_n_s_conf_data);
jpayne@68 4936 Py_CLEAR(clear_module_state->__pyx_n_s_contigs);
jpayne@68 4937 Py_CLEAR(clear_module_state->__pyx_kp_u_could_not_create_iterator_for_re);
jpayne@68 4938 Py_CLEAR(clear_module_state->__pyx_kp_u_could_not_create_iterator_possib);
jpayne@68 4939 Py_CLEAR(clear_module_state->__pyx_kp_u_could_not_load_tbi_csi_index_of);
jpayne@68 4940 Py_CLEAR(clear_module_state->__pyx_kp_u_could_not_open_file_s);
jpayne@68 4941 Py_CLEAR(clear_module_state->__pyx_kp_u_could_not_open_for_reading_heade);
jpayne@68 4942 Py_CLEAR(clear_module_state->__pyx_kp_u_could_not_open_index_for_s);
jpayne@68 4943 Py_CLEAR(clear_module_state->__pyx_kp_u_could_not_open_s_for_reading);
jpayne@68 4944 Py_CLEAR(clear_module_state->__pyx_kp_u_could_not_open_s_for_writing);
jpayne@68 4945 Py_CLEAR(clear_module_state->__pyx_n_s_cpy);
jpayne@68 4946 Py_CLEAR(clear_module_state->__pyx_n_s_csi);
jpayne@68 4947 Py_CLEAR(clear_module_state->__pyx_kp_u_csi_2);
jpayne@68 4948 Py_CLEAR(clear_module_state->__pyx_n_s_cstr);
jpayne@68 4949 Py_CLEAR(clear_module_state->__pyx_n_s_dict);
jpayne@68 4950 Py_CLEAR(clear_module_state->__pyx_n_s_dict_2);
jpayne@68 4951 Py_CLEAR(clear_module_state->__pyx_kp_u_disable);
jpayne@68 4952 Py_CLEAR(clear_module_state->__pyx_n_s_doc);
jpayne@68 4953 Py_CLEAR(clear_module_state->__pyx_n_s_dup);
jpayne@68 4954 Py_CLEAR(clear_module_state->__pyx_kp_s_empty_iterator);
jpayne@68 4955 Py_CLEAR(clear_module_state->__pyx_kp_u_enable);
jpayne@68 4956 Py_CLEAR(clear_module_state->__pyx_n_s_encoding);
jpayne@68 4957 Py_CLEAR(clear_module_state->__pyx_n_s_end);
jpayne@68 4958 Py_CLEAR(clear_module_state->__pyx_n_s_end_col);
jpayne@68 4959 Py_CLEAR(clear_module_state->__pyx_kp_u_end_out_of_range_i);
jpayne@68 4960 Py_CLEAR(clear_module_state->__pyx_kp_u_error_i_when_closing_file_s);
jpayne@68 4961 Py_CLEAR(clear_module_state->__pyx_kp_u_error_i_when_writing_to_file_s);
jpayne@68 4962 Py_CLEAR(clear_module_state->__pyx_n_s_exists);
jpayne@68 4963 Py_CLEAR(clear_module_state->__pyx_n_s_fd_src);
jpayne@68 4964 Py_CLEAR(clear_module_state->__pyx_n_s_fetch);
jpayne@68 4965 Py_CLEAR(clear_module_state->__pyx_kp_u_file_s_not_found);
jpayne@68 4966 Py_CLEAR(clear_module_state->__pyx_n_s_filename);
jpayne@68 4967 Py_CLEAR(clear_module_state->__pyx_n_s_filename_in);
jpayne@68 4968 Py_CLEAR(clear_module_state->__pyx_n_s_filename_index);
jpayne@68 4969 Py_CLEAR(clear_module_state->__pyx_n_s_filename_out);
jpayne@68 4970 Py_CLEAR(clear_module_state->__pyx_kp_u_filename_s_already_exists_use_fo);
jpayne@68 4971 Py_CLEAR(clear_module_state->__pyx_n_s_fileobj);
jpayne@68 4972 Py_CLEAR(clear_module_state->__pyx_n_s_fmt);
jpayne@68 4973 Py_CLEAR(clear_module_state->__pyx_n_s_fn);
jpayne@68 4974 Py_CLEAR(clear_module_state->__pyx_n_s_fn_index);
jpayne@68 4975 Py_CLEAR(clear_module_state->__pyx_n_s_fnidx);
jpayne@68 4976 Py_CLEAR(clear_module_state->__pyx_n_s_force);
jpayne@68 4977 Py_CLEAR(clear_module_state->__pyx_n_s_format);
jpayne@68 4978 Py_CLEAR(clear_module_state->__pyx_n_s_fp);
jpayne@68 4979 Py_CLEAR(clear_module_state->__pyx_kp_u_gc);
jpayne@68 4980 Py_CLEAR(clear_module_state->__pyx_n_s_get_encoding);
jpayne@68 4981 Py_CLEAR(clear_module_state->__pyx_n_s_getstate);
jpayne@68 4982 Py_CLEAR(clear_module_state->__pyx_n_u_gff);
jpayne@68 4983 Py_CLEAR(clear_module_state->__pyx_kp_u_gz);
jpayne@68 4984 Py_CLEAR(clear_module_state->__pyx_n_s_import);
jpayne@68 4985 Py_CLEAR(clear_module_state->__pyx_kp_u_incomplete_line_at_s);
jpayne@68 4986 Py_CLEAR(clear_module_state->__pyx_n_s_index);
jpayne@68 4987 Py_CLEAR(clear_module_state->__pyx_kp_u_index_s_not_found);
jpayne@68 4988 Py_CLEAR(clear_module_state->__pyx_n_s_infile);
jpayne@68 4989 Py_CLEAR(clear_module_state->__pyx_n_s_init);
jpayne@68 4990 Py_CLEAR(clear_module_state->__pyx_n_s_init_subclass);
jpayne@68 4991 Py_CLEAR(clear_module_state->__pyx_n_s_initializing);
jpayne@68 4992 Py_CLEAR(clear_module_state->__pyx_kp_u_invalid_file_opening_mode_s);
jpayne@68 4993 Py_CLEAR(clear_module_state->__pyx_n_s_is_coroutine);
jpayne@68 4994 Py_CLEAR(clear_module_state->__pyx_n_s_is_empty);
jpayne@68 4995 Py_CLEAR(clear_module_state->__pyx_n_s_is_open);
jpayne@68 4996 Py_CLEAR(clear_module_state->__pyx_kp_u_isenabled);
jpayne@68 4997 Py_CLEAR(clear_module_state->__pyx_n_s_iter);
jpayne@68 4998 Py_CLEAR(clear_module_state->__pyx_kp_s_iterate_over_infile_Permits_the);
jpayne@68 4999 Py_CLEAR(clear_module_state->__pyx_kp_u_iteration_on_closed_file);
jpayne@68 5000 Py_CLEAR(clear_module_state->__pyx_n_s_itr);
jpayne@68 5001 Py_CLEAR(clear_module_state->__pyx_n_s_keep_original);
jpayne@68 5002 Py_CLEAR(clear_module_state->__pyx_n_s_keys);
jpayne@68 5003 Py_CLEAR(clear_module_state->__pyx_n_s_length);
jpayne@68 5004 Py_CLEAR(clear_module_state->__pyx_n_s_line);
jpayne@68 5005 Py_CLEAR(clear_module_state->__pyx_n_s_line_skip);
jpayne@68 5006 Py_CLEAR(clear_module_state->__pyx_n_s_main);
jpayne@68 5007 Py_CLEAR(clear_module_state->__pyx_n_s_meta_char);
jpayne@68 5008 Py_CLEAR(clear_module_state->__pyx_n_s_metaclass);
jpayne@68 5009 Py_CLEAR(clear_module_state->__pyx_n_s_min_shift);
jpayne@68 5010 Py_CLEAR(clear_module_state->__pyx_n_s_mode);
jpayne@68 5011 Py_CLEAR(clear_module_state->__pyx_n_s_module);
jpayne@68 5012 Py_CLEAR(clear_module_state->__pyx_n_s_multiple_iterators);
jpayne@68 5013 Py_CLEAR(clear_module_state->__pyx_n_s_name);
jpayne@68 5014 Py_CLEAR(clear_module_state->__pyx_n_s_nbytes);
jpayne@68 5015 Py_CLEAR(clear_module_state->__pyx_kp_u_neither_preset_nor_seq_col_start);
jpayne@68 5016 Py_CLEAR(clear_module_state->__pyx_n_s_new);
jpayne@68 5017 Py_CLEAR(clear_module_state->__pyx_n_s_next);
jpayne@68 5018 Py_CLEAR(clear_module_state->__pyx_kp_s_no_default___reduce___due_to_non);
jpayne@68 5019 Py_CLEAR(clear_module_state->__pyx_n_s_open);
jpayne@68 5020 Py_CLEAR(clear_module_state->__pyx_n_s_os);
jpayne@68 5021 Py_CLEAR(clear_module_state->__pyx_kp_u_parse_method_of_s_not_implemente);
jpayne@68 5022 Py_CLEAR(clear_module_state->__pyx_n_s_parser);
jpayne@68 5023 Py_CLEAR(clear_module_state->__pyx_n_s_path);
jpayne@68 5024 Py_CLEAR(clear_module_state->__pyx_n_s_pickle);
jpayne@68 5025 Py_CLEAR(clear_module_state->__pyx_n_s_prepare);
jpayne@68 5026 Py_CLEAR(clear_module_state->__pyx_n_s_preset);
jpayne@68 5027 Py_CLEAR(clear_module_state->__pyx_n_s_preset2conf);
jpayne@68 5028 Py_CLEAR(clear_module_state->__pyx_n_u_psltbl);
jpayne@68 5029 Py_CLEAR(clear_module_state->__pyx_n_s_pysam_libctabix);
jpayne@68 5030 Py_CLEAR(clear_module_state->__pyx_kp_s_pysam_libctabix_pyx);
jpayne@68 5031 Py_CLEAR(clear_module_state->__pyx_n_s_pyx_PickleError);
jpayne@68 5032 Py_CLEAR(clear_module_state->__pyx_n_s_pyx_checksum);
jpayne@68 5033 Py_CLEAR(clear_module_state->__pyx_n_s_pyx_result);
jpayne@68 5034 Py_CLEAR(clear_module_state->__pyx_n_s_pyx_state);
jpayne@68 5035 Py_CLEAR(clear_module_state->__pyx_n_s_pyx_type);
jpayne@68 5036 Py_CLEAR(clear_module_state->__pyx_n_s_pyx_unpickle_Parser);
jpayne@68 5037 Py_CLEAR(clear_module_state->__pyx_n_s_pyx_unpickle_asBed);
jpayne@68 5038 Py_CLEAR(clear_module_state->__pyx_n_s_pyx_unpickle_asGFF3);
jpayne@68 5039 Py_CLEAR(clear_module_state->__pyx_n_s_pyx_unpickle_asGTF);
jpayne@68 5040 Py_CLEAR(clear_module_state->__pyx_n_s_pyx_unpickle_asTuple);
jpayne@68 5041 Py_CLEAR(clear_module_state->__pyx_n_s_pyx_unpickle_asVCF);
jpayne@68 5042 Py_CLEAR(clear_module_state->__pyx_n_s_pyx_vtable);
jpayne@68 5043 Py_CLEAR(clear_module_state->__pyx_n_s_qualname);
jpayne@68 5044 Py_CLEAR(clear_module_state->__pyx_n_s_r);
jpayne@68 5045 Py_CLEAR(clear_module_state->__pyx_n_u_r);
jpayne@68 5046 Py_CLEAR(clear_module_state->__pyx_n_s_readline);
jpayne@68 5047 Py_CLEAR(clear_module_state->__pyx_n_s_reduce);
jpayne@68 5048 Py_CLEAR(clear_module_state->__pyx_n_s_reduce_cython);
jpayne@68 5049 Py_CLEAR(clear_module_state->__pyx_n_s_reduce_ex);
jpayne@68 5050 Py_CLEAR(clear_module_state->__pyx_n_s_reference);
jpayne@68 5051 Py_CLEAR(clear_module_state->__pyx_n_s_region);
jpayne@68 5052 Py_CLEAR(clear_module_state->__pyx_n_s_retval);
jpayne@68 5053 Py_CLEAR(clear_module_state->__pyx_kp_u_s);
jpayne@68 5054 Py_CLEAR(clear_module_state->__pyx_n_s_s_2);
jpayne@68 5055 Py_CLEAR(clear_module_state->__pyx_kp_u_s_i);
jpayne@68 5056 Py_CLEAR(clear_module_state->__pyx_kp_u_s_i_i);
jpayne@68 5057 Py_CLEAR(clear_module_state->__pyx_n_u_sam);
jpayne@68 5058 Py_CLEAR(clear_module_state->__pyx_n_s_self);
jpayne@68 5059 Py_CLEAR(clear_module_state->__pyx_kp_s_self_gzipfile_self_kstream_canno);
jpayne@68 5060 Py_CLEAR(clear_module_state->__pyx_kp_s_self_iterator_cannot_be_converte);
jpayne@68 5061 Py_CLEAR(clear_module_state->__pyx_n_s_seq_col);
jpayne@68 5062 Py_CLEAR(clear_module_state->__pyx_n_s_set_encoding);
jpayne@68 5063 Py_CLEAR(clear_module_state->__pyx_n_s_set_name);
jpayne@68 5064 Py_CLEAR(clear_module_state->__pyx_n_s_setstate);
jpayne@68 5065 Py_CLEAR(clear_module_state->__pyx_n_s_setstate_cython);
jpayne@68 5066 Py_CLEAR(clear_module_state->__pyx_n_s_spec);
jpayne@68 5067 Py_CLEAR(clear_module_state->__pyx_n_s_start);
jpayne@68 5068 Py_CLEAR(clear_module_state->__pyx_n_s_start_col);
jpayne@68 5069 Py_CLEAR(clear_module_state->__pyx_kp_u_start_i_end_i);
jpayne@68 5070 Py_CLEAR(clear_module_state->__pyx_kp_u_start_out_of_range_i);
jpayne@68 5071 Py_CLEAR(clear_module_state->__pyx_n_s_state);
jpayne@68 5072 Py_CLEAR(clear_module_state->__pyx_kp_s_stringsource);
jpayne@68 5073 Py_CLEAR(clear_module_state->__pyx_n_s_suffix);
jpayne@68 5074 Py_CLEAR(clear_module_state->__pyx_n_s_super);
jpayne@68 5075 Py_CLEAR(clear_module_state->__pyx_n_s_sys);
jpayne@68 5076 Py_CLEAR(clear_module_state->__pyx_n_s_tabix_compress);
jpayne@68 5077 Py_CLEAR(clear_module_state->__pyx_n_u_tabix_compress);
jpayne@68 5078 Py_CLEAR(clear_module_state->__pyx_n_s_tabix_file_iterator);
jpayne@68 5079 Py_CLEAR(clear_module_state->__pyx_n_u_tabix_file_iterator);
jpayne@68 5080 Py_CLEAR(clear_module_state->__pyx_n_s_tabix_file_iterator___reduce_cyt);
jpayne@68 5081 Py_CLEAR(clear_module_state->__pyx_n_s_tabix_file_iterator___setstate_c);
jpayne@68 5082 Py_CLEAR(clear_module_state->__pyx_n_s_tabix_generic_iterator);
jpayne@68 5083 Py_CLEAR(clear_module_state->__pyx_n_u_tabix_generic_iterator);
jpayne@68 5084 Py_CLEAR(clear_module_state->__pyx_n_s_tabix_generic_iterator___init);
jpayne@68 5085 Py_CLEAR(clear_module_state->__pyx_n_s_tabix_generic_iterator___iter);
jpayne@68 5086 Py_CLEAR(clear_module_state->__pyx_n_s_tabix_generic_iterator___next);
jpayne@68 5087 Py_CLEAR(clear_module_state->__pyx_n_s_tabix_index);
jpayne@68 5088 Py_CLEAR(clear_module_state->__pyx_n_u_tabix_index);
jpayne@68 5089 Py_CLEAR(clear_module_state->__pyx_n_s_tabix_iterator);
jpayne@68 5090 Py_CLEAR(clear_module_state->__pyx_n_u_tabix_iterator);
jpayne@68 5091 Py_CLEAR(clear_module_state->__pyx_kp_u_tbi);
jpayne@68 5092 Py_CLEAR(clear_module_state->__pyx_n_s_tell);
jpayne@68 5093 Py_CLEAR(clear_module_state->__pyx_n_s_test);
jpayne@68 5094 Py_CLEAR(clear_module_state->__pyx_n_s_threads);
jpayne@68 5095 Py_CLEAR(clear_module_state->__pyx_kp_u_unknown_preset);
jpayne@68 5096 Py_CLEAR(clear_module_state->__pyx_n_s_unlink);
jpayne@68 5097 Py_CLEAR(clear_module_state->__pyx_n_s_update);
jpayne@68 5098 Py_CLEAR(clear_module_state->__pyx_n_s_use_setstate);
jpayne@68 5099 Py_CLEAR(clear_module_state->__pyx_kp_u_valid_presets_are);
jpayne@68 5100 Py_CLEAR(clear_module_state->__pyx_n_u_vcf);
jpayne@68 5101 Py_CLEAR(clear_module_state->__pyx_kp_u_writing_failed);
jpayne@68 5102 Py_CLEAR(clear_module_state->__pyx_n_s_zerobased);
jpayne@68 5103 Py_CLEAR(clear_module_state->__pyx_int_0);
jpayne@68 5104 Py_CLEAR(clear_module_state->__pyx_int_1);
jpayne@68 5105 Py_CLEAR(clear_module_state->__pyx_int_2);
jpayne@68 5106 Py_CLEAR(clear_module_state->__pyx_int_3);
jpayne@68 5107 Py_CLEAR(clear_module_state->__pyx_int_4);
jpayne@68 5108 Py_CLEAR(clear_module_state->__pyx_int_5);
jpayne@68 5109 Py_CLEAR(clear_module_state->__pyx_int_15);
jpayne@68 5110 Py_CLEAR(clear_module_state->__pyx_int_17);
jpayne@68 5111 Py_CLEAR(clear_module_state->__pyx_int_18);
jpayne@68 5112 Py_CLEAR(clear_module_state->__pyx_int_35);
jpayne@68 5113 Py_CLEAR(clear_module_state->__pyx_int_64);
jpayne@68 5114 Py_CLEAR(clear_module_state->__pyx_int_21667264);
jpayne@68 5115 Py_CLEAR(clear_module_state->__pyx_int_139192863);
jpayne@68 5116 Py_CLEAR(clear_module_state->__pyx_int_243541226);
jpayne@68 5117 Py_CLEAR(clear_module_state->__pyx_int_neg_1);
jpayne@68 5118 Py_CLEAR(clear_module_state->__pyx_codeobj_);
jpayne@68 5119 Py_CLEAR(clear_module_state->__pyx_tuple__19);
jpayne@68 5120 Py_CLEAR(clear_module_state->__pyx_tuple__20);
jpayne@68 5121 Py_CLEAR(clear_module_state->__pyx_tuple__24);
jpayne@68 5122 Py_CLEAR(clear_module_state->__pyx_tuple__38);
jpayne@68 5123 Py_CLEAR(clear_module_state->__pyx_tuple__41);
jpayne@68 5124 Py_CLEAR(clear_module_state->__pyx_tuple__45);
jpayne@68 5125 Py_CLEAR(clear_module_state->__pyx_tuple__55);
jpayne@68 5126 Py_CLEAR(clear_module_state->__pyx_tuple__63);
jpayne@68 5127 Py_CLEAR(clear_module_state->__pyx_tuple__64);
jpayne@68 5128 Py_CLEAR(clear_module_state->__pyx_tuple__65);
jpayne@68 5129 Py_CLEAR(clear_module_state->__pyx_tuple__66);
jpayne@68 5130 Py_CLEAR(clear_module_state->__pyx_tuple__67);
jpayne@68 5131 Py_CLEAR(clear_module_state->__pyx_tuple__68);
jpayne@68 5132 Py_CLEAR(clear_module_state->__pyx_tuple__69);
jpayne@68 5133 Py_CLEAR(clear_module_state->__pyx_tuple__70);
jpayne@68 5134 Py_CLEAR(clear_module_state->__pyx_tuple__71);
jpayne@68 5135 Py_CLEAR(clear_module_state->__pyx_tuple__72);
jpayne@68 5136 Py_CLEAR(clear_module_state->__pyx_tuple__73);
jpayne@68 5137 Py_CLEAR(clear_module_state->__pyx_tuple__74);
jpayne@68 5138 Py_CLEAR(clear_module_state->__pyx_tuple__75);
jpayne@68 5139 Py_CLEAR(clear_module_state->__pyx_tuple__76);
jpayne@68 5140 Py_CLEAR(clear_module_state->__pyx_tuple__77);
jpayne@68 5141 Py_CLEAR(clear_module_state->__pyx_codeobj__2);
jpayne@68 5142 Py_CLEAR(clear_module_state->__pyx_codeobj__3);
jpayne@68 5143 Py_CLEAR(clear_module_state->__pyx_codeobj__4);
jpayne@68 5144 Py_CLEAR(clear_module_state->__pyx_codeobj__5);
jpayne@68 5145 Py_CLEAR(clear_module_state->__pyx_codeobj__6);
jpayne@68 5146 Py_CLEAR(clear_module_state->__pyx_codeobj__7);
jpayne@68 5147 Py_CLEAR(clear_module_state->__pyx_codeobj__8);
jpayne@68 5148 Py_CLEAR(clear_module_state->__pyx_codeobj__9);
jpayne@68 5149 Py_CLEAR(clear_module_state->__pyx_codeobj__10);
jpayne@68 5150 Py_CLEAR(clear_module_state->__pyx_codeobj__11);
jpayne@68 5151 Py_CLEAR(clear_module_state->__pyx_codeobj__12);
jpayne@68 5152 Py_CLEAR(clear_module_state->__pyx_codeobj__13);
jpayne@68 5153 Py_CLEAR(clear_module_state->__pyx_codeobj__14);
jpayne@68 5154 Py_CLEAR(clear_module_state->__pyx_codeobj__15);
jpayne@68 5155 Py_CLEAR(clear_module_state->__pyx_codeobj__17);
jpayne@68 5156 Py_CLEAR(clear_module_state->__pyx_codeobj__18);
jpayne@68 5157 Py_CLEAR(clear_module_state->__pyx_codeobj__21);
jpayne@68 5158 Py_CLEAR(clear_module_state->__pyx_codeobj__22);
jpayne@68 5159 Py_CLEAR(clear_module_state->__pyx_codeobj__23);
jpayne@68 5160 Py_CLEAR(clear_module_state->__pyx_codeobj__25);
jpayne@68 5161 Py_CLEAR(clear_module_state->__pyx_codeobj__26);
jpayne@68 5162 Py_CLEAR(clear_module_state->__pyx_codeobj__27);
jpayne@68 5163 Py_CLEAR(clear_module_state->__pyx_codeobj__28);
jpayne@68 5164 Py_CLEAR(clear_module_state->__pyx_codeobj__29);
jpayne@68 5165 Py_CLEAR(clear_module_state->__pyx_codeobj__30);
jpayne@68 5166 Py_CLEAR(clear_module_state->__pyx_codeobj__31);
jpayne@68 5167 Py_CLEAR(clear_module_state->__pyx_codeobj__32);
jpayne@68 5168 Py_CLEAR(clear_module_state->__pyx_codeobj__33);
jpayne@68 5169 Py_CLEAR(clear_module_state->__pyx_codeobj__34);
jpayne@68 5170 Py_CLEAR(clear_module_state->__pyx_codeobj__35);
jpayne@68 5171 Py_CLEAR(clear_module_state->__pyx_codeobj__36);
jpayne@68 5172 Py_CLEAR(clear_module_state->__pyx_codeobj__37);
jpayne@68 5173 Py_CLEAR(clear_module_state->__pyx_codeobj__40);
jpayne@68 5174 Py_CLEAR(clear_module_state->__pyx_codeobj__46);
jpayne@68 5175 Py_CLEAR(clear_module_state->__pyx_codeobj__47);
jpayne@68 5176 Py_CLEAR(clear_module_state->__pyx_codeobj__48);
jpayne@68 5177 Py_CLEAR(clear_module_state->__pyx_codeobj__49);
jpayne@68 5178 Py_CLEAR(clear_module_state->__pyx_codeobj__50);
jpayne@68 5179 Py_CLEAR(clear_module_state->__pyx_codeobj__51);
jpayne@68 5180 Py_CLEAR(clear_module_state->__pyx_codeobj__52);
jpayne@68 5181 Py_CLEAR(clear_module_state->__pyx_codeobj__53);
jpayne@68 5182 Py_CLEAR(clear_module_state->__pyx_codeobj__54);
jpayne@68 5183 Py_CLEAR(clear_module_state->__pyx_codeobj__57);
jpayne@68 5184 Py_CLEAR(clear_module_state->__pyx_codeobj__58);
jpayne@68 5185 Py_CLEAR(clear_module_state->__pyx_codeobj__59);
jpayne@68 5186 Py_CLEAR(clear_module_state->__pyx_codeobj__60);
jpayne@68 5187 Py_CLEAR(clear_module_state->__pyx_codeobj__61);
jpayne@68 5188 return 0;
jpayne@68 5189 }
jpayne@68 5190 #endif
jpayne@68 5191 /* #### Code section: module_state_traverse ### */
jpayne@68 5192 #if CYTHON_USE_MODULE_STATE
jpayne@68 5193 static int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) {
jpayne@68 5194 __pyx_mstate *traverse_module_state = __pyx_mstate(m);
jpayne@68 5195 if (!traverse_module_state) return 0;
jpayne@68 5196 Py_VISIT(traverse_module_state->__pyx_d);
jpayne@68 5197 Py_VISIT(traverse_module_state->__pyx_b);
jpayne@68 5198 Py_VISIT(traverse_module_state->__pyx_cython_runtime);
jpayne@68 5199 Py_VISIT(traverse_module_state->__pyx_empty_tuple);
jpayne@68 5200 Py_VISIT(traverse_module_state->__pyx_empty_bytes);
jpayne@68 5201 Py_VISIT(traverse_module_state->__pyx_empty_unicode);
jpayne@68 5202 #ifdef __Pyx_CyFunction_USED
jpayne@68 5203 Py_VISIT(traverse_module_state->__pyx_CyFunctionType);
jpayne@68 5204 #endif
jpayne@68 5205 #ifdef __Pyx_FusedFunction_USED
jpayne@68 5206 Py_VISIT(traverse_module_state->__pyx_FusedFunctionType);
jpayne@68 5207 #endif
jpayne@68 5208 Py_VISIT(traverse_module_state->__pyx_ptype_5pysam_10libchtslib_HTSFile);
jpayne@68 5209 Py_VISIT(traverse_module_state->__pyx_ptype_7cpython_4type_type);
jpayne@68 5210 Py_VISIT(traverse_module_state->__pyx_ptype_7cpython_4bool_bool);
jpayne@68 5211 Py_VISIT(traverse_module_state->__pyx_ptype_7cpython_7complex_complex);
jpayne@68 5212 Py_VISIT(traverse_module_state->__pyx_ptype_5pysam_16libctabixproxies_TupleProxy);
jpayne@68 5213 Py_VISIT(traverse_module_state->__pyx_ptype_5pysam_16libctabixproxies_TupleProxyIterator);
jpayne@68 5214 Py_VISIT(traverse_module_state->__pyx_ptype_5pysam_16libctabixproxies_NamedTupleProxy);
jpayne@68 5215 Py_VISIT(traverse_module_state->__pyx_ptype_5pysam_16libctabixproxies_GTFProxy);
jpayne@68 5216 Py_VISIT(traverse_module_state->__pyx_ptype_5pysam_16libctabixproxies_GFF3Proxy);
jpayne@68 5217 Py_VISIT(traverse_module_state->__pyx_ptype_5pysam_16libctabixproxies_BedProxy);
jpayne@68 5218 Py_VISIT(traverse_module_state->__pyx_ptype_5pysam_16libctabixproxies_VCFProxy);
jpayne@68 5219 Py_VISIT(traverse_module_state->__pyx_ptype_7cpython_5array_array);
jpayne@68 5220 Py_VISIT(traverse_module_state->__pyx_ptype_5pysam_9libctabix_tabix_file_iterator);
jpayne@68 5221 Py_VISIT(traverse_module_state->__pyx_type_5pysam_9libctabix_tabix_file_iterator);
jpayne@68 5222 Py_VISIT(traverse_module_state->__pyx_ptype_5pysam_9libctabix_TabixFile);
jpayne@68 5223 Py_VISIT(traverse_module_state->__pyx_type_5pysam_9libctabix_TabixFile);
jpayne@68 5224 Py_VISIT(traverse_module_state->__pyx_ptype_5pysam_9libctabix_Parser);
jpayne@68 5225 Py_VISIT(traverse_module_state->__pyx_type_5pysam_9libctabix_Parser);
jpayne@68 5226 Py_VISIT(traverse_module_state->__pyx_ptype_5pysam_9libctabix_asTuple);
jpayne@68 5227 Py_VISIT(traverse_module_state->__pyx_type_5pysam_9libctabix_asTuple);
jpayne@68 5228 Py_VISIT(traverse_module_state->__pyx_ptype_5pysam_9libctabix_asGTF);
jpayne@68 5229 Py_VISIT(traverse_module_state->__pyx_type_5pysam_9libctabix_asGTF);
jpayne@68 5230 Py_VISIT(traverse_module_state->__pyx_ptype_5pysam_9libctabix_asGFF3);
jpayne@68 5231 Py_VISIT(traverse_module_state->__pyx_type_5pysam_9libctabix_asGFF3);
jpayne@68 5232 Py_VISIT(traverse_module_state->__pyx_ptype_5pysam_9libctabix_asBed);
jpayne@68 5233 Py_VISIT(traverse_module_state->__pyx_type_5pysam_9libctabix_asBed);
jpayne@68 5234 Py_VISIT(traverse_module_state->__pyx_ptype_5pysam_9libctabix_asVCF);
jpayne@68 5235 Py_VISIT(traverse_module_state->__pyx_type_5pysam_9libctabix_asVCF);
jpayne@68 5236 Py_VISIT(traverse_module_state->__pyx_ptype_5pysam_9libctabix_TabixIterator);
jpayne@68 5237 Py_VISIT(traverse_module_state->__pyx_type_5pysam_9libctabix_TabixIterator);
jpayne@68 5238 Py_VISIT(traverse_module_state->__pyx_ptype_5pysam_9libctabix_TabixIteratorParsed);
jpayne@68 5239 Py_VISIT(traverse_module_state->__pyx_type_5pysam_9libctabix_TabixIteratorParsed);
jpayne@68 5240 Py_VISIT(traverse_module_state->__pyx_ptype_5pysam_9libctabix_GZIterator);
jpayne@68 5241 Py_VISIT(traverse_module_state->__pyx_type_5pysam_9libctabix_GZIterator);
jpayne@68 5242 Py_VISIT(traverse_module_state->__pyx_ptype_5pysam_9libctabix_GZIteratorHead);
jpayne@68 5243 Py_VISIT(traverse_module_state->__pyx_type_5pysam_9libctabix_GZIteratorHead);
jpayne@68 5244 Py_VISIT(traverse_module_state->__pyx_ptype_5pysam_9libctabix_GZIteratorParsed);
jpayne@68 5245 Py_VISIT(traverse_module_state->__pyx_type_5pysam_9libctabix_GZIteratorParsed);
jpayne@68 5246 Py_VISIT(traverse_module_state->__pyx_ptype_5pysam_9libctabix_Tabixfile);
jpayne@68 5247 Py_VISIT(traverse_module_state->__pyx_type_5pysam_9libctabix_Tabixfile);
jpayne@68 5248 Py_VISIT(traverse_module_state->__pyx_n_s_AssertionError);
jpayne@68 5249 Py_VISIT(traverse_module_state->__pyx_kp_u_Could_not_open_file);
jpayne@68 5250 Py_VISIT(traverse_module_state->__pyx_n_s_EmptyIterator);
jpayne@68 5251 Py_VISIT(traverse_module_state->__pyx_n_s_EmptyIterator___iter);
jpayne@68 5252 Py_VISIT(traverse_module_state->__pyx_n_s_EmptyIterator___next);
jpayne@68 5253 Py_VISIT(traverse_module_state->__pyx_kp_u_Filename_s_already_exists_use_fo);
jpayne@68 5254 Py_VISIT(traverse_module_state->__pyx_n_s_GZIterator);
jpayne@68 5255 Py_VISIT(traverse_module_state->__pyx_n_u_GZIterator);
jpayne@68 5256 Py_VISIT(traverse_module_state->__pyx_n_s_GZIteratorHead);
jpayne@68 5257 Py_VISIT(traverse_module_state->__pyx_n_u_GZIteratorHead);
jpayne@68 5258 Py_VISIT(traverse_module_state->__pyx_n_s_GZIteratorHead___reduce_cython);
jpayne@68 5259 Py_VISIT(traverse_module_state->__pyx_n_s_GZIteratorHead___setstate_cython);
jpayne@68 5260 Py_VISIT(traverse_module_state->__pyx_n_s_GZIteratorParsed);
jpayne@68 5261 Py_VISIT(traverse_module_state->__pyx_n_s_GZIteratorParsed___reduce_cython);
jpayne@68 5262 Py_VISIT(traverse_module_state->__pyx_n_s_GZIteratorParsed___setstate_cyth);
jpayne@68 5263 Py_VISIT(traverse_module_state->__pyx_n_s_GZIterator___reduce_cython);
jpayne@68 5264 Py_VISIT(traverse_module_state->__pyx_n_s_GZIterator___setstate_cython);
jpayne@68 5265 Py_VISIT(traverse_module_state->__pyx_n_s_IOError);
jpayne@68 5266 Py_VISIT(traverse_module_state->__pyx_kp_u_I_O_operation_on_closed_file);
jpayne@68 5267 Py_VISIT(traverse_module_state->__pyx_kp_u_I_O_operation_on_closed_file_2);
jpayne@68 5268 Py_VISIT(traverse_module_state->__pyx_kp_s_Incompatible_checksums_0x_x_vs_0);
jpayne@68 5269 Py_VISIT(traverse_module_state->__pyx_n_s_KeyError);
jpayne@68 5270 Py_VISIT(traverse_module_state->__pyx_n_s_MemoryError);
jpayne@68 5271 Py_VISIT(traverse_module_state->__pyx_kp_u_No_such_file_or_directory_s);
jpayne@68 5272 Py_VISIT(traverse_module_state->__pyx_n_s_NotImplementedError);
jpayne@68 5273 Py_VISIT(traverse_module_state->__pyx_n_s_OSError);
jpayne@68 5274 Py_VISIT(traverse_module_state->__pyx_n_s_O_RDONLY);
jpayne@68 5275 Py_VISIT(traverse_module_state->__pyx_n_s_Parser);
jpayne@68 5276 Py_VISIT(traverse_module_state->__pyx_n_s_Parser___reduce_cython);
jpayne@68 5277 Py_VISIT(traverse_module_state->__pyx_n_s_Parser___setstate_cython);
jpayne@68 5278 Py_VISIT(traverse_module_state->__pyx_n_s_Parser_get_encoding);
jpayne@68 5279 Py_VISIT(traverse_module_state->__pyx_n_s_Parser_set_encoding);
jpayne@68 5280 Py_VISIT(traverse_module_state->__pyx_n_s_PickleError);
jpayne@68 5281 Py_VISIT(traverse_module_state->__pyx_n_s_StopIteration);
jpayne@68 5282 Py_VISIT(traverse_module_state->__pyx_n_s_TabixFile);
jpayne@68 5283 Py_VISIT(traverse_module_state->__pyx_n_u_TabixFile);
jpayne@68 5284 Py_VISIT(traverse_module_state->__pyx_n_s_TabixFile___reduce_cython);
jpayne@68 5285 Py_VISIT(traverse_module_state->__pyx_n_s_TabixFile___setstate_cython);
jpayne@68 5286 Py_VISIT(traverse_module_state->__pyx_n_s_TabixFile__dup);
jpayne@68 5287 Py_VISIT(traverse_module_state->__pyx_n_s_TabixFile__open);
jpayne@68 5288 Py_VISIT(traverse_module_state->__pyx_n_s_TabixFile_close);
jpayne@68 5289 Py_VISIT(traverse_module_state->__pyx_n_s_TabixFile_fetch);
jpayne@68 5290 Py_VISIT(traverse_module_state->__pyx_n_s_TabixIterator);
jpayne@68 5291 Py_VISIT(traverse_module_state->__pyx_n_s_TabixIteratorParsed);
jpayne@68 5292 Py_VISIT(traverse_module_state->__pyx_n_s_TabixIteratorParsed___reduce_cyt);
jpayne@68 5293 Py_VISIT(traverse_module_state->__pyx_n_s_TabixIteratorParsed___setstate_c);
jpayne@68 5294 Py_VISIT(traverse_module_state->__pyx_n_s_TabixIterator___reduce_cython);
jpayne@68 5295 Py_VISIT(traverse_module_state->__pyx_n_s_TabixIterator___setstate_cython);
jpayne@68 5296 Py_VISIT(traverse_module_state->__pyx_n_s_Tabixfile);
jpayne@68 5297 Py_VISIT(traverse_module_state->__pyx_n_u_Tabixfile);
jpayne@68 5298 Py_VISIT(traverse_module_state->__pyx_n_s_Tabixfile___reduce_cython);
jpayne@68 5299 Py_VISIT(traverse_module_state->__pyx_n_s_Tabixfile___setstate_cython);
jpayne@68 5300 Py_VISIT(traverse_module_state->__pyx_n_s_TypeError);
jpayne@68 5301 Py_VISIT(traverse_module_state->__pyx_n_s_ValueError);
jpayne@68 5302 Py_VISIT(traverse_module_state->__pyx_n_s_WINDOW_SIZE);
jpayne@68 5303 Py_VISIT(traverse_module_state->__pyx_kp_b__16);
jpayne@68 5304 Py_VISIT(traverse_module_state->__pyx_kp_u__39);
jpayne@68 5305 Py_VISIT(traverse_module_state->__pyx_kp_u__42);
jpayne@68 5306 Py_VISIT(traverse_module_state->__pyx_kp_u__43);
jpayne@68 5307 Py_VISIT(traverse_module_state->__pyx_kp_u__44);
jpayne@68 5308 Py_VISIT(traverse_module_state->__pyx_kp_u__56);
jpayne@68 5309 Py_VISIT(traverse_module_state->__pyx_n_s__62);
jpayne@68 5310 Py_VISIT(traverse_module_state->__pyx_n_s__78);
jpayne@68 5311 Py_VISIT(traverse_module_state->__pyx_n_s_a);
jpayne@68 5312 Py_VISIT(traverse_module_state->__pyx_n_s_all);
jpayne@68 5313 Py_VISIT(traverse_module_state->__pyx_n_s_asBed);
jpayne@68 5314 Py_VISIT(traverse_module_state->__pyx_n_u_asBed);
jpayne@68 5315 Py_VISIT(traverse_module_state->__pyx_n_s_asBed___reduce_cython);
jpayne@68 5316 Py_VISIT(traverse_module_state->__pyx_n_s_asBed___setstate_cython);
jpayne@68 5317 Py_VISIT(traverse_module_state->__pyx_n_s_asGFF3);
jpayne@68 5318 Py_VISIT(traverse_module_state->__pyx_n_u_asGFF3);
jpayne@68 5319 Py_VISIT(traverse_module_state->__pyx_n_s_asGFF3___reduce_cython);
jpayne@68 5320 Py_VISIT(traverse_module_state->__pyx_n_s_asGFF3___setstate_cython);
jpayne@68 5321 Py_VISIT(traverse_module_state->__pyx_n_s_asGTF);
jpayne@68 5322 Py_VISIT(traverse_module_state->__pyx_n_u_asGTF);
jpayne@68 5323 Py_VISIT(traverse_module_state->__pyx_n_s_asGTF___reduce_cython);
jpayne@68 5324 Py_VISIT(traverse_module_state->__pyx_n_s_asGTF___setstate_cython);
jpayne@68 5325 Py_VISIT(traverse_module_state->__pyx_n_s_asTuple);
jpayne@68 5326 Py_VISIT(traverse_module_state->__pyx_n_u_asTuple);
jpayne@68 5327 Py_VISIT(traverse_module_state->__pyx_n_s_asTuple___reduce_cython);
jpayne@68 5328 Py_VISIT(traverse_module_state->__pyx_n_s_asTuple___setstate_cython);
jpayne@68 5329 Py_VISIT(traverse_module_state->__pyx_n_s_asVCF);
jpayne@68 5330 Py_VISIT(traverse_module_state->__pyx_n_u_asVCF);
jpayne@68 5331 Py_VISIT(traverse_module_state->__pyx_n_s_asVCF___reduce_cython);
jpayne@68 5332 Py_VISIT(traverse_module_state->__pyx_n_s_asVCF___setstate_cython);
jpayne@68 5333 Py_VISIT(traverse_module_state->__pyx_n_u_ascii);
jpayne@68 5334 Py_VISIT(traverse_module_state->__pyx_n_s_asyncio_coroutines);
jpayne@68 5335 Py_VISIT(traverse_module_state->__pyx_n_s_b);
jpayne@68 5336 Py_VISIT(traverse_module_state->__pyx_n_u_bcf);
jpayne@68 5337 Py_VISIT(traverse_module_state->__pyx_n_u_bed);
jpayne@68 5338 Py_VISIT(traverse_module_state->__pyx_n_s_buffer);
jpayne@68 5339 Py_VISIT(traverse_module_state->__pyx_n_s_buffer_size);
jpayne@68 5340 Py_VISIT(traverse_module_state->__pyx_kp_u_building_of_index_for_failed);
jpayne@68 5341 Py_VISIT(traverse_module_state->__pyx_n_s_bytes_cpy);
jpayne@68 5342 Py_VISIT(traverse_module_state->__pyx_n_s_c);
jpayne@68 5343 Py_VISIT(traverse_module_state->__pyx_n_s_cfilename);
jpayne@68 5344 Py_VISIT(traverse_module_state->__pyx_n_s_cfilename_index);
jpayne@68 5345 Py_VISIT(traverse_module_state->__pyx_n_s_cfn);
jpayne@68 5346 Py_VISIT(traverse_module_state->__pyx_n_s_cline_in_traceback);
jpayne@68 5347 Py_VISIT(traverse_module_state->__pyx_n_s_close);
jpayne@68 5348 Py_VISIT(traverse_module_state->__pyx_n_s_closed);
jpayne@68 5349 Py_VISIT(traverse_module_state->__pyx_n_s_conf);
jpayne@68 5350 Py_VISIT(traverse_module_state->__pyx_n_s_conf_data);
jpayne@68 5351 Py_VISIT(traverse_module_state->__pyx_n_s_contigs);
jpayne@68 5352 Py_VISIT(traverse_module_state->__pyx_kp_u_could_not_create_iterator_for_re);
jpayne@68 5353 Py_VISIT(traverse_module_state->__pyx_kp_u_could_not_create_iterator_possib);
jpayne@68 5354 Py_VISIT(traverse_module_state->__pyx_kp_u_could_not_load_tbi_csi_index_of);
jpayne@68 5355 Py_VISIT(traverse_module_state->__pyx_kp_u_could_not_open_file_s);
jpayne@68 5356 Py_VISIT(traverse_module_state->__pyx_kp_u_could_not_open_for_reading_heade);
jpayne@68 5357 Py_VISIT(traverse_module_state->__pyx_kp_u_could_not_open_index_for_s);
jpayne@68 5358 Py_VISIT(traverse_module_state->__pyx_kp_u_could_not_open_s_for_reading);
jpayne@68 5359 Py_VISIT(traverse_module_state->__pyx_kp_u_could_not_open_s_for_writing);
jpayne@68 5360 Py_VISIT(traverse_module_state->__pyx_n_s_cpy);
jpayne@68 5361 Py_VISIT(traverse_module_state->__pyx_n_s_csi);
jpayne@68 5362 Py_VISIT(traverse_module_state->__pyx_kp_u_csi_2);
jpayne@68 5363 Py_VISIT(traverse_module_state->__pyx_n_s_cstr);
jpayne@68 5364 Py_VISIT(traverse_module_state->__pyx_n_s_dict);
jpayne@68 5365 Py_VISIT(traverse_module_state->__pyx_n_s_dict_2);
jpayne@68 5366 Py_VISIT(traverse_module_state->__pyx_kp_u_disable);
jpayne@68 5367 Py_VISIT(traverse_module_state->__pyx_n_s_doc);
jpayne@68 5368 Py_VISIT(traverse_module_state->__pyx_n_s_dup);
jpayne@68 5369 Py_VISIT(traverse_module_state->__pyx_kp_s_empty_iterator);
jpayne@68 5370 Py_VISIT(traverse_module_state->__pyx_kp_u_enable);
jpayne@68 5371 Py_VISIT(traverse_module_state->__pyx_n_s_encoding);
jpayne@68 5372 Py_VISIT(traverse_module_state->__pyx_n_s_end);
jpayne@68 5373 Py_VISIT(traverse_module_state->__pyx_n_s_end_col);
jpayne@68 5374 Py_VISIT(traverse_module_state->__pyx_kp_u_end_out_of_range_i);
jpayne@68 5375 Py_VISIT(traverse_module_state->__pyx_kp_u_error_i_when_closing_file_s);
jpayne@68 5376 Py_VISIT(traverse_module_state->__pyx_kp_u_error_i_when_writing_to_file_s);
jpayne@68 5377 Py_VISIT(traverse_module_state->__pyx_n_s_exists);
jpayne@68 5378 Py_VISIT(traverse_module_state->__pyx_n_s_fd_src);
jpayne@68 5379 Py_VISIT(traverse_module_state->__pyx_n_s_fetch);
jpayne@68 5380 Py_VISIT(traverse_module_state->__pyx_kp_u_file_s_not_found);
jpayne@68 5381 Py_VISIT(traverse_module_state->__pyx_n_s_filename);
jpayne@68 5382 Py_VISIT(traverse_module_state->__pyx_n_s_filename_in);
jpayne@68 5383 Py_VISIT(traverse_module_state->__pyx_n_s_filename_index);
jpayne@68 5384 Py_VISIT(traverse_module_state->__pyx_n_s_filename_out);
jpayne@68 5385 Py_VISIT(traverse_module_state->__pyx_kp_u_filename_s_already_exists_use_fo);
jpayne@68 5386 Py_VISIT(traverse_module_state->__pyx_n_s_fileobj);
jpayne@68 5387 Py_VISIT(traverse_module_state->__pyx_n_s_fmt);
jpayne@68 5388 Py_VISIT(traverse_module_state->__pyx_n_s_fn);
jpayne@68 5389 Py_VISIT(traverse_module_state->__pyx_n_s_fn_index);
jpayne@68 5390 Py_VISIT(traverse_module_state->__pyx_n_s_fnidx);
jpayne@68 5391 Py_VISIT(traverse_module_state->__pyx_n_s_force);
jpayne@68 5392 Py_VISIT(traverse_module_state->__pyx_n_s_format);
jpayne@68 5393 Py_VISIT(traverse_module_state->__pyx_n_s_fp);
jpayne@68 5394 Py_VISIT(traverse_module_state->__pyx_kp_u_gc);
jpayne@68 5395 Py_VISIT(traverse_module_state->__pyx_n_s_get_encoding);
jpayne@68 5396 Py_VISIT(traverse_module_state->__pyx_n_s_getstate);
jpayne@68 5397 Py_VISIT(traverse_module_state->__pyx_n_u_gff);
jpayne@68 5398 Py_VISIT(traverse_module_state->__pyx_kp_u_gz);
jpayne@68 5399 Py_VISIT(traverse_module_state->__pyx_n_s_import);
jpayne@68 5400 Py_VISIT(traverse_module_state->__pyx_kp_u_incomplete_line_at_s);
jpayne@68 5401 Py_VISIT(traverse_module_state->__pyx_n_s_index);
jpayne@68 5402 Py_VISIT(traverse_module_state->__pyx_kp_u_index_s_not_found);
jpayne@68 5403 Py_VISIT(traverse_module_state->__pyx_n_s_infile);
jpayne@68 5404 Py_VISIT(traverse_module_state->__pyx_n_s_init);
jpayne@68 5405 Py_VISIT(traverse_module_state->__pyx_n_s_init_subclass);
jpayne@68 5406 Py_VISIT(traverse_module_state->__pyx_n_s_initializing);
jpayne@68 5407 Py_VISIT(traverse_module_state->__pyx_kp_u_invalid_file_opening_mode_s);
jpayne@68 5408 Py_VISIT(traverse_module_state->__pyx_n_s_is_coroutine);
jpayne@68 5409 Py_VISIT(traverse_module_state->__pyx_n_s_is_empty);
jpayne@68 5410 Py_VISIT(traverse_module_state->__pyx_n_s_is_open);
jpayne@68 5411 Py_VISIT(traverse_module_state->__pyx_kp_u_isenabled);
jpayne@68 5412 Py_VISIT(traverse_module_state->__pyx_n_s_iter);
jpayne@68 5413 Py_VISIT(traverse_module_state->__pyx_kp_s_iterate_over_infile_Permits_the);
jpayne@68 5414 Py_VISIT(traverse_module_state->__pyx_kp_u_iteration_on_closed_file);
jpayne@68 5415 Py_VISIT(traverse_module_state->__pyx_n_s_itr);
jpayne@68 5416 Py_VISIT(traverse_module_state->__pyx_n_s_keep_original);
jpayne@68 5417 Py_VISIT(traverse_module_state->__pyx_n_s_keys);
jpayne@68 5418 Py_VISIT(traverse_module_state->__pyx_n_s_length);
jpayne@68 5419 Py_VISIT(traverse_module_state->__pyx_n_s_line);
jpayne@68 5420 Py_VISIT(traverse_module_state->__pyx_n_s_line_skip);
jpayne@68 5421 Py_VISIT(traverse_module_state->__pyx_n_s_main);
jpayne@68 5422 Py_VISIT(traverse_module_state->__pyx_n_s_meta_char);
jpayne@68 5423 Py_VISIT(traverse_module_state->__pyx_n_s_metaclass);
jpayne@68 5424 Py_VISIT(traverse_module_state->__pyx_n_s_min_shift);
jpayne@68 5425 Py_VISIT(traverse_module_state->__pyx_n_s_mode);
jpayne@68 5426 Py_VISIT(traverse_module_state->__pyx_n_s_module);
jpayne@68 5427 Py_VISIT(traverse_module_state->__pyx_n_s_multiple_iterators);
jpayne@68 5428 Py_VISIT(traverse_module_state->__pyx_n_s_name);
jpayne@68 5429 Py_VISIT(traverse_module_state->__pyx_n_s_nbytes);
jpayne@68 5430 Py_VISIT(traverse_module_state->__pyx_kp_u_neither_preset_nor_seq_col_start);
jpayne@68 5431 Py_VISIT(traverse_module_state->__pyx_n_s_new);
jpayne@68 5432 Py_VISIT(traverse_module_state->__pyx_n_s_next);
jpayne@68 5433 Py_VISIT(traverse_module_state->__pyx_kp_s_no_default___reduce___due_to_non);
jpayne@68 5434 Py_VISIT(traverse_module_state->__pyx_n_s_open);
jpayne@68 5435 Py_VISIT(traverse_module_state->__pyx_n_s_os);
jpayne@68 5436 Py_VISIT(traverse_module_state->__pyx_kp_u_parse_method_of_s_not_implemente);
jpayne@68 5437 Py_VISIT(traverse_module_state->__pyx_n_s_parser);
jpayne@68 5438 Py_VISIT(traverse_module_state->__pyx_n_s_path);
jpayne@68 5439 Py_VISIT(traverse_module_state->__pyx_n_s_pickle);
jpayne@68 5440 Py_VISIT(traverse_module_state->__pyx_n_s_prepare);
jpayne@68 5441 Py_VISIT(traverse_module_state->__pyx_n_s_preset);
jpayne@68 5442 Py_VISIT(traverse_module_state->__pyx_n_s_preset2conf);
jpayne@68 5443 Py_VISIT(traverse_module_state->__pyx_n_u_psltbl);
jpayne@68 5444 Py_VISIT(traverse_module_state->__pyx_n_s_pysam_libctabix);
jpayne@68 5445 Py_VISIT(traverse_module_state->__pyx_kp_s_pysam_libctabix_pyx);
jpayne@68 5446 Py_VISIT(traverse_module_state->__pyx_n_s_pyx_PickleError);
jpayne@68 5447 Py_VISIT(traverse_module_state->__pyx_n_s_pyx_checksum);
jpayne@68 5448 Py_VISIT(traverse_module_state->__pyx_n_s_pyx_result);
jpayne@68 5449 Py_VISIT(traverse_module_state->__pyx_n_s_pyx_state);
jpayne@68 5450 Py_VISIT(traverse_module_state->__pyx_n_s_pyx_type);
jpayne@68 5451 Py_VISIT(traverse_module_state->__pyx_n_s_pyx_unpickle_Parser);
jpayne@68 5452 Py_VISIT(traverse_module_state->__pyx_n_s_pyx_unpickle_asBed);
jpayne@68 5453 Py_VISIT(traverse_module_state->__pyx_n_s_pyx_unpickle_asGFF3);
jpayne@68 5454 Py_VISIT(traverse_module_state->__pyx_n_s_pyx_unpickle_asGTF);
jpayne@68 5455 Py_VISIT(traverse_module_state->__pyx_n_s_pyx_unpickle_asTuple);
jpayne@68 5456 Py_VISIT(traverse_module_state->__pyx_n_s_pyx_unpickle_asVCF);
jpayne@68 5457 Py_VISIT(traverse_module_state->__pyx_n_s_pyx_vtable);
jpayne@68 5458 Py_VISIT(traverse_module_state->__pyx_n_s_qualname);
jpayne@68 5459 Py_VISIT(traverse_module_state->__pyx_n_s_r);
jpayne@68 5460 Py_VISIT(traverse_module_state->__pyx_n_u_r);
jpayne@68 5461 Py_VISIT(traverse_module_state->__pyx_n_s_readline);
jpayne@68 5462 Py_VISIT(traverse_module_state->__pyx_n_s_reduce);
jpayne@68 5463 Py_VISIT(traverse_module_state->__pyx_n_s_reduce_cython);
jpayne@68 5464 Py_VISIT(traverse_module_state->__pyx_n_s_reduce_ex);
jpayne@68 5465 Py_VISIT(traverse_module_state->__pyx_n_s_reference);
jpayne@68 5466 Py_VISIT(traverse_module_state->__pyx_n_s_region);
jpayne@68 5467 Py_VISIT(traverse_module_state->__pyx_n_s_retval);
jpayne@68 5468 Py_VISIT(traverse_module_state->__pyx_kp_u_s);
jpayne@68 5469 Py_VISIT(traverse_module_state->__pyx_n_s_s_2);
jpayne@68 5470 Py_VISIT(traverse_module_state->__pyx_kp_u_s_i);
jpayne@68 5471 Py_VISIT(traverse_module_state->__pyx_kp_u_s_i_i);
jpayne@68 5472 Py_VISIT(traverse_module_state->__pyx_n_u_sam);
jpayne@68 5473 Py_VISIT(traverse_module_state->__pyx_n_s_self);
jpayne@68 5474 Py_VISIT(traverse_module_state->__pyx_kp_s_self_gzipfile_self_kstream_canno);
jpayne@68 5475 Py_VISIT(traverse_module_state->__pyx_kp_s_self_iterator_cannot_be_converte);
jpayne@68 5476 Py_VISIT(traverse_module_state->__pyx_n_s_seq_col);
jpayne@68 5477 Py_VISIT(traverse_module_state->__pyx_n_s_set_encoding);
jpayne@68 5478 Py_VISIT(traverse_module_state->__pyx_n_s_set_name);
jpayne@68 5479 Py_VISIT(traverse_module_state->__pyx_n_s_setstate);
jpayne@68 5480 Py_VISIT(traverse_module_state->__pyx_n_s_setstate_cython);
jpayne@68 5481 Py_VISIT(traverse_module_state->__pyx_n_s_spec);
jpayne@68 5482 Py_VISIT(traverse_module_state->__pyx_n_s_start);
jpayne@68 5483 Py_VISIT(traverse_module_state->__pyx_n_s_start_col);
jpayne@68 5484 Py_VISIT(traverse_module_state->__pyx_kp_u_start_i_end_i);
jpayne@68 5485 Py_VISIT(traverse_module_state->__pyx_kp_u_start_out_of_range_i);
jpayne@68 5486 Py_VISIT(traverse_module_state->__pyx_n_s_state);
jpayne@68 5487 Py_VISIT(traverse_module_state->__pyx_kp_s_stringsource);
jpayne@68 5488 Py_VISIT(traverse_module_state->__pyx_n_s_suffix);
jpayne@68 5489 Py_VISIT(traverse_module_state->__pyx_n_s_super);
jpayne@68 5490 Py_VISIT(traverse_module_state->__pyx_n_s_sys);
jpayne@68 5491 Py_VISIT(traverse_module_state->__pyx_n_s_tabix_compress);
jpayne@68 5492 Py_VISIT(traverse_module_state->__pyx_n_u_tabix_compress);
jpayne@68 5493 Py_VISIT(traverse_module_state->__pyx_n_s_tabix_file_iterator);
jpayne@68 5494 Py_VISIT(traverse_module_state->__pyx_n_u_tabix_file_iterator);
jpayne@68 5495 Py_VISIT(traverse_module_state->__pyx_n_s_tabix_file_iterator___reduce_cyt);
jpayne@68 5496 Py_VISIT(traverse_module_state->__pyx_n_s_tabix_file_iterator___setstate_c);
jpayne@68 5497 Py_VISIT(traverse_module_state->__pyx_n_s_tabix_generic_iterator);
jpayne@68 5498 Py_VISIT(traverse_module_state->__pyx_n_u_tabix_generic_iterator);
jpayne@68 5499 Py_VISIT(traverse_module_state->__pyx_n_s_tabix_generic_iterator___init);
jpayne@68 5500 Py_VISIT(traverse_module_state->__pyx_n_s_tabix_generic_iterator___iter);
jpayne@68 5501 Py_VISIT(traverse_module_state->__pyx_n_s_tabix_generic_iterator___next);
jpayne@68 5502 Py_VISIT(traverse_module_state->__pyx_n_s_tabix_index);
jpayne@68 5503 Py_VISIT(traverse_module_state->__pyx_n_u_tabix_index);
jpayne@68 5504 Py_VISIT(traverse_module_state->__pyx_n_s_tabix_iterator);
jpayne@68 5505 Py_VISIT(traverse_module_state->__pyx_n_u_tabix_iterator);
jpayne@68 5506 Py_VISIT(traverse_module_state->__pyx_kp_u_tbi);
jpayne@68 5507 Py_VISIT(traverse_module_state->__pyx_n_s_tell);
jpayne@68 5508 Py_VISIT(traverse_module_state->__pyx_n_s_test);
jpayne@68 5509 Py_VISIT(traverse_module_state->__pyx_n_s_threads);
jpayne@68 5510 Py_VISIT(traverse_module_state->__pyx_kp_u_unknown_preset);
jpayne@68 5511 Py_VISIT(traverse_module_state->__pyx_n_s_unlink);
jpayne@68 5512 Py_VISIT(traverse_module_state->__pyx_n_s_update);
jpayne@68 5513 Py_VISIT(traverse_module_state->__pyx_n_s_use_setstate);
jpayne@68 5514 Py_VISIT(traverse_module_state->__pyx_kp_u_valid_presets_are);
jpayne@68 5515 Py_VISIT(traverse_module_state->__pyx_n_u_vcf);
jpayne@68 5516 Py_VISIT(traverse_module_state->__pyx_kp_u_writing_failed);
jpayne@68 5517 Py_VISIT(traverse_module_state->__pyx_n_s_zerobased);
jpayne@68 5518 Py_VISIT(traverse_module_state->__pyx_int_0);
jpayne@68 5519 Py_VISIT(traverse_module_state->__pyx_int_1);
jpayne@68 5520 Py_VISIT(traverse_module_state->__pyx_int_2);
jpayne@68 5521 Py_VISIT(traverse_module_state->__pyx_int_3);
jpayne@68 5522 Py_VISIT(traverse_module_state->__pyx_int_4);
jpayne@68 5523 Py_VISIT(traverse_module_state->__pyx_int_5);
jpayne@68 5524 Py_VISIT(traverse_module_state->__pyx_int_15);
jpayne@68 5525 Py_VISIT(traverse_module_state->__pyx_int_17);
jpayne@68 5526 Py_VISIT(traverse_module_state->__pyx_int_18);
jpayne@68 5527 Py_VISIT(traverse_module_state->__pyx_int_35);
jpayne@68 5528 Py_VISIT(traverse_module_state->__pyx_int_64);
jpayne@68 5529 Py_VISIT(traverse_module_state->__pyx_int_21667264);
jpayne@68 5530 Py_VISIT(traverse_module_state->__pyx_int_139192863);
jpayne@68 5531 Py_VISIT(traverse_module_state->__pyx_int_243541226);
jpayne@68 5532 Py_VISIT(traverse_module_state->__pyx_int_neg_1);
jpayne@68 5533 Py_VISIT(traverse_module_state->__pyx_codeobj_);
jpayne@68 5534 Py_VISIT(traverse_module_state->__pyx_tuple__19);
jpayne@68 5535 Py_VISIT(traverse_module_state->__pyx_tuple__20);
jpayne@68 5536 Py_VISIT(traverse_module_state->__pyx_tuple__24);
jpayne@68 5537 Py_VISIT(traverse_module_state->__pyx_tuple__38);
jpayne@68 5538 Py_VISIT(traverse_module_state->__pyx_tuple__41);
jpayne@68 5539 Py_VISIT(traverse_module_state->__pyx_tuple__45);
jpayne@68 5540 Py_VISIT(traverse_module_state->__pyx_tuple__55);
jpayne@68 5541 Py_VISIT(traverse_module_state->__pyx_tuple__63);
jpayne@68 5542 Py_VISIT(traverse_module_state->__pyx_tuple__64);
jpayne@68 5543 Py_VISIT(traverse_module_state->__pyx_tuple__65);
jpayne@68 5544 Py_VISIT(traverse_module_state->__pyx_tuple__66);
jpayne@68 5545 Py_VISIT(traverse_module_state->__pyx_tuple__67);
jpayne@68 5546 Py_VISIT(traverse_module_state->__pyx_tuple__68);
jpayne@68 5547 Py_VISIT(traverse_module_state->__pyx_tuple__69);
jpayne@68 5548 Py_VISIT(traverse_module_state->__pyx_tuple__70);
jpayne@68 5549 Py_VISIT(traverse_module_state->__pyx_tuple__71);
jpayne@68 5550 Py_VISIT(traverse_module_state->__pyx_tuple__72);
jpayne@68 5551 Py_VISIT(traverse_module_state->__pyx_tuple__73);
jpayne@68 5552 Py_VISIT(traverse_module_state->__pyx_tuple__74);
jpayne@68 5553 Py_VISIT(traverse_module_state->__pyx_tuple__75);
jpayne@68 5554 Py_VISIT(traverse_module_state->__pyx_tuple__76);
jpayne@68 5555 Py_VISIT(traverse_module_state->__pyx_tuple__77);
jpayne@68 5556 Py_VISIT(traverse_module_state->__pyx_codeobj__2);
jpayne@68 5557 Py_VISIT(traverse_module_state->__pyx_codeobj__3);
jpayne@68 5558 Py_VISIT(traverse_module_state->__pyx_codeobj__4);
jpayne@68 5559 Py_VISIT(traverse_module_state->__pyx_codeobj__5);
jpayne@68 5560 Py_VISIT(traverse_module_state->__pyx_codeobj__6);
jpayne@68 5561 Py_VISIT(traverse_module_state->__pyx_codeobj__7);
jpayne@68 5562 Py_VISIT(traverse_module_state->__pyx_codeobj__8);
jpayne@68 5563 Py_VISIT(traverse_module_state->__pyx_codeobj__9);
jpayne@68 5564 Py_VISIT(traverse_module_state->__pyx_codeobj__10);
jpayne@68 5565 Py_VISIT(traverse_module_state->__pyx_codeobj__11);
jpayne@68 5566 Py_VISIT(traverse_module_state->__pyx_codeobj__12);
jpayne@68 5567 Py_VISIT(traverse_module_state->__pyx_codeobj__13);
jpayne@68 5568 Py_VISIT(traverse_module_state->__pyx_codeobj__14);
jpayne@68 5569 Py_VISIT(traverse_module_state->__pyx_codeobj__15);
jpayne@68 5570 Py_VISIT(traverse_module_state->__pyx_codeobj__17);
jpayne@68 5571 Py_VISIT(traverse_module_state->__pyx_codeobj__18);
jpayne@68 5572 Py_VISIT(traverse_module_state->__pyx_codeobj__21);
jpayne@68 5573 Py_VISIT(traverse_module_state->__pyx_codeobj__22);
jpayne@68 5574 Py_VISIT(traverse_module_state->__pyx_codeobj__23);
jpayne@68 5575 Py_VISIT(traverse_module_state->__pyx_codeobj__25);
jpayne@68 5576 Py_VISIT(traverse_module_state->__pyx_codeobj__26);
jpayne@68 5577 Py_VISIT(traverse_module_state->__pyx_codeobj__27);
jpayne@68 5578 Py_VISIT(traverse_module_state->__pyx_codeobj__28);
jpayne@68 5579 Py_VISIT(traverse_module_state->__pyx_codeobj__29);
jpayne@68 5580 Py_VISIT(traverse_module_state->__pyx_codeobj__30);
jpayne@68 5581 Py_VISIT(traverse_module_state->__pyx_codeobj__31);
jpayne@68 5582 Py_VISIT(traverse_module_state->__pyx_codeobj__32);
jpayne@68 5583 Py_VISIT(traverse_module_state->__pyx_codeobj__33);
jpayne@68 5584 Py_VISIT(traverse_module_state->__pyx_codeobj__34);
jpayne@68 5585 Py_VISIT(traverse_module_state->__pyx_codeobj__35);
jpayne@68 5586 Py_VISIT(traverse_module_state->__pyx_codeobj__36);
jpayne@68 5587 Py_VISIT(traverse_module_state->__pyx_codeobj__37);
jpayne@68 5588 Py_VISIT(traverse_module_state->__pyx_codeobj__40);
jpayne@68 5589 Py_VISIT(traverse_module_state->__pyx_codeobj__46);
jpayne@68 5590 Py_VISIT(traverse_module_state->__pyx_codeobj__47);
jpayne@68 5591 Py_VISIT(traverse_module_state->__pyx_codeobj__48);
jpayne@68 5592 Py_VISIT(traverse_module_state->__pyx_codeobj__49);
jpayne@68 5593 Py_VISIT(traverse_module_state->__pyx_codeobj__50);
jpayne@68 5594 Py_VISIT(traverse_module_state->__pyx_codeobj__51);
jpayne@68 5595 Py_VISIT(traverse_module_state->__pyx_codeobj__52);
jpayne@68 5596 Py_VISIT(traverse_module_state->__pyx_codeobj__53);
jpayne@68 5597 Py_VISIT(traverse_module_state->__pyx_codeobj__54);
jpayne@68 5598 Py_VISIT(traverse_module_state->__pyx_codeobj__57);
jpayne@68 5599 Py_VISIT(traverse_module_state->__pyx_codeobj__58);
jpayne@68 5600 Py_VISIT(traverse_module_state->__pyx_codeobj__59);
jpayne@68 5601 Py_VISIT(traverse_module_state->__pyx_codeobj__60);
jpayne@68 5602 Py_VISIT(traverse_module_state->__pyx_codeobj__61);
jpayne@68 5603 return 0;
jpayne@68 5604 }
jpayne@68 5605 #endif
jpayne@68 5606 /* #### Code section: module_state_defines ### */
jpayne@68 5607 #define __pyx_d __pyx_mstate_global->__pyx_d
jpayne@68 5608 #define __pyx_b __pyx_mstate_global->__pyx_b
jpayne@68 5609 #define __pyx_cython_runtime __pyx_mstate_global->__pyx_cython_runtime
jpayne@68 5610 #define __pyx_empty_tuple __pyx_mstate_global->__pyx_empty_tuple
jpayne@68 5611 #define __pyx_empty_bytes __pyx_mstate_global->__pyx_empty_bytes
jpayne@68 5612 #define __pyx_empty_unicode __pyx_mstate_global->__pyx_empty_unicode
jpayne@68 5613 #ifdef __Pyx_CyFunction_USED
jpayne@68 5614 #define __pyx_CyFunctionType __pyx_mstate_global->__pyx_CyFunctionType
jpayne@68 5615 #endif
jpayne@68 5616 #ifdef __Pyx_FusedFunction_USED
jpayne@68 5617 #define __pyx_FusedFunctionType __pyx_mstate_global->__pyx_FusedFunctionType
jpayne@68 5618 #endif
jpayne@68 5619 #ifdef __Pyx_Generator_USED
jpayne@68 5620 #define __pyx_GeneratorType __pyx_mstate_global->__pyx_GeneratorType
jpayne@68 5621 #endif
jpayne@68 5622 #ifdef __Pyx_IterableCoroutine_USED
jpayne@68 5623 #define __pyx_IterableCoroutineType __pyx_mstate_global->__pyx_IterableCoroutineType
jpayne@68 5624 #endif
jpayne@68 5625 #ifdef __Pyx_Coroutine_USED
jpayne@68 5626 #define __pyx_CoroutineAwaitType __pyx_mstate_global->__pyx_CoroutineAwaitType
jpayne@68 5627 #endif
jpayne@68 5628 #ifdef __Pyx_Coroutine_USED
jpayne@68 5629 #define __pyx_CoroutineType __pyx_mstate_global->__pyx_CoroutineType
jpayne@68 5630 #endif
jpayne@68 5631 #if CYTHON_USE_MODULE_STATE
jpayne@68 5632 #endif
jpayne@68 5633 #if CYTHON_USE_MODULE_STATE
jpayne@68 5634 #endif
jpayne@68 5635 #if CYTHON_USE_MODULE_STATE
jpayne@68 5636 #endif
jpayne@68 5637 #if CYTHON_USE_MODULE_STATE
jpayne@68 5638 #endif
jpayne@68 5639 #if CYTHON_USE_MODULE_STATE
jpayne@68 5640 #endif
jpayne@68 5641 #if CYTHON_USE_MODULE_STATE
jpayne@68 5642 #endif
jpayne@68 5643 #define __pyx_ptype_5pysam_10libchtslib_HTSFile __pyx_mstate_global->__pyx_ptype_5pysam_10libchtslib_HTSFile
jpayne@68 5644 #if CYTHON_USE_MODULE_STATE
jpayne@68 5645 #endif
jpayne@68 5646 #if CYTHON_USE_MODULE_STATE
jpayne@68 5647 #endif
jpayne@68 5648 #if CYTHON_USE_MODULE_STATE
jpayne@68 5649 #endif
jpayne@68 5650 #if CYTHON_USE_MODULE_STATE
jpayne@68 5651 #endif
jpayne@68 5652 #if CYTHON_USE_MODULE_STATE
jpayne@68 5653 #endif
jpayne@68 5654 #define __pyx_ptype_7cpython_4type_type __pyx_mstate_global->__pyx_ptype_7cpython_4type_type
jpayne@68 5655 #if CYTHON_USE_MODULE_STATE
jpayne@68 5656 #endif
jpayne@68 5657 #if CYTHON_USE_MODULE_STATE
jpayne@68 5658 #endif
jpayne@68 5659 #if CYTHON_USE_MODULE_STATE
jpayne@68 5660 #endif
jpayne@68 5661 #if CYTHON_USE_MODULE_STATE
jpayne@68 5662 #endif
jpayne@68 5663 #if CYTHON_USE_MODULE_STATE
jpayne@68 5664 #endif
jpayne@68 5665 #if CYTHON_USE_MODULE_STATE
jpayne@68 5666 #endif
jpayne@68 5667 #if CYTHON_USE_MODULE_STATE
jpayne@68 5668 #endif
jpayne@68 5669 #if CYTHON_USE_MODULE_STATE
jpayne@68 5670 #endif
jpayne@68 5671 #if CYTHON_USE_MODULE_STATE
jpayne@68 5672 #endif
jpayne@68 5673 #if CYTHON_USE_MODULE_STATE
jpayne@68 5674 #endif
jpayne@68 5675 #if CYTHON_USE_MODULE_STATE
jpayne@68 5676 #endif
jpayne@68 5677 #if CYTHON_USE_MODULE_STATE
jpayne@68 5678 #endif
jpayne@68 5679 #if CYTHON_USE_MODULE_STATE
jpayne@68 5680 #endif
jpayne@68 5681 #if CYTHON_USE_MODULE_STATE
jpayne@68 5682 #endif
jpayne@68 5683 #define __pyx_ptype_7cpython_4bool_bool __pyx_mstate_global->__pyx_ptype_7cpython_4bool_bool
jpayne@68 5684 #if CYTHON_USE_MODULE_STATE
jpayne@68 5685 #endif
jpayne@68 5686 #if CYTHON_USE_MODULE_STATE
jpayne@68 5687 #endif
jpayne@68 5688 #if CYTHON_USE_MODULE_STATE
jpayne@68 5689 #endif
jpayne@68 5690 #if CYTHON_USE_MODULE_STATE
jpayne@68 5691 #endif
jpayne@68 5692 #define __pyx_ptype_7cpython_7complex_complex __pyx_mstate_global->__pyx_ptype_7cpython_7complex_complex
jpayne@68 5693 #if CYTHON_USE_MODULE_STATE
jpayne@68 5694 #endif
jpayne@68 5695 #if CYTHON_USE_MODULE_STATE
jpayne@68 5696 #endif
jpayne@68 5697 #if CYTHON_USE_MODULE_STATE
jpayne@68 5698 #endif
jpayne@68 5699 #if CYTHON_USE_MODULE_STATE
jpayne@68 5700 #endif
jpayne@68 5701 #if CYTHON_USE_MODULE_STATE
jpayne@68 5702 #endif
jpayne@68 5703 #if CYTHON_USE_MODULE_STATE
jpayne@68 5704 #endif
jpayne@68 5705 #if CYTHON_USE_MODULE_STATE
jpayne@68 5706 #endif
jpayne@68 5707 #if CYTHON_USE_MODULE_STATE
jpayne@68 5708 #endif
jpayne@68 5709 #if CYTHON_USE_MODULE_STATE
jpayne@68 5710 #endif
jpayne@68 5711 #if CYTHON_USE_MODULE_STATE
jpayne@68 5712 #endif
jpayne@68 5713 #if CYTHON_USE_MODULE_STATE
jpayne@68 5714 #endif
jpayne@68 5715 #if CYTHON_USE_MODULE_STATE
jpayne@68 5716 #endif
jpayne@68 5717 #if CYTHON_USE_MODULE_STATE
jpayne@68 5718 #endif
jpayne@68 5719 #if CYTHON_USE_MODULE_STATE
jpayne@68 5720 #endif
jpayne@68 5721 #if CYTHON_USE_MODULE_STATE
jpayne@68 5722 #endif
jpayne@68 5723 #if CYTHON_USE_MODULE_STATE
jpayne@68 5724 #endif
jpayne@68 5725 #if CYTHON_USE_MODULE_STATE
jpayne@68 5726 #endif
jpayne@68 5727 #if CYTHON_USE_MODULE_STATE
jpayne@68 5728 #endif
jpayne@68 5729 #if CYTHON_USE_MODULE_STATE
jpayne@68 5730 #endif
jpayne@68 5731 #if CYTHON_USE_MODULE_STATE
jpayne@68 5732 #endif
jpayne@68 5733 #if CYTHON_USE_MODULE_STATE
jpayne@68 5734 #endif
jpayne@68 5735 #define __pyx_ptype_5pysam_16libctabixproxies_TupleProxy __pyx_mstate_global->__pyx_ptype_5pysam_16libctabixproxies_TupleProxy
jpayne@68 5736 #define __pyx_ptype_5pysam_16libctabixproxies_TupleProxyIterator __pyx_mstate_global->__pyx_ptype_5pysam_16libctabixproxies_TupleProxyIterator
jpayne@68 5737 #define __pyx_ptype_5pysam_16libctabixproxies_NamedTupleProxy __pyx_mstate_global->__pyx_ptype_5pysam_16libctabixproxies_NamedTupleProxy
jpayne@68 5738 #define __pyx_ptype_5pysam_16libctabixproxies_GTFProxy __pyx_mstate_global->__pyx_ptype_5pysam_16libctabixproxies_GTFProxy
jpayne@68 5739 #define __pyx_ptype_5pysam_16libctabixproxies_GFF3Proxy __pyx_mstate_global->__pyx_ptype_5pysam_16libctabixproxies_GFF3Proxy
jpayne@68 5740 #define __pyx_ptype_5pysam_16libctabixproxies_BedProxy __pyx_mstate_global->__pyx_ptype_5pysam_16libctabixproxies_BedProxy
jpayne@68 5741 #define __pyx_ptype_5pysam_16libctabixproxies_VCFProxy __pyx_mstate_global->__pyx_ptype_5pysam_16libctabixproxies_VCFProxy
jpayne@68 5742 #if CYTHON_USE_MODULE_STATE
jpayne@68 5743 #endif
jpayne@68 5744 #if CYTHON_USE_MODULE_STATE
jpayne@68 5745 #endif
jpayne@68 5746 #if CYTHON_USE_MODULE_STATE
jpayne@68 5747 #endif
jpayne@68 5748 #define __pyx_ptype_7cpython_5array_array __pyx_mstate_global->__pyx_ptype_7cpython_5array_array
jpayne@68 5749 #if CYTHON_USE_MODULE_STATE
jpayne@68 5750 #endif
jpayne@68 5751 #if CYTHON_USE_MODULE_STATE
jpayne@68 5752 #define __pyx_type_5pysam_9libctabix_tabix_file_iterator __pyx_mstate_global->__pyx_type_5pysam_9libctabix_tabix_file_iterator
jpayne@68 5753 #define __pyx_type_5pysam_9libctabix_TabixFile __pyx_mstate_global->__pyx_type_5pysam_9libctabix_TabixFile
jpayne@68 5754 #define __pyx_type_5pysam_9libctabix_Parser __pyx_mstate_global->__pyx_type_5pysam_9libctabix_Parser
jpayne@68 5755 #define __pyx_type_5pysam_9libctabix_asTuple __pyx_mstate_global->__pyx_type_5pysam_9libctabix_asTuple
jpayne@68 5756 #define __pyx_type_5pysam_9libctabix_asGTF __pyx_mstate_global->__pyx_type_5pysam_9libctabix_asGTF
jpayne@68 5757 #define __pyx_type_5pysam_9libctabix_asGFF3 __pyx_mstate_global->__pyx_type_5pysam_9libctabix_asGFF3
jpayne@68 5758 #define __pyx_type_5pysam_9libctabix_asBed __pyx_mstate_global->__pyx_type_5pysam_9libctabix_asBed
jpayne@68 5759 #define __pyx_type_5pysam_9libctabix_asVCF __pyx_mstate_global->__pyx_type_5pysam_9libctabix_asVCF
jpayne@68 5760 #define __pyx_type_5pysam_9libctabix_TabixIterator __pyx_mstate_global->__pyx_type_5pysam_9libctabix_TabixIterator
jpayne@68 5761 #define __pyx_type_5pysam_9libctabix_TabixIteratorParsed __pyx_mstate_global->__pyx_type_5pysam_9libctabix_TabixIteratorParsed
jpayne@68 5762 #define __pyx_type_5pysam_9libctabix_GZIterator __pyx_mstate_global->__pyx_type_5pysam_9libctabix_GZIterator
jpayne@68 5763 #define __pyx_type_5pysam_9libctabix_GZIteratorHead __pyx_mstate_global->__pyx_type_5pysam_9libctabix_GZIteratorHead
jpayne@68 5764 #define __pyx_type_5pysam_9libctabix_GZIteratorParsed __pyx_mstate_global->__pyx_type_5pysam_9libctabix_GZIteratorParsed
jpayne@68 5765 #define __pyx_type_5pysam_9libctabix_Tabixfile __pyx_mstate_global->__pyx_type_5pysam_9libctabix_Tabixfile
jpayne@68 5766 #endif
jpayne@68 5767 #define __pyx_ptype_5pysam_9libctabix_tabix_file_iterator __pyx_mstate_global->__pyx_ptype_5pysam_9libctabix_tabix_file_iterator
jpayne@68 5768 #define __pyx_ptype_5pysam_9libctabix_TabixFile __pyx_mstate_global->__pyx_ptype_5pysam_9libctabix_TabixFile
jpayne@68 5769 #define __pyx_ptype_5pysam_9libctabix_Parser __pyx_mstate_global->__pyx_ptype_5pysam_9libctabix_Parser
jpayne@68 5770 #define __pyx_ptype_5pysam_9libctabix_asTuple __pyx_mstate_global->__pyx_ptype_5pysam_9libctabix_asTuple
jpayne@68 5771 #define __pyx_ptype_5pysam_9libctabix_asGTF __pyx_mstate_global->__pyx_ptype_5pysam_9libctabix_asGTF
jpayne@68 5772 #define __pyx_ptype_5pysam_9libctabix_asGFF3 __pyx_mstate_global->__pyx_ptype_5pysam_9libctabix_asGFF3
jpayne@68 5773 #define __pyx_ptype_5pysam_9libctabix_asBed __pyx_mstate_global->__pyx_ptype_5pysam_9libctabix_asBed
jpayne@68 5774 #define __pyx_ptype_5pysam_9libctabix_asVCF __pyx_mstate_global->__pyx_ptype_5pysam_9libctabix_asVCF
jpayne@68 5775 #define __pyx_ptype_5pysam_9libctabix_TabixIterator __pyx_mstate_global->__pyx_ptype_5pysam_9libctabix_TabixIterator
jpayne@68 5776 #define __pyx_ptype_5pysam_9libctabix_TabixIteratorParsed __pyx_mstate_global->__pyx_ptype_5pysam_9libctabix_TabixIteratorParsed
jpayne@68 5777 #define __pyx_ptype_5pysam_9libctabix_GZIterator __pyx_mstate_global->__pyx_ptype_5pysam_9libctabix_GZIterator
jpayne@68 5778 #define __pyx_ptype_5pysam_9libctabix_GZIteratorHead __pyx_mstate_global->__pyx_ptype_5pysam_9libctabix_GZIteratorHead
jpayne@68 5779 #define __pyx_ptype_5pysam_9libctabix_GZIteratorParsed __pyx_mstate_global->__pyx_ptype_5pysam_9libctabix_GZIteratorParsed
jpayne@68 5780 #define __pyx_ptype_5pysam_9libctabix_Tabixfile __pyx_mstate_global->__pyx_ptype_5pysam_9libctabix_Tabixfile
jpayne@68 5781 #define __pyx_n_s_AssertionError __pyx_mstate_global->__pyx_n_s_AssertionError
jpayne@68 5782 #define __pyx_kp_u_Could_not_open_file __pyx_mstate_global->__pyx_kp_u_Could_not_open_file
jpayne@68 5783 #define __pyx_n_s_EmptyIterator __pyx_mstate_global->__pyx_n_s_EmptyIterator
jpayne@68 5784 #define __pyx_n_s_EmptyIterator___iter __pyx_mstate_global->__pyx_n_s_EmptyIterator___iter
jpayne@68 5785 #define __pyx_n_s_EmptyIterator___next __pyx_mstate_global->__pyx_n_s_EmptyIterator___next
jpayne@68 5786 #define __pyx_kp_u_Filename_s_already_exists_use_fo __pyx_mstate_global->__pyx_kp_u_Filename_s_already_exists_use_fo
jpayne@68 5787 #define __pyx_n_s_GZIterator __pyx_mstate_global->__pyx_n_s_GZIterator
jpayne@68 5788 #define __pyx_n_u_GZIterator __pyx_mstate_global->__pyx_n_u_GZIterator
jpayne@68 5789 #define __pyx_n_s_GZIteratorHead __pyx_mstate_global->__pyx_n_s_GZIteratorHead
jpayne@68 5790 #define __pyx_n_u_GZIteratorHead __pyx_mstate_global->__pyx_n_u_GZIteratorHead
jpayne@68 5791 #define __pyx_n_s_GZIteratorHead___reduce_cython __pyx_mstate_global->__pyx_n_s_GZIteratorHead___reduce_cython
jpayne@68 5792 #define __pyx_n_s_GZIteratorHead___setstate_cython __pyx_mstate_global->__pyx_n_s_GZIteratorHead___setstate_cython
jpayne@68 5793 #define __pyx_n_s_GZIteratorParsed __pyx_mstate_global->__pyx_n_s_GZIteratorParsed
jpayne@68 5794 #define __pyx_n_s_GZIteratorParsed___reduce_cython __pyx_mstate_global->__pyx_n_s_GZIteratorParsed___reduce_cython
jpayne@68 5795 #define __pyx_n_s_GZIteratorParsed___setstate_cyth __pyx_mstate_global->__pyx_n_s_GZIteratorParsed___setstate_cyth
jpayne@68 5796 #define __pyx_n_s_GZIterator___reduce_cython __pyx_mstate_global->__pyx_n_s_GZIterator___reduce_cython
jpayne@68 5797 #define __pyx_n_s_GZIterator___setstate_cython __pyx_mstate_global->__pyx_n_s_GZIterator___setstate_cython
jpayne@68 5798 #define __pyx_n_s_IOError __pyx_mstate_global->__pyx_n_s_IOError
jpayne@68 5799 #define __pyx_kp_u_I_O_operation_on_closed_file __pyx_mstate_global->__pyx_kp_u_I_O_operation_on_closed_file
jpayne@68 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@68 5801 #define __pyx_kp_s_Incompatible_checksums_0x_x_vs_0 __pyx_mstate_global->__pyx_kp_s_Incompatible_checksums_0x_x_vs_0
jpayne@68 5802 #define __pyx_n_s_KeyError __pyx_mstate_global->__pyx_n_s_KeyError
jpayne@68 5803 #define __pyx_n_s_MemoryError __pyx_mstate_global->__pyx_n_s_MemoryError
jpayne@68 5804 #define __pyx_kp_u_No_such_file_or_directory_s __pyx_mstate_global->__pyx_kp_u_No_such_file_or_directory_s
jpayne@68 5805 #define __pyx_n_s_NotImplementedError __pyx_mstate_global->__pyx_n_s_NotImplementedError
jpayne@68 5806 #define __pyx_n_s_OSError __pyx_mstate_global->__pyx_n_s_OSError
jpayne@68 5807 #define __pyx_n_s_O_RDONLY __pyx_mstate_global->__pyx_n_s_O_RDONLY
jpayne@68 5808 #define __pyx_n_s_Parser __pyx_mstate_global->__pyx_n_s_Parser
jpayne@68 5809 #define __pyx_n_s_Parser___reduce_cython __pyx_mstate_global->__pyx_n_s_Parser___reduce_cython
jpayne@68 5810 #define __pyx_n_s_Parser___setstate_cython __pyx_mstate_global->__pyx_n_s_Parser___setstate_cython
jpayne@68 5811 #define __pyx_n_s_Parser_get_encoding __pyx_mstate_global->__pyx_n_s_Parser_get_encoding
jpayne@68 5812 #define __pyx_n_s_Parser_set_encoding __pyx_mstate_global->__pyx_n_s_Parser_set_encoding
jpayne@68 5813 #define __pyx_n_s_PickleError __pyx_mstate_global->__pyx_n_s_PickleError
jpayne@68 5814 #define __pyx_n_s_StopIteration __pyx_mstate_global->__pyx_n_s_StopIteration
jpayne@68 5815 #define __pyx_n_s_TabixFile __pyx_mstate_global->__pyx_n_s_TabixFile
jpayne@68 5816 #define __pyx_n_u_TabixFile __pyx_mstate_global->__pyx_n_u_TabixFile
jpayne@68 5817 #define __pyx_n_s_TabixFile___reduce_cython __pyx_mstate_global->__pyx_n_s_TabixFile___reduce_cython
jpayne@68 5818 #define __pyx_n_s_TabixFile___setstate_cython __pyx_mstate_global->__pyx_n_s_TabixFile___setstate_cython
jpayne@68 5819 #define __pyx_n_s_TabixFile__dup __pyx_mstate_global->__pyx_n_s_TabixFile__dup
jpayne@68 5820 #define __pyx_n_s_TabixFile__open __pyx_mstate_global->__pyx_n_s_TabixFile__open
jpayne@68 5821 #define __pyx_n_s_TabixFile_close __pyx_mstate_global->__pyx_n_s_TabixFile_close
jpayne@68 5822 #define __pyx_n_s_TabixFile_fetch __pyx_mstate_global->__pyx_n_s_TabixFile_fetch
jpayne@68 5823 #define __pyx_n_s_TabixIterator __pyx_mstate_global->__pyx_n_s_TabixIterator
jpayne@68 5824 #define __pyx_n_s_TabixIteratorParsed __pyx_mstate_global->__pyx_n_s_TabixIteratorParsed
jpayne@68 5825 #define __pyx_n_s_TabixIteratorParsed___reduce_cyt __pyx_mstate_global->__pyx_n_s_TabixIteratorParsed___reduce_cyt
jpayne@68 5826 #define __pyx_n_s_TabixIteratorParsed___setstate_c __pyx_mstate_global->__pyx_n_s_TabixIteratorParsed___setstate_c
jpayne@68 5827 #define __pyx_n_s_TabixIterator___reduce_cython __pyx_mstate_global->__pyx_n_s_TabixIterator___reduce_cython
jpayne@68 5828 #define __pyx_n_s_TabixIterator___setstate_cython __pyx_mstate_global->__pyx_n_s_TabixIterator___setstate_cython
jpayne@68 5829 #define __pyx_n_s_Tabixfile __pyx_mstate_global->__pyx_n_s_Tabixfile
jpayne@68 5830 #define __pyx_n_u_Tabixfile __pyx_mstate_global->__pyx_n_u_Tabixfile
jpayne@68 5831 #define __pyx_n_s_Tabixfile___reduce_cython __pyx_mstate_global->__pyx_n_s_Tabixfile___reduce_cython
jpayne@68 5832 #define __pyx_n_s_Tabixfile___setstate_cython __pyx_mstate_global->__pyx_n_s_Tabixfile___setstate_cython
jpayne@68 5833 #define __pyx_n_s_TypeError __pyx_mstate_global->__pyx_n_s_TypeError
jpayne@68 5834 #define __pyx_n_s_ValueError __pyx_mstate_global->__pyx_n_s_ValueError
jpayne@68 5835 #define __pyx_n_s_WINDOW_SIZE __pyx_mstate_global->__pyx_n_s_WINDOW_SIZE
jpayne@68 5836 #define __pyx_kp_b__16 __pyx_mstate_global->__pyx_kp_b__16
jpayne@68 5837 #define __pyx_kp_u__39 __pyx_mstate_global->__pyx_kp_u__39
jpayne@68 5838 #define __pyx_kp_u__42 __pyx_mstate_global->__pyx_kp_u__42
jpayne@68 5839 #define __pyx_kp_u__43 __pyx_mstate_global->__pyx_kp_u__43
jpayne@68 5840 #define __pyx_kp_u__44 __pyx_mstate_global->__pyx_kp_u__44
jpayne@68 5841 #define __pyx_kp_u__56 __pyx_mstate_global->__pyx_kp_u__56
jpayne@68 5842 #define __pyx_n_s__62 __pyx_mstate_global->__pyx_n_s__62
jpayne@68 5843 #define __pyx_n_s__78 __pyx_mstate_global->__pyx_n_s__78
jpayne@68 5844 #define __pyx_n_s_a __pyx_mstate_global->__pyx_n_s_a
jpayne@68 5845 #define __pyx_n_s_all __pyx_mstate_global->__pyx_n_s_all
jpayne@68 5846 #define __pyx_n_s_asBed __pyx_mstate_global->__pyx_n_s_asBed
jpayne@68 5847 #define __pyx_n_u_asBed __pyx_mstate_global->__pyx_n_u_asBed
jpayne@68 5848 #define __pyx_n_s_asBed___reduce_cython __pyx_mstate_global->__pyx_n_s_asBed___reduce_cython
jpayne@68 5849 #define __pyx_n_s_asBed___setstate_cython __pyx_mstate_global->__pyx_n_s_asBed___setstate_cython
jpayne@68 5850 #define __pyx_n_s_asGFF3 __pyx_mstate_global->__pyx_n_s_asGFF3
jpayne@68 5851 #define __pyx_n_u_asGFF3 __pyx_mstate_global->__pyx_n_u_asGFF3
jpayne@68 5852 #define __pyx_n_s_asGFF3___reduce_cython __pyx_mstate_global->__pyx_n_s_asGFF3___reduce_cython
jpayne@68 5853 #define __pyx_n_s_asGFF3___setstate_cython __pyx_mstate_global->__pyx_n_s_asGFF3___setstate_cython
jpayne@68 5854 #define __pyx_n_s_asGTF __pyx_mstate_global->__pyx_n_s_asGTF
jpayne@68 5855 #define __pyx_n_u_asGTF __pyx_mstate_global->__pyx_n_u_asGTF
jpayne@68 5856 #define __pyx_n_s_asGTF___reduce_cython __pyx_mstate_global->__pyx_n_s_asGTF___reduce_cython
jpayne@68 5857 #define __pyx_n_s_asGTF___setstate_cython __pyx_mstate_global->__pyx_n_s_asGTF___setstate_cython
jpayne@68 5858 #define __pyx_n_s_asTuple __pyx_mstate_global->__pyx_n_s_asTuple
jpayne@68 5859 #define __pyx_n_u_asTuple __pyx_mstate_global->__pyx_n_u_asTuple
jpayne@68 5860 #define __pyx_n_s_asTuple___reduce_cython __pyx_mstate_global->__pyx_n_s_asTuple___reduce_cython
jpayne@68 5861 #define __pyx_n_s_asTuple___setstate_cython __pyx_mstate_global->__pyx_n_s_asTuple___setstate_cython
jpayne@68 5862 #define __pyx_n_s_asVCF __pyx_mstate_global->__pyx_n_s_asVCF
jpayne@68 5863 #define __pyx_n_u_asVCF __pyx_mstate_global->__pyx_n_u_asVCF
jpayne@68 5864 #define __pyx_n_s_asVCF___reduce_cython __pyx_mstate_global->__pyx_n_s_asVCF___reduce_cython
jpayne@68 5865 #define __pyx_n_s_asVCF___setstate_cython __pyx_mstate_global->__pyx_n_s_asVCF___setstate_cython
jpayne@68 5866 #define __pyx_n_u_ascii __pyx_mstate_global->__pyx_n_u_ascii
jpayne@68 5867 #define __pyx_n_s_asyncio_coroutines __pyx_mstate_global->__pyx_n_s_asyncio_coroutines
jpayne@68 5868 #define __pyx_n_s_b __pyx_mstate_global->__pyx_n_s_b
jpayne@68 5869 #define __pyx_n_u_bcf __pyx_mstate_global->__pyx_n_u_bcf
jpayne@68 5870 #define __pyx_n_u_bed __pyx_mstate_global->__pyx_n_u_bed
jpayne@68 5871 #define __pyx_n_s_buffer __pyx_mstate_global->__pyx_n_s_buffer
jpayne@68 5872 #define __pyx_n_s_buffer_size __pyx_mstate_global->__pyx_n_s_buffer_size
jpayne@68 5873 #define __pyx_kp_u_building_of_index_for_failed __pyx_mstate_global->__pyx_kp_u_building_of_index_for_failed
jpayne@68 5874 #define __pyx_n_s_bytes_cpy __pyx_mstate_global->__pyx_n_s_bytes_cpy
jpayne@68 5875 #define __pyx_n_s_c __pyx_mstate_global->__pyx_n_s_c
jpayne@68 5876 #define __pyx_n_s_cfilename __pyx_mstate_global->__pyx_n_s_cfilename
jpayne@68 5877 #define __pyx_n_s_cfilename_index __pyx_mstate_global->__pyx_n_s_cfilename_index
jpayne@68 5878 #define __pyx_n_s_cfn __pyx_mstate_global->__pyx_n_s_cfn
jpayne@68 5879 #define __pyx_n_s_cline_in_traceback __pyx_mstate_global->__pyx_n_s_cline_in_traceback
jpayne@68 5880 #define __pyx_n_s_close __pyx_mstate_global->__pyx_n_s_close
jpayne@68 5881 #define __pyx_n_s_closed __pyx_mstate_global->__pyx_n_s_closed
jpayne@68 5882 #define __pyx_n_s_conf __pyx_mstate_global->__pyx_n_s_conf
jpayne@68 5883 #define __pyx_n_s_conf_data __pyx_mstate_global->__pyx_n_s_conf_data
jpayne@68 5884 #define __pyx_n_s_contigs __pyx_mstate_global->__pyx_n_s_contigs
jpayne@68 5885 #define __pyx_kp_u_could_not_create_iterator_for_re __pyx_mstate_global->__pyx_kp_u_could_not_create_iterator_for_re
jpayne@68 5886 #define __pyx_kp_u_could_not_create_iterator_possib __pyx_mstate_global->__pyx_kp_u_could_not_create_iterator_possib
jpayne@68 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@68 5888 #define __pyx_kp_u_could_not_open_file_s __pyx_mstate_global->__pyx_kp_u_could_not_open_file_s
jpayne@68 5889 #define __pyx_kp_u_could_not_open_for_reading_heade __pyx_mstate_global->__pyx_kp_u_could_not_open_for_reading_heade
jpayne@68 5890 #define __pyx_kp_u_could_not_open_index_for_s __pyx_mstate_global->__pyx_kp_u_could_not_open_index_for_s
jpayne@68 5891 #define __pyx_kp_u_could_not_open_s_for_reading __pyx_mstate_global->__pyx_kp_u_could_not_open_s_for_reading
jpayne@68 5892 #define __pyx_kp_u_could_not_open_s_for_writing __pyx_mstate_global->__pyx_kp_u_could_not_open_s_for_writing
jpayne@68 5893 #define __pyx_n_s_cpy __pyx_mstate_global->__pyx_n_s_cpy
jpayne@68 5894 #define __pyx_n_s_csi __pyx_mstate_global->__pyx_n_s_csi
jpayne@68 5895 #define __pyx_kp_u_csi_2 __pyx_mstate_global->__pyx_kp_u_csi_2
jpayne@68 5896 #define __pyx_n_s_cstr __pyx_mstate_global->__pyx_n_s_cstr
jpayne@68 5897 #define __pyx_n_s_dict __pyx_mstate_global->__pyx_n_s_dict
jpayne@68 5898 #define __pyx_n_s_dict_2 __pyx_mstate_global->__pyx_n_s_dict_2
jpayne@68 5899 #define __pyx_kp_u_disable __pyx_mstate_global->__pyx_kp_u_disable
jpayne@68 5900 #define __pyx_n_s_doc __pyx_mstate_global->__pyx_n_s_doc
jpayne@68 5901 #define __pyx_n_s_dup __pyx_mstate_global->__pyx_n_s_dup
jpayne@68 5902 #define __pyx_kp_s_empty_iterator __pyx_mstate_global->__pyx_kp_s_empty_iterator
jpayne@68 5903 #define __pyx_kp_u_enable __pyx_mstate_global->__pyx_kp_u_enable
jpayne@68 5904 #define __pyx_n_s_encoding __pyx_mstate_global->__pyx_n_s_encoding
jpayne@68 5905 #define __pyx_n_s_end __pyx_mstate_global->__pyx_n_s_end
jpayne@68 5906 #define __pyx_n_s_end_col __pyx_mstate_global->__pyx_n_s_end_col
jpayne@68 5907 #define __pyx_kp_u_end_out_of_range_i __pyx_mstate_global->__pyx_kp_u_end_out_of_range_i
jpayne@68 5908 #define __pyx_kp_u_error_i_when_closing_file_s __pyx_mstate_global->__pyx_kp_u_error_i_when_closing_file_s
jpayne@68 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@68 5910 #define __pyx_n_s_exists __pyx_mstate_global->__pyx_n_s_exists
jpayne@68 5911 #define __pyx_n_s_fd_src __pyx_mstate_global->__pyx_n_s_fd_src
jpayne@68 5912 #define __pyx_n_s_fetch __pyx_mstate_global->__pyx_n_s_fetch
jpayne@68 5913 #define __pyx_kp_u_file_s_not_found __pyx_mstate_global->__pyx_kp_u_file_s_not_found
jpayne@68 5914 #define __pyx_n_s_filename __pyx_mstate_global->__pyx_n_s_filename
jpayne@68 5915 #define __pyx_n_s_filename_in __pyx_mstate_global->__pyx_n_s_filename_in
jpayne@68 5916 #define __pyx_n_s_filename_index __pyx_mstate_global->__pyx_n_s_filename_index
jpayne@68 5917 #define __pyx_n_s_filename_out __pyx_mstate_global->__pyx_n_s_filename_out
jpayne@68 5918 #define __pyx_kp_u_filename_s_already_exists_use_fo __pyx_mstate_global->__pyx_kp_u_filename_s_already_exists_use_fo
jpayne@68 5919 #define __pyx_n_s_fileobj __pyx_mstate_global->__pyx_n_s_fileobj
jpayne@68 5920 #define __pyx_n_s_fmt __pyx_mstate_global->__pyx_n_s_fmt
jpayne@68 5921 #define __pyx_n_s_fn __pyx_mstate_global->__pyx_n_s_fn
jpayne@68 5922 #define __pyx_n_s_fn_index __pyx_mstate_global->__pyx_n_s_fn_index
jpayne@68 5923 #define __pyx_n_s_fnidx __pyx_mstate_global->__pyx_n_s_fnidx
jpayne@68 5924 #define __pyx_n_s_force __pyx_mstate_global->__pyx_n_s_force
jpayne@68 5925 #define __pyx_n_s_format __pyx_mstate_global->__pyx_n_s_format
jpayne@68 5926 #define __pyx_n_s_fp __pyx_mstate_global->__pyx_n_s_fp
jpayne@68 5927 #define __pyx_kp_u_gc __pyx_mstate_global->__pyx_kp_u_gc
jpayne@68 5928 #define __pyx_n_s_get_encoding __pyx_mstate_global->__pyx_n_s_get_encoding
jpayne@68 5929 #define __pyx_n_s_getstate __pyx_mstate_global->__pyx_n_s_getstate
jpayne@68 5930 #define __pyx_n_u_gff __pyx_mstate_global->__pyx_n_u_gff
jpayne@68 5931 #define __pyx_kp_u_gz __pyx_mstate_global->__pyx_kp_u_gz
jpayne@68 5932 #define __pyx_n_s_import __pyx_mstate_global->__pyx_n_s_import
jpayne@68 5933 #define __pyx_kp_u_incomplete_line_at_s __pyx_mstate_global->__pyx_kp_u_incomplete_line_at_s
jpayne@68 5934 #define __pyx_n_s_index __pyx_mstate_global->__pyx_n_s_index
jpayne@68 5935 #define __pyx_kp_u_index_s_not_found __pyx_mstate_global->__pyx_kp_u_index_s_not_found
jpayne@68 5936 #define __pyx_n_s_infile __pyx_mstate_global->__pyx_n_s_infile
jpayne@68 5937 #define __pyx_n_s_init __pyx_mstate_global->__pyx_n_s_init
jpayne@68 5938 #define __pyx_n_s_init_subclass __pyx_mstate_global->__pyx_n_s_init_subclass
jpayne@68 5939 #define __pyx_n_s_initializing __pyx_mstate_global->__pyx_n_s_initializing
jpayne@68 5940 #define __pyx_kp_u_invalid_file_opening_mode_s __pyx_mstate_global->__pyx_kp_u_invalid_file_opening_mode_s
jpayne@68 5941 #define __pyx_n_s_is_coroutine __pyx_mstate_global->__pyx_n_s_is_coroutine
jpayne@68 5942 #define __pyx_n_s_is_empty __pyx_mstate_global->__pyx_n_s_is_empty
jpayne@68 5943 #define __pyx_n_s_is_open __pyx_mstate_global->__pyx_n_s_is_open
jpayne@68 5944 #define __pyx_kp_u_isenabled __pyx_mstate_global->__pyx_kp_u_isenabled
jpayne@68 5945 #define __pyx_n_s_iter __pyx_mstate_global->__pyx_n_s_iter
jpayne@68 5946 #define __pyx_kp_s_iterate_over_infile_Permits_the __pyx_mstate_global->__pyx_kp_s_iterate_over_infile_Permits_the
jpayne@68 5947 #define __pyx_kp_u_iteration_on_closed_file __pyx_mstate_global->__pyx_kp_u_iteration_on_closed_file
jpayne@68 5948 #define __pyx_n_s_itr __pyx_mstate_global->__pyx_n_s_itr
jpayne@68 5949 #define __pyx_n_s_keep_original __pyx_mstate_global->__pyx_n_s_keep_original
jpayne@68 5950 #define __pyx_n_s_keys __pyx_mstate_global->__pyx_n_s_keys
jpayne@68 5951 #define __pyx_n_s_length __pyx_mstate_global->__pyx_n_s_length
jpayne@68 5952 #define __pyx_n_s_line __pyx_mstate_global->__pyx_n_s_line
jpayne@68 5953 #define __pyx_n_s_line_skip __pyx_mstate_global->__pyx_n_s_line_skip
jpayne@68 5954 #define __pyx_n_s_main __pyx_mstate_global->__pyx_n_s_main
jpayne@68 5955 #define __pyx_n_s_meta_char __pyx_mstate_global->__pyx_n_s_meta_char
jpayne@68 5956 #define __pyx_n_s_metaclass __pyx_mstate_global->__pyx_n_s_metaclass
jpayne@68 5957 #define __pyx_n_s_min_shift __pyx_mstate_global->__pyx_n_s_min_shift
jpayne@68 5958 #define __pyx_n_s_mode __pyx_mstate_global->__pyx_n_s_mode
jpayne@68 5959 #define __pyx_n_s_module __pyx_mstate_global->__pyx_n_s_module
jpayne@68 5960 #define __pyx_n_s_multiple_iterators __pyx_mstate_global->__pyx_n_s_multiple_iterators
jpayne@68 5961 #define __pyx_n_s_name __pyx_mstate_global->__pyx_n_s_name
jpayne@68 5962 #define __pyx_n_s_nbytes __pyx_mstate_global->__pyx_n_s_nbytes
jpayne@68 5963 #define __pyx_kp_u_neither_preset_nor_seq_col_start __pyx_mstate_global->__pyx_kp_u_neither_preset_nor_seq_col_start
jpayne@68 5964 #define __pyx_n_s_new __pyx_mstate_global->__pyx_n_s_new
jpayne@68 5965 #define __pyx_n_s_next __pyx_mstate_global->__pyx_n_s_next
jpayne@68 5966 #define __pyx_kp_s_no_default___reduce___due_to_non __pyx_mstate_global->__pyx_kp_s_no_default___reduce___due_to_non
jpayne@68 5967 #define __pyx_n_s_open __pyx_mstate_global->__pyx_n_s_open
jpayne@68 5968 #define __pyx_n_s_os __pyx_mstate_global->__pyx_n_s_os
jpayne@68 5969 #define __pyx_kp_u_parse_method_of_s_not_implemente __pyx_mstate_global->__pyx_kp_u_parse_method_of_s_not_implemente
jpayne@68 5970 #define __pyx_n_s_parser __pyx_mstate_global->__pyx_n_s_parser
jpayne@68 5971 #define __pyx_n_s_path __pyx_mstate_global->__pyx_n_s_path
jpayne@68 5972 #define __pyx_n_s_pickle __pyx_mstate_global->__pyx_n_s_pickle
jpayne@68 5973 #define __pyx_n_s_prepare __pyx_mstate_global->__pyx_n_s_prepare
jpayne@68 5974 #define __pyx_n_s_preset __pyx_mstate_global->__pyx_n_s_preset
jpayne@68 5975 #define __pyx_n_s_preset2conf __pyx_mstate_global->__pyx_n_s_preset2conf
jpayne@68 5976 #define __pyx_n_u_psltbl __pyx_mstate_global->__pyx_n_u_psltbl
jpayne@68 5977 #define __pyx_n_s_pysam_libctabix __pyx_mstate_global->__pyx_n_s_pysam_libctabix
jpayne@68 5978 #define __pyx_kp_s_pysam_libctabix_pyx __pyx_mstate_global->__pyx_kp_s_pysam_libctabix_pyx
jpayne@68 5979 #define __pyx_n_s_pyx_PickleError __pyx_mstate_global->__pyx_n_s_pyx_PickleError
jpayne@68 5980 #define __pyx_n_s_pyx_checksum __pyx_mstate_global->__pyx_n_s_pyx_checksum
jpayne@68 5981 #define __pyx_n_s_pyx_result __pyx_mstate_global->__pyx_n_s_pyx_result
jpayne@68 5982 #define __pyx_n_s_pyx_state __pyx_mstate_global->__pyx_n_s_pyx_state
jpayne@68 5983 #define __pyx_n_s_pyx_type __pyx_mstate_global->__pyx_n_s_pyx_type
jpayne@68 5984 #define __pyx_n_s_pyx_unpickle_Parser __pyx_mstate_global->__pyx_n_s_pyx_unpickle_Parser
jpayne@68 5985 #define __pyx_n_s_pyx_unpickle_asBed __pyx_mstate_global->__pyx_n_s_pyx_unpickle_asBed
jpayne@68 5986 #define __pyx_n_s_pyx_unpickle_asGFF3 __pyx_mstate_global->__pyx_n_s_pyx_unpickle_asGFF3
jpayne@68 5987 #define __pyx_n_s_pyx_unpickle_asGTF __pyx_mstate_global->__pyx_n_s_pyx_unpickle_asGTF
jpayne@68 5988 #define __pyx_n_s_pyx_unpickle_asTuple __pyx_mstate_global->__pyx_n_s_pyx_unpickle_asTuple
jpayne@68 5989 #define __pyx_n_s_pyx_unpickle_asVCF __pyx_mstate_global->__pyx_n_s_pyx_unpickle_asVCF
jpayne@68 5990 #define __pyx_n_s_pyx_vtable __pyx_mstate_global->__pyx_n_s_pyx_vtable
jpayne@68 5991 #define __pyx_n_s_qualname __pyx_mstate_global->__pyx_n_s_qualname
jpayne@68 5992 #define __pyx_n_s_r __pyx_mstate_global->__pyx_n_s_r
jpayne@68 5993 #define __pyx_n_u_r __pyx_mstate_global->__pyx_n_u_r
jpayne@68 5994 #define __pyx_n_s_readline __pyx_mstate_global->__pyx_n_s_readline
jpayne@68 5995 #define __pyx_n_s_reduce __pyx_mstate_global->__pyx_n_s_reduce
jpayne@68 5996 #define __pyx_n_s_reduce_cython __pyx_mstate_global->__pyx_n_s_reduce_cython
jpayne@68 5997 #define __pyx_n_s_reduce_ex __pyx_mstate_global->__pyx_n_s_reduce_ex
jpayne@68 5998 #define __pyx_n_s_reference __pyx_mstate_global->__pyx_n_s_reference
jpayne@68 5999 #define __pyx_n_s_region __pyx_mstate_global->__pyx_n_s_region
jpayne@68 6000 #define __pyx_n_s_retval __pyx_mstate_global->__pyx_n_s_retval
jpayne@68 6001 #define __pyx_kp_u_s __pyx_mstate_global->__pyx_kp_u_s
jpayne@68 6002 #define __pyx_n_s_s_2 __pyx_mstate_global->__pyx_n_s_s_2
jpayne@68 6003 #define __pyx_kp_u_s_i __pyx_mstate_global->__pyx_kp_u_s_i
jpayne@68 6004 #define __pyx_kp_u_s_i_i __pyx_mstate_global->__pyx_kp_u_s_i_i
jpayne@68 6005 #define __pyx_n_u_sam __pyx_mstate_global->__pyx_n_u_sam
jpayne@68 6006 #define __pyx_n_s_self __pyx_mstate_global->__pyx_n_s_self
jpayne@68 6007 #define __pyx_kp_s_self_gzipfile_self_kstream_canno __pyx_mstate_global->__pyx_kp_s_self_gzipfile_self_kstream_canno
jpayne@68 6008 #define __pyx_kp_s_self_iterator_cannot_be_converte __pyx_mstate_global->__pyx_kp_s_self_iterator_cannot_be_converte
jpayne@68 6009 #define __pyx_n_s_seq_col __pyx_mstate_global->__pyx_n_s_seq_col
jpayne@68 6010 #define __pyx_n_s_set_encoding __pyx_mstate_global->__pyx_n_s_set_encoding
jpayne@68 6011 #define __pyx_n_s_set_name __pyx_mstate_global->__pyx_n_s_set_name
jpayne@68 6012 #define __pyx_n_s_setstate __pyx_mstate_global->__pyx_n_s_setstate
jpayne@68 6013 #define __pyx_n_s_setstate_cython __pyx_mstate_global->__pyx_n_s_setstate_cython
jpayne@68 6014 #define __pyx_n_s_spec __pyx_mstate_global->__pyx_n_s_spec
jpayne@68 6015 #define __pyx_n_s_start __pyx_mstate_global->__pyx_n_s_start
jpayne@68 6016 #define __pyx_n_s_start_col __pyx_mstate_global->__pyx_n_s_start_col
jpayne@68 6017 #define __pyx_kp_u_start_i_end_i __pyx_mstate_global->__pyx_kp_u_start_i_end_i
jpayne@68 6018 #define __pyx_kp_u_start_out_of_range_i __pyx_mstate_global->__pyx_kp_u_start_out_of_range_i
jpayne@68 6019 #define __pyx_n_s_state __pyx_mstate_global->__pyx_n_s_state
jpayne@68 6020 #define __pyx_kp_s_stringsource __pyx_mstate_global->__pyx_kp_s_stringsource
jpayne@68 6021 #define __pyx_n_s_suffix __pyx_mstate_global->__pyx_n_s_suffix
jpayne@68 6022 #define __pyx_n_s_super __pyx_mstate_global->__pyx_n_s_super
jpayne@68 6023 #define __pyx_n_s_sys __pyx_mstate_global->__pyx_n_s_sys
jpayne@68 6024 #define __pyx_n_s_tabix_compress __pyx_mstate_global->__pyx_n_s_tabix_compress
jpayne@68 6025 #define __pyx_n_u_tabix_compress __pyx_mstate_global->__pyx_n_u_tabix_compress
jpayne@68 6026 #define __pyx_n_s_tabix_file_iterator __pyx_mstate_global->__pyx_n_s_tabix_file_iterator
jpayne@68 6027 #define __pyx_n_u_tabix_file_iterator __pyx_mstate_global->__pyx_n_u_tabix_file_iterator
jpayne@68 6028 #define __pyx_n_s_tabix_file_iterator___reduce_cyt __pyx_mstate_global->__pyx_n_s_tabix_file_iterator___reduce_cyt
jpayne@68 6029 #define __pyx_n_s_tabix_file_iterator___setstate_c __pyx_mstate_global->__pyx_n_s_tabix_file_iterator___setstate_c
jpayne@68 6030 #define __pyx_n_s_tabix_generic_iterator __pyx_mstate_global->__pyx_n_s_tabix_generic_iterator
jpayne@68 6031 #define __pyx_n_u_tabix_generic_iterator __pyx_mstate_global->__pyx_n_u_tabix_generic_iterator
jpayne@68 6032 #define __pyx_n_s_tabix_generic_iterator___init __pyx_mstate_global->__pyx_n_s_tabix_generic_iterator___init
jpayne@68 6033 #define __pyx_n_s_tabix_generic_iterator___iter __pyx_mstate_global->__pyx_n_s_tabix_generic_iterator___iter
jpayne@68 6034 #define __pyx_n_s_tabix_generic_iterator___next __pyx_mstate_global->__pyx_n_s_tabix_generic_iterator___next
jpayne@68 6035 #define __pyx_n_s_tabix_index __pyx_mstate_global->__pyx_n_s_tabix_index
jpayne@68 6036 #define __pyx_n_u_tabix_index __pyx_mstate_global->__pyx_n_u_tabix_index
jpayne@68 6037 #define __pyx_n_s_tabix_iterator __pyx_mstate_global->__pyx_n_s_tabix_iterator
jpayne@68 6038 #define __pyx_n_u_tabix_iterator __pyx_mstate_global->__pyx_n_u_tabix_iterator
jpayne@68 6039 #define __pyx_kp_u_tbi __pyx_mstate_global->__pyx_kp_u_tbi
jpayne@68 6040 #define __pyx_n_s_tell __pyx_mstate_global->__pyx_n_s_tell
jpayne@68 6041 #define __pyx_n_s_test __pyx_mstate_global->__pyx_n_s_test
jpayne@68 6042 #define __pyx_n_s_threads __pyx_mstate_global->__pyx_n_s_threads
jpayne@68 6043 #define __pyx_kp_u_unknown_preset __pyx_mstate_global->__pyx_kp_u_unknown_preset
jpayne@68 6044 #define __pyx_n_s_unlink __pyx_mstate_global->__pyx_n_s_unlink
jpayne@68 6045 #define __pyx_n_s_update __pyx_mstate_global->__pyx_n_s_update
jpayne@68 6046 #define __pyx_n_s_use_setstate __pyx_mstate_global->__pyx_n_s_use_setstate
jpayne@68 6047 #define __pyx_kp_u_valid_presets_are __pyx_mstate_global->__pyx_kp_u_valid_presets_are
jpayne@68 6048 #define __pyx_n_u_vcf __pyx_mstate_global->__pyx_n_u_vcf
jpayne@68 6049 #define __pyx_kp_u_writing_failed __pyx_mstate_global->__pyx_kp_u_writing_failed
jpayne@68 6050 #define __pyx_n_s_zerobased __pyx_mstate_global->__pyx_n_s_zerobased
jpayne@68 6051 #define __pyx_int_0 __pyx_mstate_global->__pyx_int_0
jpayne@68 6052 #define __pyx_int_1 __pyx_mstate_global->__pyx_int_1
jpayne@68 6053 #define __pyx_int_2 __pyx_mstate_global->__pyx_int_2
jpayne@68 6054 #define __pyx_int_3 __pyx_mstate_global->__pyx_int_3
jpayne@68 6055 #define __pyx_int_4 __pyx_mstate_global->__pyx_int_4
jpayne@68 6056 #define __pyx_int_5 __pyx_mstate_global->__pyx_int_5
jpayne@68 6057 #define __pyx_int_15 __pyx_mstate_global->__pyx_int_15
jpayne@68 6058 #define __pyx_int_17 __pyx_mstate_global->__pyx_int_17
jpayne@68 6059 #define __pyx_int_18 __pyx_mstate_global->__pyx_int_18
jpayne@68 6060 #define __pyx_int_35 __pyx_mstate_global->__pyx_int_35
jpayne@68 6061 #define __pyx_int_64 __pyx_mstate_global->__pyx_int_64
jpayne@68 6062 #define __pyx_int_21667264 __pyx_mstate_global->__pyx_int_21667264
jpayne@68 6063 #define __pyx_int_139192863 __pyx_mstate_global->__pyx_int_139192863
jpayne@68 6064 #define __pyx_int_243541226 __pyx_mstate_global->__pyx_int_243541226
jpayne@68 6065 #define __pyx_int_neg_1 __pyx_mstate_global->__pyx_int_neg_1
jpayne@68 6066 #define __pyx_codeobj_ __pyx_mstate_global->__pyx_codeobj_
jpayne@68 6067 #define __pyx_tuple__19 __pyx_mstate_global->__pyx_tuple__19
jpayne@68 6068 #define __pyx_tuple__20 __pyx_mstate_global->__pyx_tuple__20
jpayne@68 6069 #define __pyx_tuple__24 __pyx_mstate_global->__pyx_tuple__24
jpayne@68 6070 #define __pyx_tuple__38 __pyx_mstate_global->__pyx_tuple__38
jpayne@68 6071 #define __pyx_tuple__41 __pyx_mstate_global->__pyx_tuple__41
jpayne@68 6072 #define __pyx_tuple__45 __pyx_mstate_global->__pyx_tuple__45
jpayne@68 6073 #define __pyx_tuple__55 __pyx_mstate_global->__pyx_tuple__55
jpayne@68 6074 #define __pyx_tuple__63 __pyx_mstate_global->__pyx_tuple__63
jpayne@68 6075 #define __pyx_tuple__64 __pyx_mstate_global->__pyx_tuple__64
jpayne@68 6076 #define __pyx_tuple__65 __pyx_mstate_global->__pyx_tuple__65
jpayne@68 6077 #define __pyx_tuple__66 __pyx_mstate_global->__pyx_tuple__66
jpayne@68 6078 #define __pyx_tuple__67 __pyx_mstate_global->__pyx_tuple__67
jpayne@68 6079 #define __pyx_tuple__68 __pyx_mstate_global->__pyx_tuple__68
jpayne@68 6080 #define __pyx_tuple__69 __pyx_mstate_global->__pyx_tuple__69
jpayne@68 6081 #define __pyx_tuple__70 __pyx_mstate_global->__pyx_tuple__70
jpayne@68 6082 #define __pyx_tuple__71 __pyx_mstate_global->__pyx_tuple__71
jpayne@68 6083 #define __pyx_tuple__72 __pyx_mstate_global->__pyx_tuple__72
jpayne@68 6084 #define __pyx_tuple__73 __pyx_mstate_global->__pyx_tuple__73
jpayne@68 6085 #define __pyx_tuple__74 __pyx_mstate_global->__pyx_tuple__74
jpayne@68 6086 #define __pyx_tuple__75 __pyx_mstate_global->__pyx_tuple__75
jpayne@68 6087 #define __pyx_tuple__76 __pyx_mstate_global->__pyx_tuple__76
jpayne@68 6088 #define __pyx_tuple__77 __pyx_mstate_global->__pyx_tuple__77
jpayne@68 6089 #define __pyx_codeobj__2 __pyx_mstate_global->__pyx_codeobj__2
jpayne@68 6090 #define __pyx_codeobj__3 __pyx_mstate_global->__pyx_codeobj__3
jpayne@68 6091 #define __pyx_codeobj__4 __pyx_mstate_global->__pyx_codeobj__4
jpayne@68 6092 #define __pyx_codeobj__5 __pyx_mstate_global->__pyx_codeobj__5
jpayne@68 6093 #define __pyx_codeobj__6 __pyx_mstate_global->__pyx_codeobj__6
jpayne@68 6094 #define __pyx_codeobj__7 __pyx_mstate_global->__pyx_codeobj__7
jpayne@68 6095 #define __pyx_codeobj__8 __pyx_mstate_global->__pyx_codeobj__8
jpayne@68 6096 #define __pyx_codeobj__9 __pyx_mstate_global->__pyx_codeobj__9
jpayne@68 6097 #define __pyx_codeobj__10 __pyx_mstate_global->__pyx_codeobj__10
jpayne@68 6098 #define __pyx_codeobj__11 __pyx_mstate_global->__pyx_codeobj__11
jpayne@68 6099 #define __pyx_codeobj__12 __pyx_mstate_global->__pyx_codeobj__12
jpayne@68 6100 #define __pyx_codeobj__13 __pyx_mstate_global->__pyx_codeobj__13
jpayne@68 6101 #define __pyx_codeobj__14 __pyx_mstate_global->__pyx_codeobj__14
jpayne@68 6102 #define __pyx_codeobj__15 __pyx_mstate_global->__pyx_codeobj__15
jpayne@68 6103 #define __pyx_codeobj__17 __pyx_mstate_global->__pyx_codeobj__17
jpayne@68 6104 #define __pyx_codeobj__18 __pyx_mstate_global->__pyx_codeobj__18
jpayne@68 6105 #define __pyx_codeobj__21 __pyx_mstate_global->__pyx_codeobj__21
jpayne@68 6106 #define __pyx_codeobj__22 __pyx_mstate_global->__pyx_codeobj__22
jpayne@68 6107 #define __pyx_codeobj__23 __pyx_mstate_global->__pyx_codeobj__23
jpayne@68 6108 #define __pyx_codeobj__25 __pyx_mstate_global->__pyx_codeobj__25
jpayne@68 6109 #define __pyx_codeobj__26 __pyx_mstate_global->__pyx_codeobj__26
jpayne@68 6110 #define __pyx_codeobj__27 __pyx_mstate_global->__pyx_codeobj__27
jpayne@68 6111 #define __pyx_codeobj__28 __pyx_mstate_global->__pyx_codeobj__28
jpayne@68 6112 #define __pyx_codeobj__29 __pyx_mstate_global->__pyx_codeobj__29
jpayne@68 6113 #define __pyx_codeobj__30 __pyx_mstate_global->__pyx_codeobj__30
jpayne@68 6114 #define __pyx_codeobj__31 __pyx_mstate_global->__pyx_codeobj__31
jpayne@68 6115 #define __pyx_codeobj__32 __pyx_mstate_global->__pyx_codeobj__32
jpayne@68 6116 #define __pyx_codeobj__33 __pyx_mstate_global->__pyx_codeobj__33
jpayne@68 6117 #define __pyx_codeobj__34 __pyx_mstate_global->__pyx_codeobj__34
jpayne@68 6118 #define __pyx_codeobj__35 __pyx_mstate_global->__pyx_codeobj__35
jpayne@68 6119 #define __pyx_codeobj__36 __pyx_mstate_global->__pyx_codeobj__36
jpayne@68 6120 #define __pyx_codeobj__37 __pyx_mstate_global->__pyx_codeobj__37
jpayne@68 6121 #define __pyx_codeobj__40 __pyx_mstate_global->__pyx_codeobj__40
jpayne@68 6122 #define __pyx_codeobj__46 __pyx_mstate_global->__pyx_codeobj__46
jpayne@68 6123 #define __pyx_codeobj__47 __pyx_mstate_global->__pyx_codeobj__47
jpayne@68 6124 #define __pyx_codeobj__48 __pyx_mstate_global->__pyx_codeobj__48
jpayne@68 6125 #define __pyx_codeobj__49 __pyx_mstate_global->__pyx_codeobj__49
jpayne@68 6126 #define __pyx_codeobj__50 __pyx_mstate_global->__pyx_codeobj__50
jpayne@68 6127 #define __pyx_codeobj__51 __pyx_mstate_global->__pyx_codeobj__51
jpayne@68 6128 #define __pyx_codeobj__52 __pyx_mstate_global->__pyx_codeobj__52
jpayne@68 6129 #define __pyx_codeobj__53 __pyx_mstate_global->__pyx_codeobj__53
jpayne@68 6130 #define __pyx_codeobj__54 __pyx_mstate_global->__pyx_codeobj__54
jpayne@68 6131 #define __pyx_codeobj__57 __pyx_mstate_global->__pyx_codeobj__57
jpayne@68 6132 #define __pyx_codeobj__58 __pyx_mstate_global->__pyx_codeobj__58
jpayne@68 6133 #define __pyx_codeobj__59 __pyx_mstate_global->__pyx_codeobj__59
jpayne@68 6134 #define __pyx_codeobj__60 __pyx_mstate_global->__pyx_codeobj__60
jpayne@68 6135 #define __pyx_codeobj__61 __pyx_mstate_global->__pyx_codeobj__61
jpayne@68 6136 /* #### Code section: module_code ### */
jpayne@68 6137
jpayne@68 6138 /* "cpython/complex.pxd":19
jpayne@68 6139 *
jpayne@68 6140 * @property
jpayne@68 6141 * cdef inline double real(self) noexcept: # <<<<<<<<<<<<<<
jpayne@68 6142 * return self.cval.real
jpayne@68 6143 *
jpayne@68 6144 */
jpayne@68 6145
jpayne@68 6146 static CYTHON_INLINE double __pyx_f_7cpython_7complex_7complex_4real_real(PyComplexObject *__pyx_v_self) {
jpayne@68 6147 double __pyx_r;
jpayne@68 6148
jpayne@68 6149 /* "cpython/complex.pxd":20
jpayne@68 6150 * @property
jpayne@68 6151 * cdef inline double real(self) noexcept:
jpayne@68 6152 * return self.cval.real # <<<<<<<<<<<<<<
jpayne@68 6153 *
jpayne@68 6154 * @property
jpayne@68 6155 */
jpayne@68 6156 __pyx_r = __pyx_v_self->cval.real;
jpayne@68 6157 goto __pyx_L0;
jpayne@68 6158
jpayne@68 6159 /* "cpython/complex.pxd":19
jpayne@68 6160 *
jpayne@68 6161 * @property
jpayne@68 6162 * cdef inline double real(self) noexcept: # <<<<<<<<<<<<<<
jpayne@68 6163 * return self.cval.real
jpayne@68 6164 *
jpayne@68 6165 */
jpayne@68 6166
jpayne@68 6167 /* function exit code */
jpayne@68 6168 __pyx_L0:;
jpayne@68 6169 return __pyx_r;
jpayne@68 6170 }
jpayne@68 6171
jpayne@68 6172 /* "cpython/complex.pxd":23
jpayne@68 6173 *
jpayne@68 6174 * @property
jpayne@68 6175 * cdef inline double imag(self) noexcept: # <<<<<<<<<<<<<<
jpayne@68 6176 * return self.cval.imag
jpayne@68 6177 *
jpayne@68 6178 */
jpayne@68 6179
jpayne@68 6180 static CYTHON_INLINE double __pyx_f_7cpython_7complex_7complex_4imag_imag(PyComplexObject *__pyx_v_self) {
jpayne@68 6181 double __pyx_r;
jpayne@68 6182
jpayne@68 6183 /* "cpython/complex.pxd":24
jpayne@68 6184 * @property
jpayne@68 6185 * cdef inline double imag(self) noexcept:
jpayne@68 6186 * return self.cval.imag # <<<<<<<<<<<<<<
jpayne@68 6187 *
jpayne@68 6188 * # PyTypeObject PyComplex_Type
jpayne@68 6189 */
jpayne@68 6190 __pyx_r = __pyx_v_self->cval.imag;
jpayne@68 6191 goto __pyx_L0;
jpayne@68 6192
jpayne@68 6193 /* "cpython/complex.pxd":23
jpayne@68 6194 *
jpayne@68 6195 * @property
jpayne@68 6196 * cdef inline double imag(self) noexcept: # <<<<<<<<<<<<<<
jpayne@68 6197 * return self.cval.imag
jpayne@68 6198 *
jpayne@68 6199 */
jpayne@68 6200
jpayne@68 6201 /* function exit code */
jpayne@68 6202 __pyx_L0:;
jpayne@68 6203 return __pyx_r;
jpayne@68 6204 }
jpayne@68 6205
jpayne@68 6206 /* "cpython/contextvars.pxd":112
jpayne@68 6207 *
jpayne@68 6208 *
jpayne@68 6209 * cdef inline object get_value(var, default_value=None): # <<<<<<<<<<<<<<
jpayne@68 6210 * """Return a new reference to the value of the context variable,
jpayne@68 6211 * or the default value of the context variable,
jpayne@68 6212 */
jpayne@68 6213
jpayne@68 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@68 6215 PyObject *__pyx_v_default_value = ((PyObject *)Py_None);
jpayne@68 6216 PyObject *__pyx_v_value;
jpayne@68 6217 PyObject *__pyx_v_pyvalue = NULL;
jpayne@68 6218 PyObject *__pyx_r = NULL;
jpayne@68 6219 __Pyx_RefNannyDeclarations
jpayne@68 6220 int __pyx_t_1;
jpayne@68 6221 int __pyx_t_2;
jpayne@68 6222 PyObject *__pyx_t_3 = NULL;
jpayne@68 6223 int __pyx_lineno = 0;
jpayne@68 6224 const char *__pyx_filename = NULL;
jpayne@68 6225 int __pyx_clineno = 0;
jpayne@68 6226 __Pyx_RefNannySetupContext("get_value", 1);
jpayne@68 6227 if (__pyx_optional_args) {
jpayne@68 6228 if (__pyx_optional_args->__pyx_n > 0) {
jpayne@68 6229 __pyx_v_default_value = __pyx_optional_args->default_value;
jpayne@68 6230 }
jpayne@68 6231 }
jpayne@68 6232
jpayne@68 6233 /* "cpython/contextvars.pxd":117
jpayne@68 6234 * or None if no such value or default was found.
jpayne@68 6235 * """
jpayne@68 6236 * cdef PyObject *value = NULL # <<<<<<<<<<<<<<
jpayne@68 6237 * PyContextVar_Get(var, NULL, &value)
jpayne@68 6238 * if value is NULL:
jpayne@68 6239 */
jpayne@68 6240 __pyx_v_value = NULL;
jpayne@68 6241
jpayne@68 6242 /* "cpython/contextvars.pxd":118
jpayne@68 6243 * """
jpayne@68 6244 * cdef PyObject *value = NULL
jpayne@68 6245 * PyContextVar_Get(var, NULL, &value) # <<<<<<<<<<<<<<
jpayne@68 6246 * if value is NULL:
jpayne@68 6247 * # context variable does not have a default
jpayne@68 6248 */
jpayne@68 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@68 6250
jpayne@68 6251 /* "cpython/contextvars.pxd":119
jpayne@68 6252 * cdef PyObject *value = NULL
jpayne@68 6253 * PyContextVar_Get(var, NULL, &value)
jpayne@68 6254 * if value is NULL: # <<<<<<<<<<<<<<
jpayne@68 6255 * # context variable does not have a default
jpayne@68 6256 * pyvalue = default_value
jpayne@68 6257 */
jpayne@68 6258 __pyx_t_2 = (__pyx_v_value == NULL);
jpayne@68 6259 if (__pyx_t_2) {
jpayne@68 6260
jpayne@68 6261 /* "cpython/contextvars.pxd":121
jpayne@68 6262 * if value is NULL:
jpayne@68 6263 * # context variable does not have a default
jpayne@68 6264 * pyvalue = default_value # <<<<<<<<<<<<<<
jpayne@68 6265 * else:
jpayne@68 6266 * # value or default value of context variable
jpayne@68 6267 */
jpayne@68 6268 __Pyx_INCREF(__pyx_v_default_value);
jpayne@68 6269 __pyx_v_pyvalue = __pyx_v_default_value;
jpayne@68 6270
jpayne@68 6271 /* "cpython/contextvars.pxd":119
jpayne@68 6272 * cdef PyObject *value = NULL
jpayne@68 6273 * PyContextVar_Get(var, NULL, &value)
jpayne@68 6274 * if value is NULL: # <<<<<<<<<<<<<<
jpayne@68 6275 * # context variable does not have a default
jpayne@68 6276 * pyvalue = default_value
jpayne@68 6277 */
jpayne@68 6278 goto __pyx_L3;
jpayne@68 6279 }
jpayne@68 6280
jpayne@68 6281 /* "cpython/contextvars.pxd":124
jpayne@68 6282 * else:
jpayne@68 6283 * # value or default value of context variable
jpayne@68 6284 * pyvalue = <object>value # <<<<<<<<<<<<<<
jpayne@68 6285 * Py_XDECREF(value) # PyContextVar_Get() returned an owned reference as 'PyObject*'
jpayne@68 6286 * return pyvalue
jpayne@68 6287 */
jpayne@68 6288 /*else*/ {
jpayne@68 6289 __pyx_t_3 = ((PyObject *)__pyx_v_value);
jpayne@68 6290 __Pyx_INCREF(__pyx_t_3);
jpayne@68 6291 __pyx_v_pyvalue = __pyx_t_3;
jpayne@68 6292 __pyx_t_3 = 0;
jpayne@68 6293
jpayne@68 6294 /* "cpython/contextvars.pxd":125
jpayne@68 6295 * # value or default value of context variable
jpayne@68 6296 * pyvalue = <object>value
jpayne@68 6297 * Py_XDECREF(value) # PyContextVar_Get() returned an owned reference as 'PyObject*' # <<<<<<<<<<<<<<
jpayne@68 6298 * return pyvalue
jpayne@68 6299 *
jpayne@68 6300 */
jpayne@68 6301 Py_XDECREF(__pyx_v_value);
jpayne@68 6302 }
jpayne@68 6303 __pyx_L3:;
jpayne@68 6304
jpayne@68 6305 /* "cpython/contextvars.pxd":126
jpayne@68 6306 * pyvalue = <object>value
jpayne@68 6307 * Py_XDECREF(value) # PyContextVar_Get() returned an owned reference as 'PyObject*'
jpayne@68 6308 * return pyvalue # <<<<<<<<<<<<<<
jpayne@68 6309 *
jpayne@68 6310 *
jpayne@68 6311 */
jpayne@68 6312 __Pyx_XDECREF(__pyx_r);
jpayne@68 6313 __Pyx_INCREF(__pyx_v_pyvalue);
jpayne@68 6314 __pyx_r = __pyx_v_pyvalue;
jpayne@68 6315 goto __pyx_L0;
jpayne@68 6316
jpayne@68 6317 /* "cpython/contextvars.pxd":112
jpayne@68 6318 *
jpayne@68 6319 *
jpayne@68 6320 * cdef inline object get_value(var, default_value=None): # <<<<<<<<<<<<<<
jpayne@68 6321 * """Return a new reference to the value of the context variable,
jpayne@68 6322 * or the default value of the context variable,
jpayne@68 6323 */
jpayne@68 6324
jpayne@68 6325 /* function exit code */
jpayne@68 6326 __pyx_L1_error:;
jpayne@68 6327 __Pyx_XDECREF(__pyx_t_3);
jpayne@68 6328 __Pyx_AddTraceback("cpython.contextvars.get_value", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@68 6329 __pyx_r = 0;
jpayne@68 6330 __pyx_L0:;
jpayne@68 6331 __Pyx_XDECREF(__pyx_v_pyvalue);
jpayne@68 6332 __Pyx_XGIVEREF(__pyx_r);
jpayne@68 6333 __Pyx_RefNannyFinishContext();
jpayne@68 6334 return __pyx_r;
jpayne@68 6335 }
jpayne@68 6336
jpayne@68 6337 /* "cpython/contextvars.pxd":129
jpayne@68 6338 *
jpayne@68 6339 *
jpayne@68 6340 * cdef inline object get_value_no_default(var, default_value=None): # <<<<<<<<<<<<<<
jpayne@68 6341 * """Return a new reference to the value of the context variable,
jpayne@68 6342 * or the provided default value if no such value was found.
jpayne@68 6343 */
jpayne@68 6344
jpayne@68 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@68 6346 PyObject *__pyx_v_default_value = ((PyObject *)Py_None);
jpayne@68 6347 PyObject *__pyx_v_value;
jpayne@68 6348 PyObject *__pyx_v_pyvalue = NULL;
jpayne@68 6349 PyObject *__pyx_r = NULL;
jpayne@68 6350 __Pyx_RefNannyDeclarations
jpayne@68 6351 int __pyx_t_1;
jpayne@68 6352 PyObject *__pyx_t_2 = NULL;
jpayne@68 6353 int __pyx_lineno = 0;
jpayne@68 6354 const char *__pyx_filename = NULL;
jpayne@68 6355 int __pyx_clineno = 0;
jpayne@68 6356 __Pyx_RefNannySetupContext("get_value_no_default", 1);
jpayne@68 6357 if (__pyx_optional_args) {
jpayne@68 6358 if (__pyx_optional_args->__pyx_n > 0) {
jpayne@68 6359 __pyx_v_default_value = __pyx_optional_args->default_value;
jpayne@68 6360 }
jpayne@68 6361 }
jpayne@68 6362
jpayne@68 6363 /* "cpython/contextvars.pxd":135
jpayne@68 6364 * Ignores the default value of the context variable, if any.
jpayne@68 6365 * """
jpayne@68 6366 * cdef PyObject *value = NULL # <<<<<<<<<<<<<<
jpayne@68 6367 * PyContextVar_Get(var, <PyObject*>default_value, &value)
jpayne@68 6368 * # value of context variable or 'default_value'
jpayne@68 6369 */
jpayne@68 6370 __pyx_v_value = NULL;
jpayne@68 6371
jpayne@68 6372 /* "cpython/contextvars.pxd":136
jpayne@68 6373 * """
jpayne@68 6374 * cdef PyObject *value = NULL
jpayne@68 6375 * PyContextVar_Get(var, <PyObject*>default_value, &value) # <<<<<<<<<<<<<<
jpayne@68 6376 * # value of context variable or 'default_value'
jpayne@68 6377 * pyvalue = <object>value
jpayne@68 6378 */
jpayne@68 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@68 6380
jpayne@68 6381 /* "cpython/contextvars.pxd":138
jpayne@68 6382 * PyContextVar_Get(var, <PyObject*>default_value, &value)
jpayne@68 6383 * # value of context variable or 'default_value'
jpayne@68 6384 * pyvalue = <object>value # <<<<<<<<<<<<<<
jpayne@68 6385 * Py_XDECREF(value) # PyContextVar_Get() returned an owned reference as 'PyObject*'
jpayne@68 6386 * return pyvalue
jpayne@68 6387 */
jpayne@68 6388 __pyx_t_2 = ((PyObject *)__pyx_v_value);
jpayne@68 6389 __Pyx_INCREF(__pyx_t_2);
jpayne@68 6390 __pyx_v_pyvalue = __pyx_t_2;
jpayne@68 6391 __pyx_t_2 = 0;
jpayne@68 6392
jpayne@68 6393 /* "cpython/contextvars.pxd":139
jpayne@68 6394 * # value of context variable or 'default_value'
jpayne@68 6395 * pyvalue = <object>value
jpayne@68 6396 * Py_XDECREF(value) # PyContextVar_Get() returned an owned reference as 'PyObject*' # <<<<<<<<<<<<<<
jpayne@68 6397 * return pyvalue
jpayne@68 6398 */
jpayne@68 6399 Py_XDECREF(__pyx_v_value);
jpayne@68 6400
jpayne@68 6401 /* "cpython/contextvars.pxd":140
jpayne@68 6402 * pyvalue = <object>value
jpayne@68 6403 * Py_XDECREF(value) # PyContextVar_Get() returned an owned reference as 'PyObject*'
jpayne@68 6404 * return pyvalue # <<<<<<<<<<<<<<
jpayne@68 6405 */
jpayne@68 6406 __Pyx_XDECREF(__pyx_r);
jpayne@68 6407 __Pyx_INCREF(__pyx_v_pyvalue);
jpayne@68 6408 __pyx_r = __pyx_v_pyvalue;
jpayne@68 6409 goto __pyx_L0;
jpayne@68 6410
jpayne@68 6411 /* "cpython/contextvars.pxd":129
jpayne@68 6412 *
jpayne@68 6413 *
jpayne@68 6414 * cdef inline object get_value_no_default(var, default_value=None): # <<<<<<<<<<<<<<
jpayne@68 6415 * """Return a new reference to the value of the context variable,
jpayne@68 6416 * or the provided default value if no such value was found.
jpayne@68 6417 */
jpayne@68 6418
jpayne@68 6419 /* function exit code */
jpayne@68 6420 __pyx_L1_error:;
jpayne@68 6421 __Pyx_XDECREF(__pyx_t_2);
jpayne@68 6422 __Pyx_AddTraceback("cpython.contextvars.get_value_no_default", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@68 6423 __pyx_r = 0;
jpayne@68 6424 __pyx_L0:;
jpayne@68 6425 __Pyx_XDECREF(__pyx_v_pyvalue);
jpayne@68 6426 __Pyx_XGIVEREF(__pyx_r);
jpayne@68 6427 __Pyx_RefNannyFinishContext();
jpayne@68 6428 return __pyx_r;
jpayne@68 6429 }
jpayne@68 6430
jpayne@68 6431 /* "array.pxd":104
jpayne@68 6432 * __data_union data
jpayne@68 6433 *
jpayne@68 6434 * def __getbuffer__(self, Py_buffer* info, int flags): # <<<<<<<<<<<<<<
jpayne@68 6435 * # This implementation of getbuffer is geared towards Cython
jpayne@68 6436 * # requirements, and does not yet fulfill the PEP.
jpayne@68 6437 */
jpayne@68 6438
jpayne@68 6439 /* Python wrapper */
jpayne@68 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@68 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@68 6442 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@68 6443 int __pyx_r;
jpayne@68 6444 __Pyx_RefNannyDeclarations
jpayne@68 6445 __Pyx_RefNannySetupContext("__getbuffer__ (wrapper)", 0);
jpayne@68 6446 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
jpayne@68 6447 __pyx_r = __pyx_pf_7cpython_5array_5array___getbuffer__(((arrayobject *)__pyx_v_self), ((Py_buffer *)__pyx_v_info), ((int)__pyx_v_flags));
jpayne@68 6448
jpayne@68 6449 /* function exit code */
jpayne@68 6450 __Pyx_RefNannyFinishContext();
jpayne@68 6451 return __pyx_r;
jpayne@68 6452 }
jpayne@68 6453
jpayne@68 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@68 6455 PyObject *__pyx_v_item_count = NULL;
jpayne@68 6456 int __pyx_r;
jpayne@68 6457 __Pyx_RefNannyDeclarations
jpayne@68 6458 PyObject *__pyx_t_1 = NULL;
jpayne@68 6459 char *__pyx_t_2;
jpayne@68 6460 int __pyx_t_3;
jpayne@68 6461 PyObject *__pyx_t_4 = NULL;
jpayne@68 6462 Py_ssize_t __pyx_t_5;
jpayne@68 6463 int __pyx_t_6;
jpayne@68 6464 char __pyx_t_7;
jpayne@68 6465 int __pyx_lineno = 0;
jpayne@68 6466 const char *__pyx_filename = NULL;
jpayne@68 6467 int __pyx_clineno = 0;
jpayne@68 6468 if (unlikely(__pyx_v_info == NULL)) {
jpayne@68 6469 PyErr_SetString(PyExc_BufferError, "PyObject_GetBuffer: view==NULL argument is obsolete");
jpayne@68 6470 return -1;
jpayne@68 6471 }
jpayne@68 6472 __Pyx_RefNannySetupContext("__getbuffer__", 0);
jpayne@68 6473 __pyx_v_info->obj = Py_None; __Pyx_INCREF(Py_None);
jpayne@68 6474 __Pyx_GIVEREF(__pyx_v_info->obj);
jpayne@68 6475
jpayne@68 6476 /* "array.pxd":109
jpayne@68 6477 * # In particular strided access is always provided regardless
jpayne@68 6478 * # of flags
jpayne@68 6479 * item_count = Py_SIZE(self) # <<<<<<<<<<<<<<
jpayne@68 6480 *
jpayne@68 6481 * info.suboffsets = NULL
jpayne@68 6482 */
jpayne@68 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@68 6484 __Pyx_GOTREF(__pyx_t_1);
jpayne@68 6485 __pyx_v_item_count = __pyx_t_1;
jpayne@68 6486 __pyx_t_1 = 0;
jpayne@68 6487
jpayne@68 6488 /* "array.pxd":111
jpayne@68 6489 * item_count = Py_SIZE(self)
jpayne@68 6490 *
jpayne@68 6491 * info.suboffsets = NULL # <<<<<<<<<<<<<<
jpayne@68 6492 * info.buf = self.data.as_chars
jpayne@68 6493 * info.readonly = 0
jpayne@68 6494 */
jpayne@68 6495 __pyx_v_info->suboffsets = NULL;
jpayne@68 6496
jpayne@68 6497 /* "array.pxd":112
jpayne@68 6498 *
jpayne@68 6499 * info.suboffsets = NULL
jpayne@68 6500 * info.buf = self.data.as_chars # <<<<<<<<<<<<<<
jpayne@68 6501 * info.readonly = 0
jpayne@68 6502 * info.ndim = 1
jpayne@68 6503 */
jpayne@68 6504 __pyx_t_2 = __pyx_v_self->data.as_chars;
jpayne@68 6505 __pyx_v_info->buf = __pyx_t_2;
jpayne@68 6506
jpayne@68 6507 /* "array.pxd":113
jpayne@68 6508 * info.suboffsets = NULL
jpayne@68 6509 * info.buf = self.data.as_chars
jpayne@68 6510 * info.readonly = 0 # <<<<<<<<<<<<<<
jpayne@68 6511 * info.ndim = 1
jpayne@68 6512 * info.itemsize = self.ob_descr.itemsize # e.g. sizeof(float)
jpayne@68 6513 */
jpayne@68 6514 __pyx_v_info->readonly = 0;
jpayne@68 6515
jpayne@68 6516 /* "array.pxd":114
jpayne@68 6517 * info.buf = self.data.as_chars
jpayne@68 6518 * info.readonly = 0
jpayne@68 6519 * info.ndim = 1 # <<<<<<<<<<<<<<
jpayne@68 6520 * info.itemsize = self.ob_descr.itemsize # e.g. sizeof(float)
jpayne@68 6521 * info.len = info.itemsize * item_count
jpayne@68 6522 */
jpayne@68 6523 __pyx_v_info->ndim = 1;
jpayne@68 6524
jpayne@68 6525 /* "array.pxd":115
jpayne@68 6526 * info.readonly = 0
jpayne@68 6527 * info.ndim = 1
jpayne@68 6528 * info.itemsize = self.ob_descr.itemsize # e.g. sizeof(float) # <<<<<<<<<<<<<<
jpayne@68 6529 * info.len = info.itemsize * item_count
jpayne@68 6530 *
jpayne@68 6531 */
jpayne@68 6532 __pyx_t_3 = __pyx_v_self->ob_descr->itemsize;
jpayne@68 6533 __pyx_v_info->itemsize = __pyx_t_3;
jpayne@68 6534
jpayne@68 6535 /* "array.pxd":116
jpayne@68 6536 * info.ndim = 1
jpayne@68 6537 * info.itemsize = self.ob_descr.itemsize # e.g. sizeof(float)
jpayne@68 6538 * info.len = info.itemsize * item_count # <<<<<<<<<<<<<<
jpayne@68 6539 *
jpayne@68 6540 * info.shape = <Py_ssize_t*> PyObject_Malloc(sizeof(Py_ssize_t) + 2)
jpayne@68 6541 */
jpayne@68 6542 __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_info->itemsize); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 116, __pyx_L1_error)
jpayne@68 6543 __Pyx_GOTREF(__pyx_t_1);
jpayne@68 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@68 6545 __Pyx_GOTREF(__pyx_t_4);
jpayne@68 6546 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@68 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@68 6548 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
jpayne@68 6549 __pyx_v_info->len = __pyx_t_5;
jpayne@68 6550
jpayne@68 6551 /* "array.pxd":118
jpayne@68 6552 * info.len = info.itemsize * item_count
jpayne@68 6553 *
jpayne@68 6554 * info.shape = <Py_ssize_t*> PyObject_Malloc(sizeof(Py_ssize_t) + 2) # <<<<<<<<<<<<<<
jpayne@68 6555 * if not info.shape:
jpayne@68 6556 * raise MemoryError()
jpayne@68 6557 */
jpayne@68 6558 __pyx_v_info->shape = ((Py_ssize_t *)PyObject_Malloc(((sizeof(Py_ssize_t)) + 2)));
jpayne@68 6559
jpayne@68 6560 /* "array.pxd":119
jpayne@68 6561 *
jpayne@68 6562 * info.shape = <Py_ssize_t*> PyObject_Malloc(sizeof(Py_ssize_t) + 2)
jpayne@68 6563 * if not info.shape: # <<<<<<<<<<<<<<
jpayne@68 6564 * raise MemoryError()
jpayne@68 6565 * info.shape[0] = item_count # constant regardless of resizing
jpayne@68 6566 */
jpayne@68 6567 __pyx_t_6 = (!(__pyx_v_info->shape != 0));
jpayne@68 6568 if (unlikely(__pyx_t_6)) {
jpayne@68 6569
jpayne@68 6570 /* "array.pxd":120
jpayne@68 6571 * info.shape = <Py_ssize_t*> PyObject_Malloc(sizeof(Py_ssize_t) + 2)
jpayne@68 6572 * if not info.shape:
jpayne@68 6573 * raise MemoryError() # <<<<<<<<<<<<<<
jpayne@68 6574 * info.shape[0] = item_count # constant regardless of resizing
jpayne@68 6575 * info.strides = &info.itemsize
jpayne@68 6576 */
jpayne@68 6577 PyErr_NoMemory(); __PYX_ERR(3, 120, __pyx_L1_error)
jpayne@68 6578
jpayne@68 6579 /* "array.pxd":119
jpayne@68 6580 *
jpayne@68 6581 * info.shape = <Py_ssize_t*> PyObject_Malloc(sizeof(Py_ssize_t) + 2)
jpayne@68 6582 * if not info.shape: # <<<<<<<<<<<<<<
jpayne@68 6583 * raise MemoryError()
jpayne@68 6584 * info.shape[0] = item_count # constant regardless of resizing
jpayne@68 6585 */
jpayne@68 6586 }
jpayne@68 6587
jpayne@68 6588 /* "array.pxd":121
jpayne@68 6589 * if not info.shape:
jpayne@68 6590 * raise MemoryError()
jpayne@68 6591 * info.shape[0] = item_count # constant regardless of resizing # <<<<<<<<<<<<<<
jpayne@68 6592 * info.strides = &info.itemsize
jpayne@68 6593 *
jpayne@68 6594 */
jpayne@68 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@68 6596 (__pyx_v_info->shape[0]) = __pyx_t_5;
jpayne@68 6597
jpayne@68 6598 /* "array.pxd":122
jpayne@68 6599 * raise MemoryError()
jpayne@68 6600 * info.shape[0] = item_count # constant regardless of resizing
jpayne@68 6601 * info.strides = &info.itemsize # <<<<<<<<<<<<<<
jpayne@68 6602 *
jpayne@68 6603 * info.format = <char*> (info.shape + 1)
jpayne@68 6604 */
jpayne@68 6605 __pyx_v_info->strides = (&__pyx_v_info->itemsize);
jpayne@68 6606
jpayne@68 6607 /* "array.pxd":124
jpayne@68 6608 * info.strides = &info.itemsize
jpayne@68 6609 *
jpayne@68 6610 * info.format = <char*> (info.shape + 1) # <<<<<<<<<<<<<<
jpayne@68 6611 * info.format[0] = self.ob_descr.typecode
jpayne@68 6612 * info.format[1] = 0
jpayne@68 6613 */
jpayne@68 6614 __pyx_v_info->format = ((char *)(__pyx_v_info->shape + 1));
jpayne@68 6615
jpayne@68 6616 /* "array.pxd":125
jpayne@68 6617 *
jpayne@68 6618 * info.format = <char*> (info.shape + 1)
jpayne@68 6619 * info.format[0] = self.ob_descr.typecode # <<<<<<<<<<<<<<
jpayne@68 6620 * info.format[1] = 0
jpayne@68 6621 * info.obj = self
jpayne@68 6622 */
jpayne@68 6623 __pyx_t_7 = __pyx_v_self->ob_descr->typecode;
jpayne@68 6624 (__pyx_v_info->format[0]) = __pyx_t_7;
jpayne@68 6625
jpayne@68 6626 /* "array.pxd":126
jpayne@68 6627 * info.format = <char*> (info.shape + 1)
jpayne@68 6628 * info.format[0] = self.ob_descr.typecode
jpayne@68 6629 * info.format[1] = 0 # <<<<<<<<<<<<<<
jpayne@68 6630 * info.obj = self
jpayne@68 6631 *
jpayne@68 6632 */
jpayne@68 6633 (__pyx_v_info->format[1]) = 0;
jpayne@68 6634
jpayne@68 6635 /* "array.pxd":127
jpayne@68 6636 * info.format[0] = self.ob_descr.typecode
jpayne@68 6637 * info.format[1] = 0
jpayne@68 6638 * info.obj = self # <<<<<<<<<<<<<<
jpayne@68 6639 *
jpayne@68 6640 * def __releasebuffer__(self, Py_buffer* info):
jpayne@68 6641 */
jpayne@68 6642 __Pyx_INCREF((PyObject *)__pyx_v_self);
jpayne@68 6643 __Pyx_GIVEREF((PyObject *)__pyx_v_self);
jpayne@68 6644 __Pyx_GOTREF(__pyx_v_info->obj);
jpayne@68 6645 __Pyx_DECREF(__pyx_v_info->obj);
jpayne@68 6646 __pyx_v_info->obj = ((PyObject *)__pyx_v_self);
jpayne@68 6647
jpayne@68 6648 /* "array.pxd":104
jpayne@68 6649 * __data_union data
jpayne@68 6650 *
jpayne@68 6651 * def __getbuffer__(self, Py_buffer* info, int flags): # <<<<<<<<<<<<<<
jpayne@68 6652 * # This implementation of getbuffer is geared towards Cython
jpayne@68 6653 * # requirements, and does not yet fulfill the PEP.
jpayne@68 6654 */
jpayne@68 6655
jpayne@68 6656 /* function exit code */
jpayne@68 6657 __pyx_r = 0;
jpayne@68 6658 goto __pyx_L0;
jpayne@68 6659 __pyx_L1_error:;
jpayne@68 6660 __Pyx_XDECREF(__pyx_t_1);
jpayne@68 6661 __Pyx_XDECREF(__pyx_t_4);
jpayne@68 6662 __Pyx_AddTraceback("cpython.array.array.__getbuffer__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@68 6663 __pyx_r = -1;
jpayne@68 6664 if (__pyx_v_info->obj != NULL) {
jpayne@68 6665 __Pyx_GOTREF(__pyx_v_info->obj);
jpayne@68 6666 __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0;
jpayne@68 6667 }
jpayne@68 6668 goto __pyx_L2;
jpayne@68 6669 __pyx_L0:;
jpayne@68 6670 if (__pyx_v_info->obj == Py_None) {
jpayne@68 6671 __Pyx_GOTREF(__pyx_v_info->obj);
jpayne@68 6672 __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0;
jpayne@68 6673 }
jpayne@68 6674 __pyx_L2:;
jpayne@68 6675 __Pyx_XDECREF(__pyx_v_item_count);
jpayne@68 6676 __Pyx_RefNannyFinishContext();
jpayne@68 6677 return __pyx_r;
jpayne@68 6678 }
jpayne@68 6679
jpayne@68 6680 /* "array.pxd":129
jpayne@68 6681 * info.obj = self
jpayne@68 6682 *
jpayne@68 6683 * def __releasebuffer__(self, Py_buffer* info): # <<<<<<<<<<<<<<
jpayne@68 6684 * PyObject_Free(info.shape)
jpayne@68 6685 *
jpayne@68 6686 */
jpayne@68 6687
jpayne@68 6688 /* Python wrapper */
jpayne@68 6689 CYTHON_UNUSED static void __pyx_pw_7cpython_5array_5array_3__releasebuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info); /*proto*/
jpayne@68 6690 CYTHON_UNUSED static void __pyx_pw_7cpython_5array_5array_3__releasebuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info) {
jpayne@68 6691 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@68 6692 __Pyx_RefNannyDeclarations
jpayne@68 6693 __Pyx_RefNannySetupContext("__releasebuffer__ (wrapper)", 0);
jpayne@68 6694 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
jpayne@68 6695 __pyx_pf_7cpython_5array_5array_2__releasebuffer__(((arrayobject *)__pyx_v_self), ((Py_buffer *)__pyx_v_info));
jpayne@68 6696
jpayne@68 6697 /* function exit code */
jpayne@68 6698 __Pyx_RefNannyFinishContext();
jpayne@68 6699 }
jpayne@68 6700
jpayne@68 6701 static void __pyx_pf_7cpython_5array_5array_2__releasebuffer__(CYTHON_UNUSED arrayobject *__pyx_v_self, Py_buffer *__pyx_v_info) {
jpayne@68 6702
jpayne@68 6703 /* "array.pxd":130
jpayne@68 6704 *
jpayne@68 6705 * def __releasebuffer__(self, Py_buffer* info):
jpayne@68 6706 * PyObject_Free(info.shape) # <<<<<<<<<<<<<<
jpayne@68 6707 *
jpayne@68 6708 * array newarrayobject(PyTypeObject* type, Py_ssize_t size, arraydescr *descr)
jpayne@68 6709 */
jpayne@68 6710 PyObject_Free(__pyx_v_info->shape);
jpayne@68 6711
jpayne@68 6712 /* "array.pxd":129
jpayne@68 6713 * info.obj = self
jpayne@68 6714 *
jpayne@68 6715 * def __releasebuffer__(self, Py_buffer* info): # <<<<<<<<<<<<<<
jpayne@68 6716 * PyObject_Free(info.shape)
jpayne@68 6717 *
jpayne@68 6718 */
jpayne@68 6719
jpayne@68 6720 /* function exit code */
jpayne@68 6721 }
jpayne@68 6722
jpayne@68 6723 /* "array.pxd":141
jpayne@68 6724 *
jpayne@68 6725 *
jpayne@68 6726 * cdef inline array clone(array template, Py_ssize_t length, bint zero): # <<<<<<<<<<<<<<
jpayne@68 6727 * """ fast creation of a new array, given a template array.
jpayne@68 6728 * type will be same as template.
jpayne@68 6729 */
jpayne@68 6730
jpayne@68 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@68 6732 arrayobject *__pyx_v_op = 0;
jpayne@68 6733 arrayobject *__pyx_r = NULL;
jpayne@68 6734 __Pyx_RefNannyDeclarations
jpayne@68 6735 PyObject *__pyx_t_1 = NULL;
jpayne@68 6736 int __pyx_t_2;
jpayne@68 6737 int __pyx_t_3;
jpayne@68 6738 int __pyx_lineno = 0;
jpayne@68 6739 const char *__pyx_filename = NULL;
jpayne@68 6740 int __pyx_clineno = 0;
jpayne@68 6741 __Pyx_RefNannySetupContext("clone", 1);
jpayne@68 6742
jpayne@68 6743 /* "array.pxd":145
jpayne@68 6744 * type will be same as template.
jpayne@68 6745 * if zero is true, new array will be initialized with zeroes."""
jpayne@68 6746 * cdef array op = newarrayobject(Py_TYPE(template), length, template.ob_descr) # <<<<<<<<<<<<<<
jpayne@68 6747 * if zero and op is not None:
jpayne@68 6748 * memset(op.data.as_chars, 0, length * op.ob_descr.itemsize)
jpayne@68 6749 */
jpayne@68 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@68 6751 __Pyx_GOTREF(__pyx_t_1);
jpayne@68 6752 __pyx_v_op = ((arrayobject *)__pyx_t_1);
jpayne@68 6753 __pyx_t_1 = 0;
jpayne@68 6754
jpayne@68 6755 /* "array.pxd":146
jpayne@68 6756 * if zero is true, new array will be initialized with zeroes."""
jpayne@68 6757 * cdef array op = newarrayobject(Py_TYPE(template), length, template.ob_descr)
jpayne@68 6758 * if zero and op is not None: # <<<<<<<<<<<<<<
jpayne@68 6759 * memset(op.data.as_chars, 0, length * op.ob_descr.itemsize)
jpayne@68 6760 * return op
jpayne@68 6761 */
jpayne@68 6762 if (__pyx_v_zero) {
jpayne@68 6763 } else {
jpayne@68 6764 __pyx_t_2 = __pyx_v_zero;
jpayne@68 6765 goto __pyx_L4_bool_binop_done;
jpayne@68 6766 }
jpayne@68 6767 __pyx_t_3 = (((PyObject *)__pyx_v_op) != Py_None);
jpayne@68 6768 __pyx_t_2 = __pyx_t_3;
jpayne@68 6769 __pyx_L4_bool_binop_done:;
jpayne@68 6770 if (__pyx_t_2) {
jpayne@68 6771
jpayne@68 6772 /* "array.pxd":147
jpayne@68 6773 * cdef array op = newarrayobject(Py_TYPE(template), length, template.ob_descr)
jpayne@68 6774 * if zero and op is not None:
jpayne@68 6775 * memset(op.data.as_chars, 0, length * op.ob_descr.itemsize) # <<<<<<<<<<<<<<
jpayne@68 6776 * return op
jpayne@68 6777 *
jpayne@68 6778 */
jpayne@68 6779 (void)(memset(__pyx_v_op->data.as_chars, 0, (__pyx_v_length * __pyx_v_op->ob_descr->itemsize)));
jpayne@68 6780
jpayne@68 6781 /* "array.pxd":146
jpayne@68 6782 * if zero is true, new array will be initialized with zeroes."""
jpayne@68 6783 * cdef array op = newarrayobject(Py_TYPE(template), length, template.ob_descr)
jpayne@68 6784 * if zero and op is not None: # <<<<<<<<<<<<<<
jpayne@68 6785 * memset(op.data.as_chars, 0, length * op.ob_descr.itemsize)
jpayne@68 6786 * return op
jpayne@68 6787 */
jpayne@68 6788 }
jpayne@68 6789
jpayne@68 6790 /* "array.pxd":148
jpayne@68 6791 * if zero and op is not None:
jpayne@68 6792 * memset(op.data.as_chars, 0, length * op.ob_descr.itemsize)
jpayne@68 6793 * return op # <<<<<<<<<<<<<<
jpayne@68 6794 *
jpayne@68 6795 * cdef inline array copy(array self):
jpayne@68 6796 */
jpayne@68 6797 __Pyx_XDECREF((PyObject *)__pyx_r);
jpayne@68 6798 __Pyx_INCREF((PyObject *)__pyx_v_op);
jpayne@68 6799 __pyx_r = __pyx_v_op;
jpayne@68 6800 goto __pyx_L0;
jpayne@68 6801
jpayne@68 6802 /* "array.pxd":141
jpayne@68 6803 *
jpayne@68 6804 *
jpayne@68 6805 * cdef inline array clone(array template, Py_ssize_t length, bint zero): # <<<<<<<<<<<<<<
jpayne@68 6806 * """ fast creation of a new array, given a template array.
jpayne@68 6807 * type will be same as template.
jpayne@68 6808 */
jpayne@68 6809
jpayne@68 6810 /* function exit code */
jpayne@68 6811 __pyx_L1_error:;
jpayne@68 6812 __Pyx_XDECREF(__pyx_t_1);
jpayne@68 6813 __Pyx_AddTraceback("cpython.array.clone", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@68 6814 __pyx_r = 0;
jpayne@68 6815 __pyx_L0:;
jpayne@68 6816 __Pyx_XDECREF((PyObject *)__pyx_v_op);
jpayne@68 6817 __Pyx_XGIVEREF((PyObject *)__pyx_r);
jpayne@68 6818 __Pyx_RefNannyFinishContext();
jpayne@68 6819 return __pyx_r;
jpayne@68 6820 }
jpayne@68 6821
jpayne@68 6822 /* "array.pxd":150
jpayne@68 6823 * return op
jpayne@68 6824 *
jpayne@68 6825 * cdef inline array copy(array self): # <<<<<<<<<<<<<<
jpayne@68 6826 * """ make a copy of an array. """
jpayne@68 6827 * cdef array op = newarrayobject(Py_TYPE(self), Py_SIZE(self), self.ob_descr)
jpayne@68 6828 */
jpayne@68 6829
jpayne@68 6830 static CYTHON_INLINE arrayobject *__pyx_f_7cpython_5array_copy(arrayobject *__pyx_v_self) {
jpayne@68 6831 arrayobject *__pyx_v_op = 0;
jpayne@68 6832 arrayobject *__pyx_r = NULL;
jpayne@68 6833 __Pyx_RefNannyDeclarations
jpayne@68 6834 PyObject *__pyx_t_1 = NULL;
jpayne@68 6835 int __pyx_lineno = 0;
jpayne@68 6836 const char *__pyx_filename = NULL;
jpayne@68 6837 int __pyx_clineno = 0;
jpayne@68 6838 __Pyx_RefNannySetupContext("copy", 1);
jpayne@68 6839
jpayne@68 6840 /* "array.pxd":152
jpayne@68 6841 * cdef inline array copy(array self):
jpayne@68 6842 * """ make a copy of an array. """
jpayne@68 6843 * cdef array op = newarrayobject(Py_TYPE(self), Py_SIZE(self), self.ob_descr) # <<<<<<<<<<<<<<
jpayne@68 6844 * memcpy(op.data.as_chars, self.data.as_chars, Py_SIZE(op) * op.ob_descr.itemsize)
jpayne@68 6845 * return op
jpayne@68 6846 */
jpayne@68 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@68 6848 __Pyx_GOTREF(__pyx_t_1);
jpayne@68 6849 __pyx_v_op = ((arrayobject *)__pyx_t_1);
jpayne@68 6850 __pyx_t_1 = 0;
jpayne@68 6851
jpayne@68 6852 /* "array.pxd":153
jpayne@68 6853 * """ make a copy of an array. """
jpayne@68 6854 * cdef array op = newarrayobject(Py_TYPE(self), Py_SIZE(self), self.ob_descr)
jpayne@68 6855 * memcpy(op.data.as_chars, self.data.as_chars, Py_SIZE(op) * op.ob_descr.itemsize) # <<<<<<<<<<<<<<
jpayne@68 6856 * return op
jpayne@68 6857 *
jpayne@68 6858 */
jpayne@68 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@68 6860
jpayne@68 6861 /* "array.pxd":154
jpayne@68 6862 * cdef array op = newarrayobject(Py_TYPE(self), Py_SIZE(self), self.ob_descr)
jpayne@68 6863 * memcpy(op.data.as_chars, self.data.as_chars, Py_SIZE(op) * op.ob_descr.itemsize)
jpayne@68 6864 * return op # <<<<<<<<<<<<<<
jpayne@68 6865 *
jpayne@68 6866 * cdef inline int extend_buffer(array self, char* stuff, Py_ssize_t n) except -1:
jpayne@68 6867 */
jpayne@68 6868 __Pyx_XDECREF((PyObject *)__pyx_r);
jpayne@68 6869 __Pyx_INCREF((PyObject *)__pyx_v_op);
jpayne@68 6870 __pyx_r = __pyx_v_op;
jpayne@68 6871 goto __pyx_L0;
jpayne@68 6872
jpayne@68 6873 /* "array.pxd":150
jpayne@68 6874 * return op
jpayne@68 6875 *
jpayne@68 6876 * cdef inline array copy(array self): # <<<<<<<<<<<<<<
jpayne@68 6877 * """ make a copy of an array. """
jpayne@68 6878 * cdef array op = newarrayobject(Py_TYPE(self), Py_SIZE(self), self.ob_descr)
jpayne@68 6879 */
jpayne@68 6880
jpayne@68 6881 /* function exit code */
jpayne@68 6882 __pyx_L1_error:;
jpayne@68 6883 __Pyx_XDECREF(__pyx_t_1);
jpayne@68 6884 __Pyx_AddTraceback("cpython.array.copy", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@68 6885 __pyx_r = 0;
jpayne@68 6886 __pyx_L0:;
jpayne@68 6887 __Pyx_XDECREF((PyObject *)__pyx_v_op);
jpayne@68 6888 __Pyx_XGIVEREF((PyObject *)__pyx_r);
jpayne@68 6889 __Pyx_RefNannyFinishContext();
jpayne@68 6890 return __pyx_r;
jpayne@68 6891 }
jpayne@68 6892
jpayne@68 6893 /* "array.pxd":156
jpayne@68 6894 * return op
jpayne@68 6895 *
jpayne@68 6896 * cdef inline int extend_buffer(array self, char* stuff, Py_ssize_t n) except -1: # <<<<<<<<<<<<<<
jpayne@68 6897 * """ efficient appending of new stuff of same type
jpayne@68 6898 * (e.g. of same array type)
jpayne@68 6899 */
jpayne@68 6900
jpayne@68 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@68 6902 Py_ssize_t __pyx_v_itemsize;
jpayne@68 6903 Py_ssize_t __pyx_v_origsize;
jpayne@68 6904 int __pyx_r;
jpayne@68 6905 int __pyx_t_1;
jpayne@68 6906 int __pyx_lineno = 0;
jpayne@68 6907 const char *__pyx_filename = NULL;
jpayne@68 6908 int __pyx_clineno = 0;
jpayne@68 6909
jpayne@68 6910 /* "array.pxd":160
jpayne@68 6911 * (e.g. of same array type)
jpayne@68 6912 * n: number of elements (not number of bytes!) """
jpayne@68 6913 * cdef Py_ssize_t itemsize = self.ob_descr.itemsize # <<<<<<<<<<<<<<
jpayne@68 6914 * cdef Py_ssize_t origsize = Py_SIZE(self)
jpayne@68 6915 * resize_smart(self, origsize + n)
jpayne@68 6916 */
jpayne@68 6917 __pyx_t_1 = __pyx_v_self->ob_descr->itemsize;
jpayne@68 6918 __pyx_v_itemsize = __pyx_t_1;
jpayne@68 6919
jpayne@68 6920 /* "array.pxd":161
jpayne@68 6921 * n: number of elements (not number of bytes!) """
jpayne@68 6922 * cdef Py_ssize_t itemsize = self.ob_descr.itemsize
jpayne@68 6923 * cdef Py_ssize_t origsize = Py_SIZE(self) # <<<<<<<<<<<<<<
jpayne@68 6924 * resize_smart(self, origsize + n)
jpayne@68 6925 * memcpy(self.data.as_chars + origsize * itemsize, stuff, n * itemsize)
jpayne@68 6926 */
jpayne@68 6927 __pyx_v_origsize = Py_SIZE(((PyObject *)__pyx_v_self));
jpayne@68 6928
jpayne@68 6929 /* "array.pxd":162
jpayne@68 6930 * cdef Py_ssize_t itemsize = self.ob_descr.itemsize
jpayne@68 6931 * cdef Py_ssize_t origsize = Py_SIZE(self)
jpayne@68 6932 * resize_smart(self, origsize + n) # <<<<<<<<<<<<<<
jpayne@68 6933 * memcpy(self.data.as_chars + origsize * itemsize, stuff, n * itemsize)
jpayne@68 6934 * return 0
jpayne@68 6935 */
jpayne@68 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@68 6937
jpayne@68 6938 /* "array.pxd":163
jpayne@68 6939 * cdef Py_ssize_t origsize = Py_SIZE(self)
jpayne@68 6940 * resize_smart(self, origsize + n)
jpayne@68 6941 * memcpy(self.data.as_chars + origsize * itemsize, stuff, n * itemsize) # <<<<<<<<<<<<<<
jpayne@68 6942 * return 0
jpayne@68 6943 *
jpayne@68 6944 */
jpayne@68 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@68 6946
jpayne@68 6947 /* "array.pxd":164
jpayne@68 6948 * resize_smart(self, origsize + n)
jpayne@68 6949 * memcpy(self.data.as_chars + origsize * itemsize, stuff, n * itemsize)
jpayne@68 6950 * return 0 # <<<<<<<<<<<<<<
jpayne@68 6951 *
jpayne@68 6952 * cdef inline int extend(array self, array other) except -1:
jpayne@68 6953 */
jpayne@68 6954 __pyx_r = 0;
jpayne@68 6955 goto __pyx_L0;
jpayne@68 6956
jpayne@68 6957 /* "array.pxd":156
jpayne@68 6958 * return op
jpayne@68 6959 *
jpayne@68 6960 * cdef inline int extend_buffer(array self, char* stuff, Py_ssize_t n) except -1: # <<<<<<<<<<<<<<
jpayne@68 6961 * """ efficient appending of new stuff of same type
jpayne@68 6962 * (e.g. of same array type)
jpayne@68 6963 */
jpayne@68 6964
jpayne@68 6965 /* function exit code */
jpayne@68 6966 __pyx_L1_error:;
jpayne@68 6967 __Pyx_AddTraceback("cpython.array.extend_buffer", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@68 6968 __pyx_r = -1;
jpayne@68 6969 __pyx_L0:;
jpayne@68 6970 return __pyx_r;
jpayne@68 6971 }
jpayne@68 6972
jpayne@68 6973 /* "array.pxd":166
jpayne@68 6974 * return 0
jpayne@68 6975 *
jpayne@68 6976 * cdef inline int extend(array self, array other) except -1: # <<<<<<<<<<<<<<
jpayne@68 6977 * """ extend array with data from another array; types must match. """
jpayne@68 6978 * if self.ob_descr.typecode != other.ob_descr.typecode:
jpayne@68 6979 */
jpayne@68 6980
jpayne@68 6981 static CYTHON_INLINE int __pyx_f_7cpython_5array_extend(arrayobject *__pyx_v_self, arrayobject *__pyx_v_other) {
jpayne@68 6982 int __pyx_r;
jpayne@68 6983 int __pyx_t_1;
jpayne@68 6984 int __pyx_t_2;
jpayne@68 6985 int __pyx_lineno = 0;
jpayne@68 6986 const char *__pyx_filename = NULL;
jpayne@68 6987 int __pyx_clineno = 0;
jpayne@68 6988
jpayne@68 6989 /* "array.pxd":168
jpayne@68 6990 * cdef inline int extend(array self, array other) except -1:
jpayne@68 6991 * """ extend array with data from another array; types must match. """
jpayne@68 6992 * if self.ob_descr.typecode != other.ob_descr.typecode: # <<<<<<<<<<<<<<
jpayne@68 6993 * PyErr_BadArgument()
jpayne@68 6994 * return extend_buffer(self, other.data.as_chars, Py_SIZE(other))
jpayne@68 6995 */
jpayne@68 6996 __pyx_t_1 = (__pyx_v_self->ob_descr->typecode != __pyx_v_other->ob_descr->typecode);
jpayne@68 6997 if (__pyx_t_1) {
jpayne@68 6998
jpayne@68 6999 /* "array.pxd":169
jpayne@68 7000 * """ extend array with data from another array; types must match. """
jpayne@68 7001 * if self.ob_descr.typecode != other.ob_descr.typecode:
jpayne@68 7002 * PyErr_BadArgument() # <<<<<<<<<<<<<<
jpayne@68 7003 * return extend_buffer(self, other.data.as_chars, Py_SIZE(other))
jpayne@68 7004 *
jpayne@68 7005 */
jpayne@68 7006 __pyx_t_2 = PyErr_BadArgument(); if (unlikely(__pyx_t_2 == ((int)0))) __PYX_ERR(3, 169, __pyx_L1_error)
jpayne@68 7007
jpayne@68 7008 /* "array.pxd":168
jpayne@68 7009 * cdef inline int extend(array self, array other) except -1:
jpayne@68 7010 * """ extend array with data from another array; types must match. """
jpayne@68 7011 * if self.ob_descr.typecode != other.ob_descr.typecode: # <<<<<<<<<<<<<<
jpayne@68 7012 * PyErr_BadArgument()
jpayne@68 7013 * return extend_buffer(self, other.data.as_chars, Py_SIZE(other))
jpayne@68 7014 */
jpayne@68 7015 }
jpayne@68 7016
jpayne@68 7017 /* "array.pxd":170
jpayne@68 7018 * if self.ob_descr.typecode != other.ob_descr.typecode:
jpayne@68 7019 * PyErr_BadArgument()
jpayne@68 7020 * return extend_buffer(self, other.data.as_chars, Py_SIZE(other)) # <<<<<<<<<<<<<<
jpayne@68 7021 *
jpayne@68 7022 * cdef inline void zero(array self) noexcept:
jpayne@68 7023 */
jpayne@68 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@68 7025 __pyx_r = __pyx_t_2;
jpayne@68 7026 goto __pyx_L0;
jpayne@68 7027
jpayne@68 7028 /* "array.pxd":166
jpayne@68 7029 * return 0
jpayne@68 7030 *
jpayne@68 7031 * cdef inline int extend(array self, array other) except -1: # <<<<<<<<<<<<<<
jpayne@68 7032 * """ extend array with data from another array; types must match. """
jpayne@68 7033 * if self.ob_descr.typecode != other.ob_descr.typecode:
jpayne@68 7034 */
jpayne@68 7035
jpayne@68 7036 /* function exit code */
jpayne@68 7037 __pyx_L1_error:;
jpayne@68 7038 __Pyx_AddTraceback("cpython.array.extend", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@68 7039 __pyx_r = -1;
jpayne@68 7040 __pyx_L0:;
jpayne@68 7041 return __pyx_r;
jpayne@68 7042 }
jpayne@68 7043
jpayne@68 7044 /* "array.pxd":172
jpayne@68 7045 * return extend_buffer(self, other.data.as_chars, Py_SIZE(other))
jpayne@68 7046 *
jpayne@68 7047 * cdef inline void zero(array self) noexcept: # <<<<<<<<<<<<<<
jpayne@68 7048 * """ set all elements of array to zero. """
jpayne@68 7049 * memset(self.data.as_chars, 0, Py_SIZE(self) * self.ob_descr.itemsize)
jpayne@68 7050 */
jpayne@68 7051
jpayne@68 7052 static CYTHON_INLINE void __pyx_f_7cpython_5array_zero(arrayobject *__pyx_v_self) {
jpayne@68 7053
jpayne@68 7054 /* "array.pxd":174
jpayne@68 7055 * cdef inline void zero(array self) noexcept:
jpayne@68 7056 * """ set all elements of array to zero. """
jpayne@68 7057 * memset(self.data.as_chars, 0, Py_SIZE(self) * self.ob_descr.itemsize) # <<<<<<<<<<<<<<
jpayne@68 7058 */
jpayne@68 7059 (void)(memset(__pyx_v_self->data.as_chars, 0, (Py_SIZE(((PyObject *)__pyx_v_self)) * __pyx_v_self->ob_descr->itemsize)));
jpayne@68 7060
jpayne@68 7061 /* "array.pxd":172
jpayne@68 7062 * return extend_buffer(self, other.data.as_chars, Py_SIZE(other))
jpayne@68 7063 *
jpayne@68 7064 * cdef inline void zero(array self) noexcept: # <<<<<<<<<<<<<<
jpayne@68 7065 * """ set all elements of array to zero. """
jpayne@68 7066 * memset(self.data.as_chars, 0, Py_SIZE(self) * self.ob_descr.itemsize)
jpayne@68 7067 */
jpayne@68 7068
jpayne@68 7069 /* function exit code */
jpayne@68 7070 }
jpayne@68 7071
jpayne@68 7072 /* "pysam/libctabix.pyx":84
jpayne@68 7073 * cdef class Parser:
jpayne@68 7074 *
jpayne@68 7075 * def __init__(self, encoding="ascii"): # <<<<<<<<<<<<<<
jpayne@68 7076 * self.encoding = encoding
jpayne@68 7077 *
jpayne@68 7078 */
jpayne@68 7079
jpayne@68 7080 /* Python wrapper */
jpayne@68 7081 static int __pyx_pw_5pysam_9libctabix_6Parser_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
jpayne@68 7082 static int __pyx_pw_5pysam_9libctabix_6Parser_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
jpayne@68 7083 PyObject *__pyx_v_encoding = 0;
jpayne@68 7084 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
jpayne@68 7085 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@68 7086 PyObject* values[1] = {0};
jpayne@68 7087 int __pyx_lineno = 0;
jpayne@68 7088 const char *__pyx_filename = NULL;
jpayne@68 7089 int __pyx_clineno = 0;
jpayne@68 7090 int __pyx_r;
jpayne@68 7091 __Pyx_RefNannyDeclarations
jpayne@68 7092 __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
jpayne@68 7093 #if CYTHON_ASSUME_SAFE_MACROS
jpayne@68 7094 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
jpayne@68 7095 #else
jpayne@68 7096 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
jpayne@68 7097 #endif
jpayne@68 7098 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
jpayne@68 7099 {
jpayne@68 7100 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_encoding,0};
jpayne@68 7101 values[0] = __Pyx_Arg_NewRef_VARARGS(((PyObject *)__pyx_n_u_ascii));
jpayne@68 7102 if (__pyx_kwds) {
jpayne@68 7103 Py_ssize_t kw_args;
jpayne@68 7104 switch (__pyx_nargs) {
jpayne@68 7105 case 1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
jpayne@68 7106 CYTHON_FALLTHROUGH;
jpayne@68 7107 case 0: break;
jpayne@68 7108 default: goto __pyx_L5_argtuple_error;
jpayne@68 7109 }
jpayne@68 7110 kw_args = __Pyx_NumKwargs_VARARGS(__pyx_kwds);
jpayne@68 7111 switch (__pyx_nargs) {
jpayne@68 7112 case 0:
jpayne@68 7113 if (kw_args > 0) {
jpayne@68 7114 PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_encoding);
jpayne@68 7115 if (value) { values[0] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; }
jpayne@68 7116 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 84, __pyx_L3_error)
jpayne@68 7117 }
jpayne@68 7118 }
jpayne@68 7119 if (unlikely(kw_args > 0)) {
jpayne@68 7120 const Py_ssize_t kwd_pos_args = __pyx_nargs;
jpayne@68 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@68 7122 }
jpayne@68 7123 } else {
jpayne@68 7124 switch (__pyx_nargs) {
jpayne@68 7125 case 1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
jpayne@68 7126 CYTHON_FALLTHROUGH;
jpayne@68 7127 case 0: break;
jpayne@68 7128 default: goto __pyx_L5_argtuple_error;
jpayne@68 7129 }
jpayne@68 7130 }
jpayne@68 7131 __pyx_v_encoding = values[0];
jpayne@68 7132 }
jpayne@68 7133 goto __pyx_L6_skip;
jpayne@68 7134 __pyx_L5_argtuple_error:;
jpayne@68 7135 __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 1, __pyx_nargs); __PYX_ERR(0, 84, __pyx_L3_error)
jpayne@68 7136 __pyx_L6_skip:;
jpayne@68 7137 goto __pyx_L4_argument_unpacking_done;
jpayne@68 7138 __pyx_L3_error:;
jpayne@68 7139 {
jpayne@68 7140 Py_ssize_t __pyx_temp;
jpayne@68 7141 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
jpayne@68 7142 __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]);
jpayne@68 7143 }
jpayne@68 7144 }
jpayne@68 7145 __Pyx_AddTraceback("pysam.libctabix.Parser.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@68 7146 __Pyx_RefNannyFinishContext();
jpayne@68 7147 return -1;
jpayne@68 7148 __pyx_L4_argument_unpacking_done:;
jpayne@68 7149 __pyx_r = __pyx_pf_5pysam_9libctabix_6Parser___init__(((struct __pyx_obj_5pysam_9libctabix_Parser *)__pyx_v_self), __pyx_v_encoding);
jpayne@68 7150
jpayne@68 7151 /* function exit code */
jpayne@68 7152 {
jpayne@68 7153 Py_ssize_t __pyx_temp;
jpayne@68 7154 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
jpayne@68 7155 __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]);
jpayne@68 7156 }
jpayne@68 7157 }
jpayne@68 7158 __Pyx_RefNannyFinishContext();
jpayne@68 7159 return __pyx_r;
jpayne@68 7160 }
jpayne@68 7161
jpayne@68 7162 static int __pyx_pf_5pysam_9libctabix_6Parser___init__(struct __pyx_obj_5pysam_9libctabix_Parser *__pyx_v_self, PyObject *__pyx_v_encoding) {
jpayne@68 7163 int __pyx_r;
jpayne@68 7164 __Pyx_TraceDeclarations
jpayne@68 7165 __Pyx_RefNannyDeclarations
jpayne@68 7166 int __pyx_lineno = 0;
jpayne@68 7167 const char *__pyx_filename = NULL;
jpayne@68 7168 int __pyx_clineno = 0;
jpayne@68 7169 __Pyx_RefNannySetupContext("__init__", 1);
jpayne@68 7170 __Pyx_TraceCall("__init__", __pyx_f[0], 84, 0, __PYX_ERR(0, 84, __pyx_L1_error));
jpayne@68 7171
jpayne@68 7172 /* "pysam/libctabix.pyx":85
jpayne@68 7173 *
jpayne@68 7174 * def __init__(self, encoding="ascii"):
jpayne@68 7175 * self.encoding = encoding # <<<<<<<<<<<<<<
jpayne@68 7176 *
jpayne@68 7177 * def set_encoding(self, encoding):
jpayne@68 7178 */
jpayne@68 7179 __Pyx_INCREF(__pyx_v_encoding);
jpayne@68 7180 __Pyx_GIVEREF(__pyx_v_encoding);
jpayne@68 7181 __Pyx_GOTREF(__pyx_v_self->encoding);
jpayne@68 7182 __Pyx_DECREF(__pyx_v_self->encoding);
jpayne@68 7183 __pyx_v_self->encoding = __pyx_v_encoding;
jpayne@68 7184
jpayne@68 7185 /* "pysam/libctabix.pyx":84
jpayne@68 7186 * cdef class Parser:
jpayne@68 7187 *
jpayne@68 7188 * def __init__(self, encoding="ascii"): # <<<<<<<<<<<<<<
jpayne@68 7189 * self.encoding = encoding
jpayne@68 7190 *
jpayne@68 7191 */
jpayne@68 7192
jpayne@68 7193 /* function exit code */
jpayne@68 7194 __pyx_r = 0;
jpayne@68 7195 goto __pyx_L0;
jpayne@68 7196 __pyx_L1_error:;
jpayne@68 7197 __Pyx_AddTraceback("pysam.libctabix.Parser.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@68 7198 __pyx_r = -1;
jpayne@68 7199 __pyx_L0:;
jpayne@68 7200 __Pyx_TraceReturn(Py_None, 0);
jpayne@68 7201 __Pyx_RefNannyFinishContext();
jpayne@68 7202 return __pyx_r;
jpayne@68 7203 }
jpayne@68 7204
jpayne@68 7205 /* "pysam/libctabix.pyx":87
jpayne@68 7206 * self.encoding = encoding
jpayne@68 7207 *
jpayne@68 7208 * def set_encoding(self, encoding): # <<<<<<<<<<<<<<
jpayne@68 7209 * self.encoding = encoding
jpayne@68 7210 *
jpayne@68 7211 */
jpayne@68 7212
jpayne@68 7213 /* Python wrapper */
jpayne@68 7214 static PyObject *__pyx_pw_5pysam_9libctabix_6Parser_3set_encoding(PyObject *__pyx_v_self,
jpayne@68 7215 #if CYTHON_METH_FASTCALL
jpayne@68 7216 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@68 7217 #else
jpayne@68 7218 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@68 7219 #endif
jpayne@68 7220 ); /*proto*/
jpayne@68 7221 PyDoc_STRVAR(__pyx_doc_5pysam_9libctabix_6Parser_2set_encoding, "Parser.set_encoding(self, encoding)");
jpayne@68 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@68 7223 static PyObject *__pyx_pw_5pysam_9libctabix_6Parser_3set_encoding(PyObject *__pyx_v_self,
jpayne@68 7224 #if CYTHON_METH_FASTCALL
jpayne@68 7225 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@68 7226 #else
jpayne@68 7227 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@68 7228 #endif
jpayne@68 7229 ) {
jpayne@68 7230 PyObject *__pyx_v_encoding = 0;
jpayne@68 7231 #if !CYTHON_METH_FASTCALL
jpayne@68 7232 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
jpayne@68 7233 #endif
jpayne@68 7234 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@68 7235 PyObject* values[1] = {0};
jpayne@68 7236 int __pyx_lineno = 0;
jpayne@68 7237 const char *__pyx_filename = NULL;
jpayne@68 7238 int __pyx_clineno = 0;
jpayne@68 7239 PyObject *__pyx_r = 0;
jpayne@68 7240 __Pyx_RefNannyDeclarations
jpayne@68 7241 __Pyx_RefNannySetupContext("set_encoding (wrapper)", 0);
jpayne@68 7242 #if !CYTHON_METH_FASTCALL
jpayne@68 7243 #if CYTHON_ASSUME_SAFE_MACROS
jpayne@68 7244 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
jpayne@68 7245 #else
jpayne@68 7246 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
jpayne@68 7247 #endif
jpayne@68 7248 #endif
jpayne@68 7249 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
jpayne@68 7250 {
jpayne@68 7251 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_encoding,0};
jpayne@68 7252 if (__pyx_kwds) {
jpayne@68 7253 Py_ssize_t kw_args;
jpayne@68 7254 switch (__pyx_nargs) {
jpayne@68 7255 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
jpayne@68 7256 CYTHON_FALLTHROUGH;
jpayne@68 7257 case 0: break;
jpayne@68 7258 default: goto __pyx_L5_argtuple_error;
jpayne@68 7259 }
jpayne@68 7260 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
jpayne@68 7261 switch (__pyx_nargs) {
jpayne@68 7262 case 0:
jpayne@68 7263 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_encoding)) != 0)) {
jpayne@68 7264 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
jpayne@68 7265 kw_args--;
jpayne@68 7266 }
jpayne@68 7267 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 87, __pyx_L3_error)
jpayne@68 7268 else goto __pyx_L5_argtuple_error;
jpayne@68 7269 }
jpayne@68 7270 if (unlikely(kw_args > 0)) {
jpayne@68 7271 const Py_ssize_t kwd_pos_args = __pyx_nargs;
jpayne@68 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@68 7273 }
jpayne@68 7274 } else if (unlikely(__pyx_nargs != 1)) {
jpayne@68 7275 goto __pyx_L5_argtuple_error;
jpayne@68 7276 } else {
jpayne@68 7277 values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
jpayne@68 7278 }
jpayne@68 7279 __pyx_v_encoding = values[0];
jpayne@68 7280 }
jpayne@68 7281 goto __pyx_L6_skip;
jpayne@68 7282 __pyx_L5_argtuple_error:;
jpayne@68 7283 __Pyx_RaiseArgtupleInvalid("set_encoding", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 87, __pyx_L3_error)
jpayne@68 7284 __pyx_L6_skip:;
jpayne@68 7285 goto __pyx_L4_argument_unpacking_done;
jpayne@68 7286 __pyx_L3_error:;
jpayne@68 7287 {
jpayne@68 7288 Py_ssize_t __pyx_temp;
jpayne@68 7289 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
jpayne@68 7290 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
jpayne@68 7291 }
jpayne@68 7292 }
jpayne@68 7293 __Pyx_AddTraceback("pysam.libctabix.Parser.set_encoding", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@68 7294 __Pyx_RefNannyFinishContext();
jpayne@68 7295 return NULL;
jpayne@68 7296 __pyx_L4_argument_unpacking_done:;
jpayne@68 7297 __pyx_r = __pyx_pf_5pysam_9libctabix_6Parser_2set_encoding(((struct __pyx_obj_5pysam_9libctabix_Parser *)__pyx_v_self), __pyx_v_encoding);
jpayne@68 7298
jpayne@68 7299 /* function exit code */
jpayne@68 7300 {
jpayne@68 7301 Py_ssize_t __pyx_temp;
jpayne@68 7302 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
jpayne@68 7303 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
jpayne@68 7304 }
jpayne@68 7305 }
jpayne@68 7306 __Pyx_RefNannyFinishContext();
jpayne@68 7307 return __pyx_r;
jpayne@68 7308 }
jpayne@68 7309
jpayne@68 7310 static PyObject *__pyx_pf_5pysam_9libctabix_6Parser_2set_encoding(struct __pyx_obj_5pysam_9libctabix_Parser *__pyx_v_self, PyObject *__pyx_v_encoding) {
jpayne@68 7311 PyObject *__pyx_r = NULL;
jpayne@68 7312 __Pyx_TraceDeclarations
jpayne@68 7313 __Pyx_RefNannyDeclarations
jpayne@68 7314 int __pyx_lineno = 0;
jpayne@68 7315 const char *__pyx_filename = NULL;
jpayne@68 7316 int __pyx_clineno = 0;
jpayne@68 7317 __Pyx_TraceFrameInit(__pyx_codeobj_)
jpayne@68 7318 __Pyx_RefNannySetupContext("set_encoding", 1);
jpayne@68 7319 __Pyx_TraceCall("set_encoding", __pyx_f[0], 87, 0, __PYX_ERR(0, 87, __pyx_L1_error));
jpayne@68 7320
jpayne@68 7321 /* "pysam/libctabix.pyx":88
jpayne@68 7322 *
jpayne@68 7323 * def set_encoding(self, encoding):
jpayne@68 7324 * self.encoding = encoding # <<<<<<<<<<<<<<
jpayne@68 7325 *
jpayne@68 7326 * def get_encoding(self):
jpayne@68 7327 */
jpayne@68 7328 __Pyx_INCREF(__pyx_v_encoding);
jpayne@68 7329 __Pyx_GIVEREF(__pyx_v_encoding);
jpayne@68 7330 __Pyx_GOTREF(__pyx_v_self->encoding);
jpayne@68 7331 __Pyx_DECREF(__pyx_v_self->encoding);
jpayne@68 7332 __pyx_v_self->encoding = __pyx_v_encoding;
jpayne@68 7333
jpayne@68 7334 /* "pysam/libctabix.pyx":87
jpayne@68 7335 * self.encoding = encoding
jpayne@68 7336 *
jpayne@68 7337 * def set_encoding(self, encoding): # <<<<<<<<<<<<<<
jpayne@68 7338 * self.encoding = encoding
jpayne@68 7339 *
jpayne@68 7340 */
jpayne@68 7341
jpayne@68 7342 /* function exit code */
jpayne@68 7343 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
jpayne@68 7344 goto __pyx_L0;
jpayne@68 7345 __pyx_L1_error:;
jpayne@68 7346 __Pyx_AddTraceback("pysam.libctabix.Parser.set_encoding", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@68 7347 __pyx_r = NULL;
jpayne@68 7348 __pyx_L0:;
jpayne@68 7349 __Pyx_XGIVEREF(__pyx_r);
jpayne@68 7350 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@68 7351 __Pyx_RefNannyFinishContext();
jpayne@68 7352 return __pyx_r;
jpayne@68 7353 }
jpayne@68 7354
jpayne@68 7355 /* "pysam/libctabix.pyx":90
jpayne@68 7356 * self.encoding = encoding
jpayne@68 7357 *
jpayne@68 7358 * def get_encoding(self): # <<<<<<<<<<<<<<
jpayne@68 7359 * return self.encoding
jpayne@68 7360 *
jpayne@68 7361 */
jpayne@68 7362
jpayne@68 7363 /* Python wrapper */
jpayne@68 7364 static PyObject *__pyx_pw_5pysam_9libctabix_6Parser_5get_encoding(PyObject *__pyx_v_self,
jpayne@68 7365 #if CYTHON_METH_FASTCALL
jpayne@68 7366 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@68 7367 #else
jpayne@68 7368 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@68 7369 #endif
jpayne@68 7370 ); /*proto*/
jpayne@68 7371 PyDoc_STRVAR(__pyx_doc_5pysam_9libctabix_6Parser_4get_encoding, "Parser.get_encoding(self)");
jpayne@68 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@68 7373 static PyObject *__pyx_pw_5pysam_9libctabix_6Parser_5get_encoding(PyObject *__pyx_v_self,
jpayne@68 7374 #if CYTHON_METH_FASTCALL
jpayne@68 7375 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@68 7376 #else
jpayne@68 7377 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@68 7378 #endif
jpayne@68 7379 ) {
jpayne@68 7380 #if !CYTHON_METH_FASTCALL
jpayne@68 7381 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
jpayne@68 7382 #endif
jpayne@68 7383 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@68 7384 PyObject *__pyx_r = 0;
jpayne@68 7385 __Pyx_RefNannyDeclarations
jpayne@68 7386 __Pyx_RefNannySetupContext("get_encoding (wrapper)", 0);
jpayne@68 7387 #if !CYTHON_METH_FASTCALL
jpayne@68 7388 #if CYTHON_ASSUME_SAFE_MACROS
jpayne@68 7389 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
jpayne@68 7390 #else
jpayne@68 7391 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
jpayne@68 7392 #endif
jpayne@68 7393 #endif
jpayne@68 7394 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
jpayne@68 7395 if (unlikely(__pyx_nargs > 0)) {
jpayne@68 7396 __Pyx_RaiseArgtupleInvalid("get_encoding", 1, 0, 0, __pyx_nargs); return NULL;}
jpayne@68 7397 if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "get_encoding", 0))) return NULL;
jpayne@68 7398 __pyx_r = __pyx_pf_5pysam_9libctabix_6Parser_4get_encoding(((struct __pyx_obj_5pysam_9libctabix_Parser *)__pyx_v_self));
jpayne@68 7399
jpayne@68 7400 /* function exit code */
jpayne@68 7401 __Pyx_RefNannyFinishContext();
jpayne@68 7402 return __pyx_r;
jpayne@68 7403 }
jpayne@68 7404
jpayne@68 7405 static PyObject *__pyx_pf_5pysam_9libctabix_6Parser_4get_encoding(struct __pyx_obj_5pysam_9libctabix_Parser *__pyx_v_self) {
jpayne@68 7406 PyObject *__pyx_r = NULL;
jpayne@68 7407 __Pyx_TraceDeclarations
jpayne@68 7408 __Pyx_RefNannyDeclarations
jpayne@68 7409 int __pyx_lineno = 0;
jpayne@68 7410 const char *__pyx_filename = NULL;
jpayne@68 7411 int __pyx_clineno = 0;
jpayne@68 7412 __Pyx_TraceFrameInit(__pyx_codeobj__2)
jpayne@68 7413 __Pyx_RefNannySetupContext("get_encoding", 1);
jpayne@68 7414 __Pyx_TraceCall("get_encoding", __pyx_f[0], 90, 0, __PYX_ERR(0, 90, __pyx_L1_error));
jpayne@68 7415
jpayne@68 7416 /* "pysam/libctabix.pyx":91
jpayne@68 7417 *
jpayne@68 7418 * def get_encoding(self):
jpayne@68 7419 * return self.encoding # <<<<<<<<<<<<<<
jpayne@68 7420 *
jpayne@68 7421 * cdef parse(self, char * buffer, int length):
jpayne@68 7422 */
jpayne@68 7423 __Pyx_XDECREF(__pyx_r);
jpayne@68 7424 __Pyx_INCREF(__pyx_v_self->encoding);
jpayne@68 7425 __pyx_r = __pyx_v_self->encoding;
jpayne@68 7426 goto __pyx_L0;
jpayne@68 7427
jpayne@68 7428 /* "pysam/libctabix.pyx":90
jpayne@68 7429 * self.encoding = encoding
jpayne@68 7430 *
jpayne@68 7431 * def get_encoding(self): # <<<<<<<<<<<<<<
jpayne@68 7432 * return self.encoding
jpayne@68 7433 *
jpayne@68 7434 */
jpayne@68 7435
jpayne@68 7436 /* function exit code */
jpayne@68 7437 __pyx_L1_error:;
jpayne@68 7438 __Pyx_AddTraceback("pysam.libctabix.Parser.get_encoding", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@68 7439 __pyx_r = NULL;
jpayne@68 7440 __pyx_L0:;
jpayne@68 7441 __Pyx_XGIVEREF(__pyx_r);
jpayne@68 7442 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@68 7443 __Pyx_RefNannyFinishContext();
jpayne@68 7444 return __pyx_r;
jpayne@68 7445 }
jpayne@68 7446
jpayne@68 7447 /* "pysam/libctabix.pyx":93
jpayne@68 7448 * return self.encoding
jpayne@68 7449 *
jpayne@68 7450 * cdef parse(self, char * buffer, int length): # <<<<<<<<<<<<<<
jpayne@68 7451 * raise NotImplementedError(
jpayne@68 7452 * 'parse method of %s not implemented' % str(self))
jpayne@68 7453 */
jpayne@68 7454
jpayne@68 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@68 7456 PyObject *__pyx_r = NULL;
jpayne@68 7457 __Pyx_TraceDeclarations
jpayne@68 7458 __Pyx_RefNannyDeclarations
jpayne@68 7459 PyObject *__pyx_t_1 = NULL;
jpayne@68 7460 PyObject *__pyx_t_2 = NULL;
jpayne@68 7461 int __pyx_lineno = 0;
jpayne@68 7462 const char *__pyx_filename = NULL;
jpayne@68 7463 int __pyx_clineno = 0;
jpayne@68 7464 __Pyx_RefNannySetupContext("parse", 1);
jpayne@68 7465 __Pyx_TraceCall("parse", __pyx_f[0], 93, 0, __PYX_ERR(0, 93, __pyx_L1_error));
jpayne@68 7466
jpayne@68 7467 /* "pysam/libctabix.pyx":95
jpayne@68 7468 * cdef parse(self, char * buffer, int length):
jpayne@68 7469 * raise NotImplementedError(
jpayne@68 7470 * 'parse method of %s not implemented' % str(self)) # <<<<<<<<<<<<<<
jpayne@68 7471 *
jpayne@68 7472 * def __call__(self, char * buffer, int length):
jpayne@68 7473 */
jpayne@68 7474 __pyx_t_1 = __Pyx_PyObject_Unicode(((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 95, __pyx_L1_error)
jpayne@68 7475 __Pyx_GOTREF(__pyx_t_1);
jpayne@68 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@68 7477 __Pyx_GOTREF(__pyx_t_2);
jpayne@68 7478 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@68 7479
jpayne@68 7480 /* "pysam/libctabix.pyx":94
jpayne@68 7481 *
jpayne@68 7482 * cdef parse(self, char * buffer, int length):
jpayne@68 7483 * raise NotImplementedError( # <<<<<<<<<<<<<<
jpayne@68 7484 * 'parse method of %s not implemented' % str(self))
jpayne@68 7485 *
jpayne@68 7486 */
jpayne@68 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@68 7488 __Pyx_GOTREF(__pyx_t_1);
jpayne@68 7489 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@68 7490 __Pyx_Raise(__pyx_t_1, 0, 0, 0);
jpayne@68 7491 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@68 7492 __PYX_ERR(0, 94, __pyx_L1_error)
jpayne@68 7493
jpayne@68 7494 /* "pysam/libctabix.pyx":93
jpayne@68 7495 * return self.encoding
jpayne@68 7496 *
jpayne@68 7497 * cdef parse(self, char * buffer, int length): # <<<<<<<<<<<<<<
jpayne@68 7498 * raise NotImplementedError(
jpayne@68 7499 * 'parse method of %s not implemented' % str(self))
jpayne@68 7500 */
jpayne@68 7501
jpayne@68 7502 /* function exit code */
jpayne@68 7503 __pyx_L1_error:;
jpayne@68 7504 __Pyx_XDECREF(__pyx_t_1);
jpayne@68 7505 __Pyx_XDECREF(__pyx_t_2);
jpayne@68 7506 __Pyx_AddTraceback("pysam.libctabix.Parser.parse", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@68 7507 __pyx_r = 0;
jpayne@68 7508 __Pyx_XGIVEREF(__pyx_r);
jpayne@68 7509 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@68 7510 __Pyx_RefNannyFinishContext();
jpayne@68 7511 return __pyx_r;
jpayne@68 7512 }
jpayne@68 7513
jpayne@68 7514 /* "pysam/libctabix.pyx":97
jpayne@68 7515 * 'parse method of %s not implemented' % str(self))
jpayne@68 7516 *
jpayne@68 7517 * def __call__(self, char * buffer, int length): # <<<<<<<<<<<<<<
jpayne@68 7518 * return self.parse(buffer, length)
jpayne@68 7519 *
jpayne@68 7520 */
jpayne@68 7521
jpayne@68 7522 /* Python wrapper */
jpayne@68 7523 static PyObject *__pyx_pw_5pysam_9libctabix_6Parser_7__call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
jpayne@68 7524 static PyObject *__pyx_pw_5pysam_9libctabix_6Parser_7__call__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
jpayne@68 7525 char *__pyx_v_buffer;
jpayne@68 7526 int __pyx_v_length;
jpayne@68 7527 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
jpayne@68 7528 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@68 7529 PyObject* values[2] = {0,0};
jpayne@68 7530 int __pyx_lineno = 0;
jpayne@68 7531 const char *__pyx_filename = NULL;
jpayne@68 7532 int __pyx_clineno = 0;
jpayne@68 7533 PyObject *__pyx_r = 0;
jpayne@68 7534 __Pyx_RefNannyDeclarations
jpayne@68 7535 __Pyx_RefNannySetupContext("__call__ (wrapper)", 0);
jpayne@68 7536 #if CYTHON_ASSUME_SAFE_MACROS
jpayne@68 7537 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
jpayne@68 7538 #else
jpayne@68 7539 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
jpayne@68 7540 #endif
jpayne@68 7541 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
jpayne@68 7542 {
jpayne@68 7543 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_buffer,&__pyx_n_s_length,0};
jpayne@68 7544 if (__pyx_kwds) {
jpayne@68 7545 Py_ssize_t kw_args;
jpayne@68 7546 switch (__pyx_nargs) {
jpayne@68 7547 case 2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
jpayne@68 7548 CYTHON_FALLTHROUGH;
jpayne@68 7549 case 1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
jpayne@68 7550 CYTHON_FALLTHROUGH;
jpayne@68 7551 case 0: break;
jpayne@68 7552 default: goto __pyx_L5_argtuple_error;
jpayne@68 7553 }
jpayne@68 7554 kw_args = __Pyx_NumKwargs_VARARGS(__pyx_kwds);
jpayne@68 7555 switch (__pyx_nargs) {
jpayne@68 7556 case 0:
jpayne@68 7557 if (likely((values[0] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_buffer)) != 0)) {
jpayne@68 7558 (void)__Pyx_Arg_NewRef_VARARGS(values[0]);
jpayne@68 7559 kw_args--;
jpayne@68 7560 }
jpayne@68 7561 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 97, __pyx_L3_error)
jpayne@68 7562 else goto __pyx_L5_argtuple_error;
jpayne@68 7563 CYTHON_FALLTHROUGH;
jpayne@68 7564 case 1:
jpayne@68 7565 if (likely((values[1] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_length)) != 0)) {
jpayne@68 7566 (void)__Pyx_Arg_NewRef_VARARGS(values[1]);
jpayne@68 7567 kw_args--;
jpayne@68 7568 }
jpayne@68 7569 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 97, __pyx_L3_error)
jpayne@68 7570 else {
jpayne@68 7571 __Pyx_RaiseArgtupleInvalid("__call__", 1, 2, 2, 1); __PYX_ERR(0, 97, __pyx_L3_error)
jpayne@68 7572 }
jpayne@68 7573 }
jpayne@68 7574 if (unlikely(kw_args > 0)) {
jpayne@68 7575 const Py_ssize_t kwd_pos_args = __pyx_nargs;
jpayne@68 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@68 7577 }
jpayne@68 7578 } else if (unlikely(__pyx_nargs != 2)) {
jpayne@68 7579 goto __pyx_L5_argtuple_error;
jpayne@68 7580 } else {
jpayne@68 7581 values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
jpayne@68 7582 values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
jpayne@68 7583 }
jpayne@68 7584 __pyx_v_buffer = __Pyx_PyObject_AsWritableString(values[0]); if (unlikely((!__pyx_v_buffer) && PyErr_Occurred())) __PYX_ERR(0, 97, __pyx_L3_error)
jpayne@68 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@68 7586 }
jpayne@68 7587 goto __pyx_L6_skip;
jpayne@68 7588 __pyx_L5_argtuple_error:;
jpayne@68 7589 __Pyx_RaiseArgtupleInvalid("__call__", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 97, __pyx_L3_error)
jpayne@68 7590 __pyx_L6_skip:;
jpayne@68 7591 goto __pyx_L4_argument_unpacking_done;
jpayne@68 7592 __pyx_L3_error:;
jpayne@68 7593 {
jpayne@68 7594 Py_ssize_t __pyx_temp;
jpayne@68 7595 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
jpayne@68 7596 __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]);
jpayne@68 7597 }
jpayne@68 7598 }
jpayne@68 7599 __Pyx_AddTraceback("pysam.libctabix.Parser.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@68 7600 __Pyx_RefNannyFinishContext();
jpayne@68 7601 return NULL;
jpayne@68 7602 __pyx_L4_argument_unpacking_done:;
jpayne@68 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@68 7604
jpayne@68 7605 /* function exit code */
jpayne@68 7606 {
jpayne@68 7607 Py_ssize_t __pyx_temp;
jpayne@68 7608 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
jpayne@68 7609 __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]);
jpayne@68 7610 }
jpayne@68 7611 }
jpayne@68 7612 __Pyx_RefNannyFinishContext();
jpayne@68 7613 return __pyx_r;
jpayne@68 7614 }
jpayne@68 7615
jpayne@68 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@68 7617 PyObject *__pyx_r = NULL;
jpayne@68 7618 __Pyx_TraceDeclarations
jpayne@68 7619 __Pyx_RefNannyDeclarations
jpayne@68 7620 PyObject *__pyx_t_1 = NULL;
jpayne@68 7621 int __pyx_lineno = 0;
jpayne@68 7622 const char *__pyx_filename = NULL;
jpayne@68 7623 int __pyx_clineno = 0;
jpayne@68 7624 __Pyx_RefNannySetupContext("__call__", 1);
jpayne@68 7625 __Pyx_TraceCall("__call__", __pyx_f[0], 97, 0, __PYX_ERR(0, 97, __pyx_L1_error));
jpayne@68 7626
jpayne@68 7627 /* "pysam/libctabix.pyx":98
jpayne@68 7628 *
jpayne@68 7629 * def __call__(self, char * buffer, int length):
jpayne@68 7630 * return self.parse(buffer, length) # <<<<<<<<<<<<<<
jpayne@68 7631 *
jpayne@68 7632 *
jpayne@68 7633 */
jpayne@68 7634 __Pyx_XDECREF(__pyx_r);
jpayne@68 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@68 7636 __Pyx_GOTREF(__pyx_t_1);
jpayne@68 7637 __pyx_r = __pyx_t_1;
jpayne@68 7638 __pyx_t_1 = 0;
jpayne@68 7639 goto __pyx_L0;
jpayne@68 7640
jpayne@68 7641 /* "pysam/libctabix.pyx":97
jpayne@68 7642 * 'parse method of %s not implemented' % str(self))
jpayne@68 7643 *
jpayne@68 7644 * def __call__(self, char * buffer, int length): # <<<<<<<<<<<<<<
jpayne@68 7645 * return self.parse(buffer, length)
jpayne@68 7646 *
jpayne@68 7647 */
jpayne@68 7648
jpayne@68 7649 /* function exit code */
jpayne@68 7650 __pyx_L1_error:;
jpayne@68 7651 __Pyx_XDECREF(__pyx_t_1);
jpayne@68 7652 __Pyx_AddTraceback("pysam.libctabix.Parser.__call__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@68 7653 __pyx_r = NULL;
jpayne@68 7654 __pyx_L0:;
jpayne@68 7655 __Pyx_XGIVEREF(__pyx_r);
jpayne@68 7656 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@68 7657 __Pyx_RefNannyFinishContext();
jpayne@68 7658 return __pyx_r;
jpayne@68 7659 }
jpayne@68 7660
jpayne@68 7661 /* "(tree fragment)":1
jpayne@68 7662 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
jpayne@68 7663 * cdef tuple state
jpayne@68 7664 * cdef object _dict
jpayne@68 7665 */
jpayne@68 7666
jpayne@68 7667 /* Python wrapper */
jpayne@68 7668 static PyObject *__pyx_pw_5pysam_9libctabix_6Parser_9__reduce_cython__(PyObject *__pyx_v_self,
jpayne@68 7669 #if CYTHON_METH_FASTCALL
jpayne@68 7670 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@68 7671 #else
jpayne@68 7672 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@68 7673 #endif
jpayne@68 7674 ); /*proto*/
jpayne@68 7675 PyDoc_STRVAR(__pyx_doc_5pysam_9libctabix_6Parser_8__reduce_cython__, "Parser.__reduce_cython__(self)");
jpayne@68 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@68 7677 static PyObject *__pyx_pw_5pysam_9libctabix_6Parser_9__reduce_cython__(PyObject *__pyx_v_self,
jpayne@68 7678 #if CYTHON_METH_FASTCALL
jpayne@68 7679 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@68 7680 #else
jpayne@68 7681 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@68 7682 #endif
jpayne@68 7683 ) {
jpayne@68 7684 #if !CYTHON_METH_FASTCALL
jpayne@68 7685 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
jpayne@68 7686 #endif
jpayne@68 7687 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@68 7688 PyObject *__pyx_r = 0;
jpayne@68 7689 __Pyx_RefNannyDeclarations
jpayne@68 7690 __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
jpayne@68 7691 #if !CYTHON_METH_FASTCALL
jpayne@68 7692 #if CYTHON_ASSUME_SAFE_MACROS
jpayne@68 7693 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
jpayne@68 7694 #else
jpayne@68 7695 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
jpayne@68 7696 #endif
jpayne@68 7697 #endif
jpayne@68 7698 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
jpayne@68 7699 if (unlikely(__pyx_nargs > 0)) {
jpayne@68 7700 __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL;}
jpayne@68 7701 if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__reduce_cython__", 0))) return NULL;
jpayne@68 7702 __pyx_r = __pyx_pf_5pysam_9libctabix_6Parser_8__reduce_cython__(((struct __pyx_obj_5pysam_9libctabix_Parser *)__pyx_v_self));
jpayne@68 7703
jpayne@68 7704 /* function exit code */
jpayne@68 7705 __Pyx_RefNannyFinishContext();
jpayne@68 7706 return __pyx_r;
jpayne@68 7707 }
jpayne@68 7708
jpayne@68 7709 static PyObject *__pyx_pf_5pysam_9libctabix_6Parser_8__reduce_cython__(struct __pyx_obj_5pysam_9libctabix_Parser *__pyx_v_self) {
jpayne@68 7710 PyObject *__pyx_v_state = 0;
jpayne@68 7711 PyObject *__pyx_v__dict = 0;
jpayne@68 7712 int __pyx_v_use_setstate;
jpayne@68 7713 PyObject *__pyx_r = NULL;
jpayne@68 7714 __Pyx_TraceDeclarations
jpayne@68 7715 __Pyx_RefNannyDeclarations
jpayne@68 7716 PyObject *__pyx_t_1 = NULL;
jpayne@68 7717 int __pyx_t_2;
jpayne@68 7718 PyObject *__pyx_t_3 = NULL;
jpayne@68 7719 PyObject *__pyx_t_4 = NULL;
jpayne@68 7720 int __pyx_lineno = 0;
jpayne@68 7721 const char *__pyx_filename = NULL;
jpayne@68 7722 int __pyx_clineno = 0;
jpayne@68 7723 __Pyx_TraceFrameInit(__pyx_codeobj__3)
jpayne@68 7724 __Pyx_RefNannySetupContext("__reduce_cython__", 1);
jpayne@68 7725 __Pyx_TraceCall("__reduce_cython__", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));
jpayne@68 7726
jpayne@68 7727 /* "(tree fragment)":5
jpayne@68 7728 * cdef object _dict
jpayne@68 7729 * cdef bint use_setstate
jpayne@68 7730 * state = (self.encoding,) # <<<<<<<<<<<<<<
jpayne@68 7731 * _dict = getattr(self, '__dict__', None)
jpayne@68 7732 * if _dict is not None:
jpayne@68 7733 */
jpayne@68 7734 __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
jpayne@68 7735 __Pyx_GOTREF(__pyx_t_1);
jpayne@68 7736 __Pyx_INCREF(__pyx_v_self->encoding);
jpayne@68 7737 __Pyx_GIVEREF(__pyx_v_self->encoding);
jpayne@68 7738 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->encoding)) __PYX_ERR(1, 5, __pyx_L1_error);
jpayne@68 7739 __pyx_v_state = ((PyObject*)__pyx_t_1);
jpayne@68 7740 __pyx_t_1 = 0;
jpayne@68 7741
jpayne@68 7742 /* "(tree fragment)":6
jpayne@68 7743 * cdef bint use_setstate
jpayne@68 7744 * state = (self.encoding,)
jpayne@68 7745 * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<<
jpayne@68 7746 * if _dict is not None:
jpayne@68 7747 * state += (_dict,)
jpayne@68 7748 */
jpayne@68 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@68 7750 __Pyx_GOTREF(__pyx_t_1);
jpayne@68 7751 __pyx_v__dict = __pyx_t_1;
jpayne@68 7752 __pyx_t_1 = 0;
jpayne@68 7753
jpayne@68 7754 /* "(tree fragment)":7
jpayne@68 7755 * state = (self.encoding,)
jpayne@68 7756 * _dict = getattr(self, '__dict__', None)
jpayne@68 7757 * if _dict is not None: # <<<<<<<<<<<<<<
jpayne@68 7758 * state += (_dict,)
jpayne@68 7759 * use_setstate = True
jpayne@68 7760 */
jpayne@68 7761 __pyx_t_2 = (__pyx_v__dict != Py_None);
jpayne@68 7762 if (__pyx_t_2) {
jpayne@68 7763
jpayne@68 7764 /* "(tree fragment)":8
jpayne@68 7765 * _dict = getattr(self, '__dict__', None)
jpayne@68 7766 * if _dict is not None:
jpayne@68 7767 * state += (_dict,) # <<<<<<<<<<<<<<
jpayne@68 7768 * use_setstate = True
jpayne@68 7769 * else:
jpayne@68 7770 */
jpayne@68 7771 __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 8, __pyx_L1_error)
jpayne@68 7772 __Pyx_GOTREF(__pyx_t_1);
jpayne@68 7773 __Pyx_INCREF(__pyx_v__dict);
jpayne@68 7774 __Pyx_GIVEREF(__pyx_v__dict);
jpayne@68 7775 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict)) __PYX_ERR(1, 8, __pyx_L1_error);
jpayne@68 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@68 7777 __Pyx_GOTREF(__pyx_t_3);
jpayne@68 7778 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@68 7779 __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_3));
jpayne@68 7780 __pyx_t_3 = 0;
jpayne@68 7781
jpayne@68 7782 /* "(tree fragment)":9
jpayne@68 7783 * if _dict is not None:
jpayne@68 7784 * state += (_dict,)
jpayne@68 7785 * use_setstate = True # <<<<<<<<<<<<<<
jpayne@68 7786 * else:
jpayne@68 7787 * use_setstate = self.encoding is not None
jpayne@68 7788 */
jpayne@68 7789 __pyx_v_use_setstate = 1;
jpayne@68 7790
jpayne@68 7791 /* "(tree fragment)":7
jpayne@68 7792 * state = (self.encoding,)
jpayne@68 7793 * _dict = getattr(self, '__dict__', None)
jpayne@68 7794 * if _dict is not None: # <<<<<<<<<<<<<<
jpayne@68 7795 * state += (_dict,)
jpayne@68 7796 * use_setstate = True
jpayne@68 7797 */
jpayne@68 7798 goto __pyx_L3;
jpayne@68 7799 }
jpayne@68 7800
jpayne@68 7801 /* "(tree fragment)":11
jpayne@68 7802 * use_setstate = True
jpayne@68 7803 * else:
jpayne@68 7804 * use_setstate = self.encoding is not None # <<<<<<<<<<<<<<
jpayne@68 7805 * if use_setstate:
jpayne@68 7806 * return __pyx_unpickle_Parser, (type(self), 0xe8424ea, None), state
jpayne@68 7807 */
jpayne@68 7808 /*else*/ {
jpayne@68 7809 __pyx_t_2 = (__pyx_v_self->encoding != Py_None);
jpayne@68 7810 __pyx_v_use_setstate = __pyx_t_2;
jpayne@68 7811 }
jpayne@68 7812 __pyx_L3:;
jpayne@68 7813
jpayne@68 7814 /* "(tree fragment)":12
jpayne@68 7815 * else:
jpayne@68 7816 * use_setstate = self.encoding is not None
jpayne@68 7817 * if use_setstate: # <<<<<<<<<<<<<<
jpayne@68 7818 * return __pyx_unpickle_Parser, (type(self), 0xe8424ea, None), state
jpayne@68 7819 * else:
jpayne@68 7820 */
jpayne@68 7821 if (__pyx_v_use_setstate) {
jpayne@68 7822
jpayne@68 7823 /* "(tree fragment)":13
jpayne@68 7824 * use_setstate = self.encoding is not None
jpayne@68 7825 * if use_setstate:
jpayne@68 7826 * return __pyx_unpickle_Parser, (type(self), 0xe8424ea, None), state # <<<<<<<<<<<<<<
jpayne@68 7827 * else:
jpayne@68 7828 * return __pyx_unpickle_Parser, (type(self), 0xe8424ea, state)
jpayne@68 7829 */
jpayne@68 7830 __Pyx_XDECREF(__pyx_r);
jpayne@68 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@68 7832 __Pyx_GOTREF(__pyx_t_3);
jpayne@68 7833 __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error)
jpayne@68 7834 __Pyx_GOTREF(__pyx_t_1);
jpayne@68 7835 __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
jpayne@68 7836 __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
jpayne@68 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@68 7838 __Pyx_INCREF(__pyx_int_243541226);
jpayne@68 7839 __Pyx_GIVEREF(__pyx_int_243541226);
jpayne@68 7840 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_243541226)) __PYX_ERR(1, 13, __pyx_L1_error);
jpayne@68 7841 __Pyx_INCREF(Py_None);
jpayne@68 7842 __Pyx_GIVEREF(Py_None);
jpayne@68 7843 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None)) __PYX_ERR(1, 13, __pyx_L1_error);
jpayne@68 7844 __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 13, __pyx_L1_error)
jpayne@68 7845 __Pyx_GOTREF(__pyx_t_4);
jpayne@68 7846 __Pyx_GIVEREF(__pyx_t_3);
jpayne@68 7847 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3)) __PYX_ERR(1, 13, __pyx_L1_error);
jpayne@68 7848 __Pyx_GIVEREF(__pyx_t_1);
jpayne@68 7849 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error);
jpayne@68 7850 __Pyx_INCREF(__pyx_v_state);
jpayne@68 7851 __Pyx_GIVEREF(__pyx_v_state);
jpayne@68 7852 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_v_state)) __PYX_ERR(1, 13, __pyx_L1_error);
jpayne@68 7853 __pyx_t_3 = 0;
jpayne@68 7854 __pyx_t_1 = 0;
jpayne@68 7855 __pyx_r = __pyx_t_4;
jpayne@68 7856 __pyx_t_4 = 0;
jpayne@68 7857 goto __pyx_L0;
jpayne@68 7858
jpayne@68 7859 /* "(tree fragment)":12
jpayne@68 7860 * else:
jpayne@68 7861 * use_setstate = self.encoding is not None
jpayne@68 7862 * if use_setstate: # <<<<<<<<<<<<<<
jpayne@68 7863 * return __pyx_unpickle_Parser, (type(self), 0xe8424ea, None), state
jpayne@68 7864 * else:
jpayne@68 7865 */
jpayne@68 7866 }
jpayne@68 7867
jpayne@68 7868 /* "(tree fragment)":15
jpayne@68 7869 * return __pyx_unpickle_Parser, (type(self), 0xe8424ea, None), state
jpayne@68 7870 * else:
jpayne@68 7871 * return __pyx_unpickle_Parser, (type(self), 0xe8424ea, state) # <<<<<<<<<<<<<<
jpayne@68 7872 * def __setstate_cython__(self, __pyx_state):
jpayne@68 7873 * __pyx_unpickle_Parser__set_state(self, __pyx_state)
jpayne@68 7874 */
jpayne@68 7875 /*else*/ {
jpayne@68 7876 __Pyx_XDECREF(__pyx_r);
jpayne@68 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@68 7878 __Pyx_GOTREF(__pyx_t_4);
jpayne@68 7879 __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error)
jpayne@68 7880 __Pyx_GOTREF(__pyx_t_1);
jpayne@68 7881 __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
jpayne@68 7882 __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
jpayne@68 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@68 7884 __Pyx_INCREF(__pyx_int_243541226);
jpayne@68 7885 __Pyx_GIVEREF(__pyx_int_243541226);
jpayne@68 7886 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_243541226)) __PYX_ERR(1, 15, __pyx_L1_error);
jpayne@68 7887 __Pyx_INCREF(__pyx_v_state);
jpayne@68 7888 __Pyx_GIVEREF(__pyx_v_state);
jpayne@68 7889 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state)) __PYX_ERR(1, 15, __pyx_L1_error);
jpayne@68 7890 __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 15, __pyx_L1_error)
jpayne@68 7891 __Pyx_GOTREF(__pyx_t_3);
jpayne@68 7892 __Pyx_GIVEREF(__pyx_t_4);
jpayne@68 7893 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4)) __PYX_ERR(1, 15, __pyx_L1_error);
jpayne@68 7894 __Pyx_GIVEREF(__pyx_t_1);
jpayne@68 7895 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error);
jpayne@68 7896 __pyx_t_4 = 0;
jpayne@68 7897 __pyx_t_1 = 0;
jpayne@68 7898 __pyx_r = __pyx_t_3;
jpayne@68 7899 __pyx_t_3 = 0;
jpayne@68 7900 goto __pyx_L0;
jpayne@68 7901 }
jpayne@68 7902
jpayne@68 7903 /* "(tree fragment)":1
jpayne@68 7904 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
jpayne@68 7905 * cdef tuple state
jpayne@68 7906 * cdef object _dict
jpayne@68 7907 */
jpayne@68 7908
jpayne@68 7909 /* function exit code */
jpayne@68 7910 __pyx_L1_error:;
jpayne@68 7911 __Pyx_XDECREF(__pyx_t_1);
jpayne@68 7912 __Pyx_XDECREF(__pyx_t_3);
jpayne@68 7913 __Pyx_XDECREF(__pyx_t_4);
jpayne@68 7914 __Pyx_AddTraceback("pysam.libctabix.Parser.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@68 7915 __pyx_r = NULL;
jpayne@68 7916 __pyx_L0:;
jpayne@68 7917 __Pyx_XDECREF(__pyx_v_state);
jpayne@68 7918 __Pyx_XDECREF(__pyx_v__dict);
jpayne@68 7919 __Pyx_XGIVEREF(__pyx_r);
jpayne@68 7920 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@68 7921 __Pyx_RefNannyFinishContext();
jpayne@68 7922 return __pyx_r;
jpayne@68 7923 }
jpayne@68 7924
jpayne@68 7925 /* "(tree fragment)":16
jpayne@68 7926 * else:
jpayne@68 7927 * return __pyx_unpickle_Parser, (type(self), 0xe8424ea, state)
jpayne@68 7928 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
jpayne@68 7929 * __pyx_unpickle_Parser__set_state(self, __pyx_state)
jpayne@68 7930 */
jpayne@68 7931
jpayne@68 7932 /* Python wrapper */
jpayne@68 7933 static PyObject *__pyx_pw_5pysam_9libctabix_6Parser_11__setstate_cython__(PyObject *__pyx_v_self,
jpayne@68 7934 #if CYTHON_METH_FASTCALL
jpayne@68 7935 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@68 7936 #else
jpayne@68 7937 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@68 7938 #endif
jpayne@68 7939 ); /*proto*/
jpayne@68 7940 PyDoc_STRVAR(__pyx_doc_5pysam_9libctabix_6Parser_10__setstate_cython__, "Parser.__setstate_cython__(self, __pyx_state)");
jpayne@68 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@68 7942 static PyObject *__pyx_pw_5pysam_9libctabix_6Parser_11__setstate_cython__(PyObject *__pyx_v_self,
jpayne@68 7943 #if CYTHON_METH_FASTCALL
jpayne@68 7944 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@68 7945 #else
jpayne@68 7946 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@68 7947 #endif
jpayne@68 7948 ) {
jpayne@68 7949 PyObject *__pyx_v___pyx_state = 0;
jpayne@68 7950 #if !CYTHON_METH_FASTCALL
jpayne@68 7951 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
jpayne@68 7952 #endif
jpayne@68 7953 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@68 7954 PyObject* values[1] = {0};
jpayne@68 7955 int __pyx_lineno = 0;
jpayne@68 7956 const char *__pyx_filename = NULL;
jpayne@68 7957 int __pyx_clineno = 0;
jpayne@68 7958 PyObject *__pyx_r = 0;
jpayne@68 7959 __Pyx_RefNannyDeclarations
jpayne@68 7960 __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
jpayne@68 7961 #if !CYTHON_METH_FASTCALL
jpayne@68 7962 #if CYTHON_ASSUME_SAFE_MACROS
jpayne@68 7963 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
jpayne@68 7964 #else
jpayne@68 7965 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
jpayne@68 7966 #endif
jpayne@68 7967 #endif
jpayne@68 7968 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
jpayne@68 7969 {
jpayne@68 7970 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0};
jpayne@68 7971 if (__pyx_kwds) {
jpayne@68 7972 Py_ssize_t kw_args;
jpayne@68 7973 switch (__pyx_nargs) {
jpayne@68 7974 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
jpayne@68 7975 CYTHON_FALLTHROUGH;
jpayne@68 7976 case 0: break;
jpayne@68 7977 default: goto __pyx_L5_argtuple_error;
jpayne@68 7978 }
jpayne@68 7979 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
jpayne@68 7980 switch (__pyx_nargs) {
jpayne@68 7981 case 0:
jpayne@68 7982 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) {
jpayne@68 7983 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
jpayne@68 7984 kw_args--;
jpayne@68 7985 }
jpayne@68 7986 else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 16, __pyx_L3_error)
jpayne@68 7987 else goto __pyx_L5_argtuple_error;
jpayne@68 7988 }
jpayne@68 7989 if (unlikely(kw_args > 0)) {
jpayne@68 7990 const Py_ssize_t kwd_pos_args = __pyx_nargs;
jpayne@68 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@68 7992 }
jpayne@68 7993 } else if (unlikely(__pyx_nargs != 1)) {
jpayne@68 7994 goto __pyx_L5_argtuple_error;
jpayne@68 7995 } else {
jpayne@68 7996 values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
jpayne@68 7997 }
jpayne@68 7998 __pyx_v___pyx_state = values[0];
jpayne@68 7999 }
jpayne@68 8000 goto __pyx_L6_skip;
jpayne@68 8001 __pyx_L5_argtuple_error:;
jpayne@68 8002 __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 16, __pyx_L3_error)
jpayne@68 8003 __pyx_L6_skip:;
jpayne@68 8004 goto __pyx_L4_argument_unpacking_done;
jpayne@68 8005 __pyx_L3_error:;
jpayne@68 8006 {
jpayne@68 8007 Py_ssize_t __pyx_temp;
jpayne@68 8008 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
jpayne@68 8009 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
jpayne@68 8010 }
jpayne@68 8011 }
jpayne@68 8012 __Pyx_AddTraceback("pysam.libctabix.Parser.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@68 8013 __Pyx_RefNannyFinishContext();
jpayne@68 8014 return NULL;
jpayne@68 8015 __pyx_L4_argument_unpacking_done:;
jpayne@68 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@68 8017
jpayne@68 8018 /* function exit code */
jpayne@68 8019 {
jpayne@68 8020 Py_ssize_t __pyx_temp;
jpayne@68 8021 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
jpayne@68 8022 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
jpayne@68 8023 }
jpayne@68 8024 }
jpayne@68 8025 __Pyx_RefNannyFinishContext();
jpayne@68 8026 return __pyx_r;
jpayne@68 8027 }
jpayne@68 8028
jpayne@68 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@68 8030 PyObject *__pyx_r = NULL;
jpayne@68 8031 __Pyx_TraceDeclarations
jpayne@68 8032 __Pyx_RefNannyDeclarations
jpayne@68 8033 PyObject *__pyx_t_1 = NULL;
jpayne@68 8034 int __pyx_lineno = 0;
jpayne@68 8035 const char *__pyx_filename = NULL;
jpayne@68 8036 int __pyx_clineno = 0;
jpayne@68 8037 __Pyx_TraceFrameInit(__pyx_codeobj__4)
jpayne@68 8038 __Pyx_RefNannySetupContext("__setstate_cython__", 1);
jpayne@68 8039 __Pyx_TraceCall("__setstate_cython__", __pyx_f[1], 16, 0, __PYX_ERR(1, 16, __pyx_L1_error));
jpayne@68 8040
jpayne@68 8041 /* "(tree fragment)":17
jpayne@68 8042 * return __pyx_unpickle_Parser, (type(self), 0xe8424ea, state)
jpayne@68 8043 * def __setstate_cython__(self, __pyx_state):
jpayne@68 8044 * __pyx_unpickle_Parser__set_state(self, __pyx_state) # <<<<<<<<<<<<<<
jpayne@68 8045 */
jpayne@68 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@68 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@68 8048 __Pyx_GOTREF(__pyx_t_1);
jpayne@68 8049 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@68 8050
jpayne@68 8051 /* "(tree fragment)":16
jpayne@68 8052 * else:
jpayne@68 8053 * return __pyx_unpickle_Parser, (type(self), 0xe8424ea, state)
jpayne@68 8054 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
jpayne@68 8055 * __pyx_unpickle_Parser__set_state(self, __pyx_state)
jpayne@68 8056 */
jpayne@68 8057
jpayne@68 8058 /* function exit code */
jpayne@68 8059 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
jpayne@68 8060 goto __pyx_L0;
jpayne@68 8061 __pyx_L1_error:;
jpayne@68 8062 __Pyx_XDECREF(__pyx_t_1);
jpayne@68 8063 __Pyx_AddTraceback("pysam.libctabix.Parser.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@68 8064 __pyx_r = NULL;
jpayne@68 8065 __pyx_L0:;
jpayne@68 8066 __Pyx_XGIVEREF(__pyx_r);
jpayne@68 8067 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@68 8068 __Pyx_RefNannyFinishContext();
jpayne@68 8069 return __pyx_r;
jpayne@68 8070 }
jpayne@68 8071
jpayne@68 8072 /* "pysam/libctabix.pyx":106
jpayne@68 8073 * A field in a row is accessed by numeric index.
jpayne@68 8074 * '''
jpayne@68 8075 * cdef parse(self, char * buffer, int len): # <<<<<<<<<<<<<<
jpayne@68 8076 * cdef ctabixproxies.TupleProxy r
jpayne@68 8077 * r = ctabixproxies.TupleProxy(self.encoding)
jpayne@68 8078 */
jpayne@68 8079
jpayne@68 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@68 8081 struct __pyx_obj_5pysam_16libctabixproxies_TupleProxy *__pyx_v_r = 0;
jpayne@68 8082 PyObject *__pyx_r = NULL;
jpayne@68 8083 __Pyx_TraceDeclarations
jpayne@68 8084 __Pyx_RefNannyDeclarations
jpayne@68 8085 PyObject *__pyx_t_1 = NULL;
jpayne@68 8086 int __pyx_lineno = 0;
jpayne@68 8087 const char *__pyx_filename = NULL;
jpayne@68 8088 int __pyx_clineno = 0;
jpayne@68 8089 __Pyx_RefNannySetupContext("parse", 1);
jpayne@68 8090 __Pyx_TraceCall("parse", __pyx_f[0], 106, 0, __PYX_ERR(0, 106, __pyx_L1_error));
jpayne@68 8091
jpayne@68 8092 /* "pysam/libctabix.pyx":108
jpayne@68 8093 * cdef parse(self, char * buffer, int len):
jpayne@68 8094 * cdef ctabixproxies.TupleProxy r
jpayne@68 8095 * r = ctabixproxies.TupleProxy(self.encoding) # <<<<<<<<<<<<<<
jpayne@68 8096 * # need to copy - there were some
jpayne@68 8097 * # persistence issues with "present"
jpayne@68 8098 */
jpayne@68 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@68 8100 __Pyx_GOTREF(__pyx_t_1);
jpayne@68 8101 __pyx_v_r = ((struct __pyx_obj_5pysam_16libctabixproxies_TupleProxy *)__pyx_t_1);
jpayne@68 8102 __pyx_t_1 = 0;
jpayne@68 8103
jpayne@68 8104 /* "pysam/libctabix.pyx":111
jpayne@68 8105 * # need to copy - there were some
jpayne@68 8106 * # persistence issues with "present"
jpayne@68 8107 * r.copy(buffer, len) # <<<<<<<<<<<<<<
jpayne@68 8108 * return r
jpayne@68 8109 *
jpayne@68 8110 */
jpayne@68 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@68 8112 __Pyx_GOTREF(__pyx_t_1);
jpayne@68 8113 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@68 8114
jpayne@68 8115 /* "pysam/libctabix.pyx":112
jpayne@68 8116 * # persistence issues with "present"
jpayne@68 8117 * r.copy(buffer, len)
jpayne@68 8118 * return r # <<<<<<<<<<<<<<
jpayne@68 8119 *
jpayne@68 8120 *
jpayne@68 8121 */
jpayne@68 8122 __Pyx_XDECREF(__pyx_r);
jpayne@68 8123 __Pyx_INCREF((PyObject *)__pyx_v_r);
jpayne@68 8124 __pyx_r = ((PyObject *)__pyx_v_r);
jpayne@68 8125 goto __pyx_L0;
jpayne@68 8126
jpayne@68 8127 /* "pysam/libctabix.pyx":106
jpayne@68 8128 * A field in a row is accessed by numeric index.
jpayne@68 8129 * '''
jpayne@68 8130 * cdef parse(self, char * buffer, int len): # <<<<<<<<<<<<<<
jpayne@68 8131 * cdef ctabixproxies.TupleProxy r
jpayne@68 8132 * r = ctabixproxies.TupleProxy(self.encoding)
jpayne@68 8133 */
jpayne@68 8134
jpayne@68 8135 /* function exit code */
jpayne@68 8136 __pyx_L1_error:;
jpayne@68 8137 __Pyx_XDECREF(__pyx_t_1);
jpayne@68 8138 __Pyx_AddTraceback("pysam.libctabix.asTuple.parse", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@68 8139 __pyx_r = 0;
jpayne@68 8140 __pyx_L0:;
jpayne@68 8141 __Pyx_XDECREF((PyObject *)__pyx_v_r);
jpayne@68 8142 __Pyx_XGIVEREF(__pyx_r);
jpayne@68 8143 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@68 8144 __Pyx_RefNannyFinishContext();
jpayne@68 8145 return __pyx_r;
jpayne@68 8146 }
jpayne@68 8147
jpayne@68 8148 /* "(tree fragment)":1
jpayne@68 8149 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
jpayne@68 8150 * cdef tuple state
jpayne@68 8151 * cdef object _dict
jpayne@68 8152 */
jpayne@68 8153
jpayne@68 8154 /* Python wrapper */
jpayne@68 8155 static PyObject *__pyx_pw_5pysam_9libctabix_7asTuple_1__reduce_cython__(PyObject *__pyx_v_self,
jpayne@68 8156 #if CYTHON_METH_FASTCALL
jpayne@68 8157 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@68 8158 #else
jpayne@68 8159 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@68 8160 #endif
jpayne@68 8161 ); /*proto*/
jpayne@68 8162 PyDoc_STRVAR(__pyx_doc_5pysam_9libctabix_7asTuple___reduce_cython__, "asTuple.__reduce_cython__(self)");
jpayne@68 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@68 8164 static PyObject *__pyx_pw_5pysam_9libctabix_7asTuple_1__reduce_cython__(PyObject *__pyx_v_self,
jpayne@68 8165 #if CYTHON_METH_FASTCALL
jpayne@68 8166 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@68 8167 #else
jpayne@68 8168 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@68 8169 #endif
jpayne@68 8170 ) {
jpayne@68 8171 #if !CYTHON_METH_FASTCALL
jpayne@68 8172 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
jpayne@68 8173 #endif
jpayne@68 8174 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@68 8175 PyObject *__pyx_r = 0;
jpayne@68 8176 __Pyx_RefNannyDeclarations
jpayne@68 8177 __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
jpayne@68 8178 #if !CYTHON_METH_FASTCALL
jpayne@68 8179 #if CYTHON_ASSUME_SAFE_MACROS
jpayne@68 8180 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
jpayne@68 8181 #else
jpayne@68 8182 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
jpayne@68 8183 #endif
jpayne@68 8184 #endif
jpayne@68 8185 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
jpayne@68 8186 if (unlikely(__pyx_nargs > 0)) {
jpayne@68 8187 __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL;}
jpayne@68 8188 if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__reduce_cython__", 0))) return NULL;
jpayne@68 8189 __pyx_r = __pyx_pf_5pysam_9libctabix_7asTuple___reduce_cython__(((struct __pyx_obj_5pysam_9libctabix_asTuple *)__pyx_v_self));
jpayne@68 8190
jpayne@68 8191 /* function exit code */
jpayne@68 8192 __Pyx_RefNannyFinishContext();
jpayne@68 8193 return __pyx_r;
jpayne@68 8194 }
jpayne@68 8195
jpayne@68 8196 static PyObject *__pyx_pf_5pysam_9libctabix_7asTuple___reduce_cython__(struct __pyx_obj_5pysam_9libctabix_asTuple *__pyx_v_self) {
jpayne@68 8197 PyObject *__pyx_v_state = 0;
jpayne@68 8198 PyObject *__pyx_v__dict = 0;
jpayne@68 8199 int __pyx_v_use_setstate;
jpayne@68 8200 PyObject *__pyx_r = NULL;
jpayne@68 8201 __Pyx_TraceDeclarations
jpayne@68 8202 __Pyx_RefNannyDeclarations
jpayne@68 8203 PyObject *__pyx_t_1 = NULL;
jpayne@68 8204 int __pyx_t_2;
jpayne@68 8205 PyObject *__pyx_t_3 = NULL;
jpayne@68 8206 PyObject *__pyx_t_4 = NULL;
jpayne@68 8207 int __pyx_lineno = 0;
jpayne@68 8208 const char *__pyx_filename = NULL;
jpayne@68 8209 int __pyx_clineno = 0;
jpayne@68 8210 __Pyx_TraceFrameInit(__pyx_codeobj__5)
jpayne@68 8211 __Pyx_RefNannySetupContext("__reduce_cython__", 1);
jpayne@68 8212 __Pyx_TraceCall("__reduce_cython__", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));
jpayne@68 8213
jpayne@68 8214 /* "(tree fragment)":5
jpayne@68 8215 * cdef object _dict
jpayne@68 8216 * cdef bint use_setstate
jpayne@68 8217 * state = (self.encoding,) # <<<<<<<<<<<<<<
jpayne@68 8218 * _dict = getattr(self, '__dict__', None)
jpayne@68 8219 * if _dict is not None:
jpayne@68 8220 */
jpayne@68 8221 __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
jpayne@68 8222 __Pyx_GOTREF(__pyx_t_1);
jpayne@68 8223 __Pyx_INCREF(__pyx_v_self->__pyx_base.encoding);
jpayne@68 8224 __Pyx_GIVEREF(__pyx_v_self->__pyx_base.encoding);
jpayne@68 8225 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->__pyx_base.encoding)) __PYX_ERR(1, 5, __pyx_L1_error);
jpayne@68 8226 __pyx_v_state = ((PyObject*)__pyx_t_1);
jpayne@68 8227 __pyx_t_1 = 0;
jpayne@68 8228
jpayne@68 8229 /* "(tree fragment)":6
jpayne@68 8230 * cdef bint use_setstate
jpayne@68 8231 * state = (self.encoding,)
jpayne@68 8232 * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<<
jpayne@68 8233 * if _dict is not None:
jpayne@68 8234 * state += (_dict,)
jpayne@68 8235 */
jpayne@68 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@68 8237 __Pyx_GOTREF(__pyx_t_1);
jpayne@68 8238 __pyx_v__dict = __pyx_t_1;
jpayne@68 8239 __pyx_t_1 = 0;
jpayne@68 8240
jpayne@68 8241 /* "(tree fragment)":7
jpayne@68 8242 * state = (self.encoding,)
jpayne@68 8243 * _dict = getattr(self, '__dict__', None)
jpayne@68 8244 * if _dict is not None: # <<<<<<<<<<<<<<
jpayne@68 8245 * state += (_dict,)
jpayne@68 8246 * use_setstate = True
jpayne@68 8247 */
jpayne@68 8248 __pyx_t_2 = (__pyx_v__dict != Py_None);
jpayne@68 8249 if (__pyx_t_2) {
jpayne@68 8250
jpayne@68 8251 /* "(tree fragment)":8
jpayne@68 8252 * _dict = getattr(self, '__dict__', None)
jpayne@68 8253 * if _dict is not None:
jpayne@68 8254 * state += (_dict,) # <<<<<<<<<<<<<<
jpayne@68 8255 * use_setstate = True
jpayne@68 8256 * else:
jpayne@68 8257 */
jpayne@68 8258 __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 8, __pyx_L1_error)
jpayne@68 8259 __Pyx_GOTREF(__pyx_t_1);
jpayne@68 8260 __Pyx_INCREF(__pyx_v__dict);
jpayne@68 8261 __Pyx_GIVEREF(__pyx_v__dict);
jpayne@68 8262 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict)) __PYX_ERR(1, 8, __pyx_L1_error);
jpayne@68 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@68 8264 __Pyx_GOTREF(__pyx_t_3);
jpayne@68 8265 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@68 8266 __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_3));
jpayne@68 8267 __pyx_t_3 = 0;
jpayne@68 8268
jpayne@68 8269 /* "(tree fragment)":9
jpayne@68 8270 * if _dict is not None:
jpayne@68 8271 * state += (_dict,)
jpayne@68 8272 * use_setstate = True # <<<<<<<<<<<<<<
jpayne@68 8273 * else:
jpayne@68 8274 * use_setstate = self.encoding is not None
jpayne@68 8275 */
jpayne@68 8276 __pyx_v_use_setstate = 1;
jpayne@68 8277
jpayne@68 8278 /* "(tree fragment)":7
jpayne@68 8279 * state = (self.encoding,)
jpayne@68 8280 * _dict = getattr(self, '__dict__', None)
jpayne@68 8281 * if _dict is not None: # <<<<<<<<<<<<<<
jpayne@68 8282 * state += (_dict,)
jpayne@68 8283 * use_setstate = True
jpayne@68 8284 */
jpayne@68 8285 goto __pyx_L3;
jpayne@68 8286 }
jpayne@68 8287
jpayne@68 8288 /* "(tree fragment)":11
jpayne@68 8289 * use_setstate = True
jpayne@68 8290 * else:
jpayne@68 8291 * use_setstate = self.encoding is not None # <<<<<<<<<<<<<<
jpayne@68 8292 * if use_setstate:
jpayne@68 8293 * return __pyx_unpickle_asTuple, (type(self), 0xe8424ea, None), state
jpayne@68 8294 */
jpayne@68 8295 /*else*/ {
jpayne@68 8296 __pyx_t_2 = (__pyx_v_self->__pyx_base.encoding != Py_None);
jpayne@68 8297 __pyx_v_use_setstate = __pyx_t_2;
jpayne@68 8298 }
jpayne@68 8299 __pyx_L3:;
jpayne@68 8300
jpayne@68 8301 /* "(tree fragment)":12
jpayne@68 8302 * else:
jpayne@68 8303 * use_setstate = self.encoding is not None
jpayne@68 8304 * if use_setstate: # <<<<<<<<<<<<<<
jpayne@68 8305 * return __pyx_unpickle_asTuple, (type(self), 0xe8424ea, None), state
jpayne@68 8306 * else:
jpayne@68 8307 */
jpayne@68 8308 if (__pyx_v_use_setstate) {
jpayne@68 8309
jpayne@68 8310 /* "(tree fragment)":13
jpayne@68 8311 * use_setstate = self.encoding is not None
jpayne@68 8312 * if use_setstate:
jpayne@68 8313 * return __pyx_unpickle_asTuple, (type(self), 0xe8424ea, None), state # <<<<<<<<<<<<<<
jpayne@68 8314 * else:
jpayne@68 8315 * return __pyx_unpickle_asTuple, (type(self), 0xe8424ea, state)
jpayne@68 8316 */
jpayne@68 8317 __Pyx_XDECREF(__pyx_r);
jpayne@68 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@68 8319 __Pyx_GOTREF(__pyx_t_3);
jpayne@68 8320 __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error)
jpayne@68 8321 __Pyx_GOTREF(__pyx_t_1);
jpayne@68 8322 __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
jpayne@68 8323 __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
jpayne@68 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@68 8325 __Pyx_INCREF(__pyx_int_243541226);
jpayne@68 8326 __Pyx_GIVEREF(__pyx_int_243541226);
jpayne@68 8327 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_243541226)) __PYX_ERR(1, 13, __pyx_L1_error);
jpayne@68 8328 __Pyx_INCREF(Py_None);
jpayne@68 8329 __Pyx_GIVEREF(Py_None);
jpayne@68 8330 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None)) __PYX_ERR(1, 13, __pyx_L1_error);
jpayne@68 8331 __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 13, __pyx_L1_error)
jpayne@68 8332 __Pyx_GOTREF(__pyx_t_4);
jpayne@68 8333 __Pyx_GIVEREF(__pyx_t_3);
jpayne@68 8334 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3)) __PYX_ERR(1, 13, __pyx_L1_error);
jpayne@68 8335 __Pyx_GIVEREF(__pyx_t_1);
jpayne@68 8336 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error);
jpayne@68 8337 __Pyx_INCREF(__pyx_v_state);
jpayne@68 8338 __Pyx_GIVEREF(__pyx_v_state);
jpayne@68 8339 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_v_state)) __PYX_ERR(1, 13, __pyx_L1_error);
jpayne@68 8340 __pyx_t_3 = 0;
jpayne@68 8341 __pyx_t_1 = 0;
jpayne@68 8342 __pyx_r = __pyx_t_4;
jpayne@68 8343 __pyx_t_4 = 0;
jpayne@68 8344 goto __pyx_L0;
jpayne@68 8345
jpayne@68 8346 /* "(tree fragment)":12
jpayne@68 8347 * else:
jpayne@68 8348 * use_setstate = self.encoding is not None
jpayne@68 8349 * if use_setstate: # <<<<<<<<<<<<<<
jpayne@68 8350 * return __pyx_unpickle_asTuple, (type(self), 0xe8424ea, None), state
jpayne@68 8351 * else:
jpayne@68 8352 */
jpayne@68 8353 }
jpayne@68 8354
jpayne@68 8355 /* "(tree fragment)":15
jpayne@68 8356 * return __pyx_unpickle_asTuple, (type(self), 0xe8424ea, None), state
jpayne@68 8357 * else:
jpayne@68 8358 * return __pyx_unpickle_asTuple, (type(self), 0xe8424ea, state) # <<<<<<<<<<<<<<
jpayne@68 8359 * def __setstate_cython__(self, __pyx_state):
jpayne@68 8360 * __pyx_unpickle_asTuple__set_state(self, __pyx_state)
jpayne@68 8361 */
jpayne@68 8362 /*else*/ {
jpayne@68 8363 __Pyx_XDECREF(__pyx_r);
jpayne@68 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@68 8365 __Pyx_GOTREF(__pyx_t_4);
jpayne@68 8366 __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error)
jpayne@68 8367 __Pyx_GOTREF(__pyx_t_1);
jpayne@68 8368 __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
jpayne@68 8369 __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
jpayne@68 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@68 8371 __Pyx_INCREF(__pyx_int_243541226);
jpayne@68 8372 __Pyx_GIVEREF(__pyx_int_243541226);
jpayne@68 8373 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_243541226)) __PYX_ERR(1, 15, __pyx_L1_error);
jpayne@68 8374 __Pyx_INCREF(__pyx_v_state);
jpayne@68 8375 __Pyx_GIVEREF(__pyx_v_state);
jpayne@68 8376 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state)) __PYX_ERR(1, 15, __pyx_L1_error);
jpayne@68 8377 __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 15, __pyx_L1_error)
jpayne@68 8378 __Pyx_GOTREF(__pyx_t_3);
jpayne@68 8379 __Pyx_GIVEREF(__pyx_t_4);
jpayne@68 8380 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4)) __PYX_ERR(1, 15, __pyx_L1_error);
jpayne@68 8381 __Pyx_GIVEREF(__pyx_t_1);
jpayne@68 8382 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error);
jpayne@68 8383 __pyx_t_4 = 0;
jpayne@68 8384 __pyx_t_1 = 0;
jpayne@68 8385 __pyx_r = __pyx_t_3;
jpayne@68 8386 __pyx_t_3 = 0;
jpayne@68 8387 goto __pyx_L0;
jpayne@68 8388 }
jpayne@68 8389
jpayne@68 8390 /* "(tree fragment)":1
jpayne@68 8391 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
jpayne@68 8392 * cdef tuple state
jpayne@68 8393 * cdef object _dict
jpayne@68 8394 */
jpayne@68 8395
jpayne@68 8396 /* function exit code */
jpayne@68 8397 __pyx_L1_error:;
jpayne@68 8398 __Pyx_XDECREF(__pyx_t_1);
jpayne@68 8399 __Pyx_XDECREF(__pyx_t_3);
jpayne@68 8400 __Pyx_XDECREF(__pyx_t_4);
jpayne@68 8401 __Pyx_AddTraceback("pysam.libctabix.asTuple.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@68 8402 __pyx_r = NULL;
jpayne@68 8403 __pyx_L0:;
jpayne@68 8404 __Pyx_XDECREF(__pyx_v_state);
jpayne@68 8405 __Pyx_XDECREF(__pyx_v__dict);
jpayne@68 8406 __Pyx_XGIVEREF(__pyx_r);
jpayne@68 8407 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@68 8408 __Pyx_RefNannyFinishContext();
jpayne@68 8409 return __pyx_r;
jpayne@68 8410 }
jpayne@68 8411
jpayne@68 8412 /* "(tree fragment)":16
jpayne@68 8413 * else:
jpayne@68 8414 * return __pyx_unpickle_asTuple, (type(self), 0xe8424ea, state)
jpayne@68 8415 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
jpayne@68 8416 * __pyx_unpickle_asTuple__set_state(self, __pyx_state)
jpayne@68 8417 */
jpayne@68 8418
jpayne@68 8419 /* Python wrapper */
jpayne@68 8420 static PyObject *__pyx_pw_5pysam_9libctabix_7asTuple_3__setstate_cython__(PyObject *__pyx_v_self,
jpayne@68 8421 #if CYTHON_METH_FASTCALL
jpayne@68 8422 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@68 8423 #else
jpayne@68 8424 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@68 8425 #endif
jpayne@68 8426 ); /*proto*/
jpayne@68 8427 PyDoc_STRVAR(__pyx_doc_5pysam_9libctabix_7asTuple_2__setstate_cython__, "asTuple.__setstate_cython__(self, __pyx_state)");
jpayne@68 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@68 8429 static PyObject *__pyx_pw_5pysam_9libctabix_7asTuple_3__setstate_cython__(PyObject *__pyx_v_self,
jpayne@68 8430 #if CYTHON_METH_FASTCALL
jpayne@68 8431 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@68 8432 #else
jpayne@68 8433 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@68 8434 #endif
jpayne@68 8435 ) {
jpayne@68 8436 PyObject *__pyx_v___pyx_state = 0;
jpayne@68 8437 #if !CYTHON_METH_FASTCALL
jpayne@68 8438 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
jpayne@68 8439 #endif
jpayne@68 8440 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@68 8441 PyObject* values[1] = {0};
jpayne@68 8442 int __pyx_lineno = 0;
jpayne@68 8443 const char *__pyx_filename = NULL;
jpayne@68 8444 int __pyx_clineno = 0;
jpayne@68 8445 PyObject *__pyx_r = 0;
jpayne@68 8446 __Pyx_RefNannyDeclarations
jpayne@68 8447 __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
jpayne@68 8448 #if !CYTHON_METH_FASTCALL
jpayne@68 8449 #if CYTHON_ASSUME_SAFE_MACROS
jpayne@68 8450 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
jpayne@68 8451 #else
jpayne@68 8452 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
jpayne@68 8453 #endif
jpayne@68 8454 #endif
jpayne@68 8455 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
jpayne@68 8456 {
jpayne@68 8457 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0};
jpayne@68 8458 if (__pyx_kwds) {
jpayne@68 8459 Py_ssize_t kw_args;
jpayne@68 8460 switch (__pyx_nargs) {
jpayne@68 8461 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
jpayne@68 8462 CYTHON_FALLTHROUGH;
jpayne@68 8463 case 0: break;
jpayne@68 8464 default: goto __pyx_L5_argtuple_error;
jpayne@68 8465 }
jpayne@68 8466 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
jpayne@68 8467 switch (__pyx_nargs) {
jpayne@68 8468 case 0:
jpayne@68 8469 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) {
jpayne@68 8470 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
jpayne@68 8471 kw_args--;
jpayne@68 8472 }
jpayne@68 8473 else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 16, __pyx_L3_error)
jpayne@68 8474 else goto __pyx_L5_argtuple_error;
jpayne@68 8475 }
jpayne@68 8476 if (unlikely(kw_args > 0)) {
jpayne@68 8477 const Py_ssize_t kwd_pos_args = __pyx_nargs;
jpayne@68 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@68 8479 }
jpayne@68 8480 } else if (unlikely(__pyx_nargs != 1)) {
jpayne@68 8481 goto __pyx_L5_argtuple_error;
jpayne@68 8482 } else {
jpayne@68 8483 values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
jpayne@68 8484 }
jpayne@68 8485 __pyx_v___pyx_state = values[0];
jpayne@68 8486 }
jpayne@68 8487 goto __pyx_L6_skip;
jpayne@68 8488 __pyx_L5_argtuple_error:;
jpayne@68 8489 __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 16, __pyx_L3_error)
jpayne@68 8490 __pyx_L6_skip:;
jpayne@68 8491 goto __pyx_L4_argument_unpacking_done;
jpayne@68 8492 __pyx_L3_error:;
jpayne@68 8493 {
jpayne@68 8494 Py_ssize_t __pyx_temp;
jpayne@68 8495 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
jpayne@68 8496 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
jpayne@68 8497 }
jpayne@68 8498 }
jpayne@68 8499 __Pyx_AddTraceback("pysam.libctabix.asTuple.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@68 8500 __Pyx_RefNannyFinishContext();
jpayne@68 8501 return NULL;
jpayne@68 8502 __pyx_L4_argument_unpacking_done:;
jpayne@68 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@68 8504
jpayne@68 8505 /* function exit code */
jpayne@68 8506 {
jpayne@68 8507 Py_ssize_t __pyx_temp;
jpayne@68 8508 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
jpayne@68 8509 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
jpayne@68 8510 }
jpayne@68 8511 }
jpayne@68 8512 __Pyx_RefNannyFinishContext();
jpayne@68 8513 return __pyx_r;
jpayne@68 8514 }
jpayne@68 8515
jpayne@68 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@68 8517 PyObject *__pyx_r = NULL;
jpayne@68 8518 __Pyx_TraceDeclarations
jpayne@68 8519 __Pyx_RefNannyDeclarations
jpayne@68 8520 PyObject *__pyx_t_1 = NULL;
jpayne@68 8521 int __pyx_lineno = 0;
jpayne@68 8522 const char *__pyx_filename = NULL;
jpayne@68 8523 int __pyx_clineno = 0;
jpayne@68 8524 __Pyx_TraceFrameInit(__pyx_codeobj__6)
jpayne@68 8525 __Pyx_RefNannySetupContext("__setstate_cython__", 1);
jpayne@68 8526 __Pyx_TraceCall("__setstate_cython__", __pyx_f[1], 16, 0, __PYX_ERR(1, 16, __pyx_L1_error));
jpayne@68 8527
jpayne@68 8528 /* "(tree fragment)":17
jpayne@68 8529 * return __pyx_unpickle_asTuple, (type(self), 0xe8424ea, state)
jpayne@68 8530 * def __setstate_cython__(self, __pyx_state):
jpayne@68 8531 * __pyx_unpickle_asTuple__set_state(self, __pyx_state) # <<<<<<<<<<<<<<
jpayne@68 8532 */
jpayne@68 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@68 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@68 8535 __Pyx_GOTREF(__pyx_t_1);
jpayne@68 8536 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@68 8537
jpayne@68 8538 /* "(tree fragment)":16
jpayne@68 8539 * else:
jpayne@68 8540 * return __pyx_unpickle_asTuple, (type(self), 0xe8424ea, state)
jpayne@68 8541 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
jpayne@68 8542 * __pyx_unpickle_asTuple__set_state(self, __pyx_state)
jpayne@68 8543 */
jpayne@68 8544
jpayne@68 8545 /* function exit code */
jpayne@68 8546 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
jpayne@68 8547 goto __pyx_L0;
jpayne@68 8548 __pyx_L1_error:;
jpayne@68 8549 __Pyx_XDECREF(__pyx_t_1);
jpayne@68 8550 __Pyx_AddTraceback("pysam.libctabix.asTuple.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@68 8551 __pyx_r = NULL;
jpayne@68 8552 __pyx_L0:;
jpayne@68 8553 __Pyx_XGIVEREF(__pyx_r);
jpayne@68 8554 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@68 8555 __Pyx_RefNannyFinishContext();
jpayne@68 8556 return __pyx_r;
jpayne@68 8557 }
jpayne@68 8558
jpayne@68 8559 /* "pysam/libctabix.pyx":144
jpayne@68 8560 *
jpayne@68 8561 * '''
jpayne@68 8562 * cdef parse(self, char * buffer, int len): # <<<<<<<<<<<<<<
jpayne@68 8563 * cdef ctabixproxies.GFF3Proxy r
jpayne@68 8564 * r = ctabixproxies.GFF3Proxy(self.encoding)
jpayne@68 8565 */
jpayne@68 8566
jpayne@68 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@68 8568 struct __pyx_obj_5pysam_16libctabixproxies_GFF3Proxy *__pyx_v_r = 0;
jpayne@68 8569 PyObject *__pyx_r = NULL;
jpayne@68 8570 __Pyx_TraceDeclarations
jpayne@68 8571 __Pyx_RefNannyDeclarations
jpayne@68 8572 PyObject *__pyx_t_1 = NULL;
jpayne@68 8573 int __pyx_lineno = 0;
jpayne@68 8574 const char *__pyx_filename = NULL;
jpayne@68 8575 int __pyx_clineno = 0;
jpayne@68 8576 __Pyx_RefNannySetupContext("parse", 1);
jpayne@68 8577 __Pyx_TraceCall("parse", __pyx_f[0], 144, 0, __PYX_ERR(0, 144, __pyx_L1_error));
jpayne@68 8578
jpayne@68 8579 /* "pysam/libctabix.pyx":146
jpayne@68 8580 * cdef parse(self, char * buffer, int len):
jpayne@68 8581 * cdef ctabixproxies.GFF3Proxy r
jpayne@68 8582 * r = ctabixproxies.GFF3Proxy(self.encoding) # <<<<<<<<<<<<<<
jpayne@68 8583 * r.copy(buffer, len)
jpayne@68 8584 * return r
jpayne@68 8585 */
jpayne@68 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@68 8587 __Pyx_GOTREF(__pyx_t_1);
jpayne@68 8588 __pyx_v_r = ((struct __pyx_obj_5pysam_16libctabixproxies_GFF3Proxy *)__pyx_t_1);
jpayne@68 8589 __pyx_t_1 = 0;
jpayne@68 8590
jpayne@68 8591 /* "pysam/libctabix.pyx":147
jpayne@68 8592 * cdef ctabixproxies.GFF3Proxy r
jpayne@68 8593 * r = ctabixproxies.GFF3Proxy(self.encoding)
jpayne@68 8594 * r.copy(buffer, len) # <<<<<<<<<<<<<<
jpayne@68 8595 * return r
jpayne@68 8596 *
jpayne@68 8597 */
jpayne@68 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@68 8599 __Pyx_GOTREF(__pyx_t_1);
jpayne@68 8600 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@68 8601
jpayne@68 8602 /* "pysam/libctabix.pyx":148
jpayne@68 8603 * r = ctabixproxies.GFF3Proxy(self.encoding)
jpayne@68 8604 * r.copy(buffer, len)
jpayne@68 8605 * return r # <<<<<<<<<<<<<<
jpayne@68 8606 *
jpayne@68 8607 *
jpayne@68 8608 */
jpayne@68 8609 __Pyx_XDECREF(__pyx_r);
jpayne@68 8610 __Pyx_INCREF((PyObject *)__pyx_v_r);
jpayne@68 8611 __pyx_r = ((PyObject *)__pyx_v_r);
jpayne@68 8612 goto __pyx_L0;
jpayne@68 8613
jpayne@68 8614 /* "pysam/libctabix.pyx":144
jpayne@68 8615 *
jpayne@68 8616 * '''
jpayne@68 8617 * cdef parse(self, char * buffer, int len): # <<<<<<<<<<<<<<
jpayne@68 8618 * cdef ctabixproxies.GFF3Proxy r
jpayne@68 8619 * r = ctabixproxies.GFF3Proxy(self.encoding)
jpayne@68 8620 */
jpayne@68 8621
jpayne@68 8622 /* function exit code */
jpayne@68 8623 __pyx_L1_error:;
jpayne@68 8624 __Pyx_XDECREF(__pyx_t_1);
jpayne@68 8625 __Pyx_AddTraceback("pysam.libctabix.asGFF3.parse", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@68 8626 __pyx_r = 0;
jpayne@68 8627 __pyx_L0:;
jpayne@68 8628 __Pyx_XDECREF((PyObject *)__pyx_v_r);
jpayne@68 8629 __Pyx_XGIVEREF(__pyx_r);
jpayne@68 8630 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@68 8631 __Pyx_RefNannyFinishContext();
jpayne@68 8632 return __pyx_r;
jpayne@68 8633 }
jpayne@68 8634
jpayne@68 8635 /* "(tree fragment)":1
jpayne@68 8636 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
jpayne@68 8637 * cdef tuple state
jpayne@68 8638 * cdef object _dict
jpayne@68 8639 */
jpayne@68 8640
jpayne@68 8641 /* Python wrapper */
jpayne@68 8642 static PyObject *__pyx_pw_5pysam_9libctabix_6asGFF3_1__reduce_cython__(PyObject *__pyx_v_self,
jpayne@68 8643 #if CYTHON_METH_FASTCALL
jpayne@68 8644 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@68 8645 #else
jpayne@68 8646 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@68 8647 #endif
jpayne@68 8648 ); /*proto*/
jpayne@68 8649 PyDoc_STRVAR(__pyx_doc_5pysam_9libctabix_6asGFF3___reduce_cython__, "asGFF3.__reduce_cython__(self)");
jpayne@68 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@68 8651 static PyObject *__pyx_pw_5pysam_9libctabix_6asGFF3_1__reduce_cython__(PyObject *__pyx_v_self,
jpayne@68 8652 #if CYTHON_METH_FASTCALL
jpayne@68 8653 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@68 8654 #else
jpayne@68 8655 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@68 8656 #endif
jpayne@68 8657 ) {
jpayne@68 8658 #if !CYTHON_METH_FASTCALL
jpayne@68 8659 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
jpayne@68 8660 #endif
jpayne@68 8661 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@68 8662 PyObject *__pyx_r = 0;
jpayne@68 8663 __Pyx_RefNannyDeclarations
jpayne@68 8664 __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
jpayne@68 8665 #if !CYTHON_METH_FASTCALL
jpayne@68 8666 #if CYTHON_ASSUME_SAFE_MACROS
jpayne@68 8667 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
jpayne@68 8668 #else
jpayne@68 8669 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
jpayne@68 8670 #endif
jpayne@68 8671 #endif
jpayne@68 8672 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
jpayne@68 8673 if (unlikely(__pyx_nargs > 0)) {
jpayne@68 8674 __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL;}
jpayne@68 8675 if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__reduce_cython__", 0))) return NULL;
jpayne@68 8676 __pyx_r = __pyx_pf_5pysam_9libctabix_6asGFF3___reduce_cython__(((struct __pyx_obj_5pysam_9libctabix_asGFF3 *)__pyx_v_self));
jpayne@68 8677
jpayne@68 8678 /* function exit code */
jpayne@68 8679 __Pyx_RefNannyFinishContext();
jpayne@68 8680 return __pyx_r;
jpayne@68 8681 }
jpayne@68 8682
jpayne@68 8683 static PyObject *__pyx_pf_5pysam_9libctabix_6asGFF3___reduce_cython__(struct __pyx_obj_5pysam_9libctabix_asGFF3 *__pyx_v_self) {
jpayne@68 8684 PyObject *__pyx_v_state = 0;
jpayne@68 8685 PyObject *__pyx_v__dict = 0;
jpayne@68 8686 int __pyx_v_use_setstate;
jpayne@68 8687 PyObject *__pyx_r = NULL;
jpayne@68 8688 __Pyx_TraceDeclarations
jpayne@68 8689 __Pyx_RefNannyDeclarations
jpayne@68 8690 PyObject *__pyx_t_1 = NULL;
jpayne@68 8691 int __pyx_t_2;
jpayne@68 8692 PyObject *__pyx_t_3 = NULL;
jpayne@68 8693 PyObject *__pyx_t_4 = NULL;
jpayne@68 8694 int __pyx_lineno = 0;
jpayne@68 8695 const char *__pyx_filename = NULL;
jpayne@68 8696 int __pyx_clineno = 0;
jpayne@68 8697 __Pyx_TraceFrameInit(__pyx_codeobj__7)
jpayne@68 8698 __Pyx_RefNannySetupContext("__reduce_cython__", 1);
jpayne@68 8699 __Pyx_TraceCall("__reduce_cython__", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));
jpayne@68 8700
jpayne@68 8701 /* "(tree fragment)":5
jpayne@68 8702 * cdef object _dict
jpayne@68 8703 * cdef bint use_setstate
jpayne@68 8704 * state = (self.encoding,) # <<<<<<<<<<<<<<
jpayne@68 8705 * _dict = getattr(self, '__dict__', None)
jpayne@68 8706 * if _dict is not None:
jpayne@68 8707 */
jpayne@68 8708 __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
jpayne@68 8709 __Pyx_GOTREF(__pyx_t_1);
jpayne@68 8710 __Pyx_INCREF(__pyx_v_self->__pyx_base.encoding);
jpayne@68 8711 __Pyx_GIVEREF(__pyx_v_self->__pyx_base.encoding);
jpayne@68 8712 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->__pyx_base.encoding)) __PYX_ERR(1, 5, __pyx_L1_error);
jpayne@68 8713 __pyx_v_state = ((PyObject*)__pyx_t_1);
jpayne@68 8714 __pyx_t_1 = 0;
jpayne@68 8715
jpayne@68 8716 /* "(tree fragment)":6
jpayne@68 8717 * cdef bint use_setstate
jpayne@68 8718 * state = (self.encoding,)
jpayne@68 8719 * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<<
jpayne@68 8720 * if _dict is not None:
jpayne@68 8721 * state += (_dict,)
jpayne@68 8722 */
jpayne@68 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@68 8724 __Pyx_GOTREF(__pyx_t_1);
jpayne@68 8725 __pyx_v__dict = __pyx_t_1;
jpayne@68 8726 __pyx_t_1 = 0;
jpayne@68 8727
jpayne@68 8728 /* "(tree fragment)":7
jpayne@68 8729 * state = (self.encoding,)
jpayne@68 8730 * _dict = getattr(self, '__dict__', None)
jpayne@68 8731 * if _dict is not None: # <<<<<<<<<<<<<<
jpayne@68 8732 * state += (_dict,)
jpayne@68 8733 * use_setstate = True
jpayne@68 8734 */
jpayne@68 8735 __pyx_t_2 = (__pyx_v__dict != Py_None);
jpayne@68 8736 if (__pyx_t_2) {
jpayne@68 8737
jpayne@68 8738 /* "(tree fragment)":8
jpayne@68 8739 * _dict = getattr(self, '__dict__', None)
jpayne@68 8740 * if _dict is not None:
jpayne@68 8741 * state += (_dict,) # <<<<<<<<<<<<<<
jpayne@68 8742 * use_setstate = True
jpayne@68 8743 * else:
jpayne@68 8744 */
jpayne@68 8745 __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 8, __pyx_L1_error)
jpayne@68 8746 __Pyx_GOTREF(__pyx_t_1);
jpayne@68 8747 __Pyx_INCREF(__pyx_v__dict);
jpayne@68 8748 __Pyx_GIVEREF(__pyx_v__dict);
jpayne@68 8749 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict)) __PYX_ERR(1, 8, __pyx_L1_error);
jpayne@68 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@68 8751 __Pyx_GOTREF(__pyx_t_3);
jpayne@68 8752 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@68 8753 __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_3));
jpayne@68 8754 __pyx_t_3 = 0;
jpayne@68 8755
jpayne@68 8756 /* "(tree fragment)":9
jpayne@68 8757 * if _dict is not None:
jpayne@68 8758 * state += (_dict,)
jpayne@68 8759 * use_setstate = True # <<<<<<<<<<<<<<
jpayne@68 8760 * else:
jpayne@68 8761 * use_setstate = self.encoding is not None
jpayne@68 8762 */
jpayne@68 8763 __pyx_v_use_setstate = 1;
jpayne@68 8764
jpayne@68 8765 /* "(tree fragment)":7
jpayne@68 8766 * state = (self.encoding,)
jpayne@68 8767 * _dict = getattr(self, '__dict__', None)
jpayne@68 8768 * if _dict is not None: # <<<<<<<<<<<<<<
jpayne@68 8769 * state += (_dict,)
jpayne@68 8770 * use_setstate = True
jpayne@68 8771 */
jpayne@68 8772 goto __pyx_L3;
jpayne@68 8773 }
jpayne@68 8774
jpayne@68 8775 /* "(tree fragment)":11
jpayne@68 8776 * use_setstate = True
jpayne@68 8777 * else:
jpayne@68 8778 * use_setstate = self.encoding is not None # <<<<<<<<<<<<<<
jpayne@68 8779 * if use_setstate:
jpayne@68 8780 * return __pyx_unpickle_asGFF3, (type(self), 0xe8424ea, None), state
jpayne@68 8781 */
jpayne@68 8782 /*else*/ {
jpayne@68 8783 __pyx_t_2 = (__pyx_v_self->__pyx_base.encoding != Py_None);
jpayne@68 8784 __pyx_v_use_setstate = __pyx_t_2;
jpayne@68 8785 }
jpayne@68 8786 __pyx_L3:;
jpayne@68 8787
jpayne@68 8788 /* "(tree fragment)":12
jpayne@68 8789 * else:
jpayne@68 8790 * use_setstate = self.encoding is not None
jpayne@68 8791 * if use_setstate: # <<<<<<<<<<<<<<
jpayne@68 8792 * return __pyx_unpickle_asGFF3, (type(self), 0xe8424ea, None), state
jpayne@68 8793 * else:
jpayne@68 8794 */
jpayne@68 8795 if (__pyx_v_use_setstate) {
jpayne@68 8796
jpayne@68 8797 /* "(tree fragment)":13
jpayne@68 8798 * use_setstate = self.encoding is not None
jpayne@68 8799 * if use_setstate:
jpayne@68 8800 * return __pyx_unpickle_asGFF3, (type(self), 0xe8424ea, None), state # <<<<<<<<<<<<<<
jpayne@68 8801 * else:
jpayne@68 8802 * return __pyx_unpickle_asGFF3, (type(self), 0xe8424ea, state)
jpayne@68 8803 */
jpayne@68 8804 __Pyx_XDECREF(__pyx_r);
jpayne@68 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@68 8806 __Pyx_GOTREF(__pyx_t_3);
jpayne@68 8807 __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error)
jpayne@68 8808 __Pyx_GOTREF(__pyx_t_1);
jpayne@68 8809 __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
jpayne@68 8810 __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
jpayne@68 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@68 8812 __Pyx_INCREF(__pyx_int_243541226);
jpayne@68 8813 __Pyx_GIVEREF(__pyx_int_243541226);
jpayne@68 8814 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_243541226)) __PYX_ERR(1, 13, __pyx_L1_error);
jpayne@68 8815 __Pyx_INCREF(Py_None);
jpayne@68 8816 __Pyx_GIVEREF(Py_None);
jpayne@68 8817 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None)) __PYX_ERR(1, 13, __pyx_L1_error);
jpayne@68 8818 __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 13, __pyx_L1_error)
jpayne@68 8819 __Pyx_GOTREF(__pyx_t_4);
jpayne@68 8820 __Pyx_GIVEREF(__pyx_t_3);
jpayne@68 8821 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3)) __PYX_ERR(1, 13, __pyx_L1_error);
jpayne@68 8822 __Pyx_GIVEREF(__pyx_t_1);
jpayne@68 8823 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error);
jpayne@68 8824 __Pyx_INCREF(__pyx_v_state);
jpayne@68 8825 __Pyx_GIVEREF(__pyx_v_state);
jpayne@68 8826 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_v_state)) __PYX_ERR(1, 13, __pyx_L1_error);
jpayne@68 8827 __pyx_t_3 = 0;
jpayne@68 8828 __pyx_t_1 = 0;
jpayne@68 8829 __pyx_r = __pyx_t_4;
jpayne@68 8830 __pyx_t_4 = 0;
jpayne@68 8831 goto __pyx_L0;
jpayne@68 8832
jpayne@68 8833 /* "(tree fragment)":12
jpayne@68 8834 * else:
jpayne@68 8835 * use_setstate = self.encoding is not None
jpayne@68 8836 * if use_setstate: # <<<<<<<<<<<<<<
jpayne@68 8837 * return __pyx_unpickle_asGFF3, (type(self), 0xe8424ea, None), state
jpayne@68 8838 * else:
jpayne@68 8839 */
jpayne@68 8840 }
jpayne@68 8841
jpayne@68 8842 /* "(tree fragment)":15
jpayne@68 8843 * return __pyx_unpickle_asGFF3, (type(self), 0xe8424ea, None), state
jpayne@68 8844 * else:
jpayne@68 8845 * return __pyx_unpickle_asGFF3, (type(self), 0xe8424ea, state) # <<<<<<<<<<<<<<
jpayne@68 8846 * def __setstate_cython__(self, __pyx_state):
jpayne@68 8847 * __pyx_unpickle_asGFF3__set_state(self, __pyx_state)
jpayne@68 8848 */
jpayne@68 8849 /*else*/ {
jpayne@68 8850 __Pyx_XDECREF(__pyx_r);
jpayne@68 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@68 8852 __Pyx_GOTREF(__pyx_t_4);
jpayne@68 8853 __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error)
jpayne@68 8854 __Pyx_GOTREF(__pyx_t_1);
jpayne@68 8855 __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
jpayne@68 8856 __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
jpayne@68 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@68 8858 __Pyx_INCREF(__pyx_int_243541226);
jpayne@68 8859 __Pyx_GIVEREF(__pyx_int_243541226);
jpayne@68 8860 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_243541226)) __PYX_ERR(1, 15, __pyx_L1_error);
jpayne@68 8861 __Pyx_INCREF(__pyx_v_state);
jpayne@68 8862 __Pyx_GIVEREF(__pyx_v_state);
jpayne@68 8863 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state)) __PYX_ERR(1, 15, __pyx_L1_error);
jpayne@68 8864 __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 15, __pyx_L1_error)
jpayne@68 8865 __Pyx_GOTREF(__pyx_t_3);
jpayne@68 8866 __Pyx_GIVEREF(__pyx_t_4);
jpayne@68 8867 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4)) __PYX_ERR(1, 15, __pyx_L1_error);
jpayne@68 8868 __Pyx_GIVEREF(__pyx_t_1);
jpayne@68 8869 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error);
jpayne@68 8870 __pyx_t_4 = 0;
jpayne@68 8871 __pyx_t_1 = 0;
jpayne@68 8872 __pyx_r = __pyx_t_3;
jpayne@68 8873 __pyx_t_3 = 0;
jpayne@68 8874 goto __pyx_L0;
jpayne@68 8875 }
jpayne@68 8876
jpayne@68 8877 /* "(tree fragment)":1
jpayne@68 8878 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
jpayne@68 8879 * cdef tuple state
jpayne@68 8880 * cdef object _dict
jpayne@68 8881 */
jpayne@68 8882
jpayne@68 8883 /* function exit code */
jpayne@68 8884 __pyx_L1_error:;
jpayne@68 8885 __Pyx_XDECREF(__pyx_t_1);
jpayne@68 8886 __Pyx_XDECREF(__pyx_t_3);
jpayne@68 8887 __Pyx_XDECREF(__pyx_t_4);
jpayne@68 8888 __Pyx_AddTraceback("pysam.libctabix.asGFF3.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@68 8889 __pyx_r = NULL;
jpayne@68 8890 __pyx_L0:;
jpayne@68 8891 __Pyx_XDECREF(__pyx_v_state);
jpayne@68 8892 __Pyx_XDECREF(__pyx_v__dict);
jpayne@68 8893 __Pyx_XGIVEREF(__pyx_r);
jpayne@68 8894 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@68 8895 __Pyx_RefNannyFinishContext();
jpayne@68 8896 return __pyx_r;
jpayne@68 8897 }
jpayne@68 8898
jpayne@68 8899 /* "(tree fragment)":16
jpayne@68 8900 * else:
jpayne@68 8901 * return __pyx_unpickle_asGFF3, (type(self), 0xe8424ea, state)
jpayne@68 8902 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
jpayne@68 8903 * __pyx_unpickle_asGFF3__set_state(self, __pyx_state)
jpayne@68 8904 */
jpayne@68 8905
jpayne@68 8906 /* Python wrapper */
jpayne@68 8907 static PyObject *__pyx_pw_5pysam_9libctabix_6asGFF3_3__setstate_cython__(PyObject *__pyx_v_self,
jpayne@68 8908 #if CYTHON_METH_FASTCALL
jpayne@68 8909 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@68 8910 #else
jpayne@68 8911 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@68 8912 #endif
jpayne@68 8913 ); /*proto*/
jpayne@68 8914 PyDoc_STRVAR(__pyx_doc_5pysam_9libctabix_6asGFF3_2__setstate_cython__, "asGFF3.__setstate_cython__(self, __pyx_state)");
jpayne@68 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@68 8916 static PyObject *__pyx_pw_5pysam_9libctabix_6asGFF3_3__setstate_cython__(PyObject *__pyx_v_self,
jpayne@68 8917 #if CYTHON_METH_FASTCALL
jpayne@68 8918 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@68 8919 #else
jpayne@68 8920 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@68 8921 #endif
jpayne@68 8922 ) {
jpayne@68 8923 PyObject *__pyx_v___pyx_state = 0;
jpayne@68 8924 #if !CYTHON_METH_FASTCALL
jpayne@68 8925 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
jpayne@68 8926 #endif
jpayne@68 8927 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@68 8928 PyObject* values[1] = {0};
jpayne@68 8929 int __pyx_lineno = 0;
jpayne@68 8930 const char *__pyx_filename = NULL;
jpayne@68 8931 int __pyx_clineno = 0;
jpayne@68 8932 PyObject *__pyx_r = 0;
jpayne@68 8933 __Pyx_RefNannyDeclarations
jpayne@68 8934 __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
jpayne@68 8935 #if !CYTHON_METH_FASTCALL
jpayne@68 8936 #if CYTHON_ASSUME_SAFE_MACROS
jpayne@68 8937 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
jpayne@68 8938 #else
jpayne@68 8939 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
jpayne@68 8940 #endif
jpayne@68 8941 #endif
jpayne@68 8942 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
jpayne@68 8943 {
jpayne@68 8944 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0};
jpayne@68 8945 if (__pyx_kwds) {
jpayne@68 8946 Py_ssize_t kw_args;
jpayne@68 8947 switch (__pyx_nargs) {
jpayne@68 8948 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
jpayne@68 8949 CYTHON_FALLTHROUGH;
jpayne@68 8950 case 0: break;
jpayne@68 8951 default: goto __pyx_L5_argtuple_error;
jpayne@68 8952 }
jpayne@68 8953 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
jpayne@68 8954 switch (__pyx_nargs) {
jpayne@68 8955 case 0:
jpayne@68 8956 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) {
jpayne@68 8957 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
jpayne@68 8958 kw_args--;
jpayne@68 8959 }
jpayne@68 8960 else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 16, __pyx_L3_error)
jpayne@68 8961 else goto __pyx_L5_argtuple_error;
jpayne@68 8962 }
jpayne@68 8963 if (unlikely(kw_args > 0)) {
jpayne@68 8964 const Py_ssize_t kwd_pos_args = __pyx_nargs;
jpayne@68 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@68 8966 }
jpayne@68 8967 } else if (unlikely(__pyx_nargs != 1)) {
jpayne@68 8968 goto __pyx_L5_argtuple_error;
jpayne@68 8969 } else {
jpayne@68 8970 values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
jpayne@68 8971 }
jpayne@68 8972 __pyx_v___pyx_state = values[0];
jpayne@68 8973 }
jpayne@68 8974 goto __pyx_L6_skip;
jpayne@68 8975 __pyx_L5_argtuple_error:;
jpayne@68 8976 __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 16, __pyx_L3_error)
jpayne@68 8977 __pyx_L6_skip:;
jpayne@68 8978 goto __pyx_L4_argument_unpacking_done;
jpayne@68 8979 __pyx_L3_error:;
jpayne@68 8980 {
jpayne@68 8981 Py_ssize_t __pyx_temp;
jpayne@68 8982 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
jpayne@68 8983 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
jpayne@68 8984 }
jpayne@68 8985 }
jpayne@68 8986 __Pyx_AddTraceback("pysam.libctabix.asGFF3.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@68 8987 __Pyx_RefNannyFinishContext();
jpayne@68 8988 return NULL;
jpayne@68 8989 __pyx_L4_argument_unpacking_done:;
jpayne@68 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@68 8991
jpayne@68 8992 /* function exit code */
jpayne@68 8993 {
jpayne@68 8994 Py_ssize_t __pyx_temp;
jpayne@68 8995 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
jpayne@68 8996 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
jpayne@68 8997 }
jpayne@68 8998 }
jpayne@68 8999 __Pyx_RefNannyFinishContext();
jpayne@68 9000 return __pyx_r;
jpayne@68 9001 }
jpayne@68 9002
jpayne@68 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@68 9004 PyObject *__pyx_r = NULL;
jpayne@68 9005 __Pyx_TraceDeclarations
jpayne@68 9006 __Pyx_RefNannyDeclarations
jpayne@68 9007 PyObject *__pyx_t_1 = NULL;
jpayne@68 9008 int __pyx_lineno = 0;
jpayne@68 9009 const char *__pyx_filename = NULL;
jpayne@68 9010 int __pyx_clineno = 0;
jpayne@68 9011 __Pyx_TraceFrameInit(__pyx_codeobj__8)
jpayne@68 9012 __Pyx_RefNannySetupContext("__setstate_cython__", 1);
jpayne@68 9013 __Pyx_TraceCall("__setstate_cython__", __pyx_f[1], 16, 0, __PYX_ERR(1, 16, __pyx_L1_error));
jpayne@68 9014
jpayne@68 9015 /* "(tree fragment)":17
jpayne@68 9016 * return __pyx_unpickle_asGFF3, (type(self), 0xe8424ea, state)
jpayne@68 9017 * def __setstate_cython__(self, __pyx_state):
jpayne@68 9018 * __pyx_unpickle_asGFF3__set_state(self, __pyx_state) # <<<<<<<<<<<<<<
jpayne@68 9019 */
jpayne@68 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@68 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@68 9022 __Pyx_GOTREF(__pyx_t_1);
jpayne@68 9023 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@68 9024
jpayne@68 9025 /* "(tree fragment)":16
jpayne@68 9026 * else:
jpayne@68 9027 * return __pyx_unpickle_asGFF3, (type(self), 0xe8424ea, state)
jpayne@68 9028 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
jpayne@68 9029 * __pyx_unpickle_asGFF3__set_state(self, __pyx_state)
jpayne@68 9030 */
jpayne@68 9031
jpayne@68 9032 /* function exit code */
jpayne@68 9033 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
jpayne@68 9034 goto __pyx_L0;
jpayne@68 9035 __pyx_L1_error:;
jpayne@68 9036 __Pyx_XDECREF(__pyx_t_1);
jpayne@68 9037 __Pyx_AddTraceback("pysam.libctabix.asGFF3.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@68 9038 __pyx_r = NULL;
jpayne@68 9039 __pyx_L0:;
jpayne@68 9040 __Pyx_XGIVEREF(__pyx_r);
jpayne@68 9041 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@68 9042 __Pyx_RefNannyFinishContext();
jpayne@68 9043 return __pyx_r;
jpayne@68 9044 }
jpayne@68 9045
jpayne@68 9046 /* "pysam/libctabix.pyx":191
jpayne@68 9047 *
jpayne@68 9048 * '''
jpayne@68 9049 * cdef parse(self, char * buffer, int len): # <<<<<<<<<<<<<<
jpayne@68 9050 * cdef ctabixproxies.GTFProxy r
jpayne@68 9051 * r = ctabixproxies.GTFProxy(self.encoding)
jpayne@68 9052 */
jpayne@68 9053
jpayne@68 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@68 9055 struct __pyx_obj_5pysam_16libctabixproxies_GTFProxy *__pyx_v_r = 0;
jpayne@68 9056 PyObject *__pyx_r = NULL;
jpayne@68 9057 __Pyx_TraceDeclarations
jpayne@68 9058 __Pyx_RefNannyDeclarations
jpayne@68 9059 PyObject *__pyx_t_1 = NULL;
jpayne@68 9060 int __pyx_lineno = 0;
jpayne@68 9061 const char *__pyx_filename = NULL;
jpayne@68 9062 int __pyx_clineno = 0;
jpayne@68 9063 __Pyx_RefNannySetupContext("parse", 1);
jpayne@68 9064 __Pyx_TraceCall("parse", __pyx_f[0], 191, 0, __PYX_ERR(0, 191, __pyx_L1_error));
jpayne@68 9065
jpayne@68 9066 /* "pysam/libctabix.pyx":193
jpayne@68 9067 * cdef parse(self, char * buffer, int len):
jpayne@68 9068 * cdef ctabixproxies.GTFProxy r
jpayne@68 9069 * r = ctabixproxies.GTFProxy(self.encoding) # <<<<<<<<<<<<<<
jpayne@68 9070 * r.copy(buffer, len)
jpayne@68 9071 * return r
jpayne@68 9072 */
jpayne@68 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@68 9074 __Pyx_GOTREF(__pyx_t_1);
jpayne@68 9075 __pyx_v_r = ((struct __pyx_obj_5pysam_16libctabixproxies_GTFProxy *)__pyx_t_1);
jpayne@68 9076 __pyx_t_1 = 0;
jpayne@68 9077
jpayne@68 9078 /* "pysam/libctabix.pyx":194
jpayne@68 9079 * cdef ctabixproxies.GTFProxy r
jpayne@68 9080 * r = ctabixproxies.GTFProxy(self.encoding)
jpayne@68 9081 * r.copy(buffer, len) # <<<<<<<<<<<<<<
jpayne@68 9082 * return r
jpayne@68 9083 *
jpayne@68 9084 */
jpayne@68 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@68 9086 __Pyx_GOTREF(__pyx_t_1);
jpayne@68 9087 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@68 9088
jpayne@68 9089 /* "pysam/libctabix.pyx":195
jpayne@68 9090 * r = ctabixproxies.GTFProxy(self.encoding)
jpayne@68 9091 * r.copy(buffer, len)
jpayne@68 9092 * return r # <<<<<<<<<<<<<<
jpayne@68 9093 *
jpayne@68 9094 *
jpayne@68 9095 */
jpayne@68 9096 __Pyx_XDECREF(__pyx_r);
jpayne@68 9097 __Pyx_INCREF((PyObject *)__pyx_v_r);
jpayne@68 9098 __pyx_r = ((PyObject *)__pyx_v_r);
jpayne@68 9099 goto __pyx_L0;
jpayne@68 9100
jpayne@68 9101 /* "pysam/libctabix.pyx":191
jpayne@68 9102 *
jpayne@68 9103 * '''
jpayne@68 9104 * cdef parse(self, char * buffer, int len): # <<<<<<<<<<<<<<
jpayne@68 9105 * cdef ctabixproxies.GTFProxy r
jpayne@68 9106 * r = ctabixproxies.GTFProxy(self.encoding)
jpayne@68 9107 */
jpayne@68 9108
jpayne@68 9109 /* function exit code */
jpayne@68 9110 __pyx_L1_error:;
jpayne@68 9111 __Pyx_XDECREF(__pyx_t_1);
jpayne@68 9112 __Pyx_AddTraceback("pysam.libctabix.asGTF.parse", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@68 9113 __pyx_r = 0;
jpayne@68 9114 __pyx_L0:;
jpayne@68 9115 __Pyx_XDECREF((PyObject *)__pyx_v_r);
jpayne@68 9116 __Pyx_XGIVEREF(__pyx_r);
jpayne@68 9117 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@68 9118 __Pyx_RefNannyFinishContext();
jpayne@68 9119 return __pyx_r;
jpayne@68 9120 }
jpayne@68 9121
jpayne@68 9122 /* "(tree fragment)":1
jpayne@68 9123 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
jpayne@68 9124 * cdef tuple state
jpayne@68 9125 * cdef object _dict
jpayne@68 9126 */
jpayne@68 9127
jpayne@68 9128 /* Python wrapper */
jpayne@68 9129 static PyObject *__pyx_pw_5pysam_9libctabix_5asGTF_1__reduce_cython__(PyObject *__pyx_v_self,
jpayne@68 9130 #if CYTHON_METH_FASTCALL
jpayne@68 9131 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@68 9132 #else
jpayne@68 9133 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@68 9134 #endif
jpayne@68 9135 ); /*proto*/
jpayne@68 9136 PyDoc_STRVAR(__pyx_doc_5pysam_9libctabix_5asGTF___reduce_cython__, "asGTF.__reduce_cython__(self)");
jpayne@68 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@68 9138 static PyObject *__pyx_pw_5pysam_9libctabix_5asGTF_1__reduce_cython__(PyObject *__pyx_v_self,
jpayne@68 9139 #if CYTHON_METH_FASTCALL
jpayne@68 9140 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@68 9141 #else
jpayne@68 9142 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@68 9143 #endif
jpayne@68 9144 ) {
jpayne@68 9145 #if !CYTHON_METH_FASTCALL
jpayne@68 9146 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
jpayne@68 9147 #endif
jpayne@68 9148 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@68 9149 PyObject *__pyx_r = 0;
jpayne@68 9150 __Pyx_RefNannyDeclarations
jpayne@68 9151 __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
jpayne@68 9152 #if !CYTHON_METH_FASTCALL
jpayne@68 9153 #if CYTHON_ASSUME_SAFE_MACROS
jpayne@68 9154 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
jpayne@68 9155 #else
jpayne@68 9156 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
jpayne@68 9157 #endif
jpayne@68 9158 #endif
jpayne@68 9159 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
jpayne@68 9160 if (unlikely(__pyx_nargs > 0)) {
jpayne@68 9161 __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL;}
jpayne@68 9162 if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__reduce_cython__", 0))) return NULL;
jpayne@68 9163 __pyx_r = __pyx_pf_5pysam_9libctabix_5asGTF___reduce_cython__(((struct __pyx_obj_5pysam_9libctabix_asGTF *)__pyx_v_self));
jpayne@68 9164
jpayne@68 9165 /* function exit code */
jpayne@68 9166 __Pyx_RefNannyFinishContext();
jpayne@68 9167 return __pyx_r;
jpayne@68 9168 }
jpayne@68 9169
jpayne@68 9170 static PyObject *__pyx_pf_5pysam_9libctabix_5asGTF___reduce_cython__(struct __pyx_obj_5pysam_9libctabix_asGTF *__pyx_v_self) {
jpayne@68 9171 PyObject *__pyx_v_state = 0;
jpayne@68 9172 PyObject *__pyx_v__dict = 0;
jpayne@68 9173 int __pyx_v_use_setstate;
jpayne@68 9174 PyObject *__pyx_r = NULL;
jpayne@68 9175 __Pyx_TraceDeclarations
jpayne@68 9176 __Pyx_RefNannyDeclarations
jpayne@68 9177 PyObject *__pyx_t_1 = NULL;
jpayne@68 9178 int __pyx_t_2;
jpayne@68 9179 PyObject *__pyx_t_3 = NULL;
jpayne@68 9180 PyObject *__pyx_t_4 = NULL;
jpayne@68 9181 int __pyx_lineno = 0;
jpayne@68 9182 const char *__pyx_filename = NULL;
jpayne@68 9183 int __pyx_clineno = 0;
jpayne@68 9184 __Pyx_TraceFrameInit(__pyx_codeobj__9)
jpayne@68 9185 __Pyx_RefNannySetupContext("__reduce_cython__", 1);
jpayne@68 9186 __Pyx_TraceCall("__reduce_cython__", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));
jpayne@68 9187
jpayne@68 9188 /* "(tree fragment)":5
jpayne@68 9189 * cdef object _dict
jpayne@68 9190 * cdef bint use_setstate
jpayne@68 9191 * state = (self.encoding,) # <<<<<<<<<<<<<<
jpayne@68 9192 * _dict = getattr(self, '__dict__', None)
jpayne@68 9193 * if _dict is not None:
jpayne@68 9194 */
jpayne@68 9195 __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
jpayne@68 9196 __Pyx_GOTREF(__pyx_t_1);
jpayne@68 9197 __Pyx_INCREF(__pyx_v_self->__pyx_base.encoding);
jpayne@68 9198 __Pyx_GIVEREF(__pyx_v_self->__pyx_base.encoding);
jpayne@68 9199 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->__pyx_base.encoding)) __PYX_ERR(1, 5, __pyx_L1_error);
jpayne@68 9200 __pyx_v_state = ((PyObject*)__pyx_t_1);
jpayne@68 9201 __pyx_t_1 = 0;
jpayne@68 9202
jpayne@68 9203 /* "(tree fragment)":6
jpayne@68 9204 * cdef bint use_setstate
jpayne@68 9205 * state = (self.encoding,)
jpayne@68 9206 * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<<
jpayne@68 9207 * if _dict is not None:
jpayne@68 9208 * state += (_dict,)
jpayne@68 9209 */
jpayne@68 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@68 9211 __Pyx_GOTREF(__pyx_t_1);
jpayne@68 9212 __pyx_v__dict = __pyx_t_1;
jpayne@68 9213 __pyx_t_1 = 0;
jpayne@68 9214
jpayne@68 9215 /* "(tree fragment)":7
jpayne@68 9216 * state = (self.encoding,)
jpayne@68 9217 * _dict = getattr(self, '__dict__', None)
jpayne@68 9218 * if _dict is not None: # <<<<<<<<<<<<<<
jpayne@68 9219 * state += (_dict,)
jpayne@68 9220 * use_setstate = True
jpayne@68 9221 */
jpayne@68 9222 __pyx_t_2 = (__pyx_v__dict != Py_None);
jpayne@68 9223 if (__pyx_t_2) {
jpayne@68 9224
jpayne@68 9225 /* "(tree fragment)":8
jpayne@68 9226 * _dict = getattr(self, '__dict__', None)
jpayne@68 9227 * if _dict is not None:
jpayne@68 9228 * state += (_dict,) # <<<<<<<<<<<<<<
jpayne@68 9229 * use_setstate = True
jpayne@68 9230 * else:
jpayne@68 9231 */
jpayne@68 9232 __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 8, __pyx_L1_error)
jpayne@68 9233 __Pyx_GOTREF(__pyx_t_1);
jpayne@68 9234 __Pyx_INCREF(__pyx_v__dict);
jpayne@68 9235 __Pyx_GIVEREF(__pyx_v__dict);
jpayne@68 9236 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict)) __PYX_ERR(1, 8, __pyx_L1_error);
jpayne@68 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@68 9238 __Pyx_GOTREF(__pyx_t_3);
jpayne@68 9239 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@68 9240 __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_3));
jpayne@68 9241 __pyx_t_3 = 0;
jpayne@68 9242
jpayne@68 9243 /* "(tree fragment)":9
jpayne@68 9244 * if _dict is not None:
jpayne@68 9245 * state += (_dict,)
jpayne@68 9246 * use_setstate = True # <<<<<<<<<<<<<<
jpayne@68 9247 * else:
jpayne@68 9248 * use_setstate = self.encoding is not None
jpayne@68 9249 */
jpayne@68 9250 __pyx_v_use_setstate = 1;
jpayne@68 9251
jpayne@68 9252 /* "(tree fragment)":7
jpayne@68 9253 * state = (self.encoding,)
jpayne@68 9254 * _dict = getattr(self, '__dict__', None)
jpayne@68 9255 * if _dict is not None: # <<<<<<<<<<<<<<
jpayne@68 9256 * state += (_dict,)
jpayne@68 9257 * use_setstate = True
jpayne@68 9258 */
jpayne@68 9259 goto __pyx_L3;
jpayne@68 9260 }
jpayne@68 9261
jpayne@68 9262 /* "(tree fragment)":11
jpayne@68 9263 * use_setstate = True
jpayne@68 9264 * else:
jpayne@68 9265 * use_setstate = self.encoding is not None # <<<<<<<<<<<<<<
jpayne@68 9266 * if use_setstate:
jpayne@68 9267 * return __pyx_unpickle_asGTF, (type(self), 0xe8424ea, None), state
jpayne@68 9268 */
jpayne@68 9269 /*else*/ {
jpayne@68 9270 __pyx_t_2 = (__pyx_v_self->__pyx_base.encoding != Py_None);
jpayne@68 9271 __pyx_v_use_setstate = __pyx_t_2;
jpayne@68 9272 }
jpayne@68 9273 __pyx_L3:;
jpayne@68 9274
jpayne@68 9275 /* "(tree fragment)":12
jpayne@68 9276 * else:
jpayne@68 9277 * use_setstate = self.encoding is not None
jpayne@68 9278 * if use_setstate: # <<<<<<<<<<<<<<
jpayne@68 9279 * return __pyx_unpickle_asGTF, (type(self), 0xe8424ea, None), state
jpayne@68 9280 * else:
jpayne@68 9281 */
jpayne@68 9282 if (__pyx_v_use_setstate) {
jpayne@68 9283
jpayne@68 9284 /* "(tree fragment)":13
jpayne@68 9285 * use_setstate = self.encoding is not None
jpayne@68 9286 * if use_setstate:
jpayne@68 9287 * return __pyx_unpickle_asGTF, (type(self), 0xe8424ea, None), state # <<<<<<<<<<<<<<
jpayne@68 9288 * else:
jpayne@68 9289 * return __pyx_unpickle_asGTF, (type(self), 0xe8424ea, state)
jpayne@68 9290 */
jpayne@68 9291 __Pyx_XDECREF(__pyx_r);
jpayne@68 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@68 9293 __Pyx_GOTREF(__pyx_t_3);
jpayne@68 9294 __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error)
jpayne@68 9295 __Pyx_GOTREF(__pyx_t_1);
jpayne@68 9296 __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
jpayne@68 9297 __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
jpayne@68 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@68 9299 __Pyx_INCREF(__pyx_int_243541226);
jpayne@68 9300 __Pyx_GIVEREF(__pyx_int_243541226);
jpayne@68 9301 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_243541226)) __PYX_ERR(1, 13, __pyx_L1_error);
jpayne@68 9302 __Pyx_INCREF(Py_None);
jpayne@68 9303 __Pyx_GIVEREF(Py_None);
jpayne@68 9304 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None)) __PYX_ERR(1, 13, __pyx_L1_error);
jpayne@68 9305 __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 13, __pyx_L1_error)
jpayne@68 9306 __Pyx_GOTREF(__pyx_t_4);
jpayne@68 9307 __Pyx_GIVEREF(__pyx_t_3);
jpayne@68 9308 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3)) __PYX_ERR(1, 13, __pyx_L1_error);
jpayne@68 9309 __Pyx_GIVEREF(__pyx_t_1);
jpayne@68 9310 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error);
jpayne@68 9311 __Pyx_INCREF(__pyx_v_state);
jpayne@68 9312 __Pyx_GIVEREF(__pyx_v_state);
jpayne@68 9313 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_v_state)) __PYX_ERR(1, 13, __pyx_L1_error);
jpayne@68 9314 __pyx_t_3 = 0;
jpayne@68 9315 __pyx_t_1 = 0;
jpayne@68 9316 __pyx_r = __pyx_t_4;
jpayne@68 9317 __pyx_t_4 = 0;
jpayne@68 9318 goto __pyx_L0;
jpayne@68 9319
jpayne@68 9320 /* "(tree fragment)":12
jpayne@68 9321 * else:
jpayne@68 9322 * use_setstate = self.encoding is not None
jpayne@68 9323 * if use_setstate: # <<<<<<<<<<<<<<
jpayne@68 9324 * return __pyx_unpickle_asGTF, (type(self), 0xe8424ea, None), state
jpayne@68 9325 * else:
jpayne@68 9326 */
jpayne@68 9327 }
jpayne@68 9328
jpayne@68 9329 /* "(tree fragment)":15
jpayne@68 9330 * return __pyx_unpickle_asGTF, (type(self), 0xe8424ea, None), state
jpayne@68 9331 * else:
jpayne@68 9332 * return __pyx_unpickle_asGTF, (type(self), 0xe8424ea, state) # <<<<<<<<<<<<<<
jpayne@68 9333 * def __setstate_cython__(self, __pyx_state):
jpayne@68 9334 * __pyx_unpickle_asGTF__set_state(self, __pyx_state)
jpayne@68 9335 */
jpayne@68 9336 /*else*/ {
jpayne@68 9337 __Pyx_XDECREF(__pyx_r);
jpayne@68 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@68 9339 __Pyx_GOTREF(__pyx_t_4);
jpayne@68 9340 __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error)
jpayne@68 9341 __Pyx_GOTREF(__pyx_t_1);
jpayne@68 9342 __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
jpayne@68 9343 __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
jpayne@68 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@68 9345 __Pyx_INCREF(__pyx_int_243541226);
jpayne@68 9346 __Pyx_GIVEREF(__pyx_int_243541226);
jpayne@68 9347 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_243541226)) __PYX_ERR(1, 15, __pyx_L1_error);
jpayne@68 9348 __Pyx_INCREF(__pyx_v_state);
jpayne@68 9349 __Pyx_GIVEREF(__pyx_v_state);
jpayne@68 9350 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state)) __PYX_ERR(1, 15, __pyx_L1_error);
jpayne@68 9351 __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 15, __pyx_L1_error)
jpayne@68 9352 __Pyx_GOTREF(__pyx_t_3);
jpayne@68 9353 __Pyx_GIVEREF(__pyx_t_4);
jpayne@68 9354 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4)) __PYX_ERR(1, 15, __pyx_L1_error);
jpayne@68 9355 __Pyx_GIVEREF(__pyx_t_1);
jpayne@68 9356 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error);
jpayne@68 9357 __pyx_t_4 = 0;
jpayne@68 9358 __pyx_t_1 = 0;
jpayne@68 9359 __pyx_r = __pyx_t_3;
jpayne@68 9360 __pyx_t_3 = 0;
jpayne@68 9361 goto __pyx_L0;
jpayne@68 9362 }
jpayne@68 9363
jpayne@68 9364 /* "(tree fragment)":1
jpayne@68 9365 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
jpayne@68 9366 * cdef tuple state
jpayne@68 9367 * cdef object _dict
jpayne@68 9368 */
jpayne@68 9369
jpayne@68 9370 /* function exit code */
jpayne@68 9371 __pyx_L1_error:;
jpayne@68 9372 __Pyx_XDECREF(__pyx_t_1);
jpayne@68 9373 __Pyx_XDECREF(__pyx_t_3);
jpayne@68 9374 __Pyx_XDECREF(__pyx_t_4);
jpayne@68 9375 __Pyx_AddTraceback("pysam.libctabix.asGTF.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@68 9376 __pyx_r = NULL;
jpayne@68 9377 __pyx_L0:;
jpayne@68 9378 __Pyx_XDECREF(__pyx_v_state);
jpayne@68 9379 __Pyx_XDECREF(__pyx_v__dict);
jpayne@68 9380 __Pyx_XGIVEREF(__pyx_r);
jpayne@68 9381 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@68 9382 __Pyx_RefNannyFinishContext();
jpayne@68 9383 return __pyx_r;
jpayne@68 9384 }
jpayne@68 9385
jpayne@68 9386 /* "(tree fragment)":16
jpayne@68 9387 * else:
jpayne@68 9388 * return __pyx_unpickle_asGTF, (type(self), 0xe8424ea, state)
jpayne@68 9389 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
jpayne@68 9390 * __pyx_unpickle_asGTF__set_state(self, __pyx_state)
jpayne@68 9391 */
jpayne@68 9392
jpayne@68 9393 /* Python wrapper */
jpayne@68 9394 static PyObject *__pyx_pw_5pysam_9libctabix_5asGTF_3__setstate_cython__(PyObject *__pyx_v_self,
jpayne@68 9395 #if CYTHON_METH_FASTCALL
jpayne@68 9396 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@68 9397 #else
jpayne@68 9398 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@68 9399 #endif
jpayne@68 9400 ); /*proto*/
jpayne@68 9401 PyDoc_STRVAR(__pyx_doc_5pysam_9libctabix_5asGTF_2__setstate_cython__, "asGTF.__setstate_cython__(self, __pyx_state)");
jpayne@68 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@68 9403 static PyObject *__pyx_pw_5pysam_9libctabix_5asGTF_3__setstate_cython__(PyObject *__pyx_v_self,
jpayne@68 9404 #if CYTHON_METH_FASTCALL
jpayne@68 9405 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@68 9406 #else
jpayne@68 9407 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@68 9408 #endif
jpayne@68 9409 ) {
jpayne@68 9410 PyObject *__pyx_v___pyx_state = 0;
jpayne@68 9411 #if !CYTHON_METH_FASTCALL
jpayne@68 9412 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
jpayne@68 9413 #endif
jpayne@68 9414 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@68 9415 PyObject* values[1] = {0};
jpayne@68 9416 int __pyx_lineno = 0;
jpayne@68 9417 const char *__pyx_filename = NULL;
jpayne@68 9418 int __pyx_clineno = 0;
jpayne@68 9419 PyObject *__pyx_r = 0;
jpayne@68 9420 __Pyx_RefNannyDeclarations
jpayne@68 9421 __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
jpayne@68 9422 #if !CYTHON_METH_FASTCALL
jpayne@68 9423 #if CYTHON_ASSUME_SAFE_MACROS
jpayne@68 9424 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
jpayne@68 9425 #else
jpayne@68 9426 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
jpayne@68 9427 #endif
jpayne@68 9428 #endif
jpayne@68 9429 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
jpayne@68 9430 {
jpayne@68 9431 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0};
jpayne@68 9432 if (__pyx_kwds) {
jpayne@68 9433 Py_ssize_t kw_args;
jpayne@68 9434 switch (__pyx_nargs) {
jpayne@68 9435 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
jpayne@68 9436 CYTHON_FALLTHROUGH;
jpayne@68 9437 case 0: break;
jpayne@68 9438 default: goto __pyx_L5_argtuple_error;
jpayne@68 9439 }
jpayne@68 9440 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
jpayne@68 9441 switch (__pyx_nargs) {
jpayne@68 9442 case 0:
jpayne@68 9443 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) {
jpayne@68 9444 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
jpayne@68 9445 kw_args--;
jpayne@68 9446 }
jpayne@68 9447 else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 16, __pyx_L3_error)
jpayne@68 9448 else goto __pyx_L5_argtuple_error;
jpayne@68 9449 }
jpayne@68 9450 if (unlikely(kw_args > 0)) {
jpayne@68 9451 const Py_ssize_t kwd_pos_args = __pyx_nargs;
jpayne@68 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@68 9453 }
jpayne@68 9454 } else if (unlikely(__pyx_nargs != 1)) {
jpayne@68 9455 goto __pyx_L5_argtuple_error;
jpayne@68 9456 } else {
jpayne@68 9457 values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
jpayne@68 9458 }
jpayne@68 9459 __pyx_v___pyx_state = values[0];
jpayne@68 9460 }
jpayne@68 9461 goto __pyx_L6_skip;
jpayne@68 9462 __pyx_L5_argtuple_error:;
jpayne@68 9463 __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 16, __pyx_L3_error)
jpayne@68 9464 __pyx_L6_skip:;
jpayne@68 9465 goto __pyx_L4_argument_unpacking_done;
jpayne@68 9466 __pyx_L3_error:;
jpayne@68 9467 {
jpayne@68 9468 Py_ssize_t __pyx_temp;
jpayne@68 9469 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
jpayne@68 9470 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
jpayne@68 9471 }
jpayne@68 9472 }
jpayne@68 9473 __Pyx_AddTraceback("pysam.libctabix.asGTF.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@68 9474 __Pyx_RefNannyFinishContext();
jpayne@68 9475 return NULL;
jpayne@68 9476 __pyx_L4_argument_unpacking_done:;
jpayne@68 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@68 9478
jpayne@68 9479 /* function exit code */
jpayne@68 9480 {
jpayne@68 9481 Py_ssize_t __pyx_temp;
jpayne@68 9482 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
jpayne@68 9483 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
jpayne@68 9484 }
jpayne@68 9485 }
jpayne@68 9486 __Pyx_RefNannyFinishContext();
jpayne@68 9487 return __pyx_r;
jpayne@68 9488 }
jpayne@68 9489
jpayne@68 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@68 9491 PyObject *__pyx_r = NULL;
jpayne@68 9492 __Pyx_TraceDeclarations
jpayne@68 9493 __Pyx_RefNannyDeclarations
jpayne@68 9494 PyObject *__pyx_t_1 = NULL;
jpayne@68 9495 int __pyx_lineno = 0;
jpayne@68 9496 const char *__pyx_filename = NULL;
jpayne@68 9497 int __pyx_clineno = 0;
jpayne@68 9498 __Pyx_TraceFrameInit(__pyx_codeobj__10)
jpayne@68 9499 __Pyx_RefNannySetupContext("__setstate_cython__", 1);
jpayne@68 9500 __Pyx_TraceCall("__setstate_cython__", __pyx_f[1], 16, 0, __PYX_ERR(1, 16, __pyx_L1_error));
jpayne@68 9501
jpayne@68 9502 /* "(tree fragment)":17
jpayne@68 9503 * return __pyx_unpickle_asGTF, (type(self), 0xe8424ea, state)
jpayne@68 9504 * def __setstate_cython__(self, __pyx_state):
jpayne@68 9505 * __pyx_unpickle_asGTF__set_state(self, __pyx_state) # <<<<<<<<<<<<<<
jpayne@68 9506 */
jpayne@68 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@68 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@68 9509 __Pyx_GOTREF(__pyx_t_1);
jpayne@68 9510 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@68 9511
jpayne@68 9512 /* "(tree fragment)":16
jpayne@68 9513 * else:
jpayne@68 9514 * return __pyx_unpickle_asGTF, (type(self), 0xe8424ea, state)
jpayne@68 9515 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
jpayne@68 9516 * __pyx_unpickle_asGTF__set_state(self, __pyx_state)
jpayne@68 9517 */
jpayne@68 9518
jpayne@68 9519 /* function exit code */
jpayne@68 9520 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
jpayne@68 9521 goto __pyx_L0;
jpayne@68 9522 __pyx_L1_error:;
jpayne@68 9523 __Pyx_XDECREF(__pyx_t_1);
jpayne@68 9524 __Pyx_AddTraceback("pysam.libctabix.asGTF.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@68 9525 __pyx_r = NULL;
jpayne@68 9526 __pyx_L0:;
jpayne@68 9527 __Pyx_XGIVEREF(__pyx_r);
jpayne@68 9528 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@68 9529 __Pyx_RefNannyFinishContext();
jpayne@68 9530 return __pyx_r;
jpayne@68 9531 }
jpayne@68 9532
jpayne@68 9533 /* "pysam/libctabix.pyx":239
jpayne@68 9534 *
jpayne@68 9535 * '''
jpayne@68 9536 * cdef parse(self, char * buffer, int len): # <<<<<<<<<<<<<<
jpayne@68 9537 * cdef ctabixproxies.BedProxy r
jpayne@68 9538 * r = ctabixproxies.BedProxy(self.encoding)
jpayne@68 9539 */
jpayne@68 9540
jpayne@68 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@68 9542 struct __pyx_obj_5pysam_16libctabixproxies_BedProxy *__pyx_v_r = 0;
jpayne@68 9543 PyObject *__pyx_r = NULL;
jpayne@68 9544 __Pyx_TraceDeclarations
jpayne@68 9545 __Pyx_RefNannyDeclarations
jpayne@68 9546 PyObject *__pyx_t_1 = NULL;
jpayne@68 9547 int __pyx_lineno = 0;
jpayne@68 9548 const char *__pyx_filename = NULL;
jpayne@68 9549 int __pyx_clineno = 0;
jpayne@68 9550 __Pyx_RefNannySetupContext("parse", 1);
jpayne@68 9551 __Pyx_TraceCall("parse", __pyx_f[0], 239, 0, __PYX_ERR(0, 239, __pyx_L1_error));
jpayne@68 9552
jpayne@68 9553 /* "pysam/libctabix.pyx":241
jpayne@68 9554 * cdef parse(self, char * buffer, int len):
jpayne@68 9555 * cdef ctabixproxies.BedProxy r
jpayne@68 9556 * r = ctabixproxies.BedProxy(self.encoding) # <<<<<<<<<<<<<<
jpayne@68 9557 * r.copy(buffer, len)
jpayne@68 9558 * return r
jpayne@68 9559 */
jpayne@68 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@68 9561 __Pyx_GOTREF(__pyx_t_1);
jpayne@68 9562 __pyx_v_r = ((struct __pyx_obj_5pysam_16libctabixproxies_BedProxy *)__pyx_t_1);
jpayne@68 9563 __pyx_t_1 = 0;
jpayne@68 9564
jpayne@68 9565 /* "pysam/libctabix.pyx":242
jpayne@68 9566 * cdef ctabixproxies.BedProxy r
jpayne@68 9567 * r = ctabixproxies.BedProxy(self.encoding)
jpayne@68 9568 * r.copy(buffer, len) # <<<<<<<<<<<<<<
jpayne@68 9569 * return r
jpayne@68 9570 *
jpayne@68 9571 */
jpayne@68 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@68 9573 __Pyx_GOTREF(__pyx_t_1);
jpayne@68 9574 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@68 9575
jpayne@68 9576 /* "pysam/libctabix.pyx":243
jpayne@68 9577 * r = ctabixproxies.BedProxy(self.encoding)
jpayne@68 9578 * r.copy(buffer, len)
jpayne@68 9579 * return r # <<<<<<<<<<<<<<
jpayne@68 9580 *
jpayne@68 9581 *
jpayne@68 9582 */
jpayne@68 9583 __Pyx_XDECREF(__pyx_r);
jpayne@68 9584 __Pyx_INCREF((PyObject *)__pyx_v_r);
jpayne@68 9585 __pyx_r = ((PyObject *)__pyx_v_r);
jpayne@68 9586 goto __pyx_L0;
jpayne@68 9587
jpayne@68 9588 /* "pysam/libctabix.pyx":239
jpayne@68 9589 *
jpayne@68 9590 * '''
jpayne@68 9591 * cdef parse(self, char * buffer, int len): # <<<<<<<<<<<<<<
jpayne@68 9592 * cdef ctabixproxies.BedProxy r
jpayne@68 9593 * r = ctabixproxies.BedProxy(self.encoding)
jpayne@68 9594 */
jpayne@68 9595
jpayne@68 9596 /* function exit code */
jpayne@68 9597 __pyx_L1_error:;
jpayne@68 9598 __Pyx_XDECREF(__pyx_t_1);
jpayne@68 9599 __Pyx_AddTraceback("pysam.libctabix.asBed.parse", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@68 9600 __pyx_r = 0;
jpayne@68 9601 __pyx_L0:;
jpayne@68 9602 __Pyx_XDECREF((PyObject *)__pyx_v_r);
jpayne@68 9603 __Pyx_XGIVEREF(__pyx_r);
jpayne@68 9604 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@68 9605 __Pyx_RefNannyFinishContext();
jpayne@68 9606 return __pyx_r;
jpayne@68 9607 }
jpayne@68 9608
jpayne@68 9609 /* "(tree fragment)":1
jpayne@68 9610 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
jpayne@68 9611 * cdef tuple state
jpayne@68 9612 * cdef object _dict
jpayne@68 9613 */
jpayne@68 9614
jpayne@68 9615 /* Python wrapper */
jpayne@68 9616 static PyObject *__pyx_pw_5pysam_9libctabix_5asBed_1__reduce_cython__(PyObject *__pyx_v_self,
jpayne@68 9617 #if CYTHON_METH_FASTCALL
jpayne@68 9618 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@68 9619 #else
jpayne@68 9620 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@68 9621 #endif
jpayne@68 9622 ); /*proto*/
jpayne@68 9623 PyDoc_STRVAR(__pyx_doc_5pysam_9libctabix_5asBed___reduce_cython__, "asBed.__reduce_cython__(self)");
jpayne@68 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@68 9625 static PyObject *__pyx_pw_5pysam_9libctabix_5asBed_1__reduce_cython__(PyObject *__pyx_v_self,
jpayne@68 9626 #if CYTHON_METH_FASTCALL
jpayne@68 9627 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@68 9628 #else
jpayne@68 9629 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@68 9630 #endif
jpayne@68 9631 ) {
jpayne@68 9632 #if !CYTHON_METH_FASTCALL
jpayne@68 9633 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
jpayne@68 9634 #endif
jpayne@68 9635 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@68 9636 PyObject *__pyx_r = 0;
jpayne@68 9637 __Pyx_RefNannyDeclarations
jpayne@68 9638 __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
jpayne@68 9639 #if !CYTHON_METH_FASTCALL
jpayne@68 9640 #if CYTHON_ASSUME_SAFE_MACROS
jpayne@68 9641 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
jpayne@68 9642 #else
jpayne@68 9643 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
jpayne@68 9644 #endif
jpayne@68 9645 #endif
jpayne@68 9646 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
jpayne@68 9647 if (unlikely(__pyx_nargs > 0)) {
jpayne@68 9648 __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL;}
jpayne@68 9649 if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__reduce_cython__", 0))) return NULL;
jpayne@68 9650 __pyx_r = __pyx_pf_5pysam_9libctabix_5asBed___reduce_cython__(((struct __pyx_obj_5pysam_9libctabix_asBed *)__pyx_v_self));
jpayne@68 9651
jpayne@68 9652 /* function exit code */
jpayne@68 9653 __Pyx_RefNannyFinishContext();
jpayne@68 9654 return __pyx_r;
jpayne@68 9655 }
jpayne@68 9656
jpayne@68 9657 static PyObject *__pyx_pf_5pysam_9libctabix_5asBed___reduce_cython__(struct __pyx_obj_5pysam_9libctabix_asBed *__pyx_v_self) {
jpayne@68 9658 PyObject *__pyx_v_state = 0;
jpayne@68 9659 PyObject *__pyx_v__dict = 0;
jpayne@68 9660 int __pyx_v_use_setstate;
jpayne@68 9661 PyObject *__pyx_r = NULL;
jpayne@68 9662 __Pyx_TraceDeclarations
jpayne@68 9663 __Pyx_RefNannyDeclarations
jpayne@68 9664 PyObject *__pyx_t_1 = NULL;
jpayne@68 9665 int __pyx_t_2;
jpayne@68 9666 PyObject *__pyx_t_3 = NULL;
jpayne@68 9667 PyObject *__pyx_t_4 = NULL;
jpayne@68 9668 int __pyx_lineno = 0;
jpayne@68 9669 const char *__pyx_filename = NULL;
jpayne@68 9670 int __pyx_clineno = 0;
jpayne@68 9671 __Pyx_TraceFrameInit(__pyx_codeobj__11)
jpayne@68 9672 __Pyx_RefNannySetupContext("__reduce_cython__", 1);
jpayne@68 9673 __Pyx_TraceCall("__reduce_cython__", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));
jpayne@68 9674
jpayne@68 9675 /* "(tree fragment)":5
jpayne@68 9676 * cdef object _dict
jpayne@68 9677 * cdef bint use_setstate
jpayne@68 9678 * state = (self.encoding,) # <<<<<<<<<<<<<<
jpayne@68 9679 * _dict = getattr(self, '__dict__', None)
jpayne@68 9680 * if _dict is not None:
jpayne@68 9681 */
jpayne@68 9682 __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
jpayne@68 9683 __Pyx_GOTREF(__pyx_t_1);
jpayne@68 9684 __Pyx_INCREF(__pyx_v_self->__pyx_base.encoding);
jpayne@68 9685 __Pyx_GIVEREF(__pyx_v_self->__pyx_base.encoding);
jpayne@68 9686 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->__pyx_base.encoding)) __PYX_ERR(1, 5, __pyx_L1_error);
jpayne@68 9687 __pyx_v_state = ((PyObject*)__pyx_t_1);
jpayne@68 9688 __pyx_t_1 = 0;
jpayne@68 9689
jpayne@68 9690 /* "(tree fragment)":6
jpayne@68 9691 * cdef bint use_setstate
jpayne@68 9692 * state = (self.encoding,)
jpayne@68 9693 * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<<
jpayne@68 9694 * if _dict is not None:
jpayne@68 9695 * state += (_dict,)
jpayne@68 9696 */
jpayne@68 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@68 9698 __Pyx_GOTREF(__pyx_t_1);
jpayne@68 9699 __pyx_v__dict = __pyx_t_1;
jpayne@68 9700 __pyx_t_1 = 0;
jpayne@68 9701
jpayne@68 9702 /* "(tree fragment)":7
jpayne@68 9703 * state = (self.encoding,)
jpayne@68 9704 * _dict = getattr(self, '__dict__', None)
jpayne@68 9705 * if _dict is not None: # <<<<<<<<<<<<<<
jpayne@68 9706 * state += (_dict,)
jpayne@68 9707 * use_setstate = True
jpayne@68 9708 */
jpayne@68 9709 __pyx_t_2 = (__pyx_v__dict != Py_None);
jpayne@68 9710 if (__pyx_t_2) {
jpayne@68 9711
jpayne@68 9712 /* "(tree fragment)":8
jpayne@68 9713 * _dict = getattr(self, '__dict__', None)
jpayne@68 9714 * if _dict is not None:
jpayne@68 9715 * state += (_dict,) # <<<<<<<<<<<<<<
jpayne@68 9716 * use_setstate = True
jpayne@68 9717 * else:
jpayne@68 9718 */
jpayne@68 9719 __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 8, __pyx_L1_error)
jpayne@68 9720 __Pyx_GOTREF(__pyx_t_1);
jpayne@68 9721 __Pyx_INCREF(__pyx_v__dict);
jpayne@68 9722 __Pyx_GIVEREF(__pyx_v__dict);
jpayne@68 9723 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict)) __PYX_ERR(1, 8, __pyx_L1_error);
jpayne@68 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@68 9725 __Pyx_GOTREF(__pyx_t_3);
jpayne@68 9726 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@68 9727 __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_3));
jpayne@68 9728 __pyx_t_3 = 0;
jpayne@68 9729
jpayne@68 9730 /* "(tree fragment)":9
jpayne@68 9731 * if _dict is not None:
jpayne@68 9732 * state += (_dict,)
jpayne@68 9733 * use_setstate = True # <<<<<<<<<<<<<<
jpayne@68 9734 * else:
jpayne@68 9735 * use_setstate = self.encoding is not None
jpayne@68 9736 */
jpayne@68 9737 __pyx_v_use_setstate = 1;
jpayne@68 9738
jpayne@68 9739 /* "(tree fragment)":7
jpayne@68 9740 * state = (self.encoding,)
jpayne@68 9741 * _dict = getattr(self, '__dict__', None)
jpayne@68 9742 * if _dict is not None: # <<<<<<<<<<<<<<
jpayne@68 9743 * state += (_dict,)
jpayne@68 9744 * use_setstate = True
jpayne@68 9745 */
jpayne@68 9746 goto __pyx_L3;
jpayne@68 9747 }
jpayne@68 9748
jpayne@68 9749 /* "(tree fragment)":11
jpayne@68 9750 * use_setstate = True
jpayne@68 9751 * else:
jpayne@68 9752 * use_setstate = self.encoding is not None # <<<<<<<<<<<<<<
jpayne@68 9753 * if use_setstate:
jpayne@68 9754 * return __pyx_unpickle_asBed, (type(self), 0xe8424ea, None), state
jpayne@68 9755 */
jpayne@68 9756 /*else*/ {
jpayne@68 9757 __pyx_t_2 = (__pyx_v_self->__pyx_base.encoding != Py_None);
jpayne@68 9758 __pyx_v_use_setstate = __pyx_t_2;
jpayne@68 9759 }
jpayne@68 9760 __pyx_L3:;
jpayne@68 9761
jpayne@68 9762 /* "(tree fragment)":12
jpayne@68 9763 * else:
jpayne@68 9764 * use_setstate = self.encoding is not None
jpayne@68 9765 * if use_setstate: # <<<<<<<<<<<<<<
jpayne@68 9766 * return __pyx_unpickle_asBed, (type(self), 0xe8424ea, None), state
jpayne@68 9767 * else:
jpayne@68 9768 */
jpayne@68 9769 if (__pyx_v_use_setstate) {
jpayne@68 9770
jpayne@68 9771 /* "(tree fragment)":13
jpayne@68 9772 * use_setstate = self.encoding is not None
jpayne@68 9773 * if use_setstate:
jpayne@68 9774 * return __pyx_unpickle_asBed, (type(self), 0xe8424ea, None), state # <<<<<<<<<<<<<<
jpayne@68 9775 * else:
jpayne@68 9776 * return __pyx_unpickle_asBed, (type(self), 0xe8424ea, state)
jpayne@68 9777 */
jpayne@68 9778 __Pyx_XDECREF(__pyx_r);
jpayne@68 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@68 9780 __Pyx_GOTREF(__pyx_t_3);
jpayne@68 9781 __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error)
jpayne@68 9782 __Pyx_GOTREF(__pyx_t_1);
jpayne@68 9783 __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
jpayne@68 9784 __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
jpayne@68 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@68 9786 __Pyx_INCREF(__pyx_int_243541226);
jpayne@68 9787 __Pyx_GIVEREF(__pyx_int_243541226);
jpayne@68 9788 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_243541226)) __PYX_ERR(1, 13, __pyx_L1_error);
jpayne@68 9789 __Pyx_INCREF(Py_None);
jpayne@68 9790 __Pyx_GIVEREF(Py_None);
jpayne@68 9791 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None)) __PYX_ERR(1, 13, __pyx_L1_error);
jpayne@68 9792 __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 13, __pyx_L1_error)
jpayne@68 9793 __Pyx_GOTREF(__pyx_t_4);
jpayne@68 9794 __Pyx_GIVEREF(__pyx_t_3);
jpayne@68 9795 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3)) __PYX_ERR(1, 13, __pyx_L1_error);
jpayne@68 9796 __Pyx_GIVEREF(__pyx_t_1);
jpayne@68 9797 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error);
jpayne@68 9798 __Pyx_INCREF(__pyx_v_state);
jpayne@68 9799 __Pyx_GIVEREF(__pyx_v_state);
jpayne@68 9800 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_v_state)) __PYX_ERR(1, 13, __pyx_L1_error);
jpayne@68 9801 __pyx_t_3 = 0;
jpayne@68 9802 __pyx_t_1 = 0;
jpayne@68 9803 __pyx_r = __pyx_t_4;
jpayne@68 9804 __pyx_t_4 = 0;
jpayne@68 9805 goto __pyx_L0;
jpayne@68 9806
jpayne@68 9807 /* "(tree fragment)":12
jpayne@68 9808 * else:
jpayne@68 9809 * use_setstate = self.encoding is not None
jpayne@68 9810 * if use_setstate: # <<<<<<<<<<<<<<
jpayne@68 9811 * return __pyx_unpickle_asBed, (type(self), 0xe8424ea, None), state
jpayne@68 9812 * else:
jpayne@68 9813 */
jpayne@68 9814 }
jpayne@68 9815
jpayne@68 9816 /* "(tree fragment)":15
jpayne@68 9817 * return __pyx_unpickle_asBed, (type(self), 0xe8424ea, None), state
jpayne@68 9818 * else:
jpayne@68 9819 * return __pyx_unpickle_asBed, (type(self), 0xe8424ea, state) # <<<<<<<<<<<<<<
jpayne@68 9820 * def __setstate_cython__(self, __pyx_state):
jpayne@68 9821 * __pyx_unpickle_asBed__set_state(self, __pyx_state)
jpayne@68 9822 */
jpayne@68 9823 /*else*/ {
jpayne@68 9824 __Pyx_XDECREF(__pyx_r);
jpayne@68 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@68 9826 __Pyx_GOTREF(__pyx_t_4);
jpayne@68 9827 __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error)
jpayne@68 9828 __Pyx_GOTREF(__pyx_t_1);
jpayne@68 9829 __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
jpayne@68 9830 __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
jpayne@68 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@68 9832 __Pyx_INCREF(__pyx_int_243541226);
jpayne@68 9833 __Pyx_GIVEREF(__pyx_int_243541226);
jpayne@68 9834 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_243541226)) __PYX_ERR(1, 15, __pyx_L1_error);
jpayne@68 9835 __Pyx_INCREF(__pyx_v_state);
jpayne@68 9836 __Pyx_GIVEREF(__pyx_v_state);
jpayne@68 9837 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state)) __PYX_ERR(1, 15, __pyx_L1_error);
jpayne@68 9838 __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 15, __pyx_L1_error)
jpayne@68 9839 __Pyx_GOTREF(__pyx_t_3);
jpayne@68 9840 __Pyx_GIVEREF(__pyx_t_4);
jpayne@68 9841 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4)) __PYX_ERR(1, 15, __pyx_L1_error);
jpayne@68 9842 __Pyx_GIVEREF(__pyx_t_1);
jpayne@68 9843 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error);
jpayne@68 9844 __pyx_t_4 = 0;
jpayne@68 9845 __pyx_t_1 = 0;
jpayne@68 9846 __pyx_r = __pyx_t_3;
jpayne@68 9847 __pyx_t_3 = 0;
jpayne@68 9848 goto __pyx_L0;
jpayne@68 9849 }
jpayne@68 9850
jpayne@68 9851 /* "(tree fragment)":1
jpayne@68 9852 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
jpayne@68 9853 * cdef tuple state
jpayne@68 9854 * cdef object _dict
jpayne@68 9855 */
jpayne@68 9856
jpayne@68 9857 /* function exit code */
jpayne@68 9858 __pyx_L1_error:;
jpayne@68 9859 __Pyx_XDECREF(__pyx_t_1);
jpayne@68 9860 __Pyx_XDECREF(__pyx_t_3);
jpayne@68 9861 __Pyx_XDECREF(__pyx_t_4);
jpayne@68 9862 __Pyx_AddTraceback("pysam.libctabix.asBed.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@68 9863 __pyx_r = NULL;
jpayne@68 9864 __pyx_L0:;
jpayne@68 9865 __Pyx_XDECREF(__pyx_v_state);
jpayne@68 9866 __Pyx_XDECREF(__pyx_v__dict);
jpayne@68 9867 __Pyx_XGIVEREF(__pyx_r);
jpayne@68 9868 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@68 9869 __Pyx_RefNannyFinishContext();
jpayne@68 9870 return __pyx_r;
jpayne@68 9871 }
jpayne@68 9872
jpayne@68 9873 /* "(tree fragment)":16
jpayne@68 9874 * else:
jpayne@68 9875 * return __pyx_unpickle_asBed, (type(self), 0xe8424ea, state)
jpayne@68 9876 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
jpayne@68 9877 * __pyx_unpickle_asBed__set_state(self, __pyx_state)
jpayne@68 9878 */
jpayne@68 9879
jpayne@68 9880 /* Python wrapper */
jpayne@68 9881 static PyObject *__pyx_pw_5pysam_9libctabix_5asBed_3__setstate_cython__(PyObject *__pyx_v_self,
jpayne@68 9882 #if CYTHON_METH_FASTCALL
jpayne@68 9883 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@68 9884 #else
jpayne@68 9885 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@68 9886 #endif
jpayne@68 9887 ); /*proto*/
jpayne@68 9888 PyDoc_STRVAR(__pyx_doc_5pysam_9libctabix_5asBed_2__setstate_cython__, "asBed.__setstate_cython__(self, __pyx_state)");
jpayne@68 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@68 9890 static PyObject *__pyx_pw_5pysam_9libctabix_5asBed_3__setstate_cython__(PyObject *__pyx_v_self,
jpayne@68 9891 #if CYTHON_METH_FASTCALL
jpayne@68 9892 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@68 9893 #else
jpayne@68 9894 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@68 9895 #endif
jpayne@68 9896 ) {
jpayne@68 9897 PyObject *__pyx_v___pyx_state = 0;
jpayne@68 9898 #if !CYTHON_METH_FASTCALL
jpayne@68 9899 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
jpayne@68 9900 #endif
jpayne@68 9901 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@68 9902 PyObject* values[1] = {0};
jpayne@68 9903 int __pyx_lineno = 0;
jpayne@68 9904 const char *__pyx_filename = NULL;
jpayne@68 9905 int __pyx_clineno = 0;
jpayne@68 9906 PyObject *__pyx_r = 0;
jpayne@68 9907 __Pyx_RefNannyDeclarations
jpayne@68 9908 __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
jpayne@68 9909 #if !CYTHON_METH_FASTCALL
jpayne@68 9910 #if CYTHON_ASSUME_SAFE_MACROS
jpayne@68 9911 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
jpayne@68 9912 #else
jpayne@68 9913 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
jpayne@68 9914 #endif
jpayne@68 9915 #endif
jpayne@68 9916 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
jpayne@68 9917 {
jpayne@68 9918 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0};
jpayne@68 9919 if (__pyx_kwds) {
jpayne@68 9920 Py_ssize_t kw_args;
jpayne@68 9921 switch (__pyx_nargs) {
jpayne@68 9922 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
jpayne@68 9923 CYTHON_FALLTHROUGH;
jpayne@68 9924 case 0: break;
jpayne@68 9925 default: goto __pyx_L5_argtuple_error;
jpayne@68 9926 }
jpayne@68 9927 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
jpayne@68 9928 switch (__pyx_nargs) {
jpayne@68 9929 case 0:
jpayne@68 9930 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) {
jpayne@68 9931 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
jpayne@68 9932 kw_args--;
jpayne@68 9933 }
jpayne@68 9934 else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 16, __pyx_L3_error)
jpayne@68 9935 else goto __pyx_L5_argtuple_error;
jpayne@68 9936 }
jpayne@68 9937 if (unlikely(kw_args > 0)) {
jpayne@68 9938 const Py_ssize_t kwd_pos_args = __pyx_nargs;
jpayne@68 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@68 9940 }
jpayne@68 9941 } else if (unlikely(__pyx_nargs != 1)) {
jpayne@68 9942 goto __pyx_L5_argtuple_error;
jpayne@68 9943 } else {
jpayne@68 9944 values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
jpayne@68 9945 }
jpayne@68 9946 __pyx_v___pyx_state = values[0];
jpayne@68 9947 }
jpayne@68 9948 goto __pyx_L6_skip;
jpayne@68 9949 __pyx_L5_argtuple_error:;
jpayne@68 9950 __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 16, __pyx_L3_error)
jpayne@68 9951 __pyx_L6_skip:;
jpayne@68 9952 goto __pyx_L4_argument_unpacking_done;
jpayne@68 9953 __pyx_L3_error:;
jpayne@68 9954 {
jpayne@68 9955 Py_ssize_t __pyx_temp;
jpayne@68 9956 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
jpayne@68 9957 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
jpayne@68 9958 }
jpayne@68 9959 }
jpayne@68 9960 __Pyx_AddTraceback("pysam.libctabix.asBed.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@68 9961 __Pyx_RefNannyFinishContext();
jpayne@68 9962 return NULL;
jpayne@68 9963 __pyx_L4_argument_unpacking_done:;
jpayne@68 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@68 9965
jpayne@68 9966 /* function exit code */
jpayne@68 9967 {
jpayne@68 9968 Py_ssize_t __pyx_temp;
jpayne@68 9969 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
jpayne@68 9970 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
jpayne@68 9971 }
jpayne@68 9972 }
jpayne@68 9973 __Pyx_RefNannyFinishContext();
jpayne@68 9974 return __pyx_r;
jpayne@68 9975 }
jpayne@68 9976
jpayne@68 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@68 9978 PyObject *__pyx_r = NULL;
jpayne@68 9979 __Pyx_TraceDeclarations
jpayne@68 9980 __Pyx_RefNannyDeclarations
jpayne@68 9981 PyObject *__pyx_t_1 = NULL;
jpayne@68 9982 int __pyx_lineno = 0;
jpayne@68 9983 const char *__pyx_filename = NULL;
jpayne@68 9984 int __pyx_clineno = 0;
jpayne@68 9985 __Pyx_TraceFrameInit(__pyx_codeobj__12)
jpayne@68 9986 __Pyx_RefNannySetupContext("__setstate_cython__", 1);
jpayne@68 9987 __Pyx_TraceCall("__setstate_cython__", __pyx_f[1], 16, 0, __PYX_ERR(1, 16, __pyx_L1_error));
jpayne@68 9988
jpayne@68 9989 /* "(tree fragment)":17
jpayne@68 9990 * return __pyx_unpickle_asBed, (type(self), 0xe8424ea, state)
jpayne@68 9991 * def __setstate_cython__(self, __pyx_state):
jpayne@68 9992 * __pyx_unpickle_asBed__set_state(self, __pyx_state) # <<<<<<<<<<<<<<
jpayne@68 9993 */
jpayne@68 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@68 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@68 9996 __Pyx_GOTREF(__pyx_t_1);
jpayne@68 9997 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@68 9998
jpayne@68 9999 /* "(tree fragment)":16
jpayne@68 10000 * else:
jpayne@68 10001 * return __pyx_unpickle_asBed, (type(self), 0xe8424ea, state)
jpayne@68 10002 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
jpayne@68 10003 * __pyx_unpickle_asBed__set_state(self, __pyx_state)
jpayne@68 10004 */
jpayne@68 10005
jpayne@68 10006 /* function exit code */
jpayne@68 10007 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
jpayne@68 10008 goto __pyx_L0;
jpayne@68 10009 __pyx_L1_error:;
jpayne@68 10010 __Pyx_XDECREF(__pyx_t_1);
jpayne@68 10011 __Pyx_AddTraceback("pysam.libctabix.asBed.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@68 10012 __pyx_r = NULL;
jpayne@68 10013 __pyx_L0:;
jpayne@68 10014 __Pyx_XGIVEREF(__pyx_r);
jpayne@68 10015 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@68 10016 __Pyx_RefNannyFinishContext();
jpayne@68 10017 return __pyx_r;
jpayne@68 10018 }
jpayne@68 10019
jpayne@68 10020 /* "pysam/libctabix.pyx":280
jpayne@68 10021 *
jpayne@68 10022 * '''
jpayne@68 10023 * cdef parse(self, char * buffer, int len): # <<<<<<<<<<<<<<
jpayne@68 10024 * cdef ctabixproxies.VCFProxy r
jpayne@68 10025 * r = ctabixproxies.VCFProxy(self.encoding)
jpayne@68 10026 */
jpayne@68 10027
jpayne@68 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@68 10029 struct __pyx_obj_5pysam_16libctabixproxies_VCFProxy *__pyx_v_r = 0;
jpayne@68 10030 PyObject *__pyx_r = NULL;
jpayne@68 10031 __Pyx_TraceDeclarations
jpayne@68 10032 __Pyx_RefNannyDeclarations
jpayne@68 10033 PyObject *__pyx_t_1 = NULL;
jpayne@68 10034 int __pyx_lineno = 0;
jpayne@68 10035 const char *__pyx_filename = NULL;
jpayne@68 10036 int __pyx_clineno = 0;
jpayne@68 10037 __Pyx_RefNannySetupContext("parse", 1);
jpayne@68 10038 __Pyx_TraceCall("parse", __pyx_f[0], 280, 0, __PYX_ERR(0, 280, __pyx_L1_error));
jpayne@68 10039
jpayne@68 10040 /* "pysam/libctabix.pyx":282
jpayne@68 10041 * cdef parse(self, char * buffer, int len):
jpayne@68 10042 * cdef ctabixproxies.VCFProxy r
jpayne@68 10043 * r = ctabixproxies.VCFProxy(self.encoding) # <<<<<<<<<<<<<<
jpayne@68 10044 * r.copy(buffer, len)
jpayne@68 10045 * return r
jpayne@68 10046 */
jpayne@68 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@68 10048 __Pyx_GOTREF(__pyx_t_1);
jpayne@68 10049 __pyx_v_r = ((struct __pyx_obj_5pysam_16libctabixproxies_VCFProxy *)__pyx_t_1);
jpayne@68 10050 __pyx_t_1 = 0;
jpayne@68 10051
jpayne@68 10052 /* "pysam/libctabix.pyx":283
jpayne@68 10053 * cdef ctabixproxies.VCFProxy r
jpayne@68 10054 * r = ctabixproxies.VCFProxy(self.encoding)
jpayne@68 10055 * r.copy(buffer, len) # <<<<<<<<<<<<<<
jpayne@68 10056 * return r
jpayne@68 10057 *
jpayne@68 10058 */
jpayne@68 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@68 10060 __Pyx_GOTREF(__pyx_t_1);
jpayne@68 10061 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@68 10062
jpayne@68 10063 /* "pysam/libctabix.pyx":284
jpayne@68 10064 * r = ctabixproxies.VCFProxy(self.encoding)
jpayne@68 10065 * r.copy(buffer, len)
jpayne@68 10066 * return r # <<<<<<<<<<<<<<
jpayne@68 10067 *
jpayne@68 10068 *
jpayne@68 10069 */
jpayne@68 10070 __Pyx_XDECREF(__pyx_r);
jpayne@68 10071 __Pyx_INCREF((PyObject *)__pyx_v_r);
jpayne@68 10072 __pyx_r = ((PyObject *)__pyx_v_r);
jpayne@68 10073 goto __pyx_L0;
jpayne@68 10074
jpayne@68 10075 /* "pysam/libctabix.pyx":280
jpayne@68 10076 *
jpayne@68 10077 * '''
jpayne@68 10078 * cdef parse(self, char * buffer, int len): # <<<<<<<<<<<<<<
jpayne@68 10079 * cdef ctabixproxies.VCFProxy r
jpayne@68 10080 * r = ctabixproxies.VCFProxy(self.encoding)
jpayne@68 10081 */
jpayne@68 10082
jpayne@68 10083 /* function exit code */
jpayne@68 10084 __pyx_L1_error:;
jpayne@68 10085 __Pyx_XDECREF(__pyx_t_1);
jpayne@68 10086 __Pyx_AddTraceback("pysam.libctabix.asVCF.parse", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@68 10087 __pyx_r = 0;
jpayne@68 10088 __pyx_L0:;
jpayne@68 10089 __Pyx_XDECREF((PyObject *)__pyx_v_r);
jpayne@68 10090 __Pyx_XGIVEREF(__pyx_r);
jpayne@68 10091 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@68 10092 __Pyx_RefNannyFinishContext();
jpayne@68 10093 return __pyx_r;
jpayne@68 10094 }
jpayne@68 10095
jpayne@68 10096 /* "(tree fragment)":1
jpayne@68 10097 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
jpayne@68 10098 * cdef tuple state
jpayne@68 10099 * cdef object _dict
jpayne@68 10100 */
jpayne@68 10101
jpayne@68 10102 /* Python wrapper */
jpayne@68 10103 static PyObject *__pyx_pw_5pysam_9libctabix_5asVCF_1__reduce_cython__(PyObject *__pyx_v_self,
jpayne@68 10104 #if CYTHON_METH_FASTCALL
jpayne@68 10105 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@68 10106 #else
jpayne@68 10107 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@68 10108 #endif
jpayne@68 10109 ); /*proto*/
jpayne@68 10110 PyDoc_STRVAR(__pyx_doc_5pysam_9libctabix_5asVCF___reduce_cython__, "asVCF.__reduce_cython__(self)");
jpayne@68 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@68 10112 static PyObject *__pyx_pw_5pysam_9libctabix_5asVCF_1__reduce_cython__(PyObject *__pyx_v_self,
jpayne@68 10113 #if CYTHON_METH_FASTCALL
jpayne@68 10114 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@68 10115 #else
jpayne@68 10116 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@68 10117 #endif
jpayne@68 10118 ) {
jpayne@68 10119 #if !CYTHON_METH_FASTCALL
jpayne@68 10120 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
jpayne@68 10121 #endif
jpayne@68 10122 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@68 10123 PyObject *__pyx_r = 0;
jpayne@68 10124 __Pyx_RefNannyDeclarations
jpayne@68 10125 __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
jpayne@68 10126 #if !CYTHON_METH_FASTCALL
jpayne@68 10127 #if CYTHON_ASSUME_SAFE_MACROS
jpayne@68 10128 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
jpayne@68 10129 #else
jpayne@68 10130 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
jpayne@68 10131 #endif
jpayne@68 10132 #endif
jpayne@68 10133 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
jpayne@68 10134 if (unlikely(__pyx_nargs > 0)) {
jpayne@68 10135 __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL;}
jpayne@68 10136 if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__reduce_cython__", 0))) return NULL;
jpayne@68 10137 __pyx_r = __pyx_pf_5pysam_9libctabix_5asVCF___reduce_cython__(((struct __pyx_obj_5pysam_9libctabix_asVCF *)__pyx_v_self));
jpayne@68 10138
jpayne@68 10139 /* function exit code */
jpayne@68 10140 __Pyx_RefNannyFinishContext();
jpayne@68 10141 return __pyx_r;
jpayne@68 10142 }
jpayne@68 10143
jpayne@68 10144 static PyObject *__pyx_pf_5pysam_9libctabix_5asVCF___reduce_cython__(struct __pyx_obj_5pysam_9libctabix_asVCF *__pyx_v_self) {
jpayne@68 10145 PyObject *__pyx_v_state = 0;
jpayne@68 10146 PyObject *__pyx_v__dict = 0;
jpayne@68 10147 int __pyx_v_use_setstate;
jpayne@68 10148 PyObject *__pyx_r = NULL;
jpayne@68 10149 __Pyx_TraceDeclarations
jpayne@68 10150 __Pyx_RefNannyDeclarations
jpayne@68 10151 PyObject *__pyx_t_1 = NULL;
jpayne@68 10152 int __pyx_t_2;
jpayne@68 10153 PyObject *__pyx_t_3 = NULL;
jpayne@68 10154 PyObject *__pyx_t_4 = NULL;
jpayne@68 10155 int __pyx_lineno = 0;
jpayne@68 10156 const char *__pyx_filename = NULL;
jpayne@68 10157 int __pyx_clineno = 0;
jpayne@68 10158 __Pyx_TraceFrameInit(__pyx_codeobj__13)
jpayne@68 10159 __Pyx_RefNannySetupContext("__reduce_cython__", 1);
jpayne@68 10160 __Pyx_TraceCall("__reduce_cython__", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));
jpayne@68 10161
jpayne@68 10162 /* "(tree fragment)":5
jpayne@68 10163 * cdef object _dict
jpayne@68 10164 * cdef bint use_setstate
jpayne@68 10165 * state = (self.encoding,) # <<<<<<<<<<<<<<
jpayne@68 10166 * _dict = getattr(self, '__dict__', None)
jpayne@68 10167 * if _dict is not None:
jpayne@68 10168 */
jpayne@68 10169 __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
jpayne@68 10170 __Pyx_GOTREF(__pyx_t_1);
jpayne@68 10171 __Pyx_INCREF(__pyx_v_self->__pyx_base.encoding);
jpayne@68 10172 __Pyx_GIVEREF(__pyx_v_self->__pyx_base.encoding);
jpayne@68 10173 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->__pyx_base.encoding)) __PYX_ERR(1, 5, __pyx_L1_error);
jpayne@68 10174 __pyx_v_state = ((PyObject*)__pyx_t_1);
jpayne@68 10175 __pyx_t_1 = 0;
jpayne@68 10176
jpayne@68 10177 /* "(tree fragment)":6
jpayne@68 10178 * cdef bint use_setstate
jpayne@68 10179 * state = (self.encoding,)
jpayne@68 10180 * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<<
jpayne@68 10181 * if _dict is not None:
jpayne@68 10182 * state += (_dict,)
jpayne@68 10183 */
jpayne@68 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@68 10185 __Pyx_GOTREF(__pyx_t_1);
jpayne@68 10186 __pyx_v__dict = __pyx_t_1;
jpayne@68 10187 __pyx_t_1 = 0;
jpayne@68 10188
jpayne@68 10189 /* "(tree fragment)":7
jpayne@68 10190 * state = (self.encoding,)
jpayne@68 10191 * _dict = getattr(self, '__dict__', None)
jpayne@68 10192 * if _dict is not None: # <<<<<<<<<<<<<<
jpayne@68 10193 * state += (_dict,)
jpayne@68 10194 * use_setstate = True
jpayne@68 10195 */
jpayne@68 10196 __pyx_t_2 = (__pyx_v__dict != Py_None);
jpayne@68 10197 if (__pyx_t_2) {
jpayne@68 10198
jpayne@68 10199 /* "(tree fragment)":8
jpayne@68 10200 * _dict = getattr(self, '__dict__', None)
jpayne@68 10201 * if _dict is not None:
jpayne@68 10202 * state += (_dict,) # <<<<<<<<<<<<<<
jpayne@68 10203 * use_setstate = True
jpayne@68 10204 * else:
jpayne@68 10205 */
jpayne@68 10206 __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 8, __pyx_L1_error)
jpayne@68 10207 __Pyx_GOTREF(__pyx_t_1);
jpayne@68 10208 __Pyx_INCREF(__pyx_v__dict);
jpayne@68 10209 __Pyx_GIVEREF(__pyx_v__dict);
jpayne@68 10210 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict)) __PYX_ERR(1, 8, __pyx_L1_error);
jpayne@68 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@68 10212 __Pyx_GOTREF(__pyx_t_3);
jpayne@68 10213 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@68 10214 __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_3));
jpayne@68 10215 __pyx_t_3 = 0;
jpayne@68 10216
jpayne@68 10217 /* "(tree fragment)":9
jpayne@68 10218 * if _dict is not None:
jpayne@68 10219 * state += (_dict,)
jpayne@68 10220 * use_setstate = True # <<<<<<<<<<<<<<
jpayne@68 10221 * else:
jpayne@68 10222 * use_setstate = self.encoding is not None
jpayne@68 10223 */
jpayne@68 10224 __pyx_v_use_setstate = 1;
jpayne@68 10225
jpayne@68 10226 /* "(tree fragment)":7
jpayne@68 10227 * state = (self.encoding,)
jpayne@68 10228 * _dict = getattr(self, '__dict__', None)
jpayne@68 10229 * if _dict is not None: # <<<<<<<<<<<<<<
jpayne@68 10230 * state += (_dict,)
jpayne@68 10231 * use_setstate = True
jpayne@68 10232 */
jpayne@68 10233 goto __pyx_L3;
jpayne@68 10234 }
jpayne@68 10235
jpayne@68 10236 /* "(tree fragment)":11
jpayne@68 10237 * use_setstate = True
jpayne@68 10238 * else:
jpayne@68 10239 * use_setstate = self.encoding is not None # <<<<<<<<<<<<<<
jpayne@68 10240 * if use_setstate:
jpayne@68 10241 * return __pyx_unpickle_asVCF, (type(self), 0xe8424ea, None), state
jpayne@68 10242 */
jpayne@68 10243 /*else*/ {
jpayne@68 10244 __pyx_t_2 = (__pyx_v_self->__pyx_base.encoding != Py_None);
jpayne@68 10245 __pyx_v_use_setstate = __pyx_t_2;
jpayne@68 10246 }
jpayne@68 10247 __pyx_L3:;
jpayne@68 10248
jpayne@68 10249 /* "(tree fragment)":12
jpayne@68 10250 * else:
jpayne@68 10251 * use_setstate = self.encoding is not None
jpayne@68 10252 * if use_setstate: # <<<<<<<<<<<<<<
jpayne@68 10253 * return __pyx_unpickle_asVCF, (type(self), 0xe8424ea, None), state
jpayne@68 10254 * else:
jpayne@68 10255 */
jpayne@68 10256 if (__pyx_v_use_setstate) {
jpayne@68 10257
jpayne@68 10258 /* "(tree fragment)":13
jpayne@68 10259 * use_setstate = self.encoding is not None
jpayne@68 10260 * if use_setstate:
jpayne@68 10261 * return __pyx_unpickle_asVCF, (type(self), 0xe8424ea, None), state # <<<<<<<<<<<<<<
jpayne@68 10262 * else:
jpayne@68 10263 * return __pyx_unpickle_asVCF, (type(self), 0xe8424ea, state)
jpayne@68 10264 */
jpayne@68 10265 __Pyx_XDECREF(__pyx_r);
jpayne@68 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@68 10267 __Pyx_GOTREF(__pyx_t_3);
jpayne@68 10268 __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error)
jpayne@68 10269 __Pyx_GOTREF(__pyx_t_1);
jpayne@68 10270 __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
jpayne@68 10271 __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
jpayne@68 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@68 10273 __Pyx_INCREF(__pyx_int_243541226);
jpayne@68 10274 __Pyx_GIVEREF(__pyx_int_243541226);
jpayne@68 10275 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_243541226)) __PYX_ERR(1, 13, __pyx_L1_error);
jpayne@68 10276 __Pyx_INCREF(Py_None);
jpayne@68 10277 __Pyx_GIVEREF(Py_None);
jpayne@68 10278 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None)) __PYX_ERR(1, 13, __pyx_L1_error);
jpayne@68 10279 __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) __PYX_ERR(1, 13, __pyx_L1_error)
jpayne@68 10280 __Pyx_GOTREF(__pyx_t_4);
jpayne@68 10281 __Pyx_GIVEREF(__pyx_t_3);
jpayne@68 10282 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3)) __PYX_ERR(1, 13, __pyx_L1_error);
jpayne@68 10283 __Pyx_GIVEREF(__pyx_t_1);
jpayne@68 10284 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error);
jpayne@68 10285 __Pyx_INCREF(__pyx_v_state);
jpayne@68 10286 __Pyx_GIVEREF(__pyx_v_state);
jpayne@68 10287 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_v_state)) __PYX_ERR(1, 13, __pyx_L1_error);
jpayne@68 10288 __pyx_t_3 = 0;
jpayne@68 10289 __pyx_t_1 = 0;
jpayne@68 10290 __pyx_r = __pyx_t_4;
jpayne@68 10291 __pyx_t_4 = 0;
jpayne@68 10292 goto __pyx_L0;
jpayne@68 10293
jpayne@68 10294 /* "(tree fragment)":12
jpayne@68 10295 * else:
jpayne@68 10296 * use_setstate = self.encoding is not None
jpayne@68 10297 * if use_setstate: # <<<<<<<<<<<<<<
jpayne@68 10298 * return __pyx_unpickle_asVCF, (type(self), 0xe8424ea, None), state
jpayne@68 10299 * else:
jpayne@68 10300 */
jpayne@68 10301 }
jpayne@68 10302
jpayne@68 10303 /* "(tree fragment)":15
jpayne@68 10304 * return __pyx_unpickle_asVCF, (type(self), 0xe8424ea, None), state
jpayne@68 10305 * else:
jpayne@68 10306 * return __pyx_unpickle_asVCF, (type(self), 0xe8424ea, state) # <<<<<<<<<<<<<<
jpayne@68 10307 * def __setstate_cython__(self, __pyx_state):
jpayne@68 10308 * __pyx_unpickle_asVCF__set_state(self, __pyx_state)
jpayne@68 10309 */
jpayne@68 10310 /*else*/ {
jpayne@68 10311 __Pyx_XDECREF(__pyx_r);
jpayne@68 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@68 10313 __Pyx_GOTREF(__pyx_t_4);
jpayne@68 10314 __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error)
jpayne@68 10315 __Pyx_GOTREF(__pyx_t_1);
jpayne@68 10316 __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
jpayne@68 10317 __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
jpayne@68 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@68 10319 __Pyx_INCREF(__pyx_int_243541226);
jpayne@68 10320 __Pyx_GIVEREF(__pyx_int_243541226);
jpayne@68 10321 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_243541226)) __PYX_ERR(1, 15, __pyx_L1_error);
jpayne@68 10322 __Pyx_INCREF(__pyx_v_state);
jpayne@68 10323 __Pyx_GIVEREF(__pyx_v_state);
jpayne@68 10324 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state)) __PYX_ERR(1, 15, __pyx_L1_error);
jpayne@68 10325 __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 15, __pyx_L1_error)
jpayne@68 10326 __Pyx_GOTREF(__pyx_t_3);
jpayne@68 10327 __Pyx_GIVEREF(__pyx_t_4);
jpayne@68 10328 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4)) __PYX_ERR(1, 15, __pyx_L1_error);
jpayne@68 10329 __Pyx_GIVEREF(__pyx_t_1);
jpayne@68 10330 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error);
jpayne@68 10331 __pyx_t_4 = 0;
jpayne@68 10332 __pyx_t_1 = 0;
jpayne@68 10333 __pyx_r = __pyx_t_3;
jpayne@68 10334 __pyx_t_3 = 0;
jpayne@68 10335 goto __pyx_L0;
jpayne@68 10336 }
jpayne@68 10337
jpayne@68 10338 /* "(tree fragment)":1
jpayne@68 10339 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
jpayne@68 10340 * cdef tuple state
jpayne@68 10341 * cdef object _dict
jpayne@68 10342 */
jpayne@68 10343
jpayne@68 10344 /* function exit code */
jpayne@68 10345 __pyx_L1_error:;
jpayne@68 10346 __Pyx_XDECREF(__pyx_t_1);
jpayne@68 10347 __Pyx_XDECREF(__pyx_t_3);
jpayne@68 10348 __Pyx_XDECREF(__pyx_t_4);
jpayne@68 10349 __Pyx_AddTraceback("pysam.libctabix.asVCF.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@68 10350 __pyx_r = NULL;
jpayne@68 10351 __pyx_L0:;
jpayne@68 10352 __Pyx_XDECREF(__pyx_v_state);
jpayne@68 10353 __Pyx_XDECREF(__pyx_v__dict);
jpayne@68 10354 __Pyx_XGIVEREF(__pyx_r);
jpayne@68 10355 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@68 10356 __Pyx_RefNannyFinishContext();
jpayne@68 10357 return __pyx_r;
jpayne@68 10358 }
jpayne@68 10359
jpayne@68 10360 /* "(tree fragment)":16
jpayne@68 10361 * else:
jpayne@68 10362 * return __pyx_unpickle_asVCF, (type(self), 0xe8424ea, state)
jpayne@68 10363 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
jpayne@68 10364 * __pyx_unpickle_asVCF__set_state(self, __pyx_state)
jpayne@68 10365 */
jpayne@68 10366
jpayne@68 10367 /* Python wrapper */
jpayne@68 10368 static PyObject *__pyx_pw_5pysam_9libctabix_5asVCF_3__setstate_cython__(PyObject *__pyx_v_self,
jpayne@68 10369 #if CYTHON_METH_FASTCALL
jpayne@68 10370 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@68 10371 #else
jpayne@68 10372 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@68 10373 #endif
jpayne@68 10374 ); /*proto*/
jpayne@68 10375 PyDoc_STRVAR(__pyx_doc_5pysam_9libctabix_5asVCF_2__setstate_cython__, "asVCF.__setstate_cython__(self, __pyx_state)");
jpayne@68 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@68 10377 static PyObject *__pyx_pw_5pysam_9libctabix_5asVCF_3__setstate_cython__(PyObject *__pyx_v_self,
jpayne@68 10378 #if CYTHON_METH_FASTCALL
jpayne@68 10379 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@68 10380 #else
jpayne@68 10381 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@68 10382 #endif
jpayne@68 10383 ) {
jpayne@68 10384 PyObject *__pyx_v___pyx_state = 0;
jpayne@68 10385 #if !CYTHON_METH_FASTCALL
jpayne@68 10386 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
jpayne@68 10387 #endif
jpayne@68 10388 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@68 10389 PyObject* values[1] = {0};
jpayne@68 10390 int __pyx_lineno = 0;
jpayne@68 10391 const char *__pyx_filename = NULL;
jpayne@68 10392 int __pyx_clineno = 0;
jpayne@68 10393 PyObject *__pyx_r = 0;
jpayne@68 10394 __Pyx_RefNannyDeclarations
jpayne@68 10395 __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
jpayne@68 10396 #if !CYTHON_METH_FASTCALL
jpayne@68 10397 #if CYTHON_ASSUME_SAFE_MACROS
jpayne@68 10398 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
jpayne@68 10399 #else
jpayne@68 10400 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
jpayne@68 10401 #endif
jpayne@68 10402 #endif
jpayne@68 10403 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
jpayne@68 10404 {
jpayne@68 10405 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0};
jpayne@68 10406 if (__pyx_kwds) {
jpayne@68 10407 Py_ssize_t kw_args;
jpayne@68 10408 switch (__pyx_nargs) {
jpayne@68 10409 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
jpayne@68 10410 CYTHON_FALLTHROUGH;
jpayne@68 10411 case 0: break;
jpayne@68 10412 default: goto __pyx_L5_argtuple_error;
jpayne@68 10413 }
jpayne@68 10414 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
jpayne@68 10415 switch (__pyx_nargs) {
jpayne@68 10416 case 0:
jpayne@68 10417 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) {
jpayne@68 10418 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
jpayne@68 10419 kw_args--;
jpayne@68 10420 }
jpayne@68 10421 else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 16, __pyx_L3_error)
jpayne@68 10422 else goto __pyx_L5_argtuple_error;
jpayne@68 10423 }
jpayne@68 10424 if (unlikely(kw_args > 0)) {
jpayne@68 10425 const Py_ssize_t kwd_pos_args = __pyx_nargs;
jpayne@68 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@68 10427 }
jpayne@68 10428 } else if (unlikely(__pyx_nargs != 1)) {
jpayne@68 10429 goto __pyx_L5_argtuple_error;
jpayne@68 10430 } else {
jpayne@68 10431 values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
jpayne@68 10432 }
jpayne@68 10433 __pyx_v___pyx_state = values[0];
jpayne@68 10434 }
jpayne@68 10435 goto __pyx_L6_skip;
jpayne@68 10436 __pyx_L5_argtuple_error:;
jpayne@68 10437 __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 16, __pyx_L3_error)
jpayne@68 10438 __pyx_L6_skip:;
jpayne@68 10439 goto __pyx_L4_argument_unpacking_done;
jpayne@68 10440 __pyx_L3_error:;
jpayne@68 10441 {
jpayne@68 10442 Py_ssize_t __pyx_temp;
jpayne@68 10443 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
jpayne@68 10444 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
jpayne@68 10445 }
jpayne@68 10446 }
jpayne@68 10447 __Pyx_AddTraceback("pysam.libctabix.asVCF.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@68 10448 __Pyx_RefNannyFinishContext();
jpayne@68 10449 return NULL;
jpayne@68 10450 __pyx_L4_argument_unpacking_done:;
jpayne@68 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@68 10452
jpayne@68 10453 /* function exit code */
jpayne@68 10454 {
jpayne@68 10455 Py_ssize_t __pyx_temp;
jpayne@68 10456 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
jpayne@68 10457 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
jpayne@68 10458 }
jpayne@68 10459 }
jpayne@68 10460 __Pyx_RefNannyFinishContext();
jpayne@68 10461 return __pyx_r;
jpayne@68 10462 }
jpayne@68 10463
jpayne@68 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@68 10465 PyObject *__pyx_r = NULL;
jpayne@68 10466 __Pyx_TraceDeclarations
jpayne@68 10467 __Pyx_RefNannyDeclarations
jpayne@68 10468 PyObject *__pyx_t_1 = NULL;
jpayne@68 10469 int __pyx_lineno = 0;
jpayne@68 10470 const char *__pyx_filename = NULL;
jpayne@68 10471 int __pyx_clineno = 0;
jpayne@68 10472 __Pyx_TraceFrameInit(__pyx_codeobj__14)
jpayne@68 10473 __Pyx_RefNannySetupContext("__setstate_cython__", 1);
jpayne@68 10474 __Pyx_TraceCall("__setstate_cython__", __pyx_f[1], 16, 0, __PYX_ERR(1, 16, __pyx_L1_error));
jpayne@68 10475
jpayne@68 10476 /* "(tree fragment)":17
jpayne@68 10477 * return __pyx_unpickle_asVCF, (type(self), 0xe8424ea, state)
jpayne@68 10478 * def __setstate_cython__(self, __pyx_state):
jpayne@68 10479 * __pyx_unpickle_asVCF__set_state(self, __pyx_state) # <<<<<<<<<<<<<<
jpayne@68 10480 */
jpayne@68 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@68 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@68 10483 __Pyx_GOTREF(__pyx_t_1);
jpayne@68 10484 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@68 10485
jpayne@68 10486 /* "(tree fragment)":16
jpayne@68 10487 * else:
jpayne@68 10488 * return __pyx_unpickle_asVCF, (type(self), 0xe8424ea, state)
jpayne@68 10489 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
jpayne@68 10490 * __pyx_unpickle_asVCF__set_state(self, __pyx_state)
jpayne@68 10491 */
jpayne@68 10492
jpayne@68 10493 /* function exit code */
jpayne@68 10494 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
jpayne@68 10495 goto __pyx_L0;
jpayne@68 10496 __pyx_L1_error:;
jpayne@68 10497 __Pyx_XDECREF(__pyx_t_1);
jpayne@68 10498 __Pyx_AddTraceback("pysam.libctabix.asVCF.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@68 10499 __pyx_r = NULL;
jpayne@68 10500 __pyx_L0:;
jpayne@68 10501 __Pyx_XGIVEREF(__pyx_r);
jpayne@68 10502 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@68 10503 __Pyx_RefNannyFinishContext();
jpayne@68 10504 return __pyx_r;
jpayne@68 10505 }
jpayne@68 10506
jpayne@68 10507 /* "pysam/libctabix.pyx":334
jpayne@68 10508 * if file could not be opened
jpayne@68 10509 * """
jpayne@68 10510 * def __cinit__(self, # <<<<<<<<<<<<<<
jpayne@68 10511 * filename,
jpayne@68 10512 * mode='r',
jpayne@68 10513 */
jpayne@68 10514
jpayne@68 10515 /* Python wrapper */
jpayne@68 10516 static int __pyx_pw_5pysam_9libctabix_9TabixFile_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
jpayne@68 10517 static int __pyx_pw_5pysam_9libctabix_9TabixFile_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
jpayne@68 10518 PyObject *__pyx_v_filename = 0;
jpayne@68 10519 PyObject *__pyx_v_mode = 0;
jpayne@68 10520 PyObject *__pyx_v_parser = 0;
jpayne@68 10521 PyObject *__pyx_v_index = 0;
jpayne@68 10522 PyObject *__pyx_v_encoding = 0;
jpayne@68 10523 PyObject *__pyx_v_threads = 0;
jpayne@68 10524 PyObject *__pyx_v_args = 0;
jpayne@68 10525 PyObject *__pyx_v_kwargs = 0;
jpayne@68 10526 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
jpayne@68 10527 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@68 10528 PyObject* values[6] = {0,0,0,0,0,0};
jpayne@68 10529 int __pyx_lineno = 0;
jpayne@68 10530 const char *__pyx_filename = NULL;
jpayne@68 10531 int __pyx_clineno = 0;
jpayne@68 10532 int __pyx_r;
jpayne@68 10533 __Pyx_RefNannyDeclarations
jpayne@68 10534 __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
jpayne@68 10535 #if CYTHON_ASSUME_SAFE_MACROS
jpayne@68 10536 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
jpayne@68 10537 #else
jpayne@68 10538 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
jpayne@68 10539 #endif
jpayne@68 10540 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
jpayne@68 10541 __pyx_v_kwargs = PyDict_New(); if (unlikely(!__pyx_v_kwargs)) return -1;
jpayne@68 10542 __Pyx_GOTREF(__pyx_v_kwargs);
jpayne@68 10543 __pyx_v_args = __Pyx_ArgsSlice_VARARGS(__pyx_args, 6, __pyx_nargs);
jpayne@68 10544 if (unlikely(!__pyx_v_args)) {
jpayne@68 10545 __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
jpayne@68 10546 __Pyx_RefNannyFinishContext();
jpayne@68 10547 return -1;
jpayne@68 10548 }
jpayne@68 10549 __Pyx_GOTREF(__pyx_v_args);
jpayne@68 10550 {
jpayne@68 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@68 10552 values[1] = __Pyx_Arg_NewRef_VARARGS(((PyObject *)__pyx_n_u_r));
jpayne@68 10553
jpayne@68 10554 /* "pysam/libctabix.pyx":337
jpayne@68 10555 * filename,
jpayne@68 10556 * mode='r',
jpayne@68 10557 * parser=None, # <<<<<<<<<<<<<<
jpayne@68 10558 * index=None,
jpayne@68 10559 * encoding="ascii",
jpayne@68 10560 */
jpayne@68 10561 values[2] = __Pyx_Arg_NewRef_VARARGS(((PyObject *)Py_None));
jpayne@68 10562
jpayne@68 10563 /* "pysam/libctabix.pyx":338
jpayne@68 10564 * mode='r',
jpayne@68 10565 * parser=None,
jpayne@68 10566 * index=None, # <<<<<<<<<<<<<<
jpayne@68 10567 * encoding="ascii",
jpayne@68 10568 * threads=1,
jpayne@68 10569 */
jpayne@68 10570 values[3] = __Pyx_Arg_NewRef_VARARGS(((PyObject *)Py_None));
jpayne@68 10571 values[4] = __Pyx_Arg_NewRef_VARARGS(((PyObject *)__pyx_n_u_ascii));
jpayne@68 10572 values[5] = __Pyx_Arg_NewRef_VARARGS(((PyObject *)__pyx_int_1));
jpayne@68 10573 if (__pyx_kwds) {
jpayne@68 10574 Py_ssize_t kw_args;
jpayne@68 10575 switch (__pyx_nargs) {
jpayne@68 10576 default:
jpayne@68 10577 case 6: values[5] = __Pyx_Arg_VARARGS(__pyx_args, 5);
jpayne@68 10578 CYTHON_FALLTHROUGH;
jpayne@68 10579 case 5: values[4] = __Pyx_Arg_VARARGS(__pyx_args, 4);
jpayne@68 10580 CYTHON_FALLTHROUGH;
jpayne@68 10581 case 4: values[3] = __Pyx_Arg_VARARGS(__pyx_args, 3);
jpayne@68 10582 CYTHON_FALLTHROUGH;
jpayne@68 10583 case 3: values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2);
jpayne@68 10584 CYTHON_FALLTHROUGH;
jpayne@68 10585 case 2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
jpayne@68 10586 CYTHON_FALLTHROUGH;
jpayne@68 10587 case 1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
jpayne@68 10588 CYTHON_FALLTHROUGH;
jpayne@68 10589 case 0: break;
jpayne@68 10590 }
jpayne@68 10591 kw_args = __Pyx_NumKwargs_VARARGS(__pyx_kwds);
jpayne@68 10592 switch (__pyx_nargs) {
jpayne@68 10593 case 0:
jpayne@68 10594 if (likely((values[0] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_filename)) != 0)) {
jpayne@68 10595 (void)__Pyx_Arg_NewRef_VARARGS(values[0]);
jpayne@68 10596 kw_args--;
jpayne@68 10597 }
jpayne@68 10598 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 334, __pyx_L3_error)
jpayne@68 10599 else goto __pyx_L5_argtuple_error;
jpayne@68 10600 CYTHON_FALLTHROUGH;
jpayne@68 10601 case 1:
jpayne@68 10602 if (kw_args > 0) {
jpayne@68 10603 PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_mode);
jpayne@68 10604 if (value) { values[1] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; }
jpayne@68 10605 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 334, __pyx_L3_error)
jpayne@68 10606 }
jpayne@68 10607 CYTHON_FALLTHROUGH;
jpayne@68 10608 case 2:
jpayne@68 10609 if (kw_args > 0) {
jpayne@68 10610 PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_parser);
jpayne@68 10611 if (value) { values[2] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; }
jpayne@68 10612 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 334, __pyx_L3_error)
jpayne@68 10613 }
jpayne@68 10614 CYTHON_FALLTHROUGH;
jpayne@68 10615 case 3:
jpayne@68 10616 if (kw_args > 0) {
jpayne@68 10617 PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_index);
jpayne@68 10618 if (value) { values[3] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; }
jpayne@68 10619 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 334, __pyx_L3_error)
jpayne@68 10620 }
jpayne@68 10621 CYTHON_FALLTHROUGH;
jpayne@68 10622 case 4:
jpayne@68 10623 if (kw_args > 0) {
jpayne@68 10624 PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_encoding);
jpayne@68 10625 if (value) { values[4] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; }
jpayne@68 10626 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 334, __pyx_L3_error)
jpayne@68 10627 }
jpayne@68 10628 CYTHON_FALLTHROUGH;
jpayne@68 10629 case 5:
jpayne@68 10630 if (kw_args > 0) {
jpayne@68 10631 PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_threads);
jpayne@68 10632 if (value) { values[5] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; }
jpayne@68 10633 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 334, __pyx_L3_error)
jpayne@68 10634 }
jpayne@68 10635 }
jpayne@68 10636 if (unlikely(kw_args > 0)) {
jpayne@68 10637 const Py_ssize_t kwd_pos_args = __pyx_nargs;
jpayne@68 10638 const Py_ssize_t used_pos_args = (kwd_pos_args < 6) ? kwd_pos_args : 6;
jpayne@68 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@68 10640 }
jpayne@68 10641 } else {
jpayne@68 10642 switch (__pyx_nargs) {
jpayne@68 10643 default:
jpayne@68 10644 case 6: values[5] = __Pyx_Arg_VARARGS(__pyx_args, 5);
jpayne@68 10645 CYTHON_FALLTHROUGH;
jpayne@68 10646 case 5: values[4] = __Pyx_Arg_VARARGS(__pyx_args, 4);
jpayne@68 10647 CYTHON_FALLTHROUGH;
jpayne@68 10648 case 4: values[3] = __Pyx_Arg_VARARGS(__pyx_args, 3);
jpayne@68 10649 CYTHON_FALLTHROUGH;
jpayne@68 10650 case 3: values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2);
jpayne@68 10651 CYTHON_FALLTHROUGH;
jpayne@68 10652 case 2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
jpayne@68 10653 CYTHON_FALLTHROUGH;
jpayne@68 10654 case 1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
jpayne@68 10655 break;
jpayne@68 10656 case 0:
jpayne@68 10657 goto __pyx_L5_argtuple_error;
jpayne@68 10658 }
jpayne@68 10659 }
jpayne@68 10660 __pyx_v_filename = values[0];
jpayne@68 10661 __pyx_v_mode = values[1];
jpayne@68 10662 __pyx_v_parser = values[2];
jpayne@68 10663 __pyx_v_index = values[3];
jpayne@68 10664 __pyx_v_encoding = values[4];
jpayne@68 10665 __pyx_v_threads = values[5];
jpayne@68 10666 }
jpayne@68 10667 goto __pyx_L6_skip;
jpayne@68 10668 __pyx_L5_argtuple_error:;
jpayne@68 10669 __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 1, 6, __pyx_nargs); __PYX_ERR(0, 334, __pyx_L3_error)
jpayne@68 10670 __pyx_L6_skip:;
jpayne@68 10671 goto __pyx_L4_argument_unpacking_done;
jpayne@68 10672 __pyx_L3_error:;
jpayne@68 10673 {
jpayne@68 10674 Py_ssize_t __pyx_temp;
jpayne@68 10675 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
jpayne@68 10676 __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]);
jpayne@68 10677 }
jpayne@68 10678 }
jpayne@68 10679 __Pyx_DECREF(__pyx_v_args); __pyx_v_args = 0;
jpayne@68 10680 __Pyx_DECREF(__pyx_v_kwargs); __pyx_v_kwargs = 0;
jpayne@68 10681 __Pyx_AddTraceback("pysam.libctabix.TabixFile.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@68 10682 __Pyx_RefNannyFinishContext();
jpayne@68 10683 return -1;
jpayne@68 10684 __pyx_L4_argument_unpacking_done:;
jpayne@68 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@68 10686
jpayne@68 10687 /* "pysam/libctabix.pyx":334
jpayne@68 10688 * if file could not be opened
jpayne@68 10689 * """
jpayne@68 10690 * def __cinit__(self, # <<<<<<<<<<<<<<
jpayne@68 10691 * filename,
jpayne@68 10692 * mode='r',
jpayne@68 10693 */
jpayne@68 10694
jpayne@68 10695 /* function exit code */
jpayne@68 10696 __Pyx_DECREF(__pyx_v_args);
jpayne@68 10697 __Pyx_DECREF(__pyx_v_kwargs);
jpayne@68 10698 {
jpayne@68 10699 Py_ssize_t __pyx_temp;
jpayne@68 10700 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
jpayne@68 10701 __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]);
jpayne@68 10702 }
jpayne@68 10703 }
jpayne@68 10704 __Pyx_RefNannyFinishContext();
jpayne@68 10705 return __pyx_r;
jpayne@68 10706 }
jpayne@68 10707
jpayne@68 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@68 10709 int __pyx_r;
jpayne@68 10710 __Pyx_TraceDeclarations
jpayne@68 10711 __Pyx_RefNannyDeclarations
jpayne@68 10712 PyObject *__pyx_t_1 = NULL;
jpayne@68 10713 PyObject *__pyx_t_2 = NULL;
jpayne@68 10714 PyObject *__pyx_t_3 = NULL;
jpayne@68 10715 PyObject *__pyx_t_4 = NULL;
jpayne@68 10716 int __pyx_lineno = 0;
jpayne@68 10717 const char *__pyx_filename = NULL;
jpayne@68 10718 int __pyx_clineno = 0;
jpayne@68 10719 __Pyx_RefNannySetupContext("__cinit__", 1);
jpayne@68 10720 __Pyx_TraceCall("__cinit__", __pyx_f[0], 334, 0, __PYX_ERR(0, 334, __pyx_L1_error));
jpayne@68 10721
jpayne@68 10722 /* "pysam/libctabix.pyx":344
jpayne@68 10723 * **kwargs ):
jpayne@68 10724 *
jpayne@68 10725 * self.htsfile = NULL # <<<<<<<<<<<<<<
jpayne@68 10726 * self.is_remote = False
jpayne@68 10727 * self.is_stream = False
jpayne@68 10728 */
jpayne@68 10729 __pyx_v_self->__pyx_base.htsfile = NULL;
jpayne@68 10730
jpayne@68 10731 /* "pysam/libctabix.pyx":345
jpayne@68 10732 *
jpayne@68 10733 * self.htsfile = NULL
jpayne@68 10734 * self.is_remote = False # <<<<<<<<<<<<<<
jpayne@68 10735 * self.is_stream = False
jpayne@68 10736 * self.parser = parser
jpayne@68 10737 */
jpayne@68 10738 __pyx_v_self->__pyx_base.is_remote = 0;
jpayne@68 10739
jpayne@68 10740 /* "pysam/libctabix.pyx":346
jpayne@68 10741 * self.htsfile = NULL
jpayne@68 10742 * self.is_remote = False
jpayne@68 10743 * self.is_stream = False # <<<<<<<<<<<<<<
jpayne@68 10744 * self.parser = parser
jpayne@68 10745 * self.threads = threads
jpayne@68 10746 */
jpayne@68 10747 __pyx_v_self->__pyx_base.is_stream = 0;
jpayne@68 10748
jpayne@68 10749 /* "pysam/libctabix.pyx":347
jpayne@68 10750 * self.is_remote = False
jpayne@68 10751 * self.is_stream = False
jpayne@68 10752 * self.parser = parser # <<<<<<<<<<<<<<
jpayne@68 10753 * self.threads = threads
jpayne@68 10754 * self._open(filename, mode, index, *args, **kwargs)
jpayne@68 10755 */
jpayne@68 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@68 10757 __pyx_t_1 = __pyx_v_parser;
jpayne@68 10758 __Pyx_INCREF(__pyx_t_1);
jpayne@68 10759 __Pyx_GIVEREF(__pyx_t_1);
jpayne@68 10760 __Pyx_GOTREF((PyObject *)__pyx_v_self->parser);
jpayne@68 10761 __Pyx_DECREF((PyObject *)__pyx_v_self->parser);
jpayne@68 10762 __pyx_v_self->parser = ((struct __pyx_obj_5pysam_9libctabix_Parser *)__pyx_t_1);
jpayne@68 10763 __pyx_t_1 = 0;
jpayne@68 10764
jpayne@68 10765 /* "pysam/libctabix.pyx":348
jpayne@68 10766 * self.is_stream = False
jpayne@68 10767 * self.parser = parser
jpayne@68 10768 * self.threads = threads # <<<<<<<<<<<<<<
jpayne@68 10769 * self._open(filename, mode, index, *args, **kwargs)
jpayne@68 10770 * self.encoding = encoding
jpayne@68 10771 */
jpayne@68 10772 __Pyx_INCREF(__pyx_v_threads);
jpayne@68 10773 __Pyx_GIVEREF(__pyx_v_threads);
jpayne@68 10774 __Pyx_GOTREF(__pyx_v_self->__pyx_base.threads);
jpayne@68 10775 __Pyx_DECREF(__pyx_v_self->__pyx_base.threads);
jpayne@68 10776 __pyx_v_self->__pyx_base.threads = __pyx_v_threads;
jpayne@68 10777
jpayne@68 10778 /* "pysam/libctabix.pyx":349
jpayne@68 10779 * self.parser = parser
jpayne@68 10780 * self.threads = threads
jpayne@68 10781 * self._open(filename, mode, index, *args, **kwargs) # <<<<<<<<<<<<<<
jpayne@68 10782 * self.encoding = encoding
jpayne@68 10783 *
jpayne@68 10784 */
jpayne@68 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@68 10786 __Pyx_GOTREF(__pyx_t_1);
jpayne@68 10787 __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 349, __pyx_L1_error)
jpayne@68 10788 __Pyx_GOTREF(__pyx_t_2);
jpayne@68 10789 __Pyx_INCREF(__pyx_v_filename);
jpayne@68 10790 __Pyx_GIVEREF(__pyx_v_filename);
jpayne@68 10791 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_filename)) __PYX_ERR(0, 349, __pyx_L1_error);
jpayne@68 10792 __Pyx_INCREF(__pyx_v_mode);
jpayne@68 10793 __Pyx_GIVEREF(__pyx_v_mode);
jpayne@68 10794 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_mode)) __PYX_ERR(0, 349, __pyx_L1_error);
jpayne@68 10795 __Pyx_INCREF(__pyx_v_index);
jpayne@68 10796 __Pyx_GIVEREF(__pyx_v_index);
jpayne@68 10797 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_index)) __PYX_ERR(0, 349, __pyx_L1_error);
jpayne@68 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@68 10799 __Pyx_GOTREF(__pyx_t_3);
jpayne@68 10800 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@68 10801 __pyx_t_2 = PyDict_Copy(__pyx_v_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 349, __pyx_L1_error)
jpayne@68 10802 __Pyx_GOTREF(__pyx_t_2);
jpayne@68 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@68 10804 __Pyx_GOTREF(__pyx_t_4);
jpayne@68 10805 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@68 10806 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
jpayne@68 10807 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@68 10808 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
jpayne@68 10809
jpayne@68 10810 /* "pysam/libctabix.pyx":350
jpayne@68 10811 * self.threads = threads
jpayne@68 10812 * self._open(filename, mode, index, *args, **kwargs)
jpayne@68 10813 * self.encoding = encoding # <<<<<<<<<<<<<<
jpayne@68 10814 *
jpayne@68 10815 * def _open( self,
jpayne@68 10816 */
jpayne@68 10817 __Pyx_INCREF(__pyx_v_encoding);
jpayne@68 10818 __Pyx_GIVEREF(__pyx_v_encoding);
jpayne@68 10819 __Pyx_GOTREF(__pyx_v_self->encoding);
jpayne@68 10820 __Pyx_DECREF(__pyx_v_self->encoding);
jpayne@68 10821 __pyx_v_self->encoding = __pyx_v_encoding;
jpayne@68 10822
jpayne@68 10823 /* "pysam/libctabix.pyx":334
jpayne@68 10824 * if file could not be opened
jpayne@68 10825 * """
jpayne@68 10826 * def __cinit__(self, # <<<<<<<<<<<<<<
jpayne@68 10827 * filename,
jpayne@68 10828 * mode='r',
jpayne@68 10829 */
jpayne@68 10830
jpayne@68 10831 /* function exit code */
jpayne@68 10832 __pyx_r = 0;
jpayne@68 10833 goto __pyx_L0;
jpayne@68 10834 __pyx_L1_error:;
jpayne@68 10835 __Pyx_XDECREF(__pyx_t_1);
jpayne@68 10836 __Pyx_XDECREF(__pyx_t_2);
jpayne@68 10837 __Pyx_XDECREF(__pyx_t_3);
jpayne@68 10838 __Pyx_XDECREF(__pyx_t_4);
jpayne@68 10839 __Pyx_AddTraceback("pysam.libctabix.TabixFile.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@68 10840 __pyx_r = -1;
jpayne@68 10841 __pyx_L0:;
jpayne@68 10842 __Pyx_TraceReturn(Py_None, 0);
jpayne@68 10843 __Pyx_RefNannyFinishContext();
jpayne@68 10844 return __pyx_r;
jpayne@68 10845 }
jpayne@68 10846
jpayne@68 10847 /* "pysam/libctabix.pyx":352
jpayne@68 10848 * self.encoding = encoding
jpayne@68 10849 *
jpayne@68 10850 * def _open( self, # <<<<<<<<<<<<<<
jpayne@68 10851 * filename,
jpayne@68 10852 * mode='r',
jpayne@68 10853 */
jpayne@68 10854
jpayne@68 10855 /* Python wrapper */
jpayne@68 10856 static PyObject *__pyx_pw_5pysam_9libctabix_9TabixFile_3_open(PyObject *__pyx_v_self,
jpayne@68 10857 #if CYTHON_METH_FASTCALL
jpayne@68 10858 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@68 10859 #else
jpayne@68 10860 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@68 10861 #endif
jpayne@68 10862 ); /*proto*/
jpayne@68 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@68 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@68 10865 static PyObject *__pyx_pw_5pysam_9libctabix_9TabixFile_3_open(PyObject *__pyx_v_self,
jpayne@68 10866 #if CYTHON_METH_FASTCALL
jpayne@68 10867 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@68 10868 #else
jpayne@68 10869 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@68 10870 #endif
jpayne@68 10871 ) {
jpayne@68 10872 PyObject *__pyx_v_filename = 0;
jpayne@68 10873 PyObject *__pyx_v_mode = 0;
jpayne@68 10874 PyObject *__pyx_v_index = 0;
jpayne@68 10875 PyObject *__pyx_v_threads = 0;
jpayne@68 10876 #if !CYTHON_METH_FASTCALL
jpayne@68 10877 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
jpayne@68 10878 #endif
jpayne@68 10879 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@68 10880 PyObject* values[4] = {0,0,0,0};
jpayne@68 10881 int __pyx_lineno = 0;
jpayne@68 10882 const char *__pyx_filename = NULL;
jpayne@68 10883 int __pyx_clineno = 0;
jpayne@68 10884 PyObject *__pyx_r = 0;
jpayne@68 10885 __Pyx_RefNannyDeclarations
jpayne@68 10886 __Pyx_RefNannySetupContext("_open (wrapper)", 0);
jpayne@68 10887 #if !CYTHON_METH_FASTCALL
jpayne@68 10888 #if CYTHON_ASSUME_SAFE_MACROS
jpayne@68 10889 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
jpayne@68 10890 #else
jpayne@68 10891 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
jpayne@68 10892 #endif
jpayne@68 10893 #endif
jpayne@68 10894 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
jpayne@68 10895 {
jpayne@68 10896 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_filename,&__pyx_n_s_mode,&__pyx_n_s_index,&__pyx_n_s_threads,0};
jpayne@68 10897 values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)__pyx_n_u_r));
jpayne@68 10898
jpayne@68 10899 /* "pysam/libctabix.pyx":355
jpayne@68 10900 * filename,
jpayne@68 10901 * mode='r',
jpayne@68 10902 * index=None, # <<<<<<<<<<<<<<
jpayne@68 10903 * threads=1,
jpayne@68 10904 * ):
jpayne@68 10905 */
jpayne@68 10906 values[2] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
jpayne@68 10907 values[3] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)__pyx_int_1));
jpayne@68 10908 if (__pyx_kwds) {
jpayne@68 10909 Py_ssize_t kw_args;
jpayne@68 10910 switch (__pyx_nargs) {
jpayne@68 10911 case 4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
jpayne@68 10912 CYTHON_FALLTHROUGH;
jpayne@68 10913 case 3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
jpayne@68 10914 CYTHON_FALLTHROUGH;
jpayne@68 10915 case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
jpayne@68 10916 CYTHON_FALLTHROUGH;
jpayne@68 10917 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
jpayne@68 10918 CYTHON_FALLTHROUGH;
jpayne@68 10919 case 0: break;
jpayne@68 10920 default: goto __pyx_L5_argtuple_error;
jpayne@68 10921 }
jpayne@68 10922 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
jpayne@68 10923 switch (__pyx_nargs) {
jpayne@68 10924 case 0:
jpayne@68 10925 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_filename)) != 0)) {
jpayne@68 10926 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
jpayne@68 10927 kw_args--;
jpayne@68 10928 }
jpayne@68 10929 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 352, __pyx_L3_error)
jpayne@68 10930 else goto __pyx_L5_argtuple_error;
jpayne@68 10931 CYTHON_FALLTHROUGH;
jpayne@68 10932 case 1:
jpayne@68 10933 if (kw_args > 0) {
jpayne@68 10934 PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_mode);
jpayne@68 10935 if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
jpayne@68 10936 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 352, __pyx_L3_error)
jpayne@68 10937 }
jpayne@68 10938 CYTHON_FALLTHROUGH;
jpayne@68 10939 case 2:
jpayne@68 10940 if (kw_args > 0) {
jpayne@68 10941 PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_index);
jpayne@68 10942 if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
jpayne@68 10943 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 352, __pyx_L3_error)
jpayne@68 10944 }
jpayne@68 10945 CYTHON_FALLTHROUGH;
jpayne@68 10946 case 3:
jpayne@68 10947 if (kw_args > 0) {
jpayne@68 10948 PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_threads);
jpayne@68 10949 if (value) { values[3] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
jpayne@68 10950 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 352, __pyx_L3_error)
jpayne@68 10951 }
jpayne@68 10952 }
jpayne@68 10953 if (unlikely(kw_args > 0)) {
jpayne@68 10954 const Py_ssize_t kwd_pos_args = __pyx_nargs;
jpayne@68 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@68 10956 }
jpayne@68 10957 } else {
jpayne@68 10958 switch (__pyx_nargs) {
jpayne@68 10959 case 4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
jpayne@68 10960 CYTHON_FALLTHROUGH;
jpayne@68 10961 case 3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
jpayne@68 10962 CYTHON_FALLTHROUGH;
jpayne@68 10963 case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
jpayne@68 10964 CYTHON_FALLTHROUGH;
jpayne@68 10965 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
jpayne@68 10966 break;
jpayne@68 10967 default: goto __pyx_L5_argtuple_error;
jpayne@68 10968 }
jpayne@68 10969 }
jpayne@68 10970 __pyx_v_filename = values[0];
jpayne@68 10971 __pyx_v_mode = values[1];
jpayne@68 10972 __pyx_v_index = values[2];
jpayne@68 10973 __pyx_v_threads = values[3];
jpayne@68 10974 }
jpayne@68 10975 goto __pyx_L6_skip;
jpayne@68 10976 __pyx_L5_argtuple_error:;
jpayne@68 10977 __Pyx_RaiseArgtupleInvalid("_open", 0, 1, 4, __pyx_nargs); __PYX_ERR(0, 352, __pyx_L3_error)
jpayne@68 10978 __pyx_L6_skip:;
jpayne@68 10979 goto __pyx_L4_argument_unpacking_done;
jpayne@68 10980 __pyx_L3_error:;
jpayne@68 10981 {
jpayne@68 10982 Py_ssize_t __pyx_temp;
jpayne@68 10983 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
jpayne@68 10984 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
jpayne@68 10985 }
jpayne@68 10986 }
jpayne@68 10987 __Pyx_AddTraceback("pysam.libctabix.TabixFile._open", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@68 10988 __Pyx_RefNannyFinishContext();
jpayne@68 10989 return NULL;
jpayne@68 10990 __pyx_L4_argument_unpacking_done:;
jpayne@68 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@68 10992
jpayne@68 10993 /* "pysam/libctabix.pyx":352
jpayne@68 10994 * self.encoding = encoding
jpayne@68 10995 *
jpayne@68 10996 * def _open( self, # <<<<<<<<<<<<<<
jpayne@68 10997 * filename,
jpayne@68 10998 * mode='r',
jpayne@68 10999 */
jpayne@68 11000
jpayne@68 11001 /* function exit code */
jpayne@68 11002 {
jpayne@68 11003 Py_ssize_t __pyx_temp;
jpayne@68 11004 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
jpayne@68 11005 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
jpayne@68 11006 }
jpayne@68 11007 }
jpayne@68 11008 __Pyx_RefNannyFinishContext();
jpayne@68 11009 return __pyx_r;
jpayne@68 11010 }
jpayne@68 11011
jpayne@68 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@68 11013 PyObject *__pyx_v_filename_index = NULL;
jpayne@68 11014 char *__pyx_v_cfilename;
jpayne@68 11015 char *__pyx_v_cfilename_index;
jpayne@68 11016 PyObject *__pyx_r = NULL;
jpayne@68 11017 __Pyx_TraceDeclarations
jpayne@68 11018 __Pyx_RefNannyDeclarations
jpayne@68 11019 int __pyx_t_1;
jpayne@68 11020 PyObject *__pyx_t_2 = NULL;
jpayne@68 11021 PyObject *__pyx_t_3 = NULL;
jpayne@68 11022 PyObject *__pyx_t_4 = NULL;
jpayne@68 11023 unsigned int __pyx_t_5;
jpayne@68 11024 char const *__pyx_t_6;
jpayne@68 11025 int __pyx_t_7;
jpayne@68 11026 char *__pyx_t_8;
jpayne@68 11027 int64_t __pyx_t_9;
jpayne@68 11028 int __pyx_lineno = 0;
jpayne@68 11029 const char *__pyx_filename = NULL;
jpayne@68 11030 int __pyx_clineno = 0;
jpayne@68 11031 __Pyx_TraceFrameInit(__pyx_codeobj__15)
jpayne@68 11032 __Pyx_RefNannySetupContext("_open", 1);
jpayne@68 11033 __Pyx_TraceCall("_open", __pyx_f[0], 352, 0, __PYX_ERR(0, 352, __pyx_L1_error));
jpayne@68 11034
jpayne@68 11035 /* "pysam/libctabix.pyx":360
jpayne@68 11036 * '''open a :term:`tabix file` for reading.'''
jpayne@68 11037 *
jpayne@68 11038 * if mode != 'r': # <<<<<<<<<<<<<<
jpayne@68 11039 * raise ValueError("invalid file opening mode `%s`" % mode)
jpayne@68 11040 *
jpayne@68 11041 */
jpayne@68 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@68 11043 if (unlikely(__pyx_t_1)) {
jpayne@68 11044
jpayne@68 11045 /* "pysam/libctabix.pyx":361
jpayne@68 11046 *
jpayne@68 11047 * if mode != 'r':
jpayne@68 11048 * raise ValueError("invalid file opening mode `%s`" % mode) # <<<<<<<<<<<<<<
jpayne@68 11049 *
jpayne@68 11050 * if self.htsfile != NULL:
jpayne@68 11051 */
jpayne@68 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@68 11053 __Pyx_GOTREF(__pyx_t_2);
jpayne@68 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@68 11055 __Pyx_GOTREF(__pyx_t_3);
jpayne@68 11056 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@68 11057 __Pyx_Raise(__pyx_t_3, 0, 0, 0);
jpayne@68 11058 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
jpayne@68 11059 __PYX_ERR(0, 361, __pyx_L1_error)
jpayne@68 11060
jpayne@68 11061 /* "pysam/libctabix.pyx":360
jpayne@68 11062 * '''open a :term:`tabix file` for reading.'''
jpayne@68 11063 *
jpayne@68 11064 * if mode != 'r': # <<<<<<<<<<<<<<
jpayne@68 11065 * raise ValueError("invalid file opening mode `%s`" % mode)
jpayne@68 11066 *
jpayne@68 11067 */
jpayne@68 11068 }
jpayne@68 11069
jpayne@68 11070 /* "pysam/libctabix.pyx":363
jpayne@68 11071 * raise ValueError("invalid file opening mode `%s`" % mode)
jpayne@68 11072 *
jpayne@68 11073 * if self.htsfile != NULL: # <<<<<<<<<<<<<<
jpayne@68 11074 * self.close()
jpayne@68 11075 * self.htsfile = NULL
jpayne@68 11076 */
jpayne@68 11077 __pyx_t_1 = (__pyx_v_self->__pyx_base.htsfile != NULL);
jpayne@68 11078 if (__pyx_t_1) {
jpayne@68 11079
jpayne@68 11080 /* "pysam/libctabix.pyx":364
jpayne@68 11081 *
jpayne@68 11082 * if self.htsfile != NULL:
jpayne@68 11083 * self.close() # <<<<<<<<<<<<<<
jpayne@68 11084 * self.htsfile = NULL
jpayne@68 11085 * self.threads=threads
jpayne@68 11086 */
jpayne@68 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@68 11088 __Pyx_GOTREF(__pyx_t_2);
jpayne@68 11089 __pyx_t_4 = NULL;
jpayne@68 11090 __pyx_t_5 = 0;
jpayne@68 11091 #if CYTHON_UNPACK_METHODS
jpayne@68 11092 if (likely(PyMethod_Check(__pyx_t_2))) {
jpayne@68 11093 __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
jpayne@68 11094 if (likely(__pyx_t_4)) {
jpayne@68 11095 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
jpayne@68 11096 __Pyx_INCREF(__pyx_t_4);
jpayne@68 11097 __Pyx_INCREF(function);
jpayne@68 11098 __Pyx_DECREF_SET(__pyx_t_2, function);
jpayne@68 11099 __pyx_t_5 = 1;
jpayne@68 11100 }
jpayne@68 11101 }
jpayne@68 11102 #endif
jpayne@68 11103 {
jpayne@68 11104 PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
jpayne@68 11105 __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);
jpayne@68 11106 __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
jpayne@68 11107 if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 364, __pyx_L1_error)
jpayne@68 11108 __Pyx_GOTREF(__pyx_t_3);
jpayne@68 11109 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@68 11110 }
jpayne@68 11111 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
jpayne@68 11112
jpayne@68 11113 /* "pysam/libctabix.pyx":363
jpayne@68 11114 * raise ValueError("invalid file opening mode `%s`" % mode)
jpayne@68 11115 *
jpayne@68 11116 * if self.htsfile != NULL: # <<<<<<<<<<<<<<
jpayne@68 11117 * self.close()
jpayne@68 11118 * self.htsfile = NULL
jpayne@68 11119 */
jpayne@68 11120 }
jpayne@68 11121
jpayne@68 11122 /* "pysam/libctabix.pyx":365
jpayne@68 11123 * if self.htsfile != NULL:
jpayne@68 11124 * self.close()
jpayne@68 11125 * self.htsfile = NULL # <<<<<<<<<<<<<<
jpayne@68 11126 * self.threads=threads
jpayne@68 11127 *
jpayne@68 11128 */
jpayne@68 11129 __pyx_v_self->__pyx_base.htsfile = NULL;
jpayne@68 11130
jpayne@68 11131 /* "pysam/libctabix.pyx":366
jpayne@68 11132 * self.close()
jpayne@68 11133 * self.htsfile = NULL
jpayne@68 11134 * self.threads=threads # <<<<<<<<<<<<<<
jpayne@68 11135 *
jpayne@68 11136 * filename_index = index or (filename + ".tbi")
jpayne@68 11137 */
jpayne@68 11138 __Pyx_INCREF(__pyx_v_threads);
jpayne@68 11139 __Pyx_GIVEREF(__pyx_v_threads);
jpayne@68 11140 __Pyx_GOTREF(__pyx_v_self->__pyx_base.threads);
jpayne@68 11141 __Pyx_DECREF(__pyx_v_self->__pyx_base.threads);
jpayne@68 11142 __pyx_v_self->__pyx_base.threads = __pyx_v_threads;
jpayne@68 11143
jpayne@68 11144 /* "pysam/libctabix.pyx":368
jpayne@68 11145 * self.threads=threads
jpayne@68 11146 *
jpayne@68 11147 * filename_index = index or (filename + ".tbi") # <<<<<<<<<<<<<<
jpayne@68 11148 * # encode all the strings to pass to tabix
jpayne@68 11149 * self.filename = encode_filename(filename)
jpayne@68 11150 */
jpayne@68 11151 __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_index); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 368, __pyx_L1_error)
jpayne@68 11152 if (!__pyx_t_1) {
jpayne@68 11153 } else {
jpayne@68 11154 __Pyx_INCREF(__pyx_v_index);
jpayne@68 11155 __pyx_t_3 = __pyx_v_index;
jpayne@68 11156 goto __pyx_L5_bool_binop_done;
jpayne@68 11157 }
jpayne@68 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@68 11159 __Pyx_GOTREF(__pyx_t_2);
jpayne@68 11160 __Pyx_INCREF(__pyx_t_2);
jpayne@68 11161 __pyx_t_3 = __pyx_t_2;
jpayne@68 11162 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@68 11163 __pyx_L5_bool_binop_done:;
jpayne@68 11164 __pyx_v_filename_index = __pyx_t_3;
jpayne@68 11165 __pyx_t_3 = 0;
jpayne@68 11166
jpayne@68 11167 /* "pysam/libctabix.pyx":370
jpayne@68 11168 * filename_index = index or (filename + ".tbi")
jpayne@68 11169 * # encode all the strings to pass to tabix
jpayne@68 11170 * self.filename = encode_filename(filename) # <<<<<<<<<<<<<<
jpayne@68 11171 * self.filename_index = encode_filename(filename_index)
jpayne@68 11172 *
jpayne@68 11173 */
jpayne@68 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@68 11175 __Pyx_GOTREF(__pyx_t_3);
jpayne@68 11176 __Pyx_GIVEREF(__pyx_t_3);
jpayne@68 11177 __Pyx_GOTREF(__pyx_v_self->__pyx_base.filename);
jpayne@68 11178 __Pyx_DECREF(__pyx_v_self->__pyx_base.filename);
jpayne@68 11179 __pyx_v_self->__pyx_base.filename = __pyx_t_3;
jpayne@68 11180 __pyx_t_3 = 0;
jpayne@68 11181
jpayne@68 11182 /* "pysam/libctabix.pyx":371
jpayne@68 11183 * # encode all the strings to pass to tabix
jpayne@68 11184 * self.filename = encode_filename(filename)
jpayne@68 11185 * self.filename_index = encode_filename(filename_index) # <<<<<<<<<<<<<<
jpayne@68 11186 *
jpayne@68 11187 * self.is_stream = self.filename == b'-'
jpayne@68 11188 */
jpayne@68 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@68 11190 __Pyx_GOTREF(__pyx_t_3);
jpayne@68 11191 __Pyx_GIVEREF(__pyx_t_3);
jpayne@68 11192 __Pyx_GOTREF(__pyx_v_self->filename_index);
jpayne@68 11193 __Pyx_DECREF(__pyx_v_self->filename_index);
jpayne@68 11194 __pyx_v_self->filename_index = __pyx_t_3;
jpayne@68 11195 __pyx_t_3 = 0;
jpayne@68 11196
jpayne@68 11197 /* "pysam/libctabix.pyx":373
jpayne@68 11198 * self.filename_index = encode_filename(filename_index)
jpayne@68 11199 *
jpayne@68 11200 * self.is_stream = self.filename == b'-' # <<<<<<<<<<<<<<
jpayne@68 11201 * self.is_remote = hisremote(self.filename)
jpayne@68 11202 *
jpayne@68 11203 */
jpayne@68 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@68 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@68 11206 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
jpayne@68 11207 __pyx_v_self->__pyx_base.is_stream = __pyx_t_1;
jpayne@68 11208
jpayne@68 11209 /* "pysam/libctabix.pyx":374
jpayne@68 11210 *
jpayne@68 11211 * self.is_stream = self.filename == b'-'
jpayne@68 11212 * self.is_remote = hisremote(self.filename) # <<<<<<<<<<<<<<
jpayne@68 11213 *
jpayne@68 11214 * if not self.is_remote:
jpayne@68 11215 */
jpayne@68 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@68 11217 __pyx_v_self->__pyx_base.is_remote = hisremote(__pyx_t_6);
jpayne@68 11218
jpayne@68 11219 /* "pysam/libctabix.pyx":376
jpayne@68 11220 * self.is_remote = hisremote(self.filename)
jpayne@68 11221 *
jpayne@68 11222 * if not self.is_remote: # <<<<<<<<<<<<<<
jpayne@68 11223 * if not os.path.exists(filename):
jpayne@68 11224 * raise IOError("file `%s` not found" % filename)
jpayne@68 11225 */
jpayne@68 11226 __pyx_t_1 = (!__pyx_v_self->__pyx_base.is_remote);
jpayne@68 11227 if (__pyx_t_1) {
jpayne@68 11228
jpayne@68 11229 /* "pysam/libctabix.pyx":377
jpayne@68 11230 *
jpayne@68 11231 * if not self.is_remote:
jpayne@68 11232 * if not os.path.exists(filename): # <<<<<<<<<<<<<<
jpayne@68 11233 * raise IOError("file `%s` not found" % filename)
jpayne@68 11234 *
jpayne@68 11235 */
jpayne@68 11236 __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_os); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 377, __pyx_L1_error)
jpayne@68 11237 __Pyx_GOTREF(__pyx_t_2);
jpayne@68 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@68 11239 __Pyx_GOTREF(__pyx_t_4);
jpayne@68 11240 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@68 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@68 11242 __Pyx_GOTREF(__pyx_t_2);
jpayne@68 11243 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
jpayne@68 11244 __pyx_t_4 = NULL;
jpayne@68 11245 __pyx_t_5 = 0;
jpayne@68 11246 #if CYTHON_UNPACK_METHODS
jpayne@68 11247 if (likely(PyMethod_Check(__pyx_t_2))) {
jpayne@68 11248 __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
jpayne@68 11249 if (likely(__pyx_t_4)) {
jpayne@68 11250 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
jpayne@68 11251 __Pyx_INCREF(__pyx_t_4);
jpayne@68 11252 __Pyx_INCREF(function);
jpayne@68 11253 __Pyx_DECREF_SET(__pyx_t_2, function);
jpayne@68 11254 __pyx_t_5 = 1;
jpayne@68 11255 }
jpayne@68 11256 }
jpayne@68 11257 #endif
jpayne@68 11258 {
jpayne@68 11259 PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_filename};
jpayne@68 11260 __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
jpayne@68 11261 __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
jpayne@68 11262 if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 377, __pyx_L1_error)
jpayne@68 11263 __Pyx_GOTREF(__pyx_t_3);
jpayne@68 11264 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@68 11265 }
jpayne@68 11266 __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 377, __pyx_L1_error)
jpayne@68 11267 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
jpayne@68 11268 __pyx_t_7 = (!__pyx_t_1);
jpayne@68 11269 if (unlikely(__pyx_t_7)) {
jpayne@68 11270
jpayne@68 11271 /* "pysam/libctabix.pyx":378
jpayne@68 11272 * if not self.is_remote:
jpayne@68 11273 * if not os.path.exists(filename):
jpayne@68 11274 * raise IOError("file `%s` not found" % filename) # <<<<<<<<<<<<<<
jpayne@68 11275 *
jpayne@68 11276 * if not os.path.exists(filename_index):
jpayne@68 11277 */
jpayne@68 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@68 11279 __Pyx_GOTREF(__pyx_t_3);
jpayne@68 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@68 11281 __Pyx_GOTREF(__pyx_t_2);
jpayne@68 11282 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
jpayne@68 11283 __Pyx_Raise(__pyx_t_2, 0, 0, 0);
jpayne@68 11284 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@68 11285 __PYX_ERR(0, 378, __pyx_L1_error)
jpayne@68 11286
jpayne@68 11287 /* "pysam/libctabix.pyx":377
jpayne@68 11288 *
jpayne@68 11289 * if not self.is_remote:
jpayne@68 11290 * if not os.path.exists(filename): # <<<<<<<<<<<<<<
jpayne@68 11291 * raise IOError("file `%s` not found" % filename)
jpayne@68 11292 *
jpayne@68 11293 */
jpayne@68 11294 }
jpayne@68 11295
jpayne@68 11296 /* "pysam/libctabix.pyx":380
jpayne@68 11297 * raise IOError("file `%s` not found" % filename)
jpayne@68 11298 *
jpayne@68 11299 * if not os.path.exists(filename_index): # <<<<<<<<<<<<<<
jpayne@68 11300 * raise IOError("index `%s` not found" % filename_index)
jpayne@68 11301 *
jpayne@68 11302 */
jpayne@68 11303 __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_os); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 380, __pyx_L1_error)
jpayne@68 11304 __Pyx_GOTREF(__pyx_t_3);
jpayne@68 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@68 11306 __Pyx_GOTREF(__pyx_t_4);
jpayne@68 11307 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
jpayne@68 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@68 11309 __Pyx_GOTREF(__pyx_t_3);
jpayne@68 11310 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
jpayne@68 11311 __pyx_t_4 = NULL;
jpayne@68 11312 __pyx_t_5 = 0;
jpayne@68 11313 #if CYTHON_UNPACK_METHODS
jpayne@68 11314 if (likely(PyMethod_Check(__pyx_t_3))) {
jpayne@68 11315 __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
jpayne@68 11316 if (likely(__pyx_t_4)) {
jpayne@68 11317 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
jpayne@68 11318 __Pyx_INCREF(__pyx_t_4);
jpayne@68 11319 __Pyx_INCREF(function);
jpayne@68 11320 __Pyx_DECREF_SET(__pyx_t_3, function);
jpayne@68 11321 __pyx_t_5 = 1;
jpayne@68 11322 }
jpayne@68 11323 }
jpayne@68 11324 #endif
jpayne@68 11325 {
jpayne@68 11326 PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_filename_index};
jpayne@68 11327 __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
jpayne@68 11328 __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
jpayne@68 11329 if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 380, __pyx_L1_error)
jpayne@68 11330 __Pyx_GOTREF(__pyx_t_2);
jpayne@68 11331 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
jpayne@68 11332 }
jpayne@68 11333 __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 380, __pyx_L1_error)
jpayne@68 11334 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@68 11335 __pyx_t_1 = (!__pyx_t_7);
jpayne@68 11336 if (unlikely(__pyx_t_1)) {
jpayne@68 11337
jpayne@68 11338 /* "pysam/libctabix.pyx":381
jpayne@68 11339 *
jpayne@68 11340 * if not os.path.exists(filename_index):
jpayne@68 11341 * raise IOError("index `%s` not found" % filename_index) # <<<<<<<<<<<<<<
jpayne@68 11342 *
jpayne@68 11343 * # open file
jpayne@68 11344 */
jpayne@68 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@68 11346 __Pyx_GOTREF(__pyx_t_2);
jpayne@68 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@68 11348 __Pyx_GOTREF(__pyx_t_3);
jpayne@68 11349 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@68 11350 __Pyx_Raise(__pyx_t_3, 0, 0, 0);
jpayne@68 11351 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
jpayne@68 11352 __PYX_ERR(0, 381, __pyx_L1_error)
jpayne@68 11353
jpayne@68 11354 /* "pysam/libctabix.pyx":380
jpayne@68 11355 * raise IOError("file `%s` not found" % filename)
jpayne@68 11356 *
jpayne@68 11357 * if not os.path.exists(filename_index): # <<<<<<<<<<<<<<
jpayne@68 11358 * raise IOError("index `%s` not found" % filename_index)
jpayne@68 11359 *
jpayne@68 11360 */
jpayne@68 11361 }
jpayne@68 11362
jpayne@68 11363 /* "pysam/libctabix.pyx":376
jpayne@68 11364 * self.is_remote = hisremote(self.filename)
jpayne@68 11365 *
jpayne@68 11366 * if not self.is_remote: # <<<<<<<<<<<<<<
jpayne@68 11367 * if not os.path.exists(filename):
jpayne@68 11368 * raise IOError("file `%s` not found" % filename)
jpayne@68 11369 */
jpayne@68 11370 }
jpayne@68 11371
jpayne@68 11372 /* "pysam/libctabix.pyx":384
jpayne@68 11373 *
jpayne@68 11374 * # open file
jpayne@68 11375 * cdef char *cfilename = self.filename # <<<<<<<<<<<<<<
jpayne@68 11376 * cdef char *cfilename_index = self.filename_index
jpayne@68 11377 * with nogil:
jpayne@68 11378 */
jpayne@68 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@68 11380 __pyx_v_cfilename = __pyx_t_8;
jpayne@68 11381
jpayne@68 11382 /* "pysam/libctabix.pyx":385
jpayne@68 11383 * # open file
jpayne@68 11384 * cdef char *cfilename = self.filename
jpayne@68 11385 * cdef char *cfilename_index = self.filename_index # <<<<<<<<<<<<<<
jpayne@68 11386 * with nogil:
jpayne@68 11387 * self.htsfile = hts_open(cfilename, 'r')
jpayne@68 11388 */
jpayne@68 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@68 11390 __pyx_v_cfilename_index = __pyx_t_8;
jpayne@68 11391
jpayne@68 11392 /* "pysam/libctabix.pyx":386
jpayne@68 11393 * cdef char *cfilename = self.filename
jpayne@68 11394 * cdef char *cfilename_index = self.filename_index
jpayne@68 11395 * with nogil: # <<<<<<<<<<<<<<
jpayne@68 11396 * self.htsfile = hts_open(cfilename, 'r')
jpayne@68 11397 *
jpayne@68 11398 */
jpayne@68 11399 {
jpayne@68 11400 #ifdef WITH_THREAD
jpayne@68 11401 PyThreadState *_save;
jpayne@68 11402 _save = NULL;
jpayne@68 11403 Py_UNBLOCK_THREADS
jpayne@68 11404 __Pyx_FastGIL_Remember();
jpayne@68 11405 #endif
jpayne@68 11406 /*try:*/ {
jpayne@68 11407
jpayne@68 11408 /* "pysam/libctabix.pyx":387
jpayne@68 11409 * cdef char *cfilename_index = self.filename_index
jpayne@68 11410 * with nogil:
jpayne@68 11411 * self.htsfile = hts_open(cfilename, 'r') # <<<<<<<<<<<<<<
jpayne@68 11412 *
jpayne@68 11413 * if self.htsfile == NULL:
jpayne@68 11414 */
jpayne@68 11415 __pyx_v_self->__pyx_base.htsfile = hts_open(__pyx_v_cfilename, ((char const *)"r"));
jpayne@68 11416 }
jpayne@68 11417
jpayne@68 11418 /* "pysam/libctabix.pyx":386
jpayne@68 11419 * cdef char *cfilename = self.filename
jpayne@68 11420 * cdef char *cfilename_index = self.filename_index
jpayne@68 11421 * with nogil: # <<<<<<<<<<<<<<
jpayne@68 11422 * self.htsfile = hts_open(cfilename, 'r')
jpayne@68 11423 *
jpayne@68 11424 */
jpayne@68 11425 /*finally:*/ {
jpayne@68 11426 /*normal exit:*/{
jpayne@68 11427 #ifdef WITH_THREAD
jpayne@68 11428 __Pyx_FastGIL_Forget();
jpayne@68 11429 Py_BLOCK_THREADS
jpayne@68 11430 #endif
jpayne@68 11431 goto __pyx_L12;
jpayne@68 11432 }
jpayne@68 11433 __pyx_L12:;
jpayne@68 11434 }
jpayne@68 11435 }
jpayne@68 11436
jpayne@68 11437 /* "pysam/libctabix.pyx":389
jpayne@68 11438 * self.htsfile = hts_open(cfilename, 'r')
jpayne@68 11439 *
jpayne@68 11440 * if self.htsfile == NULL: # <<<<<<<<<<<<<<
jpayne@68 11441 * raise IOError("could not open file `%s`" % filename)
jpayne@68 11442 *
jpayne@68 11443 */
jpayne@68 11444 __pyx_t_1 = (__pyx_v_self->__pyx_base.htsfile == NULL);
jpayne@68 11445 if (unlikely(__pyx_t_1)) {
jpayne@68 11446
jpayne@68 11447 /* "pysam/libctabix.pyx":390
jpayne@68 11448 *
jpayne@68 11449 * if self.htsfile == NULL:
jpayne@68 11450 * raise IOError("could not open file `%s`" % filename) # <<<<<<<<<<<<<<
jpayne@68 11451 *
jpayne@68 11452 * #if self.htsfile.format.category != region_list:
jpayne@68 11453 */
jpayne@68 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@68 11455 __Pyx_GOTREF(__pyx_t_3);
jpayne@68 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@68 11457 __Pyx_GOTREF(__pyx_t_2);
jpayne@68 11458 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
jpayne@68 11459 __Pyx_Raise(__pyx_t_2, 0, 0, 0);
jpayne@68 11460 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@68 11461 __PYX_ERR(0, 390, __pyx_L1_error)
jpayne@68 11462
jpayne@68 11463 /* "pysam/libctabix.pyx":389
jpayne@68 11464 * self.htsfile = hts_open(cfilename, 'r')
jpayne@68 11465 *
jpayne@68 11466 * if self.htsfile == NULL: # <<<<<<<<<<<<<<
jpayne@68 11467 * raise IOError("could not open file `%s`" % filename)
jpayne@68 11468 *
jpayne@68 11469 */
jpayne@68 11470 }
jpayne@68 11471
jpayne@68 11472 /* "pysam/libctabix.pyx":395
jpayne@68 11473 * # raise ValueError("file does not contain region data")
jpayne@68 11474 *
jpayne@68 11475 * with nogil: # <<<<<<<<<<<<<<
jpayne@68 11476 * self.index = tbx_index_load2(cfilename, cfilename_index)
jpayne@68 11477 *
jpayne@68 11478 */
jpayne@68 11479 {
jpayne@68 11480 #ifdef WITH_THREAD
jpayne@68 11481 PyThreadState *_save;
jpayne@68 11482 _save = NULL;
jpayne@68 11483 Py_UNBLOCK_THREADS
jpayne@68 11484 __Pyx_FastGIL_Remember();
jpayne@68 11485 #endif
jpayne@68 11486 /*try:*/ {
jpayne@68 11487
jpayne@68 11488 /* "pysam/libctabix.pyx":396
jpayne@68 11489 *
jpayne@68 11490 * with nogil:
jpayne@68 11491 * self.index = tbx_index_load2(cfilename, cfilename_index) # <<<<<<<<<<<<<<
jpayne@68 11492 *
jpayne@68 11493 * if self.index == NULL:
jpayne@68 11494 */
jpayne@68 11495 __pyx_v_self->index = tbx_index_load2(__pyx_v_cfilename, __pyx_v_cfilename_index);
jpayne@68 11496 }
jpayne@68 11497
jpayne@68 11498 /* "pysam/libctabix.pyx":395
jpayne@68 11499 * # raise ValueError("file does not contain region data")
jpayne@68 11500 *
jpayne@68 11501 * with nogil: # <<<<<<<<<<<<<<
jpayne@68 11502 * self.index = tbx_index_load2(cfilename, cfilename_index)
jpayne@68 11503 *
jpayne@68 11504 */
jpayne@68 11505 /*finally:*/ {
jpayne@68 11506 /*normal exit:*/{
jpayne@68 11507 #ifdef WITH_THREAD
jpayne@68 11508 __Pyx_FastGIL_Forget();
jpayne@68 11509 Py_BLOCK_THREADS
jpayne@68 11510 #endif
jpayne@68 11511 goto __pyx_L16;
jpayne@68 11512 }
jpayne@68 11513 __pyx_L16:;
jpayne@68 11514 }
jpayne@68 11515 }
jpayne@68 11516
jpayne@68 11517 /* "pysam/libctabix.pyx":398
jpayne@68 11518 * self.index = tbx_index_load2(cfilename, cfilename_index)
jpayne@68 11519 *
jpayne@68 11520 * if self.index == NULL: # <<<<<<<<<<<<<<
jpayne@68 11521 * raise IOError("could not open index for `%s`" % filename)
jpayne@68 11522 *
jpayne@68 11523 */
jpayne@68 11524 __pyx_t_1 = (__pyx_v_self->index == NULL);
jpayne@68 11525 if (unlikely(__pyx_t_1)) {
jpayne@68 11526
jpayne@68 11527 /* "pysam/libctabix.pyx":399
jpayne@68 11528 *
jpayne@68 11529 * if self.index == NULL:
jpayne@68 11530 * raise IOError("could not open index for `%s`" % filename) # <<<<<<<<<<<<<<
jpayne@68 11531 *
jpayne@68 11532 * if not self.is_stream:
jpayne@68 11533 */
jpayne@68 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@68 11535 __Pyx_GOTREF(__pyx_t_2);
jpayne@68 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@68 11537 __Pyx_GOTREF(__pyx_t_3);
jpayne@68 11538 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@68 11539 __Pyx_Raise(__pyx_t_3, 0, 0, 0);
jpayne@68 11540 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
jpayne@68 11541 __PYX_ERR(0, 399, __pyx_L1_error)
jpayne@68 11542
jpayne@68 11543 /* "pysam/libctabix.pyx":398
jpayne@68 11544 * self.index = tbx_index_load2(cfilename, cfilename_index)
jpayne@68 11545 *
jpayne@68 11546 * if self.index == NULL: # <<<<<<<<<<<<<<
jpayne@68 11547 * raise IOError("could not open index for `%s`" % filename)
jpayne@68 11548 *
jpayne@68 11549 */
jpayne@68 11550 }
jpayne@68 11551
jpayne@68 11552 /* "pysam/libctabix.pyx":401
jpayne@68 11553 * raise IOError("could not open index for `%s`" % filename)
jpayne@68 11554 *
jpayne@68 11555 * if not self.is_stream: # <<<<<<<<<<<<<<
jpayne@68 11556 * self.start_offset = self.tell()
jpayne@68 11557 *
jpayne@68 11558 */
jpayne@68 11559 __pyx_t_1 = (!__pyx_v_self->__pyx_base.is_stream);
jpayne@68 11560 if (__pyx_t_1) {
jpayne@68 11561
jpayne@68 11562 /* "pysam/libctabix.pyx":402
jpayne@68 11563 *
jpayne@68 11564 * if not self.is_stream:
jpayne@68 11565 * self.start_offset = self.tell() # <<<<<<<<<<<<<<
jpayne@68 11566 *
jpayne@68 11567 * def _dup(self):
jpayne@68 11568 */
jpayne@68 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@68 11570 __Pyx_GOTREF(__pyx_t_2);
jpayne@68 11571 __pyx_t_4 = NULL;
jpayne@68 11572 __pyx_t_5 = 0;
jpayne@68 11573 #if CYTHON_UNPACK_METHODS
jpayne@68 11574 if (likely(PyMethod_Check(__pyx_t_2))) {
jpayne@68 11575 __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
jpayne@68 11576 if (likely(__pyx_t_4)) {
jpayne@68 11577 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
jpayne@68 11578 __Pyx_INCREF(__pyx_t_4);
jpayne@68 11579 __Pyx_INCREF(function);
jpayne@68 11580 __Pyx_DECREF_SET(__pyx_t_2, function);
jpayne@68 11581 __pyx_t_5 = 1;
jpayne@68 11582 }
jpayne@68 11583 }
jpayne@68 11584 #endif
jpayne@68 11585 {
jpayne@68 11586 PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
jpayne@68 11587 __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);
jpayne@68 11588 __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
jpayne@68 11589 if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 402, __pyx_L1_error)
jpayne@68 11590 __Pyx_GOTREF(__pyx_t_3);
jpayne@68 11591 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@68 11592 }
jpayne@68 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@68 11594 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
jpayne@68 11595 __pyx_v_self->__pyx_base.start_offset = __pyx_t_9;
jpayne@68 11596
jpayne@68 11597 /* "pysam/libctabix.pyx":401
jpayne@68 11598 * raise IOError("could not open index for `%s`" % filename)
jpayne@68 11599 *
jpayne@68 11600 * if not self.is_stream: # <<<<<<<<<<<<<<
jpayne@68 11601 * self.start_offset = self.tell()
jpayne@68 11602 *
jpayne@68 11603 */
jpayne@68 11604 }
jpayne@68 11605
jpayne@68 11606 /* "pysam/libctabix.pyx":352
jpayne@68 11607 * self.encoding = encoding
jpayne@68 11608 *
jpayne@68 11609 * def _open( self, # <<<<<<<<<<<<<<
jpayne@68 11610 * filename,
jpayne@68 11611 * mode='r',
jpayne@68 11612 */
jpayne@68 11613
jpayne@68 11614 /* function exit code */
jpayne@68 11615 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
jpayne@68 11616 goto __pyx_L0;
jpayne@68 11617 __pyx_L1_error:;
jpayne@68 11618 __Pyx_XDECREF(__pyx_t_2);
jpayne@68 11619 __Pyx_XDECREF(__pyx_t_3);
jpayne@68 11620 __Pyx_XDECREF(__pyx_t_4);
jpayne@68 11621 __Pyx_AddTraceback("pysam.libctabix.TabixFile._open", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@68 11622 __pyx_r = NULL;
jpayne@68 11623 __pyx_L0:;
jpayne@68 11624 __Pyx_XDECREF(__pyx_v_filename_index);
jpayne@68 11625 __Pyx_XGIVEREF(__pyx_r);
jpayne@68 11626 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@68 11627 __Pyx_RefNannyFinishContext();
jpayne@68 11628 return __pyx_r;
jpayne@68 11629 }
jpayne@68 11630
jpayne@68 11631 /* "pysam/libctabix.pyx":404
jpayne@68 11632 * self.start_offset = self.tell()
jpayne@68 11633 *
jpayne@68 11634 * def _dup(self): # <<<<<<<<<<<<<<
jpayne@68 11635 * '''return a copy of this tabix file.
jpayne@68 11636 *
jpayne@68 11637 */
jpayne@68 11638
jpayne@68 11639 /* Python wrapper */
jpayne@68 11640 static PyObject *__pyx_pw_5pysam_9libctabix_9TabixFile_5_dup(PyObject *__pyx_v_self,
jpayne@68 11641 #if CYTHON_METH_FASTCALL
jpayne@68 11642 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@68 11643 #else
jpayne@68 11644 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@68 11645 #endif
jpayne@68 11646 ); /*proto*/
jpayne@68 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@68 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@68 11649 static PyObject *__pyx_pw_5pysam_9libctabix_9TabixFile_5_dup(PyObject *__pyx_v_self,
jpayne@68 11650 #if CYTHON_METH_FASTCALL
jpayne@68 11651 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@68 11652 #else
jpayne@68 11653 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@68 11654 #endif
jpayne@68 11655 ) {
jpayne@68 11656 #if !CYTHON_METH_FASTCALL
jpayne@68 11657 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
jpayne@68 11658 #endif
jpayne@68 11659 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@68 11660 PyObject *__pyx_r = 0;
jpayne@68 11661 __Pyx_RefNannyDeclarations
jpayne@68 11662 __Pyx_RefNannySetupContext("_dup (wrapper)", 0);
jpayne@68 11663 #if !CYTHON_METH_FASTCALL
jpayne@68 11664 #if CYTHON_ASSUME_SAFE_MACROS
jpayne@68 11665 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
jpayne@68 11666 #else
jpayne@68 11667 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
jpayne@68 11668 #endif
jpayne@68 11669 #endif
jpayne@68 11670 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
jpayne@68 11671 if (unlikely(__pyx_nargs > 0)) {
jpayne@68 11672 __Pyx_RaiseArgtupleInvalid("_dup", 1, 0, 0, __pyx_nargs); return NULL;}
jpayne@68 11673 if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "_dup", 0))) return NULL;
jpayne@68 11674 __pyx_r = __pyx_pf_5pysam_9libctabix_9TabixFile_4_dup(((struct __pyx_obj_5pysam_9libctabix_TabixFile *)__pyx_v_self));
jpayne@68 11675
jpayne@68 11676 /* function exit code */
jpayne@68 11677 __Pyx_RefNannyFinishContext();
jpayne@68 11678 return __pyx_r;
jpayne@68 11679 }
jpayne@68 11680
jpayne@68 11681 static PyObject *__pyx_pf_5pysam_9libctabix_9TabixFile_4_dup(struct __pyx_obj_5pysam_9libctabix_TabixFile *__pyx_v_self) {
jpayne@68 11682 PyObject *__pyx_r = NULL;
jpayne@68 11683 __Pyx_TraceDeclarations
jpayne@68 11684 __Pyx_RefNannyDeclarations
jpayne@68 11685 PyObject *__pyx_t_1 = NULL;
jpayne@68 11686 PyObject *__pyx_t_2 = NULL;
jpayne@68 11687 PyObject *__pyx_t_3 = NULL;
jpayne@68 11688 int __pyx_lineno = 0;
jpayne@68 11689 const char *__pyx_filename = NULL;
jpayne@68 11690 int __pyx_clineno = 0;
jpayne@68 11691 __Pyx_TraceFrameInit(__pyx_codeobj__17)
jpayne@68 11692 __Pyx_RefNannySetupContext("_dup", 1);
jpayne@68 11693 __Pyx_TraceCall("_dup", __pyx_f[0], 404, 0, __PYX_ERR(0, 404, __pyx_L1_error));
jpayne@68 11694
jpayne@68 11695 /* "pysam/libctabix.pyx":409
jpayne@68 11696 * The file is being re-opened.
jpayne@68 11697 * '''
jpayne@68 11698 * return TabixFile(self.filename, # <<<<<<<<<<<<<<
jpayne@68 11699 * mode="r",
jpayne@68 11700 * threads=self.threads,
jpayne@68 11701 */
jpayne@68 11702 __Pyx_XDECREF(__pyx_r);
jpayne@68 11703 __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 409, __pyx_L1_error)
jpayne@68 11704 __Pyx_GOTREF(__pyx_t_1);
jpayne@68 11705 __Pyx_INCREF(__pyx_v_self->__pyx_base.filename);
jpayne@68 11706 __Pyx_GIVEREF(__pyx_v_self->__pyx_base.filename);
jpayne@68 11707 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->__pyx_base.filename)) __PYX_ERR(0, 409, __pyx_L1_error);
jpayne@68 11708
jpayne@68 11709 /* "pysam/libctabix.pyx":410
jpayne@68 11710 * '''
jpayne@68 11711 * return TabixFile(self.filename,
jpayne@68 11712 * mode="r", # <<<<<<<<<<<<<<
jpayne@68 11713 * threads=self.threads,
jpayne@68 11714 * parser=self.parser,
jpayne@68 11715 */
jpayne@68 11716 __pyx_t_2 = __Pyx_PyDict_NewPresized(5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 410, __pyx_L1_error)
jpayne@68 11717 __Pyx_GOTREF(__pyx_t_2);
jpayne@68 11718 if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_mode, __pyx_n_u_r) < 0) __PYX_ERR(0, 410, __pyx_L1_error)
jpayne@68 11719
jpayne@68 11720 /* "pysam/libctabix.pyx":411
jpayne@68 11721 * return TabixFile(self.filename,
jpayne@68 11722 * mode="r",
jpayne@68 11723 * threads=self.threads, # <<<<<<<<<<<<<<
jpayne@68 11724 * parser=self.parser,
jpayne@68 11725 * index=self.filename_index,
jpayne@68 11726 */
jpayne@68 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@68 11728
jpayne@68 11729 /* "pysam/libctabix.pyx":412
jpayne@68 11730 * mode="r",
jpayne@68 11731 * threads=self.threads,
jpayne@68 11732 * parser=self.parser, # <<<<<<<<<<<<<<
jpayne@68 11733 * index=self.filename_index,
jpayne@68 11734 * encoding=self.encoding)
jpayne@68 11735 */
jpayne@68 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@68 11737
jpayne@68 11738 /* "pysam/libctabix.pyx":413
jpayne@68 11739 * threads=self.threads,
jpayne@68 11740 * parser=self.parser,
jpayne@68 11741 * index=self.filename_index, # <<<<<<<<<<<<<<
jpayne@68 11742 * encoding=self.encoding)
jpayne@68 11743 *
jpayne@68 11744 */
jpayne@68 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@68 11746
jpayne@68 11747 /* "pysam/libctabix.pyx":414
jpayne@68 11748 * parser=self.parser,
jpayne@68 11749 * index=self.filename_index,
jpayne@68 11750 * encoding=self.encoding) # <<<<<<<<<<<<<<
jpayne@68 11751 *
jpayne@68 11752 * def fetch(self,
jpayne@68 11753 */
jpayne@68 11754 if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_encoding, __pyx_v_self->encoding) < 0) __PYX_ERR(0, 410, __pyx_L1_error)
jpayne@68 11755
jpayne@68 11756 /* "pysam/libctabix.pyx":409
jpayne@68 11757 * The file is being re-opened.
jpayne@68 11758 * '''
jpayne@68 11759 * return TabixFile(self.filename, # <<<<<<<<<<<<<<
jpayne@68 11760 * mode="r",
jpayne@68 11761 * threads=self.threads,
jpayne@68 11762 */
jpayne@68 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@68 11764 __Pyx_GOTREF(__pyx_t_3);
jpayne@68 11765 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@68 11766 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@68 11767 __pyx_r = __pyx_t_3;
jpayne@68 11768 __pyx_t_3 = 0;
jpayne@68 11769 goto __pyx_L0;
jpayne@68 11770
jpayne@68 11771 /* "pysam/libctabix.pyx":404
jpayne@68 11772 * self.start_offset = self.tell()
jpayne@68 11773 *
jpayne@68 11774 * def _dup(self): # <<<<<<<<<<<<<<
jpayne@68 11775 * '''return a copy of this tabix file.
jpayne@68 11776 *
jpayne@68 11777 */
jpayne@68 11778
jpayne@68 11779 /* function exit code */
jpayne@68 11780 __pyx_L1_error:;
jpayne@68 11781 __Pyx_XDECREF(__pyx_t_1);
jpayne@68 11782 __Pyx_XDECREF(__pyx_t_2);
jpayne@68 11783 __Pyx_XDECREF(__pyx_t_3);
jpayne@68 11784 __Pyx_AddTraceback("pysam.libctabix.TabixFile._dup", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@68 11785 __pyx_r = NULL;
jpayne@68 11786 __pyx_L0:;
jpayne@68 11787 __Pyx_XGIVEREF(__pyx_r);
jpayne@68 11788 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@68 11789 __Pyx_RefNannyFinishContext();
jpayne@68 11790 return __pyx_r;
jpayne@68 11791 }
jpayne@68 11792
jpayne@68 11793 /* "pysam/libctabix.pyx":416
jpayne@68 11794 * encoding=self.encoding)
jpayne@68 11795 *
jpayne@68 11796 * def fetch(self, # <<<<<<<<<<<<<<
jpayne@68 11797 * reference=None,
jpayne@68 11798 * start=None,
jpayne@68 11799 */
jpayne@68 11800
jpayne@68 11801 /* Python wrapper */
jpayne@68 11802 static PyObject *__pyx_pw_5pysam_9libctabix_9TabixFile_7fetch(PyObject *__pyx_v_self,
jpayne@68 11803 #if CYTHON_METH_FASTCALL
jpayne@68 11804 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@68 11805 #else
jpayne@68 11806 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@68 11807 #endif
jpayne@68 11808 ); /*proto*/
jpayne@68 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@68 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@68 11811 static PyObject *__pyx_pw_5pysam_9libctabix_9TabixFile_7fetch(PyObject *__pyx_v_self,
jpayne@68 11812 #if CYTHON_METH_FASTCALL
jpayne@68 11813 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@68 11814 #else
jpayne@68 11815 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@68 11816 #endif
jpayne@68 11817 ) {
jpayne@68 11818 PyObject *__pyx_v_reference = 0;
jpayne@68 11819 PyObject *__pyx_v_start = 0;
jpayne@68 11820 PyObject *__pyx_v_end = 0;
jpayne@68 11821 PyObject *__pyx_v_region = 0;
jpayne@68 11822 PyObject *__pyx_v_parser = 0;
jpayne@68 11823 PyObject *__pyx_v_multiple_iterators = 0;
jpayne@68 11824 #if !CYTHON_METH_FASTCALL
jpayne@68 11825 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
jpayne@68 11826 #endif
jpayne@68 11827 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@68 11828 PyObject* values[6] = {0,0,0,0,0,0};
jpayne@68 11829 int __pyx_lineno = 0;
jpayne@68 11830 const char *__pyx_filename = NULL;
jpayne@68 11831 int __pyx_clineno = 0;
jpayne@68 11832 PyObject *__pyx_r = 0;
jpayne@68 11833 __Pyx_RefNannyDeclarations
jpayne@68 11834 __Pyx_RefNannySetupContext("fetch (wrapper)", 0);
jpayne@68 11835 #if !CYTHON_METH_FASTCALL
jpayne@68 11836 #if CYTHON_ASSUME_SAFE_MACROS
jpayne@68 11837 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
jpayne@68 11838 #else
jpayne@68 11839 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
jpayne@68 11840 #endif
jpayne@68 11841 #endif
jpayne@68 11842 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
jpayne@68 11843 {
jpayne@68 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@68 11845
jpayne@68 11846 /* "pysam/libctabix.pyx":417
jpayne@68 11847 *
jpayne@68 11848 * def fetch(self,
jpayne@68 11849 * reference=None, # <<<<<<<<<<<<<<
jpayne@68 11850 * start=None,
jpayne@68 11851 * end=None,
jpayne@68 11852 */
jpayne@68 11853 values[0] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
jpayne@68 11854
jpayne@68 11855 /* "pysam/libctabix.pyx":418
jpayne@68 11856 * def fetch(self,
jpayne@68 11857 * reference=None,
jpayne@68 11858 * start=None, # <<<<<<<<<<<<<<
jpayne@68 11859 * end=None,
jpayne@68 11860 * region=None,
jpayne@68 11861 */
jpayne@68 11862 values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
jpayne@68 11863
jpayne@68 11864 /* "pysam/libctabix.pyx":419
jpayne@68 11865 * reference=None,
jpayne@68 11866 * start=None,
jpayne@68 11867 * end=None, # <<<<<<<<<<<<<<
jpayne@68 11868 * region=None,
jpayne@68 11869 * parser=None,
jpayne@68 11870 */
jpayne@68 11871 values[2] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
jpayne@68 11872
jpayne@68 11873 /* "pysam/libctabix.pyx":420
jpayne@68 11874 * start=None,
jpayne@68 11875 * end=None,
jpayne@68 11876 * region=None, # <<<<<<<<<<<<<<
jpayne@68 11877 * parser=None,
jpayne@68 11878 * multiple_iterators=False):
jpayne@68 11879 */
jpayne@68 11880 values[3] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
jpayne@68 11881
jpayne@68 11882 /* "pysam/libctabix.pyx":421
jpayne@68 11883 * end=None,
jpayne@68 11884 * region=None,
jpayne@68 11885 * parser=None, # <<<<<<<<<<<<<<
jpayne@68 11886 * multiple_iterators=False):
jpayne@68 11887 * '''fetch one or more rows in a :term:`region` using 0-based
jpayne@68 11888 */
jpayne@68 11889 values[4] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
jpayne@68 11890
jpayne@68 11891 /* "pysam/libctabix.pyx":422
jpayne@68 11892 * region=None,
jpayne@68 11893 * parser=None,
jpayne@68 11894 * multiple_iterators=False): # <<<<<<<<<<<<<<
jpayne@68 11895 * '''fetch one or more rows in a :term:`region` using 0-based
jpayne@68 11896 * indexing. The region is specified by :term:`reference`,
jpayne@68 11897 */
jpayne@68 11898 values[5] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_False));
jpayne@68 11899 if (__pyx_kwds) {
jpayne@68 11900 Py_ssize_t kw_args;
jpayne@68 11901 switch (__pyx_nargs) {
jpayne@68 11902 case 6: values[5] = __Pyx_Arg_FASTCALL(__pyx_args, 5);
jpayne@68 11903 CYTHON_FALLTHROUGH;
jpayne@68 11904 case 5: values[4] = __Pyx_Arg_FASTCALL(__pyx_args, 4);
jpayne@68 11905 CYTHON_FALLTHROUGH;
jpayne@68 11906 case 4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
jpayne@68 11907 CYTHON_FALLTHROUGH;
jpayne@68 11908 case 3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
jpayne@68 11909 CYTHON_FALLTHROUGH;
jpayne@68 11910 case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
jpayne@68 11911 CYTHON_FALLTHROUGH;
jpayne@68 11912 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
jpayne@68 11913 CYTHON_FALLTHROUGH;
jpayne@68 11914 case 0: break;
jpayne@68 11915 default: goto __pyx_L5_argtuple_error;
jpayne@68 11916 }
jpayne@68 11917 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
jpayne@68 11918 switch (__pyx_nargs) {
jpayne@68 11919 case 0:
jpayne@68 11920 if (kw_args > 0) {
jpayne@68 11921 PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_reference);
jpayne@68 11922 if (value) { values[0] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
jpayne@68 11923 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 416, __pyx_L3_error)
jpayne@68 11924 }
jpayne@68 11925 CYTHON_FALLTHROUGH;
jpayne@68 11926 case 1:
jpayne@68 11927 if (kw_args > 0) {
jpayne@68 11928 PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_start);
jpayne@68 11929 if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
jpayne@68 11930 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 416, __pyx_L3_error)
jpayne@68 11931 }
jpayne@68 11932 CYTHON_FALLTHROUGH;
jpayne@68 11933 case 2:
jpayne@68 11934 if (kw_args > 0) {
jpayne@68 11935 PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_end);
jpayne@68 11936 if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
jpayne@68 11937 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 416, __pyx_L3_error)
jpayne@68 11938 }
jpayne@68 11939 CYTHON_FALLTHROUGH;
jpayne@68 11940 case 3:
jpayne@68 11941 if (kw_args > 0) {
jpayne@68 11942 PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_region);
jpayne@68 11943 if (value) { values[3] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
jpayne@68 11944 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 416, __pyx_L3_error)
jpayne@68 11945 }
jpayne@68 11946 CYTHON_FALLTHROUGH;
jpayne@68 11947 case 4:
jpayne@68 11948 if (kw_args > 0) {
jpayne@68 11949 PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_parser);
jpayne@68 11950 if (value) { values[4] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
jpayne@68 11951 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 416, __pyx_L3_error)
jpayne@68 11952 }
jpayne@68 11953 CYTHON_FALLTHROUGH;
jpayne@68 11954 case 5:
jpayne@68 11955 if (kw_args > 0) {
jpayne@68 11956 PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_multiple_iterators);
jpayne@68 11957 if (value) { values[5] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
jpayne@68 11958 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 416, __pyx_L3_error)
jpayne@68 11959 }
jpayne@68 11960 }
jpayne@68 11961 if (unlikely(kw_args > 0)) {
jpayne@68 11962 const Py_ssize_t kwd_pos_args = __pyx_nargs;
jpayne@68 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@68 11964 }
jpayne@68 11965 } else {
jpayne@68 11966 switch (__pyx_nargs) {
jpayne@68 11967 case 6: values[5] = __Pyx_Arg_FASTCALL(__pyx_args, 5);
jpayne@68 11968 CYTHON_FALLTHROUGH;
jpayne@68 11969 case 5: values[4] = __Pyx_Arg_FASTCALL(__pyx_args, 4);
jpayne@68 11970 CYTHON_FALLTHROUGH;
jpayne@68 11971 case 4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
jpayne@68 11972 CYTHON_FALLTHROUGH;
jpayne@68 11973 case 3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
jpayne@68 11974 CYTHON_FALLTHROUGH;
jpayne@68 11975 case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
jpayne@68 11976 CYTHON_FALLTHROUGH;
jpayne@68 11977 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
jpayne@68 11978 CYTHON_FALLTHROUGH;
jpayne@68 11979 case 0: break;
jpayne@68 11980 default: goto __pyx_L5_argtuple_error;
jpayne@68 11981 }
jpayne@68 11982 }
jpayne@68 11983 __pyx_v_reference = values[0];
jpayne@68 11984 __pyx_v_start = values[1];
jpayne@68 11985 __pyx_v_end = values[2];
jpayne@68 11986 __pyx_v_region = values[3];
jpayne@68 11987 __pyx_v_parser = values[4];
jpayne@68 11988 __pyx_v_multiple_iterators = values[5];
jpayne@68 11989 }
jpayne@68 11990 goto __pyx_L6_skip;
jpayne@68 11991 __pyx_L5_argtuple_error:;
jpayne@68 11992 __Pyx_RaiseArgtupleInvalid("fetch", 0, 0, 6, __pyx_nargs); __PYX_ERR(0, 416, __pyx_L3_error)
jpayne@68 11993 __pyx_L6_skip:;
jpayne@68 11994 goto __pyx_L4_argument_unpacking_done;
jpayne@68 11995 __pyx_L3_error:;
jpayne@68 11996 {
jpayne@68 11997 Py_ssize_t __pyx_temp;
jpayne@68 11998 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
jpayne@68 11999 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
jpayne@68 12000 }
jpayne@68 12001 }
jpayne@68 12002 __Pyx_AddTraceback("pysam.libctabix.TabixFile.fetch", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@68 12003 __Pyx_RefNannyFinishContext();
jpayne@68 12004 return NULL;
jpayne@68 12005 __pyx_L4_argument_unpacking_done:;
jpayne@68 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@68 12007
jpayne@68 12008 /* "pysam/libctabix.pyx":416
jpayne@68 12009 * encoding=self.encoding)
jpayne@68 12010 *
jpayne@68 12011 * def fetch(self, # <<<<<<<<<<<<<<
jpayne@68 12012 * reference=None,
jpayne@68 12013 * start=None,
jpayne@68 12014 */
jpayne@68 12015
jpayne@68 12016 /* function exit code */
jpayne@68 12017 {
jpayne@68 12018 Py_ssize_t __pyx_temp;
jpayne@68 12019 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
jpayne@68 12020 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
jpayne@68 12021 }
jpayne@68 12022 }
jpayne@68 12023 __Pyx_RefNannyFinishContext();
jpayne@68 12024 return __pyx_r;
jpayne@68 12025 }
jpayne@68 12026
jpayne@68 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@68 12028 hts_itr_t *__pyx_v_itr;
jpayne@68 12029 char *__pyx_v_cstr;
jpayne@68 12030 struct __pyx_obj_5pysam_9libctabix_TabixFile *__pyx_v_fileobj = 0;
jpayne@68 12031 PyObject *__pyx_v_s = NULL;
jpayne@68 12032 struct __pyx_obj_5pysam_9libctabix_TabixIterator *__pyx_v_a = 0;
jpayne@68 12033 PyObject *__pyx_r = NULL;
jpayne@68 12034 __Pyx_TraceDeclarations
jpayne@68 12035 __Pyx_RefNannyDeclarations
jpayne@68 12036 PyObject *__pyx_t_1 = NULL;
jpayne@68 12037 PyObject *__pyx_t_2 = NULL;
jpayne@68 12038 PyObject *__pyx_t_3 = NULL;
jpayne@68 12039 unsigned int __pyx_t_4;
jpayne@68 12040 int __pyx_t_5;
jpayne@68 12041 int __pyx_t_6;
jpayne@68 12042 struct __pyx_opt_args_5pysam_9libcutils_force_bytes __pyx_t_7;
jpayne@68 12043 char *__pyx_t_8;
jpayne@68 12044 Py_ssize_t __pyx_t_9;
jpayne@68 12045 int __pyx_lineno = 0;
jpayne@68 12046 const char *__pyx_filename = NULL;
jpayne@68 12047 int __pyx_clineno = 0;
jpayne@68 12048 __Pyx_TraceFrameInit(__pyx_codeobj__18)
jpayne@68 12049 __Pyx_RefNannySetupContext("fetch", 0);
jpayne@68 12050 __Pyx_TraceCall("fetch", __pyx_f[0], 416, 0, __PYX_ERR(0, 416, __pyx_L1_error));
jpayne@68 12051 __Pyx_INCREF(__pyx_v_start);
jpayne@68 12052 __Pyx_INCREF(__pyx_v_region);
jpayne@68 12053 __Pyx_INCREF(__pyx_v_parser);
jpayne@68 12054
jpayne@68 12055 /* "pysam/libctabix.pyx":443
jpayne@68 12056 *
jpayne@68 12057 * '''
jpayne@68 12058 * if not self.is_open(): # <<<<<<<<<<<<<<
jpayne@68 12059 * raise ValueError("I/O operation on closed file")
jpayne@68 12060 *
jpayne@68 12061 */
jpayne@68 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@68 12063 __Pyx_GOTREF(__pyx_t_2);
jpayne@68 12064 __pyx_t_3 = NULL;
jpayne@68 12065 __pyx_t_4 = 0;
jpayne@68 12066 #if CYTHON_UNPACK_METHODS
jpayne@68 12067 if (likely(PyMethod_Check(__pyx_t_2))) {
jpayne@68 12068 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
jpayne@68 12069 if (likely(__pyx_t_3)) {
jpayne@68 12070 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
jpayne@68 12071 __Pyx_INCREF(__pyx_t_3);
jpayne@68 12072 __Pyx_INCREF(function);
jpayne@68 12073 __Pyx_DECREF_SET(__pyx_t_2, function);
jpayne@68 12074 __pyx_t_4 = 1;
jpayne@68 12075 }
jpayne@68 12076 }
jpayne@68 12077 #endif
jpayne@68 12078 {
jpayne@68 12079 PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
jpayne@68 12080 __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
jpayne@68 12081 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
jpayne@68 12082 if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 443, __pyx_L1_error)
jpayne@68 12083 __Pyx_GOTREF(__pyx_t_1);
jpayne@68 12084 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@68 12085 }
jpayne@68 12086 __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 443, __pyx_L1_error)
jpayne@68 12087 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@68 12088 __pyx_t_6 = (!__pyx_t_5);
jpayne@68 12089 if (unlikely(__pyx_t_6)) {
jpayne@68 12090
jpayne@68 12091 /* "pysam/libctabix.pyx":444
jpayne@68 12092 * '''
jpayne@68 12093 * if not self.is_open():
jpayne@68 12094 * raise ValueError("I/O operation on closed file") # <<<<<<<<<<<<<<
jpayne@68 12095 *
jpayne@68 12096 * # convert coordinates to region string, which is one-based
jpayne@68 12097 */
jpayne@68 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@68 12099 __Pyx_GOTREF(__pyx_t_1);
jpayne@68 12100 __Pyx_Raise(__pyx_t_1, 0, 0, 0);
jpayne@68 12101 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@68 12102 __PYX_ERR(0, 444, __pyx_L1_error)
jpayne@68 12103
jpayne@68 12104 /* "pysam/libctabix.pyx":443
jpayne@68 12105 *
jpayne@68 12106 * '''
jpayne@68 12107 * if not self.is_open(): # <<<<<<<<<<<<<<
jpayne@68 12108 * raise ValueError("I/O operation on closed file")
jpayne@68 12109 *
jpayne@68 12110 */
jpayne@68 12111 }
jpayne@68 12112
jpayne@68 12113 /* "pysam/libctabix.pyx":447
jpayne@68 12114 *
jpayne@68 12115 * # convert coordinates to region string, which is one-based
jpayne@68 12116 * if reference: # <<<<<<<<<<<<<<
jpayne@68 12117 * if end is not None:
jpayne@68 12118 * if end < 0:
jpayne@68 12119 */
jpayne@68 12120 __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_v_reference); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 447, __pyx_L1_error)
jpayne@68 12121 if (__pyx_t_6) {
jpayne@68 12122
jpayne@68 12123 /* "pysam/libctabix.pyx":448
jpayne@68 12124 * # convert coordinates to region string, which is one-based
jpayne@68 12125 * if reference:
jpayne@68 12126 * if end is not None: # <<<<<<<<<<<<<<
jpayne@68 12127 * if end < 0:
jpayne@68 12128 * raise ValueError("end out of range (%i)" % end)
jpayne@68 12129 */
jpayne@68 12130 __pyx_t_6 = (__pyx_v_end != Py_None);
jpayne@68 12131 if (__pyx_t_6) {
jpayne@68 12132
jpayne@68 12133 /* "pysam/libctabix.pyx":449
jpayne@68 12134 * if reference:
jpayne@68 12135 * if end is not None:
jpayne@68 12136 * if end < 0: # <<<<<<<<<<<<<<
jpayne@68 12137 * raise ValueError("end out of range (%i)" % end)
jpayne@68 12138 * if start is None:
jpayne@68 12139 */
jpayne@68 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@68 12141 __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 449, __pyx_L1_error)
jpayne@68 12142 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@68 12143 if (unlikely(__pyx_t_6)) {
jpayne@68 12144
jpayne@68 12145 /* "pysam/libctabix.pyx":450
jpayne@68 12146 * if end is not None:
jpayne@68 12147 * if end < 0:
jpayne@68 12148 * raise ValueError("end out of range (%i)" % end) # <<<<<<<<<<<<<<
jpayne@68 12149 * if start is None:
jpayne@68 12150 * start = 0
jpayne@68 12151 */
jpayne@68 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@68 12153 __Pyx_GOTREF(__pyx_t_1);
jpayne@68 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@68 12155 __Pyx_GOTREF(__pyx_t_2);
jpayne@68 12156 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@68 12157 __Pyx_Raise(__pyx_t_2, 0, 0, 0);
jpayne@68 12158 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@68 12159 __PYX_ERR(0, 450, __pyx_L1_error)
jpayne@68 12160
jpayne@68 12161 /* "pysam/libctabix.pyx":449
jpayne@68 12162 * if reference:
jpayne@68 12163 * if end is not None:
jpayne@68 12164 * if end < 0: # <<<<<<<<<<<<<<
jpayne@68 12165 * raise ValueError("end out of range (%i)" % end)
jpayne@68 12166 * if start is None:
jpayne@68 12167 */
jpayne@68 12168 }
jpayne@68 12169
jpayne@68 12170 /* "pysam/libctabix.pyx":451
jpayne@68 12171 * if end < 0:
jpayne@68 12172 * raise ValueError("end out of range (%i)" % end)
jpayne@68 12173 * if start is None: # <<<<<<<<<<<<<<
jpayne@68 12174 * start = 0
jpayne@68 12175 *
jpayne@68 12176 */
jpayne@68 12177 __pyx_t_6 = (__pyx_v_start == Py_None);
jpayne@68 12178 if (__pyx_t_6) {
jpayne@68 12179
jpayne@68 12180 /* "pysam/libctabix.pyx":452
jpayne@68 12181 * raise ValueError("end out of range (%i)" % end)
jpayne@68 12182 * if start is None:
jpayne@68 12183 * start = 0 # <<<<<<<<<<<<<<
jpayne@68 12184 *
jpayne@68 12185 * if start < 0:
jpayne@68 12186 */
jpayne@68 12187 __Pyx_INCREF(__pyx_int_0);
jpayne@68 12188 __Pyx_DECREF_SET(__pyx_v_start, __pyx_int_0);
jpayne@68 12189
jpayne@68 12190 /* "pysam/libctabix.pyx":451
jpayne@68 12191 * if end < 0:
jpayne@68 12192 * raise ValueError("end out of range (%i)" % end)
jpayne@68 12193 * if start is None: # <<<<<<<<<<<<<<
jpayne@68 12194 * start = 0
jpayne@68 12195 *
jpayne@68 12196 */
jpayne@68 12197 }
jpayne@68 12198
jpayne@68 12199 /* "pysam/libctabix.pyx":454
jpayne@68 12200 * start = 0
jpayne@68 12201 *
jpayne@68 12202 * if start < 0: # <<<<<<<<<<<<<<
jpayne@68 12203 * raise ValueError("start out of range (%i)" % end)
jpayne@68 12204 * elif start > end:
jpayne@68 12205 */
jpayne@68 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@68 12207 __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 454, __pyx_L1_error)
jpayne@68 12208 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@68 12209 if (unlikely(__pyx_t_6)) {
jpayne@68 12210
jpayne@68 12211 /* "pysam/libctabix.pyx":455
jpayne@68 12212 *
jpayne@68 12213 * if start < 0:
jpayne@68 12214 * raise ValueError("start out of range (%i)" % end) # <<<<<<<<<<<<<<
jpayne@68 12215 * elif start > end:
jpayne@68 12216 * raise ValueError(
jpayne@68 12217 */
jpayne@68 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@68 12219 __Pyx_GOTREF(__pyx_t_2);
jpayne@68 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@68 12221 __Pyx_GOTREF(__pyx_t_1);
jpayne@68 12222 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@68 12223 __Pyx_Raise(__pyx_t_1, 0, 0, 0);
jpayne@68 12224 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@68 12225 __PYX_ERR(0, 455, __pyx_L1_error)
jpayne@68 12226
jpayne@68 12227 /* "pysam/libctabix.pyx":454
jpayne@68 12228 * start = 0
jpayne@68 12229 *
jpayne@68 12230 * if start < 0: # <<<<<<<<<<<<<<
jpayne@68 12231 * raise ValueError("start out of range (%i)" % end)
jpayne@68 12232 * elif start > end:
jpayne@68 12233 */
jpayne@68 12234 }
jpayne@68 12235
jpayne@68 12236 /* "pysam/libctabix.pyx":456
jpayne@68 12237 * if start < 0:
jpayne@68 12238 * raise ValueError("start out of range (%i)" % end)
jpayne@68 12239 * elif start > end: # <<<<<<<<<<<<<<
jpayne@68 12240 * raise ValueError(
jpayne@68 12241 * 'start (%i) >= end (%i)' % (start, end))
jpayne@68 12242 */
jpayne@68 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@68 12244 __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 456, __pyx_L1_error)
jpayne@68 12245 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@68 12246 if (unlikely(__pyx_t_6)) {
jpayne@68 12247
jpayne@68 12248 /* "pysam/libctabix.pyx":458
jpayne@68 12249 * elif start > end:
jpayne@68 12250 * raise ValueError(
jpayne@68 12251 * 'start (%i) >= end (%i)' % (start, end)) # <<<<<<<<<<<<<<
jpayne@68 12252 * elif start == end:
jpayne@68 12253 * return EmptyIterator()
jpayne@68 12254 */
jpayne@68 12255 __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 458, __pyx_L1_error)
jpayne@68 12256 __Pyx_GOTREF(__pyx_t_1);
jpayne@68 12257 __Pyx_INCREF(__pyx_v_start);
jpayne@68 12258 __Pyx_GIVEREF(__pyx_v_start);
jpayne@68 12259 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_start)) __PYX_ERR(0, 458, __pyx_L1_error);
jpayne@68 12260 __Pyx_INCREF(__pyx_v_end);
jpayne@68 12261 __Pyx_GIVEREF(__pyx_v_end);
jpayne@68 12262 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_end)) __PYX_ERR(0, 458, __pyx_L1_error);
jpayne@68 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@68 12264 __Pyx_GOTREF(__pyx_t_2);
jpayne@68 12265 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@68 12266
jpayne@68 12267 /* "pysam/libctabix.pyx":457
jpayne@68 12268 * raise ValueError("start out of range (%i)" % end)
jpayne@68 12269 * elif start > end:
jpayne@68 12270 * raise ValueError( # <<<<<<<<<<<<<<
jpayne@68 12271 * 'start (%i) >= end (%i)' % (start, end))
jpayne@68 12272 * elif start == end:
jpayne@68 12273 */
jpayne@68 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@68 12275 __Pyx_GOTREF(__pyx_t_1);
jpayne@68 12276 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@68 12277 __Pyx_Raise(__pyx_t_1, 0, 0, 0);
jpayne@68 12278 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@68 12279 __PYX_ERR(0, 457, __pyx_L1_error)
jpayne@68 12280
jpayne@68 12281 /* "pysam/libctabix.pyx":456
jpayne@68 12282 * if start < 0:
jpayne@68 12283 * raise ValueError("start out of range (%i)" % end)
jpayne@68 12284 * elif start > end: # <<<<<<<<<<<<<<
jpayne@68 12285 * raise ValueError(
jpayne@68 12286 * 'start (%i) >= end (%i)' % (start, end))
jpayne@68 12287 */
jpayne@68 12288 }
jpayne@68 12289
jpayne@68 12290 /* "pysam/libctabix.pyx":459
jpayne@68 12291 * raise ValueError(
jpayne@68 12292 * 'start (%i) >= end (%i)' % (start, end))
jpayne@68 12293 * elif start == end: # <<<<<<<<<<<<<<
jpayne@68 12294 * return EmptyIterator()
jpayne@68 12295 * else:
jpayne@68 12296 */
jpayne@68 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@68 12298 __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 459, __pyx_L1_error)
jpayne@68 12299 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@68 12300 if (__pyx_t_6) {
jpayne@68 12301
jpayne@68 12302 /* "pysam/libctabix.pyx":460
jpayne@68 12303 * 'start (%i) >= end (%i)' % (start, end))
jpayne@68 12304 * elif start == end:
jpayne@68 12305 * return EmptyIterator() # <<<<<<<<<<<<<<
jpayne@68 12306 * else:
jpayne@68 12307 * region = '%s:%i-%i' % (reference, start + 1, end)
jpayne@68 12308 */
jpayne@68 12309 __Pyx_XDECREF(__pyx_r);
jpayne@68 12310 __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_EmptyIterator); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 460, __pyx_L1_error)
jpayne@68 12311 __Pyx_GOTREF(__pyx_t_2);
jpayne@68 12312 __pyx_t_3 = NULL;
jpayne@68 12313 __pyx_t_4 = 0;
jpayne@68 12314 #if CYTHON_UNPACK_METHODS
jpayne@68 12315 if (unlikely(PyMethod_Check(__pyx_t_2))) {
jpayne@68 12316 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
jpayne@68 12317 if (likely(__pyx_t_3)) {
jpayne@68 12318 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
jpayne@68 12319 __Pyx_INCREF(__pyx_t_3);
jpayne@68 12320 __Pyx_INCREF(function);
jpayne@68 12321 __Pyx_DECREF_SET(__pyx_t_2, function);
jpayne@68 12322 __pyx_t_4 = 1;
jpayne@68 12323 }
jpayne@68 12324 }
jpayne@68 12325 #endif
jpayne@68 12326 {
jpayne@68 12327 PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
jpayne@68 12328 __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
jpayne@68 12329 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
jpayne@68 12330 if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 460, __pyx_L1_error)
jpayne@68 12331 __Pyx_GOTREF(__pyx_t_1);
jpayne@68 12332 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@68 12333 }
jpayne@68 12334 __pyx_r = __pyx_t_1;
jpayne@68 12335 __pyx_t_1 = 0;
jpayne@68 12336 goto __pyx_L0;
jpayne@68 12337
jpayne@68 12338 /* "pysam/libctabix.pyx":459
jpayne@68 12339 * raise ValueError(
jpayne@68 12340 * 'start (%i) >= end (%i)' % (start, end))
jpayne@68 12341 * elif start == end: # <<<<<<<<<<<<<<
jpayne@68 12342 * return EmptyIterator()
jpayne@68 12343 * else:
jpayne@68 12344 */
jpayne@68 12345 }
jpayne@68 12346
jpayne@68 12347 /* "pysam/libctabix.pyx":462
jpayne@68 12348 * return EmptyIterator()
jpayne@68 12349 * else:
jpayne@68 12350 * region = '%s:%i-%i' % (reference, start + 1, end) # <<<<<<<<<<<<<<
jpayne@68 12351 * elif start is not None:
jpayne@68 12352 * if start < 0:
jpayne@68 12353 */
jpayne@68 12354 /*else*/ {
jpayne@68 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@68 12356 __Pyx_GOTREF(__pyx_t_1);
jpayne@68 12357 __pyx_t_2 = PyTuple_New(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 462, __pyx_L1_error)
jpayne@68 12358 __Pyx_GOTREF(__pyx_t_2);
jpayne@68 12359 __Pyx_INCREF(__pyx_v_reference);
jpayne@68 12360 __Pyx_GIVEREF(__pyx_v_reference);
jpayne@68 12361 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_reference)) __PYX_ERR(0, 462, __pyx_L1_error);
jpayne@68 12362 __Pyx_GIVEREF(__pyx_t_1);
jpayne@68 12363 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1)) __PYX_ERR(0, 462, __pyx_L1_error);
jpayne@68 12364 __Pyx_INCREF(__pyx_v_end);
jpayne@68 12365 __Pyx_GIVEREF(__pyx_v_end);
jpayne@68 12366 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_end)) __PYX_ERR(0, 462, __pyx_L1_error);
jpayne@68 12367 __pyx_t_1 = 0;
jpayne@68 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@68 12369 __Pyx_GOTREF(__pyx_t_1);
jpayne@68 12370 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@68 12371 __Pyx_DECREF_SET(__pyx_v_region, __pyx_t_1);
jpayne@68 12372 __pyx_t_1 = 0;
jpayne@68 12373 }
jpayne@68 12374
jpayne@68 12375 /* "pysam/libctabix.pyx":448
jpayne@68 12376 * # convert coordinates to region string, which is one-based
jpayne@68 12377 * if reference:
jpayne@68 12378 * if end is not None: # <<<<<<<<<<<<<<
jpayne@68 12379 * if end < 0:
jpayne@68 12380 * raise ValueError("end out of range (%i)" % end)
jpayne@68 12381 */
jpayne@68 12382 goto __pyx_L5;
jpayne@68 12383 }
jpayne@68 12384
jpayne@68 12385 /* "pysam/libctabix.pyx":463
jpayne@68 12386 * else:
jpayne@68 12387 * region = '%s:%i-%i' % (reference, start + 1, end)
jpayne@68 12388 * elif start is not None: # <<<<<<<<<<<<<<
jpayne@68 12389 * if start < 0:
jpayne@68 12390 * raise ValueError("start out of range (%i)" % end)
jpayne@68 12391 */
jpayne@68 12392 __pyx_t_6 = (__pyx_v_start != Py_None);
jpayne@68 12393 if (__pyx_t_6) {
jpayne@68 12394
jpayne@68 12395 /* "pysam/libctabix.pyx":464
jpayne@68 12396 * region = '%s:%i-%i' % (reference, start + 1, end)
jpayne@68 12397 * elif start is not None:
jpayne@68 12398 * if start < 0: # <<<<<<<<<<<<<<
jpayne@68 12399 * raise ValueError("start out of range (%i)" % end)
jpayne@68 12400 * region = '%s:%i' % (reference, start + 1)
jpayne@68 12401 */
jpayne@68 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@68 12403 __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_6 < 0))) __PYX_ERR(0, 464, __pyx_L1_error)
jpayne@68 12404 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@68 12405 if (unlikely(__pyx_t_6)) {
jpayne@68 12406
jpayne@68 12407 /* "pysam/libctabix.pyx":465
jpayne@68 12408 * elif start is not None:
jpayne@68 12409 * if start < 0:
jpayne@68 12410 * raise ValueError("start out of range (%i)" % end) # <<<<<<<<<<<<<<
jpayne@68 12411 * region = '%s:%i' % (reference, start + 1)
jpayne@68 12412 * else:
jpayne@68 12413 */
jpayne@68 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@68 12415 __Pyx_GOTREF(__pyx_t_1);
jpayne@68 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@68 12417 __Pyx_GOTREF(__pyx_t_2);
jpayne@68 12418 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@68 12419 __Pyx_Raise(__pyx_t_2, 0, 0, 0);
jpayne@68 12420 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@68 12421 __PYX_ERR(0, 465, __pyx_L1_error)
jpayne@68 12422
jpayne@68 12423 /* "pysam/libctabix.pyx":464
jpayne@68 12424 * region = '%s:%i-%i' % (reference, start + 1, end)
jpayne@68 12425 * elif start is not None:
jpayne@68 12426 * if start < 0: # <<<<<<<<<<<<<<
jpayne@68 12427 * raise ValueError("start out of range (%i)" % end)
jpayne@68 12428 * region = '%s:%i' % (reference, start + 1)
jpayne@68 12429 */
jpayne@68 12430 }
jpayne@68 12431
jpayne@68 12432 /* "pysam/libctabix.pyx":466
jpayne@68 12433 * if start < 0:
jpayne@68 12434 * raise ValueError("start out of range (%i)" % end)
jpayne@68 12435 * region = '%s:%i' % (reference, start + 1) # <<<<<<<<<<<<<<
jpayne@68 12436 * else:
jpayne@68 12437 * region = reference
jpayne@68 12438 */
jpayne@68 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@68 12440 __Pyx_GOTREF(__pyx_t_2);
jpayne@68 12441 __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 466, __pyx_L1_error)
jpayne@68 12442 __Pyx_GOTREF(__pyx_t_1);
jpayne@68 12443 __Pyx_INCREF(__pyx_v_reference);
jpayne@68 12444 __Pyx_GIVEREF(__pyx_v_reference);
jpayne@68 12445 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_reference)) __PYX_ERR(0, 466, __pyx_L1_error);
jpayne@68 12446 __Pyx_GIVEREF(__pyx_t_2);
jpayne@68 12447 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_2)) __PYX_ERR(0, 466, __pyx_L1_error);
jpayne@68 12448 __pyx_t_2 = 0;
jpayne@68 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@68 12450 __Pyx_GOTREF(__pyx_t_2);
jpayne@68 12451 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@68 12452 __Pyx_DECREF_SET(__pyx_v_region, __pyx_t_2);
jpayne@68 12453 __pyx_t_2 = 0;
jpayne@68 12454
jpayne@68 12455 /* "pysam/libctabix.pyx":463
jpayne@68 12456 * else:
jpayne@68 12457 * region = '%s:%i-%i' % (reference, start + 1, end)
jpayne@68 12458 * elif start is not None: # <<<<<<<<<<<<<<
jpayne@68 12459 * if start < 0:
jpayne@68 12460 * raise ValueError("start out of range (%i)" % end)
jpayne@68 12461 */
jpayne@68 12462 goto __pyx_L5;
jpayne@68 12463 }
jpayne@68 12464
jpayne@68 12465 /* "pysam/libctabix.pyx":468
jpayne@68 12466 * region = '%s:%i' % (reference, start + 1)
jpayne@68 12467 * else:
jpayne@68 12468 * region = reference # <<<<<<<<<<<<<<
jpayne@68 12469 *
jpayne@68 12470 * # get iterator
jpayne@68 12471 */
jpayne@68 12472 /*else*/ {
jpayne@68 12473 __Pyx_INCREF(__pyx_v_reference);
jpayne@68 12474 __Pyx_DECREF_SET(__pyx_v_region, __pyx_v_reference);
jpayne@68 12475 }
jpayne@68 12476 __pyx_L5:;
jpayne@68 12477
jpayne@68 12478 /* "pysam/libctabix.pyx":447
jpayne@68 12479 *
jpayne@68 12480 * # convert coordinates to region string, which is one-based
jpayne@68 12481 * if reference: # <<<<<<<<<<<<<<
jpayne@68 12482 * if end is not None:
jpayne@68 12483 * if end < 0:
jpayne@68 12484 */
jpayne@68 12485 }
jpayne@68 12486
jpayne@68 12487 /* "pysam/libctabix.pyx":476
jpayne@68 12488 *
jpayne@68 12489 * # reopen the same file if necessary
jpayne@68 12490 * if multiple_iterators: # <<<<<<<<<<<<<<
jpayne@68 12491 * fileobj = self._dup()
jpayne@68 12492 * else:
jpayne@68 12493 */
jpayne@68 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@68 12495 if (__pyx_t_6) {
jpayne@68 12496
jpayne@68 12497 /* "pysam/libctabix.pyx":477
jpayne@68 12498 * # reopen the same file if necessary
jpayne@68 12499 * if multiple_iterators:
jpayne@68 12500 * fileobj = self._dup() # <<<<<<<<<<<<<<
jpayne@68 12501 * else:
jpayne@68 12502 * fileobj = self
jpayne@68 12503 */
jpayne@68 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@68 12505 __Pyx_GOTREF(__pyx_t_1);
jpayne@68 12506 __pyx_t_3 = NULL;
jpayne@68 12507 __pyx_t_4 = 0;
jpayne@68 12508 #if CYTHON_UNPACK_METHODS
jpayne@68 12509 if (likely(PyMethod_Check(__pyx_t_1))) {
jpayne@68 12510 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_1);
jpayne@68 12511 if (likely(__pyx_t_3)) {
jpayne@68 12512 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
jpayne@68 12513 __Pyx_INCREF(__pyx_t_3);
jpayne@68 12514 __Pyx_INCREF(function);
jpayne@68 12515 __Pyx_DECREF_SET(__pyx_t_1, function);
jpayne@68 12516 __pyx_t_4 = 1;
jpayne@68 12517 }
jpayne@68 12518 }
jpayne@68 12519 #endif
jpayne@68 12520 {
jpayne@68 12521 PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
jpayne@68 12522 __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_1, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
jpayne@68 12523 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
jpayne@68 12524 if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 477, __pyx_L1_error)
jpayne@68 12525 __Pyx_GOTREF(__pyx_t_2);
jpayne@68 12526 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@68 12527 }
jpayne@68 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@68 12529 __pyx_v_fileobj = ((struct __pyx_obj_5pysam_9libctabix_TabixFile *)__pyx_t_2);
jpayne@68 12530 __pyx_t_2 = 0;
jpayne@68 12531
jpayne@68 12532 /* "pysam/libctabix.pyx":476
jpayne@68 12533 *
jpayne@68 12534 * # reopen the same file if necessary
jpayne@68 12535 * if multiple_iterators: # <<<<<<<<<<<<<<
jpayne@68 12536 * fileobj = self._dup()
jpayne@68 12537 * else:
jpayne@68 12538 */
jpayne@68 12539 goto __pyx_L10;
jpayne@68 12540 }
jpayne@68 12541
jpayne@68 12542 /* "pysam/libctabix.pyx":479
jpayne@68 12543 * fileobj = self._dup()
jpayne@68 12544 * else:
jpayne@68 12545 * fileobj = self # <<<<<<<<<<<<<<
jpayne@68 12546 *
jpayne@68 12547 * if region is None:
jpayne@68 12548 */
jpayne@68 12549 /*else*/ {
jpayne@68 12550 __Pyx_INCREF((PyObject *)__pyx_v_self);
jpayne@68 12551 __pyx_v_fileobj = __pyx_v_self;
jpayne@68 12552 }
jpayne@68 12553 __pyx_L10:;
jpayne@68 12554
jpayne@68 12555 /* "pysam/libctabix.pyx":481
jpayne@68 12556 * fileobj = self
jpayne@68 12557 *
jpayne@68 12558 * if region is None: # <<<<<<<<<<<<<<
jpayne@68 12559 * # without region or reference - iterate from start
jpayne@68 12560 * with nogil:
jpayne@68 12561 */
jpayne@68 12562 __pyx_t_6 = (__pyx_v_region == Py_None);
jpayne@68 12563 if (__pyx_t_6) {
jpayne@68 12564
jpayne@68 12565 /* "pysam/libctabix.pyx":483
jpayne@68 12566 * if region is None:
jpayne@68 12567 * # without region or reference - iterate from start
jpayne@68 12568 * with nogil: # <<<<<<<<<<<<<<
jpayne@68 12569 * itr = tbx_itr_queryi(fileobj.index,
jpayne@68 12570 * HTS_IDX_START,
jpayne@68 12571 */
jpayne@68 12572 {
jpayne@68 12573 #ifdef WITH_THREAD
jpayne@68 12574 PyThreadState *_save;
jpayne@68 12575 _save = NULL;
jpayne@68 12576 Py_UNBLOCK_THREADS
jpayne@68 12577 __Pyx_FastGIL_Remember();
jpayne@68 12578 #endif
jpayne@68 12579 /*try:*/ {
jpayne@68 12580
jpayne@68 12581 /* "pysam/libctabix.pyx":484
jpayne@68 12582 * # without region or reference - iterate from start
jpayne@68 12583 * with nogil:
jpayne@68 12584 * itr = tbx_itr_queryi(fileobj.index, # <<<<<<<<<<<<<<
jpayne@68 12585 * HTS_IDX_START,
jpayne@68 12586 * 0,
jpayne@68 12587 */
jpayne@68 12588 __pyx_v_itr = tbx_itr_queryi(__pyx_v_fileobj->index, HTS_IDX_START, 0, 0);
jpayne@68 12589 }
jpayne@68 12590
jpayne@68 12591 /* "pysam/libctabix.pyx":483
jpayne@68 12592 * if region is None:
jpayne@68 12593 * # without region or reference - iterate from start
jpayne@68 12594 * with nogil: # <<<<<<<<<<<<<<
jpayne@68 12595 * itr = tbx_itr_queryi(fileobj.index,
jpayne@68 12596 * HTS_IDX_START,
jpayne@68 12597 */
jpayne@68 12598 /*finally:*/ {
jpayne@68 12599 /*normal exit:*/{
jpayne@68 12600 #ifdef WITH_THREAD
jpayne@68 12601 __Pyx_FastGIL_Forget();
jpayne@68 12602 Py_BLOCK_THREADS
jpayne@68 12603 #endif
jpayne@68 12604 goto __pyx_L14;
jpayne@68 12605 }
jpayne@68 12606 __pyx_L14:;
jpayne@68 12607 }
jpayne@68 12608 }
jpayne@68 12609
jpayne@68 12610 /* "pysam/libctabix.pyx":481
jpayne@68 12611 * fileobj = self
jpayne@68 12612 *
jpayne@68 12613 * if region is None: # <<<<<<<<<<<<<<
jpayne@68 12614 * # without region or reference - iterate from start
jpayne@68 12615 * with nogil:
jpayne@68 12616 */
jpayne@68 12617 goto __pyx_L11;
jpayne@68 12618 }
jpayne@68 12619
jpayne@68 12620 /* "pysam/libctabix.pyx":489
jpayne@68 12621 * 0)
jpayne@68 12622 * else:
jpayne@68 12623 * s = force_bytes(region, encoding=fileobj.encoding) # <<<<<<<<<<<<<<
jpayne@68 12624 * cstr = s
jpayne@68 12625 * with nogil:
jpayne@68 12626 */
jpayne@68 12627 /*else*/ {
jpayne@68 12628 __pyx_t_2 = __pyx_v_fileobj->encoding;
jpayne@68 12629 __Pyx_INCREF(__pyx_t_2);
jpayne@68 12630 __pyx_t_7.__pyx_n = 1;
jpayne@68 12631 __pyx_t_7.encoding = __pyx_t_2;
jpayne@68 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@68 12633 __Pyx_GOTREF(__pyx_t_1);
jpayne@68 12634 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@68 12635 __pyx_v_s = ((PyObject*)__pyx_t_1);
jpayne@68 12636 __pyx_t_1 = 0;
jpayne@68 12637
jpayne@68 12638 /* "pysam/libctabix.pyx":490
jpayne@68 12639 * else:
jpayne@68 12640 * s = force_bytes(region, encoding=fileobj.encoding)
jpayne@68 12641 * cstr = s # <<<<<<<<<<<<<<
jpayne@68 12642 * with nogil:
jpayne@68 12643 * itr = tbx_itr_querys(fileobj.index, cstr)
jpayne@68 12644 */
jpayne@68 12645 if (unlikely(__pyx_v_s == Py_None)) {
jpayne@68 12646 PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
jpayne@68 12647 __PYX_ERR(0, 490, __pyx_L1_error)
jpayne@68 12648 }
jpayne@68 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@68 12650 __pyx_v_cstr = __pyx_t_8;
jpayne@68 12651
jpayne@68 12652 /* "pysam/libctabix.pyx":491
jpayne@68 12653 * s = force_bytes(region, encoding=fileobj.encoding)
jpayne@68 12654 * cstr = s
jpayne@68 12655 * with nogil: # <<<<<<<<<<<<<<
jpayne@68 12656 * itr = tbx_itr_querys(fileobj.index, cstr)
jpayne@68 12657 *
jpayne@68 12658 */
jpayne@68 12659 {
jpayne@68 12660 #ifdef WITH_THREAD
jpayne@68 12661 PyThreadState *_save;
jpayne@68 12662 _save = NULL;
jpayne@68 12663 Py_UNBLOCK_THREADS
jpayne@68 12664 __Pyx_FastGIL_Remember();
jpayne@68 12665 #endif
jpayne@68 12666 /*try:*/ {
jpayne@68 12667
jpayne@68 12668 /* "pysam/libctabix.pyx":492
jpayne@68 12669 * cstr = s
jpayne@68 12670 * with nogil:
jpayne@68 12671 * itr = tbx_itr_querys(fileobj.index, cstr) # <<<<<<<<<<<<<<
jpayne@68 12672 *
jpayne@68 12673 * if itr == NULL:
jpayne@68 12674 */
jpayne@68 12675 __pyx_v_itr = tbx_itr_querys(__pyx_v_fileobj->index, __pyx_v_cstr);
jpayne@68 12676 }
jpayne@68 12677
jpayne@68 12678 /* "pysam/libctabix.pyx":491
jpayne@68 12679 * s = force_bytes(region, encoding=fileobj.encoding)
jpayne@68 12680 * cstr = s
jpayne@68 12681 * with nogil: # <<<<<<<<<<<<<<
jpayne@68 12682 * itr = tbx_itr_querys(fileobj.index, cstr)
jpayne@68 12683 *
jpayne@68 12684 */
jpayne@68 12685 /*finally:*/ {
jpayne@68 12686 /*normal exit:*/{
jpayne@68 12687 #ifdef WITH_THREAD
jpayne@68 12688 __Pyx_FastGIL_Forget();
jpayne@68 12689 Py_BLOCK_THREADS
jpayne@68 12690 #endif
jpayne@68 12691 goto __pyx_L17;
jpayne@68 12692 }
jpayne@68 12693 __pyx_L17:;
jpayne@68 12694 }
jpayne@68 12695 }
jpayne@68 12696 }
jpayne@68 12697 __pyx_L11:;
jpayne@68 12698
jpayne@68 12699 /* "pysam/libctabix.pyx":494
jpayne@68 12700 * itr = tbx_itr_querys(fileobj.index, cstr)
jpayne@68 12701 *
jpayne@68 12702 * if itr == NULL: # <<<<<<<<<<<<<<
jpayne@68 12703 * if region is None:
jpayne@68 12704 * if len(self.contigs) > 0:
jpayne@68 12705 */
jpayne@68 12706 __pyx_t_6 = (__pyx_v_itr == NULL);
jpayne@68 12707 if (__pyx_t_6) {
jpayne@68 12708
jpayne@68 12709 /* "pysam/libctabix.pyx":495
jpayne@68 12710 *
jpayne@68 12711 * if itr == NULL:
jpayne@68 12712 * if region is None: # <<<<<<<<<<<<<<
jpayne@68 12713 * if len(self.contigs) > 0:
jpayne@68 12714 * # when accessing a tabix file created prior tabix 1.0
jpayne@68 12715 */
jpayne@68 12716 __pyx_t_6 = (__pyx_v_region == Py_None);
jpayne@68 12717 if (likely(__pyx_t_6)) {
jpayne@68 12718
jpayne@68 12719 /* "pysam/libctabix.pyx":496
jpayne@68 12720 * if itr == NULL:
jpayne@68 12721 * if region is None:
jpayne@68 12722 * if len(self.contigs) > 0: # <<<<<<<<<<<<<<
jpayne@68 12723 * # when accessing a tabix file created prior tabix 1.0
jpayne@68 12724 * # the full-file iterator is empty.
jpayne@68 12725 */
jpayne@68 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@68 12727 __Pyx_GOTREF(__pyx_t_1);
jpayne@68 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@68 12729 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@68 12730 __pyx_t_6 = (__pyx_t_9 > 0);
jpayne@68 12731 if (unlikely(__pyx_t_6)) {
jpayne@68 12732
jpayne@68 12733 /* "pysam/libctabix.pyx":499
jpayne@68 12734 * # when accessing a tabix file created prior tabix 1.0
jpayne@68 12735 * # the full-file iterator is empty.
jpayne@68 12736 * raise ValueError( # <<<<<<<<<<<<<<
jpayne@68 12737 * "could not create iterator, possible "
jpayne@68 12738 * "tabix version mismatch")
jpayne@68 12739 */
jpayne@68 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@68 12741 __Pyx_GOTREF(__pyx_t_1);
jpayne@68 12742 __Pyx_Raise(__pyx_t_1, 0, 0, 0);
jpayne@68 12743 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@68 12744 __PYX_ERR(0, 499, __pyx_L1_error)
jpayne@68 12745
jpayne@68 12746 /* "pysam/libctabix.pyx":496
jpayne@68 12747 * if itr == NULL:
jpayne@68 12748 * if region is None:
jpayne@68 12749 * if len(self.contigs) > 0: # <<<<<<<<<<<<<<
jpayne@68 12750 * # when accessing a tabix file created prior tabix 1.0
jpayne@68 12751 * # the full-file iterator is empty.
jpayne@68 12752 */
jpayne@68 12753 }
jpayne@68 12754
jpayne@68 12755 /* "pysam/libctabix.pyx":505
jpayne@68 12756 * # possible reason is that the file is empty -
jpayne@68 12757 * # return an empty iterator
jpayne@68 12758 * return EmptyIterator() # <<<<<<<<<<<<<<
jpayne@68 12759 * else:
jpayne@68 12760 * raise ValueError(
jpayne@68 12761 */
jpayne@68 12762 /*else*/ {
jpayne@68 12763 __Pyx_XDECREF(__pyx_r);
jpayne@68 12764 __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_EmptyIterator); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 505, __pyx_L1_error)
jpayne@68 12765 __Pyx_GOTREF(__pyx_t_2);
jpayne@68 12766 __pyx_t_3 = NULL;
jpayne@68 12767 __pyx_t_4 = 0;
jpayne@68 12768 #if CYTHON_UNPACK_METHODS
jpayne@68 12769 if (unlikely(PyMethod_Check(__pyx_t_2))) {
jpayne@68 12770 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
jpayne@68 12771 if (likely(__pyx_t_3)) {
jpayne@68 12772 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
jpayne@68 12773 __Pyx_INCREF(__pyx_t_3);
jpayne@68 12774 __Pyx_INCREF(function);
jpayne@68 12775 __Pyx_DECREF_SET(__pyx_t_2, function);
jpayne@68 12776 __pyx_t_4 = 1;
jpayne@68 12777 }
jpayne@68 12778 }
jpayne@68 12779 #endif
jpayne@68 12780 {
jpayne@68 12781 PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
jpayne@68 12782 __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
jpayne@68 12783 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
jpayne@68 12784 if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 505, __pyx_L1_error)
jpayne@68 12785 __Pyx_GOTREF(__pyx_t_1);
jpayne@68 12786 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@68 12787 }
jpayne@68 12788 __pyx_r = __pyx_t_1;
jpayne@68 12789 __pyx_t_1 = 0;
jpayne@68 12790 goto __pyx_L0;
jpayne@68 12791 }
jpayne@68 12792
jpayne@68 12793 /* "pysam/libctabix.pyx":495
jpayne@68 12794 *
jpayne@68 12795 * if itr == NULL:
jpayne@68 12796 * if region is None: # <<<<<<<<<<<<<<
jpayne@68 12797 * if len(self.contigs) > 0:
jpayne@68 12798 * # when accessing a tabix file created prior tabix 1.0
jpayne@68 12799 */
jpayne@68 12800 }
jpayne@68 12801
jpayne@68 12802 /* "pysam/libctabix.pyx":507
jpayne@68 12803 * return EmptyIterator()
jpayne@68 12804 * else:
jpayne@68 12805 * raise ValueError( # <<<<<<<<<<<<<<
jpayne@68 12806 * "could not create iterator for region '%s'" %
jpayne@68 12807 * region)
jpayne@68 12808 */
jpayne@68 12809 /*else*/ {
jpayne@68 12810
jpayne@68 12811 /* "pysam/libctabix.pyx":508
jpayne@68 12812 * else:
jpayne@68 12813 * raise ValueError(
jpayne@68 12814 * "could not create iterator for region '%s'" % # <<<<<<<<<<<<<<
jpayne@68 12815 * region)
jpayne@68 12816 *
jpayne@68 12817 */
jpayne@68 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@68 12819 __Pyx_GOTREF(__pyx_t_1);
jpayne@68 12820
jpayne@68 12821 /* "pysam/libctabix.pyx":507
jpayne@68 12822 * return EmptyIterator()
jpayne@68 12823 * else:
jpayne@68 12824 * raise ValueError( # <<<<<<<<<<<<<<
jpayne@68 12825 * "could not create iterator for region '%s'" %
jpayne@68 12826 * region)
jpayne@68 12827 */
jpayne@68 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@68 12829 __Pyx_GOTREF(__pyx_t_2);
jpayne@68 12830 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@68 12831 __Pyx_Raise(__pyx_t_2, 0, 0, 0);
jpayne@68 12832 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@68 12833 __PYX_ERR(0, 507, __pyx_L1_error)
jpayne@68 12834 }
jpayne@68 12835
jpayne@68 12836 /* "pysam/libctabix.pyx":494
jpayne@68 12837 * itr = tbx_itr_querys(fileobj.index, cstr)
jpayne@68 12838 *
jpayne@68 12839 * if itr == NULL: # <<<<<<<<<<<<<<
jpayne@68 12840 * if region is None:
jpayne@68 12841 * if len(self.contigs) > 0:
jpayne@68 12842 */
jpayne@68 12843 }
jpayne@68 12844
jpayne@68 12845 /* "pysam/libctabix.pyx":512
jpayne@68 12846 *
jpayne@68 12847 * # use default parser if no parser is specified
jpayne@68 12848 * if parser is None: # <<<<<<<<<<<<<<
jpayne@68 12849 * parser = fileobj.parser
jpayne@68 12850 *
jpayne@68 12851 */
jpayne@68 12852 __pyx_t_6 = (__pyx_v_parser == Py_None);
jpayne@68 12853 if (__pyx_t_6) {
jpayne@68 12854
jpayne@68 12855 /* "pysam/libctabix.pyx":513
jpayne@68 12856 * # use default parser if no parser is specified
jpayne@68 12857 * if parser is None:
jpayne@68 12858 * parser = fileobj.parser # <<<<<<<<<<<<<<
jpayne@68 12859 *
jpayne@68 12860 * cdef TabixIterator a
jpayne@68 12861 */
jpayne@68 12862 __pyx_t_2 = ((PyObject *)__pyx_v_fileobj->parser);
jpayne@68 12863 __Pyx_INCREF(__pyx_t_2);
jpayne@68 12864 __Pyx_DECREF_SET(__pyx_v_parser, __pyx_t_2);
jpayne@68 12865 __pyx_t_2 = 0;
jpayne@68 12866
jpayne@68 12867 /* "pysam/libctabix.pyx":512
jpayne@68 12868 *
jpayne@68 12869 * # use default parser if no parser is specified
jpayne@68 12870 * if parser is None: # <<<<<<<<<<<<<<
jpayne@68 12871 * parser = fileobj.parser
jpayne@68 12872 *
jpayne@68 12873 */
jpayne@68 12874 }
jpayne@68 12875
jpayne@68 12876 /* "pysam/libctabix.pyx":516
jpayne@68 12877 *
jpayne@68 12878 * cdef TabixIterator a
jpayne@68 12879 * if parser is None: # <<<<<<<<<<<<<<
jpayne@68 12880 * a = TabixIterator(encoding=fileobj.encoding)
jpayne@68 12881 * else:
jpayne@68 12882 */
jpayne@68 12883 __pyx_t_6 = (__pyx_v_parser == Py_None);
jpayne@68 12884 if (__pyx_t_6) {
jpayne@68 12885
jpayne@68 12886 /* "pysam/libctabix.pyx":517
jpayne@68 12887 * cdef TabixIterator a
jpayne@68 12888 * if parser is None:
jpayne@68 12889 * a = TabixIterator(encoding=fileobj.encoding) # <<<<<<<<<<<<<<
jpayne@68 12890 * else:
jpayne@68 12891 * parser.set_encoding(fileobj.encoding)
jpayne@68 12892 */
jpayne@68 12893 __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 517, __pyx_L1_error)
jpayne@68 12894 __Pyx_GOTREF(__pyx_t_2);
jpayne@68 12895 if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_encoding, __pyx_v_fileobj->encoding) < 0) __PYX_ERR(0, 517, __pyx_L1_error)
jpayne@68 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@68 12897 __Pyx_GOTREF(__pyx_t_1);
jpayne@68 12898 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@68 12899 __pyx_v_a = ((struct __pyx_obj_5pysam_9libctabix_TabixIterator *)__pyx_t_1);
jpayne@68 12900 __pyx_t_1 = 0;
jpayne@68 12901
jpayne@68 12902 /* "pysam/libctabix.pyx":516
jpayne@68 12903 *
jpayne@68 12904 * cdef TabixIterator a
jpayne@68 12905 * if parser is None: # <<<<<<<<<<<<<<
jpayne@68 12906 * a = TabixIterator(encoding=fileobj.encoding)
jpayne@68 12907 * else:
jpayne@68 12908 */
jpayne@68 12909 goto __pyx_L22;
jpayne@68 12910 }
jpayne@68 12911
jpayne@68 12912 /* "pysam/libctabix.pyx":519
jpayne@68 12913 * a = TabixIterator(encoding=fileobj.encoding)
jpayne@68 12914 * else:
jpayne@68 12915 * parser.set_encoding(fileobj.encoding) # <<<<<<<<<<<<<<
jpayne@68 12916 * a = TabixIteratorParsed(parser)
jpayne@68 12917 *
jpayne@68 12918 */
jpayne@68 12919 /*else*/ {
jpayne@68 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@68 12921 __Pyx_GOTREF(__pyx_t_2);
jpayne@68 12922 __pyx_t_3 = NULL;
jpayne@68 12923 __pyx_t_4 = 0;
jpayne@68 12924 #if CYTHON_UNPACK_METHODS
jpayne@68 12925 if (likely(PyMethod_Check(__pyx_t_2))) {
jpayne@68 12926 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
jpayne@68 12927 if (likely(__pyx_t_3)) {
jpayne@68 12928 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
jpayne@68 12929 __Pyx_INCREF(__pyx_t_3);
jpayne@68 12930 __Pyx_INCREF(function);
jpayne@68 12931 __Pyx_DECREF_SET(__pyx_t_2, function);
jpayne@68 12932 __pyx_t_4 = 1;
jpayne@68 12933 }
jpayne@68 12934 }
jpayne@68 12935 #endif
jpayne@68 12936 {
jpayne@68 12937 PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_fileobj->encoding};
jpayne@68 12938 __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
jpayne@68 12939 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
jpayne@68 12940 if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 519, __pyx_L1_error)
jpayne@68 12941 __Pyx_GOTREF(__pyx_t_1);
jpayne@68 12942 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@68 12943 }
jpayne@68 12944 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@68 12945
jpayne@68 12946 /* "pysam/libctabix.pyx":520
jpayne@68 12947 * else:
jpayne@68 12948 * parser.set_encoding(fileobj.encoding)
jpayne@68 12949 * a = TabixIteratorParsed(parser) # <<<<<<<<<<<<<<
jpayne@68 12950 *
jpayne@68 12951 * a.tabixfile = fileobj
jpayne@68 12952 */
jpayne@68 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@68 12954 __Pyx_GOTREF(__pyx_t_1);
jpayne@68 12955 __pyx_v_a = ((struct __pyx_obj_5pysam_9libctabix_TabixIterator *)__pyx_t_1);
jpayne@68 12956 __pyx_t_1 = 0;
jpayne@68 12957 }
jpayne@68 12958 __pyx_L22:;
jpayne@68 12959
jpayne@68 12960 /* "pysam/libctabix.pyx":522
jpayne@68 12961 * a = TabixIteratorParsed(parser)
jpayne@68 12962 *
jpayne@68 12963 * a.tabixfile = fileobj # <<<<<<<<<<<<<<
jpayne@68 12964 * a.iterator = itr
jpayne@68 12965 *
jpayne@68 12966 */
jpayne@68 12967 __Pyx_INCREF((PyObject *)__pyx_v_fileobj);
jpayne@68 12968 __Pyx_GIVEREF((PyObject *)__pyx_v_fileobj);
jpayne@68 12969 __Pyx_GOTREF((PyObject *)__pyx_v_a->tabixfile);
jpayne@68 12970 __Pyx_DECREF((PyObject *)__pyx_v_a->tabixfile);
jpayne@68 12971 __pyx_v_a->tabixfile = __pyx_v_fileobj;
jpayne@68 12972
jpayne@68 12973 /* "pysam/libctabix.pyx":523
jpayne@68 12974 *
jpayne@68 12975 * a.tabixfile = fileobj
jpayne@68 12976 * a.iterator = itr # <<<<<<<<<<<<<<
jpayne@68 12977 *
jpayne@68 12978 * return a
jpayne@68 12979 */
jpayne@68 12980 __pyx_v_a->iterator = __pyx_v_itr;
jpayne@68 12981
jpayne@68 12982 /* "pysam/libctabix.pyx":525
jpayne@68 12983 * a.iterator = itr
jpayne@68 12984 *
jpayne@68 12985 * return a # <<<<<<<<<<<<<<
jpayne@68 12986 *
jpayne@68 12987 * ###############################################################
jpayne@68 12988 */
jpayne@68 12989 __Pyx_XDECREF(__pyx_r);
jpayne@68 12990 __Pyx_INCREF((PyObject *)__pyx_v_a);
jpayne@68 12991 __pyx_r = ((PyObject *)__pyx_v_a);
jpayne@68 12992 goto __pyx_L0;
jpayne@68 12993
jpayne@68 12994 /* "pysam/libctabix.pyx":416
jpayne@68 12995 * encoding=self.encoding)
jpayne@68 12996 *
jpayne@68 12997 * def fetch(self, # <<<<<<<<<<<<<<
jpayne@68 12998 * reference=None,
jpayne@68 12999 * start=None,
jpayne@68 13000 */
jpayne@68 13001
jpayne@68 13002 /* function exit code */
jpayne@68 13003 __pyx_L1_error:;
jpayne@68 13004 __Pyx_XDECREF(__pyx_t_1);
jpayne@68 13005 __Pyx_XDECREF(__pyx_t_2);
jpayne@68 13006 __Pyx_XDECREF(__pyx_t_3);
jpayne@68 13007 __Pyx_AddTraceback("pysam.libctabix.TabixFile.fetch", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@68 13008 __pyx_r = NULL;
jpayne@68 13009 __pyx_L0:;
jpayne@68 13010 __Pyx_XDECREF((PyObject *)__pyx_v_fileobj);
jpayne@68 13011 __Pyx_XDECREF(__pyx_v_s);
jpayne@68 13012 __Pyx_XDECREF((PyObject *)__pyx_v_a);
jpayne@68 13013 __Pyx_XDECREF(__pyx_v_start);
jpayne@68 13014 __Pyx_XDECREF(__pyx_v_region);
jpayne@68 13015 __Pyx_XDECREF(__pyx_v_parser);
jpayne@68 13016 __Pyx_XGIVEREF(__pyx_r);
jpayne@68 13017 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@68 13018 __Pyx_RefNannyFinishContext();
jpayne@68 13019 return __pyx_r;
jpayne@68 13020 }
jpayne@68 13021
jpayne@68 13022 /* "pysam/libctabix.pyx":543
jpayne@68 13023 * '''
jpayne@68 13024 *
jpayne@68 13025 * def __get__(self): # <<<<<<<<<<<<<<
jpayne@68 13026 *
jpayne@68 13027 * cdef char *cfilename = self.filename
jpayne@68 13028 */
jpayne@68 13029
jpayne@68 13030 /* Python wrapper */
jpayne@68 13031 static PyObject *__pyx_pw_5pysam_9libctabix_9TabixFile_6header_1__get__(PyObject *__pyx_v_self); /*proto*/
jpayne@68 13032 static PyObject *__pyx_pw_5pysam_9libctabix_9TabixFile_6header_1__get__(PyObject *__pyx_v_self) {
jpayne@68 13033 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@68 13034 PyObject *__pyx_r = 0;
jpayne@68 13035 __Pyx_RefNannyDeclarations
jpayne@68 13036 __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
jpayne@68 13037 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
jpayne@68 13038 __pyx_r = __pyx_pf_5pysam_9libctabix_9TabixFile_6header___get__(((struct __pyx_obj_5pysam_9libctabix_TabixFile *)__pyx_v_self));
jpayne@68 13039
jpayne@68 13040 /* function exit code */
jpayne@68 13041 __Pyx_RefNannyFinishContext();
jpayne@68 13042 return __pyx_r;
jpayne@68 13043 }
jpayne@68 13044
jpayne@68 13045 static PyObject *__pyx_pf_5pysam_9libctabix_9TabixFile_6header___get__(struct __pyx_obj_5pysam_9libctabix_TabixFile *__pyx_v_self) {
jpayne@68 13046 char *__pyx_v_cfilename;
jpayne@68 13047 char *__pyx_v_cfilename_index;
jpayne@68 13048 kstring_t __pyx_v_buffer;
jpayne@68 13049 htsFile *__pyx_v_fp;
jpayne@68 13050 int __pyx_v_KS_SEP_LINE;
jpayne@68 13051 tbx_t *__pyx_v_tbx;
jpayne@68 13052 PyObject *__pyx_v_lines = NULL;
jpayne@68 13053 PyObject *__pyx_r = NULL;
jpayne@68 13054 __Pyx_TraceDeclarations
jpayne@68 13055 __Pyx_RefNannyDeclarations
jpayne@68 13056 char *__pyx_t_1;
jpayne@68 13057 PyObject *__pyx_t_2 = NULL;
jpayne@68 13058 int __pyx_t_3;
jpayne@68 13059 PyObject *__pyx_t_4 = NULL;
jpayne@68 13060 PyObject *__pyx_t_5 = NULL;
jpayne@68 13061 unsigned int __pyx_t_6;
jpayne@68 13062 int __pyx_t_7;
jpayne@68 13063 struct __pyx_opt_args_5pysam_9libcutils_force_str __pyx_t_8;
jpayne@68 13064 int __pyx_t_9;
jpayne@68 13065 int __pyx_lineno = 0;
jpayne@68 13066 const char *__pyx_filename = NULL;
jpayne@68 13067 int __pyx_clineno = 0;
jpayne@68 13068 __Pyx_RefNannySetupContext("__get__", 1);
jpayne@68 13069 __Pyx_TraceCall("__get__", __pyx_f[0], 543, 0, __PYX_ERR(0, 543, __pyx_L1_error));
jpayne@68 13070
jpayne@68 13071 /* "pysam/libctabix.pyx":545
jpayne@68 13072 * def __get__(self):
jpayne@68 13073 *
jpayne@68 13074 * cdef char *cfilename = self.filename # <<<<<<<<<<<<<<
jpayne@68 13075 * cdef char *cfilename_index = self.filename_index
jpayne@68 13076 *
jpayne@68 13077 */
jpayne@68 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@68 13079 __pyx_v_cfilename = __pyx_t_1;
jpayne@68 13080
jpayne@68 13081 /* "pysam/libctabix.pyx":546
jpayne@68 13082 *
jpayne@68 13083 * cdef char *cfilename = self.filename
jpayne@68 13084 * cdef char *cfilename_index = self.filename_index # <<<<<<<<<<<<<<
jpayne@68 13085 *
jpayne@68 13086 * cdef kstring_t buffer
jpayne@68 13087 */
jpayne@68 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@68 13089 __pyx_v_cfilename_index = __pyx_t_1;
jpayne@68 13090
jpayne@68 13091 /* "pysam/libctabix.pyx":549
jpayne@68 13092 *
jpayne@68 13093 * cdef kstring_t buffer
jpayne@68 13094 * buffer.l = buffer.m = 0 # <<<<<<<<<<<<<<
jpayne@68 13095 * buffer.s = NULL
jpayne@68 13096 *
jpayne@68 13097 */
jpayne@68 13098 __pyx_v_buffer.l = 0;
jpayne@68 13099 __pyx_v_buffer.m = 0;
jpayne@68 13100
jpayne@68 13101 /* "pysam/libctabix.pyx":550
jpayne@68 13102 * cdef kstring_t buffer
jpayne@68 13103 * buffer.l = buffer.m = 0
jpayne@68 13104 * buffer.s = NULL # <<<<<<<<<<<<<<
jpayne@68 13105 *
jpayne@68 13106 * cdef htsFile * fp = NULL
jpayne@68 13107 */
jpayne@68 13108 __pyx_v_buffer.s = NULL;
jpayne@68 13109
jpayne@68 13110 /* "pysam/libctabix.pyx":552
jpayne@68 13111 * buffer.s = NULL
jpayne@68 13112 *
jpayne@68 13113 * cdef htsFile * fp = NULL # <<<<<<<<<<<<<<
jpayne@68 13114 * cdef int KS_SEP_LINE = 2
jpayne@68 13115 * cdef tbx_t * tbx = NULL
jpayne@68 13116 */
jpayne@68 13117 __pyx_v_fp = NULL;
jpayne@68 13118
jpayne@68 13119 /* "pysam/libctabix.pyx":553
jpayne@68 13120 *
jpayne@68 13121 * cdef htsFile * fp = NULL
jpayne@68 13122 * cdef int KS_SEP_LINE = 2 # <<<<<<<<<<<<<<
jpayne@68 13123 * cdef tbx_t * tbx = NULL
jpayne@68 13124 * lines = []
jpayne@68 13125 */
jpayne@68 13126 __pyx_v_KS_SEP_LINE = 2;
jpayne@68 13127
jpayne@68 13128 /* "pysam/libctabix.pyx":554
jpayne@68 13129 * cdef htsFile * fp = NULL
jpayne@68 13130 * cdef int KS_SEP_LINE = 2
jpayne@68 13131 * cdef tbx_t * tbx = NULL # <<<<<<<<<<<<<<
jpayne@68 13132 * lines = []
jpayne@68 13133 * with nogil:
jpayne@68 13134 */
jpayne@68 13135 __pyx_v_tbx = NULL;
jpayne@68 13136
jpayne@68 13137 /* "pysam/libctabix.pyx":555
jpayne@68 13138 * cdef int KS_SEP_LINE = 2
jpayne@68 13139 * cdef tbx_t * tbx = NULL
jpayne@68 13140 * lines = [] # <<<<<<<<<<<<<<
jpayne@68 13141 * with nogil:
jpayne@68 13142 * fp = hts_open(cfilename, 'r')
jpayne@68 13143 */
jpayne@68 13144 __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 555, __pyx_L1_error)
jpayne@68 13145 __Pyx_GOTREF(__pyx_t_2);
jpayne@68 13146 __pyx_v_lines = ((PyObject*)__pyx_t_2);
jpayne@68 13147 __pyx_t_2 = 0;
jpayne@68 13148
jpayne@68 13149 /* "pysam/libctabix.pyx":556
jpayne@68 13150 * cdef tbx_t * tbx = NULL
jpayne@68 13151 * lines = []
jpayne@68 13152 * with nogil: # <<<<<<<<<<<<<<
jpayne@68 13153 * fp = hts_open(cfilename, 'r')
jpayne@68 13154 *
jpayne@68 13155 */
jpayne@68 13156 {
jpayne@68 13157 #ifdef WITH_THREAD
jpayne@68 13158 PyThreadState *_save;
jpayne@68 13159 _save = NULL;
jpayne@68 13160 Py_UNBLOCK_THREADS
jpayne@68 13161 __Pyx_FastGIL_Remember();
jpayne@68 13162 #endif
jpayne@68 13163 /*try:*/ {
jpayne@68 13164
jpayne@68 13165 /* "pysam/libctabix.pyx":557
jpayne@68 13166 * lines = []
jpayne@68 13167 * with nogil:
jpayne@68 13168 * fp = hts_open(cfilename, 'r') # <<<<<<<<<<<<<<
jpayne@68 13169 *
jpayne@68 13170 * if fp == NULL:
jpayne@68 13171 */
jpayne@68 13172 __pyx_v_fp = hts_open(__pyx_v_cfilename, ((char const *)"r"));
jpayne@68 13173 }
jpayne@68 13174
jpayne@68 13175 /* "pysam/libctabix.pyx":556
jpayne@68 13176 * cdef tbx_t * tbx = NULL
jpayne@68 13177 * lines = []
jpayne@68 13178 * with nogil: # <<<<<<<<<<<<<<
jpayne@68 13179 * fp = hts_open(cfilename, 'r')
jpayne@68 13180 *
jpayne@68 13181 */
jpayne@68 13182 /*finally:*/ {
jpayne@68 13183 /*normal exit:*/{
jpayne@68 13184 #ifdef WITH_THREAD
jpayne@68 13185 __Pyx_FastGIL_Forget();
jpayne@68 13186 Py_BLOCK_THREADS
jpayne@68 13187 #endif
jpayne@68 13188 goto __pyx_L5;
jpayne@68 13189 }
jpayne@68 13190 __pyx_L5:;
jpayne@68 13191 }
jpayne@68 13192 }
jpayne@68 13193
jpayne@68 13194 /* "pysam/libctabix.pyx":559
jpayne@68 13195 * fp = hts_open(cfilename, 'r')
jpayne@68 13196 *
jpayne@68 13197 * if fp == NULL: # <<<<<<<<<<<<<<
jpayne@68 13198 * raise OSError("could not open {} for reading header".format(self.filename))
jpayne@68 13199 *
jpayne@68 13200 */
jpayne@68 13201 __pyx_t_3 = (__pyx_v_fp == NULL);
jpayne@68 13202 if (unlikely(__pyx_t_3)) {
jpayne@68 13203
jpayne@68 13204 /* "pysam/libctabix.pyx":560
jpayne@68 13205 *
jpayne@68 13206 * if fp == NULL:
jpayne@68 13207 * raise OSError("could not open {} for reading header".format(self.filename)) # <<<<<<<<<<<<<<
jpayne@68 13208 *
jpayne@68 13209 * with nogil:
jpayne@68 13210 */
jpayne@68 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@68 13212 __Pyx_GOTREF(__pyx_t_4);
jpayne@68 13213 __pyx_t_5 = NULL;
jpayne@68 13214 __pyx_t_6 = 0;
jpayne@68 13215 #if CYTHON_UNPACK_METHODS
jpayne@68 13216 if (likely(PyMethod_Check(__pyx_t_4))) {
jpayne@68 13217 __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
jpayne@68 13218 if (likely(__pyx_t_5)) {
jpayne@68 13219 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
jpayne@68 13220 __Pyx_INCREF(__pyx_t_5);
jpayne@68 13221 __Pyx_INCREF(function);
jpayne@68 13222 __Pyx_DECREF_SET(__pyx_t_4, function);
jpayne@68 13223 __pyx_t_6 = 1;
jpayne@68 13224 }
jpayne@68 13225 }
jpayne@68 13226 #endif
jpayne@68 13227 {
jpayne@68 13228 PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_v_self->__pyx_base.filename};
jpayne@68 13229 __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
jpayne@68 13230 __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
jpayne@68 13231 if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 560, __pyx_L1_error)
jpayne@68 13232 __Pyx_GOTREF(__pyx_t_2);
jpayne@68 13233 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
jpayne@68 13234 }
jpayne@68 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@68 13236 __Pyx_GOTREF(__pyx_t_4);
jpayne@68 13237 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@68 13238 __Pyx_Raise(__pyx_t_4, 0, 0, 0);
jpayne@68 13239 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
jpayne@68 13240 __PYX_ERR(0, 560, __pyx_L1_error)
jpayne@68 13241
jpayne@68 13242 /* "pysam/libctabix.pyx":559
jpayne@68 13243 * fp = hts_open(cfilename, 'r')
jpayne@68 13244 *
jpayne@68 13245 * if fp == NULL: # <<<<<<<<<<<<<<
jpayne@68 13246 * raise OSError("could not open {} for reading header".format(self.filename))
jpayne@68 13247 *
jpayne@68 13248 */
jpayne@68 13249 }
jpayne@68 13250
jpayne@68 13251 /* "pysam/libctabix.pyx":562
jpayne@68 13252 * raise OSError("could not open {} for reading header".format(self.filename))
jpayne@68 13253 *
jpayne@68 13254 * with nogil: # <<<<<<<<<<<<<<
jpayne@68 13255 * tbx = tbx_index_load2(cfilename, cfilename_index)
jpayne@68 13256 *
jpayne@68 13257 */
jpayne@68 13258 {
jpayne@68 13259 #ifdef WITH_THREAD
jpayne@68 13260 PyThreadState *_save;
jpayne@68 13261 _save = NULL;
jpayne@68 13262 Py_UNBLOCK_THREADS
jpayne@68 13263 __Pyx_FastGIL_Remember();
jpayne@68 13264 #endif
jpayne@68 13265 /*try:*/ {
jpayne@68 13266
jpayne@68 13267 /* "pysam/libctabix.pyx":563
jpayne@68 13268 *
jpayne@68 13269 * with nogil:
jpayne@68 13270 * tbx = tbx_index_load2(cfilename, cfilename_index) # <<<<<<<<<<<<<<
jpayne@68 13271 *
jpayne@68 13272 * if tbx == NULL:
jpayne@68 13273 */
jpayne@68 13274 __pyx_v_tbx = tbx_index_load2(__pyx_v_cfilename, __pyx_v_cfilename_index);
jpayne@68 13275 }
jpayne@68 13276
jpayne@68 13277 /* "pysam/libctabix.pyx":562
jpayne@68 13278 * raise OSError("could not open {} for reading header".format(self.filename))
jpayne@68 13279 *
jpayne@68 13280 * with nogil: # <<<<<<<<<<<<<<
jpayne@68 13281 * tbx = tbx_index_load2(cfilename, cfilename_index)
jpayne@68 13282 *
jpayne@68 13283 */
jpayne@68 13284 /*finally:*/ {
jpayne@68 13285 /*normal exit:*/{
jpayne@68 13286 #ifdef WITH_THREAD
jpayne@68 13287 __Pyx_FastGIL_Forget();
jpayne@68 13288 Py_BLOCK_THREADS
jpayne@68 13289 #endif
jpayne@68 13290 goto __pyx_L9;
jpayne@68 13291 }
jpayne@68 13292 __pyx_L9:;
jpayne@68 13293 }
jpayne@68 13294 }
jpayne@68 13295
jpayne@68 13296 /* "pysam/libctabix.pyx":565
jpayne@68 13297 * tbx = tbx_index_load2(cfilename, cfilename_index)
jpayne@68 13298 *
jpayne@68 13299 * if tbx == NULL: # <<<<<<<<<<<<<<
jpayne@68 13300 * raise OSError("could not load .tbi/.csi index of {}".format(self.filename))
jpayne@68 13301 *
jpayne@68 13302 */
jpayne@68 13303 __pyx_t_3 = (__pyx_v_tbx == NULL);
jpayne@68 13304 if (unlikely(__pyx_t_3)) {
jpayne@68 13305
jpayne@68 13306 /* "pysam/libctabix.pyx":566
jpayne@68 13307 *
jpayne@68 13308 * if tbx == NULL:
jpayne@68 13309 * raise OSError("could not load .tbi/.csi index of {}".format(self.filename)) # <<<<<<<<<<<<<<
jpayne@68 13310 *
jpayne@68 13311 * while hts_getline(fp, KS_SEP_LINE, &buffer) >= 0:
jpayne@68 13312 */
jpayne@68 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@68 13314 __Pyx_GOTREF(__pyx_t_2);
jpayne@68 13315 __pyx_t_5 = NULL;
jpayne@68 13316 __pyx_t_6 = 0;
jpayne@68 13317 #if CYTHON_UNPACK_METHODS
jpayne@68 13318 if (likely(PyMethod_Check(__pyx_t_2))) {
jpayne@68 13319 __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
jpayne@68 13320 if (likely(__pyx_t_5)) {
jpayne@68 13321 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
jpayne@68 13322 __Pyx_INCREF(__pyx_t_5);
jpayne@68 13323 __Pyx_INCREF(function);
jpayne@68 13324 __Pyx_DECREF_SET(__pyx_t_2, function);
jpayne@68 13325 __pyx_t_6 = 1;
jpayne@68 13326 }
jpayne@68 13327 }
jpayne@68 13328 #endif
jpayne@68 13329 {
jpayne@68 13330 PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_v_self->__pyx_base.filename};
jpayne@68 13331 __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
jpayne@68 13332 __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
jpayne@68 13333 if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 566, __pyx_L1_error)
jpayne@68 13334 __Pyx_GOTREF(__pyx_t_4);
jpayne@68 13335 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@68 13336 }
jpayne@68 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@68 13338 __Pyx_GOTREF(__pyx_t_2);
jpayne@68 13339 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
jpayne@68 13340 __Pyx_Raise(__pyx_t_2, 0, 0, 0);
jpayne@68 13341 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@68 13342 __PYX_ERR(0, 566, __pyx_L1_error)
jpayne@68 13343
jpayne@68 13344 /* "pysam/libctabix.pyx":565
jpayne@68 13345 * tbx = tbx_index_load2(cfilename, cfilename_index)
jpayne@68 13346 *
jpayne@68 13347 * if tbx == NULL: # <<<<<<<<<<<<<<
jpayne@68 13348 * raise OSError("could not load .tbi/.csi index of {}".format(self.filename))
jpayne@68 13349 *
jpayne@68 13350 */
jpayne@68 13351 }
jpayne@68 13352
jpayne@68 13353 /* "pysam/libctabix.pyx":568
jpayne@68 13354 * raise OSError("could not load .tbi/.csi index of {}".format(self.filename))
jpayne@68 13355 *
jpayne@68 13356 * while hts_getline(fp, KS_SEP_LINE, &buffer) >= 0: # <<<<<<<<<<<<<<
jpayne@68 13357 * if not buffer.l or buffer.s[0] != tbx.conf.meta_char:
jpayne@68 13358 * break
jpayne@68 13359 */
jpayne@68 13360 while (1) {
jpayne@68 13361 __pyx_t_3 = (hts_getline(__pyx_v_fp, __pyx_v_KS_SEP_LINE, (&__pyx_v_buffer)) >= 0);
jpayne@68 13362 if (!__pyx_t_3) break;
jpayne@68 13363
jpayne@68 13364 /* "pysam/libctabix.pyx":569
jpayne@68 13365 *
jpayne@68 13366 * while hts_getline(fp, KS_SEP_LINE, &buffer) >= 0:
jpayne@68 13367 * if not buffer.l or buffer.s[0] != tbx.conf.meta_char: # <<<<<<<<<<<<<<
jpayne@68 13368 * break
jpayne@68 13369 * lines.append(force_str(buffer.s, self.encoding))
jpayne@68 13370 */
jpayne@68 13371 __pyx_t_7 = (!(__pyx_v_buffer.l != 0));
jpayne@68 13372 if (!__pyx_t_7) {
jpayne@68 13373 } else {
jpayne@68 13374 __pyx_t_3 = __pyx_t_7;
jpayne@68 13375 goto __pyx_L14_bool_binop_done;
jpayne@68 13376 }
jpayne@68 13377 __pyx_t_7 = ((__pyx_v_buffer.s[0]) != __pyx_v_tbx->conf.meta_char);
jpayne@68 13378 __pyx_t_3 = __pyx_t_7;
jpayne@68 13379 __pyx_L14_bool_binop_done:;
jpayne@68 13380 if (__pyx_t_3) {
jpayne@68 13381
jpayne@68 13382 /* "pysam/libctabix.pyx":570
jpayne@68 13383 * while hts_getline(fp, KS_SEP_LINE, &buffer) >= 0:
jpayne@68 13384 * if not buffer.l or buffer.s[0] != tbx.conf.meta_char:
jpayne@68 13385 * break # <<<<<<<<<<<<<<
jpayne@68 13386 * lines.append(force_str(buffer.s, self.encoding))
jpayne@68 13387 *
jpayne@68 13388 */
jpayne@68 13389 goto __pyx_L12_break;
jpayne@68 13390
jpayne@68 13391 /* "pysam/libctabix.pyx":569
jpayne@68 13392 *
jpayne@68 13393 * while hts_getline(fp, KS_SEP_LINE, &buffer) >= 0:
jpayne@68 13394 * if not buffer.l or buffer.s[0] != tbx.conf.meta_char: # <<<<<<<<<<<<<<
jpayne@68 13395 * break
jpayne@68 13396 * lines.append(force_str(buffer.s, self.encoding))
jpayne@68 13397 */
jpayne@68 13398 }
jpayne@68 13399
jpayne@68 13400 /* "pysam/libctabix.pyx":571
jpayne@68 13401 * if not buffer.l or buffer.s[0] != tbx.conf.meta_char:
jpayne@68 13402 * break
jpayne@68 13403 * lines.append(force_str(buffer.s, self.encoding)) # <<<<<<<<<<<<<<
jpayne@68 13404 *
jpayne@68 13405 * with nogil:
jpayne@68 13406 */
jpayne@68 13407 __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v_buffer.s); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 571, __pyx_L1_error)
jpayne@68 13408 __Pyx_GOTREF(__pyx_t_2);
jpayne@68 13409 __pyx_t_4 = __pyx_v_self->encoding;
jpayne@68 13410 __Pyx_INCREF(__pyx_t_4);
jpayne@68 13411 __pyx_t_8.__pyx_n = 1;
jpayne@68 13412 __pyx_t_8.encoding = __pyx_t_4;
jpayne@68 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@68 13414 __Pyx_GOTREF(__pyx_t_5);
jpayne@68 13415 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@68 13416 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
jpayne@68 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@68 13418 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
jpayne@68 13419 }
jpayne@68 13420 __pyx_L12_break:;
jpayne@68 13421
jpayne@68 13422 /* "pysam/libctabix.pyx":573
jpayne@68 13423 * lines.append(force_str(buffer.s, self.encoding))
jpayne@68 13424 *
jpayne@68 13425 * with nogil: # <<<<<<<<<<<<<<
jpayne@68 13426 * hts_close(fp)
jpayne@68 13427 * free(buffer.s)
jpayne@68 13428 */
jpayne@68 13429 {
jpayne@68 13430 #ifdef WITH_THREAD
jpayne@68 13431 PyThreadState *_save;
jpayne@68 13432 _save = NULL;
jpayne@68 13433 Py_UNBLOCK_THREADS
jpayne@68 13434 __Pyx_FastGIL_Remember();
jpayne@68 13435 #endif
jpayne@68 13436 /*try:*/ {
jpayne@68 13437
jpayne@68 13438 /* "pysam/libctabix.pyx":574
jpayne@68 13439 *
jpayne@68 13440 * with nogil:
jpayne@68 13441 * hts_close(fp) # <<<<<<<<<<<<<<
jpayne@68 13442 * free(buffer.s)
jpayne@68 13443 *
jpayne@68 13444 */
jpayne@68 13445 (void)(hts_close(__pyx_v_fp));
jpayne@68 13446
jpayne@68 13447 /* "pysam/libctabix.pyx":575
jpayne@68 13448 * with nogil:
jpayne@68 13449 * hts_close(fp)
jpayne@68 13450 * free(buffer.s) # <<<<<<<<<<<<<<
jpayne@68 13451 *
jpayne@68 13452 * return lines
jpayne@68 13453 */
jpayne@68 13454 free(__pyx_v_buffer.s);
jpayne@68 13455 }
jpayne@68 13456
jpayne@68 13457 /* "pysam/libctabix.pyx":573
jpayne@68 13458 * lines.append(force_str(buffer.s, self.encoding))
jpayne@68 13459 *
jpayne@68 13460 * with nogil: # <<<<<<<<<<<<<<
jpayne@68 13461 * hts_close(fp)
jpayne@68 13462 * free(buffer.s)
jpayne@68 13463 */
jpayne@68 13464 /*finally:*/ {
jpayne@68 13465 /*normal exit:*/{
jpayne@68 13466 #ifdef WITH_THREAD
jpayne@68 13467 __Pyx_FastGIL_Forget();
jpayne@68 13468 Py_BLOCK_THREADS
jpayne@68 13469 #endif
jpayne@68 13470 goto __pyx_L18;
jpayne@68 13471 }
jpayne@68 13472 __pyx_L18:;
jpayne@68 13473 }
jpayne@68 13474 }
jpayne@68 13475
jpayne@68 13476 /* "pysam/libctabix.pyx":577
jpayne@68 13477 * free(buffer.s)
jpayne@68 13478 *
jpayne@68 13479 * return lines # <<<<<<<<<<<<<<
jpayne@68 13480 *
jpayne@68 13481 * property contigs:
jpayne@68 13482 */
jpayne@68 13483 __Pyx_XDECREF(__pyx_r);
jpayne@68 13484 __Pyx_INCREF(__pyx_v_lines);
jpayne@68 13485 __pyx_r = __pyx_v_lines;
jpayne@68 13486 goto __pyx_L0;
jpayne@68 13487
jpayne@68 13488 /* "pysam/libctabix.pyx":543
jpayne@68 13489 * '''
jpayne@68 13490 *
jpayne@68 13491 * def __get__(self): # <<<<<<<<<<<<<<
jpayne@68 13492 *
jpayne@68 13493 * cdef char *cfilename = self.filename
jpayne@68 13494 */
jpayne@68 13495
jpayne@68 13496 /* function exit code */
jpayne@68 13497 __pyx_L1_error:;
jpayne@68 13498 __Pyx_XDECREF(__pyx_t_2);
jpayne@68 13499 __Pyx_XDECREF(__pyx_t_4);
jpayne@68 13500 __Pyx_XDECREF(__pyx_t_5);
jpayne@68 13501 __Pyx_AddTraceback("pysam.libctabix.TabixFile.header.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@68 13502 __pyx_r = NULL;
jpayne@68 13503 __pyx_L0:;
jpayne@68 13504 __Pyx_XDECREF(__pyx_v_lines);
jpayne@68 13505 __Pyx_XGIVEREF(__pyx_r);
jpayne@68 13506 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@68 13507 __Pyx_RefNannyFinishContext();
jpayne@68 13508 return __pyx_r;
jpayne@68 13509 }
jpayne@68 13510
jpayne@68 13511 /* "pysam/libctabix.pyx":581
jpayne@68 13512 * property contigs:
jpayne@68 13513 * '''list of chromosome names'''
jpayne@68 13514 * def __get__(self): # <<<<<<<<<<<<<<
jpayne@68 13515 * cdef const char ** sequences
jpayne@68 13516 * cdef int nsequences
jpayne@68 13517 */
jpayne@68 13518
jpayne@68 13519 /* Python wrapper */
jpayne@68 13520 static PyObject *__pyx_pw_5pysam_9libctabix_9TabixFile_7contigs_1__get__(PyObject *__pyx_v_self); /*proto*/
jpayne@68 13521 static PyObject *__pyx_pw_5pysam_9libctabix_9TabixFile_7contigs_1__get__(PyObject *__pyx_v_self) {
jpayne@68 13522 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@68 13523 PyObject *__pyx_r = 0;
jpayne@68 13524 __Pyx_RefNannyDeclarations
jpayne@68 13525 __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
jpayne@68 13526 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
jpayne@68 13527 __pyx_r = __pyx_pf_5pysam_9libctabix_9TabixFile_7contigs___get__(((struct __pyx_obj_5pysam_9libctabix_TabixFile *)__pyx_v_self));
jpayne@68 13528
jpayne@68 13529 /* function exit code */
jpayne@68 13530 __Pyx_RefNannyFinishContext();
jpayne@68 13531 return __pyx_r;
jpayne@68 13532 }
jpayne@68 13533
jpayne@68 13534 static PyObject *__pyx_pf_5pysam_9libctabix_9TabixFile_7contigs___get__(struct __pyx_obj_5pysam_9libctabix_TabixFile *__pyx_v_self) {
jpayne@68 13535 char const **__pyx_v_sequences;
jpayne@68 13536 int __pyx_v_nsequences;
jpayne@68 13537 int __pyx_v_x;
jpayne@68 13538 PyObject *__pyx_v_result = NULL;
jpayne@68 13539 PyObject *__pyx_r = NULL;
jpayne@68 13540 __Pyx_TraceDeclarations
jpayne@68 13541 __Pyx_RefNannyDeclarations
jpayne@68 13542 PyObject *__pyx_t_1 = NULL;
jpayne@68 13543 int __pyx_t_2;
jpayne@68 13544 PyObject *__pyx_t_3 = NULL;
jpayne@68 13545 int __pyx_t_4;
jpayne@68 13546 int __pyx_lineno = 0;
jpayne@68 13547 const char *__pyx_filename = NULL;
jpayne@68 13548 int __pyx_clineno = 0;
jpayne@68 13549 __Pyx_RefNannySetupContext("__get__", 1);
jpayne@68 13550 __Pyx_TraceCall("__get__", __pyx_f[0], 581, 0, __PYX_ERR(0, 581, __pyx_L1_error));
jpayne@68 13551
jpayne@68 13552 /* "pysam/libctabix.pyx":585
jpayne@68 13553 * cdef int nsequences
jpayne@68 13554 *
jpayne@68 13555 * with nogil: # <<<<<<<<<<<<<<
jpayne@68 13556 * sequences = tbx_seqnames(self.index, &nsequences)
jpayne@68 13557 * cdef int x
jpayne@68 13558 */
jpayne@68 13559 {
jpayne@68 13560 #ifdef WITH_THREAD
jpayne@68 13561 PyThreadState *_save;
jpayne@68 13562 _save = NULL;
jpayne@68 13563 Py_UNBLOCK_THREADS
jpayne@68 13564 __Pyx_FastGIL_Remember();
jpayne@68 13565 #endif
jpayne@68 13566 /*try:*/ {
jpayne@68 13567
jpayne@68 13568 /* "pysam/libctabix.pyx":586
jpayne@68 13569 *
jpayne@68 13570 * with nogil:
jpayne@68 13571 * sequences = tbx_seqnames(self.index, &nsequences) # <<<<<<<<<<<<<<
jpayne@68 13572 * cdef int x
jpayne@68 13573 * result = []
jpayne@68 13574 */
jpayne@68 13575 __pyx_v_sequences = tbx_seqnames(__pyx_v_self->index, (&__pyx_v_nsequences));
jpayne@68 13576 }
jpayne@68 13577
jpayne@68 13578 /* "pysam/libctabix.pyx":585
jpayne@68 13579 * cdef int nsequences
jpayne@68 13580 *
jpayne@68 13581 * with nogil: # <<<<<<<<<<<<<<
jpayne@68 13582 * sequences = tbx_seqnames(self.index, &nsequences)
jpayne@68 13583 * cdef int x
jpayne@68 13584 */
jpayne@68 13585 /*finally:*/ {
jpayne@68 13586 /*normal exit:*/{
jpayne@68 13587 #ifdef WITH_THREAD
jpayne@68 13588 __Pyx_FastGIL_Forget();
jpayne@68 13589 Py_BLOCK_THREADS
jpayne@68 13590 #endif
jpayne@68 13591 goto __pyx_L5;
jpayne@68 13592 }
jpayne@68 13593 __pyx_L5:;
jpayne@68 13594 }
jpayne@68 13595 }
jpayne@68 13596
jpayne@68 13597 /* "pysam/libctabix.pyx":588
jpayne@68 13598 * sequences = tbx_seqnames(self.index, &nsequences)
jpayne@68 13599 * cdef int x
jpayne@68 13600 * result = [] # <<<<<<<<<<<<<<
jpayne@68 13601 * for x from 0 <= x < nsequences:
jpayne@68 13602 * result.append(force_str(sequences[x]))
jpayne@68 13603 */
jpayne@68 13604 __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 588, __pyx_L1_error)
jpayne@68 13605 __Pyx_GOTREF(__pyx_t_1);
jpayne@68 13606 __pyx_v_result = ((PyObject*)__pyx_t_1);
jpayne@68 13607 __pyx_t_1 = 0;
jpayne@68 13608
jpayne@68 13609 /* "pysam/libctabix.pyx":589
jpayne@68 13610 * cdef int x
jpayne@68 13611 * result = []
jpayne@68 13612 * for x from 0 <= x < nsequences: # <<<<<<<<<<<<<<
jpayne@68 13613 * result.append(force_str(sequences[x]))
jpayne@68 13614 *
jpayne@68 13615 */
jpayne@68 13616 __pyx_t_2 = __pyx_v_nsequences;
jpayne@68 13617 for (__pyx_v_x = 0; __pyx_v_x < __pyx_t_2; __pyx_v_x++) {
jpayne@68 13618
jpayne@68 13619 /* "pysam/libctabix.pyx":590
jpayne@68 13620 * result = []
jpayne@68 13621 * for x from 0 <= x < nsequences:
jpayne@68 13622 * result.append(force_str(sequences[x])) # <<<<<<<<<<<<<<
jpayne@68 13623 *
jpayne@68 13624 * # htslib instructions:
jpayne@68 13625 */
jpayne@68 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@68 13627 __Pyx_GOTREF(__pyx_t_1);
jpayne@68 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@68 13629 __Pyx_GOTREF(__pyx_t_3);
jpayne@68 13630 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@68 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@68 13632 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
jpayne@68 13633 }
jpayne@68 13634
jpayne@68 13635 /* "pysam/libctabix.pyx":594
jpayne@68 13636 * # htslib instructions:
jpayne@68 13637 * # only free container, not the sequences themselves
jpayne@68 13638 * free(sequences) # <<<<<<<<<<<<<<
jpayne@68 13639 *
jpayne@68 13640 * return result
jpayne@68 13641 */
jpayne@68 13642 free(__pyx_v_sequences);
jpayne@68 13643
jpayne@68 13644 /* "pysam/libctabix.pyx":596
jpayne@68 13645 * free(sequences)
jpayne@68 13646 *
jpayne@68 13647 * return result # <<<<<<<<<<<<<<
jpayne@68 13648 *
jpayne@68 13649 * def close(self):
jpayne@68 13650 */
jpayne@68 13651 __Pyx_XDECREF(__pyx_r);
jpayne@68 13652 __Pyx_INCREF(__pyx_v_result);
jpayne@68 13653 __pyx_r = __pyx_v_result;
jpayne@68 13654 goto __pyx_L0;
jpayne@68 13655
jpayne@68 13656 /* "pysam/libctabix.pyx":581
jpayne@68 13657 * property contigs:
jpayne@68 13658 * '''list of chromosome names'''
jpayne@68 13659 * def __get__(self): # <<<<<<<<<<<<<<
jpayne@68 13660 * cdef const char ** sequences
jpayne@68 13661 * cdef int nsequences
jpayne@68 13662 */
jpayne@68 13663
jpayne@68 13664 /* function exit code */
jpayne@68 13665 __pyx_L1_error:;
jpayne@68 13666 __Pyx_XDECREF(__pyx_t_1);
jpayne@68 13667 __Pyx_XDECREF(__pyx_t_3);
jpayne@68 13668 __Pyx_AddTraceback("pysam.libctabix.TabixFile.contigs.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@68 13669 __pyx_r = NULL;
jpayne@68 13670 __pyx_L0:;
jpayne@68 13671 __Pyx_XDECREF(__pyx_v_result);
jpayne@68 13672 __Pyx_XGIVEREF(__pyx_r);
jpayne@68 13673 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@68 13674 __Pyx_RefNannyFinishContext();
jpayne@68 13675 return __pyx_r;
jpayne@68 13676 }
jpayne@68 13677
jpayne@68 13678 /* "pysam/libctabix.pyx":598
jpayne@68 13679 * return result
jpayne@68 13680 *
jpayne@68 13681 * def close(self): # <<<<<<<<<<<<<<
jpayne@68 13682 * '''
jpayne@68 13683 * closes the :class:`pysam.TabixFile`.'''
jpayne@68 13684 */
jpayne@68 13685
jpayne@68 13686 /* Python wrapper */
jpayne@68 13687 static PyObject *__pyx_pw_5pysam_9libctabix_9TabixFile_9close(PyObject *__pyx_v_self,
jpayne@68 13688 #if CYTHON_METH_FASTCALL
jpayne@68 13689 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@68 13690 #else
jpayne@68 13691 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@68 13692 #endif
jpayne@68 13693 ); /*proto*/
jpayne@68 13694 PyDoc_STRVAR(__pyx_doc_5pysam_9libctabix_9TabixFile_8close, "TabixFile.close(self)\n\n closes the :class:`pysam.TabixFile`.");
jpayne@68 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@68 13696 static PyObject *__pyx_pw_5pysam_9libctabix_9TabixFile_9close(PyObject *__pyx_v_self,
jpayne@68 13697 #if CYTHON_METH_FASTCALL
jpayne@68 13698 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@68 13699 #else
jpayne@68 13700 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@68 13701 #endif
jpayne@68 13702 ) {
jpayne@68 13703 #if !CYTHON_METH_FASTCALL
jpayne@68 13704 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
jpayne@68 13705 #endif
jpayne@68 13706 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@68 13707 PyObject *__pyx_r = 0;
jpayne@68 13708 __Pyx_RefNannyDeclarations
jpayne@68 13709 __Pyx_RefNannySetupContext("close (wrapper)", 0);
jpayne@68 13710 #if !CYTHON_METH_FASTCALL
jpayne@68 13711 #if CYTHON_ASSUME_SAFE_MACROS
jpayne@68 13712 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
jpayne@68 13713 #else
jpayne@68 13714 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
jpayne@68 13715 #endif
jpayne@68 13716 #endif
jpayne@68 13717 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
jpayne@68 13718 if (unlikely(__pyx_nargs > 0)) {
jpayne@68 13719 __Pyx_RaiseArgtupleInvalid("close", 1, 0, 0, __pyx_nargs); return NULL;}
jpayne@68 13720 if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "close", 0))) return NULL;
jpayne@68 13721 __pyx_r = __pyx_pf_5pysam_9libctabix_9TabixFile_8close(((struct __pyx_obj_5pysam_9libctabix_TabixFile *)__pyx_v_self));
jpayne@68 13722
jpayne@68 13723 /* function exit code */
jpayne@68 13724 __Pyx_RefNannyFinishContext();
jpayne@68 13725 return __pyx_r;
jpayne@68 13726 }
jpayne@68 13727
jpayne@68 13728 static PyObject *__pyx_pf_5pysam_9libctabix_9TabixFile_8close(struct __pyx_obj_5pysam_9libctabix_TabixFile *__pyx_v_self) {
jpayne@68 13729 PyObject *__pyx_r = NULL;
jpayne@68 13730 __Pyx_TraceDeclarations
jpayne@68 13731 __Pyx_RefNannyDeclarations
jpayne@68 13732 int __pyx_t_1;
jpayne@68 13733 int __pyx_lineno = 0;
jpayne@68 13734 const char *__pyx_filename = NULL;
jpayne@68 13735 int __pyx_clineno = 0;
jpayne@68 13736 __Pyx_TraceFrameInit(__pyx_codeobj__21)
jpayne@68 13737 __Pyx_RefNannySetupContext("close", 1);
jpayne@68 13738 __Pyx_TraceCall("close", __pyx_f[0], 598, 0, __PYX_ERR(0, 598, __pyx_L1_error));
jpayne@68 13739
jpayne@68 13740 /* "pysam/libctabix.pyx":601
jpayne@68 13741 * '''
jpayne@68 13742 * closes the :class:`pysam.TabixFile`.'''
jpayne@68 13743 * if self.htsfile != NULL: # <<<<<<<<<<<<<<
jpayne@68 13744 * hts_close(self.htsfile)
jpayne@68 13745 * self.htsfile = NULL
jpayne@68 13746 */
jpayne@68 13747 __pyx_t_1 = (__pyx_v_self->__pyx_base.htsfile != NULL);
jpayne@68 13748 if (__pyx_t_1) {
jpayne@68 13749
jpayne@68 13750 /* "pysam/libctabix.pyx":602
jpayne@68 13751 * closes the :class:`pysam.TabixFile`.'''
jpayne@68 13752 * if self.htsfile != NULL:
jpayne@68 13753 * hts_close(self.htsfile) # <<<<<<<<<<<<<<
jpayne@68 13754 * self.htsfile = NULL
jpayne@68 13755 * if self.index != NULL:
jpayne@68 13756 */
jpayne@68 13757 (void)(hts_close(__pyx_v_self->__pyx_base.htsfile));
jpayne@68 13758
jpayne@68 13759 /* "pysam/libctabix.pyx":603
jpayne@68 13760 * if self.htsfile != NULL:
jpayne@68 13761 * hts_close(self.htsfile)
jpayne@68 13762 * self.htsfile = NULL # <<<<<<<<<<<<<<
jpayne@68 13763 * if self.index != NULL:
jpayne@68 13764 * tbx_destroy(self.index)
jpayne@68 13765 */
jpayne@68 13766 __pyx_v_self->__pyx_base.htsfile = NULL;
jpayne@68 13767
jpayne@68 13768 /* "pysam/libctabix.pyx":601
jpayne@68 13769 * '''
jpayne@68 13770 * closes the :class:`pysam.TabixFile`.'''
jpayne@68 13771 * if self.htsfile != NULL: # <<<<<<<<<<<<<<
jpayne@68 13772 * hts_close(self.htsfile)
jpayne@68 13773 * self.htsfile = NULL
jpayne@68 13774 */
jpayne@68 13775 }
jpayne@68 13776
jpayne@68 13777 /* "pysam/libctabix.pyx":604
jpayne@68 13778 * hts_close(self.htsfile)
jpayne@68 13779 * self.htsfile = NULL
jpayne@68 13780 * if self.index != NULL: # <<<<<<<<<<<<<<
jpayne@68 13781 * tbx_destroy(self.index)
jpayne@68 13782 * self.index = NULL
jpayne@68 13783 */
jpayne@68 13784 __pyx_t_1 = (__pyx_v_self->index != NULL);
jpayne@68 13785 if (__pyx_t_1) {
jpayne@68 13786
jpayne@68 13787 /* "pysam/libctabix.pyx":605
jpayne@68 13788 * self.htsfile = NULL
jpayne@68 13789 * if self.index != NULL:
jpayne@68 13790 * tbx_destroy(self.index) # <<<<<<<<<<<<<<
jpayne@68 13791 * self.index = NULL
jpayne@68 13792 *
jpayne@68 13793 */
jpayne@68 13794 tbx_destroy(__pyx_v_self->index);
jpayne@68 13795
jpayne@68 13796 /* "pysam/libctabix.pyx":606
jpayne@68 13797 * if self.index != NULL:
jpayne@68 13798 * tbx_destroy(self.index)
jpayne@68 13799 * self.index = NULL # <<<<<<<<<<<<<<
jpayne@68 13800 *
jpayne@68 13801 * def __dealloc__( self ):
jpayne@68 13802 */
jpayne@68 13803 __pyx_v_self->index = NULL;
jpayne@68 13804
jpayne@68 13805 /* "pysam/libctabix.pyx":604
jpayne@68 13806 * hts_close(self.htsfile)
jpayne@68 13807 * self.htsfile = NULL
jpayne@68 13808 * if self.index != NULL: # <<<<<<<<<<<<<<
jpayne@68 13809 * tbx_destroy(self.index)
jpayne@68 13810 * self.index = NULL
jpayne@68 13811 */
jpayne@68 13812 }
jpayne@68 13813
jpayne@68 13814 /* "pysam/libctabix.pyx":598
jpayne@68 13815 * return result
jpayne@68 13816 *
jpayne@68 13817 * def close(self): # <<<<<<<<<<<<<<
jpayne@68 13818 * '''
jpayne@68 13819 * closes the :class:`pysam.TabixFile`.'''
jpayne@68 13820 */
jpayne@68 13821
jpayne@68 13822 /* function exit code */
jpayne@68 13823 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
jpayne@68 13824 goto __pyx_L0;
jpayne@68 13825 __pyx_L1_error:;
jpayne@68 13826 __Pyx_AddTraceback("pysam.libctabix.TabixFile.close", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@68 13827 __pyx_r = NULL;
jpayne@68 13828 __pyx_L0:;
jpayne@68 13829 __Pyx_XGIVEREF(__pyx_r);
jpayne@68 13830 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@68 13831 __Pyx_RefNannyFinishContext();
jpayne@68 13832 return __pyx_r;
jpayne@68 13833 }
jpayne@68 13834
jpayne@68 13835 /* "pysam/libctabix.pyx":608
jpayne@68 13836 * self.index = NULL
jpayne@68 13837 *
jpayne@68 13838 * def __dealloc__( self ): # <<<<<<<<<<<<<<
jpayne@68 13839 * # remember: dealloc cannot call other python methods
jpayne@68 13840 * # note: no doc string
jpayne@68 13841 */
jpayne@68 13842
jpayne@68 13843 /* Python wrapper */
jpayne@68 13844 static void __pyx_pw_5pysam_9libctabix_9TabixFile_11__dealloc__(PyObject *__pyx_v_self); /*proto*/
jpayne@68 13845 static void __pyx_pw_5pysam_9libctabix_9TabixFile_11__dealloc__(PyObject *__pyx_v_self) {
jpayne@68 13846 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@68 13847 __Pyx_RefNannyDeclarations
jpayne@68 13848 __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
jpayne@68 13849 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
jpayne@68 13850 __pyx_pf_5pysam_9libctabix_9TabixFile_10__dealloc__(((struct __pyx_obj_5pysam_9libctabix_TabixFile *)__pyx_v_self));
jpayne@68 13851
jpayne@68 13852 /* function exit code */
jpayne@68 13853 __Pyx_RefNannyFinishContext();
jpayne@68 13854 }
jpayne@68 13855
jpayne@68 13856 static void __pyx_pf_5pysam_9libctabix_9TabixFile_10__dealloc__(struct __pyx_obj_5pysam_9libctabix_TabixFile *__pyx_v_self) {
jpayne@68 13857 __Pyx_TraceDeclarations
jpayne@68 13858 int __pyx_t_1;
jpayne@68 13859 int __pyx_lineno = 0;
jpayne@68 13860 const char *__pyx_filename = NULL;
jpayne@68 13861 int __pyx_clineno = 0;
jpayne@68 13862 __Pyx_TraceCall("__dealloc__", __pyx_f[0], 608, 0, __PYX_ERR(0, 608, __pyx_L1_error));
jpayne@68 13863
jpayne@68 13864 /* "pysam/libctabix.pyx":612
jpayne@68 13865 * # note: no doc string
jpayne@68 13866 * # note: __del__ is not called.
jpayne@68 13867 * if self.htsfile != NULL: # <<<<<<<<<<<<<<
jpayne@68 13868 * hts_close(self.htsfile)
jpayne@68 13869 * self.htsfile = NULL
jpayne@68 13870 */
jpayne@68 13871 __pyx_t_1 = (__pyx_v_self->__pyx_base.htsfile != NULL);
jpayne@68 13872 if (__pyx_t_1) {
jpayne@68 13873
jpayne@68 13874 /* "pysam/libctabix.pyx":613
jpayne@68 13875 * # note: __del__ is not called.
jpayne@68 13876 * if self.htsfile != NULL:
jpayne@68 13877 * hts_close(self.htsfile) # <<<<<<<<<<<<<<
jpayne@68 13878 * self.htsfile = NULL
jpayne@68 13879 * if self.index != NULL:
jpayne@68 13880 */
jpayne@68 13881 (void)(hts_close(__pyx_v_self->__pyx_base.htsfile));
jpayne@68 13882
jpayne@68 13883 /* "pysam/libctabix.pyx":614
jpayne@68 13884 * if self.htsfile != NULL:
jpayne@68 13885 * hts_close(self.htsfile)
jpayne@68 13886 * self.htsfile = NULL # <<<<<<<<<<<<<<
jpayne@68 13887 * if self.index != NULL:
jpayne@68 13888 * tbx_destroy(self.index)
jpayne@68 13889 */
jpayne@68 13890 __pyx_v_self->__pyx_base.htsfile = NULL;
jpayne@68 13891
jpayne@68 13892 /* "pysam/libctabix.pyx":612
jpayne@68 13893 * # note: no doc string
jpayne@68 13894 * # note: __del__ is not called.
jpayne@68 13895 * if self.htsfile != NULL: # <<<<<<<<<<<<<<
jpayne@68 13896 * hts_close(self.htsfile)
jpayne@68 13897 * self.htsfile = NULL
jpayne@68 13898 */
jpayne@68 13899 }
jpayne@68 13900
jpayne@68 13901 /* "pysam/libctabix.pyx":615
jpayne@68 13902 * hts_close(self.htsfile)
jpayne@68 13903 * self.htsfile = NULL
jpayne@68 13904 * if self.index != NULL: # <<<<<<<<<<<<<<
jpayne@68 13905 * tbx_destroy(self.index)
jpayne@68 13906 *
jpayne@68 13907 */
jpayne@68 13908 __pyx_t_1 = (__pyx_v_self->index != NULL);
jpayne@68 13909 if (__pyx_t_1) {
jpayne@68 13910
jpayne@68 13911 /* "pysam/libctabix.pyx":616
jpayne@68 13912 * self.htsfile = NULL
jpayne@68 13913 * if self.index != NULL:
jpayne@68 13914 * tbx_destroy(self.index) # <<<<<<<<<<<<<<
jpayne@68 13915 *
jpayne@68 13916 *
jpayne@68 13917 */
jpayne@68 13918 tbx_destroy(__pyx_v_self->index);
jpayne@68 13919
jpayne@68 13920 /* "pysam/libctabix.pyx":615
jpayne@68 13921 * hts_close(self.htsfile)
jpayne@68 13922 * self.htsfile = NULL
jpayne@68 13923 * if self.index != NULL: # <<<<<<<<<<<<<<
jpayne@68 13924 * tbx_destroy(self.index)
jpayne@68 13925 *
jpayne@68 13926 */
jpayne@68 13927 }
jpayne@68 13928
jpayne@68 13929 /* "pysam/libctabix.pyx":608
jpayne@68 13930 * self.index = NULL
jpayne@68 13931 *
jpayne@68 13932 * def __dealloc__( self ): # <<<<<<<<<<<<<<
jpayne@68 13933 * # remember: dealloc cannot call other python methods
jpayne@68 13934 * # note: no doc string
jpayne@68 13935 */
jpayne@68 13936
jpayne@68 13937 /* function exit code */
jpayne@68 13938 goto __pyx_L0;
jpayne@68 13939 __pyx_L1_error:;
jpayne@68 13940 __Pyx_WriteUnraisable("pysam.libctabix.TabixFile.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
jpayne@68 13941 __pyx_L0:;
jpayne@68 13942 __Pyx_TraceReturn(Py_None, 0);
jpayne@68 13943 }
jpayne@68 13944
jpayne@68 13945 /* "pysam/libctabix.pxd":65
jpayne@68 13946 * cdef tbx_t * index
jpayne@68 13947 *
jpayne@68 13948 * cdef readonly object filename_index # <<<<<<<<<<<<<<
jpayne@68 13949 *
jpayne@68 13950 * cdef Parser parser
jpayne@68 13951 */
jpayne@68 13952
jpayne@68 13953 /* Python wrapper */
jpayne@68 13954 static PyObject *__pyx_pw_5pysam_9libctabix_9TabixFile_14filename_index_1__get__(PyObject *__pyx_v_self); /*proto*/
jpayne@68 13955 static PyObject *__pyx_pw_5pysam_9libctabix_9TabixFile_14filename_index_1__get__(PyObject *__pyx_v_self) {
jpayne@68 13956 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@68 13957 PyObject *__pyx_r = 0;
jpayne@68 13958 __Pyx_RefNannyDeclarations
jpayne@68 13959 __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
jpayne@68 13960 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
jpayne@68 13961 __pyx_r = __pyx_pf_5pysam_9libctabix_9TabixFile_14filename_index___get__(((struct __pyx_obj_5pysam_9libctabix_TabixFile *)__pyx_v_self));
jpayne@68 13962
jpayne@68 13963 /* function exit code */
jpayne@68 13964 __Pyx_RefNannyFinishContext();
jpayne@68 13965 return __pyx_r;
jpayne@68 13966 }
jpayne@68 13967
jpayne@68 13968 static PyObject *__pyx_pf_5pysam_9libctabix_9TabixFile_14filename_index___get__(struct __pyx_obj_5pysam_9libctabix_TabixFile *__pyx_v_self) {
jpayne@68 13969 PyObject *__pyx_r = NULL;
jpayne@68 13970 __Pyx_TraceDeclarations
jpayne@68 13971 __Pyx_RefNannyDeclarations
jpayne@68 13972 int __pyx_lineno = 0;
jpayne@68 13973 const char *__pyx_filename = NULL;
jpayne@68 13974 int __pyx_clineno = 0;
jpayne@68 13975 __Pyx_RefNannySetupContext("__get__", 1);
jpayne@68 13976 __Pyx_TraceCall("__get__", __pyx_f[4], 65, 0, __PYX_ERR(4, 65, __pyx_L1_error));
jpayne@68 13977 __Pyx_XDECREF(__pyx_r);
jpayne@68 13978 __Pyx_INCREF(__pyx_v_self->filename_index);
jpayne@68 13979 __pyx_r = __pyx_v_self->filename_index;
jpayne@68 13980 goto __pyx_L0;
jpayne@68 13981
jpayne@68 13982 /* function exit code */
jpayne@68 13983 __pyx_L1_error:;
jpayne@68 13984 __Pyx_AddTraceback("pysam.libctabix.TabixFile.filename_index.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@68 13985 __pyx_r = NULL;
jpayne@68 13986 __pyx_L0:;
jpayne@68 13987 __Pyx_XGIVEREF(__pyx_r);
jpayne@68 13988 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@68 13989 __Pyx_RefNannyFinishContext();
jpayne@68 13990 return __pyx_r;
jpayne@68 13991 }
jpayne@68 13992
jpayne@68 13993 /* "(tree fragment)":1
jpayne@68 13994 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
jpayne@68 13995 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
jpayne@68 13996 * def __setstate_cython__(self, __pyx_state):
jpayne@68 13997 */
jpayne@68 13998
jpayne@68 13999 /* Python wrapper */
jpayne@68 14000 static PyObject *__pyx_pw_5pysam_9libctabix_9TabixFile_13__reduce_cython__(PyObject *__pyx_v_self,
jpayne@68 14001 #if CYTHON_METH_FASTCALL
jpayne@68 14002 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@68 14003 #else
jpayne@68 14004 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@68 14005 #endif
jpayne@68 14006 ); /*proto*/
jpayne@68 14007 PyDoc_STRVAR(__pyx_doc_5pysam_9libctabix_9TabixFile_12__reduce_cython__, "TabixFile.__reduce_cython__(self)");
jpayne@68 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@68 14009 static PyObject *__pyx_pw_5pysam_9libctabix_9TabixFile_13__reduce_cython__(PyObject *__pyx_v_self,
jpayne@68 14010 #if CYTHON_METH_FASTCALL
jpayne@68 14011 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@68 14012 #else
jpayne@68 14013 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@68 14014 #endif
jpayne@68 14015 ) {
jpayne@68 14016 #if !CYTHON_METH_FASTCALL
jpayne@68 14017 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
jpayne@68 14018 #endif
jpayne@68 14019 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@68 14020 PyObject *__pyx_r = 0;
jpayne@68 14021 __Pyx_RefNannyDeclarations
jpayne@68 14022 __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
jpayne@68 14023 #if !CYTHON_METH_FASTCALL
jpayne@68 14024 #if CYTHON_ASSUME_SAFE_MACROS
jpayne@68 14025 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
jpayne@68 14026 #else
jpayne@68 14027 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
jpayne@68 14028 #endif
jpayne@68 14029 #endif
jpayne@68 14030 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
jpayne@68 14031 if (unlikely(__pyx_nargs > 0)) {
jpayne@68 14032 __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL;}
jpayne@68 14033 if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__reduce_cython__", 0))) return NULL;
jpayne@68 14034 __pyx_r = __pyx_pf_5pysam_9libctabix_9TabixFile_12__reduce_cython__(((struct __pyx_obj_5pysam_9libctabix_TabixFile *)__pyx_v_self));
jpayne@68 14035
jpayne@68 14036 /* function exit code */
jpayne@68 14037 __Pyx_RefNannyFinishContext();
jpayne@68 14038 return __pyx_r;
jpayne@68 14039 }
jpayne@68 14040
jpayne@68 14041 static PyObject *__pyx_pf_5pysam_9libctabix_9TabixFile_12__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5pysam_9libctabix_TabixFile *__pyx_v_self) {
jpayne@68 14042 PyObject *__pyx_r = NULL;
jpayne@68 14043 __Pyx_TraceDeclarations
jpayne@68 14044 __Pyx_RefNannyDeclarations
jpayne@68 14045 int __pyx_lineno = 0;
jpayne@68 14046 const char *__pyx_filename = NULL;
jpayne@68 14047 int __pyx_clineno = 0;
jpayne@68 14048 __Pyx_TraceFrameInit(__pyx_codeobj__22)
jpayne@68 14049 __Pyx_RefNannySetupContext("__reduce_cython__", 1);
jpayne@68 14050 __Pyx_TraceCall("__reduce_cython__", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));
jpayne@68 14051
jpayne@68 14052 /* "(tree fragment)":2
jpayne@68 14053 * def __reduce_cython__(self):
jpayne@68 14054 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" # <<<<<<<<<<<<<<
jpayne@68 14055 * def __setstate_cython__(self, __pyx_state):
jpayne@68 14056 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
jpayne@68 14057 */
jpayne@68 14058 __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_no_default___reduce___due_to_non, 0, 0);
jpayne@68 14059 __PYX_ERR(1, 2, __pyx_L1_error)
jpayne@68 14060
jpayne@68 14061 /* "(tree fragment)":1
jpayne@68 14062 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
jpayne@68 14063 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
jpayne@68 14064 * def __setstate_cython__(self, __pyx_state):
jpayne@68 14065 */
jpayne@68 14066
jpayne@68 14067 /* function exit code */
jpayne@68 14068 __pyx_L1_error:;
jpayne@68 14069 __Pyx_AddTraceback("pysam.libctabix.TabixFile.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@68 14070 __pyx_r = NULL;
jpayne@68 14071 __Pyx_XGIVEREF(__pyx_r);
jpayne@68 14072 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@68 14073 __Pyx_RefNannyFinishContext();
jpayne@68 14074 return __pyx_r;
jpayne@68 14075 }
jpayne@68 14076
jpayne@68 14077 /* "(tree fragment)":3
jpayne@68 14078 * def __reduce_cython__(self):
jpayne@68 14079 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
jpayne@68 14080 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
jpayne@68 14081 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
jpayne@68 14082 */
jpayne@68 14083
jpayne@68 14084 /* Python wrapper */
jpayne@68 14085 static PyObject *__pyx_pw_5pysam_9libctabix_9TabixFile_15__setstate_cython__(PyObject *__pyx_v_self,
jpayne@68 14086 #if CYTHON_METH_FASTCALL
jpayne@68 14087 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@68 14088 #else
jpayne@68 14089 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@68 14090 #endif
jpayne@68 14091 ); /*proto*/
jpayne@68 14092 PyDoc_STRVAR(__pyx_doc_5pysam_9libctabix_9TabixFile_14__setstate_cython__, "TabixFile.__setstate_cython__(self, __pyx_state)");
jpayne@68 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@68 14094 static PyObject *__pyx_pw_5pysam_9libctabix_9TabixFile_15__setstate_cython__(PyObject *__pyx_v_self,
jpayne@68 14095 #if CYTHON_METH_FASTCALL
jpayne@68 14096 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@68 14097 #else
jpayne@68 14098 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@68 14099 #endif
jpayne@68 14100 ) {
jpayne@68 14101 CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0;
jpayne@68 14102 #if !CYTHON_METH_FASTCALL
jpayne@68 14103 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
jpayne@68 14104 #endif
jpayne@68 14105 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@68 14106 PyObject* values[1] = {0};
jpayne@68 14107 int __pyx_lineno = 0;
jpayne@68 14108 const char *__pyx_filename = NULL;
jpayne@68 14109 int __pyx_clineno = 0;
jpayne@68 14110 PyObject *__pyx_r = 0;
jpayne@68 14111 __Pyx_RefNannyDeclarations
jpayne@68 14112 __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
jpayne@68 14113 #if !CYTHON_METH_FASTCALL
jpayne@68 14114 #if CYTHON_ASSUME_SAFE_MACROS
jpayne@68 14115 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
jpayne@68 14116 #else
jpayne@68 14117 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
jpayne@68 14118 #endif
jpayne@68 14119 #endif
jpayne@68 14120 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
jpayne@68 14121 {
jpayne@68 14122 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0};
jpayne@68 14123 if (__pyx_kwds) {
jpayne@68 14124 Py_ssize_t kw_args;
jpayne@68 14125 switch (__pyx_nargs) {
jpayne@68 14126 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
jpayne@68 14127 CYTHON_FALLTHROUGH;
jpayne@68 14128 case 0: break;
jpayne@68 14129 default: goto __pyx_L5_argtuple_error;
jpayne@68 14130 }
jpayne@68 14131 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
jpayne@68 14132 switch (__pyx_nargs) {
jpayne@68 14133 case 0:
jpayne@68 14134 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) {
jpayne@68 14135 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
jpayne@68 14136 kw_args--;
jpayne@68 14137 }
jpayne@68 14138 else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 3, __pyx_L3_error)
jpayne@68 14139 else goto __pyx_L5_argtuple_error;
jpayne@68 14140 }
jpayne@68 14141 if (unlikely(kw_args > 0)) {
jpayne@68 14142 const Py_ssize_t kwd_pos_args = __pyx_nargs;
jpayne@68 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@68 14144 }
jpayne@68 14145 } else if (unlikely(__pyx_nargs != 1)) {
jpayne@68 14146 goto __pyx_L5_argtuple_error;
jpayne@68 14147 } else {
jpayne@68 14148 values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
jpayne@68 14149 }
jpayne@68 14150 __pyx_v___pyx_state = values[0];
jpayne@68 14151 }
jpayne@68 14152 goto __pyx_L6_skip;
jpayne@68 14153 __pyx_L5_argtuple_error:;
jpayne@68 14154 __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 3, __pyx_L3_error)
jpayne@68 14155 __pyx_L6_skip:;
jpayne@68 14156 goto __pyx_L4_argument_unpacking_done;
jpayne@68 14157 __pyx_L3_error:;
jpayne@68 14158 {
jpayne@68 14159 Py_ssize_t __pyx_temp;
jpayne@68 14160 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
jpayne@68 14161 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
jpayne@68 14162 }
jpayne@68 14163 }
jpayne@68 14164 __Pyx_AddTraceback("pysam.libctabix.TabixFile.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@68 14165 __Pyx_RefNannyFinishContext();
jpayne@68 14166 return NULL;
jpayne@68 14167 __pyx_L4_argument_unpacking_done:;
jpayne@68 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@68 14169
jpayne@68 14170 /* function exit code */
jpayne@68 14171 {
jpayne@68 14172 Py_ssize_t __pyx_temp;
jpayne@68 14173 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
jpayne@68 14174 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
jpayne@68 14175 }
jpayne@68 14176 }
jpayne@68 14177 __Pyx_RefNannyFinishContext();
jpayne@68 14178 return __pyx_r;
jpayne@68 14179 }
jpayne@68 14180
jpayne@68 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@68 14182 PyObject *__pyx_r = NULL;
jpayne@68 14183 __Pyx_TraceDeclarations
jpayne@68 14184 __Pyx_RefNannyDeclarations
jpayne@68 14185 int __pyx_lineno = 0;
jpayne@68 14186 const char *__pyx_filename = NULL;
jpayne@68 14187 int __pyx_clineno = 0;
jpayne@68 14188 __Pyx_TraceFrameInit(__pyx_codeobj__23)
jpayne@68 14189 __Pyx_RefNannySetupContext("__setstate_cython__", 1);
jpayne@68 14190 __Pyx_TraceCall("__setstate_cython__", __pyx_f[1], 3, 0, __PYX_ERR(1, 3, __pyx_L1_error));
jpayne@68 14191
jpayne@68 14192 /* "(tree fragment)":4
jpayne@68 14193 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
jpayne@68 14194 * def __setstate_cython__(self, __pyx_state):
jpayne@68 14195 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" # <<<<<<<<<<<<<<
jpayne@68 14196 */
jpayne@68 14197 __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_no_default___reduce___due_to_non, 0, 0);
jpayne@68 14198 __PYX_ERR(1, 4, __pyx_L1_error)
jpayne@68 14199
jpayne@68 14200 /* "(tree fragment)":3
jpayne@68 14201 * def __reduce_cython__(self):
jpayne@68 14202 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
jpayne@68 14203 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
jpayne@68 14204 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
jpayne@68 14205 */
jpayne@68 14206
jpayne@68 14207 /* function exit code */
jpayne@68 14208 __pyx_L1_error:;
jpayne@68 14209 __Pyx_AddTraceback("pysam.libctabix.TabixFile.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@68 14210 __pyx_r = NULL;
jpayne@68 14211 __Pyx_XGIVEREF(__pyx_r);
jpayne@68 14212 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@68 14213 __Pyx_RefNannyFinishContext();
jpayne@68 14214 return __pyx_r;
jpayne@68 14215 }
jpayne@68 14216
jpayne@68 14217 /* "pysam/libctabix.pyx":624
jpayne@68 14218 * """
jpayne@68 14219 *
jpayne@68 14220 * def __init__(self, encoding="ascii"): # <<<<<<<<<<<<<<
jpayne@68 14221 * self.encoding = encoding
jpayne@68 14222 *
jpayne@68 14223 */
jpayne@68 14224
jpayne@68 14225 /* Python wrapper */
jpayne@68 14226 static int __pyx_pw_5pysam_9libctabix_13TabixIterator_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
jpayne@68 14227 static int __pyx_pw_5pysam_9libctabix_13TabixIterator_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
jpayne@68 14228 PyObject *__pyx_v_encoding = 0;
jpayne@68 14229 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
jpayne@68 14230 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@68 14231 PyObject* values[1] = {0};
jpayne@68 14232 int __pyx_lineno = 0;
jpayne@68 14233 const char *__pyx_filename = NULL;
jpayne@68 14234 int __pyx_clineno = 0;
jpayne@68 14235 int __pyx_r;
jpayne@68 14236 __Pyx_RefNannyDeclarations
jpayne@68 14237 __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
jpayne@68 14238 #if CYTHON_ASSUME_SAFE_MACROS
jpayne@68 14239 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
jpayne@68 14240 #else
jpayne@68 14241 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
jpayne@68 14242 #endif
jpayne@68 14243 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
jpayne@68 14244 {
jpayne@68 14245 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_encoding,0};
jpayne@68 14246 values[0] = __Pyx_Arg_NewRef_VARARGS(((PyObject *)__pyx_n_u_ascii));
jpayne@68 14247 if (__pyx_kwds) {
jpayne@68 14248 Py_ssize_t kw_args;
jpayne@68 14249 switch (__pyx_nargs) {
jpayne@68 14250 case 1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
jpayne@68 14251 CYTHON_FALLTHROUGH;
jpayne@68 14252 case 0: break;
jpayne@68 14253 default: goto __pyx_L5_argtuple_error;
jpayne@68 14254 }
jpayne@68 14255 kw_args = __Pyx_NumKwargs_VARARGS(__pyx_kwds);
jpayne@68 14256 switch (__pyx_nargs) {
jpayne@68 14257 case 0:
jpayne@68 14258 if (kw_args > 0) {
jpayne@68 14259 PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_encoding);
jpayne@68 14260 if (value) { values[0] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; }
jpayne@68 14261 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 624, __pyx_L3_error)
jpayne@68 14262 }
jpayne@68 14263 }
jpayne@68 14264 if (unlikely(kw_args > 0)) {
jpayne@68 14265 const Py_ssize_t kwd_pos_args = __pyx_nargs;
jpayne@68 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@68 14267 }
jpayne@68 14268 } else {
jpayne@68 14269 switch (__pyx_nargs) {
jpayne@68 14270 case 1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
jpayne@68 14271 CYTHON_FALLTHROUGH;
jpayne@68 14272 case 0: break;
jpayne@68 14273 default: goto __pyx_L5_argtuple_error;
jpayne@68 14274 }
jpayne@68 14275 }
jpayne@68 14276 __pyx_v_encoding = values[0];
jpayne@68 14277 }
jpayne@68 14278 goto __pyx_L6_skip;
jpayne@68 14279 __pyx_L5_argtuple_error:;
jpayne@68 14280 __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 1, __pyx_nargs); __PYX_ERR(0, 624, __pyx_L3_error)
jpayne@68 14281 __pyx_L6_skip:;
jpayne@68 14282 goto __pyx_L4_argument_unpacking_done;
jpayne@68 14283 __pyx_L3_error:;
jpayne@68 14284 {
jpayne@68 14285 Py_ssize_t __pyx_temp;
jpayne@68 14286 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
jpayne@68 14287 __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]);
jpayne@68 14288 }
jpayne@68 14289 }
jpayne@68 14290 __Pyx_AddTraceback("pysam.libctabix.TabixIterator.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@68 14291 __Pyx_RefNannyFinishContext();
jpayne@68 14292 return -1;
jpayne@68 14293 __pyx_L4_argument_unpacking_done:;
jpayne@68 14294 __pyx_r = __pyx_pf_5pysam_9libctabix_13TabixIterator___init__(((struct __pyx_obj_5pysam_9libctabix_TabixIterator *)__pyx_v_self), __pyx_v_encoding);
jpayne@68 14295
jpayne@68 14296 /* function exit code */
jpayne@68 14297 {
jpayne@68 14298 Py_ssize_t __pyx_temp;
jpayne@68 14299 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
jpayne@68 14300 __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]);
jpayne@68 14301 }
jpayne@68 14302 }
jpayne@68 14303 __Pyx_RefNannyFinishContext();
jpayne@68 14304 return __pyx_r;
jpayne@68 14305 }
jpayne@68 14306
jpayne@68 14307 static int __pyx_pf_5pysam_9libctabix_13TabixIterator___init__(struct __pyx_obj_5pysam_9libctabix_TabixIterator *__pyx_v_self, PyObject *__pyx_v_encoding) {
jpayne@68 14308 int __pyx_r;
jpayne@68 14309 __Pyx_TraceDeclarations
jpayne@68 14310 __Pyx_RefNannyDeclarations
jpayne@68 14311 int __pyx_lineno = 0;
jpayne@68 14312 const char *__pyx_filename = NULL;
jpayne@68 14313 int __pyx_clineno = 0;
jpayne@68 14314 __Pyx_RefNannySetupContext("__init__", 1);
jpayne@68 14315 __Pyx_TraceCall("__init__", __pyx_f[0], 624, 0, __PYX_ERR(0, 624, __pyx_L1_error));
jpayne@68 14316
jpayne@68 14317 /* "pysam/libctabix.pyx":625
jpayne@68 14318 *
jpayne@68 14319 * def __init__(self, encoding="ascii"):
jpayne@68 14320 * self.encoding = encoding # <<<<<<<<<<<<<<
jpayne@68 14321 *
jpayne@68 14322 * def __iter__(self):
jpayne@68 14323 */
jpayne@68 14324 __Pyx_INCREF(__pyx_v_encoding);
jpayne@68 14325 __Pyx_GIVEREF(__pyx_v_encoding);
jpayne@68 14326 __Pyx_GOTREF(__pyx_v_self->encoding);
jpayne@68 14327 __Pyx_DECREF(__pyx_v_self->encoding);
jpayne@68 14328 __pyx_v_self->encoding = __pyx_v_encoding;
jpayne@68 14329
jpayne@68 14330 /* "pysam/libctabix.pyx":624
jpayne@68 14331 * """
jpayne@68 14332 *
jpayne@68 14333 * def __init__(self, encoding="ascii"): # <<<<<<<<<<<<<<
jpayne@68 14334 * self.encoding = encoding
jpayne@68 14335 *
jpayne@68 14336 */
jpayne@68 14337
jpayne@68 14338 /* function exit code */
jpayne@68 14339 __pyx_r = 0;
jpayne@68 14340 goto __pyx_L0;
jpayne@68 14341 __pyx_L1_error:;
jpayne@68 14342 __Pyx_AddTraceback("pysam.libctabix.TabixIterator.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@68 14343 __pyx_r = -1;
jpayne@68 14344 __pyx_L0:;
jpayne@68 14345 __Pyx_TraceReturn(Py_None, 0);
jpayne@68 14346 __Pyx_RefNannyFinishContext();
jpayne@68 14347 return __pyx_r;
jpayne@68 14348 }
jpayne@68 14349
jpayne@68 14350 /* "pysam/libctabix.pyx":627
jpayne@68 14351 * self.encoding = encoding
jpayne@68 14352 *
jpayne@68 14353 * def __iter__(self): # <<<<<<<<<<<<<<
jpayne@68 14354 * self.buffer.s = NULL
jpayne@68 14355 * self.buffer.l = 0
jpayne@68 14356 */
jpayne@68 14357
jpayne@68 14358 /* Python wrapper */
jpayne@68 14359 static PyObject *__pyx_pw_5pysam_9libctabix_13TabixIterator_3__iter__(PyObject *__pyx_v_self); /*proto*/
jpayne@68 14360 static PyObject *__pyx_pw_5pysam_9libctabix_13TabixIterator_3__iter__(PyObject *__pyx_v_self) {
jpayne@68 14361 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@68 14362 PyObject *__pyx_r = 0;
jpayne@68 14363 __Pyx_RefNannyDeclarations
jpayne@68 14364 __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
jpayne@68 14365 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
jpayne@68 14366 __pyx_r = __pyx_pf_5pysam_9libctabix_13TabixIterator_2__iter__(((struct __pyx_obj_5pysam_9libctabix_TabixIterator *)__pyx_v_self));
jpayne@68 14367
jpayne@68 14368 /* function exit code */
jpayne@68 14369 __Pyx_RefNannyFinishContext();
jpayne@68 14370 return __pyx_r;
jpayne@68 14371 }
jpayne@68 14372
jpayne@68 14373 static PyObject *__pyx_pf_5pysam_9libctabix_13TabixIterator_2__iter__(struct __pyx_obj_5pysam_9libctabix_TabixIterator *__pyx_v_self) {
jpayne@68 14374 PyObject *__pyx_r = NULL;
jpayne@68 14375 __Pyx_TraceDeclarations
jpayne@68 14376 __Pyx_RefNannyDeclarations
jpayne@68 14377 int __pyx_lineno = 0;
jpayne@68 14378 const char *__pyx_filename = NULL;
jpayne@68 14379 int __pyx_clineno = 0;
jpayne@68 14380 __Pyx_RefNannySetupContext("__iter__", 1);
jpayne@68 14381 __Pyx_TraceCall("__iter__", __pyx_f[0], 627, 0, __PYX_ERR(0, 627, __pyx_L1_error));
jpayne@68 14382
jpayne@68 14383 /* "pysam/libctabix.pyx":628
jpayne@68 14384 *
jpayne@68 14385 * def __iter__(self):
jpayne@68 14386 * self.buffer.s = NULL # <<<<<<<<<<<<<<
jpayne@68 14387 * self.buffer.l = 0
jpayne@68 14388 * self.buffer.m = 0
jpayne@68 14389 */
jpayne@68 14390 __pyx_v_self->buffer.s = NULL;
jpayne@68 14391
jpayne@68 14392 /* "pysam/libctabix.pyx":629
jpayne@68 14393 * def __iter__(self):
jpayne@68 14394 * self.buffer.s = NULL
jpayne@68 14395 * self.buffer.l = 0 # <<<<<<<<<<<<<<
jpayne@68 14396 * self.buffer.m = 0
jpayne@68 14397 *
jpayne@68 14398 */
jpayne@68 14399 __pyx_v_self->buffer.l = 0;
jpayne@68 14400
jpayne@68 14401 /* "pysam/libctabix.pyx":630
jpayne@68 14402 * self.buffer.s = NULL
jpayne@68 14403 * self.buffer.l = 0
jpayne@68 14404 * self.buffer.m = 0 # <<<<<<<<<<<<<<
jpayne@68 14405 *
jpayne@68 14406 * return self
jpayne@68 14407 */
jpayne@68 14408 __pyx_v_self->buffer.m = 0;
jpayne@68 14409
jpayne@68 14410 /* "pysam/libctabix.pyx":632
jpayne@68 14411 * self.buffer.m = 0
jpayne@68 14412 *
jpayne@68 14413 * return self # <<<<<<<<<<<<<<
jpayne@68 14414 *
jpayne@68 14415 * cdef int __cnext__(self):
jpayne@68 14416 */
jpayne@68 14417 __Pyx_XDECREF(__pyx_r);
jpayne@68 14418 __Pyx_INCREF((PyObject *)__pyx_v_self);
jpayne@68 14419 __pyx_r = ((PyObject *)__pyx_v_self);
jpayne@68 14420 goto __pyx_L0;
jpayne@68 14421
jpayne@68 14422 /* "pysam/libctabix.pyx":627
jpayne@68 14423 * self.encoding = encoding
jpayne@68 14424 *
jpayne@68 14425 * def __iter__(self): # <<<<<<<<<<<<<<
jpayne@68 14426 * self.buffer.s = NULL
jpayne@68 14427 * self.buffer.l = 0
jpayne@68 14428 */
jpayne@68 14429
jpayne@68 14430 /* function exit code */
jpayne@68 14431 __pyx_L1_error:;
jpayne@68 14432 __Pyx_AddTraceback("pysam.libctabix.TabixIterator.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@68 14433 __pyx_r = NULL;
jpayne@68 14434 __pyx_L0:;
jpayne@68 14435 __Pyx_XGIVEREF(__pyx_r);
jpayne@68 14436 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@68 14437 __Pyx_RefNannyFinishContext();
jpayne@68 14438 return __pyx_r;
jpayne@68 14439 }
jpayne@68 14440
jpayne@68 14441 /* "pysam/libctabix.pyx":634
jpayne@68 14442 * return self
jpayne@68 14443 *
jpayne@68 14444 * cdef int __cnext__(self): # <<<<<<<<<<<<<<
jpayne@68 14445 * '''iterate to next element.
jpayne@68 14446 *
jpayne@68 14447 */
jpayne@68 14448
jpayne@68 14449 static int __pyx_f_5pysam_9libctabix_13TabixIterator___cnext__(struct __pyx_obj_5pysam_9libctabix_TabixIterator *__pyx_v_self) {
jpayne@68 14450 int __pyx_v_retval;
jpayne@68 14451 int __pyx_r;
jpayne@68 14452 __Pyx_TraceDeclarations
jpayne@68 14453 int __pyx_t_1;
jpayne@68 14454 int __pyx_lineno = 0;
jpayne@68 14455 const char *__pyx_filename = NULL;
jpayne@68 14456 int __pyx_clineno = 0;
jpayne@68 14457 __Pyx_TraceCall("__cnext__", __pyx_f[0], 634, 0, __PYX_ERR(0, 634, __pyx_L1_error));
jpayne@68 14458
jpayne@68 14459 /* "pysam/libctabix.pyx":640
jpayne@68 14460 * was called.
jpayne@68 14461 * '''
jpayne@68 14462 * if self.tabixfile.htsfile == NULL: # <<<<<<<<<<<<<<
jpayne@68 14463 * return -5
jpayne@68 14464 *
jpayne@68 14465 */
jpayne@68 14466 __pyx_t_1 = (__pyx_v_self->tabixfile->__pyx_base.htsfile == NULL);
jpayne@68 14467 if (__pyx_t_1) {
jpayne@68 14468
jpayne@68 14469 /* "pysam/libctabix.pyx":641
jpayne@68 14470 * '''
jpayne@68 14471 * if self.tabixfile.htsfile == NULL:
jpayne@68 14472 * return -5 # <<<<<<<<<<<<<<
jpayne@68 14473 *
jpayne@68 14474 * cdef int retval
jpayne@68 14475 */
jpayne@68 14476 __pyx_r = -5;
jpayne@68 14477 goto __pyx_L0;
jpayne@68 14478
jpayne@68 14479 /* "pysam/libctabix.pyx":640
jpayne@68 14480 * was called.
jpayne@68 14481 * '''
jpayne@68 14482 * if self.tabixfile.htsfile == NULL: # <<<<<<<<<<<<<<
jpayne@68 14483 * return -5
jpayne@68 14484 *
jpayne@68 14485 */
jpayne@68 14486 }
jpayne@68 14487
jpayne@68 14488 /* "pysam/libctabix.pyx":645
jpayne@68 14489 * cdef int retval
jpayne@68 14490 *
jpayne@68 14491 * while 1: # <<<<<<<<<<<<<<
jpayne@68 14492 * with nogil:
jpayne@68 14493 * retval = tbx_itr_next(
jpayne@68 14494 */
jpayne@68 14495 while (1) {
jpayne@68 14496
jpayne@68 14497 /* "pysam/libctabix.pyx":646
jpayne@68 14498 *
jpayne@68 14499 * while 1:
jpayne@68 14500 * with nogil: # <<<<<<<<<<<<<<
jpayne@68 14501 * retval = tbx_itr_next(
jpayne@68 14502 * self.tabixfile.htsfile,
jpayne@68 14503 */
jpayne@68 14504 {
jpayne@68 14505 #ifdef WITH_THREAD
jpayne@68 14506 PyThreadState *_save;
jpayne@68 14507 _save = NULL;
jpayne@68 14508 Py_UNBLOCK_THREADS
jpayne@68 14509 __Pyx_FastGIL_Remember();
jpayne@68 14510 #endif
jpayne@68 14511 /*try:*/ {
jpayne@68 14512
jpayne@68 14513 /* "pysam/libctabix.pyx":647
jpayne@68 14514 * while 1:
jpayne@68 14515 * with nogil:
jpayne@68 14516 * retval = tbx_itr_next( # <<<<<<<<<<<<<<
jpayne@68 14517 * self.tabixfile.htsfile,
jpayne@68 14518 * self.tabixfile.index,
jpayne@68 14519 */
jpayne@68 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@68 14521 }
jpayne@68 14522
jpayne@68 14523 /* "pysam/libctabix.pyx":646
jpayne@68 14524 *
jpayne@68 14525 * while 1:
jpayne@68 14526 * with nogil: # <<<<<<<<<<<<<<
jpayne@68 14527 * retval = tbx_itr_next(
jpayne@68 14528 * self.tabixfile.htsfile,
jpayne@68 14529 */
jpayne@68 14530 /*finally:*/ {
jpayne@68 14531 /*normal exit:*/{
jpayne@68 14532 #ifdef WITH_THREAD
jpayne@68 14533 __Pyx_FastGIL_Forget();
jpayne@68 14534 Py_BLOCK_THREADS
jpayne@68 14535 #endif
jpayne@68 14536 goto __pyx_L10;
jpayne@68 14537 }
jpayne@68 14538 __pyx_L10:;
jpayne@68 14539 }
jpayne@68 14540 }
jpayne@68 14541
jpayne@68 14542 /* "pysam/libctabix.pyx":653
jpayne@68 14543 * &self.buffer)
jpayne@68 14544 *
jpayne@68 14545 * if retval < 0: # <<<<<<<<<<<<<<
jpayne@68 14546 * break
jpayne@68 14547 *
jpayne@68 14548 */
jpayne@68 14549 __pyx_t_1 = (__pyx_v_retval < 0);
jpayne@68 14550 if (__pyx_t_1) {
jpayne@68 14551
jpayne@68 14552 /* "pysam/libctabix.pyx":654
jpayne@68 14553 *
jpayne@68 14554 * if retval < 0:
jpayne@68 14555 * break # <<<<<<<<<<<<<<
jpayne@68 14556 *
jpayne@68 14557 * if self.buffer.s[0] != b'#':
jpayne@68 14558 */
jpayne@68 14559 goto __pyx_L5_break;
jpayne@68 14560
jpayne@68 14561 /* "pysam/libctabix.pyx":653
jpayne@68 14562 * &self.buffer)
jpayne@68 14563 *
jpayne@68 14564 * if retval < 0: # <<<<<<<<<<<<<<
jpayne@68 14565 * break
jpayne@68 14566 *
jpayne@68 14567 */
jpayne@68 14568 }
jpayne@68 14569
jpayne@68 14570 /* "pysam/libctabix.pyx":656
jpayne@68 14571 * break
jpayne@68 14572 *
jpayne@68 14573 * if self.buffer.s[0] != b'#': # <<<<<<<<<<<<<<
jpayne@68 14574 * break
jpayne@68 14575 *
jpayne@68 14576 */
jpayne@68 14577 __pyx_t_1 = ((__pyx_v_self->buffer.s[0]) != '#');
jpayne@68 14578 if (__pyx_t_1) {
jpayne@68 14579
jpayne@68 14580 /* "pysam/libctabix.pyx":657
jpayne@68 14581 *
jpayne@68 14582 * if self.buffer.s[0] != b'#':
jpayne@68 14583 * break # <<<<<<<<<<<<<<
jpayne@68 14584 *
jpayne@68 14585 * return retval
jpayne@68 14586 */
jpayne@68 14587 goto __pyx_L5_break;
jpayne@68 14588
jpayne@68 14589 /* "pysam/libctabix.pyx":656
jpayne@68 14590 * break
jpayne@68 14591 *
jpayne@68 14592 * if self.buffer.s[0] != b'#': # <<<<<<<<<<<<<<
jpayne@68 14593 * break
jpayne@68 14594 *
jpayne@68 14595 */
jpayne@68 14596 }
jpayne@68 14597 }
jpayne@68 14598 __pyx_L5_break:;
jpayne@68 14599
jpayne@68 14600 /* "pysam/libctabix.pyx":659
jpayne@68 14601 * break
jpayne@68 14602 *
jpayne@68 14603 * return retval # <<<<<<<<<<<<<<
jpayne@68 14604 *
jpayne@68 14605 * def __next__(self):
jpayne@68 14606 */
jpayne@68 14607 __pyx_r = __pyx_v_retval;
jpayne@68 14608 goto __pyx_L0;
jpayne@68 14609
jpayne@68 14610 /* "pysam/libctabix.pyx":634
jpayne@68 14611 * return self
jpayne@68 14612 *
jpayne@68 14613 * cdef int __cnext__(self): # <<<<<<<<<<<<<<
jpayne@68 14614 * '''iterate to next element.
jpayne@68 14615 *
jpayne@68 14616 */
jpayne@68 14617
jpayne@68 14618 /* function exit code */
jpayne@68 14619 __pyx_L1_error:;
jpayne@68 14620 __Pyx_AddTraceback("pysam.libctabix.TabixIterator.__cnext__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@68 14621 __pyx_r = 0;
jpayne@68 14622 __pyx_L0:;
jpayne@68 14623 __Pyx_TraceReturn(Py_None, 0);
jpayne@68 14624 return __pyx_r;
jpayne@68 14625 }
jpayne@68 14626
jpayne@68 14627 /* "pysam/libctabix.pyx":661
jpayne@68 14628 * return retval
jpayne@68 14629 *
jpayne@68 14630 * def __next__(self): # <<<<<<<<<<<<<<
jpayne@68 14631 * """python version of next().
jpayne@68 14632 *
jpayne@68 14633 */
jpayne@68 14634
jpayne@68 14635 /* Python wrapper */
jpayne@68 14636 static PyObject *__pyx_pw_5pysam_9libctabix_13TabixIterator_5__next__(PyObject *__pyx_v_self); /*proto*/
jpayne@68 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@68 14638 #if CYTHON_UPDATE_DESCRIPTOR_DOC
jpayne@68 14639 struct wrapperbase __pyx_wrapperbase_5pysam_9libctabix_13TabixIterator_4__next__;
jpayne@68 14640 #endif
jpayne@68 14641 static PyObject *__pyx_pw_5pysam_9libctabix_13TabixIterator_5__next__(PyObject *__pyx_v_self) {
jpayne@68 14642 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@68 14643 PyObject *__pyx_r = 0;
jpayne@68 14644 __Pyx_RefNannyDeclarations
jpayne@68 14645 __Pyx_RefNannySetupContext("__next__ (wrapper)", 0);
jpayne@68 14646 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
jpayne@68 14647 __pyx_r = __pyx_pf_5pysam_9libctabix_13TabixIterator_4__next__(((struct __pyx_obj_5pysam_9libctabix_TabixIterator *)__pyx_v_self));
jpayne@68 14648
jpayne@68 14649 /* function exit code */
jpayne@68 14650 __Pyx_RefNannyFinishContext();
jpayne@68 14651 return __pyx_r;
jpayne@68 14652 }
jpayne@68 14653
jpayne@68 14654 static PyObject *__pyx_pf_5pysam_9libctabix_13TabixIterator_4__next__(struct __pyx_obj_5pysam_9libctabix_TabixIterator *__pyx_v_self) {
jpayne@68 14655 int __pyx_v_retval;
jpayne@68 14656 PyObject *__pyx_r = NULL;
jpayne@68 14657 __Pyx_TraceDeclarations
jpayne@68 14658 __Pyx_RefNannyDeclarations
jpayne@68 14659 int __pyx_error_without_exception = 0; /* StopIteration */
jpayne@68 14660 int __pyx_t_1;
jpayne@68 14661 int __pyx_t_2;
jpayne@68 14662 PyObject *__pyx_t_3 = NULL;
jpayne@68 14663 PyObject *__pyx_t_4 = NULL;
jpayne@68 14664 struct __pyx_opt_args_5pysam_9libcutils_charptr_to_str __pyx_t_5;
jpayne@68 14665 int __pyx_lineno = 0;
jpayne@68 14666 const char *__pyx_filename = NULL;
jpayne@68 14667 int __pyx_clineno = 0;
jpayne@68 14668 __Pyx_RefNannySetupContext("__next__", 1);
jpayne@68 14669 __Pyx_TraceCall("__next__", __pyx_f[0], 661, 0, __PYX_ERR(0, 661, __pyx_L1_error));
jpayne@68 14670
jpayne@68 14671 /* "pysam/libctabix.pyx":667
jpayne@68 14672 * """
jpayne@68 14673 *
jpayne@68 14674 * cdef int retval = self.__cnext__() # <<<<<<<<<<<<<<
jpayne@68 14675 * if retval == -5:
jpayne@68 14676 * raise IOError("iteration on closed file")
jpayne@68 14677 */
jpayne@68 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@68 14679 __pyx_v_retval = __pyx_t_1;
jpayne@68 14680
jpayne@68 14681 /* "pysam/libctabix.pyx":668
jpayne@68 14682 *
jpayne@68 14683 * cdef int retval = self.__cnext__()
jpayne@68 14684 * if retval == -5: # <<<<<<<<<<<<<<
jpayne@68 14685 * raise IOError("iteration on closed file")
jpayne@68 14686 * elif retval < 0:
jpayne@68 14687 */
jpayne@68 14688 __pyx_t_2 = (__pyx_v_retval == -5L);
jpayne@68 14689 if (unlikely(__pyx_t_2)) {
jpayne@68 14690
jpayne@68 14691 /* "pysam/libctabix.pyx":669
jpayne@68 14692 * cdef int retval = self.__cnext__()
jpayne@68 14693 * if retval == -5:
jpayne@68 14694 * raise IOError("iteration on closed file") # <<<<<<<<<<<<<<
jpayne@68 14695 * elif retval < 0:
jpayne@68 14696 * raise StopIteration
jpayne@68 14697 */
jpayne@68 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@68 14699 __Pyx_GOTREF(__pyx_t_3);
jpayne@68 14700 __Pyx_Raise(__pyx_t_3, 0, 0, 0);
jpayne@68 14701 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
jpayne@68 14702 __PYX_ERR(0, 669, __pyx_L1_error)
jpayne@68 14703
jpayne@68 14704 /* "pysam/libctabix.pyx":668
jpayne@68 14705 *
jpayne@68 14706 * cdef int retval = self.__cnext__()
jpayne@68 14707 * if retval == -5: # <<<<<<<<<<<<<<
jpayne@68 14708 * raise IOError("iteration on closed file")
jpayne@68 14709 * elif retval < 0:
jpayne@68 14710 */
jpayne@68 14711 }
jpayne@68 14712
jpayne@68 14713 /* "pysam/libctabix.pyx":670
jpayne@68 14714 * if retval == -5:
jpayne@68 14715 * raise IOError("iteration on closed file")
jpayne@68 14716 * elif retval < 0: # <<<<<<<<<<<<<<
jpayne@68 14717 * raise StopIteration
jpayne@68 14718 *
jpayne@68 14719 */
jpayne@68 14720 __pyx_t_2 = (__pyx_v_retval < 0);
jpayne@68 14721 if (unlikely(__pyx_t_2)) {
jpayne@68 14722
jpayne@68 14723 /* "pysam/libctabix.pyx":671
jpayne@68 14724 * raise IOError("iteration on closed file")
jpayne@68 14725 * elif retval < 0:
jpayne@68 14726 * raise StopIteration # <<<<<<<<<<<<<<
jpayne@68 14727 *
jpayne@68 14728 * return charptr_to_str(self.buffer.s, self.encoding)
jpayne@68 14729 */
jpayne@68 14730 __pyx_error_without_exception = 1;
jpayne@68 14731 goto __pyx_L1_error;;
jpayne@68 14732
jpayne@68 14733 /* "pysam/libctabix.pyx":670
jpayne@68 14734 * if retval == -5:
jpayne@68 14735 * raise IOError("iteration on closed file")
jpayne@68 14736 * elif retval < 0: # <<<<<<<<<<<<<<
jpayne@68 14737 * raise StopIteration
jpayne@68 14738 *
jpayne@68 14739 */
jpayne@68 14740 }
jpayne@68 14741
jpayne@68 14742 /* "pysam/libctabix.pyx":673
jpayne@68 14743 * raise StopIteration
jpayne@68 14744 *
jpayne@68 14745 * return charptr_to_str(self.buffer.s, self.encoding) # <<<<<<<<<<<<<<
jpayne@68 14746 *
jpayne@68 14747 * def __dealloc__(self):
jpayne@68 14748 */
jpayne@68 14749 __Pyx_XDECREF(__pyx_r);
jpayne@68 14750 __pyx_t_3 = __pyx_v_self->encoding;
jpayne@68 14751 __Pyx_INCREF(__pyx_t_3);
jpayne@68 14752 __pyx_t_5.__pyx_n = 1;
jpayne@68 14753 __pyx_t_5.encoding = __pyx_t_3;
jpayne@68 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@68 14755 __Pyx_GOTREF(__pyx_t_4);
jpayne@68 14756 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
jpayne@68 14757 __pyx_r = __pyx_t_4;
jpayne@68 14758 __pyx_t_4 = 0;
jpayne@68 14759 goto __pyx_L0;
jpayne@68 14760
jpayne@68 14761 /* "pysam/libctabix.pyx":661
jpayne@68 14762 * return retval
jpayne@68 14763 *
jpayne@68 14764 * def __next__(self): # <<<<<<<<<<<<<<
jpayne@68 14765 * """python version of next().
jpayne@68 14766 *
jpayne@68 14767 */
jpayne@68 14768
jpayne@68 14769 /* function exit code */
jpayne@68 14770 __pyx_L1_error:;
jpayne@68 14771 __Pyx_XDECREF(__pyx_t_3);
jpayne@68 14772 __Pyx_XDECREF(__pyx_t_4);
jpayne@68 14773 if (!__pyx_error_without_exception) {
jpayne@68 14774 __Pyx_AddTraceback("pysam.libctabix.TabixIterator.__next__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@68 14775 }
jpayne@68 14776 __pyx_r = NULL;
jpayne@68 14777 __pyx_L0:;
jpayne@68 14778 __Pyx_XGIVEREF(__pyx_r);
jpayne@68 14779 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@68 14780 __Pyx_RefNannyFinishContext();
jpayne@68 14781 return __pyx_r;
jpayne@68 14782 }
jpayne@68 14783
jpayne@68 14784 /* "pysam/libctabix.pyx":675
jpayne@68 14785 * return charptr_to_str(self.buffer.s, self.encoding)
jpayne@68 14786 *
jpayne@68 14787 * def __dealloc__(self): # <<<<<<<<<<<<<<
jpayne@68 14788 * if <void*>self.iterator != NULL:
jpayne@68 14789 * tbx_itr_destroy(self.iterator)
jpayne@68 14790 */
jpayne@68 14791
jpayne@68 14792 /* Python wrapper */
jpayne@68 14793 static void __pyx_pw_5pysam_9libctabix_13TabixIterator_7__dealloc__(PyObject *__pyx_v_self); /*proto*/
jpayne@68 14794 static void __pyx_pw_5pysam_9libctabix_13TabixIterator_7__dealloc__(PyObject *__pyx_v_self) {
jpayne@68 14795 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@68 14796 __Pyx_RefNannyDeclarations
jpayne@68 14797 __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
jpayne@68 14798 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
jpayne@68 14799 __pyx_pf_5pysam_9libctabix_13TabixIterator_6__dealloc__(((struct __pyx_obj_5pysam_9libctabix_TabixIterator *)__pyx_v_self));
jpayne@68 14800
jpayne@68 14801 /* function exit code */
jpayne@68 14802 __Pyx_RefNannyFinishContext();
jpayne@68 14803 }
jpayne@68 14804
jpayne@68 14805 static void __pyx_pf_5pysam_9libctabix_13TabixIterator_6__dealloc__(struct __pyx_obj_5pysam_9libctabix_TabixIterator *__pyx_v_self) {
jpayne@68 14806 __Pyx_TraceDeclarations
jpayne@68 14807 int __pyx_t_1;
jpayne@68 14808 int __pyx_lineno = 0;
jpayne@68 14809 const char *__pyx_filename = NULL;
jpayne@68 14810 int __pyx_clineno = 0;
jpayne@68 14811 __Pyx_TraceCall("__dealloc__", __pyx_f[0], 675, 0, __PYX_ERR(0, 675, __pyx_L1_error));
jpayne@68 14812
jpayne@68 14813 /* "pysam/libctabix.pyx":676
jpayne@68 14814 *
jpayne@68 14815 * def __dealloc__(self):
jpayne@68 14816 * if <void*>self.iterator != NULL: # <<<<<<<<<<<<<<
jpayne@68 14817 * tbx_itr_destroy(self.iterator)
jpayne@68 14818 * if self.buffer.s != NULL:
jpayne@68 14819 */
jpayne@68 14820 __pyx_t_1 = (((void *)__pyx_v_self->iterator) != NULL);
jpayne@68 14821 if (__pyx_t_1) {
jpayne@68 14822
jpayne@68 14823 /* "pysam/libctabix.pyx":677
jpayne@68 14824 * def __dealloc__(self):
jpayne@68 14825 * if <void*>self.iterator != NULL:
jpayne@68 14826 * tbx_itr_destroy(self.iterator) # <<<<<<<<<<<<<<
jpayne@68 14827 * if self.buffer.s != NULL:
jpayne@68 14828 * free(self.buffer.s)
jpayne@68 14829 */
jpayne@68 14830 tbx_itr_destroy(__pyx_v_self->iterator);
jpayne@68 14831
jpayne@68 14832 /* "pysam/libctabix.pyx":676
jpayne@68 14833 *
jpayne@68 14834 * def __dealloc__(self):
jpayne@68 14835 * if <void*>self.iterator != NULL: # <<<<<<<<<<<<<<
jpayne@68 14836 * tbx_itr_destroy(self.iterator)
jpayne@68 14837 * if self.buffer.s != NULL:
jpayne@68 14838 */
jpayne@68 14839 }
jpayne@68 14840
jpayne@68 14841 /* "pysam/libctabix.pyx":678
jpayne@68 14842 * if <void*>self.iterator != NULL:
jpayne@68 14843 * tbx_itr_destroy(self.iterator)
jpayne@68 14844 * if self.buffer.s != NULL: # <<<<<<<<<<<<<<
jpayne@68 14845 * free(self.buffer.s)
jpayne@68 14846 *
jpayne@68 14847 */
jpayne@68 14848 __pyx_t_1 = (__pyx_v_self->buffer.s != NULL);
jpayne@68 14849 if (__pyx_t_1) {
jpayne@68 14850
jpayne@68 14851 /* "pysam/libctabix.pyx":679
jpayne@68 14852 * tbx_itr_destroy(self.iterator)
jpayne@68 14853 * if self.buffer.s != NULL:
jpayne@68 14854 * free(self.buffer.s) # <<<<<<<<<<<<<<
jpayne@68 14855 *
jpayne@68 14856 *
jpayne@68 14857 */
jpayne@68 14858 free(__pyx_v_self->buffer.s);
jpayne@68 14859
jpayne@68 14860 /* "pysam/libctabix.pyx":678
jpayne@68 14861 * if <void*>self.iterator != NULL:
jpayne@68 14862 * tbx_itr_destroy(self.iterator)
jpayne@68 14863 * if self.buffer.s != NULL: # <<<<<<<<<<<<<<
jpayne@68 14864 * free(self.buffer.s)
jpayne@68 14865 *
jpayne@68 14866 */
jpayne@68 14867 }
jpayne@68 14868
jpayne@68 14869 /* "pysam/libctabix.pyx":675
jpayne@68 14870 * return charptr_to_str(self.buffer.s, self.encoding)
jpayne@68 14871 *
jpayne@68 14872 * def __dealloc__(self): # <<<<<<<<<<<<<<
jpayne@68 14873 * if <void*>self.iterator != NULL:
jpayne@68 14874 * tbx_itr_destroy(self.iterator)
jpayne@68 14875 */
jpayne@68 14876
jpayne@68 14877 /* function exit code */
jpayne@68 14878 goto __pyx_L0;
jpayne@68 14879 __pyx_L1_error:;
jpayne@68 14880 __Pyx_WriteUnraisable("pysam.libctabix.TabixIterator.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
jpayne@68 14881 __pyx_L0:;
jpayne@68 14882 __Pyx_TraceReturn(Py_None, 0);
jpayne@68 14883 }
jpayne@68 14884
jpayne@68 14885 /* "(tree fragment)":1
jpayne@68 14886 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
jpayne@68 14887 * raise TypeError, "self.iterator cannot be converted to a Python object for pickling"
jpayne@68 14888 * def __setstate_cython__(self, __pyx_state):
jpayne@68 14889 */
jpayne@68 14890
jpayne@68 14891 /* Python wrapper */
jpayne@68 14892 static PyObject *__pyx_pw_5pysam_9libctabix_13TabixIterator_9__reduce_cython__(PyObject *__pyx_v_self,
jpayne@68 14893 #if CYTHON_METH_FASTCALL
jpayne@68 14894 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@68 14895 #else
jpayne@68 14896 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@68 14897 #endif
jpayne@68 14898 ); /*proto*/
jpayne@68 14899 PyDoc_STRVAR(__pyx_doc_5pysam_9libctabix_13TabixIterator_8__reduce_cython__, "TabixIterator.__reduce_cython__(self)");
jpayne@68 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@68 14901 static PyObject *__pyx_pw_5pysam_9libctabix_13TabixIterator_9__reduce_cython__(PyObject *__pyx_v_self,
jpayne@68 14902 #if CYTHON_METH_FASTCALL
jpayne@68 14903 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@68 14904 #else
jpayne@68 14905 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@68 14906 #endif
jpayne@68 14907 ) {
jpayne@68 14908 #if !CYTHON_METH_FASTCALL
jpayne@68 14909 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
jpayne@68 14910 #endif
jpayne@68 14911 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@68 14912 PyObject *__pyx_r = 0;
jpayne@68 14913 __Pyx_RefNannyDeclarations
jpayne@68 14914 __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
jpayne@68 14915 #if !CYTHON_METH_FASTCALL
jpayne@68 14916 #if CYTHON_ASSUME_SAFE_MACROS
jpayne@68 14917 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
jpayne@68 14918 #else
jpayne@68 14919 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
jpayne@68 14920 #endif
jpayne@68 14921 #endif
jpayne@68 14922 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
jpayne@68 14923 if (unlikely(__pyx_nargs > 0)) {
jpayne@68 14924 __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL;}
jpayne@68 14925 if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__reduce_cython__", 0))) return NULL;
jpayne@68 14926 __pyx_r = __pyx_pf_5pysam_9libctabix_13TabixIterator_8__reduce_cython__(((struct __pyx_obj_5pysam_9libctabix_TabixIterator *)__pyx_v_self));
jpayne@68 14927
jpayne@68 14928 /* function exit code */
jpayne@68 14929 __Pyx_RefNannyFinishContext();
jpayne@68 14930 return __pyx_r;
jpayne@68 14931 }
jpayne@68 14932
jpayne@68 14933 static PyObject *__pyx_pf_5pysam_9libctabix_13TabixIterator_8__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5pysam_9libctabix_TabixIterator *__pyx_v_self) {
jpayne@68 14934 PyObject *__pyx_r = NULL;
jpayne@68 14935 __Pyx_TraceDeclarations
jpayne@68 14936 __Pyx_RefNannyDeclarations
jpayne@68 14937 int __pyx_lineno = 0;
jpayne@68 14938 const char *__pyx_filename = NULL;
jpayne@68 14939 int __pyx_clineno = 0;
jpayne@68 14940 __Pyx_TraceFrameInit(__pyx_codeobj__25)
jpayne@68 14941 __Pyx_RefNannySetupContext("__reduce_cython__", 1);
jpayne@68 14942 __Pyx_TraceCall("__reduce_cython__", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));
jpayne@68 14943
jpayne@68 14944 /* "(tree fragment)":2
jpayne@68 14945 * def __reduce_cython__(self):
jpayne@68 14946 * raise TypeError, "self.iterator cannot be converted to a Python object for pickling" # <<<<<<<<<<<<<<
jpayne@68 14947 * def __setstate_cython__(self, __pyx_state):
jpayne@68 14948 * raise TypeError, "self.iterator cannot be converted to a Python object for pickling"
jpayne@68 14949 */
jpayne@68 14950 __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_self_iterator_cannot_be_converte, 0, 0);
jpayne@68 14951 __PYX_ERR(1, 2, __pyx_L1_error)
jpayne@68 14952
jpayne@68 14953 /* "(tree fragment)":1
jpayne@68 14954 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
jpayne@68 14955 * raise TypeError, "self.iterator cannot be converted to a Python object for pickling"
jpayne@68 14956 * def __setstate_cython__(self, __pyx_state):
jpayne@68 14957 */
jpayne@68 14958
jpayne@68 14959 /* function exit code */
jpayne@68 14960 __pyx_L1_error:;
jpayne@68 14961 __Pyx_AddTraceback("pysam.libctabix.TabixIterator.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@68 14962 __pyx_r = NULL;
jpayne@68 14963 __Pyx_XGIVEREF(__pyx_r);
jpayne@68 14964 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@68 14965 __Pyx_RefNannyFinishContext();
jpayne@68 14966 return __pyx_r;
jpayne@68 14967 }
jpayne@68 14968
jpayne@68 14969 /* "(tree fragment)":3
jpayne@68 14970 * def __reduce_cython__(self):
jpayne@68 14971 * raise TypeError, "self.iterator cannot be converted to a Python object for pickling"
jpayne@68 14972 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
jpayne@68 14973 * raise TypeError, "self.iterator cannot be converted to a Python object for pickling"
jpayne@68 14974 */
jpayne@68 14975
jpayne@68 14976 /* Python wrapper */
jpayne@68 14977 static PyObject *__pyx_pw_5pysam_9libctabix_13TabixIterator_11__setstate_cython__(PyObject *__pyx_v_self,
jpayne@68 14978 #if CYTHON_METH_FASTCALL
jpayne@68 14979 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@68 14980 #else
jpayne@68 14981 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@68 14982 #endif
jpayne@68 14983 ); /*proto*/
jpayne@68 14984 PyDoc_STRVAR(__pyx_doc_5pysam_9libctabix_13TabixIterator_10__setstate_cython__, "TabixIterator.__setstate_cython__(self, __pyx_state)");
jpayne@68 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@68 14986 static PyObject *__pyx_pw_5pysam_9libctabix_13TabixIterator_11__setstate_cython__(PyObject *__pyx_v_self,
jpayne@68 14987 #if CYTHON_METH_FASTCALL
jpayne@68 14988 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@68 14989 #else
jpayne@68 14990 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@68 14991 #endif
jpayne@68 14992 ) {
jpayne@68 14993 CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0;
jpayne@68 14994 #if !CYTHON_METH_FASTCALL
jpayne@68 14995 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
jpayne@68 14996 #endif
jpayne@68 14997 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@68 14998 PyObject* values[1] = {0};
jpayne@68 14999 int __pyx_lineno = 0;
jpayne@68 15000 const char *__pyx_filename = NULL;
jpayne@68 15001 int __pyx_clineno = 0;
jpayne@68 15002 PyObject *__pyx_r = 0;
jpayne@68 15003 __Pyx_RefNannyDeclarations
jpayne@68 15004 __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
jpayne@68 15005 #if !CYTHON_METH_FASTCALL
jpayne@68 15006 #if CYTHON_ASSUME_SAFE_MACROS
jpayne@68 15007 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
jpayne@68 15008 #else
jpayne@68 15009 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
jpayne@68 15010 #endif
jpayne@68 15011 #endif
jpayne@68 15012 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
jpayne@68 15013 {
jpayne@68 15014 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0};
jpayne@68 15015 if (__pyx_kwds) {
jpayne@68 15016 Py_ssize_t kw_args;
jpayne@68 15017 switch (__pyx_nargs) {
jpayne@68 15018 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
jpayne@68 15019 CYTHON_FALLTHROUGH;
jpayne@68 15020 case 0: break;
jpayne@68 15021 default: goto __pyx_L5_argtuple_error;
jpayne@68 15022 }
jpayne@68 15023 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
jpayne@68 15024 switch (__pyx_nargs) {
jpayne@68 15025 case 0:
jpayne@68 15026 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) {
jpayne@68 15027 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
jpayne@68 15028 kw_args--;
jpayne@68 15029 }
jpayne@68 15030 else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 3, __pyx_L3_error)
jpayne@68 15031 else goto __pyx_L5_argtuple_error;
jpayne@68 15032 }
jpayne@68 15033 if (unlikely(kw_args > 0)) {
jpayne@68 15034 const Py_ssize_t kwd_pos_args = __pyx_nargs;
jpayne@68 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@68 15036 }
jpayne@68 15037 } else if (unlikely(__pyx_nargs != 1)) {
jpayne@68 15038 goto __pyx_L5_argtuple_error;
jpayne@68 15039 } else {
jpayne@68 15040 values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
jpayne@68 15041 }
jpayne@68 15042 __pyx_v___pyx_state = values[0];
jpayne@68 15043 }
jpayne@68 15044 goto __pyx_L6_skip;
jpayne@68 15045 __pyx_L5_argtuple_error:;
jpayne@68 15046 __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 3, __pyx_L3_error)
jpayne@68 15047 __pyx_L6_skip:;
jpayne@68 15048 goto __pyx_L4_argument_unpacking_done;
jpayne@68 15049 __pyx_L3_error:;
jpayne@68 15050 {
jpayne@68 15051 Py_ssize_t __pyx_temp;
jpayne@68 15052 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
jpayne@68 15053 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
jpayne@68 15054 }
jpayne@68 15055 }
jpayne@68 15056 __Pyx_AddTraceback("pysam.libctabix.TabixIterator.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@68 15057 __Pyx_RefNannyFinishContext();
jpayne@68 15058 return NULL;
jpayne@68 15059 __pyx_L4_argument_unpacking_done:;
jpayne@68 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@68 15061
jpayne@68 15062 /* function exit code */
jpayne@68 15063 {
jpayne@68 15064 Py_ssize_t __pyx_temp;
jpayne@68 15065 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
jpayne@68 15066 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
jpayne@68 15067 }
jpayne@68 15068 }
jpayne@68 15069 __Pyx_RefNannyFinishContext();
jpayne@68 15070 return __pyx_r;
jpayne@68 15071 }
jpayne@68 15072
jpayne@68 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@68 15074 PyObject *__pyx_r = NULL;
jpayne@68 15075 __Pyx_TraceDeclarations
jpayne@68 15076 __Pyx_RefNannyDeclarations
jpayne@68 15077 int __pyx_lineno = 0;
jpayne@68 15078 const char *__pyx_filename = NULL;
jpayne@68 15079 int __pyx_clineno = 0;
jpayne@68 15080 __Pyx_TraceFrameInit(__pyx_codeobj__26)
jpayne@68 15081 __Pyx_RefNannySetupContext("__setstate_cython__", 1);
jpayne@68 15082 __Pyx_TraceCall("__setstate_cython__", __pyx_f[1], 3, 0, __PYX_ERR(1, 3, __pyx_L1_error));
jpayne@68 15083
jpayne@68 15084 /* "(tree fragment)":4
jpayne@68 15085 * raise TypeError, "self.iterator cannot be converted to a Python object for pickling"
jpayne@68 15086 * def __setstate_cython__(self, __pyx_state):
jpayne@68 15087 * raise TypeError, "self.iterator cannot be converted to a Python object for pickling" # <<<<<<<<<<<<<<
jpayne@68 15088 */
jpayne@68 15089 __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_self_iterator_cannot_be_converte, 0, 0);
jpayne@68 15090 __PYX_ERR(1, 4, __pyx_L1_error)
jpayne@68 15091
jpayne@68 15092 /* "(tree fragment)":3
jpayne@68 15093 * def __reduce_cython__(self):
jpayne@68 15094 * raise TypeError, "self.iterator cannot be converted to a Python object for pickling"
jpayne@68 15095 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
jpayne@68 15096 * raise TypeError, "self.iterator cannot be converted to a Python object for pickling"
jpayne@68 15097 */
jpayne@68 15098
jpayne@68 15099 /* function exit code */
jpayne@68 15100 __pyx_L1_error:;
jpayne@68 15101 __Pyx_AddTraceback("pysam.libctabix.TabixIterator.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@68 15102 __pyx_r = NULL;
jpayne@68 15103 __Pyx_XGIVEREF(__pyx_r);
jpayne@68 15104 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@68 15105 __Pyx_RefNannyFinishContext();
jpayne@68 15106 return __pyx_r;
jpayne@68 15107 }
jpayne@68 15108
jpayne@68 15109 /* "pysam/libctabix.pyx":685
jpayne@68 15110 * '''empty iterator'''
jpayne@68 15111 *
jpayne@68 15112 * def __iter__(self): # <<<<<<<<<<<<<<
jpayne@68 15113 * return self
jpayne@68 15114 *
jpayne@68 15115 */
jpayne@68 15116
jpayne@68 15117 /* Python wrapper */
jpayne@68 15118 static PyObject *__pyx_pw_5pysam_9libctabix_13EmptyIterator_1__iter__(PyObject *__pyx_self,
jpayne@68 15119 #if CYTHON_METH_FASTCALL
jpayne@68 15120 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@68 15121 #else
jpayne@68 15122 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@68 15123 #endif
jpayne@68 15124 ); /*proto*/
jpayne@68 15125 PyDoc_STRVAR(__pyx_doc_5pysam_9libctabix_13EmptyIterator___iter__, "EmptyIterator.__iter__(self)");
jpayne@68 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@68 15127 static PyObject *__pyx_pw_5pysam_9libctabix_13EmptyIterator_1__iter__(PyObject *__pyx_self,
jpayne@68 15128 #if CYTHON_METH_FASTCALL
jpayne@68 15129 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@68 15130 #else
jpayne@68 15131 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@68 15132 #endif
jpayne@68 15133 ) {
jpayne@68 15134 PyObject *__pyx_v_self = 0;
jpayne@68 15135 #if !CYTHON_METH_FASTCALL
jpayne@68 15136 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
jpayne@68 15137 #endif
jpayne@68 15138 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@68 15139 PyObject* values[1] = {0};
jpayne@68 15140 int __pyx_lineno = 0;
jpayne@68 15141 const char *__pyx_filename = NULL;
jpayne@68 15142 int __pyx_clineno = 0;
jpayne@68 15143 PyObject *__pyx_r = 0;
jpayne@68 15144 __Pyx_RefNannyDeclarations
jpayne@68 15145 __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
jpayne@68 15146 #if !CYTHON_METH_FASTCALL
jpayne@68 15147 #if CYTHON_ASSUME_SAFE_MACROS
jpayne@68 15148 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
jpayne@68 15149 #else
jpayne@68 15150 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
jpayne@68 15151 #endif
jpayne@68 15152 #endif
jpayne@68 15153 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
jpayne@68 15154 {
jpayne@68 15155 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,0};
jpayne@68 15156 if (__pyx_kwds) {
jpayne@68 15157 Py_ssize_t kw_args;
jpayne@68 15158 switch (__pyx_nargs) {
jpayne@68 15159 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
jpayne@68 15160 CYTHON_FALLTHROUGH;
jpayne@68 15161 case 0: break;
jpayne@68 15162 default: goto __pyx_L5_argtuple_error;
jpayne@68 15163 }
jpayne@68 15164 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
jpayne@68 15165 switch (__pyx_nargs) {
jpayne@68 15166 case 0:
jpayne@68 15167 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
jpayne@68 15168 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
jpayne@68 15169 kw_args--;
jpayne@68 15170 }
jpayne@68 15171 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 685, __pyx_L3_error)
jpayne@68 15172 else goto __pyx_L5_argtuple_error;
jpayne@68 15173 }
jpayne@68 15174 if (unlikely(kw_args > 0)) {
jpayne@68 15175 const Py_ssize_t kwd_pos_args = __pyx_nargs;
jpayne@68 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@68 15177 }
jpayne@68 15178 } else if (unlikely(__pyx_nargs != 1)) {
jpayne@68 15179 goto __pyx_L5_argtuple_error;
jpayne@68 15180 } else {
jpayne@68 15181 values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
jpayne@68 15182 }
jpayne@68 15183 __pyx_v_self = values[0];
jpayne@68 15184 }
jpayne@68 15185 goto __pyx_L6_skip;
jpayne@68 15186 __pyx_L5_argtuple_error:;
jpayne@68 15187 __Pyx_RaiseArgtupleInvalid("__iter__", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 685, __pyx_L3_error)
jpayne@68 15188 __pyx_L6_skip:;
jpayne@68 15189 goto __pyx_L4_argument_unpacking_done;
jpayne@68 15190 __pyx_L3_error:;
jpayne@68 15191 {
jpayne@68 15192 Py_ssize_t __pyx_temp;
jpayne@68 15193 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
jpayne@68 15194 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
jpayne@68 15195 }
jpayne@68 15196 }
jpayne@68 15197 __Pyx_AddTraceback("pysam.libctabix.EmptyIterator.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@68 15198 __Pyx_RefNannyFinishContext();
jpayne@68 15199 return NULL;
jpayne@68 15200 __pyx_L4_argument_unpacking_done:;
jpayne@68 15201 __pyx_r = __pyx_pf_5pysam_9libctabix_13EmptyIterator___iter__(__pyx_self, __pyx_v_self);
jpayne@68 15202
jpayne@68 15203 /* function exit code */
jpayne@68 15204 {
jpayne@68 15205 Py_ssize_t __pyx_temp;
jpayne@68 15206 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
jpayne@68 15207 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
jpayne@68 15208 }
jpayne@68 15209 }
jpayne@68 15210 __Pyx_RefNannyFinishContext();
jpayne@68 15211 return __pyx_r;
jpayne@68 15212 }
jpayne@68 15213
jpayne@68 15214 static PyObject *__pyx_pf_5pysam_9libctabix_13EmptyIterator___iter__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
jpayne@68 15215 PyObject *__pyx_r = NULL;
jpayne@68 15216 __Pyx_TraceDeclarations
jpayne@68 15217 __Pyx_RefNannyDeclarations
jpayne@68 15218 int __pyx_lineno = 0;
jpayne@68 15219 const char *__pyx_filename = NULL;
jpayne@68 15220 int __pyx_clineno = 0;
jpayne@68 15221 __Pyx_TraceFrameInit(__pyx_codeobj__27)
jpayne@68 15222 __Pyx_RefNannySetupContext("__iter__", 1);
jpayne@68 15223 __Pyx_TraceCall("__iter__", __pyx_f[0], 685, 0, __PYX_ERR(0, 685, __pyx_L1_error));
jpayne@68 15224
jpayne@68 15225 /* "pysam/libctabix.pyx":686
jpayne@68 15226 *
jpayne@68 15227 * def __iter__(self):
jpayne@68 15228 * return self # <<<<<<<<<<<<<<
jpayne@68 15229 *
jpayne@68 15230 * def __next__(self):
jpayne@68 15231 */
jpayne@68 15232 __Pyx_XDECREF(__pyx_r);
jpayne@68 15233 __Pyx_INCREF(__pyx_v_self);
jpayne@68 15234 __pyx_r = __pyx_v_self;
jpayne@68 15235 goto __pyx_L0;
jpayne@68 15236
jpayne@68 15237 /* "pysam/libctabix.pyx":685
jpayne@68 15238 * '''empty iterator'''
jpayne@68 15239 *
jpayne@68 15240 * def __iter__(self): # <<<<<<<<<<<<<<
jpayne@68 15241 * return self
jpayne@68 15242 *
jpayne@68 15243 */
jpayne@68 15244
jpayne@68 15245 /* function exit code */
jpayne@68 15246 __pyx_L1_error:;
jpayne@68 15247 __Pyx_AddTraceback("pysam.libctabix.EmptyIterator.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@68 15248 __pyx_r = NULL;
jpayne@68 15249 __pyx_L0:;
jpayne@68 15250 __Pyx_XGIVEREF(__pyx_r);
jpayne@68 15251 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@68 15252 __Pyx_RefNannyFinishContext();
jpayne@68 15253 return __pyx_r;
jpayne@68 15254 }
jpayne@68 15255
jpayne@68 15256 /* "pysam/libctabix.pyx":688
jpayne@68 15257 * return self
jpayne@68 15258 *
jpayne@68 15259 * def __next__(self): # <<<<<<<<<<<<<<
jpayne@68 15260 * raise StopIteration()
jpayne@68 15261 *
jpayne@68 15262 */
jpayne@68 15263
jpayne@68 15264 /* Python wrapper */
jpayne@68 15265 static PyObject *__pyx_pw_5pysam_9libctabix_13EmptyIterator_3__next__(PyObject *__pyx_self,
jpayne@68 15266 #if CYTHON_METH_FASTCALL
jpayne@68 15267 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@68 15268 #else
jpayne@68 15269 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@68 15270 #endif
jpayne@68 15271 ); /*proto*/
jpayne@68 15272 PyDoc_STRVAR(__pyx_doc_5pysam_9libctabix_13EmptyIterator_2__next__, "EmptyIterator.__next__(self)");
jpayne@68 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@68 15274 static PyObject *__pyx_pw_5pysam_9libctabix_13EmptyIterator_3__next__(PyObject *__pyx_self,
jpayne@68 15275 #if CYTHON_METH_FASTCALL
jpayne@68 15276 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@68 15277 #else
jpayne@68 15278 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@68 15279 #endif
jpayne@68 15280 ) {
jpayne@68 15281 CYTHON_UNUSED PyObject *__pyx_v_self = 0;
jpayne@68 15282 #if !CYTHON_METH_FASTCALL
jpayne@68 15283 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
jpayne@68 15284 #endif
jpayne@68 15285 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@68 15286 PyObject* values[1] = {0};
jpayne@68 15287 int __pyx_lineno = 0;
jpayne@68 15288 const char *__pyx_filename = NULL;
jpayne@68 15289 int __pyx_clineno = 0;
jpayne@68 15290 PyObject *__pyx_r = 0;
jpayne@68 15291 __Pyx_RefNannyDeclarations
jpayne@68 15292 __Pyx_RefNannySetupContext("__next__ (wrapper)", 0);
jpayne@68 15293 #if !CYTHON_METH_FASTCALL
jpayne@68 15294 #if CYTHON_ASSUME_SAFE_MACROS
jpayne@68 15295 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
jpayne@68 15296 #else
jpayne@68 15297 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
jpayne@68 15298 #endif
jpayne@68 15299 #endif
jpayne@68 15300 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
jpayne@68 15301 {
jpayne@68 15302 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,0};
jpayne@68 15303 if (__pyx_kwds) {
jpayne@68 15304 Py_ssize_t kw_args;
jpayne@68 15305 switch (__pyx_nargs) {
jpayne@68 15306 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
jpayne@68 15307 CYTHON_FALLTHROUGH;
jpayne@68 15308 case 0: break;
jpayne@68 15309 default: goto __pyx_L5_argtuple_error;
jpayne@68 15310 }
jpayne@68 15311 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
jpayne@68 15312 switch (__pyx_nargs) {
jpayne@68 15313 case 0:
jpayne@68 15314 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
jpayne@68 15315 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
jpayne@68 15316 kw_args--;
jpayne@68 15317 }
jpayne@68 15318 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 688, __pyx_L3_error)
jpayne@68 15319 else goto __pyx_L5_argtuple_error;
jpayne@68 15320 }
jpayne@68 15321 if (unlikely(kw_args > 0)) {
jpayne@68 15322 const Py_ssize_t kwd_pos_args = __pyx_nargs;
jpayne@68 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@68 15324 }
jpayne@68 15325 } else if (unlikely(__pyx_nargs != 1)) {
jpayne@68 15326 goto __pyx_L5_argtuple_error;
jpayne@68 15327 } else {
jpayne@68 15328 values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
jpayne@68 15329 }
jpayne@68 15330 __pyx_v_self = values[0];
jpayne@68 15331 }
jpayne@68 15332 goto __pyx_L6_skip;
jpayne@68 15333 __pyx_L5_argtuple_error:;
jpayne@68 15334 __Pyx_RaiseArgtupleInvalid("__next__", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 688, __pyx_L3_error)
jpayne@68 15335 __pyx_L6_skip:;
jpayne@68 15336 goto __pyx_L4_argument_unpacking_done;
jpayne@68 15337 __pyx_L3_error:;
jpayne@68 15338 {
jpayne@68 15339 Py_ssize_t __pyx_temp;
jpayne@68 15340 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
jpayne@68 15341 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
jpayne@68 15342 }
jpayne@68 15343 }
jpayne@68 15344 __Pyx_AddTraceback("pysam.libctabix.EmptyIterator.__next__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@68 15345 __Pyx_RefNannyFinishContext();
jpayne@68 15346 return NULL;
jpayne@68 15347 __pyx_L4_argument_unpacking_done:;
jpayne@68 15348 __pyx_r = __pyx_pf_5pysam_9libctabix_13EmptyIterator_2__next__(__pyx_self, __pyx_v_self);
jpayne@68 15349
jpayne@68 15350 /* function exit code */
jpayne@68 15351 {
jpayne@68 15352 Py_ssize_t __pyx_temp;
jpayne@68 15353 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
jpayne@68 15354 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
jpayne@68 15355 }
jpayne@68 15356 }
jpayne@68 15357 __Pyx_RefNannyFinishContext();
jpayne@68 15358 return __pyx_r;
jpayne@68 15359 }
jpayne@68 15360
jpayne@68 15361 static PyObject *__pyx_pf_5pysam_9libctabix_13EmptyIterator_2__next__(CYTHON_UNUSED PyObject *__pyx_self, CYTHON_UNUSED PyObject *__pyx_v_self) {
jpayne@68 15362 PyObject *__pyx_r = NULL;
jpayne@68 15363 __Pyx_TraceDeclarations
jpayne@68 15364 __Pyx_RefNannyDeclarations
jpayne@68 15365 PyObject *__pyx_t_1 = NULL;
jpayne@68 15366 int __pyx_lineno = 0;
jpayne@68 15367 const char *__pyx_filename = NULL;
jpayne@68 15368 int __pyx_clineno = 0;
jpayne@68 15369 __Pyx_TraceFrameInit(__pyx_codeobj__28)
jpayne@68 15370 __Pyx_RefNannySetupContext("__next__", 1);
jpayne@68 15371 __Pyx_TraceCall("__next__", __pyx_f[0], 688, 0, __PYX_ERR(0, 688, __pyx_L1_error));
jpayne@68 15372
jpayne@68 15373 /* "pysam/libctabix.pyx":689
jpayne@68 15374 *
jpayne@68 15375 * def __next__(self):
jpayne@68 15376 * raise StopIteration() # <<<<<<<<<<<<<<
jpayne@68 15377 *
jpayne@68 15378 *
jpayne@68 15379 */
jpayne@68 15380 __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_builtin_StopIteration); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 689, __pyx_L1_error)
jpayne@68 15381 __Pyx_GOTREF(__pyx_t_1);
jpayne@68 15382 __Pyx_Raise(__pyx_t_1, 0, 0, 0);
jpayne@68 15383 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@68 15384 __PYX_ERR(0, 689, __pyx_L1_error)
jpayne@68 15385
jpayne@68 15386 /* "pysam/libctabix.pyx":688
jpayne@68 15387 * return self
jpayne@68 15388 *
jpayne@68 15389 * def __next__(self): # <<<<<<<<<<<<<<
jpayne@68 15390 * raise StopIteration()
jpayne@68 15391 *
jpayne@68 15392 */
jpayne@68 15393
jpayne@68 15394 /* function exit code */
jpayne@68 15395 __pyx_L1_error:;
jpayne@68 15396 __Pyx_XDECREF(__pyx_t_1);
jpayne@68 15397 __Pyx_AddTraceback("pysam.libctabix.EmptyIterator.__next__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@68 15398 __pyx_r = NULL;
jpayne@68 15399 __Pyx_XGIVEREF(__pyx_r);
jpayne@68 15400 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@68 15401 __Pyx_RefNannyFinishContext();
jpayne@68 15402 return __pyx_r;
jpayne@68 15403 }
jpayne@68 15404
jpayne@68 15405 /* "pysam/libctabix.pyx":700
jpayne@68 15406 * """
jpayne@68 15407 *
jpayne@68 15408 * def __init__(self, Parser parser): # <<<<<<<<<<<<<<
jpayne@68 15409 * super().__init__()
jpayne@68 15410 * self.parser = parser
jpayne@68 15411 */
jpayne@68 15412
jpayne@68 15413 /* Python wrapper */
jpayne@68 15414 static int __pyx_pw_5pysam_9libctabix_19TabixIteratorParsed_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
jpayne@68 15415 static int __pyx_pw_5pysam_9libctabix_19TabixIteratorParsed_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
jpayne@68 15416 struct __pyx_obj_5pysam_9libctabix_Parser *__pyx_v_parser = 0;
jpayne@68 15417 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
jpayne@68 15418 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@68 15419 PyObject* values[1] = {0};
jpayne@68 15420 int __pyx_lineno = 0;
jpayne@68 15421 const char *__pyx_filename = NULL;
jpayne@68 15422 int __pyx_clineno = 0;
jpayne@68 15423 int __pyx_r;
jpayne@68 15424 __Pyx_RefNannyDeclarations
jpayne@68 15425 __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
jpayne@68 15426 #if CYTHON_ASSUME_SAFE_MACROS
jpayne@68 15427 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
jpayne@68 15428 #else
jpayne@68 15429 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
jpayne@68 15430 #endif
jpayne@68 15431 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
jpayne@68 15432 {
jpayne@68 15433 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_parser,0};
jpayne@68 15434 if (__pyx_kwds) {
jpayne@68 15435 Py_ssize_t kw_args;
jpayne@68 15436 switch (__pyx_nargs) {
jpayne@68 15437 case 1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
jpayne@68 15438 CYTHON_FALLTHROUGH;
jpayne@68 15439 case 0: break;
jpayne@68 15440 default: goto __pyx_L5_argtuple_error;
jpayne@68 15441 }
jpayne@68 15442 kw_args = __Pyx_NumKwargs_VARARGS(__pyx_kwds);
jpayne@68 15443 switch (__pyx_nargs) {
jpayne@68 15444 case 0:
jpayne@68 15445 if (likely((values[0] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_parser)) != 0)) {
jpayne@68 15446 (void)__Pyx_Arg_NewRef_VARARGS(values[0]);
jpayne@68 15447 kw_args--;
jpayne@68 15448 }
jpayne@68 15449 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 700, __pyx_L3_error)
jpayne@68 15450 else goto __pyx_L5_argtuple_error;
jpayne@68 15451 }
jpayne@68 15452 if (unlikely(kw_args > 0)) {
jpayne@68 15453 const Py_ssize_t kwd_pos_args = __pyx_nargs;
jpayne@68 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@68 15455 }
jpayne@68 15456 } else if (unlikely(__pyx_nargs != 1)) {
jpayne@68 15457 goto __pyx_L5_argtuple_error;
jpayne@68 15458 } else {
jpayne@68 15459 values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
jpayne@68 15460 }
jpayne@68 15461 __pyx_v_parser = ((struct __pyx_obj_5pysam_9libctabix_Parser *)values[0]);
jpayne@68 15462 }
jpayne@68 15463 goto __pyx_L6_skip;
jpayne@68 15464 __pyx_L5_argtuple_error:;
jpayne@68 15465 __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 700, __pyx_L3_error)
jpayne@68 15466 __pyx_L6_skip:;
jpayne@68 15467 goto __pyx_L4_argument_unpacking_done;
jpayne@68 15468 __pyx_L3_error:;
jpayne@68 15469 {
jpayne@68 15470 Py_ssize_t __pyx_temp;
jpayne@68 15471 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
jpayne@68 15472 __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]);
jpayne@68 15473 }
jpayne@68 15474 }
jpayne@68 15475 __Pyx_AddTraceback("pysam.libctabix.TabixIteratorParsed.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@68 15476 __Pyx_RefNannyFinishContext();
jpayne@68 15477 return -1;
jpayne@68 15478 __pyx_L4_argument_unpacking_done:;
jpayne@68 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@68 15480 __pyx_r = __pyx_pf_5pysam_9libctabix_19TabixIteratorParsed___init__(((struct __pyx_obj_5pysam_9libctabix_TabixIteratorParsed *)__pyx_v_self), __pyx_v_parser);
jpayne@68 15481
jpayne@68 15482 /* function exit code */
jpayne@68 15483 goto __pyx_L0;
jpayne@68 15484 __pyx_L1_error:;
jpayne@68 15485 __pyx_r = -1;
jpayne@68 15486 __pyx_L0:;
jpayne@68 15487 {
jpayne@68 15488 Py_ssize_t __pyx_temp;
jpayne@68 15489 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
jpayne@68 15490 __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]);
jpayne@68 15491 }
jpayne@68 15492 }
jpayne@68 15493 __Pyx_RefNannyFinishContext();
jpayne@68 15494 return __pyx_r;
jpayne@68 15495 }
jpayne@68 15496
jpayne@68 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@68 15498 int __pyx_r;
jpayne@68 15499 __Pyx_TraceDeclarations
jpayne@68 15500 __Pyx_RefNannyDeclarations
jpayne@68 15501 PyObject *__pyx_t_1 = NULL;
jpayne@68 15502 PyObject *__pyx_t_2 = NULL;
jpayne@68 15503 PyObject *__pyx_t_3 = NULL;
jpayne@68 15504 unsigned int __pyx_t_4;
jpayne@68 15505 int __pyx_lineno = 0;
jpayne@68 15506 const char *__pyx_filename = NULL;
jpayne@68 15507 int __pyx_clineno = 0;
jpayne@68 15508 __Pyx_RefNannySetupContext("__init__", 1);
jpayne@68 15509 __Pyx_TraceCall("__init__", __pyx_f[0], 700, 0, __PYX_ERR(0, 700, __pyx_L1_error));
jpayne@68 15510
jpayne@68 15511 /* "pysam/libctabix.pyx":701
jpayne@68 15512 *
jpayne@68 15513 * def __init__(self, Parser parser):
jpayne@68 15514 * super().__init__() # <<<<<<<<<<<<<<
jpayne@68 15515 * self.parser = parser
jpayne@68 15516 *
jpayne@68 15517 */
jpayne@68 15518 __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 701, __pyx_L1_error)
jpayne@68 15519 __Pyx_GOTREF(__pyx_t_2);
jpayne@68 15520 __Pyx_INCREF((PyObject *)__pyx_ptype_5pysam_9libctabix_TabixIteratorParsed);
jpayne@68 15521 __Pyx_GIVEREF((PyObject *)__pyx_ptype_5pysam_9libctabix_TabixIteratorParsed);
jpayne@68 15522 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_ptype_5pysam_9libctabix_TabixIteratorParsed))) __PYX_ERR(0, 701, __pyx_L1_error);
jpayne@68 15523 __Pyx_INCREF((PyObject *)__pyx_v_self);
jpayne@68 15524 __Pyx_GIVEREF((PyObject *)__pyx_v_self);
jpayne@68 15525 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_v_self))) __PYX_ERR(0, 701, __pyx_L1_error);
jpayne@68 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@68 15527 __Pyx_GOTREF(__pyx_t_3);
jpayne@68 15528 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@68 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@68 15530 __Pyx_GOTREF(__pyx_t_2);
jpayne@68 15531 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
jpayne@68 15532 __pyx_t_3 = NULL;
jpayne@68 15533 __pyx_t_4 = 0;
jpayne@68 15534 #if CYTHON_UNPACK_METHODS
jpayne@68 15535 if (likely(PyMethod_Check(__pyx_t_2))) {
jpayne@68 15536 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
jpayne@68 15537 if (likely(__pyx_t_3)) {
jpayne@68 15538 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
jpayne@68 15539 __Pyx_INCREF(__pyx_t_3);
jpayne@68 15540 __Pyx_INCREF(function);
jpayne@68 15541 __Pyx_DECREF_SET(__pyx_t_2, function);
jpayne@68 15542 __pyx_t_4 = 1;
jpayne@68 15543 }
jpayne@68 15544 }
jpayne@68 15545 #endif
jpayne@68 15546 {
jpayne@68 15547 PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
jpayne@68 15548 __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
jpayne@68 15549 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
jpayne@68 15550 if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 701, __pyx_L1_error)
jpayne@68 15551 __Pyx_GOTREF(__pyx_t_1);
jpayne@68 15552 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@68 15553 }
jpayne@68 15554 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@68 15555
jpayne@68 15556 /* "pysam/libctabix.pyx":702
jpayne@68 15557 * def __init__(self, Parser parser):
jpayne@68 15558 * super().__init__()
jpayne@68 15559 * self.parser = parser # <<<<<<<<<<<<<<
jpayne@68 15560 *
jpayne@68 15561 * def __next__(self):
jpayne@68 15562 */
jpayne@68 15563 __Pyx_INCREF((PyObject *)__pyx_v_parser);
jpayne@68 15564 __Pyx_GIVEREF((PyObject *)__pyx_v_parser);
jpayne@68 15565 __Pyx_GOTREF((PyObject *)__pyx_v_self->parser);
jpayne@68 15566 __Pyx_DECREF((PyObject *)__pyx_v_self->parser);
jpayne@68 15567 __pyx_v_self->parser = __pyx_v_parser;
jpayne@68 15568
jpayne@68 15569 /* "pysam/libctabix.pyx":700
jpayne@68 15570 * """
jpayne@68 15571 *
jpayne@68 15572 * def __init__(self, Parser parser): # <<<<<<<<<<<<<<
jpayne@68 15573 * super().__init__()
jpayne@68 15574 * self.parser = parser
jpayne@68 15575 */
jpayne@68 15576
jpayne@68 15577 /* function exit code */
jpayne@68 15578 __pyx_r = 0;
jpayne@68 15579 goto __pyx_L0;
jpayne@68 15580 __pyx_L1_error:;
jpayne@68 15581 __Pyx_XDECREF(__pyx_t_1);
jpayne@68 15582 __Pyx_XDECREF(__pyx_t_2);
jpayne@68 15583 __Pyx_XDECREF(__pyx_t_3);
jpayne@68 15584 __Pyx_AddTraceback("pysam.libctabix.TabixIteratorParsed.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@68 15585 __pyx_r = -1;
jpayne@68 15586 __pyx_L0:;
jpayne@68 15587 __Pyx_TraceReturn(Py_None, 0);
jpayne@68 15588 __Pyx_RefNannyFinishContext();
jpayne@68 15589 return __pyx_r;
jpayne@68 15590 }
jpayne@68 15591
jpayne@68 15592 /* "pysam/libctabix.pyx":704
jpayne@68 15593 * self.parser = parser
jpayne@68 15594 *
jpayne@68 15595 * def __next__(self): # <<<<<<<<<<<<<<
jpayne@68 15596 * """python version of next().
jpayne@68 15597 *
jpayne@68 15598 */
jpayne@68 15599
jpayne@68 15600 /* Python wrapper */
jpayne@68 15601 static PyObject *__pyx_pw_5pysam_9libctabix_19TabixIteratorParsed_3__next__(PyObject *__pyx_v_self); /*proto*/
jpayne@68 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@68 15603 #if CYTHON_UPDATE_DESCRIPTOR_DOC
jpayne@68 15604 struct wrapperbase __pyx_wrapperbase_5pysam_9libctabix_19TabixIteratorParsed_2__next__;
jpayne@68 15605 #endif
jpayne@68 15606 static PyObject *__pyx_pw_5pysam_9libctabix_19TabixIteratorParsed_3__next__(PyObject *__pyx_v_self) {
jpayne@68 15607 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@68 15608 PyObject *__pyx_r = 0;
jpayne@68 15609 __Pyx_RefNannyDeclarations
jpayne@68 15610 __Pyx_RefNannySetupContext("__next__ (wrapper)", 0);
jpayne@68 15611 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
jpayne@68 15612 __pyx_r = __pyx_pf_5pysam_9libctabix_19TabixIteratorParsed_2__next__(((struct __pyx_obj_5pysam_9libctabix_TabixIteratorParsed *)__pyx_v_self));
jpayne@68 15613
jpayne@68 15614 /* function exit code */
jpayne@68 15615 __Pyx_RefNannyFinishContext();
jpayne@68 15616 return __pyx_r;
jpayne@68 15617 }
jpayne@68 15618
jpayne@68 15619 static PyObject *__pyx_pf_5pysam_9libctabix_19TabixIteratorParsed_2__next__(struct __pyx_obj_5pysam_9libctabix_TabixIteratorParsed *__pyx_v_self) {
jpayne@68 15620 int __pyx_v_retval;
jpayne@68 15621 PyObject *__pyx_r = NULL;
jpayne@68 15622 __Pyx_TraceDeclarations
jpayne@68 15623 __Pyx_RefNannyDeclarations
jpayne@68 15624 int __pyx_error_without_exception = 0; /* StopIteration */
jpayne@68 15625 int __pyx_t_1;
jpayne@68 15626 int __pyx_t_2;
jpayne@68 15627 PyObject *__pyx_t_3 = NULL;
jpayne@68 15628 int __pyx_lineno = 0;
jpayne@68 15629 const char *__pyx_filename = NULL;
jpayne@68 15630 int __pyx_clineno = 0;
jpayne@68 15631 __Pyx_RefNannySetupContext("__next__", 1);
jpayne@68 15632 __Pyx_TraceCall("__next__", __pyx_f[0], 704, 0, __PYX_ERR(0, 704, __pyx_L1_error));
jpayne@68 15633
jpayne@68 15634 /* "pysam/libctabix.pyx":710
jpayne@68 15635 * """
jpayne@68 15636 *
jpayne@68 15637 * cdef int retval = self.__cnext__() # <<<<<<<<<<<<<<
jpayne@68 15638 * if retval == -5:
jpayne@68 15639 * raise IOError("iteration on closed file")
jpayne@68 15640 */
jpayne@68 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@68 15642 __pyx_v_retval = __pyx_t_1;
jpayne@68 15643
jpayne@68 15644 /* "pysam/libctabix.pyx":711
jpayne@68 15645 *
jpayne@68 15646 * cdef int retval = self.__cnext__()
jpayne@68 15647 * if retval == -5: # <<<<<<<<<<<<<<
jpayne@68 15648 * raise IOError("iteration on closed file")
jpayne@68 15649 * elif retval < 0:
jpayne@68 15650 */
jpayne@68 15651 __pyx_t_2 = (__pyx_v_retval == -5L);
jpayne@68 15652 if (unlikely(__pyx_t_2)) {
jpayne@68 15653
jpayne@68 15654 /* "pysam/libctabix.pyx":712
jpayne@68 15655 * cdef int retval = self.__cnext__()
jpayne@68 15656 * if retval == -5:
jpayne@68 15657 * raise IOError("iteration on closed file") # <<<<<<<<<<<<<<
jpayne@68 15658 * elif retval < 0:
jpayne@68 15659 * raise StopIteration
jpayne@68 15660 */
jpayne@68 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@68 15662 __Pyx_GOTREF(__pyx_t_3);
jpayne@68 15663 __Pyx_Raise(__pyx_t_3, 0, 0, 0);
jpayne@68 15664 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
jpayne@68 15665 __PYX_ERR(0, 712, __pyx_L1_error)
jpayne@68 15666
jpayne@68 15667 /* "pysam/libctabix.pyx":711
jpayne@68 15668 *
jpayne@68 15669 * cdef int retval = self.__cnext__()
jpayne@68 15670 * if retval == -5: # <<<<<<<<<<<<<<
jpayne@68 15671 * raise IOError("iteration on closed file")
jpayne@68 15672 * elif retval < 0:
jpayne@68 15673 */
jpayne@68 15674 }
jpayne@68 15675
jpayne@68 15676 /* "pysam/libctabix.pyx":713
jpayne@68 15677 * if retval == -5:
jpayne@68 15678 * raise IOError("iteration on closed file")
jpayne@68 15679 * elif retval < 0: # <<<<<<<<<<<<<<
jpayne@68 15680 * raise StopIteration
jpayne@68 15681 *
jpayne@68 15682 */
jpayne@68 15683 __pyx_t_2 = (__pyx_v_retval < 0);
jpayne@68 15684 if (unlikely(__pyx_t_2)) {
jpayne@68 15685
jpayne@68 15686 /* "pysam/libctabix.pyx":714
jpayne@68 15687 * raise IOError("iteration on closed file")
jpayne@68 15688 * elif retval < 0:
jpayne@68 15689 * raise StopIteration # <<<<<<<<<<<<<<
jpayne@68 15690 *
jpayne@68 15691 * return self.parser.parse(self.buffer.s,
jpayne@68 15692 */
jpayne@68 15693 __pyx_error_without_exception = 1;
jpayne@68 15694 goto __pyx_L1_error;;
jpayne@68 15695
jpayne@68 15696 /* "pysam/libctabix.pyx":713
jpayne@68 15697 * if retval == -5:
jpayne@68 15698 * raise IOError("iteration on closed file")
jpayne@68 15699 * elif retval < 0: # <<<<<<<<<<<<<<
jpayne@68 15700 * raise StopIteration
jpayne@68 15701 *
jpayne@68 15702 */
jpayne@68 15703 }
jpayne@68 15704
jpayne@68 15705 /* "pysam/libctabix.pyx":716
jpayne@68 15706 * raise StopIteration
jpayne@68 15707 *
jpayne@68 15708 * return self.parser.parse(self.buffer.s, # <<<<<<<<<<<<<<
jpayne@68 15709 * self.buffer.l)
jpayne@68 15710 *
jpayne@68 15711 */
jpayne@68 15712 __Pyx_XDECREF(__pyx_r);
jpayne@68 15713
jpayne@68 15714 /* "pysam/libctabix.pyx":717
jpayne@68 15715 *
jpayne@68 15716 * return self.parser.parse(self.buffer.s,
jpayne@68 15717 * self.buffer.l) # <<<<<<<<<<<<<<
jpayne@68 15718 *
jpayne@68 15719 *
jpayne@68 15720 */
jpayne@68 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@68 15722 __Pyx_GOTREF(__pyx_t_3);
jpayne@68 15723 __pyx_r = __pyx_t_3;
jpayne@68 15724 __pyx_t_3 = 0;
jpayne@68 15725 goto __pyx_L0;
jpayne@68 15726
jpayne@68 15727 /* "pysam/libctabix.pyx":704
jpayne@68 15728 * self.parser = parser
jpayne@68 15729 *
jpayne@68 15730 * def __next__(self): # <<<<<<<<<<<<<<
jpayne@68 15731 * """python version of next().
jpayne@68 15732 *
jpayne@68 15733 */
jpayne@68 15734
jpayne@68 15735 /* function exit code */
jpayne@68 15736 __pyx_L1_error:;
jpayne@68 15737 __Pyx_XDECREF(__pyx_t_3);
jpayne@68 15738 if (!__pyx_error_without_exception) {
jpayne@68 15739 __Pyx_AddTraceback("pysam.libctabix.TabixIteratorParsed.__next__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@68 15740 }
jpayne@68 15741 __pyx_r = NULL;
jpayne@68 15742 __pyx_L0:;
jpayne@68 15743 __Pyx_XGIVEREF(__pyx_r);
jpayne@68 15744 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@68 15745 __Pyx_RefNannyFinishContext();
jpayne@68 15746 return __pyx_r;
jpayne@68 15747 }
jpayne@68 15748
jpayne@68 15749 /* "(tree fragment)":1
jpayne@68 15750 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
jpayne@68 15751 * raise TypeError, "self.iterator cannot be converted to a Python object for pickling"
jpayne@68 15752 * def __setstate_cython__(self, __pyx_state):
jpayne@68 15753 */
jpayne@68 15754
jpayne@68 15755 /* Python wrapper */
jpayne@68 15756 static PyObject *__pyx_pw_5pysam_9libctabix_19TabixIteratorParsed_5__reduce_cython__(PyObject *__pyx_v_self,
jpayne@68 15757 #if CYTHON_METH_FASTCALL
jpayne@68 15758 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@68 15759 #else
jpayne@68 15760 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@68 15761 #endif
jpayne@68 15762 ); /*proto*/
jpayne@68 15763 PyDoc_STRVAR(__pyx_doc_5pysam_9libctabix_19TabixIteratorParsed_4__reduce_cython__, "TabixIteratorParsed.__reduce_cython__(self)");
jpayne@68 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@68 15765 static PyObject *__pyx_pw_5pysam_9libctabix_19TabixIteratorParsed_5__reduce_cython__(PyObject *__pyx_v_self,
jpayne@68 15766 #if CYTHON_METH_FASTCALL
jpayne@68 15767 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@68 15768 #else
jpayne@68 15769 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@68 15770 #endif
jpayne@68 15771 ) {
jpayne@68 15772 #if !CYTHON_METH_FASTCALL
jpayne@68 15773 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
jpayne@68 15774 #endif
jpayne@68 15775 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@68 15776 PyObject *__pyx_r = 0;
jpayne@68 15777 __Pyx_RefNannyDeclarations
jpayne@68 15778 __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
jpayne@68 15779 #if !CYTHON_METH_FASTCALL
jpayne@68 15780 #if CYTHON_ASSUME_SAFE_MACROS
jpayne@68 15781 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
jpayne@68 15782 #else
jpayne@68 15783 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
jpayne@68 15784 #endif
jpayne@68 15785 #endif
jpayne@68 15786 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
jpayne@68 15787 if (unlikely(__pyx_nargs > 0)) {
jpayne@68 15788 __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL;}
jpayne@68 15789 if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__reduce_cython__", 0))) return NULL;
jpayne@68 15790 __pyx_r = __pyx_pf_5pysam_9libctabix_19TabixIteratorParsed_4__reduce_cython__(((struct __pyx_obj_5pysam_9libctabix_TabixIteratorParsed *)__pyx_v_self));
jpayne@68 15791
jpayne@68 15792 /* function exit code */
jpayne@68 15793 __Pyx_RefNannyFinishContext();
jpayne@68 15794 return __pyx_r;
jpayne@68 15795 }
jpayne@68 15796
jpayne@68 15797 static PyObject *__pyx_pf_5pysam_9libctabix_19TabixIteratorParsed_4__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5pysam_9libctabix_TabixIteratorParsed *__pyx_v_self) {
jpayne@68 15798 PyObject *__pyx_r = NULL;
jpayne@68 15799 __Pyx_TraceDeclarations
jpayne@68 15800 __Pyx_RefNannyDeclarations
jpayne@68 15801 int __pyx_lineno = 0;
jpayne@68 15802 const char *__pyx_filename = NULL;
jpayne@68 15803 int __pyx_clineno = 0;
jpayne@68 15804 __Pyx_TraceFrameInit(__pyx_codeobj__29)
jpayne@68 15805 __Pyx_RefNannySetupContext("__reduce_cython__", 1);
jpayne@68 15806 __Pyx_TraceCall("__reduce_cython__", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));
jpayne@68 15807
jpayne@68 15808 /* "(tree fragment)":2
jpayne@68 15809 * def __reduce_cython__(self):
jpayne@68 15810 * raise TypeError, "self.iterator cannot be converted to a Python object for pickling" # <<<<<<<<<<<<<<
jpayne@68 15811 * def __setstate_cython__(self, __pyx_state):
jpayne@68 15812 * raise TypeError, "self.iterator cannot be converted to a Python object for pickling"
jpayne@68 15813 */
jpayne@68 15814 __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_self_iterator_cannot_be_converte, 0, 0);
jpayne@68 15815 __PYX_ERR(1, 2, __pyx_L1_error)
jpayne@68 15816
jpayne@68 15817 /* "(tree fragment)":1
jpayne@68 15818 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
jpayne@68 15819 * raise TypeError, "self.iterator cannot be converted to a Python object for pickling"
jpayne@68 15820 * def __setstate_cython__(self, __pyx_state):
jpayne@68 15821 */
jpayne@68 15822
jpayne@68 15823 /* function exit code */
jpayne@68 15824 __pyx_L1_error:;
jpayne@68 15825 __Pyx_AddTraceback("pysam.libctabix.TabixIteratorParsed.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@68 15826 __pyx_r = NULL;
jpayne@68 15827 __Pyx_XGIVEREF(__pyx_r);
jpayne@68 15828 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@68 15829 __Pyx_RefNannyFinishContext();
jpayne@68 15830 return __pyx_r;
jpayne@68 15831 }
jpayne@68 15832
jpayne@68 15833 /* "(tree fragment)":3
jpayne@68 15834 * def __reduce_cython__(self):
jpayne@68 15835 * raise TypeError, "self.iterator cannot be converted to a Python object for pickling"
jpayne@68 15836 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
jpayne@68 15837 * raise TypeError, "self.iterator cannot be converted to a Python object for pickling"
jpayne@68 15838 */
jpayne@68 15839
jpayne@68 15840 /* Python wrapper */
jpayne@68 15841 static PyObject *__pyx_pw_5pysam_9libctabix_19TabixIteratorParsed_7__setstate_cython__(PyObject *__pyx_v_self,
jpayne@68 15842 #if CYTHON_METH_FASTCALL
jpayne@68 15843 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@68 15844 #else
jpayne@68 15845 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@68 15846 #endif
jpayne@68 15847 ); /*proto*/
jpayne@68 15848 PyDoc_STRVAR(__pyx_doc_5pysam_9libctabix_19TabixIteratorParsed_6__setstate_cython__, "TabixIteratorParsed.__setstate_cython__(self, __pyx_state)");
jpayne@68 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@68 15850 static PyObject *__pyx_pw_5pysam_9libctabix_19TabixIteratorParsed_7__setstate_cython__(PyObject *__pyx_v_self,
jpayne@68 15851 #if CYTHON_METH_FASTCALL
jpayne@68 15852 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@68 15853 #else
jpayne@68 15854 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@68 15855 #endif
jpayne@68 15856 ) {
jpayne@68 15857 CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0;
jpayne@68 15858 #if !CYTHON_METH_FASTCALL
jpayne@68 15859 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
jpayne@68 15860 #endif
jpayne@68 15861 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@68 15862 PyObject* values[1] = {0};
jpayne@68 15863 int __pyx_lineno = 0;
jpayne@68 15864 const char *__pyx_filename = NULL;
jpayne@68 15865 int __pyx_clineno = 0;
jpayne@68 15866 PyObject *__pyx_r = 0;
jpayne@68 15867 __Pyx_RefNannyDeclarations
jpayne@68 15868 __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
jpayne@68 15869 #if !CYTHON_METH_FASTCALL
jpayne@68 15870 #if CYTHON_ASSUME_SAFE_MACROS
jpayne@68 15871 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
jpayne@68 15872 #else
jpayne@68 15873 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
jpayne@68 15874 #endif
jpayne@68 15875 #endif
jpayne@68 15876 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
jpayne@68 15877 {
jpayne@68 15878 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0};
jpayne@68 15879 if (__pyx_kwds) {
jpayne@68 15880 Py_ssize_t kw_args;
jpayne@68 15881 switch (__pyx_nargs) {
jpayne@68 15882 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
jpayne@68 15883 CYTHON_FALLTHROUGH;
jpayne@68 15884 case 0: break;
jpayne@68 15885 default: goto __pyx_L5_argtuple_error;
jpayne@68 15886 }
jpayne@68 15887 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
jpayne@68 15888 switch (__pyx_nargs) {
jpayne@68 15889 case 0:
jpayne@68 15890 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) {
jpayne@68 15891 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
jpayne@68 15892 kw_args--;
jpayne@68 15893 }
jpayne@68 15894 else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 3, __pyx_L3_error)
jpayne@68 15895 else goto __pyx_L5_argtuple_error;
jpayne@68 15896 }
jpayne@68 15897 if (unlikely(kw_args > 0)) {
jpayne@68 15898 const Py_ssize_t kwd_pos_args = __pyx_nargs;
jpayne@68 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@68 15900 }
jpayne@68 15901 } else if (unlikely(__pyx_nargs != 1)) {
jpayne@68 15902 goto __pyx_L5_argtuple_error;
jpayne@68 15903 } else {
jpayne@68 15904 values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
jpayne@68 15905 }
jpayne@68 15906 __pyx_v___pyx_state = values[0];
jpayne@68 15907 }
jpayne@68 15908 goto __pyx_L6_skip;
jpayne@68 15909 __pyx_L5_argtuple_error:;
jpayne@68 15910 __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 3, __pyx_L3_error)
jpayne@68 15911 __pyx_L6_skip:;
jpayne@68 15912 goto __pyx_L4_argument_unpacking_done;
jpayne@68 15913 __pyx_L3_error:;
jpayne@68 15914 {
jpayne@68 15915 Py_ssize_t __pyx_temp;
jpayne@68 15916 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
jpayne@68 15917 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
jpayne@68 15918 }
jpayne@68 15919 }
jpayne@68 15920 __Pyx_AddTraceback("pysam.libctabix.TabixIteratorParsed.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@68 15921 __Pyx_RefNannyFinishContext();
jpayne@68 15922 return NULL;
jpayne@68 15923 __pyx_L4_argument_unpacking_done:;
jpayne@68 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@68 15925
jpayne@68 15926 /* function exit code */
jpayne@68 15927 {
jpayne@68 15928 Py_ssize_t __pyx_temp;
jpayne@68 15929 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
jpayne@68 15930 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
jpayne@68 15931 }
jpayne@68 15932 }
jpayne@68 15933 __Pyx_RefNannyFinishContext();
jpayne@68 15934 return __pyx_r;
jpayne@68 15935 }
jpayne@68 15936
jpayne@68 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@68 15938 PyObject *__pyx_r = NULL;
jpayne@68 15939 __Pyx_TraceDeclarations
jpayne@68 15940 __Pyx_RefNannyDeclarations
jpayne@68 15941 int __pyx_lineno = 0;
jpayne@68 15942 const char *__pyx_filename = NULL;
jpayne@68 15943 int __pyx_clineno = 0;
jpayne@68 15944 __Pyx_TraceFrameInit(__pyx_codeobj__30)
jpayne@68 15945 __Pyx_RefNannySetupContext("__setstate_cython__", 1);
jpayne@68 15946 __Pyx_TraceCall("__setstate_cython__", __pyx_f[1], 3, 0, __PYX_ERR(1, 3, __pyx_L1_error));
jpayne@68 15947
jpayne@68 15948 /* "(tree fragment)":4
jpayne@68 15949 * raise TypeError, "self.iterator cannot be converted to a Python object for pickling"
jpayne@68 15950 * def __setstate_cython__(self, __pyx_state):
jpayne@68 15951 * raise TypeError, "self.iterator cannot be converted to a Python object for pickling" # <<<<<<<<<<<<<<
jpayne@68 15952 */
jpayne@68 15953 __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_self_iterator_cannot_be_converte, 0, 0);
jpayne@68 15954 __PYX_ERR(1, 4, __pyx_L1_error)
jpayne@68 15955
jpayne@68 15956 /* "(tree fragment)":3
jpayne@68 15957 * def __reduce_cython__(self):
jpayne@68 15958 * raise TypeError, "self.iterator cannot be converted to a Python object for pickling"
jpayne@68 15959 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
jpayne@68 15960 * raise TypeError, "self.iterator cannot be converted to a Python object for pickling"
jpayne@68 15961 */
jpayne@68 15962
jpayne@68 15963 /* function exit code */
jpayne@68 15964 __pyx_L1_error:;
jpayne@68 15965 __Pyx_AddTraceback("pysam.libctabix.TabixIteratorParsed.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@68 15966 __pyx_r = NULL;
jpayne@68 15967 __Pyx_XGIVEREF(__pyx_r);
jpayne@68 15968 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@68 15969 __Pyx_RefNannyFinishContext();
jpayne@68 15970 return __pyx_r;
jpayne@68 15971 }
jpayne@68 15972
jpayne@68 15973 /* "pysam/libctabix.pyx":721
jpayne@68 15974 *
jpayne@68 15975 * cdef class GZIterator:
jpayne@68 15976 * def __init__(self, filename, int buffer_size=65536, encoding="ascii"): # <<<<<<<<<<<<<<
jpayne@68 15977 * '''iterate line-by-line through gzip (or bgzip)
jpayne@68 15978 * compressed file.
jpayne@68 15979 */
jpayne@68 15980
jpayne@68 15981 /* Python wrapper */
jpayne@68 15982 static int __pyx_pw_5pysam_9libctabix_10GZIterator_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
jpayne@68 15983 PyDoc_STRVAR(__pyx_doc_5pysam_9libctabix_10GZIterator___init__, "iterate line-by-line through gzip (or bgzip)\n compressed file.\n ");
jpayne@68 15984 #if CYTHON_UPDATE_DESCRIPTOR_DOC
jpayne@68 15985 struct wrapperbase __pyx_wrapperbase_5pysam_9libctabix_10GZIterator___init__;
jpayne@68 15986 #endif
jpayne@68 15987 static int __pyx_pw_5pysam_9libctabix_10GZIterator_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
jpayne@68 15988 PyObject *__pyx_v_filename = 0;
jpayne@68 15989 int __pyx_v_buffer_size;
jpayne@68 15990 PyObject *__pyx_v_encoding = 0;
jpayne@68 15991 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
jpayne@68 15992 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@68 15993 PyObject* values[3] = {0,0,0};
jpayne@68 15994 int __pyx_lineno = 0;
jpayne@68 15995 const char *__pyx_filename = NULL;
jpayne@68 15996 int __pyx_clineno = 0;
jpayne@68 15997 int __pyx_r;
jpayne@68 15998 __Pyx_RefNannyDeclarations
jpayne@68 15999 __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
jpayne@68 16000 #if CYTHON_ASSUME_SAFE_MACROS
jpayne@68 16001 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
jpayne@68 16002 #else
jpayne@68 16003 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
jpayne@68 16004 #endif
jpayne@68 16005 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
jpayne@68 16006 {
jpayne@68 16007 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_filename,&__pyx_n_s_buffer_size,&__pyx_n_s_encoding,0};
jpayne@68 16008 values[2] = __Pyx_Arg_NewRef_VARARGS(((PyObject *)__pyx_n_u_ascii));
jpayne@68 16009 if (__pyx_kwds) {
jpayne@68 16010 Py_ssize_t kw_args;
jpayne@68 16011 switch (__pyx_nargs) {
jpayne@68 16012 case 3: values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2);
jpayne@68 16013 CYTHON_FALLTHROUGH;
jpayne@68 16014 case 2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
jpayne@68 16015 CYTHON_FALLTHROUGH;
jpayne@68 16016 case 1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
jpayne@68 16017 CYTHON_FALLTHROUGH;
jpayne@68 16018 case 0: break;
jpayne@68 16019 default: goto __pyx_L5_argtuple_error;
jpayne@68 16020 }
jpayne@68 16021 kw_args = __Pyx_NumKwargs_VARARGS(__pyx_kwds);
jpayne@68 16022 switch (__pyx_nargs) {
jpayne@68 16023 case 0:
jpayne@68 16024 if (likely((values[0] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_filename)) != 0)) {
jpayne@68 16025 (void)__Pyx_Arg_NewRef_VARARGS(values[0]);
jpayne@68 16026 kw_args--;
jpayne@68 16027 }
jpayne@68 16028 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 721, __pyx_L3_error)
jpayne@68 16029 else goto __pyx_L5_argtuple_error;
jpayne@68 16030 CYTHON_FALLTHROUGH;
jpayne@68 16031 case 1:
jpayne@68 16032 if (kw_args > 0) {
jpayne@68 16033 PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_buffer_size);
jpayne@68 16034 if (value) { values[1] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; }
jpayne@68 16035 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 721, __pyx_L3_error)
jpayne@68 16036 }
jpayne@68 16037 CYTHON_FALLTHROUGH;
jpayne@68 16038 case 2:
jpayne@68 16039 if (kw_args > 0) {
jpayne@68 16040 PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_encoding);
jpayne@68 16041 if (value) { values[2] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; }
jpayne@68 16042 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 721, __pyx_L3_error)
jpayne@68 16043 }
jpayne@68 16044 }
jpayne@68 16045 if (unlikely(kw_args > 0)) {
jpayne@68 16046 const Py_ssize_t kwd_pos_args = __pyx_nargs;
jpayne@68 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@68 16048 }
jpayne@68 16049 } else {
jpayne@68 16050 switch (__pyx_nargs) {
jpayne@68 16051 case 3: values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2);
jpayne@68 16052 CYTHON_FALLTHROUGH;
jpayne@68 16053 case 2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
jpayne@68 16054 CYTHON_FALLTHROUGH;
jpayne@68 16055 case 1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
jpayne@68 16056 break;
jpayne@68 16057 default: goto __pyx_L5_argtuple_error;
jpayne@68 16058 }
jpayne@68 16059 }
jpayne@68 16060 __pyx_v_filename = values[0];
jpayne@68 16061 if (values[1]) {
jpayne@68 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@68 16063 } else {
jpayne@68 16064 __pyx_v_buffer_size = ((int)0x10000);
jpayne@68 16065 }
jpayne@68 16066 __pyx_v_encoding = values[2];
jpayne@68 16067 }
jpayne@68 16068 goto __pyx_L6_skip;
jpayne@68 16069 __pyx_L5_argtuple_error:;
jpayne@68 16070 __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 3, __pyx_nargs); __PYX_ERR(0, 721, __pyx_L3_error)
jpayne@68 16071 __pyx_L6_skip:;
jpayne@68 16072 goto __pyx_L4_argument_unpacking_done;
jpayne@68 16073 __pyx_L3_error:;
jpayne@68 16074 {
jpayne@68 16075 Py_ssize_t __pyx_temp;
jpayne@68 16076 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
jpayne@68 16077 __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]);
jpayne@68 16078 }
jpayne@68 16079 }
jpayne@68 16080 __Pyx_AddTraceback("pysam.libctabix.GZIterator.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@68 16081 __Pyx_RefNannyFinishContext();
jpayne@68 16082 return -1;
jpayne@68 16083 __pyx_L4_argument_unpacking_done:;
jpayne@68 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@68 16085
jpayne@68 16086 /* function exit code */
jpayne@68 16087 {
jpayne@68 16088 Py_ssize_t __pyx_temp;
jpayne@68 16089 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
jpayne@68 16090 __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]);
jpayne@68 16091 }
jpayne@68 16092 }
jpayne@68 16093 __Pyx_RefNannyFinishContext();
jpayne@68 16094 return __pyx_r;
jpayne@68 16095 }
jpayne@68 16096
jpayne@68 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@68 16098 char *__pyx_v_cfilename;
jpayne@68 16099 int __pyx_r;
jpayne@68 16100 __Pyx_TraceDeclarations
jpayne@68 16101 __Pyx_RefNannyDeclarations
jpayne@68 16102 PyObject *__pyx_t_1 = NULL;
jpayne@68 16103 PyObject *__pyx_t_2 = NULL;
jpayne@68 16104 PyObject *__pyx_t_3 = NULL;
jpayne@68 16105 unsigned int __pyx_t_4;
jpayne@68 16106 int __pyx_t_5;
jpayne@68 16107 int __pyx_t_6;
jpayne@68 16108 char *__pyx_t_7;
jpayne@68 16109 int __pyx_lineno = 0;
jpayne@68 16110 const char *__pyx_filename = NULL;
jpayne@68 16111 int __pyx_clineno = 0;
jpayne@68 16112 __Pyx_RefNannySetupContext("__init__", 0);
jpayne@68 16113 __Pyx_TraceCall("__init__", __pyx_f[0], 721, 0, __PYX_ERR(0, 721, __pyx_L1_error));
jpayne@68 16114 __Pyx_INCREF(__pyx_v_filename);
jpayne@68 16115
jpayne@68 16116 /* "pysam/libctabix.pyx":725
jpayne@68 16117 * compressed file.
jpayne@68 16118 * '''
jpayne@68 16119 * if not os.path.exists(filename): # <<<<<<<<<<<<<<
jpayne@68 16120 * raise IOError("No such file or directory: %s" % filename)
jpayne@68 16121 *
jpayne@68 16122 */
jpayne@68 16123 __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_os); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 725, __pyx_L1_error)
jpayne@68 16124 __Pyx_GOTREF(__pyx_t_2);
jpayne@68 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@68 16126 __Pyx_GOTREF(__pyx_t_3);
jpayne@68 16127 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@68 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@68 16129 __Pyx_GOTREF(__pyx_t_2);
jpayne@68 16130 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
jpayne@68 16131 __pyx_t_3 = NULL;
jpayne@68 16132 __pyx_t_4 = 0;
jpayne@68 16133 #if CYTHON_UNPACK_METHODS
jpayne@68 16134 if (likely(PyMethod_Check(__pyx_t_2))) {
jpayne@68 16135 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
jpayne@68 16136 if (likely(__pyx_t_3)) {
jpayne@68 16137 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
jpayne@68 16138 __Pyx_INCREF(__pyx_t_3);
jpayne@68 16139 __Pyx_INCREF(function);
jpayne@68 16140 __Pyx_DECREF_SET(__pyx_t_2, function);
jpayne@68 16141 __pyx_t_4 = 1;
jpayne@68 16142 }
jpayne@68 16143 }
jpayne@68 16144 #endif
jpayne@68 16145 {
jpayne@68 16146 PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_filename};
jpayne@68 16147 __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
jpayne@68 16148 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
jpayne@68 16149 if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 725, __pyx_L1_error)
jpayne@68 16150 __Pyx_GOTREF(__pyx_t_1);
jpayne@68 16151 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@68 16152 }
jpayne@68 16153 __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 725, __pyx_L1_error)
jpayne@68 16154 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@68 16155 __pyx_t_6 = (!__pyx_t_5);
jpayne@68 16156 if (unlikely(__pyx_t_6)) {
jpayne@68 16157
jpayne@68 16158 /* "pysam/libctabix.pyx":726
jpayne@68 16159 * '''
jpayne@68 16160 * if not os.path.exists(filename):
jpayne@68 16161 * raise IOError("No such file or directory: %s" % filename) # <<<<<<<<<<<<<<
jpayne@68 16162 *
jpayne@68 16163 * filename = encode_filename(filename)
jpayne@68 16164 */
jpayne@68 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@68 16166 __Pyx_GOTREF(__pyx_t_1);
jpayne@68 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@68 16168 __Pyx_GOTREF(__pyx_t_2);
jpayne@68 16169 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@68 16170 __Pyx_Raise(__pyx_t_2, 0, 0, 0);
jpayne@68 16171 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@68 16172 __PYX_ERR(0, 726, __pyx_L1_error)
jpayne@68 16173
jpayne@68 16174 /* "pysam/libctabix.pyx":725
jpayne@68 16175 * compressed file.
jpayne@68 16176 * '''
jpayne@68 16177 * if not os.path.exists(filename): # <<<<<<<<<<<<<<
jpayne@68 16178 * raise IOError("No such file or directory: %s" % filename)
jpayne@68 16179 *
jpayne@68 16180 */
jpayne@68 16181 }
jpayne@68 16182
jpayne@68 16183 /* "pysam/libctabix.pyx":728
jpayne@68 16184 * raise IOError("No such file or directory: %s" % filename)
jpayne@68 16185 *
jpayne@68 16186 * filename = encode_filename(filename) # <<<<<<<<<<<<<<
jpayne@68 16187 * cdef char *cfilename = filename
jpayne@68 16188 * with nogil:
jpayne@68 16189 */
jpayne@68 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@68 16191 __Pyx_GOTREF(__pyx_t_2);
jpayne@68 16192 __Pyx_DECREF_SET(__pyx_v_filename, __pyx_t_2);
jpayne@68 16193 __pyx_t_2 = 0;
jpayne@68 16194
jpayne@68 16195 /* "pysam/libctabix.pyx":729
jpayne@68 16196 *
jpayne@68 16197 * filename = encode_filename(filename)
jpayne@68 16198 * cdef char *cfilename = filename # <<<<<<<<<<<<<<
jpayne@68 16199 * with nogil:
jpayne@68 16200 * self.gzipfile = bgzf_open(cfilename, "r")
jpayne@68 16201 */
jpayne@68 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@68 16203 __pyx_v_cfilename = __pyx_t_7;
jpayne@68 16204
jpayne@68 16205 /* "pysam/libctabix.pyx":730
jpayne@68 16206 * filename = encode_filename(filename)
jpayne@68 16207 * cdef char *cfilename = filename
jpayne@68 16208 * with nogil: # <<<<<<<<<<<<<<
jpayne@68 16209 * self.gzipfile = bgzf_open(cfilename, "r")
jpayne@68 16210 * self._filename = filename
jpayne@68 16211 */
jpayne@68 16212 {
jpayne@68 16213 #ifdef WITH_THREAD
jpayne@68 16214 PyThreadState *_save;
jpayne@68 16215 _save = NULL;
jpayne@68 16216 Py_UNBLOCK_THREADS
jpayne@68 16217 __Pyx_FastGIL_Remember();
jpayne@68 16218 #endif
jpayne@68 16219 /*try:*/ {
jpayne@68 16220
jpayne@68 16221 /* "pysam/libctabix.pyx":731
jpayne@68 16222 * cdef char *cfilename = filename
jpayne@68 16223 * with nogil:
jpayne@68 16224 * self.gzipfile = bgzf_open(cfilename, "r") # <<<<<<<<<<<<<<
jpayne@68 16225 * self._filename = filename
jpayne@68 16226 * self.kstream = ks_init(self.gzipfile)
jpayne@68 16227 */
jpayne@68 16228 __pyx_v_self->gzipfile = bgzf_open(__pyx_v_cfilename, ((char const *)"r"));
jpayne@68 16229 }
jpayne@68 16230
jpayne@68 16231 /* "pysam/libctabix.pyx":730
jpayne@68 16232 * filename = encode_filename(filename)
jpayne@68 16233 * cdef char *cfilename = filename
jpayne@68 16234 * with nogil: # <<<<<<<<<<<<<<
jpayne@68 16235 * self.gzipfile = bgzf_open(cfilename, "r")
jpayne@68 16236 * self._filename = filename
jpayne@68 16237 */
jpayne@68 16238 /*finally:*/ {
jpayne@68 16239 /*normal exit:*/{
jpayne@68 16240 #ifdef WITH_THREAD
jpayne@68 16241 __Pyx_FastGIL_Forget();
jpayne@68 16242 Py_BLOCK_THREADS
jpayne@68 16243 #endif
jpayne@68 16244 goto __pyx_L6;
jpayne@68 16245 }
jpayne@68 16246 __pyx_L6:;
jpayne@68 16247 }
jpayne@68 16248 }
jpayne@68 16249
jpayne@68 16250 /* "pysam/libctabix.pyx":732
jpayne@68 16251 * with nogil:
jpayne@68 16252 * self.gzipfile = bgzf_open(cfilename, "r")
jpayne@68 16253 * self._filename = filename # <<<<<<<<<<<<<<
jpayne@68 16254 * self.kstream = ks_init(self.gzipfile)
jpayne@68 16255 * self.encoding = encoding
jpayne@68 16256 */
jpayne@68 16257 __Pyx_INCREF(__pyx_v_filename);
jpayne@68 16258 __Pyx_GIVEREF(__pyx_v_filename);
jpayne@68 16259 __Pyx_GOTREF(__pyx_v_self->_filename);
jpayne@68 16260 __Pyx_DECREF(__pyx_v_self->_filename);
jpayne@68 16261 __pyx_v_self->_filename = __pyx_v_filename;
jpayne@68 16262
jpayne@68 16263 /* "pysam/libctabix.pyx":733
jpayne@68 16264 * self.gzipfile = bgzf_open(cfilename, "r")
jpayne@68 16265 * self._filename = filename
jpayne@68 16266 * self.kstream = ks_init(self.gzipfile) # <<<<<<<<<<<<<<
jpayne@68 16267 * self.encoding = encoding
jpayne@68 16268 *
jpayne@68 16269 */
jpayne@68 16270 __pyx_v_self->kstream = ks_init(__pyx_v_self->gzipfile);
jpayne@68 16271
jpayne@68 16272 /* "pysam/libctabix.pyx":734
jpayne@68 16273 * self._filename = filename
jpayne@68 16274 * self.kstream = ks_init(self.gzipfile)
jpayne@68 16275 * self.encoding = encoding # <<<<<<<<<<<<<<
jpayne@68 16276 *
jpayne@68 16277 * self.buffer.l = 0
jpayne@68 16278 */
jpayne@68 16279 __Pyx_INCREF(__pyx_v_encoding);
jpayne@68 16280 __Pyx_GIVEREF(__pyx_v_encoding);
jpayne@68 16281 __Pyx_GOTREF(__pyx_v_self->encoding);
jpayne@68 16282 __Pyx_DECREF(__pyx_v_self->encoding);
jpayne@68 16283 __pyx_v_self->encoding = __pyx_v_encoding;
jpayne@68 16284
jpayne@68 16285 /* "pysam/libctabix.pyx":736
jpayne@68 16286 * self.encoding = encoding
jpayne@68 16287 *
jpayne@68 16288 * self.buffer.l = 0 # <<<<<<<<<<<<<<
jpayne@68 16289 * self.buffer.m = 0
jpayne@68 16290 * self.buffer.s = <char*>malloc(buffer_size)
jpayne@68 16291 */
jpayne@68 16292 __pyx_v_self->buffer.l = 0;
jpayne@68 16293
jpayne@68 16294 /* "pysam/libctabix.pyx":737
jpayne@68 16295 *
jpayne@68 16296 * self.buffer.l = 0
jpayne@68 16297 * self.buffer.m = 0 # <<<<<<<<<<<<<<
jpayne@68 16298 * self.buffer.s = <char*>malloc(buffer_size)
jpayne@68 16299 *
jpayne@68 16300 */
jpayne@68 16301 __pyx_v_self->buffer.m = 0;
jpayne@68 16302
jpayne@68 16303 /* "pysam/libctabix.pyx":738
jpayne@68 16304 * self.buffer.l = 0
jpayne@68 16305 * self.buffer.m = 0
jpayne@68 16306 * self.buffer.s = <char*>malloc(buffer_size) # <<<<<<<<<<<<<<
jpayne@68 16307 *
jpayne@68 16308 * def __dealloc__(self):
jpayne@68 16309 */
jpayne@68 16310 __pyx_v_self->buffer.s = ((char *)malloc(__pyx_v_buffer_size));
jpayne@68 16311
jpayne@68 16312 /* "pysam/libctabix.pyx":721
jpayne@68 16313 *
jpayne@68 16314 * cdef class GZIterator:
jpayne@68 16315 * def __init__(self, filename, int buffer_size=65536, encoding="ascii"): # <<<<<<<<<<<<<<
jpayne@68 16316 * '''iterate line-by-line through gzip (or bgzip)
jpayne@68 16317 * compressed file.
jpayne@68 16318 */
jpayne@68 16319
jpayne@68 16320 /* function exit code */
jpayne@68 16321 __pyx_r = 0;
jpayne@68 16322 goto __pyx_L0;
jpayne@68 16323 __pyx_L1_error:;
jpayne@68 16324 __Pyx_XDECREF(__pyx_t_1);
jpayne@68 16325 __Pyx_XDECREF(__pyx_t_2);
jpayne@68 16326 __Pyx_XDECREF(__pyx_t_3);
jpayne@68 16327 __Pyx_AddTraceback("pysam.libctabix.GZIterator.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@68 16328 __pyx_r = -1;
jpayne@68 16329 __pyx_L0:;
jpayne@68 16330 __Pyx_XDECREF(__pyx_v_filename);
jpayne@68 16331 __Pyx_TraceReturn(Py_None, 0);
jpayne@68 16332 __Pyx_RefNannyFinishContext();
jpayne@68 16333 return __pyx_r;
jpayne@68 16334 }
jpayne@68 16335
jpayne@68 16336 /* "pysam/libctabix.pyx":740
jpayne@68 16337 * self.buffer.s = <char*>malloc(buffer_size)
jpayne@68 16338 *
jpayne@68 16339 * def __dealloc__(self): # <<<<<<<<<<<<<<
jpayne@68 16340 * '''close file.'''
jpayne@68 16341 * if self.gzipfile != NULL:
jpayne@68 16342 */
jpayne@68 16343
jpayne@68 16344 /* Python wrapper */
jpayne@68 16345 static void __pyx_pw_5pysam_9libctabix_10GZIterator_3__dealloc__(PyObject *__pyx_v_self); /*proto*/
jpayne@68 16346 static void __pyx_pw_5pysam_9libctabix_10GZIterator_3__dealloc__(PyObject *__pyx_v_self) {
jpayne@68 16347 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@68 16348 __Pyx_RefNannyDeclarations
jpayne@68 16349 __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
jpayne@68 16350 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
jpayne@68 16351 __pyx_pf_5pysam_9libctabix_10GZIterator_2__dealloc__(((struct __pyx_obj_5pysam_9libctabix_GZIterator *)__pyx_v_self));
jpayne@68 16352
jpayne@68 16353 /* function exit code */
jpayne@68 16354 __Pyx_RefNannyFinishContext();
jpayne@68 16355 }
jpayne@68 16356
jpayne@68 16357 static void __pyx_pf_5pysam_9libctabix_10GZIterator_2__dealloc__(struct __pyx_obj_5pysam_9libctabix_GZIterator *__pyx_v_self) {
jpayne@68 16358 __Pyx_TraceDeclarations
jpayne@68 16359 int __pyx_t_1;
jpayne@68 16360 int __pyx_lineno = 0;
jpayne@68 16361 const char *__pyx_filename = NULL;
jpayne@68 16362 int __pyx_clineno = 0;
jpayne@68 16363 __Pyx_TraceCall("__dealloc__", __pyx_f[0], 740, 0, __PYX_ERR(0, 740, __pyx_L1_error));
jpayne@68 16364
jpayne@68 16365 /* "pysam/libctabix.pyx":742
jpayne@68 16366 * def __dealloc__(self):
jpayne@68 16367 * '''close file.'''
jpayne@68 16368 * if self.gzipfile != NULL: # <<<<<<<<<<<<<<
jpayne@68 16369 * bgzf_close(self.gzipfile)
jpayne@68 16370 * self.gzipfile = NULL
jpayne@68 16371 */
jpayne@68 16372 __pyx_t_1 = (__pyx_v_self->gzipfile != NULL);
jpayne@68 16373 if (__pyx_t_1) {
jpayne@68 16374
jpayne@68 16375 /* "pysam/libctabix.pyx":743
jpayne@68 16376 * '''close file.'''
jpayne@68 16377 * if self.gzipfile != NULL:
jpayne@68 16378 * bgzf_close(self.gzipfile) # <<<<<<<<<<<<<<
jpayne@68 16379 * self.gzipfile = NULL
jpayne@68 16380 * if self.buffer.s != NULL:
jpayne@68 16381 */
jpayne@68 16382 (void)(bgzf_close(__pyx_v_self->gzipfile));
jpayne@68 16383
jpayne@68 16384 /* "pysam/libctabix.pyx":744
jpayne@68 16385 * if self.gzipfile != NULL:
jpayne@68 16386 * bgzf_close(self.gzipfile)
jpayne@68 16387 * self.gzipfile = NULL # <<<<<<<<<<<<<<
jpayne@68 16388 * if self.buffer.s != NULL:
jpayne@68 16389 * free(self.buffer.s)
jpayne@68 16390 */
jpayne@68 16391 __pyx_v_self->gzipfile = NULL;
jpayne@68 16392
jpayne@68 16393 /* "pysam/libctabix.pyx":742
jpayne@68 16394 * def __dealloc__(self):
jpayne@68 16395 * '''close file.'''
jpayne@68 16396 * if self.gzipfile != NULL: # <<<<<<<<<<<<<<
jpayne@68 16397 * bgzf_close(self.gzipfile)
jpayne@68 16398 * self.gzipfile = NULL
jpayne@68 16399 */
jpayne@68 16400 }
jpayne@68 16401
jpayne@68 16402 /* "pysam/libctabix.pyx":745
jpayne@68 16403 * bgzf_close(self.gzipfile)
jpayne@68 16404 * self.gzipfile = NULL
jpayne@68 16405 * if self.buffer.s != NULL: # <<<<<<<<<<<<<<
jpayne@68 16406 * free(self.buffer.s)
jpayne@68 16407 * if self.kstream != NULL:
jpayne@68 16408 */
jpayne@68 16409 __pyx_t_1 = (__pyx_v_self->buffer.s != NULL);
jpayne@68 16410 if (__pyx_t_1) {
jpayne@68 16411
jpayne@68 16412 /* "pysam/libctabix.pyx":746
jpayne@68 16413 * self.gzipfile = NULL
jpayne@68 16414 * if self.buffer.s != NULL:
jpayne@68 16415 * free(self.buffer.s) # <<<<<<<<<<<<<<
jpayne@68 16416 * if self.kstream != NULL:
jpayne@68 16417 * ks_destroy(self.kstream)
jpayne@68 16418 */
jpayne@68 16419 free(__pyx_v_self->buffer.s);
jpayne@68 16420
jpayne@68 16421 /* "pysam/libctabix.pyx":745
jpayne@68 16422 * bgzf_close(self.gzipfile)
jpayne@68 16423 * self.gzipfile = NULL
jpayne@68 16424 * if self.buffer.s != NULL: # <<<<<<<<<<<<<<
jpayne@68 16425 * free(self.buffer.s)
jpayne@68 16426 * if self.kstream != NULL:
jpayne@68 16427 */
jpayne@68 16428 }
jpayne@68 16429
jpayne@68 16430 /* "pysam/libctabix.pyx":747
jpayne@68 16431 * if self.buffer.s != NULL:
jpayne@68 16432 * free(self.buffer.s)
jpayne@68 16433 * if self.kstream != NULL: # <<<<<<<<<<<<<<
jpayne@68 16434 * ks_destroy(self.kstream)
jpayne@68 16435 *
jpayne@68 16436 */
jpayne@68 16437 __pyx_t_1 = (__pyx_v_self->kstream != NULL);
jpayne@68 16438 if (__pyx_t_1) {
jpayne@68 16439
jpayne@68 16440 /* "pysam/libctabix.pyx":748
jpayne@68 16441 * free(self.buffer.s)
jpayne@68 16442 * if self.kstream != NULL:
jpayne@68 16443 * ks_destroy(self.kstream) # <<<<<<<<<<<<<<
jpayne@68 16444 *
jpayne@68 16445 * def __iter__(self):
jpayne@68 16446 */
jpayne@68 16447 ks_destroy(__pyx_v_self->kstream);
jpayne@68 16448
jpayne@68 16449 /* "pysam/libctabix.pyx":747
jpayne@68 16450 * if self.buffer.s != NULL:
jpayne@68 16451 * free(self.buffer.s)
jpayne@68 16452 * if self.kstream != NULL: # <<<<<<<<<<<<<<
jpayne@68 16453 * ks_destroy(self.kstream)
jpayne@68 16454 *
jpayne@68 16455 */
jpayne@68 16456 }
jpayne@68 16457
jpayne@68 16458 /* "pysam/libctabix.pyx":740
jpayne@68 16459 * self.buffer.s = <char*>malloc(buffer_size)
jpayne@68 16460 *
jpayne@68 16461 * def __dealloc__(self): # <<<<<<<<<<<<<<
jpayne@68 16462 * '''close file.'''
jpayne@68 16463 * if self.gzipfile != NULL:
jpayne@68 16464 */
jpayne@68 16465
jpayne@68 16466 /* function exit code */
jpayne@68 16467 goto __pyx_L0;
jpayne@68 16468 __pyx_L1_error:;
jpayne@68 16469 __Pyx_WriteUnraisable("pysam.libctabix.GZIterator.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
jpayne@68 16470 __pyx_L0:;
jpayne@68 16471 __Pyx_TraceReturn(Py_None, 0);
jpayne@68 16472 }
jpayne@68 16473
jpayne@68 16474 /* "pysam/libctabix.pyx":750
jpayne@68 16475 * ks_destroy(self.kstream)
jpayne@68 16476 *
jpayne@68 16477 * def __iter__(self): # <<<<<<<<<<<<<<
jpayne@68 16478 * return self
jpayne@68 16479 *
jpayne@68 16480 */
jpayne@68 16481
jpayne@68 16482 /* Python wrapper */
jpayne@68 16483 static PyObject *__pyx_pw_5pysam_9libctabix_10GZIterator_5__iter__(PyObject *__pyx_v_self); /*proto*/
jpayne@68 16484 static PyObject *__pyx_pw_5pysam_9libctabix_10GZIterator_5__iter__(PyObject *__pyx_v_self) {
jpayne@68 16485 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@68 16486 PyObject *__pyx_r = 0;
jpayne@68 16487 __Pyx_RefNannyDeclarations
jpayne@68 16488 __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
jpayne@68 16489 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
jpayne@68 16490 __pyx_r = __pyx_pf_5pysam_9libctabix_10GZIterator_4__iter__(((struct __pyx_obj_5pysam_9libctabix_GZIterator *)__pyx_v_self));
jpayne@68 16491
jpayne@68 16492 /* function exit code */
jpayne@68 16493 __Pyx_RefNannyFinishContext();
jpayne@68 16494 return __pyx_r;
jpayne@68 16495 }
jpayne@68 16496
jpayne@68 16497 static PyObject *__pyx_pf_5pysam_9libctabix_10GZIterator_4__iter__(struct __pyx_obj_5pysam_9libctabix_GZIterator *__pyx_v_self) {
jpayne@68 16498 PyObject *__pyx_r = NULL;
jpayne@68 16499 __Pyx_TraceDeclarations
jpayne@68 16500 __Pyx_RefNannyDeclarations
jpayne@68 16501 int __pyx_lineno = 0;
jpayne@68 16502 const char *__pyx_filename = NULL;
jpayne@68 16503 int __pyx_clineno = 0;
jpayne@68 16504 __Pyx_RefNannySetupContext("__iter__", 1);
jpayne@68 16505 __Pyx_TraceCall("__iter__", __pyx_f[0], 750, 0, __PYX_ERR(0, 750, __pyx_L1_error));
jpayne@68 16506
jpayne@68 16507 /* "pysam/libctabix.pyx":751
jpayne@68 16508 *
jpayne@68 16509 * def __iter__(self):
jpayne@68 16510 * return self # <<<<<<<<<<<<<<
jpayne@68 16511 *
jpayne@68 16512 * cdef int __cnext__(self):
jpayne@68 16513 */
jpayne@68 16514 __Pyx_XDECREF(__pyx_r);
jpayne@68 16515 __Pyx_INCREF((PyObject *)__pyx_v_self);
jpayne@68 16516 __pyx_r = ((PyObject *)__pyx_v_self);
jpayne@68 16517 goto __pyx_L0;
jpayne@68 16518
jpayne@68 16519 /* "pysam/libctabix.pyx":750
jpayne@68 16520 * ks_destroy(self.kstream)
jpayne@68 16521 *
jpayne@68 16522 * def __iter__(self): # <<<<<<<<<<<<<<
jpayne@68 16523 * return self
jpayne@68 16524 *
jpayne@68 16525 */
jpayne@68 16526
jpayne@68 16527 /* function exit code */
jpayne@68 16528 __pyx_L1_error:;
jpayne@68 16529 __Pyx_AddTraceback("pysam.libctabix.GZIterator.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@68 16530 __pyx_r = NULL;
jpayne@68 16531 __pyx_L0:;
jpayne@68 16532 __Pyx_XGIVEREF(__pyx_r);
jpayne@68 16533 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@68 16534 __Pyx_RefNannyFinishContext();
jpayne@68 16535 return __pyx_r;
jpayne@68 16536 }
jpayne@68 16537
jpayne@68 16538 /* "pysam/libctabix.pyx":753
jpayne@68 16539 * return self
jpayne@68 16540 *
jpayne@68 16541 * cdef int __cnext__(self): # <<<<<<<<<<<<<<
jpayne@68 16542 * cdef int dret = 0
jpayne@68 16543 * cdef int retval = 0
jpayne@68 16544 */
jpayne@68 16545
jpayne@68 16546 static int __pyx_f_5pysam_9libctabix_10GZIterator___cnext__(struct __pyx_obj_5pysam_9libctabix_GZIterator *__pyx_v_self) {
jpayne@68 16547 int __pyx_v_dret;
jpayne@68 16548 int __pyx_v_retval;
jpayne@68 16549 int __pyx_r;
jpayne@68 16550 __Pyx_TraceDeclarations
jpayne@68 16551 int __pyx_t_1;
jpayne@68 16552 int __pyx_lineno = 0;
jpayne@68 16553 const char *__pyx_filename = NULL;
jpayne@68 16554 int __pyx_clineno = 0;
jpayne@68 16555 __Pyx_TraceCall("__cnext__", __pyx_f[0], 753, 0, __PYX_ERR(0, 753, __pyx_L1_error));
jpayne@68 16556
jpayne@68 16557 /* "pysam/libctabix.pyx":754
jpayne@68 16558 *
jpayne@68 16559 * cdef int __cnext__(self):
jpayne@68 16560 * cdef int dret = 0 # <<<<<<<<<<<<<<
jpayne@68 16561 * cdef int retval = 0
jpayne@68 16562 * while 1:
jpayne@68 16563 */
jpayne@68 16564 __pyx_v_dret = 0;
jpayne@68 16565
jpayne@68 16566 /* "pysam/libctabix.pyx":755
jpayne@68 16567 * cdef int __cnext__(self):
jpayne@68 16568 * cdef int dret = 0
jpayne@68 16569 * cdef int retval = 0 # <<<<<<<<<<<<<<
jpayne@68 16570 * while 1:
jpayne@68 16571 * with nogil:
jpayne@68 16572 */
jpayne@68 16573 __pyx_v_retval = 0;
jpayne@68 16574
jpayne@68 16575 /* "pysam/libctabix.pyx":756
jpayne@68 16576 * cdef int dret = 0
jpayne@68 16577 * cdef int retval = 0
jpayne@68 16578 * while 1: # <<<<<<<<<<<<<<
jpayne@68 16579 * with nogil:
jpayne@68 16580 * retval = ks_getuntil(self.kstream, b'\n', &self.buffer, &dret)
jpayne@68 16581 */
jpayne@68 16582 while (1) {
jpayne@68 16583
jpayne@68 16584 /* "pysam/libctabix.pyx":757
jpayne@68 16585 * cdef int retval = 0
jpayne@68 16586 * while 1:
jpayne@68 16587 * with nogil: # <<<<<<<<<<<<<<
jpayne@68 16588 * retval = ks_getuntil(self.kstream, b'\n', &self.buffer, &dret)
jpayne@68 16589 *
jpayne@68 16590 */
jpayne@68 16591 {
jpayne@68 16592 #ifdef WITH_THREAD
jpayne@68 16593 PyThreadState *_save;
jpayne@68 16594 _save = NULL;
jpayne@68 16595 Py_UNBLOCK_THREADS
jpayne@68 16596 __Pyx_FastGIL_Remember();
jpayne@68 16597 #endif
jpayne@68 16598 /*try:*/ {
jpayne@68 16599
jpayne@68 16600 /* "pysam/libctabix.pyx":758
jpayne@68 16601 * while 1:
jpayne@68 16602 * with nogil:
jpayne@68 16603 * retval = ks_getuntil(self.kstream, b'\n', &self.buffer, &dret) # <<<<<<<<<<<<<<
jpayne@68 16604 *
jpayne@68 16605 * if retval < 0:
jpayne@68 16606 */
jpayne@68 16607 __pyx_v_retval = ks_getuntil(__pyx_v_self->kstream, '\n', (&__pyx_v_self->buffer), (&__pyx_v_dret));
jpayne@68 16608 }
jpayne@68 16609
jpayne@68 16610 /* "pysam/libctabix.pyx":757
jpayne@68 16611 * cdef int retval = 0
jpayne@68 16612 * while 1:
jpayne@68 16613 * with nogil: # <<<<<<<<<<<<<<
jpayne@68 16614 * retval = ks_getuntil(self.kstream, b'\n', &self.buffer, &dret)
jpayne@68 16615 *
jpayne@68 16616 */
jpayne@68 16617 /*finally:*/ {
jpayne@68 16618 /*normal exit:*/{
jpayne@68 16619 #ifdef WITH_THREAD
jpayne@68 16620 __Pyx_FastGIL_Forget();
jpayne@68 16621 Py_BLOCK_THREADS
jpayne@68 16622 #endif
jpayne@68 16623 goto __pyx_L9;
jpayne@68 16624 }
jpayne@68 16625 __pyx_L9:;
jpayne@68 16626 }
jpayne@68 16627 }
jpayne@68 16628
jpayne@68 16629 /* "pysam/libctabix.pyx":760
jpayne@68 16630 * retval = ks_getuntil(self.kstream, b'\n', &self.buffer, &dret)
jpayne@68 16631 *
jpayne@68 16632 * if retval < 0: # <<<<<<<<<<<<<<
jpayne@68 16633 * break
jpayne@68 16634 *
jpayne@68 16635 */
jpayne@68 16636 __pyx_t_1 = (__pyx_v_retval < 0);
jpayne@68 16637 if (__pyx_t_1) {
jpayne@68 16638
jpayne@68 16639 /* "pysam/libctabix.pyx":761
jpayne@68 16640 *
jpayne@68 16641 * if retval < 0:
jpayne@68 16642 * break # <<<<<<<<<<<<<<
jpayne@68 16643 *
jpayne@68 16644 * return dret
jpayne@68 16645 */
jpayne@68 16646 goto __pyx_L4_break;
jpayne@68 16647
jpayne@68 16648 /* "pysam/libctabix.pyx":760
jpayne@68 16649 * retval = ks_getuntil(self.kstream, b'\n', &self.buffer, &dret)
jpayne@68 16650 *
jpayne@68 16651 * if retval < 0: # <<<<<<<<<<<<<<
jpayne@68 16652 * break
jpayne@68 16653 *
jpayne@68 16654 */
jpayne@68 16655 }
jpayne@68 16656
jpayne@68 16657 /* "pysam/libctabix.pyx":763
jpayne@68 16658 * break
jpayne@68 16659 *
jpayne@68 16660 * return dret # <<<<<<<<<<<<<<
jpayne@68 16661 * return -1
jpayne@68 16662 *
jpayne@68 16663 */
jpayne@68 16664 __pyx_r = __pyx_v_dret;
jpayne@68 16665 goto __pyx_L0;
jpayne@68 16666 }
jpayne@68 16667 __pyx_L4_break:;
jpayne@68 16668
jpayne@68 16669 /* "pysam/libctabix.pyx":764
jpayne@68 16670 *
jpayne@68 16671 * return dret
jpayne@68 16672 * return -1 # <<<<<<<<<<<<<<
jpayne@68 16673 *
jpayne@68 16674 * def __next__(self):
jpayne@68 16675 */
jpayne@68 16676 __pyx_r = -1;
jpayne@68 16677 goto __pyx_L0;
jpayne@68 16678
jpayne@68 16679 /* "pysam/libctabix.pyx":753
jpayne@68 16680 * return self
jpayne@68 16681 *
jpayne@68 16682 * cdef int __cnext__(self): # <<<<<<<<<<<<<<
jpayne@68 16683 * cdef int dret = 0
jpayne@68 16684 * cdef int retval = 0
jpayne@68 16685 */
jpayne@68 16686
jpayne@68 16687 /* function exit code */
jpayne@68 16688 __pyx_L1_error:;
jpayne@68 16689 __Pyx_AddTraceback("pysam.libctabix.GZIterator.__cnext__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@68 16690 __pyx_r = 0;
jpayne@68 16691 __pyx_L0:;
jpayne@68 16692 __Pyx_TraceReturn(Py_None, 0);
jpayne@68 16693 return __pyx_r;
jpayne@68 16694 }
jpayne@68 16695
jpayne@68 16696 /* "pysam/libctabix.pyx":766
jpayne@68 16697 * return -1
jpayne@68 16698 *
jpayne@68 16699 * def __next__(self): # <<<<<<<<<<<<<<
jpayne@68 16700 * """python version of next().
jpayne@68 16701 * """
jpayne@68 16702 */
jpayne@68 16703
jpayne@68 16704 /* Python wrapper */
jpayne@68 16705 static PyObject *__pyx_pw_5pysam_9libctabix_10GZIterator_7__next__(PyObject *__pyx_v_self); /*proto*/
jpayne@68 16706 PyDoc_STRVAR(__pyx_doc_5pysam_9libctabix_10GZIterator_6__next__, "python version of next().\n ");
jpayne@68 16707 #if CYTHON_UPDATE_DESCRIPTOR_DOC
jpayne@68 16708 struct wrapperbase __pyx_wrapperbase_5pysam_9libctabix_10GZIterator_6__next__;
jpayne@68 16709 #endif
jpayne@68 16710 static PyObject *__pyx_pw_5pysam_9libctabix_10GZIterator_7__next__(PyObject *__pyx_v_self) {
jpayne@68 16711 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@68 16712 PyObject *__pyx_r = 0;
jpayne@68 16713 __Pyx_RefNannyDeclarations
jpayne@68 16714 __Pyx_RefNannySetupContext("__next__ (wrapper)", 0);
jpayne@68 16715 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
jpayne@68 16716 __pyx_r = __pyx_pf_5pysam_9libctabix_10GZIterator_6__next__(((struct __pyx_obj_5pysam_9libctabix_GZIterator *)__pyx_v_self));
jpayne@68 16717
jpayne@68 16718 /* function exit code */
jpayne@68 16719 __Pyx_RefNannyFinishContext();
jpayne@68 16720 return __pyx_r;
jpayne@68 16721 }
jpayne@68 16722
jpayne@68 16723 static PyObject *__pyx_pf_5pysam_9libctabix_10GZIterator_6__next__(struct __pyx_obj_5pysam_9libctabix_GZIterator *__pyx_v_self) {
jpayne@68 16724 int __pyx_v_retval;
jpayne@68 16725 PyObject *__pyx_r = NULL;
jpayne@68 16726 __Pyx_TraceDeclarations
jpayne@68 16727 __Pyx_RefNannyDeclarations
jpayne@68 16728 int __pyx_error_without_exception = 0; /* StopIteration */
jpayne@68 16729 int __pyx_t_1;
jpayne@68 16730 int __pyx_t_2;
jpayne@68 16731 PyObject *__pyx_t_3 = NULL;
jpayne@68 16732 PyObject *__pyx_t_4 = NULL;
jpayne@68 16733 PyObject *__pyx_t_5 = NULL;
jpayne@68 16734 struct __pyx_opt_args_5pysam_9libcutils_force_str __pyx_t_6;
jpayne@68 16735 int __pyx_lineno = 0;
jpayne@68 16736 const char *__pyx_filename = NULL;
jpayne@68 16737 int __pyx_clineno = 0;
jpayne@68 16738 __Pyx_RefNannySetupContext("__next__", 1);
jpayne@68 16739 __Pyx_TraceCall("__next__", __pyx_f[0], 766, 0, __PYX_ERR(0, 766, __pyx_L1_error));
jpayne@68 16740
jpayne@68 16741 /* "pysam/libctabix.pyx":769
jpayne@68 16742 * """python version of next().
jpayne@68 16743 * """
jpayne@68 16744 * cdef int retval = self.__cnext__() # <<<<<<<<<<<<<<
jpayne@68 16745 * if retval < 0:
jpayne@68 16746 * raise StopIteration
jpayne@68 16747 */
jpayne@68 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@68 16749 __pyx_v_retval = __pyx_t_1;
jpayne@68 16750
jpayne@68 16751 /* "pysam/libctabix.pyx":770
jpayne@68 16752 * """
jpayne@68 16753 * cdef int retval = self.__cnext__()
jpayne@68 16754 * if retval < 0: # <<<<<<<<<<<<<<
jpayne@68 16755 * raise StopIteration
jpayne@68 16756 * return force_str(self.buffer.s, self.encoding)
jpayne@68 16757 */
jpayne@68 16758 __pyx_t_2 = (__pyx_v_retval < 0);
jpayne@68 16759 if (unlikely(__pyx_t_2)) {
jpayne@68 16760
jpayne@68 16761 /* "pysam/libctabix.pyx":771
jpayne@68 16762 * cdef int retval = self.__cnext__()
jpayne@68 16763 * if retval < 0:
jpayne@68 16764 * raise StopIteration # <<<<<<<<<<<<<<
jpayne@68 16765 * return force_str(self.buffer.s, self.encoding)
jpayne@68 16766 *
jpayne@68 16767 */
jpayne@68 16768 __pyx_error_without_exception = 1;
jpayne@68 16769 goto __pyx_L1_error;;
jpayne@68 16770
jpayne@68 16771 /* "pysam/libctabix.pyx":770
jpayne@68 16772 * """
jpayne@68 16773 * cdef int retval = self.__cnext__()
jpayne@68 16774 * if retval < 0: # <<<<<<<<<<<<<<
jpayne@68 16775 * raise StopIteration
jpayne@68 16776 * return force_str(self.buffer.s, self.encoding)
jpayne@68 16777 */
jpayne@68 16778 }
jpayne@68 16779
jpayne@68 16780 /* "pysam/libctabix.pyx":772
jpayne@68 16781 * if retval < 0:
jpayne@68 16782 * raise StopIteration
jpayne@68 16783 * return force_str(self.buffer.s, self.encoding) # <<<<<<<<<<<<<<
jpayne@68 16784 *
jpayne@68 16785 *
jpayne@68 16786 */
jpayne@68 16787 __Pyx_XDECREF(__pyx_r);
jpayne@68 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@68 16789 __Pyx_GOTREF(__pyx_t_3);
jpayne@68 16790 __pyx_t_4 = __pyx_v_self->encoding;
jpayne@68 16791 __Pyx_INCREF(__pyx_t_4);
jpayne@68 16792 __pyx_t_6.__pyx_n = 1;
jpayne@68 16793 __pyx_t_6.encoding = __pyx_t_4;
jpayne@68 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@68 16795 __Pyx_GOTREF(__pyx_t_5);
jpayne@68 16796 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
jpayne@68 16797 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
jpayne@68 16798 __pyx_r = __pyx_t_5;
jpayne@68 16799 __pyx_t_5 = 0;
jpayne@68 16800 goto __pyx_L0;
jpayne@68 16801
jpayne@68 16802 /* "pysam/libctabix.pyx":766
jpayne@68 16803 * return -1
jpayne@68 16804 *
jpayne@68 16805 * def __next__(self): # <<<<<<<<<<<<<<
jpayne@68 16806 * """python version of next().
jpayne@68 16807 * """
jpayne@68 16808 */
jpayne@68 16809
jpayne@68 16810 /* function exit code */
jpayne@68 16811 __pyx_L1_error:;
jpayne@68 16812 __Pyx_XDECREF(__pyx_t_3);
jpayne@68 16813 __Pyx_XDECREF(__pyx_t_4);
jpayne@68 16814 __Pyx_XDECREF(__pyx_t_5);
jpayne@68 16815 if (!__pyx_error_without_exception) {
jpayne@68 16816 __Pyx_AddTraceback("pysam.libctabix.GZIterator.__next__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@68 16817 }
jpayne@68 16818 __pyx_r = NULL;
jpayne@68 16819 __pyx_L0:;
jpayne@68 16820 __Pyx_XGIVEREF(__pyx_r);
jpayne@68 16821 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@68 16822 __Pyx_RefNannyFinishContext();
jpayne@68 16823 return __pyx_r;
jpayne@68 16824 }
jpayne@68 16825
jpayne@68 16826 /* "(tree fragment)":1
jpayne@68 16827 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
jpayne@68 16828 * raise TypeError, "self.gzipfile,self.kstream cannot be converted to a Python object for pickling"
jpayne@68 16829 * def __setstate_cython__(self, __pyx_state):
jpayne@68 16830 */
jpayne@68 16831
jpayne@68 16832 /* Python wrapper */
jpayne@68 16833 static PyObject *__pyx_pw_5pysam_9libctabix_10GZIterator_9__reduce_cython__(PyObject *__pyx_v_self,
jpayne@68 16834 #if CYTHON_METH_FASTCALL
jpayne@68 16835 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@68 16836 #else
jpayne@68 16837 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@68 16838 #endif
jpayne@68 16839 ); /*proto*/
jpayne@68 16840 PyDoc_STRVAR(__pyx_doc_5pysam_9libctabix_10GZIterator_8__reduce_cython__, "GZIterator.__reduce_cython__(self)");
jpayne@68 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@68 16842 static PyObject *__pyx_pw_5pysam_9libctabix_10GZIterator_9__reduce_cython__(PyObject *__pyx_v_self,
jpayne@68 16843 #if CYTHON_METH_FASTCALL
jpayne@68 16844 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@68 16845 #else
jpayne@68 16846 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@68 16847 #endif
jpayne@68 16848 ) {
jpayne@68 16849 #if !CYTHON_METH_FASTCALL
jpayne@68 16850 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
jpayne@68 16851 #endif
jpayne@68 16852 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@68 16853 PyObject *__pyx_r = 0;
jpayne@68 16854 __Pyx_RefNannyDeclarations
jpayne@68 16855 __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
jpayne@68 16856 #if !CYTHON_METH_FASTCALL
jpayne@68 16857 #if CYTHON_ASSUME_SAFE_MACROS
jpayne@68 16858 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
jpayne@68 16859 #else
jpayne@68 16860 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
jpayne@68 16861 #endif
jpayne@68 16862 #endif
jpayne@68 16863 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
jpayne@68 16864 if (unlikely(__pyx_nargs > 0)) {
jpayne@68 16865 __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL;}
jpayne@68 16866 if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__reduce_cython__", 0))) return NULL;
jpayne@68 16867 __pyx_r = __pyx_pf_5pysam_9libctabix_10GZIterator_8__reduce_cython__(((struct __pyx_obj_5pysam_9libctabix_GZIterator *)__pyx_v_self));
jpayne@68 16868
jpayne@68 16869 /* function exit code */
jpayne@68 16870 __Pyx_RefNannyFinishContext();
jpayne@68 16871 return __pyx_r;
jpayne@68 16872 }
jpayne@68 16873
jpayne@68 16874 static PyObject *__pyx_pf_5pysam_9libctabix_10GZIterator_8__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5pysam_9libctabix_GZIterator *__pyx_v_self) {
jpayne@68 16875 PyObject *__pyx_r = NULL;
jpayne@68 16876 __Pyx_TraceDeclarations
jpayne@68 16877 __Pyx_RefNannyDeclarations
jpayne@68 16878 int __pyx_lineno = 0;
jpayne@68 16879 const char *__pyx_filename = NULL;
jpayne@68 16880 int __pyx_clineno = 0;
jpayne@68 16881 __Pyx_TraceFrameInit(__pyx_codeobj__31)
jpayne@68 16882 __Pyx_RefNannySetupContext("__reduce_cython__", 1);
jpayne@68 16883 __Pyx_TraceCall("__reduce_cython__", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));
jpayne@68 16884
jpayne@68 16885 /* "(tree fragment)":2
jpayne@68 16886 * def __reduce_cython__(self):
jpayne@68 16887 * raise TypeError, "self.gzipfile,self.kstream cannot be converted to a Python object for pickling" # <<<<<<<<<<<<<<
jpayne@68 16888 * def __setstate_cython__(self, __pyx_state):
jpayne@68 16889 * raise TypeError, "self.gzipfile,self.kstream cannot be converted to a Python object for pickling"
jpayne@68 16890 */
jpayne@68 16891 __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_self_gzipfile_self_kstream_canno, 0, 0);
jpayne@68 16892 __PYX_ERR(1, 2, __pyx_L1_error)
jpayne@68 16893
jpayne@68 16894 /* "(tree fragment)":1
jpayne@68 16895 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
jpayne@68 16896 * raise TypeError, "self.gzipfile,self.kstream cannot be converted to a Python object for pickling"
jpayne@68 16897 * def __setstate_cython__(self, __pyx_state):
jpayne@68 16898 */
jpayne@68 16899
jpayne@68 16900 /* function exit code */
jpayne@68 16901 __pyx_L1_error:;
jpayne@68 16902 __Pyx_AddTraceback("pysam.libctabix.GZIterator.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@68 16903 __pyx_r = NULL;
jpayne@68 16904 __Pyx_XGIVEREF(__pyx_r);
jpayne@68 16905 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@68 16906 __Pyx_RefNannyFinishContext();
jpayne@68 16907 return __pyx_r;
jpayne@68 16908 }
jpayne@68 16909
jpayne@68 16910 /* "(tree fragment)":3
jpayne@68 16911 * def __reduce_cython__(self):
jpayne@68 16912 * raise TypeError, "self.gzipfile,self.kstream cannot be converted to a Python object for pickling"
jpayne@68 16913 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
jpayne@68 16914 * raise TypeError, "self.gzipfile,self.kstream cannot be converted to a Python object for pickling"
jpayne@68 16915 */
jpayne@68 16916
jpayne@68 16917 /* Python wrapper */
jpayne@68 16918 static PyObject *__pyx_pw_5pysam_9libctabix_10GZIterator_11__setstate_cython__(PyObject *__pyx_v_self,
jpayne@68 16919 #if CYTHON_METH_FASTCALL
jpayne@68 16920 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@68 16921 #else
jpayne@68 16922 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@68 16923 #endif
jpayne@68 16924 ); /*proto*/
jpayne@68 16925 PyDoc_STRVAR(__pyx_doc_5pysam_9libctabix_10GZIterator_10__setstate_cython__, "GZIterator.__setstate_cython__(self, __pyx_state)");
jpayne@68 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@68 16927 static PyObject *__pyx_pw_5pysam_9libctabix_10GZIterator_11__setstate_cython__(PyObject *__pyx_v_self,
jpayne@68 16928 #if CYTHON_METH_FASTCALL
jpayne@68 16929 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@68 16930 #else
jpayne@68 16931 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@68 16932 #endif
jpayne@68 16933 ) {
jpayne@68 16934 CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0;
jpayne@68 16935 #if !CYTHON_METH_FASTCALL
jpayne@68 16936 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
jpayne@68 16937 #endif
jpayne@68 16938 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@68 16939 PyObject* values[1] = {0};
jpayne@68 16940 int __pyx_lineno = 0;
jpayne@68 16941 const char *__pyx_filename = NULL;
jpayne@68 16942 int __pyx_clineno = 0;
jpayne@68 16943 PyObject *__pyx_r = 0;
jpayne@68 16944 __Pyx_RefNannyDeclarations
jpayne@68 16945 __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
jpayne@68 16946 #if !CYTHON_METH_FASTCALL
jpayne@68 16947 #if CYTHON_ASSUME_SAFE_MACROS
jpayne@68 16948 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
jpayne@68 16949 #else
jpayne@68 16950 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
jpayne@68 16951 #endif
jpayne@68 16952 #endif
jpayne@68 16953 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
jpayne@68 16954 {
jpayne@68 16955 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0};
jpayne@68 16956 if (__pyx_kwds) {
jpayne@68 16957 Py_ssize_t kw_args;
jpayne@68 16958 switch (__pyx_nargs) {
jpayne@68 16959 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
jpayne@68 16960 CYTHON_FALLTHROUGH;
jpayne@68 16961 case 0: break;
jpayne@68 16962 default: goto __pyx_L5_argtuple_error;
jpayne@68 16963 }
jpayne@68 16964 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
jpayne@68 16965 switch (__pyx_nargs) {
jpayne@68 16966 case 0:
jpayne@68 16967 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) {
jpayne@68 16968 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
jpayne@68 16969 kw_args--;
jpayne@68 16970 }
jpayne@68 16971 else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 3, __pyx_L3_error)
jpayne@68 16972 else goto __pyx_L5_argtuple_error;
jpayne@68 16973 }
jpayne@68 16974 if (unlikely(kw_args > 0)) {
jpayne@68 16975 const Py_ssize_t kwd_pos_args = __pyx_nargs;
jpayne@68 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@68 16977 }
jpayne@68 16978 } else if (unlikely(__pyx_nargs != 1)) {
jpayne@68 16979 goto __pyx_L5_argtuple_error;
jpayne@68 16980 } else {
jpayne@68 16981 values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
jpayne@68 16982 }
jpayne@68 16983 __pyx_v___pyx_state = values[0];
jpayne@68 16984 }
jpayne@68 16985 goto __pyx_L6_skip;
jpayne@68 16986 __pyx_L5_argtuple_error:;
jpayne@68 16987 __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 3, __pyx_L3_error)
jpayne@68 16988 __pyx_L6_skip:;
jpayne@68 16989 goto __pyx_L4_argument_unpacking_done;
jpayne@68 16990 __pyx_L3_error:;
jpayne@68 16991 {
jpayne@68 16992 Py_ssize_t __pyx_temp;
jpayne@68 16993 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
jpayne@68 16994 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
jpayne@68 16995 }
jpayne@68 16996 }
jpayne@68 16997 __Pyx_AddTraceback("pysam.libctabix.GZIterator.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@68 16998 __Pyx_RefNannyFinishContext();
jpayne@68 16999 return NULL;
jpayne@68 17000 __pyx_L4_argument_unpacking_done:;
jpayne@68 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@68 17002
jpayne@68 17003 /* function exit code */
jpayne@68 17004 {
jpayne@68 17005 Py_ssize_t __pyx_temp;
jpayne@68 17006 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
jpayne@68 17007 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
jpayne@68 17008 }
jpayne@68 17009 }
jpayne@68 17010 __Pyx_RefNannyFinishContext();
jpayne@68 17011 return __pyx_r;
jpayne@68 17012 }
jpayne@68 17013
jpayne@68 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@68 17015 PyObject *__pyx_r = NULL;
jpayne@68 17016 __Pyx_TraceDeclarations
jpayne@68 17017 __Pyx_RefNannyDeclarations
jpayne@68 17018 int __pyx_lineno = 0;
jpayne@68 17019 const char *__pyx_filename = NULL;
jpayne@68 17020 int __pyx_clineno = 0;
jpayne@68 17021 __Pyx_TraceFrameInit(__pyx_codeobj__32)
jpayne@68 17022 __Pyx_RefNannySetupContext("__setstate_cython__", 1);
jpayne@68 17023 __Pyx_TraceCall("__setstate_cython__", __pyx_f[1], 3, 0, __PYX_ERR(1, 3, __pyx_L1_error));
jpayne@68 17024
jpayne@68 17025 /* "(tree fragment)":4
jpayne@68 17026 * raise TypeError, "self.gzipfile,self.kstream cannot be converted to a Python object for pickling"
jpayne@68 17027 * def __setstate_cython__(self, __pyx_state):
jpayne@68 17028 * raise TypeError, "self.gzipfile,self.kstream cannot be converted to a Python object for pickling" # <<<<<<<<<<<<<<
jpayne@68 17029 */
jpayne@68 17030 __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_self_gzipfile_self_kstream_canno, 0, 0);
jpayne@68 17031 __PYX_ERR(1, 4, __pyx_L1_error)
jpayne@68 17032
jpayne@68 17033 /* "(tree fragment)":3
jpayne@68 17034 * def __reduce_cython__(self):
jpayne@68 17035 * raise TypeError, "self.gzipfile,self.kstream cannot be converted to a Python object for pickling"
jpayne@68 17036 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
jpayne@68 17037 * raise TypeError, "self.gzipfile,self.kstream cannot be converted to a Python object for pickling"
jpayne@68 17038 */
jpayne@68 17039
jpayne@68 17040 /* function exit code */
jpayne@68 17041 __pyx_L1_error:;
jpayne@68 17042 __Pyx_AddTraceback("pysam.libctabix.GZIterator.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@68 17043 __pyx_r = NULL;
jpayne@68 17044 __Pyx_XGIVEREF(__pyx_r);
jpayne@68 17045 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@68 17046 __Pyx_RefNannyFinishContext();
jpayne@68 17047 return __pyx_r;
jpayne@68 17048 }
jpayne@68 17049
jpayne@68 17050 /* "pysam/libctabix.pyx":780
jpayne@68 17051 * '''
jpayne@68 17052 *
jpayne@68 17053 * def __next__(self): # <<<<<<<<<<<<<<
jpayne@68 17054 * """python version of next().
jpayne@68 17055 * """
jpayne@68 17056 */
jpayne@68 17057
jpayne@68 17058 /* Python wrapper */
jpayne@68 17059 static PyObject *__pyx_pw_5pysam_9libctabix_14GZIteratorHead_1__next__(PyObject *__pyx_v_self); /*proto*/
jpayne@68 17060 PyDoc_STRVAR(__pyx_doc_5pysam_9libctabix_14GZIteratorHead___next__, "python version of next().\n ");
jpayne@68 17061 #if CYTHON_UPDATE_DESCRIPTOR_DOC
jpayne@68 17062 struct wrapperbase __pyx_wrapperbase_5pysam_9libctabix_14GZIteratorHead___next__;
jpayne@68 17063 #endif
jpayne@68 17064 static PyObject *__pyx_pw_5pysam_9libctabix_14GZIteratorHead_1__next__(PyObject *__pyx_v_self) {
jpayne@68 17065 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@68 17066 PyObject *__pyx_r = 0;
jpayne@68 17067 __Pyx_RefNannyDeclarations
jpayne@68 17068 __Pyx_RefNannySetupContext("__next__ (wrapper)", 0);
jpayne@68 17069 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
jpayne@68 17070 __pyx_r = __pyx_pf_5pysam_9libctabix_14GZIteratorHead___next__(((struct __pyx_obj_5pysam_9libctabix_GZIteratorHead *)__pyx_v_self));
jpayne@68 17071
jpayne@68 17072 /* function exit code */
jpayne@68 17073 __Pyx_RefNannyFinishContext();
jpayne@68 17074 return __pyx_r;
jpayne@68 17075 }
jpayne@68 17076
jpayne@68 17077 static PyObject *__pyx_pf_5pysam_9libctabix_14GZIteratorHead___next__(struct __pyx_obj_5pysam_9libctabix_GZIteratorHead *__pyx_v_self) {
jpayne@68 17078 int __pyx_v_retval;
jpayne@68 17079 PyObject *__pyx_r = NULL;
jpayne@68 17080 __Pyx_TraceDeclarations
jpayne@68 17081 __Pyx_RefNannyDeclarations
jpayne@68 17082 int __pyx_error_without_exception = 0; /* StopIteration */
jpayne@68 17083 int __pyx_t_1;
jpayne@68 17084 int __pyx_t_2;
jpayne@68 17085 PyObject *__pyx_t_3 = NULL;
jpayne@68 17086 int __pyx_lineno = 0;
jpayne@68 17087 const char *__pyx_filename = NULL;
jpayne@68 17088 int __pyx_clineno = 0;
jpayne@68 17089 __Pyx_RefNannySetupContext("__next__", 1);
jpayne@68 17090 __Pyx_TraceCall("__next__", __pyx_f[0], 780, 0, __PYX_ERR(0, 780, __pyx_L1_error));
jpayne@68 17091
jpayne@68 17092 /* "pysam/libctabix.pyx":783
jpayne@68 17093 * """python version of next().
jpayne@68 17094 * """
jpayne@68 17095 * cdef int retval = self.__cnext__() # <<<<<<<<<<<<<<
jpayne@68 17096 * if retval < 0:
jpayne@68 17097 * raise StopIteration
jpayne@68 17098 */
jpayne@68 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@68 17100 __pyx_v_retval = __pyx_t_1;
jpayne@68 17101
jpayne@68 17102 /* "pysam/libctabix.pyx":784
jpayne@68 17103 * """
jpayne@68 17104 * cdef int retval = self.__cnext__()
jpayne@68 17105 * if retval < 0: # <<<<<<<<<<<<<<
jpayne@68 17106 * raise StopIteration
jpayne@68 17107 * if self.buffer.s[0] == b'#':
jpayne@68 17108 */
jpayne@68 17109 __pyx_t_2 = (__pyx_v_retval < 0);
jpayne@68 17110 if (unlikely(__pyx_t_2)) {
jpayne@68 17111
jpayne@68 17112 /* "pysam/libctabix.pyx":785
jpayne@68 17113 * cdef int retval = self.__cnext__()
jpayne@68 17114 * if retval < 0:
jpayne@68 17115 * raise StopIteration # <<<<<<<<<<<<<<
jpayne@68 17116 * if self.buffer.s[0] == b'#':
jpayne@68 17117 * return self.buffer.s
jpayne@68 17118 */
jpayne@68 17119 __pyx_error_without_exception = 1;
jpayne@68 17120 goto __pyx_L1_error;;
jpayne@68 17121
jpayne@68 17122 /* "pysam/libctabix.pyx":784
jpayne@68 17123 * """
jpayne@68 17124 * cdef int retval = self.__cnext__()
jpayne@68 17125 * if retval < 0: # <<<<<<<<<<<<<<
jpayne@68 17126 * raise StopIteration
jpayne@68 17127 * if self.buffer.s[0] == b'#':
jpayne@68 17128 */
jpayne@68 17129 }
jpayne@68 17130
jpayne@68 17131 /* "pysam/libctabix.pyx":786
jpayne@68 17132 * if retval < 0:
jpayne@68 17133 * raise StopIteration
jpayne@68 17134 * if self.buffer.s[0] == b'#': # <<<<<<<<<<<<<<
jpayne@68 17135 * return self.buffer.s
jpayne@68 17136 * else:
jpayne@68 17137 */
jpayne@68 17138 __pyx_t_2 = ((__pyx_v_self->__pyx_base.buffer.s[0]) == '#');
jpayne@68 17139 if (likely(__pyx_t_2)) {
jpayne@68 17140
jpayne@68 17141 /* "pysam/libctabix.pyx":787
jpayne@68 17142 * raise StopIteration
jpayne@68 17143 * if self.buffer.s[0] == b'#':
jpayne@68 17144 * return self.buffer.s # <<<<<<<<<<<<<<
jpayne@68 17145 * else:
jpayne@68 17146 * raise StopIteration
jpayne@68 17147 */
jpayne@68 17148 __Pyx_XDECREF(__pyx_r);
jpayne@68 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@68 17150 __Pyx_GOTREF(__pyx_t_3);
jpayne@68 17151 __pyx_r = __pyx_t_3;
jpayne@68 17152 __pyx_t_3 = 0;
jpayne@68 17153 goto __pyx_L0;
jpayne@68 17154
jpayne@68 17155 /* "pysam/libctabix.pyx":786
jpayne@68 17156 * if retval < 0:
jpayne@68 17157 * raise StopIteration
jpayne@68 17158 * if self.buffer.s[0] == b'#': # <<<<<<<<<<<<<<
jpayne@68 17159 * return self.buffer.s
jpayne@68 17160 * else:
jpayne@68 17161 */
jpayne@68 17162 }
jpayne@68 17163
jpayne@68 17164 /* "pysam/libctabix.pyx":789
jpayne@68 17165 * return self.buffer.s
jpayne@68 17166 * else:
jpayne@68 17167 * raise StopIteration # <<<<<<<<<<<<<<
jpayne@68 17168 *
jpayne@68 17169 *
jpayne@68 17170 */
jpayne@68 17171 /*else*/ {
jpayne@68 17172 __pyx_error_without_exception = 1;
jpayne@68 17173 goto __pyx_L1_error;;
jpayne@68 17174 }
jpayne@68 17175
jpayne@68 17176 /* "pysam/libctabix.pyx":780
jpayne@68 17177 * '''
jpayne@68 17178 *
jpayne@68 17179 * def __next__(self): # <<<<<<<<<<<<<<
jpayne@68 17180 * """python version of next().
jpayne@68 17181 * """
jpayne@68 17182 */
jpayne@68 17183
jpayne@68 17184 /* function exit code */
jpayne@68 17185 __pyx_L1_error:;
jpayne@68 17186 __Pyx_XDECREF(__pyx_t_3);
jpayne@68 17187 if (!__pyx_error_without_exception) {
jpayne@68 17188 __Pyx_AddTraceback("pysam.libctabix.GZIteratorHead.__next__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@68 17189 }
jpayne@68 17190 __pyx_r = NULL;
jpayne@68 17191 __pyx_L0:;
jpayne@68 17192 __Pyx_XGIVEREF(__pyx_r);
jpayne@68 17193 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@68 17194 __Pyx_RefNannyFinishContext();
jpayne@68 17195 return __pyx_r;
jpayne@68 17196 }
jpayne@68 17197
jpayne@68 17198 /* "(tree fragment)":1
jpayne@68 17199 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
jpayne@68 17200 * raise TypeError, "self.gzipfile,self.kstream cannot be converted to a Python object for pickling"
jpayne@68 17201 * def __setstate_cython__(self, __pyx_state):
jpayne@68 17202 */
jpayne@68 17203
jpayne@68 17204 /* Python wrapper */
jpayne@68 17205 static PyObject *__pyx_pw_5pysam_9libctabix_14GZIteratorHead_3__reduce_cython__(PyObject *__pyx_v_self,
jpayne@68 17206 #if CYTHON_METH_FASTCALL
jpayne@68 17207 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@68 17208 #else
jpayne@68 17209 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@68 17210 #endif
jpayne@68 17211 ); /*proto*/
jpayne@68 17212 PyDoc_STRVAR(__pyx_doc_5pysam_9libctabix_14GZIteratorHead_2__reduce_cython__, "GZIteratorHead.__reduce_cython__(self)");
jpayne@68 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@68 17214 static PyObject *__pyx_pw_5pysam_9libctabix_14GZIteratorHead_3__reduce_cython__(PyObject *__pyx_v_self,
jpayne@68 17215 #if CYTHON_METH_FASTCALL
jpayne@68 17216 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@68 17217 #else
jpayne@68 17218 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@68 17219 #endif
jpayne@68 17220 ) {
jpayne@68 17221 #if !CYTHON_METH_FASTCALL
jpayne@68 17222 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
jpayne@68 17223 #endif
jpayne@68 17224 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@68 17225 PyObject *__pyx_r = 0;
jpayne@68 17226 __Pyx_RefNannyDeclarations
jpayne@68 17227 __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
jpayne@68 17228 #if !CYTHON_METH_FASTCALL
jpayne@68 17229 #if CYTHON_ASSUME_SAFE_MACROS
jpayne@68 17230 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
jpayne@68 17231 #else
jpayne@68 17232 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
jpayne@68 17233 #endif
jpayne@68 17234 #endif
jpayne@68 17235 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
jpayne@68 17236 if (unlikely(__pyx_nargs > 0)) {
jpayne@68 17237 __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL;}
jpayne@68 17238 if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__reduce_cython__", 0))) return NULL;
jpayne@68 17239 __pyx_r = __pyx_pf_5pysam_9libctabix_14GZIteratorHead_2__reduce_cython__(((struct __pyx_obj_5pysam_9libctabix_GZIteratorHead *)__pyx_v_self));
jpayne@68 17240
jpayne@68 17241 /* function exit code */
jpayne@68 17242 __Pyx_RefNannyFinishContext();
jpayne@68 17243 return __pyx_r;
jpayne@68 17244 }
jpayne@68 17245
jpayne@68 17246 static PyObject *__pyx_pf_5pysam_9libctabix_14GZIteratorHead_2__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5pysam_9libctabix_GZIteratorHead *__pyx_v_self) {
jpayne@68 17247 PyObject *__pyx_r = NULL;
jpayne@68 17248 __Pyx_TraceDeclarations
jpayne@68 17249 __Pyx_RefNannyDeclarations
jpayne@68 17250 int __pyx_lineno = 0;
jpayne@68 17251 const char *__pyx_filename = NULL;
jpayne@68 17252 int __pyx_clineno = 0;
jpayne@68 17253 __Pyx_TraceFrameInit(__pyx_codeobj__33)
jpayne@68 17254 __Pyx_RefNannySetupContext("__reduce_cython__", 1);
jpayne@68 17255 __Pyx_TraceCall("__reduce_cython__", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));
jpayne@68 17256
jpayne@68 17257 /* "(tree fragment)":2
jpayne@68 17258 * def __reduce_cython__(self):
jpayne@68 17259 * raise TypeError, "self.gzipfile,self.kstream cannot be converted to a Python object for pickling" # <<<<<<<<<<<<<<
jpayne@68 17260 * def __setstate_cython__(self, __pyx_state):
jpayne@68 17261 * raise TypeError, "self.gzipfile,self.kstream cannot be converted to a Python object for pickling"
jpayne@68 17262 */
jpayne@68 17263 __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_self_gzipfile_self_kstream_canno, 0, 0);
jpayne@68 17264 __PYX_ERR(1, 2, __pyx_L1_error)
jpayne@68 17265
jpayne@68 17266 /* "(tree fragment)":1
jpayne@68 17267 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
jpayne@68 17268 * raise TypeError, "self.gzipfile,self.kstream cannot be converted to a Python object for pickling"
jpayne@68 17269 * def __setstate_cython__(self, __pyx_state):
jpayne@68 17270 */
jpayne@68 17271
jpayne@68 17272 /* function exit code */
jpayne@68 17273 __pyx_L1_error:;
jpayne@68 17274 __Pyx_AddTraceback("pysam.libctabix.GZIteratorHead.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@68 17275 __pyx_r = NULL;
jpayne@68 17276 __Pyx_XGIVEREF(__pyx_r);
jpayne@68 17277 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@68 17278 __Pyx_RefNannyFinishContext();
jpayne@68 17279 return __pyx_r;
jpayne@68 17280 }
jpayne@68 17281
jpayne@68 17282 /* "(tree fragment)":3
jpayne@68 17283 * def __reduce_cython__(self):
jpayne@68 17284 * raise TypeError, "self.gzipfile,self.kstream cannot be converted to a Python object for pickling"
jpayne@68 17285 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
jpayne@68 17286 * raise TypeError, "self.gzipfile,self.kstream cannot be converted to a Python object for pickling"
jpayne@68 17287 */
jpayne@68 17288
jpayne@68 17289 /* Python wrapper */
jpayne@68 17290 static PyObject *__pyx_pw_5pysam_9libctabix_14GZIteratorHead_5__setstate_cython__(PyObject *__pyx_v_self,
jpayne@68 17291 #if CYTHON_METH_FASTCALL
jpayne@68 17292 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@68 17293 #else
jpayne@68 17294 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@68 17295 #endif
jpayne@68 17296 ); /*proto*/
jpayne@68 17297 PyDoc_STRVAR(__pyx_doc_5pysam_9libctabix_14GZIteratorHead_4__setstate_cython__, "GZIteratorHead.__setstate_cython__(self, __pyx_state)");
jpayne@68 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@68 17299 static PyObject *__pyx_pw_5pysam_9libctabix_14GZIteratorHead_5__setstate_cython__(PyObject *__pyx_v_self,
jpayne@68 17300 #if CYTHON_METH_FASTCALL
jpayne@68 17301 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@68 17302 #else
jpayne@68 17303 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@68 17304 #endif
jpayne@68 17305 ) {
jpayne@68 17306 CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0;
jpayne@68 17307 #if !CYTHON_METH_FASTCALL
jpayne@68 17308 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
jpayne@68 17309 #endif
jpayne@68 17310 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@68 17311 PyObject* values[1] = {0};
jpayne@68 17312 int __pyx_lineno = 0;
jpayne@68 17313 const char *__pyx_filename = NULL;
jpayne@68 17314 int __pyx_clineno = 0;
jpayne@68 17315 PyObject *__pyx_r = 0;
jpayne@68 17316 __Pyx_RefNannyDeclarations
jpayne@68 17317 __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
jpayne@68 17318 #if !CYTHON_METH_FASTCALL
jpayne@68 17319 #if CYTHON_ASSUME_SAFE_MACROS
jpayne@68 17320 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
jpayne@68 17321 #else
jpayne@68 17322 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
jpayne@68 17323 #endif
jpayne@68 17324 #endif
jpayne@68 17325 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
jpayne@68 17326 {
jpayne@68 17327 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0};
jpayne@68 17328 if (__pyx_kwds) {
jpayne@68 17329 Py_ssize_t kw_args;
jpayne@68 17330 switch (__pyx_nargs) {
jpayne@68 17331 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
jpayne@68 17332 CYTHON_FALLTHROUGH;
jpayne@68 17333 case 0: break;
jpayne@68 17334 default: goto __pyx_L5_argtuple_error;
jpayne@68 17335 }
jpayne@68 17336 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
jpayne@68 17337 switch (__pyx_nargs) {
jpayne@68 17338 case 0:
jpayne@68 17339 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) {
jpayne@68 17340 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
jpayne@68 17341 kw_args--;
jpayne@68 17342 }
jpayne@68 17343 else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 3, __pyx_L3_error)
jpayne@68 17344 else goto __pyx_L5_argtuple_error;
jpayne@68 17345 }
jpayne@68 17346 if (unlikely(kw_args > 0)) {
jpayne@68 17347 const Py_ssize_t kwd_pos_args = __pyx_nargs;
jpayne@68 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@68 17349 }
jpayne@68 17350 } else if (unlikely(__pyx_nargs != 1)) {
jpayne@68 17351 goto __pyx_L5_argtuple_error;
jpayne@68 17352 } else {
jpayne@68 17353 values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
jpayne@68 17354 }
jpayne@68 17355 __pyx_v___pyx_state = values[0];
jpayne@68 17356 }
jpayne@68 17357 goto __pyx_L6_skip;
jpayne@68 17358 __pyx_L5_argtuple_error:;
jpayne@68 17359 __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 3, __pyx_L3_error)
jpayne@68 17360 __pyx_L6_skip:;
jpayne@68 17361 goto __pyx_L4_argument_unpacking_done;
jpayne@68 17362 __pyx_L3_error:;
jpayne@68 17363 {
jpayne@68 17364 Py_ssize_t __pyx_temp;
jpayne@68 17365 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
jpayne@68 17366 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
jpayne@68 17367 }
jpayne@68 17368 }
jpayne@68 17369 __Pyx_AddTraceback("pysam.libctabix.GZIteratorHead.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@68 17370 __Pyx_RefNannyFinishContext();
jpayne@68 17371 return NULL;
jpayne@68 17372 __pyx_L4_argument_unpacking_done:;
jpayne@68 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@68 17374
jpayne@68 17375 /* function exit code */
jpayne@68 17376 {
jpayne@68 17377 Py_ssize_t __pyx_temp;
jpayne@68 17378 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
jpayne@68 17379 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
jpayne@68 17380 }
jpayne@68 17381 }
jpayne@68 17382 __Pyx_RefNannyFinishContext();
jpayne@68 17383 return __pyx_r;
jpayne@68 17384 }
jpayne@68 17385
jpayne@68 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@68 17387 PyObject *__pyx_r = NULL;
jpayne@68 17388 __Pyx_TraceDeclarations
jpayne@68 17389 __Pyx_RefNannyDeclarations
jpayne@68 17390 int __pyx_lineno = 0;
jpayne@68 17391 const char *__pyx_filename = NULL;
jpayne@68 17392 int __pyx_clineno = 0;
jpayne@68 17393 __Pyx_TraceFrameInit(__pyx_codeobj__34)
jpayne@68 17394 __Pyx_RefNannySetupContext("__setstate_cython__", 1);
jpayne@68 17395 __Pyx_TraceCall("__setstate_cython__", __pyx_f[1], 3, 0, __PYX_ERR(1, 3, __pyx_L1_error));
jpayne@68 17396
jpayne@68 17397 /* "(tree fragment)":4
jpayne@68 17398 * raise TypeError, "self.gzipfile,self.kstream cannot be converted to a Python object for pickling"
jpayne@68 17399 * def __setstate_cython__(self, __pyx_state):
jpayne@68 17400 * raise TypeError, "self.gzipfile,self.kstream cannot be converted to a Python object for pickling" # <<<<<<<<<<<<<<
jpayne@68 17401 */
jpayne@68 17402 __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_self_gzipfile_self_kstream_canno, 0, 0);
jpayne@68 17403 __PYX_ERR(1, 4, __pyx_L1_error)
jpayne@68 17404
jpayne@68 17405 /* "(tree fragment)":3
jpayne@68 17406 * def __reduce_cython__(self):
jpayne@68 17407 * raise TypeError, "self.gzipfile,self.kstream cannot be converted to a Python object for pickling"
jpayne@68 17408 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
jpayne@68 17409 * raise TypeError, "self.gzipfile,self.kstream cannot be converted to a Python object for pickling"
jpayne@68 17410 */
jpayne@68 17411
jpayne@68 17412 /* function exit code */
jpayne@68 17413 __pyx_L1_error:;
jpayne@68 17414 __Pyx_AddTraceback("pysam.libctabix.GZIteratorHead.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@68 17415 __pyx_r = NULL;
jpayne@68 17416 __Pyx_XGIVEREF(__pyx_r);
jpayne@68 17417 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@68 17418 __Pyx_RefNannyFinishContext();
jpayne@68 17419 return __pyx_r;
jpayne@68 17420 }
jpayne@68 17421
jpayne@68 17422 /* "pysam/libctabix.pyx":797
jpayne@68 17423 * '''
jpayne@68 17424 *
jpayne@68 17425 * def __init__(self, parser): # <<<<<<<<<<<<<<
jpayne@68 17426 * self.parser = parser
jpayne@68 17427 *
jpayne@68 17428 */
jpayne@68 17429
jpayne@68 17430 /* Python wrapper */
jpayne@68 17431 static int __pyx_pw_5pysam_9libctabix_16GZIteratorParsed_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
jpayne@68 17432 static int __pyx_pw_5pysam_9libctabix_16GZIteratorParsed_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
jpayne@68 17433 PyObject *__pyx_v_parser = 0;
jpayne@68 17434 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
jpayne@68 17435 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@68 17436 PyObject* values[1] = {0};
jpayne@68 17437 int __pyx_lineno = 0;
jpayne@68 17438 const char *__pyx_filename = NULL;
jpayne@68 17439 int __pyx_clineno = 0;
jpayne@68 17440 int __pyx_r;
jpayne@68 17441 __Pyx_RefNannyDeclarations
jpayne@68 17442 __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
jpayne@68 17443 #if CYTHON_ASSUME_SAFE_MACROS
jpayne@68 17444 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
jpayne@68 17445 #else
jpayne@68 17446 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
jpayne@68 17447 #endif
jpayne@68 17448 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
jpayne@68 17449 {
jpayne@68 17450 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_parser,0};
jpayne@68 17451 if (__pyx_kwds) {
jpayne@68 17452 Py_ssize_t kw_args;
jpayne@68 17453 switch (__pyx_nargs) {
jpayne@68 17454 case 1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
jpayne@68 17455 CYTHON_FALLTHROUGH;
jpayne@68 17456 case 0: break;
jpayne@68 17457 default: goto __pyx_L5_argtuple_error;
jpayne@68 17458 }
jpayne@68 17459 kw_args = __Pyx_NumKwargs_VARARGS(__pyx_kwds);
jpayne@68 17460 switch (__pyx_nargs) {
jpayne@68 17461 case 0:
jpayne@68 17462 if (likely((values[0] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_parser)) != 0)) {
jpayne@68 17463 (void)__Pyx_Arg_NewRef_VARARGS(values[0]);
jpayne@68 17464 kw_args--;
jpayne@68 17465 }
jpayne@68 17466 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 797, __pyx_L3_error)
jpayne@68 17467 else goto __pyx_L5_argtuple_error;
jpayne@68 17468 }
jpayne@68 17469 if (unlikely(kw_args > 0)) {
jpayne@68 17470 const Py_ssize_t kwd_pos_args = __pyx_nargs;
jpayne@68 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@68 17472 }
jpayne@68 17473 } else if (unlikely(__pyx_nargs != 1)) {
jpayne@68 17474 goto __pyx_L5_argtuple_error;
jpayne@68 17475 } else {
jpayne@68 17476 values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
jpayne@68 17477 }
jpayne@68 17478 __pyx_v_parser = values[0];
jpayne@68 17479 }
jpayne@68 17480 goto __pyx_L6_skip;
jpayne@68 17481 __pyx_L5_argtuple_error:;
jpayne@68 17482 __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 797, __pyx_L3_error)
jpayne@68 17483 __pyx_L6_skip:;
jpayne@68 17484 goto __pyx_L4_argument_unpacking_done;
jpayne@68 17485 __pyx_L3_error:;
jpayne@68 17486 {
jpayne@68 17487 Py_ssize_t __pyx_temp;
jpayne@68 17488 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
jpayne@68 17489 __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]);
jpayne@68 17490 }
jpayne@68 17491 }
jpayne@68 17492 __Pyx_AddTraceback("pysam.libctabix.GZIteratorParsed.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@68 17493 __Pyx_RefNannyFinishContext();
jpayne@68 17494 return -1;
jpayne@68 17495 __pyx_L4_argument_unpacking_done:;
jpayne@68 17496 __pyx_r = __pyx_pf_5pysam_9libctabix_16GZIteratorParsed___init__(((struct __pyx_obj_5pysam_9libctabix_GZIteratorParsed *)__pyx_v_self), __pyx_v_parser);
jpayne@68 17497
jpayne@68 17498 /* function exit code */
jpayne@68 17499 {
jpayne@68 17500 Py_ssize_t __pyx_temp;
jpayne@68 17501 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
jpayne@68 17502 __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]);
jpayne@68 17503 }
jpayne@68 17504 }
jpayne@68 17505 __Pyx_RefNannyFinishContext();
jpayne@68 17506 return __pyx_r;
jpayne@68 17507 }
jpayne@68 17508
jpayne@68 17509 static int __pyx_pf_5pysam_9libctabix_16GZIteratorParsed___init__(struct __pyx_obj_5pysam_9libctabix_GZIteratorParsed *__pyx_v_self, PyObject *__pyx_v_parser) {
jpayne@68 17510 int __pyx_r;
jpayne@68 17511 __Pyx_TraceDeclarations
jpayne@68 17512 __Pyx_RefNannyDeclarations
jpayne@68 17513 PyObject *__pyx_t_1 = NULL;
jpayne@68 17514 int __pyx_lineno = 0;
jpayne@68 17515 const char *__pyx_filename = NULL;
jpayne@68 17516 int __pyx_clineno = 0;
jpayne@68 17517 __Pyx_RefNannySetupContext("__init__", 1);
jpayne@68 17518 __Pyx_TraceCall("__init__", __pyx_f[0], 797, 0, __PYX_ERR(0, 797, __pyx_L1_error));
jpayne@68 17519
jpayne@68 17520 /* "pysam/libctabix.pyx":798
jpayne@68 17521 *
jpayne@68 17522 * def __init__(self, parser):
jpayne@68 17523 * self.parser = parser # <<<<<<<<<<<<<<
jpayne@68 17524 *
jpayne@68 17525 * def __next__(self):
jpayne@68 17526 */
jpayne@68 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@68 17528 __pyx_t_1 = __pyx_v_parser;
jpayne@68 17529 __Pyx_INCREF(__pyx_t_1);
jpayne@68 17530 __Pyx_GIVEREF(__pyx_t_1);
jpayne@68 17531 __Pyx_GOTREF((PyObject *)__pyx_v_self->parser);
jpayne@68 17532 __Pyx_DECREF((PyObject *)__pyx_v_self->parser);
jpayne@68 17533 __pyx_v_self->parser = ((struct __pyx_obj_5pysam_9libctabix_Parser *)__pyx_t_1);
jpayne@68 17534 __pyx_t_1 = 0;
jpayne@68 17535
jpayne@68 17536 /* "pysam/libctabix.pyx":797
jpayne@68 17537 * '''
jpayne@68 17538 *
jpayne@68 17539 * def __init__(self, parser): # <<<<<<<<<<<<<<
jpayne@68 17540 * self.parser = parser
jpayne@68 17541 *
jpayne@68 17542 */
jpayne@68 17543
jpayne@68 17544 /* function exit code */
jpayne@68 17545 __pyx_r = 0;
jpayne@68 17546 goto __pyx_L0;
jpayne@68 17547 __pyx_L1_error:;
jpayne@68 17548 __Pyx_XDECREF(__pyx_t_1);
jpayne@68 17549 __Pyx_AddTraceback("pysam.libctabix.GZIteratorParsed.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@68 17550 __pyx_r = -1;
jpayne@68 17551 __pyx_L0:;
jpayne@68 17552 __Pyx_TraceReturn(Py_None, 0);
jpayne@68 17553 __Pyx_RefNannyFinishContext();
jpayne@68 17554 return __pyx_r;
jpayne@68 17555 }
jpayne@68 17556
jpayne@68 17557 /* "pysam/libctabix.pyx":800
jpayne@68 17558 * self.parser = parser
jpayne@68 17559 *
jpayne@68 17560 * def __next__(self): # <<<<<<<<<<<<<<
jpayne@68 17561 * """python version of next().
jpayne@68 17562 * """
jpayne@68 17563 */
jpayne@68 17564
jpayne@68 17565 /* Python wrapper */
jpayne@68 17566 static PyObject *__pyx_pw_5pysam_9libctabix_16GZIteratorParsed_3__next__(PyObject *__pyx_v_self); /*proto*/
jpayne@68 17567 PyDoc_STRVAR(__pyx_doc_5pysam_9libctabix_16GZIteratorParsed_2__next__, "python version of next().\n ");
jpayne@68 17568 #if CYTHON_UPDATE_DESCRIPTOR_DOC
jpayne@68 17569 struct wrapperbase __pyx_wrapperbase_5pysam_9libctabix_16GZIteratorParsed_2__next__;
jpayne@68 17570 #endif
jpayne@68 17571 static PyObject *__pyx_pw_5pysam_9libctabix_16GZIteratorParsed_3__next__(PyObject *__pyx_v_self) {
jpayne@68 17572 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@68 17573 PyObject *__pyx_r = 0;
jpayne@68 17574 __Pyx_RefNannyDeclarations
jpayne@68 17575 __Pyx_RefNannySetupContext("__next__ (wrapper)", 0);
jpayne@68 17576 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
jpayne@68 17577 __pyx_r = __pyx_pf_5pysam_9libctabix_16GZIteratorParsed_2__next__(((struct __pyx_obj_5pysam_9libctabix_GZIteratorParsed *)__pyx_v_self));
jpayne@68 17578
jpayne@68 17579 /* function exit code */
jpayne@68 17580 __Pyx_RefNannyFinishContext();
jpayne@68 17581 return __pyx_r;
jpayne@68 17582 }
jpayne@68 17583
jpayne@68 17584 static PyObject *__pyx_pf_5pysam_9libctabix_16GZIteratorParsed_2__next__(struct __pyx_obj_5pysam_9libctabix_GZIteratorParsed *__pyx_v_self) {
jpayne@68 17585 int __pyx_v_retval;
jpayne@68 17586 PyObject *__pyx_r = NULL;
jpayne@68 17587 __Pyx_TraceDeclarations
jpayne@68 17588 __Pyx_RefNannyDeclarations
jpayne@68 17589 int __pyx_error_without_exception = 0; /* StopIteration */
jpayne@68 17590 int __pyx_t_1;
jpayne@68 17591 int __pyx_t_2;
jpayne@68 17592 PyObject *__pyx_t_3 = NULL;
jpayne@68 17593 int __pyx_lineno = 0;
jpayne@68 17594 const char *__pyx_filename = NULL;
jpayne@68 17595 int __pyx_clineno = 0;
jpayne@68 17596 __Pyx_RefNannySetupContext("__next__", 1);
jpayne@68 17597 __Pyx_TraceCall("__next__", __pyx_f[0], 800, 0, __PYX_ERR(0, 800, __pyx_L1_error));
jpayne@68 17598
jpayne@68 17599 /* "pysam/libctabix.pyx":803
jpayne@68 17600 * """python version of next().
jpayne@68 17601 * """
jpayne@68 17602 * cdef int retval = self.__cnext__() # <<<<<<<<<<<<<<
jpayne@68 17603 * if retval < 0:
jpayne@68 17604 * raise StopIteration
jpayne@68 17605 */
jpayne@68 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@68 17607 __pyx_v_retval = __pyx_t_1;
jpayne@68 17608
jpayne@68 17609 /* "pysam/libctabix.pyx":804
jpayne@68 17610 * """
jpayne@68 17611 * cdef int retval = self.__cnext__()
jpayne@68 17612 * if retval < 0: # <<<<<<<<<<<<<<
jpayne@68 17613 * raise StopIteration
jpayne@68 17614 *
jpayne@68 17615 */
jpayne@68 17616 __pyx_t_2 = (__pyx_v_retval < 0);
jpayne@68 17617 if (unlikely(__pyx_t_2)) {
jpayne@68 17618
jpayne@68 17619 /* "pysam/libctabix.pyx":805
jpayne@68 17620 * cdef int retval = self.__cnext__()
jpayne@68 17621 * if retval < 0:
jpayne@68 17622 * raise StopIteration # <<<<<<<<<<<<<<
jpayne@68 17623 *
jpayne@68 17624 * return self.parser.parse(self.buffer.s,
jpayne@68 17625 */
jpayne@68 17626 __pyx_error_without_exception = 1;
jpayne@68 17627 goto __pyx_L1_error;;
jpayne@68 17628
jpayne@68 17629 /* "pysam/libctabix.pyx":804
jpayne@68 17630 * """
jpayne@68 17631 * cdef int retval = self.__cnext__()
jpayne@68 17632 * if retval < 0: # <<<<<<<<<<<<<<
jpayne@68 17633 * raise StopIteration
jpayne@68 17634 *
jpayne@68 17635 */
jpayne@68 17636 }
jpayne@68 17637
jpayne@68 17638 /* "pysam/libctabix.pyx":807
jpayne@68 17639 * raise StopIteration
jpayne@68 17640 *
jpayne@68 17641 * return self.parser.parse(self.buffer.s, # <<<<<<<<<<<<<<
jpayne@68 17642 * self.buffer.l)
jpayne@68 17643 *
jpayne@68 17644 */
jpayne@68 17645 __Pyx_XDECREF(__pyx_r);
jpayne@68 17646
jpayne@68 17647 /* "pysam/libctabix.pyx":808
jpayne@68 17648 *
jpayne@68 17649 * return self.parser.parse(self.buffer.s,
jpayne@68 17650 * self.buffer.l) # <<<<<<<<<<<<<<
jpayne@68 17651 *
jpayne@68 17652 *
jpayne@68 17653 */
jpayne@68 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@68 17655 __Pyx_GOTREF(__pyx_t_3);
jpayne@68 17656 __pyx_r = __pyx_t_3;
jpayne@68 17657 __pyx_t_3 = 0;
jpayne@68 17658 goto __pyx_L0;
jpayne@68 17659
jpayne@68 17660 /* "pysam/libctabix.pyx":800
jpayne@68 17661 * self.parser = parser
jpayne@68 17662 *
jpayne@68 17663 * def __next__(self): # <<<<<<<<<<<<<<
jpayne@68 17664 * """python version of next().
jpayne@68 17665 * """
jpayne@68 17666 */
jpayne@68 17667
jpayne@68 17668 /* function exit code */
jpayne@68 17669 __pyx_L1_error:;
jpayne@68 17670 __Pyx_XDECREF(__pyx_t_3);
jpayne@68 17671 if (!__pyx_error_without_exception) {
jpayne@68 17672 __Pyx_AddTraceback("pysam.libctabix.GZIteratorParsed.__next__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@68 17673 }
jpayne@68 17674 __pyx_r = NULL;
jpayne@68 17675 __pyx_L0:;
jpayne@68 17676 __Pyx_XGIVEREF(__pyx_r);
jpayne@68 17677 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@68 17678 __Pyx_RefNannyFinishContext();
jpayne@68 17679 return __pyx_r;
jpayne@68 17680 }
jpayne@68 17681
jpayne@68 17682 /* "(tree fragment)":1
jpayne@68 17683 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
jpayne@68 17684 * raise TypeError, "self.gzipfile,self.kstream cannot be converted to a Python object for pickling"
jpayne@68 17685 * def __setstate_cython__(self, __pyx_state):
jpayne@68 17686 */
jpayne@68 17687
jpayne@68 17688 /* Python wrapper */
jpayne@68 17689 static PyObject *__pyx_pw_5pysam_9libctabix_16GZIteratorParsed_5__reduce_cython__(PyObject *__pyx_v_self,
jpayne@68 17690 #if CYTHON_METH_FASTCALL
jpayne@68 17691 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@68 17692 #else
jpayne@68 17693 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@68 17694 #endif
jpayne@68 17695 ); /*proto*/
jpayne@68 17696 PyDoc_STRVAR(__pyx_doc_5pysam_9libctabix_16GZIteratorParsed_4__reduce_cython__, "GZIteratorParsed.__reduce_cython__(self)");
jpayne@68 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@68 17698 static PyObject *__pyx_pw_5pysam_9libctabix_16GZIteratorParsed_5__reduce_cython__(PyObject *__pyx_v_self,
jpayne@68 17699 #if CYTHON_METH_FASTCALL
jpayne@68 17700 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@68 17701 #else
jpayne@68 17702 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@68 17703 #endif
jpayne@68 17704 ) {
jpayne@68 17705 #if !CYTHON_METH_FASTCALL
jpayne@68 17706 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
jpayne@68 17707 #endif
jpayne@68 17708 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@68 17709 PyObject *__pyx_r = 0;
jpayne@68 17710 __Pyx_RefNannyDeclarations
jpayne@68 17711 __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
jpayne@68 17712 #if !CYTHON_METH_FASTCALL
jpayne@68 17713 #if CYTHON_ASSUME_SAFE_MACROS
jpayne@68 17714 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
jpayne@68 17715 #else
jpayne@68 17716 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
jpayne@68 17717 #endif
jpayne@68 17718 #endif
jpayne@68 17719 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
jpayne@68 17720 if (unlikely(__pyx_nargs > 0)) {
jpayne@68 17721 __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL;}
jpayne@68 17722 if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__reduce_cython__", 0))) return NULL;
jpayne@68 17723 __pyx_r = __pyx_pf_5pysam_9libctabix_16GZIteratorParsed_4__reduce_cython__(((struct __pyx_obj_5pysam_9libctabix_GZIteratorParsed *)__pyx_v_self));
jpayne@68 17724
jpayne@68 17725 /* function exit code */
jpayne@68 17726 __Pyx_RefNannyFinishContext();
jpayne@68 17727 return __pyx_r;
jpayne@68 17728 }
jpayne@68 17729
jpayne@68 17730 static PyObject *__pyx_pf_5pysam_9libctabix_16GZIteratorParsed_4__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5pysam_9libctabix_GZIteratorParsed *__pyx_v_self) {
jpayne@68 17731 PyObject *__pyx_r = NULL;
jpayne@68 17732 __Pyx_TraceDeclarations
jpayne@68 17733 __Pyx_RefNannyDeclarations
jpayne@68 17734 int __pyx_lineno = 0;
jpayne@68 17735 const char *__pyx_filename = NULL;
jpayne@68 17736 int __pyx_clineno = 0;
jpayne@68 17737 __Pyx_TraceFrameInit(__pyx_codeobj__35)
jpayne@68 17738 __Pyx_RefNannySetupContext("__reduce_cython__", 1);
jpayne@68 17739 __Pyx_TraceCall("__reduce_cython__", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));
jpayne@68 17740
jpayne@68 17741 /* "(tree fragment)":2
jpayne@68 17742 * def __reduce_cython__(self):
jpayne@68 17743 * raise TypeError, "self.gzipfile,self.kstream cannot be converted to a Python object for pickling" # <<<<<<<<<<<<<<
jpayne@68 17744 * def __setstate_cython__(self, __pyx_state):
jpayne@68 17745 * raise TypeError, "self.gzipfile,self.kstream cannot be converted to a Python object for pickling"
jpayne@68 17746 */
jpayne@68 17747 __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_self_gzipfile_self_kstream_canno, 0, 0);
jpayne@68 17748 __PYX_ERR(1, 2, __pyx_L1_error)
jpayne@68 17749
jpayne@68 17750 /* "(tree fragment)":1
jpayne@68 17751 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
jpayne@68 17752 * raise TypeError, "self.gzipfile,self.kstream cannot be converted to a Python object for pickling"
jpayne@68 17753 * def __setstate_cython__(self, __pyx_state):
jpayne@68 17754 */
jpayne@68 17755
jpayne@68 17756 /* function exit code */
jpayne@68 17757 __pyx_L1_error:;
jpayne@68 17758 __Pyx_AddTraceback("pysam.libctabix.GZIteratorParsed.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@68 17759 __pyx_r = NULL;
jpayne@68 17760 __Pyx_XGIVEREF(__pyx_r);
jpayne@68 17761 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@68 17762 __Pyx_RefNannyFinishContext();
jpayne@68 17763 return __pyx_r;
jpayne@68 17764 }
jpayne@68 17765
jpayne@68 17766 /* "(tree fragment)":3
jpayne@68 17767 * def __reduce_cython__(self):
jpayne@68 17768 * raise TypeError, "self.gzipfile,self.kstream cannot be converted to a Python object for pickling"
jpayne@68 17769 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
jpayne@68 17770 * raise TypeError, "self.gzipfile,self.kstream cannot be converted to a Python object for pickling"
jpayne@68 17771 */
jpayne@68 17772
jpayne@68 17773 /* Python wrapper */
jpayne@68 17774 static PyObject *__pyx_pw_5pysam_9libctabix_16GZIteratorParsed_7__setstate_cython__(PyObject *__pyx_v_self,
jpayne@68 17775 #if CYTHON_METH_FASTCALL
jpayne@68 17776 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@68 17777 #else
jpayne@68 17778 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@68 17779 #endif
jpayne@68 17780 ); /*proto*/
jpayne@68 17781 PyDoc_STRVAR(__pyx_doc_5pysam_9libctabix_16GZIteratorParsed_6__setstate_cython__, "GZIteratorParsed.__setstate_cython__(self, __pyx_state)");
jpayne@68 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@68 17783 static PyObject *__pyx_pw_5pysam_9libctabix_16GZIteratorParsed_7__setstate_cython__(PyObject *__pyx_v_self,
jpayne@68 17784 #if CYTHON_METH_FASTCALL
jpayne@68 17785 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@68 17786 #else
jpayne@68 17787 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@68 17788 #endif
jpayne@68 17789 ) {
jpayne@68 17790 CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0;
jpayne@68 17791 #if !CYTHON_METH_FASTCALL
jpayne@68 17792 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
jpayne@68 17793 #endif
jpayne@68 17794 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@68 17795 PyObject* values[1] = {0};
jpayne@68 17796 int __pyx_lineno = 0;
jpayne@68 17797 const char *__pyx_filename = NULL;
jpayne@68 17798 int __pyx_clineno = 0;
jpayne@68 17799 PyObject *__pyx_r = 0;
jpayne@68 17800 __Pyx_RefNannyDeclarations
jpayne@68 17801 __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
jpayne@68 17802 #if !CYTHON_METH_FASTCALL
jpayne@68 17803 #if CYTHON_ASSUME_SAFE_MACROS
jpayne@68 17804 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
jpayne@68 17805 #else
jpayne@68 17806 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
jpayne@68 17807 #endif
jpayne@68 17808 #endif
jpayne@68 17809 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
jpayne@68 17810 {
jpayne@68 17811 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0};
jpayne@68 17812 if (__pyx_kwds) {
jpayne@68 17813 Py_ssize_t kw_args;
jpayne@68 17814 switch (__pyx_nargs) {
jpayne@68 17815 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
jpayne@68 17816 CYTHON_FALLTHROUGH;
jpayne@68 17817 case 0: break;
jpayne@68 17818 default: goto __pyx_L5_argtuple_error;
jpayne@68 17819 }
jpayne@68 17820 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
jpayne@68 17821 switch (__pyx_nargs) {
jpayne@68 17822 case 0:
jpayne@68 17823 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) {
jpayne@68 17824 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
jpayne@68 17825 kw_args--;
jpayne@68 17826 }
jpayne@68 17827 else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 3, __pyx_L3_error)
jpayne@68 17828 else goto __pyx_L5_argtuple_error;
jpayne@68 17829 }
jpayne@68 17830 if (unlikely(kw_args > 0)) {
jpayne@68 17831 const Py_ssize_t kwd_pos_args = __pyx_nargs;
jpayne@68 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@68 17833 }
jpayne@68 17834 } else if (unlikely(__pyx_nargs != 1)) {
jpayne@68 17835 goto __pyx_L5_argtuple_error;
jpayne@68 17836 } else {
jpayne@68 17837 values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
jpayne@68 17838 }
jpayne@68 17839 __pyx_v___pyx_state = values[0];
jpayne@68 17840 }
jpayne@68 17841 goto __pyx_L6_skip;
jpayne@68 17842 __pyx_L5_argtuple_error:;
jpayne@68 17843 __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 3, __pyx_L3_error)
jpayne@68 17844 __pyx_L6_skip:;
jpayne@68 17845 goto __pyx_L4_argument_unpacking_done;
jpayne@68 17846 __pyx_L3_error:;
jpayne@68 17847 {
jpayne@68 17848 Py_ssize_t __pyx_temp;
jpayne@68 17849 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
jpayne@68 17850 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
jpayne@68 17851 }
jpayne@68 17852 }
jpayne@68 17853 __Pyx_AddTraceback("pysam.libctabix.GZIteratorParsed.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@68 17854 __Pyx_RefNannyFinishContext();
jpayne@68 17855 return NULL;
jpayne@68 17856 __pyx_L4_argument_unpacking_done:;
jpayne@68 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@68 17858
jpayne@68 17859 /* function exit code */
jpayne@68 17860 {
jpayne@68 17861 Py_ssize_t __pyx_temp;
jpayne@68 17862 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
jpayne@68 17863 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
jpayne@68 17864 }
jpayne@68 17865 }
jpayne@68 17866 __Pyx_RefNannyFinishContext();
jpayne@68 17867 return __pyx_r;
jpayne@68 17868 }
jpayne@68 17869
jpayne@68 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@68 17871 PyObject *__pyx_r = NULL;
jpayne@68 17872 __Pyx_TraceDeclarations
jpayne@68 17873 __Pyx_RefNannyDeclarations
jpayne@68 17874 int __pyx_lineno = 0;
jpayne@68 17875 const char *__pyx_filename = NULL;
jpayne@68 17876 int __pyx_clineno = 0;
jpayne@68 17877 __Pyx_TraceFrameInit(__pyx_codeobj__36)
jpayne@68 17878 __Pyx_RefNannySetupContext("__setstate_cython__", 1);
jpayne@68 17879 __Pyx_TraceCall("__setstate_cython__", __pyx_f[1], 3, 0, __PYX_ERR(1, 3, __pyx_L1_error));
jpayne@68 17880
jpayne@68 17881 /* "(tree fragment)":4
jpayne@68 17882 * raise TypeError, "self.gzipfile,self.kstream cannot be converted to a Python object for pickling"
jpayne@68 17883 * def __setstate_cython__(self, __pyx_state):
jpayne@68 17884 * raise TypeError, "self.gzipfile,self.kstream cannot be converted to a Python object for pickling" # <<<<<<<<<<<<<<
jpayne@68 17885 */
jpayne@68 17886 __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_self_gzipfile_self_kstream_canno, 0, 0);
jpayne@68 17887 __PYX_ERR(1, 4, __pyx_L1_error)
jpayne@68 17888
jpayne@68 17889 /* "(tree fragment)":3
jpayne@68 17890 * def __reduce_cython__(self):
jpayne@68 17891 * raise TypeError, "self.gzipfile,self.kstream cannot be converted to a Python object for pickling"
jpayne@68 17892 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
jpayne@68 17893 * raise TypeError, "self.gzipfile,self.kstream cannot be converted to a Python object for pickling"
jpayne@68 17894 */
jpayne@68 17895
jpayne@68 17896 /* function exit code */
jpayne@68 17897 __pyx_L1_error:;
jpayne@68 17898 __Pyx_AddTraceback("pysam.libctabix.GZIteratorParsed.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@68 17899 __pyx_r = NULL;
jpayne@68 17900 __Pyx_XGIVEREF(__pyx_r);
jpayne@68 17901 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@68 17902 __Pyx_RefNannyFinishContext();
jpayne@68 17903 return __pyx_r;
jpayne@68 17904 }
jpayne@68 17905
jpayne@68 17906 /* "pysam/libctabix.pyx":811
jpayne@68 17907 *
jpayne@68 17908 *
jpayne@68 17909 * def tabix_compress(filename_in, # <<<<<<<<<<<<<<
jpayne@68 17910 * filename_out,
jpayne@68 17911 * force=False):
jpayne@68 17912 */
jpayne@68 17913
jpayne@68 17914 /* Python wrapper */
jpayne@68 17915 static PyObject *__pyx_pw_5pysam_9libctabix_1tabix_compress(PyObject *__pyx_self,
jpayne@68 17916 #if CYTHON_METH_FASTCALL
jpayne@68 17917 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@68 17918 #else
jpayne@68 17919 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@68 17920 #endif
jpayne@68 17921 ); /*proto*/
jpayne@68 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@68 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@68 17924 static PyObject *__pyx_pw_5pysam_9libctabix_1tabix_compress(PyObject *__pyx_self,
jpayne@68 17925 #if CYTHON_METH_FASTCALL
jpayne@68 17926 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@68 17927 #else
jpayne@68 17928 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@68 17929 #endif
jpayne@68 17930 ) {
jpayne@68 17931 PyObject *__pyx_v_filename_in = 0;
jpayne@68 17932 PyObject *__pyx_v_filename_out = 0;
jpayne@68 17933 PyObject *__pyx_v_force = 0;
jpayne@68 17934 #if !CYTHON_METH_FASTCALL
jpayne@68 17935 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
jpayne@68 17936 #endif
jpayne@68 17937 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@68 17938 PyObject* values[3] = {0,0,0};
jpayne@68 17939 int __pyx_lineno = 0;
jpayne@68 17940 const char *__pyx_filename = NULL;
jpayne@68 17941 int __pyx_clineno = 0;
jpayne@68 17942 PyObject *__pyx_r = 0;
jpayne@68 17943 __Pyx_RefNannyDeclarations
jpayne@68 17944 __Pyx_RefNannySetupContext("tabix_compress (wrapper)", 0);
jpayne@68 17945 #if !CYTHON_METH_FASTCALL
jpayne@68 17946 #if CYTHON_ASSUME_SAFE_MACROS
jpayne@68 17947 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
jpayne@68 17948 #else
jpayne@68 17949 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
jpayne@68 17950 #endif
jpayne@68 17951 #endif
jpayne@68 17952 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
jpayne@68 17953 {
jpayne@68 17954 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_filename_in,&__pyx_n_s_filename_out,&__pyx_n_s_force,0};
jpayne@68 17955
jpayne@68 17956 /* "pysam/libctabix.pyx":813
jpayne@68 17957 * def tabix_compress(filename_in,
jpayne@68 17958 * filename_out,
jpayne@68 17959 * force=False): # <<<<<<<<<<<<<<
jpayne@68 17960 * '''compress *filename_in* writing the output to *filename_out*.
jpayne@68 17961 *
jpayne@68 17962 */
jpayne@68 17963 values[2] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)((PyObject *)Py_False)));
jpayne@68 17964 if (__pyx_kwds) {
jpayne@68 17965 Py_ssize_t kw_args;
jpayne@68 17966 switch (__pyx_nargs) {
jpayne@68 17967 case 3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
jpayne@68 17968 CYTHON_FALLTHROUGH;
jpayne@68 17969 case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
jpayne@68 17970 CYTHON_FALLTHROUGH;
jpayne@68 17971 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
jpayne@68 17972 CYTHON_FALLTHROUGH;
jpayne@68 17973 case 0: break;
jpayne@68 17974 default: goto __pyx_L5_argtuple_error;
jpayne@68 17975 }
jpayne@68 17976 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
jpayne@68 17977 switch (__pyx_nargs) {
jpayne@68 17978 case 0:
jpayne@68 17979 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_filename_in)) != 0)) {
jpayne@68 17980 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
jpayne@68 17981 kw_args--;
jpayne@68 17982 }
jpayne@68 17983 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 811, __pyx_L3_error)
jpayne@68 17984 else goto __pyx_L5_argtuple_error;
jpayne@68 17985 CYTHON_FALLTHROUGH;
jpayne@68 17986 case 1:
jpayne@68 17987 if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_filename_out)) != 0)) {
jpayne@68 17988 (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
jpayne@68 17989 kw_args--;
jpayne@68 17990 }
jpayne@68 17991 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 811, __pyx_L3_error)
jpayne@68 17992 else {
jpayne@68 17993 __Pyx_RaiseArgtupleInvalid("tabix_compress", 0, 2, 3, 1); __PYX_ERR(0, 811, __pyx_L3_error)
jpayne@68 17994 }
jpayne@68 17995 CYTHON_FALLTHROUGH;
jpayne@68 17996 case 2:
jpayne@68 17997 if (kw_args > 0) {
jpayne@68 17998 PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_force);
jpayne@68 17999 if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
jpayne@68 18000 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 811, __pyx_L3_error)
jpayne@68 18001 }
jpayne@68 18002 }
jpayne@68 18003 if (unlikely(kw_args > 0)) {
jpayne@68 18004 const Py_ssize_t kwd_pos_args = __pyx_nargs;
jpayne@68 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@68 18006 }
jpayne@68 18007 } else {
jpayne@68 18008 switch (__pyx_nargs) {
jpayne@68 18009 case 3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
jpayne@68 18010 CYTHON_FALLTHROUGH;
jpayne@68 18011 case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
jpayne@68 18012 values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
jpayne@68 18013 break;
jpayne@68 18014 default: goto __pyx_L5_argtuple_error;
jpayne@68 18015 }
jpayne@68 18016 }
jpayne@68 18017 __pyx_v_filename_in = values[0];
jpayne@68 18018 __pyx_v_filename_out = values[1];
jpayne@68 18019 __pyx_v_force = values[2];
jpayne@68 18020 }
jpayne@68 18021 goto __pyx_L6_skip;
jpayne@68 18022 __pyx_L5_argtuple_error:;
jpayne@68 18023 __Pyx_RaiseArgtupleInvalid("tabix_compress", 0, 2, 3, __pyx_nargs); __PYX_ERR(0, 811, __pyx_L3_error)
jpayne@68 18024 __pyx_L6_skip:;
jpayne@68 18025 goto __pyx_L4_argument_unpacking_done;
jpayne@68 18026 __pyx_L3_error:;
jpayne@68 18027 {
jpayne@68 18028 Py_ssize_t __pyx_temp;
jpayne@68 18029 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
jpayne@68 18030 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
jpayne@68 18031 }
jpayne@68 18032 }
jpayne@68 18033 __Pyx_AddTraceback("pysam.libctabix.tabix_compress", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@68 18034 __Pyx_RefNannyFinishContext();
jpayne@68 18035 return NULL;
jpayne@68 18036 __pyx_L4_argument_unpacking_done:;
jpayne@68 18037 __pyx_r = __pyx_pf_5pysam_9libctabix_tabix_compress(__pyx_self, __pyx_v_filename_in, __pyx_v_filename_out, __pyx_v_force);
jpayne@68 18038
jpayne@68 18039 /* "pysam/libctabix.pyx":811
jpayne@68 18040 *
jpayne@68 18041 *
jpayne@68 18042 * def tabix_compress(filename_in, # <<<<<<<<<<<<<<
jpayne@68 18043 * filename_out,
jpayne@68 18044 * force=False):
jpayne@68 18045 */
jpayne@68 18046
jpayne@68 18047 /* function exit code */
jpayne@68 18048 {
jpayne@68 18049 Py_ssize_t __pyx_temp;
jpayne@68 18050 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
jpayne@68 18051 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
jpayne@68 18052 }
jpayne@68 18053 }
jpayne@68 18054 __Pyx_RefNannyFinishContext();
jpayne@68 18055 return __pyx_r;
jpayne@68 18056 }
jpayne@68 18057
jpayne@68 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@68 18059 int __pyx_v_WINDOW_SIZE;
jpayne@68 18060 int __pyx_v_c;
jpayne@68 18061 int __pyx_v_r;
jpayne@68 18062 void *__pyx_v_buffer;
jpayne@68 18063 BGZF *__pyx_v_fp;
jpayne@68 18064 int __pyx_v_fd_src;
jpayne@68 18065 int __pyx_v_is_empty;
jpayne@68 18066 int __pyx_v_O_RDONLY;
jpayne@68 18067 PyObject *__pyx_v_fn = NULL;
jpayne@68 18068 char *__pyx_v_cfn;
jpayne@68 18069 PyObject *__pyx_r = NULL;
jpayne@68 18070 __Pyx_TraceDeclarations
jpayne@68 18071 __Pyx_RefNannyDeclarations
jpayne@68 18072 int __pyx_t_1;
jpayne@68 18073 int __pyx_t_2;
jpayne@68 18074 int __pyx_t_3;
jpayne@68 18075 PyObject *__pyx_t_4 = NULL;
jpayne@68 18076 PyObject *__pyx_t_5 = NULL;
jpayne@68 18077 PyObject *__pyx_t_6 = NULL;
jpayne@68 18078 unsigned int __pyx_t_7;
jpayne@68 18079 int __pyx_t_8;
jpayne@68 18080 char *__pyx_t_9;
jpayne@68 18081 int __pyx_lineno = 0;
jpayne@68 18082 const char *__pyx_filename = NULL;
jpayne@68 18083 int __pyx_clineno = 0;
jpayne@68 18084 __Pyx_TraceFrameInit(__pyx_codeobj__37)
jpayne@68 18085 __Pyx_RefNannySetupContext("tabix_compress", 1);
jpayne@68 18086 __Pyx_TraceCall("tabix_compress", __pyx_f[0], 811, 0, __PYX_ERR(0, 811, __pyx_L1_error));
jpayne@68 18087
jpayne@68 18088 /* "pysam/libctabix.pyx":820
jpayne@68 18089 * '''
jpayne@68 18090 *
jpayne@68 18091 * if not force and os.path.exists(filename_out): # <<<<<<<<<<<<<<
jpayne@68 18092 * raise IOError(
jpayne@68 18093 * "Filename '%s' already exists, use *force* to "
jpayne@68 18094 */
jpayne@68 18095 __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_force); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 820, __pyx_L1_error)
jpayne@68 18096 __pyx_t_3 = (!__pyx_t_2);
jpayne@68 18097 if (__pyx_t_3) {
jpayne@68 18098 } else {
jpayne@68 18099 __pyx_t_1 = __pyx_t_3;
jpayne@68 18100 goto __pyx_L4_bool_binop_done;
jpayne@68 18101 }
jpayne@68 18102 __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_os); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 820, __pyx_L1_error)
jpayne@68 18103 __Pyx_GOTREF(__pyx_t_5);
jpayne@68 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@68 18105 __Pyx_GOTREF(__pyx_t_6);
jpayne@68 18106 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
jpayne@68 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@68 18108 __Pyx_GOTREF(__pyx_t_5);
jpayne@68 18109 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
jpayne@68 18110 __pyx_t_6 = NULL;
jpayne@68 18111 __pyx_t_7 = 0;
jpayne@68 18112 #if CYTHON_UNPACK_METHODS
jpayne@68 18113 if (likely(PyMethod_Check(__pyx_t_5))) {
jpayne@68 18114 __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
jpayne@68 18115 if (likely(__pyx_t_6)) {
jpayne@68 18116 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
jpayne@68 18117 __Pyx_INCREF(__pyx_t_6);
jpayne@68 18118 __Pyx_INCREF(function);
jpayne@68 18119 __Pyx_DECREF_SET(__pyx_t_5, function);
jpayne@68 18120 __pyx_t_7 = 1;
jpayne@68 18121 }
jpayne@68 18122 }
jpayne@68 18123 #endif
jpayne@68 18124 {
jpayne@68 18125 PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_v_filename_out};
jpayne@68 18126 __pyx_t_4 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_7, 1+__pyx_t_7);
jpayne@68 18127 __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
jpayne@68 18128 if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 820, __pyx_L1_error)
jpayne@68 18129 __Pyx_GOTREF(__pyx_t_4);
jpayne@68 18130 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
jpayne@68 18131 }
jpayne@68 18132 __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 820, __pyx_L1_error)
jpayne@68 18133 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
jpayne@68 18134 __pyx_t_1 = __pyx_t_3;
jpayne@68 18135 __pyx_L4_bool_binop_done:;
jpayne@68 18136 if (unlikely(__pyx_t_1)) {
jpayne@68 18137
jpayne@68 18138 /* "pysam/libctabix.pyx":823
jpayne@68 18139 * raise IOError(
jpayne@68 18140 * "Filename '%s' already exists, use *force* to "
jpayne@68 18141 * "overwrite" % filename_out) # <<<<<<<<<<<<<<
jpayne@68 18142 *
jpayne@68 18143 * cdef int WINDOW_SIZE
jpayne@68 18144 */
jpayne@68 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@68 18146 __Pyx_GOTREF(__pyx_t_4);
jpayne@68 18147
jpayne@68 18148 /* "pysam/libctabix.pyx":821
jpayne@68 18149 *
jpayne@68 18150 * if not force and os.path.exists(filename_out):
jpayne@68 18151 * raise IOError( # <<<<<<<<<<<<<<
jpayne@68 18152 * "Filename '%s' already exists, use *force* to "
jpayne@68 18153 * "overwrite" % filename_out)
jpayne@68 18154 */
jpayne@68 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@68 18156 __Pyx_GOTREF(__pyx_t_5);
jpayne@68 18157 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
jpayne@68 18158 __Pyx_Raise(__pyx_t_5, 0, 0, 0);
jpayne@68 18159 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
jpayne@68 18160 __PYX_ERR(0, 821, __pyx_L1_error)
jpayne@68 18161
jpayne@68 18162 /* "pysam/libctabix.pyx":820
jpayne@68 18163 * '''
jpayne@68 18164 *
jpayne@68 18165 * if not force and os.path.exists(filename_out): # <<<<<<<<<<<<<<
jpayne@68 18166 * raise IOError(
jpayne@68 18167 * "Filename '%s' already exists, use *force* to "
jpayne@68 18168 */
jpayne@68 18169 }
jpayne@68 18170
jpayne@68 18171 /* "pysam/libctabix.pyx":830
jpayne@68 18172 * cdef BGZF * fp
jpayne@68 18173 * cdef int fd_src
jpayne@68 18174 * cdef bint is_empty = True # <<<<<<<<<<<<<<
jpayne@68 18175 * cdef int O_RDONLY
jpayne@68 18176 * O_RDONLY = os.O_RDONLY
jpayne@68 18177 */
jpayne@68 18178 __pyx_v_is_empty = 1;
jpayne@68 18179
jpayne@68 18180 /* "pysam/libctabix.pyx":832
jpayne@68 18181 * cdef bint is_empty = True
jpayne@68 18182 * cdef int O_RDONLY
jpayne@68 18183 * O_RDONLY = os.O_RDONLY # <<<<<<<<<<<<<<
jpayne@68 18184 *
jpayne@68 18185 * WINDOW_SIZE = 64 * 1024
jpayne@68 18186 */
jpayne@68 18187 __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_os); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 832, __pyx_L1_error)
jpayne@68 18188 __Pyx_GOTREF(__pyx_t_5);
jpayne@68 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@68 18190 __Pyx_GOTREF(__pyx_t_4);
jpayne@68 18191 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
jpayne@68 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@68 18193 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
jpayne@68 18194 __pyx_v_O_RDONLY = __pyx_t_8;
jpayne@68 18195
jpayne@68 18196 /* "pysam/libctabix.pyx":834
jpayne@68 18197 * O_RDONLY = os.O_RDONLY
jpayne@68 18198 *
jpayne@68 18199 * WINDOW_SIZE = 64 * 1024 # <<<<<<<<<<<<<<
jpayne@68 18200 *
jpayne@68 18201 * fn = encode_filename(filename_out)
jpayne@68 18202 */
jpayne@68 18203 __pyx_v_WINDOW_SIZE = 0x10000;
jpayne@68 18204
jpayne@68 18205 /* "pysam/libctabix.pyx":836
jpayne@68 18206 * WINDOW_SIZE = 64 * 1024
jpayne@68 18207 *
jpayne@68 18208 * fn = encode_filename(filename_out) # <<<<<<<<<<<<<<
jpayne@68 18209 * cdef char *cfn = fn
jpayne@68 18210 * with nogil:
jpayne@68 18211 */
jpayne@68 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@68 18213 __Pyx_GOTREF(__pyx_t_4);
jpayne@68 18214 __pyx_v_fn = ((PyObject*)__pyx_t_4);
jpayne@68 18215 __pyx_t_4 = 0;
jpayne@68 18216
jpayne@68 18217 /* "pysam/libctabix.pyx":837
jpayne@68 18218 *
jpayne@68 18219 * fn = encode_filename(filename_out)
jpayne@68 18220 * cdef char *cfn = fn # <<<<<<<<<<<<<<
jpayne@68 18221 * with nogil:
jpayne@68 18222 * fp = bgzf_open(cfn, "w")
jpayne@68 18223 */
jpayne@68 18224 if (unlikely(__pyx_v_fn == Py_None)) {
jpayne@68 18225 PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
jpayne@68 18226 __PYX_ERR(0, 837, __pyx_L1_error)
jpayne@68 18227 }
jpayne@68 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@68 18229 __pyx_v_cfn = __pyx_t_9;
jpayne@68 18230
jpayne@68 18231 /* "pysam/libctabix.pyx":838
jpayne@68 18232 * fn = encode_filename(filename_out)
jpayne@68 18233 * cdef char *cfn = fn
jpayne@68 18234 * with nogil: # <<<<<<<<<<<<<<
jpayne@68 18235 * fp = bgzf_open(cfn, "w")
jpayne@68 18236 * if fp == NULL:
jpayne@68 18237 */
jpayne@68 18238 {
jpayne@68 18239 #ifdef WITH_THREAD
jpayne@68 18240 PyThreadState *_save;
jpayne@68 18241 _save = NULL;
jpayne@68 18242 Py_UNBLOCK_THREADS
jpayne@68 18243 __Pyx_FastGIL_Remember();
jpayne@68 18244 #endif
jpayne@68 18245 /*try:*/ {
jpayne@68 18246
jpayne@68 18247 /* "pysam/libctabix.pyx":839
jpayne@68 18248 * cdef char *cfn = fn
jpayne@68 18249 * with nogil:
jpayne@68 18250 * fp = bgzf_open(cfn, "w") # <<<<<<<<<<<<<<
jpayne@68 18251 * if fp == NULL:
jpayne@68 18252 * raise IOError("could not open '%s' for writing" % filename_out)
jpayne@68 18253 */
jpayne@68 18254 __pyx_v_fp = bgzf_open(__pyx_v_cfn, ((char const *)"w"));
jpayne@68 18255 }
jpayne@68 18256
jpayne@68 18257 /* "pysam/libctabix.pyx":838
jpayne@68 18258 * fn = encode_filename(filename_out)
jpayne@68 18259 * cdef char *cfn = fn
jpayne@68 18260 * with nogil: # <<<<<<<<<<<<<<
jpayne@68 18261 * fp = bgzf_open(cfn, "w")
jpayne@68 18262 * if fp == NULL:
jpayne@68 18263 */
jpayne@68 18264 /*finally:*/ {
jpayne@68 18265 /*normal exit:*/{
jpayne@68 18266 #ifdef WITH_THREAD
jpayne@68 18267 __Pyx_FastGIL_Forget();
jpayne@68 18268 Py_BLOCK_THREADS
jpayne@68 18269 #endif
jpayne@68 18270 goto __pyx_L8;
jpayne@68 18271 }
jpayne@68 18272 __pyx_L8:;
jpayne@68 18273 }
jpayne@68 18274 }
jpayne@68 18275
jpayne@68 18276 /* "pysam/libctabix.pyx":840
jpayne@68 18277 * with nogil:
jpayne@68 18278 * fp = bgzf_open(cfn, "w")
jpayne@68 18279 * if fp == NULL: # <<<<<<<<<<<<<<
jpayne@68 18280 * raise IOError("could not open '%s' for writing" % filename_out)
jpayne@68 18281 *
jpayne@68 18282 */
jpayne@68 18283 __pyx_t_1 = (__pyx_v_fp == NULL);
jpayne@68 18284 if (unlikely(__pyx_t_1)) {
jpayne@68 18285
jpayne@68 18286 /* "pysam/libctabix.pyx":841
jpayne@68 18287 * fp = bgzf_open(cfn, "w")
jpayne@68 18288 * if fp == NULL:
jpayne@68 18289 * raise IOError("could not open '%s' for writing" % filename_out) # <<<<<<<<<<<<<<
jpayne@68 18290 *
jpayne@68 18291 * fn = encode_filename(filename_in)
jpayne@68 18292 */
jpayne@68 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@68 18294 __Pyx_GOTREF(__pyx_t_4);
jpayne@68 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@68 18296 __Pyx_GOTREF(__pyx_t_5);
jpayne@68 18297 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
jpayne@68 18298 __Pyx_Raise(__pyx_t_5, 0, 0, 0);
jpayne@68 18299 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
jpayne@68 18300 __PYX_ERR(0, 841, __pyx_L1_error)
jpayne@68 18301
jpayne@68 18302 /* "pysam/libctabix.pyx":840
jpayne@68 18303 * with nogil:
jpayne@68 18304 * fp = bgzf_open(cfn, "w")
jpayne@68 18305 * if fp == NULL: # <<<<<<<<<<<<<<
jpayne@68 18306 * raise IOError("could not open '%s' for writing" % filename_out)
jpayne@68 18307 *
jpayne@68 18308 */
jpayne@68 18309 }
jpayne@68 18310
jpayne@68 18311 /* "pysam/libctabix.pyx":843
jpayne@68 18312 * raise IOError("could not open '%s' for writing" % filename_out)
jpayne@68 18313 *
jpayne@68 18314 * fn = encode_filename(filename_in) # <<<<<<<<<<<<<<
jpayne@68 18315 * fd_src = open(fn, O_RDONLY)
jpayne@68 18316 * if fd_src == 0:
jpayne@68 18317 */
jpayne@68 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@68 18319 __Pyx_GOTREF(__pyx_t_5);
jpayne@68 18320 __Pyx_DECREF_SET(__pyx_v_fn, ((PyObject*)__pyx_t_5));
jpayne@68 18321 __pyx_t_5 = 0;
jpayne@68 18322
jpayne@68 18323 /* "pysam/libctabix.pyx":844
jpayne@68 18324 *
jpayne@68 18325 * fn = encode_filename(filename_in)
jpayne@68 18326 * fd_src = open(fn, O_RDONLY) # <<<<<<<<<<<<<<
jpayne@68 18327 * if fd_src == 0:
jpayne@68 18328 * raise IOError("could not open '%s' for reading" % filename_in)
jpayne@68 18329 */
jpayne@68 18330 if (unlikely(__pyx_v_fn == Py_None)) {
jpayne@68 18331 PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
jpayne@68 18332 __PYX_ERR(0, 844, __pyx_L1_error)
jpayne@68 18333 }
jpayne@68 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@68 18335 __pyx_v_fd_src = open(__pyx_t_9, __pyx_v_O_RDONLY);
jpayne@68 18336
jpayne@68 18337 /* "pysam/libctabix.pyx":845
jpayne@68 18338 * fn = encode_filename(filename_in)
jpayne@68 18339 * fd_src = open(fn, O_RDONLY)
jpayne@68 18340 * if fd_src == 0: # <<<<<<<<<<<<<<
jpayne@68 18341 * raise IOError("could not open '%s' for reading" % filename_in)
jpayne@68 18342 *
jpayne@68 18343 */
jpayne@68 18344 __pyx_t_1 = (__pyx_v_fd_src == 0);
jpayne@68 18345 if (unlikely(__pyx_t_1)) {
jpayne@68 18346
jpayne@68 18347 /* "pysam/libctabix.pyx":846
jpayne@68 18348 * fd_src = open(fn, O_RDONLY)
jpayne@68 18349 * if fd_src == 0:
jpayne@68 18350 * raise IOError("could not open '%s' for reading" % filename_in) # <<<<<<<<<<<<<<
jpayne@68 18351 *
jpayne@68 18352 * buffer = malloc(WINDOW_SIZE)
jpayne@68 18353 */
jpayne@68 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@68 18355 __Pyx_GOTREF(__pyx_t_5);
jpayne@68 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@68 18357 __Pyx_GOTREF(__pyx_t_4);
jpayne@68 18358 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
jpayne@68 18359 __Pyx_Raise(__pyx_t_4, 0, 0, 0);
jpayne@68 18360 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
jpayne@68 18361 __PYX_ERR(0, 846, __pyx_L1_error)
jpayne@68 18362
jpayne@68 18363 /* "pysam/libctabix.pyx":845
jpayne@68 18364 * fn = encode_filename(filename_in)
jpayne@68 18365 * fd_src = open(fn, O_RDONLY)
jpayne@68 18366 * if fd_src == 0: # <<<<<<<<<<<<<<
jpayne@68 18367 * raise IOError("could not open '%s' for reading" % filename_in)
jpayne@68 18368 *
jpayne@68 18369 */
jpayne@68 18370 }
jpayne@68 18371
jpayne@68 18372 /* "pysam/libctabix.pyx":848
jpayne@68 18373 * raise IOError("could not open '%s' for reading" % filename_in)
jpayne@68 18374 *
jpayne@68 18375 * buffer = malloc(WINDOW_SIZE) # <<<<<<<<<<<<<<
jpayne@68 18376 * c = 1
jpayne@68 18377 *
jpayne@68 18378 */
jpayne@68 18379 __pyx_v_buffer = malloc(__pyx_v_WINDOW_SIZE);
jpayne@68 18380
jpayne@68 18381 /* "pysam/libctabix.pyx":849
jpayne@68 18382 *
jpayne@68 18383 * buffer = malloc(WINDOW_SIZE)
jpayne@68 18384 * c = 1 # <<<<<<<<<<<<<<
jpayne@68 18385 *
jpayne@68 18386 * while c > 0:
jpayne@68 18387 */
jpayne@68 18388 __pyx_v_c = 1;
jpayne@68 18389
jpayne@68 18390 /* "pysam/libctabix.pyx":851
jpayne@68 18391 * c = 1
jpayne@68 18392 *
jpayne@68 18393 * while c > 0: # <<<<<<<<<<<<<<
jpayne@68 18394 * with nogil:
jpayne@68 18395 * c = read(fd_src, buffer, WINDOW_SIZE)
jpayne@68 18396 */
jpayne@68 18397 while (1) {
jpayne@68 18398 __pyx_t_1 = (__pyx_v_c > 0);
jpayne@68 18399 if (!__pyx_t_1) break;
jpayne@68 18400
jpayne@68 18401 /* "pysam/libctabix.pyx":852
jpayne@68 18402 *
jpayne@68 18403 * while c > 0:
jpayne@68 18404 * with nogil: # <<<<<<<<<<<<<<
jpayne@68 18405 * c = read(fd_src, buffer, WINDOW_SIZE)
jpayne@68 18406 * if c > 0:
jpayne@68 18407 */
jpayne@68 18408 {
jpayne@68 18409 #ifdef WITH_THREAD
jpayne@68 18410 PyThreadState *_save;
jpayne@68 18411 _save = NULL;
jpayne@68 18412 Py_UNBLOCK_THREADS
jpayne@68 18413 __Pyx_FastGIL_Remember();
jpayne@68 18414 #endif
jpayne@68 18415 /*try:*/ {
jpayne@68 18416
jpayne@68 18417 /* "pysam/libctabix.pyx":853
jpayne@68 18418 * while c > 0:
jpayne@68 18419 * with nogil:
jpayne@68 18420 * c = read(fd_src, buffer, WINDOW_SIZE) # <<<<<<<<<<<<<<
jpayne@68 18421 * if c > 0:
jpayne@68 18422 * is_empty = False
jpayne@68 18423 */
jpayne@68 18424 __pyx_v_c = read(__pyx_v_fd_src, __pyx_v_buffer, __pyx_v_WINDOW_SIZE);
jpayne@68 18425
jpayne@68 18426 /* "pysam/libctabix.pyx":854
jpayne@68 18427 * with nogil:
jpayne@68 18428 * c = read(fd_src, buffer, WINDOW_SIZE)
jpayne@68 18429 * if c > 0: # <<<<<<<<<<<<<<
jpayne@68 18430 * is_empty = False
jpayne@68 18431 * r = bgzf_write(fp, buffer, c)
jpayne@68 18432 */
jpayne@68 18433 __pyx_t_1 = (__pyx_v_c > 0);
jpayne@68 18434 if (__pyx_t_1) {
jpayne@68 18435
jpayne@68 18436 /* "pysam/libctabix.pyx":855
jpayne@68 18437 * c = read(fd_src, buffer, WINDOW_SIZE)
jpayne@68 18438 * if c > 0:
jpayne@68 18439 * is_empty = False # <<<<<<<<<<<<<<
jpayne@68 18440 * r = bgzf_write(fp, buffer, c)
jpayne@68 18441 * if r < 0:
jpayne@68 18442 */
jpayne@68 18443 __pyx_v_is_empty = 0;
jpayne@68 18444
jpayne@68 18445 /* "pysam/libctabix.pyx":854
jpayne@68 18446 * with nogil:
jpayne@68 18447 * c = read(fd_src, buffer, WINDOW_SIZE)
jpayne@68 18448 * if c > 0: # <<<<<<<<<<<<<<
jpayne@68 18449 * is_empty = False
jpayne@68 18450 * r = bgzf_write(fp, buffer, c)
jpayne@68 18451 */
jpayne@68 18452 }
jpayne@68 18453
jpayne@68 18454 /* "pysam/libctabix.pyx":856
jpayne@68 18455 * if c > 0:
jpayne@68 18456 * is_empty = False
jpayne@68 18457 * r = bgzf_write(fp, buffer, c) # <<<<<<<<<<<<<<
jpayne@68 18458 * if r < 0:
jpayne@68 18459 * free(buffer)
jpayne@68 18460 */
jpayne@68 18461 __pyx_v_r = bgzf_write(__pyx_v_fp, __pyx_v_buffer, __pyx_v_c);
jpayne@68 18462 }
jpayne@68 18463
jpayne@68 18464 /* "pysam/libctabix.pyx":852
jpayne@68 18465 *
jpayne@68 18466 * while c > 0:
jpayne@68 18467 * with nogil: # <<<<<<<<<<<<<<
jpayne@68 18468 * c = read(fd_src, buffer, WINDOW_SIZE)
jpayne@68 18469 * if c > 0:
jpayne@68 18470 */
jpayne@68 18471 /*finally:*/ {
jpayne@68 18472 /*normal exit:*/{
jpayne@68 18473 #ifdef WITH_THREAD
jpayne@68 18474 __Pyx_FastGIL_Forget();
jpayne@68 18475 Py_BLOCK_THREADS
jpayne@68 18476 #endif
jpayne@68 18477 goto __pyx_L17;
jpayne@68 18478 }
jpayne@68 18479 __pyx_L17:;
jpayne@68 18480 }
jpayne@68 18481 }
jpayne@68 18482
jpayne@68 18483 /* "pysam/libctabix.pyx":857
jpayne@68 18484 * is_empty = False
jpayne@68 18485 * r = bgzf_write(fp, buffer, c)
jpayne@68 18486 * if r < 0: # <<<<<<<<<<<<<<
jpayne@68 18487 * free(buffer)
jpayne@68 18488 * raise IOError("writing failed")
jpayne@68 18489 */
jpayne@68 18490 __pyx_t_1 = (__pyx_v_r < 0);
jpayne@68 18491 if (unlikely(__pyx_t_1)) {
jpayne@68 18492
jpayne@68 18493 /* "pysam/libctabix.pyx":858
jpayne@68 18494 * r = bgzf_write(fp, buffer, c)
jpayne@68 18495 * if r < 0:
jpayne@68 18496 * free(buffer) # <<<<<<<<<<<<<<
jpayne@68 18497 * raise IOError("writing failed")
jpayne@68 18498 *
jpayne@68 18499 */
jpayne@68 18500 free(__pyx_v_buffer);
jpayne@68 18501
jpayne@68 18502 /* "pysam/libctabix.pyx":859
jpayne@68 18503 * if r < 0:
jpayne@68 18504 * free(buffer)
jpayne@68 18505 * raise IOError("writing failed") # <<<<<<<<<<<<<<
jpayne@68 18506 *
jpayne@68 18507 * free(buffer)
jpayne@68 18508 */
jpayne@68 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@68 18510 __Pyx_GOTREF(__pyx_t_4);
jpayne@68 18511 __Pyx_Raise(__pyx_t_4, 0, 0, 0);
jpayne@68 18512 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
jpayne@68 18513 __PYX_ERR(0, 859, __pyx_L1_error)
jpayne@68 18514
jpayne@68 18515 /* "pysam/libctabix.pyx":857
jpayne@68 18516 * is_empty = False
jpayne@68 18517 * r = bgzf_write(fp, buffer, c)
jpayne@68 18518 * if r < 0: # <<<<<<<<<<<<<<
jpayne@68 18519 * free(buffer)
jpayne@68 18520 * raise IOError("writing failed")
jpayne@68 18521 */
jpayne@68 18522 }
jpayne@68 18523 }
jpayne@68 18524
jpayne@68 18525 /* "pysam/libctabix.pyx":861
jpayne@68 18526 * raise IOError("writing failed")
jpayne@68 18527 *
jpayne@68 18528 * free(buffer) # <<<<<<<<<<<<<<
jpayne@68 18529 * r = bgzf_close(fp)
jpayne@68 18530 * if r < 0:
jpayne@68 18531 */
jpayne@68 18532 free(__pyx_v_buffer);
jpayne@68 18533
jpayne@68 18534 /* "pysam/libctabix.pyx":862
jpayne@68 18535 *
jpayne@68 18536 * free(buffer)
jpayne@68 18537 * r = bgzf_close(fp) # <<<<<<<<<<<<<<
jpayne@68 18538 * if r < 0:
jpayne@68 18539 * raise IOError("error %i when writing to file %s" % (r, filename_out))
jpayne@68 18540 */
jpayne@68 18541 __pyx_v_r = bgzf_close(__pyx_v_fp);
jpayne@68 18542
jpayne@68 18543 /* "pysam/libctabix.pyx":863
jpayne@68 18544 * free(buffer)
jpayne@68 18545 * r = bgzf_close(fp)
jpayne@68 18546 * if r < 0: # <<<<<<<<<<<<<<
jpayne@68 18547 * raise IOError("error %i when writing to file %s" % (r, filename_out))
jpayne@68 18548 *
jpayne@68 18549 */
jpayne@68 18550 __pyx_t_1 = (__pyx_v_r < 0);
jpayne@68 18551 if (unlikely(__pyx_t_1)) {
jpayne@68 18552
jpayne@68 18553 /* "pysam/libctabix.pyx":864
jpayne@68 18554 * r = bgzf_close(fp)
jpayne@68 18555 * if r < 0:
jpayne@68 18556 * raise IOError("error %i when writing to file %s" % (r, filename_out)) # <<<<<<<<<<<<<<
jpayne@68 18557 *
jpayne@68 18558 * r = close(fd_src)
jpayne@68 18559 */
jpayne@68 18560 __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_r); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 864, __pyx_L1_error)
jpayne@68 18561 __Pyx_GOTREF(__pyx_t_4);
jpayne@68 18562 __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 864, __pyx_L1_error)
jpayne@68 18563 __Pyx_GOTREF(__pyx_t_5);
jpayne@68 18564 __Pyx_GIVEREF(__pyx_t_4);
jpayne@68 18565 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4)) __PYX_ERR(0, 864, __pyx_L1_error);
jpayne@68 18566 __Pyx_INCREF(__pyx_v_filename_out);
jpayne@68 18567 __Pyx_GIVEREF(__pyx_v_filename_out);
jpayne@68 18568 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_filename_out)) __PYX_ERR(0, 864, __pyx_L1_error);
jpayne@68 18569 __pyx_t_4 = 0;
jpayne@68 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@68 18571 __Pyx_GOTREF(__pyx_t_4);
jpayne@68 18572 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
jpayne@68 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@68 18574 __Pyx_GOTREF(__pyx_t_5);
jpayne@68 18575 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
jpayne@68 18576 __Pyx_Raise(__pyx_t_5, 0, 0, 0);
jpayne@68 18577 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
jpayne@68 18578 __PYX_ERR(0, 864, __pyx_L1_error)
jpayne@68 18579
jpayne@68 18580 /* "pysam/libctabix.pyx":863
jpayne@68 18581 * free(buffer)
jpayne@68 18582 * r = bgzf_close(fp)
jpayne@68 18583 * if r < 0: # <<<<<<<<<<<<<<
jpayne@68 18584 * raise IOError("error %i when writing to file %s" % (r, filename_out))
jpayne@68 18585 *
jpayne@68 18586 */
jpayne@68 18587 }
jpayne@68 18588
jpayne@68 18589 /* "pysam/libctabix.pyx":866
jpayne@68 18590 * raise IOError("error %i when writing to file %s" % (r, filename_out))
jpayne@68 18591 *
jpayne@68 18592 * r = close(fd_src) # <<<<<<<<<<<<<<
jpayne@68 18593 * # an empty file will return with -1, thus ignore this.
jpayne@68 18594 * if r < 0:
jpayne@68 18595 */
jpayne@68 18596 __pyx_v_r = close(__pyx_v_fd_src);
jpayne@68 18597
jpayne@68 18598 /* "pysam/libctabix.pyx":868
jpayne@68 18599 * r = close(fd_src)
jpayne@68 18600 * # an empty file will return with -1, thus ignore this.
jpayne@68 18601 * if r < 0: # <<<<<<<<<<<<<<
jpayne@68 18602 * if not (r == -1 and is_empty):
jpayne@68 18603 * raise IOError("error %i when closing file %s" % (r, filename_in))
jpayne@68 18604 */
jpayne@68 18605 __pyx_t_1 = (__pyx_v_r < 0);
jpayne@68 18606 if (__pyx_t_1) {
jpayne@68 18607
jpayne@68 18608 /* "pysam/libctabix.pyx":869
jpayne@68 18609 * # an empty file will return with -1, thus ignore this.
jpayne@68 18610 * if r < 0:
jpayne@68 18611 * if not (r == -1 and is_empty): # <<<<<<<<<<<<<<
jpayne@68 18612 * raise IOError("error %i when closing file %s" % (r, filename_in))
jpayne@68 18613 *
jpayne@68 18614 */
jpayne@68 18615 __pyx_t_3 = (__pyx_v_r == -1L);
jpayne@68 18616 if (__pyx_t_3) {
jpayne@68 18617 } else {
jpayne@68 18618 __pyx_t_1 = __pyx_t_3;
jpayne@68 18619 goto __pyx_L23_bool_binop_done;
jpayne@68 18620 }
jpayne@68 18621 __pyx_t_1 = __pyx_v_is_empty;
jpayne@68 18622 __pyx_L23_bool_binop_done:;
jpayne@68 18623 __pyx_t_3 = (!__pyx_t_1);
jpayne@68 18624 if (unlikely(__pyx_t_3)) {
jpayne@68 18625
jpayne@68 18626 /* "pysam/libctabix.pyx":870
jpayne@68 18627 * if r < 0:
jpayne@68 18628 * if not (r == -1 and is_empty):
jpayne@68 18629 * raise IOError("error %i when closing file %s" % (r, filename_in)) # <<<<<<<<<<<<<<
jpayne@68 18630 *
jpayne@68 18631 *
jpayne@68 18632 */
jpayne@68 18633 __pyx_t_5 = __Pyx_PyInt_From_int(__pyx_v_r); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 870, __pyx_L1_error)
jpayne@68 18634 __Pyx_GOTREF(__pyx_t_5);
jpayne@68 18635 __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 870, __pyx_L1_error)
jpayne@68 18636 __Pyx_GOTREF(__pyx_t_4);
jpayne@68 18637 __Pyx_GIVEREF(__pyx_t_5);
jpayne@68 18638 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5)) __PYX_ERR(0, 870, __pyx_L1_error);
jpayne@68 18639 __Pyx_INCREF(__pyx_v_filename_in);
jpayne@68 18640 __Pyx_GIVEREF(__pyx_v_filename_in);
jpayne@68 18641 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_v_filename_in)) __PYX_ERR(0, 870, __pyx_L1_error);
jpayne@68 18642 __pyx_t_5 = 0;
jpayne@68 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@68 18644 __Pyx_GOTREF(__pyx_t_5);
jpayne@68 18645 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
jpayne@68 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@68 18647 __Pyx_GOTREF(__pyx_t_4);
jpayne@68 18648 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
jpayne@68 18649 __Pyx_Raise(__pyx_t_4, 0, 0, 0);
jpayne@68 18650 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
jpayne@68 18651 __PYX_ERR(0, 870, __pyx_L1_error)
jpayne@68 18652
jpayne@68 18653 /* "pysam/libctabix.pyx":869
jpayne@68 18654 * # an empty file will return with -1, thus ignore this.
jpayne@68 18655 * if r < 0:
jpayne@68 18656 * if not (r == -1 and is_empty): # <<<<<<<<<<<<<<
jpayne@68 18657 * raise IOError("error %i when closing file %s" % (r, filename_in))
jpayne@68 18658 *
jpayne@68 18659 */
jpayne@68 18660 }
jpayne@68 18661
jpayne@68 18662 /* "pysam/libctabix.pyx":868
jpayne@68 18663 * r = close(fd_src)
jpayne@68 18664 * # an empty file will return with -1, thus ignore this.
jpayne@68 18665 * if r < 0: # <<<<<<<<<<<<<<
jpayne@68 18666 * if not (r == -1 and is_empty):
jpayne@68 18667 * raise IOError("error %i when closing file %s" % (r, filename_in))
jpayne@68 18668 */
jpayne@68 18669 }
jpayne@68 18670
jpayne@68 18671 /* "pysam/libctabix.pyx":811
jpayne@68 18672 *
jpayne@68 18673 *
jpayne@68 18674 * def tabix_compress(filename_in, # <<<<<<<<<<<<<<
jpayne@68 18675 * filename_out,
jpayne@68 18676 * force=False):
jpayne@68 18677 */
jpayne@68 18678
jpayne@68 18679 /* function exit code */
jpayne@68 18680 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
jpayne@68 18681 goto __pyx_L0;
jpayne@68 18682 __pyx_L1_error:;
jpayne@68 18683 __Pyx_XDECREF(__pyx_t_4);
jpayne@68 18684 __Pyx_XDECREF(__pyx_t_5);
jpayne@68 18685 __Pyx_XDECREF(__pyx_t_6);
jpayne@68 18686 __Pyx_AddTraceback("pysam.libctabix.tabix_compress", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@68 18687 __pyx_r = NULL;
jpayne@68 18688 __pyx_L0:;
jpayne@68 18689 __Pyx_XDECREF(__pyx_v_fn);
jpayne@68 18690 __Pyx_XGIVEREF(__pyx_r);
jpayne@68 18691 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@68 18692 __Pyx_RefNannyFinishContext();
jpayne@68 18693 return __pyx_r;
jpayne@68 18694 }
jpayne@68 18695
jpayne@68 18696 /* "pysam/libctabix.pyx":873
jpayne@68 18697 *
jpayne@68 18698 *
jpayne@68 18699 * def tabix_index(filename, # <<<<<<<<<<<<<<
jpayne@68 18700 * force=False,
jpayne@68 18701 * seq_col=None,
jpayne@68 18702 */
jpayne@68 18703
jpayne@68 18704 /* Python wrapper */
jpayne@68 18705 static PyObject *__pyx_pw_5pysam_9libctabix_3tabix_index(PyObject *__pyx_self,
jpayne@68 18706 #if CYTHON_METH_FASTCALL
jpayne@68 18707 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@68 18708 #else
jpayne@68 18709 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@68 18710 #endif
jpayne@68 18711 ); /*proto*/
jpayne@68 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@68 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@68 18714 static PyObject *__pyx_pw_5pysam_9libctabix_3tabix_index(PyObject *__pyx_self,
jpayne@68 18715 #if CYTHON_METH_FASTCALL
jpayne@68 18716 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@68 18717 #else
jpayne@68 18718 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@68 18719 #endif
jpayne@68 18720 ) {
jpayne@68 18721 PyObject *__pyx_v_filename = 0;
jpayne@68 18722 PyObject *__pyx_v_force = 0;
jpayne@68 18723 PyObject *__pyx_v_seq_col = 0;
jpayne@68 18724 PyObject *__pyx_v_start_col = 0;
jpayne@68 18725 PyObject *__pyx_v_end_col = 0;
jpayne@68 18726 PyObject *__pyx_v_preset = 0;
jpayne@68 18727 PyObject *__pyx_v_meta_char = 0;
jpayne@68 18728 int __pyx_v_line_skip;
jpayne@68 18729 PyObject *__pyx_v_zerobased = 0;
jpayne@68 18730 int __pyx_v_min_shift;
jpayne@68 18731 PyObject *__pyx_v_index = 0;
jpayne@68 18732 PyObject *__pyx_v_keep_original = 0;
jpayne@68 18733 PyObject *__pyx_v_csi = 0;
jpayne@68 18734 #if !CYTHON_METH_FASTCALL
jpayne@68 18735 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
jpayne@68 18736 #endif
jpayne@68 18737 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@68 18738 PyObject* values[13] = {0,0,0,0,0,0,0,0,0,0,0,0,0};
jpayne@68 18739 int __pyx_lineno = 0;
jpayne@68 18740 const char *__pyx_filename = NULL;
jpayne@68 18741 int __pyx_clineno = 0;
jpayne@68 18742 PyObject *__pyx_r = 0;
jpayne@68 18743 __Pyx_RefNannyDeclarations
jpayne@68 18744 __Pyx_RefNannySetupContext("tabix_index (wrapper)", 0);
jpayne@68 18745 #if !CYTHON_METH_FASTCALL
jpayne@68 18746 #if CYTHON_ASSUME_SAFE_MACROS
jpayne@68 18747 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
jpayne@68 18748 #else
jpayne@68 18749 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
jpayne@68 18750 #endif
jpayne@68 18751 #endif
jpayne@68 18752 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
jpayne@68 18753 {
jpayne@68 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@68 18755
jpayne@68 18756 /* "pysam/libctabix.pyx":874
jpayne@68 18757 *
jpayne@68 18758 * def tabix_index(filename,
jpayne@68 18759 * force=False, # <<<<<<<<<<<<<<
jpayne@68 18760 * seq_col=None,
jpayne@68 18761 * start_col=None,
jpayne@68 18762 */
jpayne@68 18763 values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)((PyObject *)Py_False)));
jpayne@68 18764
jpayne@68 18765 /* "pysam/libctabix.pyx":875
jpayne@68 18766 * def tabix_index(filename,
jpayne@68 18767 * force=False,
jpayne@68 18768 * seq_col=None, # <<<<<<<<<<<<<<
jpayne@68 18769 * start_col=None,
jpayne@68 18770 * end_col=None,
jpayne@68 18771 */
jpayne@68 18772 values[2] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
jpayne@68 18773
jpayne@68 18774 /* "pysam/libctabix.pyx":876
jpayne@68 18775 * force=False,
jpayne@68 18776 * seq_col=None,
jpayne@68 18777 * start_col=None, # <<<<<<<<<<<<<<
jpayne@68 18778 * end_col=None,
jpayne@68 18779 * preset=None,
jpayne@68 18780 */
jpayne@68 18781 values[3] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
jpayne@68 18782
jpayne@68 18783 /* "pysam/libctabix.pyx":877
jpayne@68 18784 * seq_col=None,
jpayne@68 18785 * start_col=None,
jpayne@68 18786 * end_col=None, # <<<<<<<<<<<<<<
jpayne@68 18787 * preset=None,
jpayne@68 18788 * meta_char="#",
jpayne@68 18789 */
jpayne@68 18790 values[4] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
jpayne@68 18791
jpayne@68 18792 /* "pysam/libctabix.pyx":878
jpayne@68 18793 * start_col=None,
jpayne@68 18794 * end_col=None,
jpayne@68 18795 * preset=None, # <<<<<<<<<<<<<<
jpayne@68 18796 * meta_char="#",
jpayne@68 18797 * int line_skip=0,
jpayne@68 18798 */
jpayne@68 18799 values[5] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
jpayne@68 18800 values[6] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)((PyObject*)__pyx_kp_u__39)));
jpayne@68 18801
jpayne@68 18802 /* "pysam/libctabix.pyx":881
jpayne@68 18803 * meta_char="#",
jpayne@68 18804 * int line_skip=0,
jpayne@68 18805 * zerobased=False, # <<<<<<<<<<<<<<
jpayne@68 18806 * int min_shift=-1,
jpayne@68 18807 * index=None,
jpayne@68 18808 */
jpayne@68 18809 values[8] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)((PyObject *)Py_False)));
jpayne@68 18810
jpayne@68 18811 /* "pysam/libctabix.pyx":883
jpayne@68 18812 * zerobased=False,
jpayne@68 18813 * int min_shift=-1,
jpayne@68 18814 * index=None, # <<<<<<<<<<<<<<
jpayne@68 18815 * keep_original=False,
jpayne@68 18816 * csi=False,
jpayne@68 18817 */
jpayne@68 18818 values[10] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
jpayne@68 18819
jpayne@68 18820 /* "pysam/libctabix.pyx":884
jpayne@68 18821 * int min_shift=-1,
jpayne@68 18822 * index=None,
jpayne@68 18823 * keep_original=False, # <<<<<<<<<<<<<<
jpayne@68 18824 * csi=False,
jpayne@68 18825 * ):
jpayne@68 18826 */
jpayne@68 18827 values[11] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)((PyObject *)Py_False)));
jpayne@68 18828
jpayne@68 18829 /* "pysam/libctabix.pyx":885
jpayne@68 18830 * index=None,
jpayne@68 18831 * keep_original=False,
jpayne@68 18832 * csi=False, # <<<<<<<<<<<<<<
jpayne@68 18833 * ):
jpayne@68 18834 * '''index tab-separated *filename* using tabix.
jpayne@68 18835 */
jpayne@68 18836 values[12] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)((PyObject *)Py_False)));
jpayne@68 18837 if (__pyx_kwds) {
jpayne@68 18838 Py_ssize_t kw_args;
jpayne@68 18839 switch (__pyx_nargs) {
jpayne@68 18840 case 13: values[12] = __Pyx_Arg_FASTCALL(__pyx_args, 12);
jpayne@68 18841 CYTHON_FALLTHROUGH;
jpayne@68 18842 case 12: values[11] = __Pyx_Arg_FASTCALL(__pyx_args, 11);
jpayne@68 18843 CYTHON_FALLTHROUGH;
jpayne@68 18844 case 11: values[10] = __Pyx_Arg_FASTCALL(__pyx_args, 10);
jpayne@68 18845 CYTHON_FALLTHROUGH;
jpayne@68 18846 case 10: values[9] = __Pyx_Arg_FASTCALL(__pyx_args, 9);
jpayne@68 18847 CYTHON_FALLTHROUGH;
jpayne@68 18848 case 9: values[8] = __Pyx_Arg_FASTCALL(__pyx_args, 8);
jpayne@68 18849 CYTHON_FALLTHROUGH;
jpayne@68 18850 case 8: values[7] = __Pyx_Arg_FASTCALL(__pyx_args, 7);
jpayne@68 18851 CYTHON_FALLTHROUGH;
jpayne@68 18852 case 7: values[6] = __Pyx_Arg_FASTCALL(__pyx_args, 6);
jpayne@68 18853 CYTHON_FALLTHROUGH;
jpayne@68 18854 case 6: values[5] = __Pyx_Arg_FASTCALL(__pyx_args, 5);
jpayne@68 18855 CYTHON_FALLTHROUGH;
jpayne@68 18856 case 5: values[4] = __Pyx_Arg_FASTCALL(__pyx_args, 4);
jpayne@68 18857 CYTHON_FALLTHROUGH;
jpayne@68 18858 case 4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
jpayne@68 18859 CYTHON_FALLTHROUGH;
jpayne@68 18860 case 3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
jpayne@68 18861 CYTHON_FALLTHROUGH;
jpayne@68 18862 case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
jpayne@68 18863 CYTHON_FALLTHROUGH;
jpayne@68 18864 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
jpayne@68 18865 CYTHON_FALLTHROUGH;
jpayne@68 18866 case 0: break;
jpayne@68 18867 default: goto __pyx_L5_argtuple_error;
jpayne@68 18868 }
jpayne@68 18869 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
jpayne@68 18870 switch (__pyx_nargs) {
jpayne@68 18871 case 0:
jpayne@68 18872 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_filename)) != 0)) {
jpayne@68 18873 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
jpayne@68 18874 kw_args--;
jpayne@68 18875 }
jpayne@68 18876 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 873, __pyx_L3_error)
jpayne@68 18877 else goto __pyx_L5_argtuple_error;
jpayne@68 18878 CYTHON_FALLTHROUGH;
jpayne@68 18879 case 1:
jpayne@68 18880 if (kw_args > 0) {
jpayne@68 18881 PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_force);
jpayne@68 18882 if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
jpayne@68 18883 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 873, __pyx_L3_error)
jpayne@68 18884 }
jpayne@68 18885 CYTHON_FALLTHROUGH;
jpayne@68 18886 case 2:
jpayne@68 18887 if (kw_args > 0) {
jpayne@68 18888 PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_seq_col);
jpayne@68 18889 if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
jpayne@68 18890 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 873, __pyx_L3_error)
jpayne@68 18891 }
jpayne@68 18892 CYTHON_FALLTHROUGH;
jpayne@68 18893 case 3:
jpayne@68 18894 if (kw_args > 0) {
jpayne@68 18895 PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_start_col);
jpayne@68 18896 if (value) { values[3] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
jpayne@68 18897 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 873, __pyx_L3_error)
jpayne@68 18898 }
jpayne@68 18899 CYTHON_FALLTHROUGH;
jpayne@68 18900 case 4:
jpayne@68 18901 if (kw_args > 0) {
jpayne@68 18902 PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_end_col);
jpayne@68 18903 if (value) { values[4] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
jpayne@68 18904 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 873, __pyx_L3_error)
jpayne@68 18905 }
jpayne@68 18906 CYTHON_FALLTHROUGH;
jpayne@68 18907 case 5:
jpayne@68 18908 if (kw_args > 0) {
jpayne@68 18909 PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_preset);
jpayne@68 18910 if (value) { values[5] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
jpayne@68 18911 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 873, __pyx_L3_error)
jpayne@68 18912 }
jpayne@68 18913 CYTHON_FALLTHROUGH;
jpayne@68 18914 case 6:
jpayne@68 18915 if (kw_args > 0) {
jpayne@68 18916 PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_meta_char);
jpayne@68 18917 if (value) { values[6] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
jpayne@68 18918 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 873, __pyx_L3_error)
jpayne@68 18919 }
jpayne@68 18920 CYTHON_FALLTHROUGH;
jpayne@68 18921 case 7:
jpayne@68 18922 if (kw_args > 0) {
jpayne@68 18923 PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_line_skip);
jpayne@68 18924 if (value) { values[7] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
jpayne@68 18925 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 873, __pyx_L3_error)
jpayne@68 18926 }
jpayne@68 18927 CYTHON_FALLTHROUGH;
jpayne@68 18928 case 8:
jpayne@68 18929 if (kw_args > 0) {
jpayne@68 18930 PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_zerobased);
jpayne@68 18931 if (value) { values[8] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
jpayne@68 18932 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 873, __pyx_L3_error)
jpayne@68 18933 }
jpayne@68 18934 CYTHON_FALLTHROUGH;
jpayne@68 18935 case 9:
jpayne@68 18936 if (kw_args > 0) {
jpayne@68 18937 PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_min_shift);
jpayne@68 18938 if (value) { values[9] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
jpayne@68 18939 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 873, __pyx_L3_error)
jpayne@68 18940 }
jpayne@68 18941 CYTHON_FALLTHROUGH;
jpayne@68 18942 case 10:
jpayne@68 18943 if (kw_args > 0) {
jpayne@68 18944 PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_index);
jpayne@68 18945 if (value) { values[10] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
jpayne@68 18946 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 873, __pyx_L3_error)
jpayne@68 18947 }
jpayne@68 18948 CYTHON_FALLTHROUGH;
jpayne@68 18949 case 11:
jpayne@68 18950 if (kw_args > 0) {
jpayne@68 18951 PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_keep_original);
jpayne@68 18952 if (value) { values[11] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
jpayne@68 18953 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 873, __pyx_L3_error)
jpayne@68 18954 }
jpayne@68 18955 CYTHON_FALLTHROUGH;
jpayne@68 18956 case 12:
jpayne@68 18957 if (kw_args > 0) {
jpayne@68 18958 PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_csi);
jpayne@68 18959 if (value) { values[12] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
jpayne@68 18960 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 873, __pyx_L3_error)
jpayne@68 18961 }
jpayne@68 18962 }
jpayne@68 18963 if (unlikely(kw_args > 0)) {
jpayne@68 18964 const Py_ssize_t kwd_pos_args = __pyx_nargs;
jpayne@68 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@68 18966 }
jpayne@68 18967 } else {
jpayne@68 18968 switch (__pyx_nargs) {
jpayne@68 18969 case 13: values[12] = __Pyx_Arg_FASTCALL(__pyx_args, 12);
jpayne@68 18970 CYTHON_FALLTHROUGH;
jpayne@68 18971 case 12: values[11] = __Pyx_Arg_FASTCALL(__pyx_args, 11);
jpayne@68 18972 CYTHON_FALLTHROUGH;
jpayne@68 18973 case 11: values[10] = __Pyx_Arg_FASTCALL(__pyx_args, 10);
jpayne@68 18974 CYTHON_FALLTHROUGH;
jpayne@68 18975 case 10: values[9] = __Pyx_Arg_FASTCALL(__pyx_args, 9);
jpayne@68 18976 CYTHON_FALLTHROUGH;
jpayne@68 18977 case 9: values[8] = __Pyx_Arg_FASTCALL(__pyx_args, 8);
jpayne@68 18978 CYTHON_FALLTHROUGH;
jpayne@68 18979 case 8: values[7] = __Pyx_Arg_FASTCALL(__pyx_args, 7);
jpayne@68 18980 CYTHON_FALLTHROUGH;
jpayne@68 18981 case 7: values[6] = __Pyx_Arg_FASTCALL(__pyx_args, 6);
jpayne@68 18982 CYTHON_FALLTHROUGH;
jpayne@68 18983 case 6: values[5] = __Pyx_Arg_FASTCALL(__pyx_args, 5);
jpayne@68 18984 CYTHON_FALLTHROUGH;
jpayne@68 18985 case 5: values[4] = __Pyx_Arg_FASTCALL(__pyx_args, 4);
jpayne@68 18986 CYTHON_FALLTHROUGH;
jpayne@68 18987 case 4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
jpayne@68 18988 CYTHON_FALLTHROUGH;
jpayne@68 18989 case 3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
jpayne@68 18990 CYTHON_FALLTHROUGH;
jpayne@68 18991 case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
jpayne@68 18992 CYTHON_FALLTHROUGH;
jpayne@68 18993 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
jpayne@68 18994 break;
jpayne@68 18995 default: goto __pyx_L5_argtuple_error;
jpayne@68 18996 }
jpayne@68 18997 }
jpayne@68 18998 __pyx_v_filename = values[0];
jpayne@68 18999 __pyx_v_force = values[1];
jpayne@68 19000 __pyx_v_seq_col = values[2];
jpayne@68 19001 __pyx_v_start_col = values[3];
jpayne@68 19002 __pyx_v_end_col = values[4];
jpayne@68 19003 __pyx_v_preset = values[5];
jpayne@68 19004 __pyx_v_meta_char = values[6];
jpayne@68 19005 if (values[7]) {
jpayne@68 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@68 19007 } else {
jpayne@68 19008 __pyx_v_line_skip = ((int)((int)0));
jpayne@68 19009 }
jpayne@68 19010 __pyx_v_zerobased = values[8];
jpayne@68 19011 if (values[9]) {
jpayne@68 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@68 19013 } else {
jpayne@68 19014 __pyx_v_min_shift = ((int)((int)-1));
jpayne@68 19015 }
jpayne@68 19016 __pyx_v_index = values[10];
jpayne@68 19017 __pyx_v_keep_original = values[11];
jpayne@68 19018 __pyx_v_csi = values[12];
jpayne@68 19019 }
jpayne@68 19020 goto __pyx_L6_skip;
jpayne@68 19021 __pyx_L5_argtuple_error:;
jpayne@68 19022 __Pyx_RaiseArgtupleInvalid("tabix_index", 0, 1, 13, __pyx_nargs); __PYX_ERR(0, 873, __pyx_L3_error)
jpayne@68 19023 __pyx_L6_skip:;
jpayne@68 19024 goto __pyx_L4_argument_unpacking_done;
jpayne@68 19025 __pyx_L3_error:;
jpayne@68 19026 {
jpayne@68 19027 Py_ssize_t __pyx_temp;
jpayne@68 19028 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
jpayne@68 19029 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
jpayne@68 19030 }
jpayne@68 19031 }
jpayne@68 19032 __Pyx_AddTraceback("pysam.libctabix.tabix_index", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@68 19033 __Pyx_RefNannyFinishContext();
jpayne@68 19034 return NULL;
jpayne@68 19035 __pyx_L4_argument_unpacking_done:;
jpayne@68 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@68 19037
jpayne@68 19038 /* "pysam/libctabix.pyx":873
jpayne@68 19039 *
jpayne@68 19040 *
jpayne@68 19041 * def tabix_index(filename, # <<<<<<<<<<<<<<
jpayne@68 19042 * force=False,
jpayne@68 19043 * seq_col=None,
jpayne@68 19044 */
jpayne@68 19045
jpayne@68 19046 /* function exit code */
jpayne@68 19047 {
jpayne@68 19048 Py_ssize_t __pyx_temp;
jpayne@68 19049 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
jpayne@68 19050 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
jpayne@68 19051 }
jpayne@68 19052 }
jpayne@68 19053 __Pyx_RefNannyFinishContext();
jpayne@68 19054 return __pyx_r;
jpayne@68 19055 }
jpayne@68 19056
jpayne@68 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@68 19058 PyObject *__pyx_v_fn = NULL;
jpayne@68 19059 char *__pyx_v_cfn;
jpayne@68 19060 htsFile *__pyx_v_fp;
jpayne@68 19061 htsFormat __pyx_v_fmt;
jpayne@68 19062 PyObject *__pyx_v_preset2conf = NULL;
jpayne@68 19063 PyObject *__pyx_v_conf_data = NULL;
jpayne@68 19064 tbx_conf_t __pyx_v_conf;
jpayne@68 19065 PyObject *__pyx_v_suffix = NULL;
jpayne@68 19066 PyObject *__pyx_v_fn_index = NULL;
jpayne@68 19067 char *__pyx_v_fnidx;
jpayne@68 19068 int __pyx_v_retval;
jpayne@68 19069 PyObject *__pyx_r = NULL;
jpayne@68 19070 __Pyx_TraceDeclarations
jpayne@68 19071 __Pyx_RefNannyDeclarations
jpayne@68 19072 int __pyx_t_1;
jpayne@68 19073 int __pyx_t_2;
jpayne@68 19074 PyObject *__pyx_t_3 = NULL;
jpayne@68 19075 char *__pyx_t_4;
jpayne@68 19076 Py_ssize_t __pyx_t_5;
jpayne@68 19077 Py_UCS4 __pyx_t_6;
jpayne@68 19078 PyObject *__pyx_t_7 = NULL;
jpayne@68 19079 PyObject *__pyx_t_8 = NULL;
jpayne@68 19080 PyObject *__pyx_t_9 = NULL;
jpayne@68 19081 unsigned int __pyx_t_10;
jpayne@68 19082 PyObject *__pyx_t_11 = NULL;
jpayne@68 19083 PyObject *__pyx_t_12 = NULL;
jpayne@68 19084 PyObject *__pyx_t_13 = NULL;
jpayne@68 19085 int __pyx_t_14;
jpayne@68 19086 PyObject *__pyx_t_15 = NULL;
jpayne@68 19087 PyObject *__pyx_t_16 = NULL;
jpayne@68 19088 long __pyx_t_17;
jpayne@68 19089 PyObject *__pyx_t_18 = NULL;
jpayne@68 19090 PyObject *(*__pyx_t_19)(PyObject *);
jpayne@68 19091 int32_t __pyx_t_20;
jpayne@68 19092 int32_t __pyx_t_21;
jpayne@68 19093 int32_t __pyx_t_22;
jpayne@68 19094 int32_t __pyx_t_23;
jpayne@68 19095 int32_t __pyx_t_24;
jpayne@68 19096 int32_t __pyx_t_25;
jpayne@68 19097 int __pyx_t_26;
jpayne@68 19098 int __pyx_lineno = 0;
jpayne@68 19099 const char *__pyx_filename = NULL;
jpayne@68 19100 int __pyx_clineno = 0;
jpayne@68 19101 __Pyx_TraceFrameInit(__pyx_codeobj__40)
jpayne@68 19102 __Pyx_RefNannySetupContext("tabix_index", 0);
jpayne@68 19103 __Pyx_TraceCall("tabix_index", __pyx_f[0], 873, 0, __PYX_ERR(0, 873, __pyx_L1_error));
jpayne@68 19104 __Pyx_INCREF(__pyx_v_filename);
jpayne@68 19105 __Pyx_INCREF(__pyx_v_end_col);
jpayne@68 19106 __Pyx_INCREF(__pyx_v_preset);
jpayne@68 19107 __Pyx_INCREF(__pyx_v_index);
jpayne@68 19108 __Pyx_INCREF(__pyx_v_csi);
jpayne@68 19109
jpayne@68 19110 /* "pysam/libctabix.pyx":928
jpayne@68 19111 * '''
jpayne@68 19112 *
jpayne@68 19113 * if preset is None and \ # <<<<<<<<<<<<<<
jpayne@68 19114 * (seq_col is None or start_col is None or end_col is None):
jpayne@68 19115 * raise ValueError(
jpayne@68 19116 */
jpayne@68 19117 __pyx_t_2 = (__pyx_v_preset == Py_None);
jpayne@68 19118 if (__pyx_t_2) {
jpayne@68 19119 } else {
jpayne@68 19120 __pyx_t_1 = __pyx_t_2;
jpayne@68 19121 goto __pyx_L4_bool_binop_done;
jpayne@68 19122 }
jpayne@68 19123
jpayne@68 19124 /* "pysam/libctabix.pyx":929
jpayne@68 19125 *
jpayne@68 19126 * if preset is None and \
jpayne@68 19127 * (seq_col is None or start_col is None or end_col is None): # <<<<<<<<<<<<<<
jpayne@68 19128 * raise ValueError(
jpayne@68 19129 * "neither preset nor seq_col,start_col and end_col given")
jpayne@68 19130 */
jpayne@68 19131 __pyx_t_2 = (__pyx_v_seq_col == Py_None);
jpayne@68 19132 if (!__pyx_t_2) {
jpayne@68 19133 } else {
jpayne@68 19134 __pyx_t_1 = __pyx_t_2;
jpayne@68 19135 goto __pyx_L4_bool_binop_done;
jpayne@68 19136 }
jpayne@68 19137 __pyx_t_2 = (__pyx_v_start_col == Py_None);
jpayne@68 19138 if (!__pyx_t_2) {
jpayne@68 19139 } else {
jpayne@68 19140 __pyx_t_1 = __pyx_t_2;
jpayne@68 19141 goto __pyx_L4_bool_binop_done;
jpayne@68 19142 }
jpayne@68 19143 __pyx_t_2 = (__pyx_v_end_col == Py_None);
jpayne@68 19144 __pyx_t_1 = __pyx_t_2;
jpayne@68 19145 __pyx_L4_bool_binop_done:;
jpayne@68 19146
jpayne@68 19147 /* "pysam/libctabix.pyx":928
jpayne@68 19148 * '''
jpayne@68 19149 *
jpayne@68 19150 * if preset is None and \ # <<<<<<<<<<<<<<
jpayne@68 19151 * (seq_col is None or start_col is None or end_col is None):
jpayne@68 19152 * raise ValueError(
jpayne@68 19153 */
jpayne@68 19154 if (unlikely(__pyx_t_1)) {
jpayne@68 19155
jpayne@68 19156 /* "pysam/libctabix.pyx":930
jpayne@68 19157 * if preset is None and \
jpayne@68 19158 * (seq_col is None or start_col is None or end_col is None):
jpayne@68 19159 * raise ValueError( # <<<<<<<<<<<<<<
jpayne@68 19160 * "neither preset nor seq_col,start_col and end_col given")
jpayne@68 19161 *
jpayne@68 19162 */
jpayne@68 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@68 19164 __Pyx_GOTREF(__pyx_t_3);
jpayne@68 19165 __Pyx_Raise(__pyx_t_3, 0, 0, 0);
jpayne@68 19166 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
jpayne@68 19167 __PYX_ERR(0, 930, __pyx_L1_error)
jpayne@68 19168
jpayne@68 19169 /* "pysam/libctabix.pyx":928
jpayne@68 19170 * '''
jpayne@68 19171 *
jpayne@68 19172 * if preset is None and \ # <<<<<<<<<<<<<<
jpayne@68 19173 * (seq_col is None or start_col is None or end_col is None):
jpayne@68 19174 * raise ValueError(
jpayne@68 19175 */
jpayne@68 19176 }
jpayne@68 19177
jpayne@68 19178 /* "pysam/libctabix.pyx":933
jpayne@68 19179 * "neither preset nor seq_col,start_col and end_col given")
jpayne@68 19180 *
jpayne@68 19181 * fn = encode_filename(filename) # <<<<<<<<<<<<<<
jpayne@68 19182 * cdef char *cfn = fn
jpayne@68 19183 *
jpayne@68 19184 */
jpayne@68 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@68 19186 __Pyx_GOTREF(__pyx_t_3);
jpayne@68 19187 __pyx_v_fn = ((PyObject*)__pyx_t_3);
jpayne@68 19188 __pyx_t_3 = 0;
jpayne@68 19189
jpayne@68 19190 /* "pysam/libctabix.pyx":934
jpayne@68 19191 *
jpayne@68 19192 * fn = encode_filename(filename)
jpayne@68 19193 * cdef char *cfn = fn # <<<<<<<<<<<<<<
jpayne@68 19194 *
jpayne@68 19195 * cdef htsFile *fp = hts_open(cfn, "r")
jpayne@68 19196 */
jpayne@68 19197 if (unlikely(__pyx_v_fn == Py_None)) {
jpayne@68 19198 PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
jpayne@68 19199 __PYX_ERR(0, 934, __pyx_L1_error)
jpayne@68 19200 }
jpayne@68 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@68 19202 __pyx_v_cfn = __pyx_t_4;
jpayne@68 19203
jpayne@68 19204 /* "pysam/libctabix.pyx":936
jpayne@68 19205 * cdef char *cfn = fn
jpayne@68 19206 *
jpayne@68 19207 * cdef htsFile *fp = hts_open(cfn, "r") # <<<<<<<<<<<<<<
jpayne@68 19208 * if fp == NULL:
jpayne@68 19209 * raise IOError("Could not open file '%s': %s" % (filename, force_str(strerror(errno))))
jpayne@68 19210 */
jpayne@68 19211 __pyx_v_fp = hts_open(__pyx_v_cfn, ((char const *)"r"));
jpayne@68 19212
jpayne@68 19213 /* "pysam/libctabix.pyx":937
jpayne@68 19214 *
jpayne@68 19215 * cdef htsFile *fp = hts_open(cfn, "r")
jpayne@68 19216 * if fp == NULL: # <<<<<<<<<<<<<<
jpayne@68 19217 * raise IOError("Could not open file '%s': %s" % (filename, force_str(strerror(errno))))
jpayne@68 19218 *
jpayne@68 19219 */
jpayne@68 19220 __pyx_t_1 = (__pyx_v_fp == NULL);
jpayne@68 19221 if (unlikely(__pyx_t_1)) {
jpayne@68 19222
jpayne@68 19223 /* "pysam/libctabix.pyx":938
jpayne@68 19224 * cdef htsFile *fp = hts_open(cfn, "r")
jpayne@68 19225 * if fp == NULL:
jpayne@68 19226 * raise IOError("Could not open file '%s': %s" % (filename, force_str(strerror(errno)))) # <<<<<<<<<<<<<<
jpayne@68 19227 *
jpayne@68 19228 * cdef htsFormat fmt = hts_get_format(fp)[0]
jpayne@68 19229 */
jpayne@68 19230 __pyx_t_3 = PyTuple_New(4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 938, __pyx_L1_error)
jpayne@68 19231 __Pyx_GOTREF(__pyx_t_3);
jpayne@68 19232 __pyx_t_5 = 0;
jpayne@68 19233 __pyx_t_6 = 127;
jpayne@68 19234 __Pyx_INCREF(__pyx_kp_u_Could_not_open_file);
jpayne@68 19235 __pyx_t_5 += 21;
jpayne@68 19236 __Pyx_GIVEREF(__pyx_kp_u_Could_not_open_file);
jpayne@68 19237 PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_kp_u_Could_not_open_file);
jpayne@68 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@68 19239 __Pyx_GOTREF(__pyx_t_7);
jpayne@68 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@68 19241 __pyx_t_5 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_7);
jpayne@68 19242 __Pyx_GIVEREF(__pyx_t_7);
jpayne@68 19243 PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_7);
jpayne@68 19244 __pyx_t_7 = 0;
jpayne@68 19245 __Pyx_INCREF(__pyx_kp_u__42);
jpayne@68 19246 __pyx_t_5 += 3;
jpayne@68 19247 __Pyx_GIVEREF(__pyx_kp_u__42);
jpayne@68 19248 PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_kp_u__42);
jpayne@68 19249 __pyx_t_7 = __Pyx_PyBytes_FromString(strerror(errno)); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 938, __pyx_L1_error)
jpayne@68 19250 __Pyx_GOTREF(__pyx_t_7);
jpayne@68 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@68 19252 __Pyx_GOTREF(__pyx_t_8);
jpayne@68 19253 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
jpayne@68 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@68 19255 __Pyx_GOTREF(__pyx_t_7);
jpayne@68 19256 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
jpayne@68 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@68 19258 __pyx_t_5 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_7);
jpayne@68 19259 __Pyx_GIVEREF(__pyx_t_7);
jpayne@68 19260 PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_t_7);
jpayne@68 19261 __pyx_t_7 = 0;
jpayne@68 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@68 19263 __Pyx_GOTREF(__pyx_t_7);
jpayne@68 19264 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
jpayne@68 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@68 19266 __Pyx_GOTREF(__pyx_t_3);
jpayne@68 19267 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
jpayne@68 19268 __Pyx_Raise(__pyx_t_3, 0, 0, 0);
jpayne@68 19269 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
jpayne@68 19270 __PYX_ERR(0, 938, __pyx_L1_error)
jpayne@68 19271
jpayne@68 19272 /* "pysam/libctabix.pyx":937
jpayne@68 19273 *
jpayne@68 19274 * cdef htsFile *fp = hts_open(cfn, "r")
jpayne@68 19275 * if fp == NULL: # <<<<<<<<<<<<<<
jpayne@68 19276 * raise IOError("Could not open file '%s': %s" % (filename, force_str(strerror(errno))))
jpayne@68 19277 *
jpayne@68 19278 */
jpayne@68 19279 }
jpayne@68 19280
jpayne@68 19281 /* "pysam/libctabix.pyx":940
jpayne@68 19282 * raise IOError("Could not open file '%s': %s" % (filename, force_str(strerror(errno))))
jpayne@68 19283 *
jpayne@68 19284 * cdef htsFormat fmt = hts_get_format(fp)[0] # <<<<<<<<<<<<<<
jpayne@68 19285 * hts_close(fp)
jpayne@68 19286 *
jpayne@68 19287 */
jpayne@68 19288 __pyx_v_fmt = (hts_get_format(__pyx_v_fp)[0]);
jpayne@68 19289
jpayne@68 19290 /* "pysam/libctabix.pyx":941
jpayne@68 19291 *
jpayne@68 19292 * cdef htsFormat fmt = hts_get_format(fp)[0]
jpayne@68 19293 * hts_close(fp) # <<<<<<<<<<<<<<
jpayne@68 19294 *
jpayne@68 19295 * if fmt.compression == no_compression:
jpayne@68 19296 */
jpayne@68 19297 (void)(hts_close(__pyx_v_fp));
jpayne@68 19298
jpayne@68 19299 /* "pysam/libctabix.pyx":943
jpayne@68 19300 * hts_close(fp)
jpayne@68 19301 *
jpayne@68 19302 * if fmt.compression == no_compression: # <<<<<<<<<<<<<<
jpayne@68 19303 * tabix_compress(filename, filename + ".gz", force=force)
jpayne@68 19304 * if not keep_original:
jpayne@68 19305 */
jpayne@68 19306 __pyx_t_1 = (__pyx_v_fmt.compression == no_compression);
jpayne@68 19307 if (__pyx_t_1) {
jpayne@68 19308
jpayne@68 19309 /* "pysam/libctabix.pyx":944
jpayne@68 19310 *
jpayne@68 19311 * if fmt.compression == no_compression:
jpayne@68 19312 * tabix_compress(filename, filename + ".gz", force=force) # <<<<<<<<<<<<<<
jpayne@68 19313 * if not keep_original:
jpayne@68 19314 * os.unlink(filename)
jpayne@68 19315 */
jpayne@68 19316 __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_tabix_compress); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 944, __pyx_L1_error)
jpayne@68 19317 __Pyx_GOTREF(__pyx_t_3);
jpayne@68 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@68 19319 __Pyx_GOTREF(__pyx_t_7);
jpayne@68 19320 __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 944, __pyx_L1_error)
jpayne@68 19321 __Pyx_GOTREF(__pyx_t_8);
jpayne@68 19322 __Pyx_INCREF(__pyx_v_filename);
jpayne@68 19323 __Pyx_GIVEREF(__pyx_v_filename);
jpayne@68 19324 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_filename)) __PYX_ERR(0, 944, __pyx_L1_error);
jpayne@68 19325 __Pyx_GIVEREF(__pyx_t_7);
jpayne@68 19326 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_7)) __PYX_ERR(0, 944, __pyx_L1_error);
jpayne@68 19327 __pyx_t_7 = 0;
jpayne@68 19328 __pyx_t_7 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 944, __pyx_L1_error)
jpayne@68 19329 __Pyx_GOTREF(__pyx_t_7);
jpayne@68 19330 if (PyDict_SetItem(__pyx_t_7, __pyx_n_s_force, __pyx_v_force) < 0) __PYX_ERR(0, 944, __pyx_L1_error)
jpayne@68 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@68 19332 __Pyx_GOTREF(__pyx_t_9);
jpayne@68 19333 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
jpayne@68 19334 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
jpayne@68 19335 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
jpayne@68 19336 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
jpayne@68 19337
jpayne@68 19338 /* "pysam/libctabix.pyx":945
jpayne@68 19339 * if fmt.compression == no_compression:
jpayne@68 19340 * tabix_compress(filename, filename + ".gz", force=force)
jpayne@68 19341 * if not keep_original: # <<<<<<<<<<<<<<
jpayne@68 19342 * os.unlink(filename)
jpayne@68 19343 * filename += ".gz"
jpayne@68 19344 */
jpayne@68 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@68 19346 __pyx_t_2 = (!__pyx_t_1);
jpayne@68 19347 if (__pyx_t_2) {
jpayne@68 19348
jpayne@68 19349 /* "pysam/libctabix.pyx":946
jpayne@68 19350 * tabix_compress(filename, filename + ".gz", force=force)
jpayne@68 19351 * if not keep_original:
jpayne@68 19352 * os.unlink(filename) # <<<<<<<<<<<<<<
jpayne@68 19353 * filename += ".gz"
jpayne@68 19354 * fn = encode_filename(filename)
jpayne@68 19355 */
jpayne@68 19356 __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_n_s_os); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 946, __pyx_L1_error)
jpayne@68 19357 __Pyx_GOTREF(__pyx_t_7);
jpayne@68 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@68 19359 __Pyx_GOTREF(__pyx_t_8);
jpayne@68 19360 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
jpayne@68 19361 __pyx_t_7 = NULL;
jpayne@68 19362 __pyx_t_10 = 0;
jpayne@68 19363 #if CYTHON_UNPACK_METHODS
jpayne@68 19364 if (unlikely(PyMethod_Check(__pyx_t_8))) {
jpayne@68 19365 __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_8);
jpayne@68 19366 if (likely(__pyx_t_7)) {
jpayne@68 19367 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
jpayne@68 19368 __Pyx_INCREF(__pyx_t_7);
jpayne@68 19369 __Pyx_INCREF(function);
jpayne@68 19370 __Pyx_DECREF_SET(__pyx_t_8, function);
jpayne@68 19371 __pyx_t_10 = 1;
jpayne@68 19372 }
jpayne@68 19373 }
jpayne@68 19374 #endif
jpayne@68 19375 {
jpayne@68 19376 PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_v_filename};
jpayne@68 19377 __pyx_t_9 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_10, 1+__pyx_t_10);
jpayne@68 19378 __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
jpayne@68 19379 if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 946, __pyx_L1_error)
jpayne@68 19380 __Pyx_GOTREF(__pyx_t_9);
jpayne@68 19381 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
jpayne@68 19382 }
jpayne@68 19383 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
jpayne@68 19384
jpayne@68 19385 /* "pysam/libctabix.pyx":945
jpayne@68 19386 * if fmt.compression == no_compression:
jpayne@68 19387 * tabix_compress(filename, filename + ".gz", force=force)
jpayne@68 19388 * if not keep_original: # <<<<<<<<<<<<<<
jpayne@68 19389 * os.unlink(filename)
jpayne@68 19390 * filename += ".gz"
jpayne@68 19391 */
jpayne@68 19392 }
jpayne@68 19393
jpayne@68 19394 /* "pysam/libctabix.pyx":947
jpayne@68 19395 * if not keep_original:
jpayne@68 19396 * os.unlink(filename)
jpayne@68 19397 * filename += ".gz" # <<<<<<<<<<<<<<
jpayne@68 19398 * fn = encode_filename(filename)
jpayne@68 19399 * cfn = fn
jpayne@68 19400 */
jpayne@68 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@68 19402 __Pyx_GOTREF(__pyx_t_9);
jpayne@68 19403 __Pyx_DECREF_SET(__pyx_v_filename, __pyx_t_9);
jpayne@68 19404 __pyx_t_9 = 0;
jpayne@68 19405
jpayne@68 19406 /* "pysam/libctabix.pyx":948
jpayne@68 19407 * os.unlink(filename)
jpayne@68 19408 * filename += ".gz"
jpayne@68 19409 * fn = encode_filename(filename) # <<<<<<<<<<<<<<
jpayne@68 19410 * cfn = fn
jpayne@68 19411 *
jpayne@68 19412 */
jpayne@68 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@68 19414 __Pyx_GOTREF(__pyx_t_9);
jpayne@68 19415 __Pyx_DECREF_SET(__pyx_v_fn, ((PyObject*)__pyx_t_9));
jpayne@68 19416 __pyx_t_9 = 0;
jpayne@68 19417
jpayne@68 19418 /* "pysam/libctabix.pyx":949
jpayne@68 19419 * filename += ".gz"
jpayne@68 19420 * fn = encode_filename(filename)
jpayne@68 19421 * cfn = fn # <<<<<<<<<<<<<<
jpayne@68 19422 *
jpayne@68 19423 * # columns (1-based):
jpayne@68 19424 */
jpayne@68 19425 if (unlikely(__pyx_v_fn == Py_None)) {
jpayne@68 19426 PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
jpayne@68 19427 __PYX_ERR(0, 949, __pyx_L1_error)
jpayne@68 19428 }
jpayne@68 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@68 19430 __pyx_v_cfn = __pyx_t_4;
jpayne@68 19431
jpayne@68 19432 /* "pysam/libctabix.pyx":943
jpayne@68 19433 * hts_close(fp)
jpayne@68 19434 *
jpayne@68 19435 * if fmt.compression == no_compression: # <<<<<<<<<<<<<<
jpayne@68 19436 * tabix_compress(filename, filename + ".gz", force=force)
jpayne@68 19437 * if not keep_original:
jpayne@68 19438 */
jpayne@68 19439 }
jpayne@68 19440
jpayne@68 19441 /* "pysam/libctabix.pyx":956
jpayne@68 19442 * # 0 is a missing column
jpayne@68 19443 * preset2conf = {
jpayne@68 19444 * 'gff' : (TBX_GENERIC, 1, 4, 5, ord('#'), 0), # <<<<<<<<<<<<<<
jpayne@68 19445 * 'bed' : (TBX_UCSC, 1, 2, 3, ord('#'), 0),
jpayne@68 19446 * 'psltbl' : (TBX_UCSC, 15, 17, 18, ord('#'), 0),
jpayne@68 19447 */
jpayne@68 19448 __pyx_t_9 = __Pyx_PyDict_NewPresized(5); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 956, __pyx_L1_error)
jpayne@68 19449 __Pyx_GOTREF(__pyx_t_9);
jpayne@68 19450 __pyx_t_8 = __Pyx_PyInt_From_int32_t(TBX_GENERIC); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 956, __pyx_L1_error)
jpayne@68 19451 __Pyx_GOTREF(__pyx_t_8);
jpayne@68 19452 __pyx_t_7 = PyTuple_New(6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 956, __pyx_L1_error)
jpayne@68 19453 __Pyx_GOTREF(__pyx_t_7);
jpayne@68 19454 __Pyx_GIVEREF(__pyx_t_8);
jpayne@68 19455 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_8)) __PYX_ERR(0, 956, __pyx_L1_error);
jpayne@68 19456 __Pyx_INCREF(__pyx_int_1);
jpayne@68 19457 __Pyx_GIVEREF(__pyx_int_1);
jpayne@68 19458 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_int_1)) __PYX_ERR(0, 956, __pyx_L1_error);
jpayne@68 19459 __Pyx_INCREF(__pyx_int_4);
jpayne@68 19460 __Pyx_GIVEREF(__pyx_int_4);
jpayne@68 19461 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_int_4)) __PYX_ERR(0, 956, __pyx_L1_error);
jpayne@68 19462 __Pyx_INCREF(__pyx_int_5);
jpayne@68 19463 __Pyx_GIVEREF(__pyx_int_5);
jpayne@68 19464 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 3, __pyx_int_5)) __PYX_ERR(0, 956, __pyx_L1_error);
jpayne@68 19465 __Pyx_INCREF(__pyx_int_35);
jpayne@68 19466 __Pyx_GIVEREF(__pyx_int_35);
jpayne@68 19467 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 4, __pyx_int_35)) __PYX_ERR(0, 956, __pyx_L1_error);
jpayne@68 19468 __Pyx_INCREF(__pyx_int_0);
jpayne@68 19469 __Pyx_GIVEREF(__pyx_int_0);
jpayne@68 19470 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 5, __pyx_int_0)) __PYX_ERR(0, 956, __pyx_L1_error);
jpayne@68 19471 __pyx_t_8 = 0;
jpayne@68 19472 if (PyDict_SetItem(__pyx_t_9, __pyx_n_u_gff, __pyx_t_7) < 0) __PYX_ERR(0, 956, __pyx_L1_error)
jpayne@68 19473 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
jpayne@68 19474
jpayne@68 19475 /* "pysam/libctabix.pyx":957
jpayne@68 19476 * preset2conf = {
jpayne@68 19477 * 'gff' : (TBX_GENERIC, 1, 4, 5, ord('#'), 0),
jpayne@68 19478 * 'bed' : (TBX_UCSC, 1, 2, 3, ord('#'), 0), # <<<<<<<<<<<<<<
jpayne@68 19479 * 'psltbl' : (TBX_UCSC, 15, 17, 18, ord('#'), 0),
jpayne@68 19480 * 'sam' : (TBX_SAM, 3, 4, 0, ord('@'), 0),
jpayne@68 19481 */
jpayne@68 19482 __pyx_t_7 = __Pyx_PyInt_From_int32_t(TBX_UCSC); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 957, __pyx_L1_error)
jpayne@68 19483 __Pyx_GOTREF(__pyx_t_7);
jpayne@68 19484 __pyx_t_8 = PyTuple_New(6); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 957, __pyx_L1_error)
jpayne@68 19485 __Pyx_GOTREF(__pyx_t_8);
jpayne@68 19486 __Pyx_GIVEREF(__pyx_t_7);
jpayne@68 19487 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7)) __PYX_ERR(0, 957, __pyx_L1_error);
jpayne@68 19488 __Pyx_INCREF(__pyx_int_1);
jpayne@68 19489 __Pyx_GIVEREF(__pyx_int_1);
jpayne@68 19490 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_int_1)) __PYX_ERR(0, 957, __pyx_L1_error);
jpayne@68 19491 __Pyx_INCREF(__pyx_int_2);
jpayne@68 19492 __Pyx_GIVEREF(__pyx_int_2);
jpayne@68 19493 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 2, __pyx_int_2)) __PYX_ERR(0, 957, __pyx_L1_error);
jpayne@68 19494 __Pyx_INCREF(__pyx_int_3);
jpayne@68 19495 __Pyx_GIVEREF(__pyx_int_3);
jpayne@68 19496 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 3, __pyx_int_3)) __PYX_ERR(0, 957, __pyx_L1_error);
jpayne@68 19497 __Pyx_INCREF(__pyx_int_35);
jpayne@68 19498 __Pyx_GIVEREF(__pyx_int_35);
jpayne@68 19499 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 4, __pyx_int_35)) __PYX_ERR(0, 957, __pyx_L1_error);
jpayne@68 19500 __Pyx_INCREF(__pyx_int_0);
jpayne@68 19501 __Pyx_GIVEREF(__pyx_int_0);
jpayne@68 19502 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 5, __pyx_int_0)) __PYX_ERR(0, 957, __pyx_L1_error);
jpayne@68 19503 __pyx_t_7 = 0;
jpayne@68 19504 if (PyDict_SetItem(__pyx_t_9, __pyx_n_u_bed, __pyx_t_8) < 0) __PYX_ERR(0, 956, __pyx_L1_error)
jpayne@68 19505 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
jpayne@68 19506
jpayne@68 19507 /* "pysam/libctabix.pyx":958
jpayne@68 19508 * 'gff' : (TBX_GENERIC, 1, 4, 5, ord('#'), 0),
jpayne@68 19509 * 'bed' : (TBX_UCSC, 1, 2, 3, ord('#'), 0),
jpayne@68 19510 * 'psltbl' : (TBX_UCSC, 15, 17, 18, ord('#'), 0), # <<<<<<<<<<<<<<
jpayne@68 19511 * 'sam' : (TBX_SAM, 3, 4, 0, ord('@'), 0),
jpayne@68 19512 * 'vcf' : (TBX_VCF, 1, 2, 0, ord('#'), 0),
jpayne@68 19513 */
jpayne@68 19514 __pyx_t_8 = __Pyx_PyInt_From_int32_t(TBX_UCSC); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 958, __pyx_L1_error)
jpayne@68 19515 __Pyx_GOTREF(__pyx_t_8);
jpayne@68 19516 __pyx_t_7 = PyTuple_New(6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 958, __pyx_L1_error)
jpayne@68 19517 __Pyx_GOTREF(__pyx_t_7);
jpayne@68 19518 __Pyx_GIVEREF(__pyx_t_8);
jpayne@68 19519 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_8)) __PYX_ERR(0, 958, __pyx_L1_error);
jpayne@68 19520 __Pyx_INCREF(__pyx_int_15);
jpayne@68 19521 __Pyx_GIVEREF(__pyx_int_15);
jpayne@68 19522 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_int_15)) __PYX_ERR(0, 958, __pyx_L1_error);
jpayne@68 19523 __Pyx_INCREF(__pyx_int_17);
jpayne@68 19524 __Pyx_GIVEREF(__pyx_int_17);
jpayne@68 19525 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_int_17)) __PYX_ERR(0, 958, __pyx_L1_error);
jpayne@68 19526 __Pyx_INCREF(__pyx_int_18);
jpayne@68 19527 __Pyx_GIVEREF(__pyx_int_18);
jpayne@68 19528 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 3, __pyx_int_18)) __PYX_ERR(0, 958, __pyx_L1_error);
jpayne@68 19529 __Pyx_INCREF(__pyx_int_35);
jpayne@68 19530 __Pyx_GIVEREF(__pyx_int_35);
jpayne@68 19531 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 4, __pyx_int_35)) __PYX_ERR(0, 958, __pyx_L1_error);
jpayne@68 19532 __Pyx_INCREF(__pyx_int_0);
jpayne@68 19533 __Pyx_GIVEREF(__pyx_int_0);
jpayne@68 19534 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 5, __pyx_int_0)) __PYX_ERR(0, 958, __pyx_L1_error);
jpayne@68 19535 __pyx_t_8 = 0;
jpayne@68 19536 if (PyDict_SetItem(__pyx_t_9, __pyx_n_u_psltbl, __pyx_t_7) < 0) __PYX_ERR(0, 956, __pyx_L1_error)
jpayne@68 19537 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
jpayne@68 19538
jpayne@68 19539 /* "pysam/libctabix.pyx":959
jpayne@68 19540 * 'bed' : (TBX_UCSC, 1, 2, 3, ord('#'), 0),
jpayne@68 19541 * 'psltbl' : (TBX_UCSC, 15, 17, 18, ord('#'), 0),
jpayne@68 19542 * 'sam' : (TBX_SAM, 3, 4, 0, ord('@'), 0), # <<<<<<<<<<<<<<
jpayne@68 19543 * 'vcf' : (TBX_VCF, 1, 2, 0, ord('#'), 0),
jpayne@68 19544 * }
jpayne@68 19545 */
jpayne@68 19546 __pyx_t_7 = __Pyx_PyInt_From_int32_t(TBX_SAM); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 959, __pyx_L1_error)
jpayne@68 19547 __Pyx_GOTREF(__pyx_t_7);
jpayne@68 19548 __pyx_t_8 = PyTuple_New(6); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 959, __pyx_L1_error)
jpayne@68 19549 __Pyx_GOTREF(__pyx_t_8);
jpayne@68 19550 __Pyx_GIVEREF(__pyx_t_7);
jpayne@68 19551 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_7)) __PYX_ERR(0, 959, __pyx_L1_error);
jpayne@68 19552 __Pyx_INCREF(__pyx_int_3);
jpayne@68 19553 __Pyx_GIVEREF(__pyx_int_3);
jpayne@68 19554 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_int_3)) __PYX_ERR(0, 959, __pyx_L1_error);
jpayne@68 19555 __Pyx_INCREF(__pyx_int_4);
jpayne@68 19556 __Pyx_GIVEREF(__pyx_int_4);
jpayne@68 19557 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 2, __pyx_int_4)) __PYX_ERR(0, 959, __pyx_L1_error);
jpayne@68 19558 __Pyx_INCREF(__pyx_int_0);
jpayne@68 19559 __Pyx_GIVEREF(__pyx_int_0);
jpayne@68 19560 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 3, __pyx_int_0)) __PYX_ERR(0, 959, __pyx_L1_error);
jpayne@68 19561 __Pyx_INCREF(__pyx_int_64);
jpayne@68 19562 __Pyx_GIVEREF(__pyx_int_64);
jpayne@68 19563 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 4, __pyx_int_64)) __PYX_ERR(0, 959, __pyx_L1_error);
jpayne@68 19564 __Pyx_INCREF(__pyx_int_0);
jpayne@68 19565 __Pyx_GIVEREF(__pyx_int_0);
jpayne@68 19566 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_8, 5, __pyx_int_0)) __PYX_ERR(0, 959, __pyx_L1_error);
jpayne@68 19567 __pyx_t_7 = 0;
jpayne@68 19568 if (PyDict_SetItem(__pyx_t_9, __pyx_n_u_sam, __pyx_t_8) < 0) __PYX_ERR(0, 956, __pyx_L1_error)
jpayne@68 19569 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
jpayne@68 19570
jpayne@68 19571 /* "pysam/libctabix.pyx":960
jpayne@68 19572 * 'psltbl' : (TBX_UCSC, 15, 17, 18, ord('#'), 0),
jpayne@68 19573 * 'sam' : (TBX_SAM, 3, 4, 0, ord('@'), 0),
jpayne@68 19574 * 'vcf' : (TBX_VCF, 1, 2, 0, ord('#'), 0), # <<<<<<<<<<<<<<
jpayne@68 19575 * }
jpayne@68 19576 *
jpayne@68 19577 */
jpayne@68 19578 __pyx_t_8 = __Pyx_PyInt_From_int32_t(TBX_VCF); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 960, __pyx_L1_error)
jpayne@68 19579 __Pyx_GOTREF(__pyx_t_8);
jpayne@68 19580 __pyx_t_7 = PyTuple_New(6); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 960, __pyx_L1_error)
jpayne@68 19581 __Pyx_GOTREF(__pyx_t_7);
jpayne@68 19582 __Pyx_GIVEREF(__pyx_t_8);
jpayne@68 19583 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_8)) __PYX_ERR(0, 960, __pyx_L1_error);
jpayne@68 19584 __Pyx_INCREF(__pyx_int_1);
jpayne@68 19585 __Pyx_GIVEREF(__pyx_int_1);
jpayne@68 19586 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 1, __pyx_int_1)) __PYX_ERR(0, 960, __pyx_L1_error);
jpayne@68 19587 __Pyx_INCREF(__pyx_int_2);
jpayne@68 19588 __Pyx_GIVEREF(__pyx_int_2);
jpayne@68 19589 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 2, __pyx_int_2)) __PYX_ERR(0, 960, __pyx_L1_error);
jpayne@68 19590 __Pyx_INCREF(__pyx_int_0);
jpayne@68 19591 __Pyx_GIVEREF(__pyx_int_0);
jpayne@68 19592 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 3, __pyx_int_0)) __PYX_ERR(0, 960, __pyx_L1_error);
jpayne@68 19593 __Pyx_INCREF(__pyx_int_35);
jpayne@68 19594 __Pyx_GIVEREF(__pyx_int_35);
jpayne@68 19595 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 4, __pyx_int_35)) __PYX_ERR(0, 960, __pyx_L1_error);
jpayne@68 19596 __Pyx_INCREF(__pyx_int_0);
jpayne@68 19597 __Pyx_GIVEREF(__pyx_int_0);
jpayne@68 19598 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_7, 5, __pyx_int_0)) __PYX_ERR(0, 960, __pyx_L1_error);
jpayne@68 19599 __pyx_t_8 = 0;
jpayne@68 19600 if (PyDict_SetItem(__pyx_t_9, __pyx_n_u_vcf, __pyx_t_7) < 0) __PYX_ERR(0, 956, __pyx_L1_error)
jpayne@68 19601 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
jpayne@68 19602 __pyx_v_preset2conf = ((PyObject*)__pyx_t_9);
jpayne@68 19603 __pyx_t_9 = 0;
jpayne@68 19604
jpayne@68 19605 /* "pysam/libctabix.pyx":963
jpayne@68 19606 * }
jpayne@68 19607 *
jpayne@68 19608 * conf_data = None # <<<<<<<<<<<<<<
jpayne@68 19609 * if preset == "bcf" or fmt.format == bcf:
jpayne@68 19610 * csi = True
jpayne@68 19611 */
jpayne@68 19612 __Pyx_INCREF(Py_None);
jpayne@68 19613 __pyx_v_conf_data = Py_None;
jpayne@68 19614
jpayne@68 19615 /* "pysam/libctabix.pyx":964
jpayne@68 19616 *
jpayne@68 19617 * conf_data = None
jpayne@68 19618 * if preset == "bcf" or fmt.format == bcf: # <<<<<<<<<<<<<<
jpayne@68 19619 * csi = True
jpayne@68 19620 * elif preset:
jpayne@68 19621 */
jpayne@68 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@68 19623 if (!__pyx_t_1) {
jpayne@68 19624 } else {
jpayne@68 19625 __pyx_t_2 = __pyx_t_1;
jpayne@68 19626 goto __pyx_L12_bool_binop_done;
jpayne@68 19627 }
jpayne@68 19628 __pyx_t_1 = (__pyx_v_fmt.format == bcf);
jpayne@68 19629 __pyx_t_2 = __pyx_t_1;
jpayne@68 19630 __pyx_L12_bool_binop_done:;
jpayne@68 19631 if (__pyx_t_2) {
jpayne@68 19632
jpayne@68 19633 /* "pysam/libctabix.pyx":965
jpayne@68 19634 * conf_data = None
jpayne@68 19635 * if preset == "bcf" or fmt.format == bcf:
jpayne@68 19636 * csi = True # <<<<<<<<<<<<<<
jpayne@68 19637 * elif preset:
jpayne@68 19638 * try:
jpayne@68 19639 */
jpayne@68 19640 __Pyx_INCREF(Py_True);
jpayne@68 19641 __Pyx_DECREF_SET(__pyx_v_csi, Py_True);
jpayne@68 19642
jpayne@68 19643 /* "pysam/libctabix.pyx":964
jpayne@68 19644 *
jpayne@68 19645 * conf_data = None
jpayne@68 19646 * if preset == "bcf" or fmt.format == bcf: # <<<<<<<<<<<<<<
jpayne@68 19647 * csi = True
jpayne@68 19648 * elif preset:
jpayne@68 19649 */
jpayne@68 19650 goto __pyx_L11;
jpayne@68 19651 }
jpayne@68 19652
jpayne@68 19653 /* "pysam/libctabix.pyx":966
jpayne@68 19654 * if preset == "bcf" or fmt.format == bcf:
jpayne@68 19655 * csi = True
jpayne@68 19656 * elif preset: # <<<<<<<<<<<<<<
jpayne@68 19657 * try:
jpayne@68 19658 * conf_data = preset2conf[preset]
jpayne@68 19659 */
jpayne@68 19660 __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_preset); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 966, __pyx_L1_error)
jpayne@68 19661 if (__pyx_t_2) {
jpayne@68 19662
jpayne@68 19663 /* "pysam/libctabix.pyx":967
jpayne@68 19664 * csi = True
jpayne@68 19665 * elif preset:
jpayne@68 19666 * try: # <<<<<<<<<<<<<<
jpayne@68 19667 * conf_data = preset2conf[preset]
jpayne@68 19668 * except KeyError:
jpayne@68 19669 */
jpayne@68 19670 {
jpayne@68 19671 __Pyx_PyThreadState_declare
jpayne@68 19672 __Pyx_PyThreadState_assign
jpayne@68 19673 __Pyx_ExceptionSave(&__pyx_t_11, &__pyx_t_12, &__pyx_t_13);
jpayne@68 19674 __Pyx_XGOTREF(__pyx_t_11);
jpayne@68 19675 __Pyx_XGOTREF(__pyx_t_12);
jpayne@68 19676 __Pyx_XGOTREF(__pyx_t_13);
jpayne@68 19677 /*try:*/ {
jpayne@68 19678
jpayne@68 19679 /* "pysam/libctabix.pyx":968
jpayne@68 19680 * elif preset:
jpayne@68 19681 * try:
jpayne@68 19682 * conf_data = preset2conf[preset] # <<<<<<<<<<<<<<
jpayne@68 19683 * except KeyError:
jpayne@68 19684 * raise KeyError(
jpayne@68 19685 */
jpayne@68 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@68 19687 __Pyx_GOTREF(__pyx_t_9);
jpayne@68 19688 __Pyx_DECREF_SET(__pyx_v_conf_data, __pyx_t_9);
jpayne@68 19689 __pyx_t_9 = 0;
jpayne@68 19690
jpayne@68 19691 /* "pysam/libctabix.pyx":967
jpayne@68 19692 * csi = True
jpayne@68 19693 * elif preset:
jpayne@68 19694 * try: # <<<<<<<<<<<<<<
jpayne@68 19695 * conf_data = preset2conf[preset]
jpayne@68 19696 * except KeyError:
jpayne@68 19697 */
jpayne@68 19698 }
jpayne@68 19699 __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
jpayne@68 19700 __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
jpayne@68 19701 __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
jpayne@68 19702 goto __pyx_L19_try_end;
jpayne@68 19703 __pyx_L14_error:;
jpayne@68 19704 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
jpayne@68 19705 __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
jpayne@68 19706 __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
jpayne@68 19707 __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
jpayne@68 19708
jpayne@68 19709 /* "pysam/libctabix.pyx":969
jpayne@68 19710 * try:
jpayne@68 19711 * conf_data = preset2conf[preset]
jpayne@68 19712 * except KeyError: # <<<<<<<<<<<<<<
jpayne@68 19713 * raise KeyError(
jpayne@68 19714 * "unknown preset '%s', valid presets are '%s'" %
jpayne@68 19715 */
jpayne@68 19716 __pyx_t_14 = __Pyx_PyErr_ExceptionMatches(__pyx_builtin_KeyError);
jpayne@68 19717 if (__pyx_t_14) {
jpayne@68 19718 __Pyx_AddTraceback("pysam.libctabix.tabix_index", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@68 19719 if (__Pyx_GetException(&__pyx_t_9, &__pyx_t_7, &__pyx_t_8) < 0) __PYX_ERR(0, 969, __pyx_L16_except_error)
jpayne@68 19720 __Pyx_XGOTREF(__pyx_t_9);
jpayne@68 19721 __Pyx_XGOTREF(__pyx_t_7);
jpayne@68 19722 __Pyx_XGOTREF(__pyx_t_8);
jpayne@68 19723
jpayne@68 19724 /* "pysam/libctabix.pyx":971
jpayne@68 19725 * except KeyError:
jpayne@68 19726 * raise KeyError(
jpayne@68 19727 * "unknown preset '%s', valid presets are '%s'" % # <<<<<<<<<<<<<<
jpayne@68 19728 * (preset, ",".join(preset2conf.keys())))
jpayne@68 19729 * else:
jpayne@68 19730 */
jpayne@68 19731 __pyx_t_3 = PyTuple_New(5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 971, __pyx_L16_except_error)
jpayne@68 19732 __Pyx_GOTREF(__pyx_t_3);
jpayne@68 19733 __pyx_t_5 = 0;
jpayne@68 19734 __pyx_t_6 = 127;
jpayne@68 19735 __Pyx_INCREF(__pyx_kp_u_unknown_preset);
jpayne@68 19736 __pyx_t_5 += 16;
jpayne@68 19737 __Pyx_GIVEREF(__pyx_kp_u_unknown_preset);
jpayne@68 19738 PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_kp_u_unknown_preset);
jpayne@68 19739
jpayne@68 19740 /* "pysam/libctabix.pyx":972
jpayne@68 19741 * raise KeyError(
jpayne@68 19742 * "unknown preset '%s', valid presets are '%s'" %
jpayne@68 19743 * (preset, ",".join(preset2conf.keys()))) # <<<<<<<<<<<<<<
jpayne@68 19744 * else:
jpayne@68 19745 * if end_col is None:
jpayne@68 19746 */
jpayne@68 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@68 19748 __Pyx_GOTREF(__pyx_t_15);
jpayne@68 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@68 19750 __pyx_t_5 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_15);
jpayne@68 19751 __Pyx_GIVEREF(__pyx_t_15);
jpayne@68 19752 PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_15);
jpayne@68 19753 __pyx_t_15 = 0;
jpayne@68 19754 __Pyx_INCREF(__pyx_kp_u_valid_presets_are);
jpayne@68 19755 __pyx_t_5 += 22;
jpayne@68 19756 __Pyx_GIVEREF(__pyx_kp_u_valid_presets_are);
jpayne@68 19757 PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_kp_u_valid_presets_are);
jpayne@68 19758 __pyx_t_15 = __Pyx_PyDict_Keys(__pyx_v_preset2conf); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 972, __pyx_L16_except_error)
jpayne@68 19759 __Pyx_GOTREF(__pyx_t_15);
jpayne@68 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@68 19761 __Pyx_GOTREF(__pyx_t_16);
jpayne@68 19762 __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
jpayne@68 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@68 19764 __pyx_t_5 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_16);
jpayne@68 19765 __Pyx_GIVEREF(__pyx_t_16);
jpayne@68 19766 PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_t_16);
jpayne@68 19767 __pyx_t_16 = 0;
jpayne@68 19768 __Pyx_INCREF(__pyx_kp_u__44);
jpayne@68 19769 __pyx_t_5 += 1;
jpayne@68 19770 __Pyx_GIVEREF(__pyx_kp_u__44);
jpayne@68 19771 PyTuple_SET_ITEM(__pyx_t_3, 4, __pyx_kp_u__44);
jpayne@68 19772
jpayne@68 19773 /* "pysam/libctabix.pyx":971
jpayne@68 19774 * except KeyError:
jpayne@68 19775 * raise KeyError(
jpayne@68 19776 * "unknown preset '%s', valid presets are '%s'" % # <<<<<<<<<<<<<<
jpayne@68 19777 * (preset, ",".join(preset2conf.keys())))
jpayne@68 19778 * else:
jpayne@68 19779 */
jpayne@68 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@68 19781 __Pyx_GOTREF(__pyx_t_16);
jpayne@68 19782 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
jpayne@68 19783
jpayne@68 19784 /* "pysam/libctabix.pyx":970
jpayne@68 19785 * conf_data = preset2conf[preset]
jpayne@68 19786 * except KeyError:
jpayne@68 19787 * raise KeyError( # <<<<<<<<<<<<<<
jpayne@68 19788 * "unknown preset '%s', valid presets are '%s'" %
jpayne@68 19789 * (preset, ",".join(preset2conf.keys())))
jpayne@68 19790 */
jpayne@68 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@68 19792 __Pyx_GOTREF(__pyx_t_3);
jpayne@68 19793 __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
jpayne@68 19794 __Pyx_Raise(__pyx_t_3, 0, 0, 0);
jpayne@68 19795 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
jpayne@68 19796 __PYX_ERR(0, 970, __pyx_L16_except_error)
jpayne@68 19797 }
jpayne@68 19798 goto __pyx_L16_except_error;
jpayne@68 19799
jpayne@68 19800 /* "pysam/libctabix.pyx":967
jpayne@68 19801 * csi = True
jpayne@68 19802 * elif preset:
jpayne@68 19803 * try: # <<<<<<<<<<<<<<
jpayne@68 19804 * conf_data = preset2conf[preset]
jpayne@68 19805 * except KeyError:
jpayne@68 19806 */
jpayne@68 19807 __pyx_L16_except_error:;
jpayne@68 19808 __Pyx_XGIVEREF(__pyx_t_11);
jpayne@68 19809 __Pyx_XGIVEREF(__pyx_t_12);
jpayne@68 19810 __Pyx_XGIVEREF(__pyx_t_13);
jpayne@68 19811 __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_12, __pyx_t_13);
jpayne@68 19812 goto __pyx_L1_error;
jpayne@68 19813 __pyx_L19_try_end:;
jpayne@68 19814 }
jpayne@68 19815
jpayne@68 19816 /* "pysam/libctabix.pyx":966
jpayne@68 19817 * if preset == "bcf" or fmt.format == bcf:
jpayne@68 19818 * csi = True
jpayne@68 19819 * elif preset: # <<<<<<<<<<<<<<
jpayne@68 19820 * try:
jpayne@68 19821 * conf_data = preset2conf[preset]
jpayne@68 19822 */
jpayne@68 19823 goto __pyx_L11;
jpayne@68 19824 }
jpayne@68 19825
jpayne@68 19826 /* "pysam/libctabix.pyx":974
jpayne@68 19827 * (preset, ",".join(preset2conf.keys())))
jpayne@68 19828 * else:
jpayne@68 19829 * if end_col is None: # <<<<<<<<<<<<<<
jpayne@68 19830 * end_col = -1
jpayne@68 19831 *
jpayne@68 19832 */
jpayne@68 19833 /*else*/ {
jpayne@68 19834 __pyx_t_2 = (__pyx_v_end_col == Py_None);
jpayne@68 19835 if (__pyx_t_2) {
jpayne@68 19836
jpayne@68 19837 /* "pysam/libctabix.pyx":975
jpayne@68 19838 * else:
jpayne@68 19839 * if end_col is None:
jpayne@68 19840 * end_col = -1 # <<<<<<<<<<<<<<
jpayne@68 19841 *
jpayne@68 19842 * preset = 0
jpayne@68 19843 */
jpayne@68 19844 __Pyx_INCREF(__pyx_int_neg_1);
jpayne@68 19845 __Pyx_DECREF_SET(__pyx_v_end_col, __pyx_int_neg_1);
jpayne@68 19846
jpayne@68 19847 /* "pysam/libctabix.pyx":974
jpayne@68 19848 * (preset, ",".join(preset2conf.keys())))
jpayne@68 19849 * else:
jpayne@68 19850 * if end_col is None: # <<<<<<<<<<<<<<
jpayne@68 19851 * end_col = -1
jpayne@68 19852 *
jpayne@68 19853 */
jpayne@68 19854 }
jpayne@68 19855
jpayne@68 19856 /* "pysam/libctabix.pyx":977
jpayne@68 19857 * end_col = -1
jpayne@68 19858 *
jpayne@68 19859 * preset = 0 # <<<<<<<<<<<<<<
jpayne@68 19860 * # tabix internally works with 0-based coordinates and
jpayne@68 19861 * # open/closed intervals. When using a preset, conversion is
jpayne@68 19862 */
jpayne@68 19863 __Pyx_INCREF(__pyx_int_0);
jpayne@68 19864 __Pyx_DECREF_SET(__pyx_v_preset, __pyx_int_0);
jpayne@68 19865
jpayne@68 19866 /* "pysam/libctabix.pyx":984
jpayne@68 19867 * # from the start coordinate. To avoid doing this, set the
jpayne@68 19868 * # TI_FLAG_UCSC=0x10000 flag:
jpayne@68 19869 * if zerobased: # <<<<<<<<<<<<<<
jpayne@68 19870 * preset = preset | TBX_UCSC
jpayne@68 19871 *
jpayne@68 19872 */
jpayne@68 19873 __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_zerobased); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 984, __pyx_L1_error)
jpayne@68 19874 if (__pyx_t_2) {
jpayne@68 19875
jpayne@68 19876 /* "pysam/libctabix.pyx":985
jpayne@68 19877 * # TI_FLAG_UCSC=0x10000 flag:
jpayne@68 19878 * if zerobased:
jpayne@68 19879 * preset = preset | TBX_UCSC # <<<<<<<<<<<<<<
jpayne@68 19880 *
jpayne@68 19881 * conf_data = (preset, seq_col + 1, start_col + 1, end_col + 1, ord(meta_char), line_skip)
jpayne@68 19882 */
jpayne@68 19883 __pyx_t_8 = __Pyx_PyInt_From_int32_t(TBX_UCSC); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 985, __pyx_L1_error)
jpayne@68 19884 __Pyx_GOTREF(__pyx_t_8);
jpayne@68 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@68 19886 __Pyx_GOTREF(__pyx_t_7);
jpayne@68 19887 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
jpayne@68 19888 __Pyx_DECREF_SET(__pyx_v_preset, __pyx_t_7);
jpayne@68 19889 __pyx_t_7 = 0;
jpayne@68 19890
jpayne@68 19891 /* "pysam/libctabix.pyx":984
jpayne@68 19892 * # from the start coordinate. To avoid doing this, set the
jpayne@68 19893 * # TI_FLAG_UCSC=0x10000 flag:
jpayne@68 19894 * if zerobased: # <<<<<<<<<<<<<<
jpayne@68 19895 * preset = preset | TBX_UCSC
jpayne@68 19896 *
jpayne@68 19897 */
jpayne@68 19898 }
jpayne@68 19899
jpayne@68 19900 /* "pysam/libctabix.pyx":987
jpayne@68 19901 * preset = preset | TBX_UCSC
jpayne@68 19902 *
jpayne@68 19903 * conf_data = (preset, seq_col + 1, start_col + 1, end_col + 1, ord(meta_char), line_skip) # <<<<<<<<<<<<<<
jpayne@68 19904 *
jpayne@68 19905 * cdef tbx_conf_t conf
jpayne@68 19906 */
jpayne@68 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@68 19908 __Pyx_GOTREF(__pyx_t_7);
jpayne@68 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@68 19910 __Pyx_GOTREF(__pyx_t_8);
jpayne@68 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@68 19912 __Pyx_GOTREF(__pyx_t_9);
jpayne@68 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@68 19914 __pyx_t_3 = __Pyx_PyInt_From_long(__pyx_t_17); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 987, __pyx_L1_error)
jpayne@68 19915 __Pyx_GOTREF(__pyx_t_3);
jpayne@68 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@68 19917 __Pyx_GOTREF(__pyx_t_16);
jpayne@68 19918 __pyx_t_15 = PyTuple_New(6); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 987, __pyx_L1_error)
jpayne@68 19919 __Pyx_GOTREF(__pyx_t_15);
jpayne@68 19920 __Pyx_INCREF(__pyx_v_preset);
jpayne@68 19921 __Pyx_GIVEREF(__pyx_v_preset);
jpayne@68 19922 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_15, 0, __pyx_v_preset)) __PYX_ERR(0, 987, __pyx_L1_error);
jpayne@68 19923 __Pyx_GIVEREF(__pyx_t_7);
jpayne@68 19924 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_15, 1, __pyx_t_7)) __PYX_ERR(0, 987, __pyx_L1_error);
jpayne@68 19925 __Pyx_GIVEREF(__pyx_t_8);
jpayne@68 19926 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_15, 2, __pyx_t_8)) __PYX_ERR(0, 987, __pyx_L1_error);
jpayne@68 19927 __Pyx_GIVEREF(__pyx_t_9);
jpayne@68 19928 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_15, 3, __pyx_t_9)) __PYX_ERR(0, 987, __pyx_L1_error);
jpayne@68 19929 __Pyx_GIVEREF(__pyx_t_3);
jpayne@68 19930 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_15, 4, __pyx_t_3)) __PYX_ERR(0, 987, __pyx_L1_error);
jpayne@68 19931 __Pyx_GIVEREF(__pyx_t_16);
jpayne@68 19932 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_15, 5, __pyx_t_16)) __PYX_ERR(0, 987, __pyx_L1_error);
jpayne@68 19933 __pyx_t_7 = 0;
jpayne@68 19934 __pyx_t_8 = 0;
jpayne@68 19935 __pyx_t_9 = 0;
jpayne@68 19936 __pyx_t_3 = 0;
jpayne@68 19937 __pyx_t_16 = 0;
jpayne@68 19938 __Pyx_DECREF_SET(__pyx_v_conf_data, __pyx_t_15);
jpayne@68 19939 __pyx_t_15 = 0;
jpayne@68 19940 }
jpayne@68 19941 __pyx_L11:;
jpayne@68 19942
jpayne@68 19943 /* "pysam/libctabix.pyx":990
jpayne@68 19944 *
jpayne@68 19945 * cdef tbx_conf_t conf
jpayne@68 19946 * if conf_data: # <<<<<<<<<<<<<<
jpayne@68 19947 * conf.preset, conf.sc, conf.bc, conf.ec, conf.meta_char, conf.line_skip = conf_data
jpayne@68 19948 *
jpayne@68 19949 */
jpayne@68 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@68 19951 if (__pyx_t_2) {
jpayne@68 19952
jpayne@68 19953 /* "pysam/libctabix.pyx":991
jpayne@68 19954 * cdef tbx_conf_t conf
jpayne@68 19955 * if conf_data:
jpayne@68 19956 * conf.preset, conf.sc, conf.bc, conf.ec, conf.meta_char, conf.line_skip = conf_data # <<<<<<<<<<<<<<
jpayne@68 19957 *
jpayne@68 19958 * if csi or min_shift > 0:
jpayne@68 19959 */
jpayne@68 19960 if ((likely(PyTuple_CheckExact(__pyx_v_conf_data))) || (PyList_CheckExact(__pyx_v_conf_data))) {
jpayne@68 19961 PyObject* sequence = __pyx_v_conf_data;
jpayne@68 19962 Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
jpayne@68 19963 if (unlikely(size != 6)) {
jpayne@68 19964 if (size > 6) __Pyx_RaiseTooManyValuesError(6);
jpayne@68 19965 else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
jpayne@68 19966 __PYX_ERR(0, 991, __pyx_L1_error)
jpayne@68 19967 }
jpayne@68 19968 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
jpayne@68 19969 if (likely(PyTuple_CheckExact(sequence))) {
jpayne@68 19970 __pyx_t_15 = PyTuple_GET_ITEM(sequence, 0);
jpayne@68 19971 __pyx_t_16 = PyTuple_GET_ITEM(sequence, 1);
jpayne@68 19972 __pyx_t_3 = PyTuple_GET_ITEM(sequence, 2);
jpayne@68 19973 __pyx_t_9 = PyTuple_GET_ITEM(sequence, 3);
jpayne@68 19974 __pyx_t_8 = PyTuple_GET_ITEM(sequence, 4);
jpayne@68 19975 __pyx_t_7 = PyTuple_GET_ITEM(sequence, 5);
jpayne@68 19976 } else {
jpayne@68 19977 __pyx_t_15 = PyList_GET_ITEM(sequence, 0);
jpayne@68 19978 __pyx_t_16 = PyList_GET_ITEM(sequence, 1);
jpayne@68 19979 __pyx_t_3 = PyList_GET_ITEM(sequence, 2);
jpayne@68 19980 __pyx_t_9 = PyList_GET_ITEM(sequence, 3);
jpayne@68 19981 __pyx_t_8 = PyList_GET_ITEM(sequence, 4);
jpayne@68 19982 __pyx_t_7 = PyList_GET_ITEM(sequence, 5);
jpayne@68 19983 }
jpayne@68 19984 __Pyx_INCREF(__pyx_t_15);
jpayne@68 19985 __Pyx_INCREF(__pyx_t_16);
jpayne@68 19986 __Pyx_INCREF(__pyx_t_3);
jpayne@68 19987 __Pyx_INCREF(__pyx_t_9);
jpayne@68 19988 __Pyx_INCREF(__pyx_t_8);
jpayne@68 19989 __Pyx_INCREF(__pyx_t_7);
jpayne@68 19990 #else
jpayne@68 19991 {
jpayne@68 19992 Py_ssize_t i;
jpayne@68 19993 PyObject** temps[6] = {&__pyx_t_15,&__pyx_t_16,&__pyx_t_3,&__pyx_t_9,&__pyx_t_8,&__pyx_t_7};
jpayne@68 19994 for (i=0; i < 6; i++) {
jpayne@68 19995 PyObject* item = PySequence_ITEM(sequence, i); if (unlikely(!item)) __PYX_ERR(0, 991, __pyx_L1_error)
jpayne@68 19996 __Pyx_GOTREF(item);
jpayne@68 19997 *(temps[i]) = item;
jpayne@68 19998 }
jpayne@68 19999 }
jpayne@68 20000 #endif
jpayne@68 20001 } else {
jpayne@68 20002 Py_ssize_t index = -1;
jpayne@68 20003 PyObject** temps[6] = {&__pyx_t_15,&__pyx_t_16,&__pyx_t_3,&__pyx_t_9,&__pyx_t_8,&__pyx_t_7};
jpayne@68 20004 __pyx_t_18 = PyObject_GetIter(__pyx_v_conf_data); if (unlikely(!__pyx_t_18)) __PYX_ERR(0, 991, __pyx_L1_error)
jpayne@68 20005 __Pyx_GOTREF(__pyx_t_18);
jpayne@68 20006 __pyx_t_19 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_18);
jpayne@68 20007 for (index=0; index < 6; index++) {
jpayne@68 20008 PyObject* item = __pyx_t_19(__pyx_t_18); if (unlikely(!item)) goto __pyx_L25_unpacking_failed;
jpayne@68 20009 __Pyx_GOTREF(item);
jpayne@68 20010 *(temps[index]) = item;
jpayne@68 20011 }
jpayne@68 20012 if (__Pyx_IternextUnpackEndCheck(__pyx_t_19(__pyx_t_18), 6) < 0) __PYX_ERR(0, 991, __pyx_L1_error)
jpayne@68 20013 __pyx_t_19 = NULL;
jpayne@68 20014 __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
jpayne@68 20015 goto __pyx_L26_unpacking_done;
jpayne@68 20016 __pyx_L25_unpacking_failed:;
jpayne@68 20017 __Pyx_DECREF(__pyx_t_18); __pyx_t_18 = 0;
jpayne@68 20018 __pyx_t_19 = NULL;
jpayne@68 20019 if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
jpayne@68 20020 __PYX_ERR(0, 991, __pyx_L1_error)
jpayne@68 20021 __pyx_L26_unpacking_done:;
jpayne@68 20022 }
jpayne@68 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@68 20024 __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
jpayne@68 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@68 20026 __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
jpayne@68 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@68 20028 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
jpayne@68 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@68 20030 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
jpayne@68 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@68 20032 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
jpayne@68 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@68 20034 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
jpayne@68 20035 __pyx_v_conf.preset = __pyx_t_20;
jpayne@68 20036 __pyx_v_conf.sc = __pyx_t_21;
jpayne@68 20037 __pyx_v_conf.bc = __pyx_t_22;
jpayne@68 20038 __pyx_v_conf.ec = __pyx_t_23;
jpayne@68 20039 __pyx_v_conf.meta_char = __pyx_t_24;
jpayne@68 20040 __pyx_v_conf.line_skip = __pyx_t_25;
jpayne@68 20041
jpayne@68 20042 /* "pysam/libctabix.pyx":990
jpayne@68 20043 *
jpayne@68 20044 * cdef tbx_conf_t conf
jpayne@68 20045 * if conf_data: # <<<<<<<<<<<<<<
jpayne@68 20046 * conf.preset, conf.sc, conf.bc, conf.ec, conf.meta_char, conf.line_skip = conf_data
jpayne@68 20047 *
jpayne@68 20048 */
jpayne@68 20049 }
jpayne@68 20050
jpayne@68 20051 /* "pysam/libctabix.pyx":993
jpayne@68 20052 * conf.preset, conf.sc, conf.bc, conf.ec, conf.meta_char, conf.line_skip = conf_data
jpayne@68 20053 *
jpayne@68 20054 * if csi or min_shift > 0: # <<<<<<<<<<<<<<
jpayne@68 20055 * suffix = ".csi"
jpayne@68 20056 * if min_shift <= 0: min_shift = 14
jpayne@68 20057 */
jpayne@68 20058 __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_csi); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 993, __pyx_L1_error)
jpayne@68 20059 if (!__pyx_t_1) {
jpayne@68 20060 } else {
jpayne@68 20061 __pyx_t_2 = __pyx_t_1;
jpayne@68 20062 goto __pyx_L28_bool_binop_done;
jpayne@68 20063 }
jpayne@68 20064 __pyx_t_1 = (__pyx_v_min_shift > 0);
jpayne@68 20065 __pyx_t_2 = __pyx_t_1;
jpayne@68 20066 __pyx_L28_bool_binop_done:;
jpayne@68 20067 if (__pyx_t_2) {
jpayne@68 20068
jpayne@68 20069 /* "pysam/libctabix.pyx":994
jpayne@68 20070 *
jpayne@68 20071 * if csi or min_shift > 0:
jpayne@68 20072 * suffix = ".csi" # <<<<<<<<<<<<<<
jpayne@68 20073 * if min_shift <= 0: min_shift = 14
jpayne@68 20074 * else:
jpayne@68 20075 */
jpayne@68 20076 __Pyx_INCREF(__pyx_kp_u_csi_2);
jpayne@68 20077 __pyx_v_suffix = __pyx_kp_u_csi_2;
jpayne@68 20078
jpayne@68 20079 /* "pysam/libctabix.pyx":995
jpayne@68 20080 * if csi or min_shift > 0:
jpayne@68 20081 * suffix = ".csi"
jpayne@68 20082 * if min_shift <= 0: min_shift = 14 # <<<<<<<<<<<<<<
jpayne@68 20083 * else:
jpayne@68 20084 * suffix = ".tbi"
jpayne@68 20085 */
jpayne@68 20086 __pyx_t_2 = (__pyx_v_min_shift <= 0);
jpayne@68 20087 if (__pyx_t_2) {
jpayne@68 20088 __pyx_v_min_shift = 14;
jpayne@68 20089 }
jpayne@68 20090
jpayne@68 20091 /* "pysam/libctabix.pyx":993
jpayne@68 20092 * conf.preset, conf.sc, conf.bc, conf.ec, conf.meta_char, conf.line_skip = conf_data
jpayne@68 20093 *
jpayne@68 20094 * if csi or min_shift > 0: # <<<<<<<<<<<<<<
jpayne@68 20095 * suffix = ".csi"
jpayne@68 20096 * if min_shift <= 0: min_shift = 14
jpayne@68 20097 */
jpayne@68 20098 goto __pyx_L27;
jpayne@68 20099 }
jpayne@68 20100
jpayne@68 20101 /* "pysam/libctabix.pyx":997
jpayne@68 20102 * if min_shift <= 0: min_shift = 14
jpayne@68 20103 * else:
jpayne@68 20104 * suffix = ".tbi" # <<<<<<<<<<<<<<
jpayne@68 20105 * min_shift = 0
jpayne@68 20106 *
jpayne@68 20107 */
jpayne@68 20108 /*else*/ {
jpayne@68 20109 __Pyx_INCREF(__pyx_kp_u_tbi);
jpayne@68 20110 __pyx_v_suffix = __pyx_kp_u_tbi;
jpayne@68 20111
jpayne@68 20112 /* "pysam/libctabix.pyx":998
jpayne@68 20113 * else:
jpayne@68 20114 * suffix = ".tbi"
jpayne@68 20115 * min_shift = 0 # <<<<<<<<<<<<<<
jpayne@68 20116 *
jpayne@68 20117 * index = index or filename + suffix
jpayne@68 20118 */
jpayne@68 20119 __pyx_v_min_shift = 0;
jpayne@68 20120 }
jpayne@68 20121 __pyx_L27:;
jpayne@68 20122
jpayne@68 20123 /* "pysam/libctabix.pyx":1000
jpayne@68 20124 * min_shift = 0
jpayne@68 20125 *
jpayne@68 20126 * index = index or filename + suffix # <<<<<<<<<<<<<<
jpayne@68 20127 * fn_index = encode_filename(index)
jpayne@68 20128 *
jpayne@68 20129 */
jpayne@68 20130 __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_v_index); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 1000, __pyx_L1_error)
jpayne@68 20131 if (!__pyx_t_2) {
jpayne@68 20132 } else {
jpayne@68 20133 __Pyx_INCREF(__pyx_v_index);
jpayne@68 20134 __pyx_t_7 = __pyx_v_index;
jpayne@68 20135 goto __pyx_L31_bool_binop_done;
jpayne@68 20136 }
jpayne@68 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@68 20138 __Pyx_GOTREF(__pyx_t_8);
jpayne@68 20139 __Pyx_INCREF(__pyx_t_8);
jpayne@68 20140 __pyx_t_7 = __pyx_t_8;
jpayne@68 20141 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
jpayne@68 20142 __pyx_L31_bool_binop_done:;
jpayne@68 20143 __Pyx_DECREF_SET(__pyx_v_index, __pyx_t_7);
jpayne@68 20144 __pyx_t_7 = 0;
jpayne@68 20145
jpayne@68 20146 /* "pysam/libctabix.pyx":1001
jpayne@68 20147 *
jpayne@68 20148 * index = index or filename + suffix
jpayne@68 20149 * fn_index = encode_filename(index) # <<<<<<<<<<<<<<
jpayne@68 20150 *
jpayne@68 20151 * if not force and os.path.exists(index):
jpayne@68 20152 */
jpayne@68 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@68 20154 __Pyx_GOTREF(__pyx_t_7);
jpayne@68 20155 __pyx_v_fn_index = ((PyObject*)__pyx_t_7);
jpayne@68 20156 __pyx_t_7 = 0;
jpayne@68 20157
jpayne@68 20158 /* "pysam/libctabix.pyx":1003
jpayne@68 20159 * fn_index = encode_filename(index)
jpayne@68 20160 *
jpayne@68 20161 * if not force and os.path.exists(index): # <<<<<<<<<<<<<<
jpayne@68 20162 * raise IOError(
jpayne@68 20163 * "filename '%s' already exists, use *force* to overwrite" % index)
jpayne@68 20164 */
jpayne@68 20165 __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_force); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 1003, __pyx_L1_error)
jpayne@68 20166 __pyx_t_26 = (!__pyx_t_1);
jpayne@68 20167 if (__pyx_t_26) {
jpayne@68 20168 } else {
jpayne@68 20169 __pyx_t_2 = __pyx_t_26;
jpayne@68 20170 goto __pyx_L34_bool_binop_done;
jpayne@68 20171 }
jpayne@68 20172 __Pyx_GetModuleGlobalName(__pyx_t_8, __pyx_n_s_os); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1003, __pyx_L1_error)
jpayne@68 20173 __Pyx_GOTREF(__pyx_t_8);
jpayne@68 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@68 20175 __Pyx_GOTREF(__pyx_t_9);
jpayne@68 20176 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
jpayne@68 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@68 20178 __Pyx_GOTREF(__pyx_t_8);
jpayne@68 20179 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
jpayne@68 20180 __pyx_t_9 = NULL;
jpayne@68 20181 __pyx_t_10 = 0;
jpayne@68 20182 #if CYTHON_UNPACK_METHODS
jpayne@68 20183 if (likely(PyMethod_Check(__pyx_t_8))) {
jpayne@68 20184 __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
jpayne@68 20185 if (likely(__pyx_t_9)) {
jpayne@68 20186 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
jpayne@68 20187 __Pyx_INCREF(__pyx_t_9);
jpayne@68 20188 __Pyx_INCREF(function);
jpayne@68 20189 __Pyx_DECREF_SET(__pyx_t_8, function);
jpayne@68 20190 __pyx_t_10 = 1;
jpayne@68 20191 }
jpayne@68 20192 }
jpayne@68 20193 #endif
jpayne@68 20194 {
jpayne@68 20195 PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_v_index};
jpayne@68 20196 __pyx_t_7 = __Pyx_PyObject_FastCall(__pyx_t_8, __pyx_callargs+1-__pyx_t_10, 1+__pyx_t_10);
jpayne@68 20197 __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
jpayne@68 20198 if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 1003, __pyx_L1_error)
jpayne@68 20199 __Pyx_GOTREF(__pyx_t_7);
jpayne@68 20200 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
jpayne@68 20201 }
jpayne@68 20202 __pyx_t_26 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely((__pyx_t_26 < 0))) __PYX_ERR(0, 1003, __pyx_L1_error)
jpayne@68 20203 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
jpayne@68 20204 __pyx_t_2 = __pyx_t_26;
jpayne@68 20205 __pyx_L34_bool_binop_done:;
jpayne@68 20206 if (unlikely(__pyx_t_2)) {
jpayne@68 20207
jpayne@68 20208 /* "pysam/libctabix.pyx":1005
jpayne@68 20209 * if not force and os.path.exists(index):
jpayne@68 20210 * raise IOError(
jpayne@68 20211 * "filename '%s' already exists, use *force* to overwrite" % index) # <<<<<<<<<<<<<<
jpayne@68 20212 *
jpayne@68 20213 * cdef char *fnidx = fn_index
jpayne@68 20214 */
jpayne@68 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@68 20216 __Pyx_GOTREF(__pyx_t_7);
jpayne@68 20217
jpayne@68 20218 /* "pysam/libctabix.pyx":1004
jpayne@68 20219 *
jpayne@68 20220 * if not force and os.path.exists(index):
jpayne@68 20221 * raise IOError( # <<<<<<<<<<<<<<
jpayne@68 20222 * "filename '%s' already exists, use *force* to overwrite" % index)
jpayne@68 20223 *
jpayne@68 20224 */
jpayne@68 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@68 20226 __Pyx_GOTREF(__pyx_t_8);
jpayne@68 20227 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
jpayne@68 20228 __Pyx_Raise(__pyx_t_8, 0, 0, 0);
jpayne@68 20229 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
jpayne@68 20230 __PYX_ERR(0, 1004, __pyx_L1_error)
jpayne@68 20231
jpayne@68 20232 /* "pysam/libctabix.pyx":1003
jpayne@68 20233 * fn_index = encode_filename(index)
jpayne@68 20234 *
jpayne@68 20235 * if not force and os.path.exists(index): # <<<<<<<<<<<<<<
jpayne@68 20236 * raise IOError(
jpayne@68 20237 * "filename '%s' already exists, use *force* to overwrite" % index)
jpayne@68 20238 */
jpayne@68 20239 }
jpayne@68 20240
jpayne@68 20241 /* "pysam/libctabix.pyx":1007
jpayne@68 20242 * "filename '%s' already exists, use *force* to overwrite" % index)
jpayne@68 20243 *
jpayne@68 20244 * cdef char *fnidx = fn_index # <<<<<<<<<<<<<<
jpayne@68 20245 * cdef int retval = 0
jpayne@68 20246 *
jpayne@68 20247 */
jpayne@68 20248 if (unlikely(__pyx_v_fn_index == Py_None)) {
jpayne@68 20249 PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
jpayne@68 20250 __PYX_ERR(0, 1007, __pyx_L1_error)
jpayne@68 20251 }
jpayne@68 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@68 20253 __pyx_v_fnidx = __pyx_t_4;
jpayne@68 20254
jpayne@68 20255 /* "pysam/libctabix.pyx":1008
jpayne@68 20256 *
jpayne@68 20257 * cdef char *fnidx = fn_index
jpayne@68 20258 * cdef int retval = 0 # <<<<<<<<<<<<<<
jpayne@68 20259 *
jpayne@68 20260 * if csi and fmt.format == bcf:
jpayne@68 20261 */
jpayne@68 20262 __pyx_v_retval = 0;
jpayne@68 20263
jpayne@68 20264 /* "pysam/libctabix.pyx":1010
jpayne@68 20265 * cdef int retval = 0
jpayne@68 20266 *
jpayne@68 20267 * if csi and fmt.format == bcf: # <<<<<<<<<<<<<<
jpayne@68 20268 * with nogil:
jpayne@68 20269 * retval = bcf_index_build2(cfn, fnidx, min_shift)
jpayne@68 20270 */
jpayne@68 20271 __pyx_t_26 = __Pyx_PyObject_IsTrue(__pyx_v_csi); if (unlikely((__pyx_t_26 < 0))) __PYX_ERR(0, 1010, __pyx_L1_error)
jpayne@68 20272 if (__pyx_t_26) {
jpayne@68 20273 } else {
jpayne@68 20274 __pyx_t_2 = __pyx_t_26;
jpayne@68 20275 goto __pyx_L37_bool_binop_done;
jpayne@68 20276 }
jpayne@68 20277 __pyx_t_26 = (__pyx_v_fmt.format == bcf);
jpayne@68 20278 __pyx_t_2 = __pyx_t_26;
jpayne@68 20279 __pyx_L37_bool_binop_done:;
jpayne@68 20280 if (__pyx_t_2) {
jpayne@68 20281
jpayne@68 20282 /* "pysam/libctabix.pyx":1011
jpayne@68 20283 *
jpayne@68 20284 * if csi and fmt.format == bcf:
jpayne@68 20285 * with nogil: # <<<<<<<<<<<<<<
jpayne@68 20286 * retval = bcf_index_build2(cfn, fnidx, min_shift)
jpayne@68 20287 * else:
jpayne@68 20288 */
jpayne@68 20289 {
jpayne@68 20290 #ifdef WITH_THREAD
jpayne@68 20291 PyThreadState *_save;
jpayne@68 20292 _save = NULL;
jpayne@68 20293 Py_UNBLOCK_THREADS
jpayne@68 20294 __Pyx_FastGIL_Remember();
jpayne@68 20295 #endif
jpayne@68 20296 /*try:*/ {
jpayne@68 20297
jpayne@68 20298 /* "pysam/libctabix.pyx":1012
jpayne@68 20299 * if csi and fmt.format == bcf:
jpayne@68 20300 * with nogil:
jpayne@68 20301 * retval = bcf_index_build2(cfn, fnidx, min_shift) # <<<<<<<<<<<<<<
jpayne@68 20302 * else:
jpayne@68 20303 * with nogil:
jpayne@68 20304 */
jpayne@68 20305 __pyx_v_retval = bcf_index_build2(__pyx_v_cfn, __pyx_v_fnidx, __pyx_v_min_shift);
jpayne@68 20306 }
jpayne@68 20307
jpayne@68 20308 /* "pysam/libctabix.pyx":1011
jpayne@68 20309 *
jpayne@68 20310 * if csi and fmt.format == bcf:
jpayne@68 20311 * with nogil: # <<<<<<<<<<<<<<
jpayne@68 20312 * retval = bcf_index_build2(cfn, fnidx, min_shift)
jpayne@68 20313 * else:
jpayne@68 20314 */
jpayne@68 20315 /*finally:*/ {
jpayne@68 20316 /*normal exit:*/{
jpayne@68 20317 #ifdef WITH_THREAD
jpayne@68 20318 __Pyx_FastGIL_Forget();
jpayne@68 20319 Py_BLOCK_THREADS
jpayne@68 20320 #endif
jpayne@68 20321 goto __pyx_L41;
jpayne@68 20322 }
jpayne@68 20323 __pyx_L41:;
jpayne@68 20324 }
jpayne@68 20325 }
jpayne@68 20326
jpayne@68 20327 /* "pysam/libctabix.pyx":1010
jpayne@68 20328 * cdef int retval = 0
jpayne@68 20329 *
jpayne@68 20330 * if csi and fmt.format == bcf: # <<<<<<<<<<<<<<
jpayne@68 20331 * with nogil:
jpayne@68 20332 * retval = bcf_index_build2(cfn, fnidx, min_shift)
jpayne@68 20333 */
jpayne@68 20334 goto __pyx_L36;
jpayne@68 20335 }
jpayne@68 20336
jpayne@68 20337 /* "pysam/libctabix.pyx":1014
jpayne@68 20338 * retval = bcf_index_build2(cfn, fnidx, min_shift)
jpayne@68 20339 * else:
jpayne@68 20340 * with nogil: # <<<<<<<<<<<<<<
jpayne@68 20341 * retval = tbx_index_build2(cfn, fnidx, min_shift, &conf)
jpayne@68 20342 *
jpayne@68 20343 */
jpayne@68 20344 /*else*/ {
jpayne@68 20345 {
jpayne@68 20346 #ifdef WITH_THREAD
jpayne@68 20347 PyThreadState *_save;
jpayne@68 20348 _save = NULL;
jpayne@68 20349 Py_UNBLOCK_THREADS
jpayne@68 20350 __Pyx_FastGIL_Remember();
jpayne@68 20351 #endif
jpayne@68 20352 /*try:*/ {
jpayne@68 20353
jpayne@68 20354 /* "pysam/libctabix.pyx":1015
jpayne@68 20355 * else:
jpayne@68 20356 * with nogil:
jpayne@68 20357 * retval = tbx_index_build2(cfn, fnidx, min_shift, &conf) # <<<<<<<<<<<<<<
jpayne@68 20358 *
jpayne@68 20359 * if retval != 0:
jpayne@68 20360 */
jpayne@68 20361 __pyx_v_retval = tbx_index_build2(__pyx_v_cfn, __pyx_v_fnidx, __pyx_v_min_shift, (&__pyx_v_conf));
jpayne@68 20362 }
jpayne@68 20363
jpayne@68 20364 /* "pysam/libctabix.pyx":1014
jpayne@68 20365 * retval = bcf_index_build2(cfn, fnidx, min_shift)
jpayne@68 20366 * else:
jpayne@68 20367 * with nogil: # <<<<<<<<<<<<<<
jpayne@68 20368 * retval = tbx_index_build2(cfn, fnidx, min_shift, &conf)
jpayne@68 20369 *
jpayne@68 20370 */
jpayne@68 20371 /*finally:*/ {
jpayne@68 20372 /*normal exit:*/{
jpayne@68 20373 #ifdef WITH_THREAD
jpayne@68 20374 __Pyx_FastGIL_Forget();
jpayne@68 20375 Py_BLOCK_THREADS
jpayne@68 20376 #endif
jpayne@68 20377 goto __pyx_L44;
jpayne@68 20378 }
jpayne@68 20379 __pyx_L44:;
jpayne@68 20380 }
jpayne@68 20381 }
jpayne@68 20382 }
jpayne@68 20383 __pyx_L36:;
jpayne@68 20384
jpayne@68 20385 /* "pysam/libctabix.pyx":1017
jpayne@68 20386 * retval = tbx_index_build2(cfn, fnidx, min_shift, &conf)
jpayne@68 20387 *
jpayne@68 20388 * if retval != 0: # <<<<<<<<<<<<<<
jpayne@68 20389 * raise OSError("building of index for {} failed".format(filename))
jpayne@68 20390 *
jpayne@68 20391 */
jpayne@68 20392 __pyx_t_2 = (__pyx_v_retval != 0);
jpayne@68 20393 if (unlikely(__pyx_t_2)) {
jpayne@68 20394
jpayne@68 20395 /* "pysam/libctabix.pyx":1018
jpayne@68 20396 *
jpayne@68 20397 * if retval != 0:
jpayne@68 20398 * raise OSError("building of index for {} failed".format(filename)) # <<<<<<<<<<<<<<
jpayne@68 20399 *
jpayne@68 20400 * return filename
jpayne@68 20401 */
jpayne@68 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@68 20403 __Pyx_GOTREF(__pyx_t_7);
jpayne@68 20404 __pyx_t_9 = NULL;
jpayne@68 20405 __pyx_t_10 = 0;
jpayne@68 20406 #if CYTHON_UNPACK_METHODS
jpayne@68 20407 if (likely(PyMethod_Check(__pyx_t_7))) {
jpayne@68 20408 __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_7);
jpayne@68 20409 if (likely(__pyx_t_9)) {
jpayne@68 20410 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
jpayne@68 20411 __Pyx_INCREF(__pyx_t_9);
jpayne@68 20412 __Pyx_INCREF(function);
jpayne@68 20413 __Pyx_DECREF_SET(__pyx_t_7, function);
jpayne@68 20414 __pyx_t_10 = 1;
jpayne@68 20415 }
jpayne@68 20416 }
jpayne@68 20417 #endif
jpayne@68 20418 {
jpayne@68 20419 PyObject *__pyx_callargs[2] = {__pyx_t_9, __pyx_v_filename};
jpayne@68 20420 __pyx_t_8 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+1-__pyx_t_10, 1+__pyx_t_10);
jpayne@68 20421 __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
jpayne@68 20422 if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 1018, __pyx_L1_error)
jpayne@68 20423 __Pyx_GOTREF(__pyx_t_8);
jpayne@68 20424 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
jpayne@68 20425 }
jpayne@68 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@68 20427 __Pyx_GOTREF(__pyx_t_7);
jpayne@68 20428 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
jpayne@68 20429 __Pyx_Raise(__pyx_t_7, 0, 0, 0);
jpayne@68 20430 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
jpayne@68 20431 __PYX_ERR(0, 1018, __pyx_L1_error)
jpayne@68 20432
jpayne@68 20433 /* "pysam/libctabix.pyx":1017
jpayne@68 20434 * retval = tbx_index_build2(cfn, fnidx, min_shift, &conf)
jpayne@68 20435 *
jpayne@68 20436 * if retval != 0: # <<<<<<<<<<<<<<
jpayne@68 20437 * raise OSError("building of index for {} failed".format(filename))
jpayne@68 20438 *
jpayne@68 20439 */
jpayne@68 20440 }
jpayne@68 20441
jpayne@68 20442 /* "pysam/libctabix.pyx":1020
jpayne@68 20443 * raise OSError("building of index for {} failed".format(filename))
jpayne@68 20444 *
jpayne@68 20445 * return filename # <<<<<<<<<<<<<<
jpayne@68 20446 *
jpayne@68 20447 * # #########################################################
jpayne@68 20448 */
jpayne@68 20449 __Pyx_XDECREF(__pyx_r);
jpayne@68 20450 __Pyx_INCREF(__pyx_v_filename);
jpayne@68 20451 __pyx_r = __pyx_v_filename;
jpayne@68 20452 goto __pyx_L0;
jpayne@68 20453
jpayne@68 20454 /* "pysam/libctabix.pyx":873
jpayne@68 20455 *
jpayne@68 20456 *
jpayne@68 20457 * def tabix_index(filename, # <<<<<<<<<<<<<<
jpayne@68 20458 * force=False,
jpayne@68 20459 * seq_col=None,
jpayne@68 20460 */
jpayne@68 20461
jpayne@68 20462 /* function exit code */
jpayne@68 20463 __pyx_L1_error:;
jpayne@68 20464 __Pyx_XDECREF(__pyx_t_3);
jpayne@68 20465 __Pyx_XDECREF(__pyx_t_7);
jpayne@68 20466 __Pyx_XDECREF(__pyx_t_8);
jpayne@68 20467 __Pyx_XDECREF(__pyx_t_9);
jpayne@68 20468 __Pyx_XDECREF(__pyx_t_15);
jpayne@68 20469 __Pyx_XDECREF(__pyx_t_16);
jpayne@68 20470 __Pyx_XDECREF(__pyx_t_18);
jpayne@68 20471 __Pyx_AddTraceback("pysam.libctabix.tabix_index", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@68 20472 __pyx_r = NULL;
jpayne@68 20473 __pyx_L0:;
jpayne@68 20474 __Pyx_XDECREF(__pyx_v_fn);
jpayne@68 20475 __Pyx_XDECREF(__pyx_v_preset2conf);
jpayne@68 20476 __Pyx_XDECREF(__pyx_v_conf_data);
jpayne@68 20477 __Pyx_XDECREF(__pyx_v_suffix);
jpayne@68 20478 __Pyx_XDECREF(__pyx_v_fn_index);
jpayne@68 20479 __Pyx_XDECREF(__pyx_v_filename);
jpayne@68 20480 __Pyx_XDECREF(__pyx_v_end_col);
jpayne@68 20481 __Pyx_XDECREF(__pyx_v_preset);
jpayne@68 20482 __Pyx_XDECREF(__pyx_v_index);
jpayne@68 20483 __Pyx_XDECREF(__pyx_v_csi);
jpayne@68 20484 __Pyx_XGIVEREF(__pyx_r);
jpayne@68 20485 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@68 20486 __Pyx_RefNannyFinishContext();
jpayne@68 20487 return __pyx_r;
jpayne@68 20488 }
jpayne@68 20489
jpayne@68 20490 /* "pysam/libctabix.pyx":1102
jpayne@68 20491 * '''
jpayne@68 20492 *
jpayne@68 20493 * def __cinit__(self, # <<<<<<<<<<<<<<
jpayne@68 20494 * infile,
jpayne@68 20495 * Parser parser,
jpayne@68 20496 */
jpayne@68 20497
jpayne@68 20498 /* Python wrapper */
jpayne@68 20499 static int __pyx_pw_5pysam_9libctabix_19tabix_file_iterator_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
jpayne@68 20500 static int __pyx_pw_5pysam_9libctabix_19tabix_file_iterator_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
jpayne@68 20501 PyObject *__pyx_v_infile = 0;
jpayne@68 20502 struct __pyx_obj_5pysam_9libctabix_Parser *__pyx_v_parser = 0;
jpayne@68 20503 int __pyx_v_buffer_size;
jpayne@68 20504 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
jpayne@68 20505 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@68 20506 PyObject* values[3] = {0,0,0};
jpayne@68 20507 int __pyx_lineno = 0;
jpayne@68 20508 const char *__pyx_filename = NULL;
jpayne@68 20509 int __pyx_clineno = 0;
jpayne@68 20510 int __pyx_r;
jpayne@68 20511 __Pyx_RefNannyDeclarations
jpayne@68 20512 __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
jpayne@68 20513 #if CYTHON_ASSUME_SAFE_MACROS
jpayne@68 20514 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
jpayne@68 20515 #else
jpayne@68 20516 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
jpayne@68 20517 #endif
jpayne@68 20518 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
jpayne@68 20519 {
jpayne@68 20520 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_infile,&__pyx_n_s_parser,&__pyx_n_s_buffer_size,0};
jpayne@68 20521 if (__pyx_kwds) {
jpayne@68 20522 Py_ssize_t kw_args;
jpayne@68 20523 switch (__pyx_nargs) {
jpayne@68 20524 case 3: values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2);
jpayne@68 20525 CYTHON_FALLTHROUGH;
jpayne@68 20526 case 2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
jpayne@68 20527 CYTHON_FALLTHROUGH;
jpayne@68 20528 case 1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
jpayne@68 20529 CYTHON_FALLTHROUGH;
jpayne@68 20530 case 0: break;
jpayne@68 20531 default: goto __pyx_L5_argtuple_error;
jpayne@68 20532 }
jpayne@68 20533 kw_args = __Pyx_NumKwargs_VARARGS(__pyx_kwds);
jpayne@68 20534 switch (__pyx_nargs) {
jpayne@68 20535 case 0:
jpayne@68 20536 if (likely((values[0] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_infile)) != 0)) {
jpayne@68 20537 (void)__Pyx_Arg_NewRef_VARARGS(values[0]);
jpayne@68 20538 kw_args--;
jpayne@68 20539 }
jpayne@68 20540 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1102, __pyx_L3_error)
jpayne@68 20541 else goto __pyx_L5_argtuple_error;
jpayne@68 20542 CYTHON_FALLTHROUGH;
jpayne@68 20543 case 1:
jpayne@68 20544 if (likely((values[1] = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_parser)) != 0)) {
jpayne@68 20545 (void)__Pyx_Arg_NewRef_VARARGS(values[1]);
jpayne@68 20546 kw_args--;
jpayne@68 20547 }
jpayne@68 20548 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1102, __pyx_L3_error)
jpayne@68 20549 else {
jpayne@68 20550 __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 2, 3, 1); __PYX_ERR(0, 1102, __pyx_L3_error)
jpayne@68 20551 }
jpayne@68 20552 CYTHON_FALLTHROUGH;
jpayne@68 20553 case 2:
jpayne@68 20554 if (kw_args > 0) {
jpayne@68 20555 PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_buffer_size);
jpayne@68 20556 if (value) { values[2] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; }
jpayne@68 20557 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1102, __pyx_L3_error)
jpayne@68 20558 }
jpayne@68 20559 }
jpayne@68 20560 if (unlikely(kw_args > 0)) {
jpayne@68 20561 const Py_ssize_t kwd_pos_args = __pyx_nargs;
jpayne@68 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@68 20563 }
jpayne@68 20564 } else {
jpayne@68 20565 switch (__pyx_nargs) {
jpayne@68 20566 case 3: values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2);
jpayne@68 20567 CYTHON_FALLTHROUGH;
jpayne@68 20568 case 2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
jpayne@68 20569 values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
jpayne@68 20570 break;
jpayne@68 20571 default: goto __pyx_L5_argtuple_error;
jpayne@68 20572 }
jpayne@68 20573 }
jpayne@68 20574 __pyx_v_infile = values[0];
jpayne@68 20575 __pyx_v_parser = ((struct __pyx_obj_5pysam_9libctabix_Parser *)values[1]);
jpayne@68 20576 if (values[2]) {
jpayne@68 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@68 20578 } else {
jpayne@68 20579 __pyx_v_buffer_size = ((int)0x10000);
jpayne@68 20580 }
jpayne@68 20581 }
jpayne@68 20582 goto __pyx_L6_skip;
jpayne@68 20583 __pyx_L5_argtuple_error:;
jpayne@68 20584 __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 2, 3, __pyx_nargs); __PYX_ERR(0, 1102, __pyx_L3_error)
jpayne@68 20585 __pyx_L6_skip:;
jpayne@68 20586 goto __pyx_L4_argument_unpacking_done;
jpayne@68 20587 __pyx_L3_error:;
jpayne@68 20588 {
jpayne@68 20589 Py_ssize_t __pyx_temp;
jpayne@68 20590 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
jpayne@68 20591 __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]);
jpayne@68 20592 }
jpayne@68 20593 }
jpayne@68 20594 __Pyx_AddTraceback("pysam.libctabix.tabix_file_iterator.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@68 20595 __Pyx_RefNannyFinishContext();
jpayne@68 20596 return -1;
jpayne@68 20597 __pyx_L4_argument_unpacking_done:;
jpayne@68 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@68 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@68 20600
jpayne@68 20601 /* function exit code */
jpayne@68 20602 goto __pyx_L0;
jpayne@68 20603 __pyx_L1_error:;
jpayne@68 20604 __pyx_r = -1;
jpayne@68 20605 __pyx_L0:;
jpayne@68 20606 {
jpayne@68 20607 Py_ssize_t __pyx_temp;
jpayne@68 20608 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
jpayne@68 20609 __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]);
jpayne@68 20610 }
jpayne@68 20611 }
jpayne@68 20612 __Pyx_RefNannyFinishContext();
jpayne@68 20613 return __pyx_r;
jpayne@68 20614 }
jpayne@68 20615
jpayne@68 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@68 20617 int __pyx_v_fd;
jpayne@68 20618 int __pyx_r;
jpayne@68 20619 __Pyx_TraceDeclarations
jpayne@68 20620 __Pyx_RefNannyDeclarations
jpayne@68 20621 PyObject *__pyx_t_1 = NULL;
jpayne@68 20622 int __pyx_t_2;
jpayne@68 20623 int __pyx_t_3;
jpayne@68 20624 PyObject *__pyx_t_4 = NULL;
jpayne@68 20625 int __pyx_lineno = 0;
jpayne@68 20626 const char *__pyx_filename = NULL;
jpayne@68 20627 int __pyx_clineno = 0;
jpayne@68 20628 __Pyx_RefNannySetupContext("__cinit__", 1);
jpayne@68 20629 __Pyx_TraceCall("__cinit__", __pyx_f[0], 1102, 0, __PYX_ERR(0, 1102, __pyx_L1_error));
jpayne@68 20630
jpayne@68 20631 /* "pysam/libctabix.pyx":1107
jpayne@68 20632 * int buffer_size=65536):
jpayne@68 20633 *
jpayne@68 20634 * if infile.closed: # <<<<<<<<<<<<<<
jpayne@68 20635 * raise ValueError("I/O operation on closed file.")
jpayne@68 20636 *
jpayne@68 20637 */
jpayne@68 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@68 20639 __Pyx_GOTREF(__pyx_t_1);
jpayne@68 20640 __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 1107, __pyx_L1_error)
jpayne@68 20641 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@68 20642 if (unlikely(__pyx_t_2)) {
jpayne@68 20643
jpayne@68 20644 /* "pysam/libctabix.pyx":1108
jpayne@68 20645 *
jpayne@68 20646 * if infile.closed:
jpayne@68 20647 * raise ValueError("I/O operation on closed file.") # <<<<<<<<<<<<<<
jpayne@68 20648 *
jpayne@68 20649 * self.infile = infile
jpayne@68 20650 */
jpayne@68 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@68 20652 __Pyx_GOTREF(__pyx_t_1);
jpayne@68 20653 __Pyx_Raise(__pyx_t_1, 0, 0, 0);
jpayne@68 20654 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@68 20655 __PYX_ERR(0, 1108, __pyx_L1_error)
jpayne@68 20656
jpayne@68 20657 /* "pysam/libctabix.pyx":1107
jpayne@68 20658 * int buffer_size=65536):
jpayne@68 20659 *
jpayne@68 20660 * if infile.closed: # <<<<<<<<<<<<<<
jpayne@68 20661 * raise ValueError("I/O operation on closed file.")
jpayne@68 20662 *
jpayne@68 20663 */
jpayne@68 20664 }
jpayne@68 20665
jpayne@68 20666 /* "pysam/libctabix.pyx":1110
jpayne@68 20667 * raise ValueError("I/O operation on closed file.")
jpayne@68 20668 *
jpayne@68 20669 * self.infile = infile # <<<<<<<<<<<<<<
jpayne@68 20670 *
jpayne@68 20671 * cdef int fd = PyObject_AsFileDescriptor(infile)
jpayne@68 20672 */
jpayne@68 20673 __Pyx_INCREF(__pyx_v_infile);
jpayne@68 20674 __Pyx_GIVEREF(__pyx_v_infile);
jpayne@68 20675 __Pyx_GOTREF(__pyx_v_self->infile);
jpayne@68 20676 __Pyx_DECREF(__pyx_v_self->infile);
jpayne@68 20677 __pyx_v_self->infile = __pyx_v_infile;
jpayne@68 20678
jpayne@68 20679 /* "pysam/libctabix.pyx":1112
jpayne@68 20680 * self.infile = infile
jpayne@68 20681 *
jpayne@68 20682 * cdef int fd = PyObject_AsFileDescriptor(infile) # <<<<<<<<<<<<<<
jpayne@68 20683 * if fd == -1:
jpayne@68 20684 * raise ValueError("I/O operation on closed file.")
jpayne@68 20685 */
jpayne@68 20686 __pyx_t_3 = PyObject_AsFileDescriptor(__pyx_v_infile); if (unlikely(__pyx_t_3 == ((int)-1))) __PYX_ERR(0, 1112, __pyx_L1_error)
jpayne@68 20687 __pyx_v_fd = __pyx_t_3;
jpayne@68 20688
jpayne@68 20689 /* "pysam/libctabix.pyx":1113
jpayne@68 20690 *
jpayne@68 20691 * cdef int fd = PyObject_AsFileDescriptor(infile)
jpayne@68 20692 * if fd == -1: # <<<<<<<<<<<<<<
jpayne@68 20693 * raise ValueError("I/O operation on closed file.")
jpayne@68 20694 *
jpayne@68 20695 */
jpayne@68 20696 __pyx_t_2 = (__pyx_v_fd == -1L);
jpayne@68 20697 if (unlikely(__pyx_t_2)) {
jpayne@68 20698
jpayne@68 20699 /* "pysam/libctabix.pyx":1114
jpayne@68 20700 * cdef int fd = PyObject_AsFileDescriptor(infile)
jpayne@68 20701 * if fd == -1:
jpayne@68 20702 * raise ValueError("I/O operation on closed file.") # <<<<<<<<<<<<<<
jpayne@68 20703 *
jpayne@68 20704 * self.duplicated_fd = dup(fd)
jpayne@68 20705 */
jpayne@68 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@68 20707 __Pyx_GOTREF(__pyx_t_1);
jpayne@68 20708 __Pyx_Raise(__pyx_t_1, 0, 0, 0);
jpayne@68 20709 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@68 20710 __PYX_ERR(0, 1114, __pyx_L1_error)
jpayne@68 20711
jpayne@68 20712 /* "pysam/libctabix.pyx":1113
jpayne@68 20713 *
jpayne@68 20714 * cdef int fd = PyObject_AsFileDescriptor(infile)
jpayne@68 20715 * if fd == -1: # <<<<<<<<<<<<<<
jpayne@68 20716 * raise ValueError("I/O operation on closed file.")
jpayne@68 20717 *
jpayne@68 20718 */
jpayne@68 20719 }
jpayne@68 20720
jpayne@68 20721 /* "pysam/libctabix.pyx":1116
jpayne@68 20722 * raise ValueError("I/O operation on closed file.")
jpayne@68 20723 *
jpayne@68 20724 * self.duplicated_fd = dup(fd) # <<<<<<<<<<<<<<
jpayne@68 20725 *
jpayne@68 20726 * # From the manual:
jpayne@68 20727 */
jpayne@68 20728 __pyx_v_self->duplicated_fd = dup(__pyx_v_fd);
jpayne@68 20729
jpayne@68 20730 /* "pysam/libctabix.pyx":1123
jpayne@68 20731 * # When reading, this will be detected automatically by looking
jpayne@68 20732 * # for the magic two-byte gzip header.
jpayne@68 20733 * self.fh = bgzf_dopen(self.duplicated_fd, 'r') # <<<<<<<<<<<<<<
jpayne@68 20734 *
jpayne@68 20735 * if self.fh == NULL:
jpayne@68 20736 */
jpayne@68 20737 __pyx_v_self->fh = bgzf_dopen(__pyx_v_self->duplicated_fd, ((char const *)"r"));
jpayne@68 20738
jpayne@68 20739 /* "pysam/libctabix.pyx":1125
jpayne@68 20740 * self.fh = bgzf_dopen(self.duplicated_fd, 'r')
jpayne@68 20741 *
jpayne@68 20742 * if self.fh == NULL: # <<<<<<<<<<<<<<
jpayne@68 20743 * raise IOError('%s' % strerror(errno))
jpayne@68 20744 *
jpayne@68 20745 */
jpayne@68 20746 __pyx_t_2 = (__pyx_v_self->fh == NULL);
jpayne@68 20747 if (unlikely(__pyx_t_2)) {
jpayne@68 20748
jpayne@68 20749 /* "pysam/libctabix.pyx":1126
jpayne@68 20750 *
jpayne@68 20751 * if self.fh == NULL:
jpayne@68 20752 * raise IOError('%s' % strerror(errno)) # <<<<<<<<<<<<<<
jpayne@68 20753 *
jpayne@68 20754 * self.kstream = ks_init(self.fh)
jpayne@68 20755 */
jpayne@68 20756 __pyx_t_1 = __Pyx_PyBytes_FromString(strerror(errno)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1126, __pyx_L1_error)
jpayne@68 20757 __Pyx_GOTREF(__pyx_t_1);
jpayne@68 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@68 20759 __Pyx_GOTREF(__pyx_t_4);
jpayne@68 20760 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@68 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@68 20762 __Pyx_GOTREF(__pyx_t_1);
jpayne@68 20763 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
jpayne@68 20764 __Pyx_Raise(__pyx_t_1, 0, 0, 0);
jpayne@68 20765 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@68 20766 __PYX_ERR(0, 1126, __pyx_L1_error)
jpayne@68 20767
jpayne@68 20768 /* "pysam/libctabix.pyx":1125
jpayne@68 20769 * self.fh = bgzf_dopen(self.duplicated_fd, 'r')
jpayne@68 20770 *
jpayne@68 20771 * if self.fh == NULL: # <<<<<<<<<<<<<<
jpayne@68 20772 * raise IOError('%s' % strerror(errno))
jpayne@68 20773 *
jpayne@68 20774 */
jpayne@68 20775 }
jpayne@68 20776
jpayne@68 20777 /* "pysam/libctabix.pyx":1128
jpayne@68 20778 * raise IOError('%s' % strerror(errno))
jpayne@68 20779 *
jpayne@68 20780 * self.kstream = ks_init(self.fh) # <<<<<<<<<<<<<<
jpayne@68 20781 *
jpayne@68 20782 * self.buffer.s = <char*>malloc(buffer_size)
jpayne@68 20783 */
jpayne@68 20784 __pyx_v_self->kstream = ks_init(__pyx_v_self->fh);
jpayne@68 20785
jpayne@68 20786 /* "pysam/libctabix.pyx":1130
jpayne@68 20787 * self.kstream = ks_init(self.fh)
jpayne@68 20788 *
jpayne@68 20789 * self.buffer.s = <char*>malloc(buffer_size) # <<<<<<<<<<<<<<
jpayne@68 20790 * #if self.buffer == NULL:
jpayne@68 20791 * # raise MemoryError( "tabix_file_iterator: could not allocate %i bytes" % buffer_size)
jpayne@68 20792 */
jpayne@68 20793 __pyx_v_self->buffer.s = ((char *)malloc(__pyx_v_buffer_size));
jpayne@68 20794
jpayne@68 20795 /* "pysam/libctabix.pyx":1134
jpayne@68 20796 * # raise MemoryError( "tabix_file_iterator: could not allocate %i bytes" % buffer_size)
jpayne@68 20797 * #self.size = buffer_size
jpayne@68 20798 * self.parser = parser # <<<<<<<<<<<<<<
jpayne@68 20799 *
jpayne@68 20800 * def __iter__(self):
jpayne@68 20801 */
jpayne@68 20802 __Pyx_INCREF((PyObject *)__pyx_v_parser);
jpayne@68 20803 __Pyx_GIVEREF((PyObject *)__pyx_v_parser);
jpayne@68 20804 __Pyx_GOTREF((PyObject *)__pyx_v_self->parser);
jpayne@68 20805 __Pyx_DECREF((PyObject *)__pyx_v_self->parser);
jpayne@68 20806 __pyx_v_self->parser = __pyx_v_parser;
jpayne@68 20807
jpayne@68 20808 /* "pysam/libctabix.pyx":1102
jpayne@68 20809 * '''
jpayne@68 20810 *
jpayne@68 20811 * def __cinit__(self, # <<<<<<<<<<<<<<
jpayne@68 20812 * infile,
jpayne@68 20813 * Parser parser,
jpayne@68 20814 */
jpayne@68 20815
jpayne@68 20816 /* function exit code */
jpayne@68 20817 __pyx_r = 0;
jpayne@68 20818 goto __pyx_L0;
jpayne@68 20819 __pyx_L1_error:;
jpayne@68 20820 __Pyx_XDECREF(__pyx_t_1);
jpayne@68 20821 __Pyx_XDECREF(__pyx_t_4);
jpayne@68 20822 __Pyx_AddTraceback("pysam.libctabix.tabix_file_iterator.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@68 20823 __pyx_r = -1;
jpayne@68 20824 __pyx_L0:;
jpayne@68 20825 __Pyx_TraceReturn(Py_None, 0);
jpayne@68 20826 __Pyx_RefNannyFinishContext();
jpayne@68 20827 return __pyx_r;
jpayne@68 20828 }
jpayne@68 20829
jpayne@68 20830 /* "pysam/libctabix.pyx":1136
jpayne@68 20831 * self.parser = parser
jpayne@68 20832 *
jpayne@68 20833 * def __iter__(self): # <<<<<<<<<<<<<<
jpayne@68 20834 * return self
jpayne@68 20835 *
jpayne@68 20836 */
jpayne@68 20837
jpayne@68 20838 /* Python wrapper */
jpayne@68 20839 static PyObject *__pyx_pw_5pysam_9libctabix_19tabix_file_iterator_3__iter__(PyObject *__pyx_v_self); /*proto*/
jpayne@68 20840 static PyObject *__pyx_pw_5pysam_9libctabix_19tabix_file_iterator_3__iter__(PyObject *__pyx_v_self) {
jpayne@68 20841 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@68 20842 PyObject *__pyx_r = 0;
jpayne@68 20843 __Pyx_RefNannyDeclarations
jpayne@68 20844 __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
jpayne@68 20845 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
jpayne@68 20846 __pyx_r = __pyx_pf_5pysam_9libctabix_19tabix_file_iterator_2__iter__(((struct __pyx_obj_5pysam_9libctabix_tabix_file_iterator *)__pyx_v_self));
jpayne@68 20847
jpayne@68 20848 /* function exit code */
jpayne@68 20849 __Pyx_RefNannyFinishContext();
jpayne@68 20850 return __pyx_r;
jpayne@68 20851 }
jpayne@68 20852
jpayne@68 20853 static PyObject *__pyx_pf_5pysam_9libctabix_19tabix_file_iterator_2__iter__(struct __pyx_obj_5pysam_9libctabix_tabix_file_iterator *__pyx_v_self) {
jpayne@68 20854 PyObject *__pyx_r = NULL;
jpayne@68 20855 __Pyx_TraceDeclarations
jpayne@68 20856 __Pyx_RefNannyDeclarations
jpayne@68 20857 int __pyx_lineno = 0;
jpayne@68 20858 const char *__pyx_filename = NULL;
jpayne@68 20859 int __pyx_clineno = 0;
jpayne@68 20860 __Pyx_RefNannySetupContext("__iter__", 1);
jpayne@68 20861 __Pyx_TraceCall("__iter__", __pyx_f[0], 1136, 0, __PYX_ERR(0, 1136, __pyx_L1_error));
jpayne@68 20862
jpayne@68 20863 /* "pysam/libctabix.pyx":1137
jpayne@68 20864 *
jpayne@68 20865 * def __iter__(self):
jpayne@68 20866 * return self # <<<<<<<<<<<<<<
jpayne@68 20867 *
jpayne@68 20868 * cdef __cnext__(self):
jpayne@68 20869 */
jpayne@68 20870 __Pyx_XDECREF(__pyx_r);
jpayne@68 20871 __Pyx_INCREF((PyObject *)__pyx_v_self);
jpayne@68 20872 __pyx_r = ((PyObject *)__pyx_v_self);
jpayne@68 20873 goto __pyx_L0;
jpayne@68 20874
jpayne@68 20875 /* "pysam/libctabix.pyx":1136
jpayne@68 20876 * self.parser = parser
jpayne@68 20877 *
jpayne@68 20878 * def __iter__(self): # <<<<<<<<<<<<<<
jpayne@68 20879 * return self
jpayne@68 20880 *
jpayne@68 20881 */
jpayne@68 20882
jpayne@68 20883 /* function exit code */
jpayne@68 20884 __pyx_L1_error:;
jpayne@68 20885 __Pyx_AddTraceback("pysam.libctabix.tabix_file_iterator.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@68 20886 __pyx_r = NULL;
jpayne@68 20887 __pyx_L0:;
jpayne@68 20888 __Pyx_XGIVEREF(__pyx_r);
jpayne@68 20889 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@68 20890 __Pyx_RefNannyFinishContext();
jpayne@68 20891 return __pyx_r;
jpayne@68 20892 }
jpayne@68 20893
jpayne@68 20894 /* "pysam/libctabix.pyx":1139
jpayne@68 20895 * return self
jpayne@68 20896 *
jpayne@68 20897 * cdef __cnext__(self): # <<<<<<<<<<<<<<
jpayne@68 20898 *
jpayne@68 20899 * cdef char * b
jpayne@68 20900 */
jpayne@68 20901
jpayne@68 20902 static PyObject *__pyx_f_5pysam_9libctabix_19tabix_file_iterator___cnext__(struct __pyx_obj_5pysam_9libctabix_tabix_file_iterator *__pyx_v_self) {
jpayne@68 20903 char *__pyx_v_b;
jpayne@68 20904 int __pyx_v_dret;
jpayne@68 20905 int __pyx_v_retval;
jpayne@68 20906 PyObject *__pyx_r = NULL;
jpayne@68 20907 __Pyx_TraceDeclarations
jpayne@68 20908 __Pyx_RefNannyDeclarations
jpayne@68 20909 int __pyx_t_1;
jpayne@68 20910 char *__pyx_t_2;
jpayne@68 20911 int __pyx_t_3;
jpayne@68 20912 PyObject *__pyx_t_4 = NULL;
jpayne@68 20913 int __pyx_lineno = 0;
jpayne@68 20914 const char *__pyx_filename = NULL;
jpayne@68 20915 int __pyx_clineno = 0;
jpayne@68 20916 __Pyx_RefNannySetupContext("__cnext__", 1);
jpayne@68 20917 __Pyx_TraceCall("__cnext__", __pyx_f[0], 1139, 0, __PYX_ERR(0, 1139, __pyx_L1_error));
jpayne@68 20918
jpayne@68 20919 /* "pysam/libctabix.pyx":1142
jpayne@68 20920 *
jpayne@68 20921 * cdef char * b
jpayne@68 20922 * cdef int dret = 0 # <<<<<<<<<<<<<<
jpayne@68 20923 * cdef int retval = 0
jpayne@68 20924 * while 1:
jpayne@68 20925 */
jpayne@68 20926 __pyx_v_dret = 0;
jpayne@68 20927
jpayne@68 20928 /* "pysam/libctabix.pyx":1143
jpayne@68 20929 * cdef char * b
jpayne@68 20930 * cdef int dret = 0
jpayne@68 20931 * cdef int retval = 0 # <<<<<<<<<<<<<<
jpayne@68 20932 * while 1:
jpayne@68 20933 * with nogil:
jpayne@68 20934 */
jpayne@68 20935 __pyx_v_retval = 0;
jpayne@68 20936
jpayne@68 20937 /* "pysam/libctabix.pyx":1144
jpayne@68 20938 * cdef int dret = 0
jpayne@68 20939 * cdef int retval = 0
jpayne@68 20940 * while 1: # <<<<<<<<<<<<<<
jpayne@68 20941 * with nogil:
jpayne@68 20942 * retval = ks_getuntil(self.kstream, b'\n', &self.buffer, &dret)
jpayne@68 20943 */
jpayne@68 20944 while (1) {
jpayne@68 20945
jpayne@68 20946 /* "pysam/libctabix.pyx":1145
jpayne@68 20947 * cdef int retval = 0
jpayne@68 20948 * while 1:
jpayne@68 20949 * with nogil: # <<<<<<<<<<<<<<
jpayne@68 20950 * retval = ks_getuntil(self.kstream, b'\n', &self.buffer, &dret)
jpayne@68 20951 *
jpayne@68 20952 */
jpayne@68 20953 {
jpayne@68 20954 #ifdef WITH_THREAD
jpayne@68 20955 PyThreadState *_save;
jpayne@68 20956 _save = NULL;
jpayne@68 20957 Py_UNBLOCK_THREADS
jpayne@68 20958 __Pyx_FastGIL_Remember();
jpayne@68 20959 #endif
jpayne@68 20960 /*try:*/ {
jpayne@68 20961
jpayne@68 20962 /* "pysam/libctabix.pyx":1146
jpayne@68 20963 * while 1:
jpayne@68 20964 * with nogil:
jpayne@68 20965 * retval = ks_getuntil(self.kstream, b'\n', &self.buffer, &dret) # <<<<<<<<<<<<<<
jpayne@68 20966 *
jpayne@68 20967 * if retval < 0:
jpayne@68 20968 */
jpayne@68 20969 __pyx_v_retval = ks_getuntil(__pyx_v_self->kstream, '\n', (&__pyx_v_self->buffer), (&__pyx_v_dret));
jpayne@68 20970 }
jpayne@68 20971
jpayne@68 20972 /* "pysam/libctabix.pyx":1145
jpayne@68 20973 * cdef int retval = 0
jpayne@68 20974 * while 1:
jpayne@68 20975 * with nogil: # <<<<<<<<<<<<<<
jpayne@68 20976 * retval = ks_getuntil(self.kstream, b'\n', &self.buffer, &dret)
jpayne@68 20977 *
jpayne@68 20978 */
jpayne@68 20979 /*finally:*/ {
jpayne@68 20980 /*normal exit:*/{
jpayne@68 20981 #ifdef WITH_THREAD
jpayne@68 20982 __Pyx_FastGIL_Forget();
jpayne@68 20983 Py_BLOCK_THREADS
jpayne@68 20984 #endif
jpayne@68 20985 goto __pyx_L9;
jpayne@68 20986 }
jpayne@68 20987 __pyx_L9:;
jpayne@68 20988 }
jpayne@68 20989 }
jpayne@68 20990
jpayne@68 20991 /* "pysam/libctabix.pyx":1148
jpayne@68 20992 * retval = ks_getuntil(self.kstream, b'\n', &self.buffer, &dret)
jpayne@68 20993 *
jpayne@68 20994 * if retval < 0: # <<<<<<<<<<<<<<
jpayne@68 20995 * break
jpayne@68 20996 * #raise IOError('gzip error: %s' % buildGzipError( self.fh ))
jpayne@68 20997 */
jpayne@68 20998 __pyx_t_1 = (__pyx_v_retval < 0);
jpayne@68 20999 if (__pyx_t_1) {
jpayne@68 21000
jpayne@68 21001 /* "pysam/libctabix.pyx":1149
jpayne@68 21002 *
jpayne@68 21003 * if retval < 0:
jpayne@68 21004 * break # <<<<<<<<<<<<<<
jpayne@68 21005 * #raise IOError('gzip error: %s' % buildGzipError( self.fh ))
jpayne@68 21006 *
jpayne@68 21007 */
jpayne@68 21008 goto __pyx_L4_break;
jpayne@68 21009
jpayne@68 21010 /* "pysam/libctabix.pyx":1148
jpayne@68 21011 * retval = ks_getuntil(self.kstream, b'\n', &self.buffer, &dret)
jpayne@68 21012 *
jpayne@68 21013 * if retval < 0: # <<<<<<<<<<<<<<
jpayne@68 21014 * break
jpayne@68 21015 * #raise IOError('gzip error: %s' % buildGzipError( self.fh ))
jpayne@68 21016 */
jpayne@68 21017 }
jpayne@68 21018
jpayne@68 21019 /* "pysam/libctabix.pyx":1152
jpayne@68 21020 * #raise IOError('gzip error: %s' % buildGzipError( self.fh ))
jpayne@68 21021 *
jpayne@68 21022 * b = self.buffer.s # <<<<<<<<<<<<<<
jpayne@68 21023 *
jpayne@68 21024 * # skip comments
jpayne@68 21025 */
jpayne@68 21026 __pyx_t_2 = __pyx_v_self->buffer.s;
jpayne@68 21027 __pyx_v_b = __pyx_t_2;
jpayne@68 21028
jpayne@68 21029 /* "pysam/libctabix.pyx":1155
jpayne@68 21030 *
jpayne@68 21031 * # skip comments
jpayne@68 21032 * if (b[0] == b'#'): # <<<<<<<<<<<<<<
jpayne@68 21033 * continue
jpayne@68 21034 *
jpayne@68 21035 */
jpayne@68 21036 __pyx_t_1 = ((__pyx_v_b[0]) == '#');
jpayne@68 21037 if (__pyx_t_1) {
jpayne@68 21038
jpayne@68 21039 /* "pysam/libctabix.pyx":1156
jpayne@68 21040 * # skip comments
jpayne@68 21041 * if (b[0] == b'#'):
jpayne@68 21042 * continue # <<<<<<<<<<<<<<
jpayne@68 21043 *
jpayne@68 21044 * # skip empty lines
jpayne@68 21045 */
jpayne@68 21046 goto __pyx_L3_continue;
jpayne@68 21047
jpayne@68 21048 /* "pysam/libctabix.pyx":1155
jpayne@68 21049 *
jpayne@68 21050 * # skip comments
jpayne@68 21051 * if (b[0] == b'#'): # <<<<<<<<<<<<<<
jpayne@68 21052 * continue
jpayne@68 21053 *
jpayne@68 21054 */
jpayne@68 21055 }
jpayne@68 21056
jpayne@68 21057 /* "pysam/libctabix.pyx":1159
jpayne@68 21058 *
jpayne@68 21059 * # skip empty lines
jpayne@68 21060 * if b[0] == b'\0' or b[0] == b'\n' or b[0] == b'\r': # <<<<<<<<<<<<<<
jpayne@68 21061 * continue
jpayne@68 21062 *
jpayne@68 21063 */
jpayne@68 21064 __pyx_t_3 = ((__pyx_v_b[0]) == '\x00');
jpayne@68 21065 if (!__pyx_t_3) {
jpayne@68 21066 } else {
jpayne@68 21067 __pyx_t_1 = __pyx_t_3;
jpayne@68 21068 goto __pyx_L13_bool_binop_done;
jpayne@68 21069 }
jpayne@68 21070 __pyx_t_3 = ((__pyx_v_b[0]) == '\n');
jpayne@68 21071 if (!__pyx_t_3) {
jpayne@68 21072 } else {
jpayne@68 21073 __pyx_t_1 = __pyx_t_3;
jpayne@68 21074 goto __pyx_L13_bool_binop_done;
jpayne@68 21075 }
jpayne@68 21076 __pyx_t_3 = ((__pyx_v_b[0]) == '\r');
jpayne@68 21077 __pyx_t_1 = __pyx_t_3;
jpayne@68 21078 __pyx_L13_bool_binop_done:;
jpayne@68 21079 if (__pyx_t_1) {
jpayne@68 21080
jpayne@68 21081 /* "pysam/libctabix.pyx":1160
jpayne@68 21082 * # skip empty lines
jpayne@68 21083 * if b[0] == b'\0' or b[0] == b'\n' or b[0] == b'\r':
jpayne@68 21084 * continue # <<<<<<<<<<<<<<
jpayne@68 21085 *
jpayne@68 21086 * # gzgets terminates at \n, no need to test
jpayne@68 21087 */
jpayne@68 21088 goto __pyx_L3_continue;
jpayne@68 21089
jpayne@68 21090 /* "pysam/libctabix.pyx":1159
jpayne@68 21091 *
jpayne@68 21092 * # skip empty lines
jpayne@68 21093 * if b[0] == b'\0' or b[0] == b'\n' or b[0] == b'\r': # <<<<<<<<<<<<<<
jpayne@68 21094 * continue
jpayne@68 21095 *
jpayne@68 21096 */
jpayne@68 21097 }
jpayne@68 21098
jpayne@68 21099 /* "pysam/libctabix.pyx":1165
jpayne@68 21100 *
jpayne@68 21101 * # parser creates a copy
jpayne@68 21102 * return self.parser.parse(b, self.buffer.l) # <<<<<<<<<<<<<<
jpayne@68 21103 *
jpayne@68 21104 * raise StopIteration
jpayne@68 21105 */
jpayne@68 21106 __Pyx_XDECREF(__pyx_r);
jpayne@68 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@68 21108 __Pyx_GOTREF(__pyx_t_4);
jpayne@68 21109 __pyx_r = __pyx_t_4;
jpayne@68 21110 __pyx_t_4 = 0;
jpayne@68 21111 goto __pyx_L0;
jpayne@68 21112 __pyx_L3_continue:;
jpayne@68 21113 }
jpayne@68 21114 __pyx_L4_break:;
jpayne@68 21115
jpayne@68 21116 /* "pysam/libctabix.pyx":1167
jpayne@68 21117 * return self.parser.parse(b, self.buffer.l)
jpayne@68 21118 *
jpayne@68 21119 * raise StopIteration # <<<<<<<<<<<<<<
jpayne@68 21120 *
jpayne@68 21121 * def __dealloc__(self):
jpayne@68 21122 */
jpayne@68 21123 __Pyx_Raise(__pyx_builtin_StopIteration, 0, 0, 0);
jpayne@68 21124 __PYX_ERR(0, 1167, __pyx_L1_error)
jpayne@68 21125
jpayne@68 21126 /* "pysam/libctabix.pyx":1139
jpayne@68 21127 * return self
jpayne@68 21128 *
jpayne@68 21129 * cdef __cnext__(self): # <<<<<<<<<<<<<<
jpayne@68 21130 *
jpayne@68 21131 * cdef char * b
jpayne@68 21132 */
jpayne@68 21133
jpayne@68 21134 /* function exit code */
jpayne@68 21135 __pyx_L1_error:;
jpayne@68 21136 __Pyx_XDECREF(__pyx_t_4);
jpayne@68 21137 __Pyx_AddTraceback("pysam.libctabix.tabix_file_iterator.__cnext__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@68 21138 __pyx_r = 0;
jpayne@68 21139 __pyx_L0:;
jpayne@68 21140 __Pyx_XGIVEREF(__pyx_r);
jpayne@68 21141 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@68 21142 __Pyx_RefNannyFinishContext();
jpayne@68 21143 return __pyx_r;
jpayne@68 21144 }
jpayne@68 21145
jpayne@68 21146 /* "pysam/libctabix.pyx":1169
jpayne@68 21147 * raise StopIteration
jpayne@68 21148 *
jpayne@68 21149 * def __dealloc__(self): # <<<<<<<<<<<<<<
jpayne@68 21150 * free(self.buffer.s)
jpayne@68 21151 * ks_destroy(self.kstream)
jpayne@68 21152 */
jpayne@68 21153
jpayne@68 21154 /* Python wrapper */
jpayne@68 21155 static void __pyx_pw_5pysam_9libctabix_19tabix_file_iterator_5__dealloc__(PyObject *__pyx_v_self); /*proto*/
jpayne@68 21156 static void __pyx_pw_5pysam_9libctabix_19tabix_file_iterator_5__dealloc__(PyObject *__pyx_v_self) {
jpayne@68 21157 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@68 21158 __Pyx_RefNannyDeclarations
jpayne@68 21159 __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
jpayne@68 21160 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
jpayne@68 21161 __pyx_pf_5pysam_9libctabix_19tabix_file_iterator_4__dealloc__(((struct __pyx_obj_5pysam_9libctabix_tabix_file_iterator *)__pyx_v_self));
jpayne@68 21162
jpayne@68 21163 /* function exit code */
jpayne@68 21164 __Pyx_RefNannyFinishContext();
jpayne@68 21165 }
jpayne@68 21166
jpayne@68 21167 static void __pyx_pf_5pysam_9libctabix_19tabix_file_iterator_4__dealloc__(struct __pyx_obj_5pysam_9libctabix_tabix_file_iterator *__pyx_v_self) {
jpayne@68 21168 __Pyx_TraceDeclarations
jpayne@68 21169 int __pyx_lineno = 0;
jpayne@68 21170 const char *__pyx_filename = NULL;
jpayne@68 21171 int __pyx_clineno = 0;
jpayne@68 21172 __Pyx_TraceCall("__dealloc__", __pyx_f[0], 1169, 0, __PYX_ERR(0, 1169, __pyx_L1_error));
jpayne@68 21173
jpayne@68 21174 /* "pysam/libctabix.pyx":1170
jpayne@68 21175 *
jpayne@68 21176 * def __dealloc__(self):
jpayne@68 21177 * free(self.buffer.s) # <<<<<<<<<<<<<<
jpayne@68 21178 * ks_destroy(self.kstream)
jpayne@68 21179 * bgzf_close(self.fh)
jpayne@68 21180 */
jpayne@68 21181 free(__pyx_v_self->buffer.s);
jpayne@68 21182
jpayne@68 21183 /* "pysam/libctabix.pyx":1171
jpayne@68 21184 * def __dealloc__(self):
jpayne@68 21185 * free(self.buffer.s)
jpayne@68 21186 * ks_destroy(self.kstream) # <<<<<<<<<<<<<<
jpayne@68 21187 * bgzf_close(self.fh)
jpayne@68 21188 *
jpayne@68 21189 */
jpayne@68 21190 ks_destroy(__pyx_v_self->kstream);
jpayne@68 21191
jpayne@68 21192 /* "pysam/libctabix.pyx":1172
jpayne@68 21193 * free(self.buffer.s)
jpayne@68 21194 * ks_destroy(self.kstream)
jpayne@68 21195 * bgzf_close(self.fh) # <<<<<<<<<<<<<<
jpayne@68 21196 *
jpayne@68 21197 * def __next__(self):
jpayne@68 21198 */
jpayne@68 21199 (void)(bgzf_close(__pyx_v_self->fh));
jpayne@68 21200
jpayne@68 21201 /* "pysam/libctabix.pyx":1169
jpayne@68 21202 * raise StopIteration
jpayne@68 21203 *
jpayne@68 21204 * def __dealloc__(self): # <<<<<<<<<<<<<<
jpayne@68 21205 * free(self.buffer.s)
jpayne@68 21206 * ks_destroy(self.kstream)
jpayne@68 21207 */
jpayne@68 21208
jpayne@68 21209 /* function exit code */
jpayne@68 21210 goto __pyx_L0;
jpayne@68 21211 __pyx_L1_error:;
jpayne@68 21212 __Pyx_WriteUnraisable("pysam.libctabix.tabix_file_iterator.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
jpayne@68 21213 __pyx_L0:;
jpayne@68 21214 __Pyx_TraceReturn(Py_None, 0);
jpayne@68 21215 }
jpayne@68 21216
jpayne@68 21217 /* "pysam/libctabix.pyx":1174
jpayne@68 21218 * bgzf_close(self.fh)
jpayne@68 21219 *
jpayne@68 21220 * def __next__(self): # <<<<<<<<<<<<<<
jpayne@68 21221 * return self.__cnext__()
jpayne@68 21222 *
jpayne@68 21223 */
jpayne@68 21224
jpayne@68 21225 /* Python wrapper */
jpayne@68 21226 static PyObject *__pyx_pw_5pysam_9libctabix_19tabix_file_iterator_7__next__(PyObject *__pyx_v_self); /*proto*/
jpayne@68 21227 static PyObject *__pyx_pw_5pysam_9libctabix_19tabix_file_iterator_7__next__(PyObject *__pyx_v_self) {
jpayne@68 21228 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@68 21229 PyObject *__pyx_r = 0;
jpayne@68 21230 __Pyx_RefNannyDeclarations
jpayne@68 21231 __Pyx_RefNannySetupContext("__next__ (wrapper)", 0);
jpayne@68 21232 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
jpayne@68 21233 __pyx_r = __pyx_pf_5pysam_9libctabix_19tabix_file_iterator_6__next__(((struct __pyx_obj_5pysam_9libctabix_tabix_file_iterator *)__pyx_v_self));
jpayne@68 21234
jpayne@68 21235 /* function exit code */
jpayne@68 21236 __Pyx_RefNannyFinishContext();
jpayne@68 21237 return __pyx_r;
jpayne@68 21238 }
jpayne@68 21239
jpayne@68 21240 static PyObject *__pyx_pf_5pysam_9libctabix_19tabix_file_iterator_6__next__(struct __pyx_obj_5pysam_9libctabix_tabix_file_iterator *__pyx_v_self) {
jpayne@68 21241 PyObject *__pyx_r = NULL;
jpayne@68 21242 __Pyx_TraceDeclarations
jpayne@68 21243 __Pyx_RefNannyDeclarations
jpayne@68 21244 PyObject *__pyx_t_1 = NULL;
jpayne@68 21245 int __pyx_lineno = 0;
jpayne@68 21246 const char *__pyx_filename = NULL;
jpayne@68 21247 int __pyx_clineno = 0;
jpayne@68 21248 __Pyx_RefNannySetupContext("__next__", 1);
jpayne@68 21249 __Pyx_TraceCall("__next__", __pyx_f[0], 1174, 0, __PYX_ERR(0, 1174, __pyx_L1_error));
jpayne@68 21250
jpayne@68 21251 /* "pysam/libctabix.pyx":1175
jpayne@68 21252 *
jpayne@68 21253 * def __next__(self):
jpayne@68 21254 * return self.__cnext__() # <<<<<<<<<<<<<<
jpayne@68 21255 *
jpayne@68 21256 *
jpayne@68 21257 */
jpayne@68 21258 __Pyx_XDECREF(__pyx_r);
jpayne@68 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@68 21260 __Pyx_GOTREF(__pyx_t_1);
jpayne@68 21261 __pyx_r = __pyx_t_1;
jpayne@68 21262 __pyx_t_1 = 0;
jpayne@68 21263 goto __pyx_L0;
jpayne@68 21264
jpayne@68 21265 /* "pysam/libctabix.pyx":1174
jpayne@68 21266 * bgzf_close(self.fh)
jpayne@68 21267 *
jpayne@68 21268 * def __next__(self): # <<<<<<<<<<<<<<
jpayne@68 21269 * return self.__cnext__()
jpayne@68 21270 *
jpayne@68 21271 */
jpayne@68 21272
jpayne@68 21273 /* function exit code */
jpayne@68 21274 __pyx_L1_error:;
jpayne@68 21275 __Pyx_XDECREF(__pyx_t_1);
jpayne@68 21276 __Pyx_AddTraceback("pysam.libctabix.tabix_file_iterator.__next__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@68 21277 __pyx_r = NULL;
jpayne@68 21278 __pyx_L0:;
jpayne@68 21279 __Pyx_XGIVEREF(__pyx_r);
jpayne@68 21280 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@68 21281 __Pyx_RefNannyFinishContext();
jpayne@68 21282 return __pyx_r;
jpayne@68 21283 }
jpayne@68 21284
jpayne@68 21285 /* "(tree fragment)":1
jpayne@68 21286 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
jpayne@68 21287 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
jpayne@68 21288 * def __setstate_cython__(self, __pyx_state):
jpayne@68 21289 */
jpayne@68 21290
jpayne@68 21291 /* Python wrapper */
jpayne@68 21292 static PyObject *__pyx_pw_5pysam_9libctabix_19tabix_file_iterator_9__reduce_cython__(PyObject *__pyx_v_self,
jpayne@68 21293 #if CYTHON_METH_FASTCALL
jpayne@68 21294 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@68 21295 #else
jpayne@68 21296 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@68 21297 #endif
jpayne@68 21298 ); /*proto*/
jpayne@68 21299 PyDoc_STRVAR(__pyx_doc_5pysam_9libctabix_19tabix_file_iterator_8__reduce_cython__, "tabix_file_iterator.__reduce_cython__(self)");
jpayne@68 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@68 21301 static PyObject *__pyx_pw_5pysam_9libctabix_19tabix_file_iterator_9__reduce_cython__(PyObject *__pyx_v_self,
jpayne@68 21302 #if CYTHON_METH_FASTCALL
jpayne@68 21303 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@68 21304 #else
jpayne@68 21305 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@68 21306 #endif
jpayne@68 21307 ) {
jpayne@68 21308 #if !CYTHON_METH_FASTCALL
jpayne@68 21309 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
jpayne@68 21310 #endif
jpayne@68 21311 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@68 21312 PyObject *__pyx_r = 0;
jpayne@68 21313 __Pyx_RefNannyDeclarations
jpayne@68 21314 __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
jpayne@68 21315 #if !CYTHON_METH_FASTCALL
jpayne@68 21316 #if CYTHON_ASSUME_SAFE_MACROS
jpayne@68 21317 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
jpayne@68 21318 #else
jpayne@68 21319 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
jpayne@68 21320 #endif
jpayne@68 21321 #endif
jpayne@68 21322 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
jpayne@68 21323 if (unlikely(__pyx_nargs > 0)) {
jpayne@68 21324 __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL;}
jpayne@68 21325 if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__reduce_cython__", 0))) return NULL;
jpayne@68 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@68 21327
jpayne@68 21328 /* function exit code */
jpayne@68 21329 __Pyx_RefNannyFinishContext();
jpayne@68 21330 return __pyx_r;
jpayne@68 21331 }
jpayne@68 21332
jpayne@68 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@68 21334 PyObject *__pyx_r = NULL;
jpayne@68 21335 __Pyx_TraceDeclarations
jpayne@68 21336 __Pyx_RefNannyDeclarations
jpayne@68 21337 int __pyx_lineno = 0;
jpayne@68 21338 const char *__pyx_filename = NULL;
jpayne@68 21339 int __pyx_clineno = 0;
jpayne@68 21340 __Pyx_TraceFrameInit(__pyx_codeobj__46)
jpayne@68 21341 __Pyx_RefNannySetupContext("__reduce_cython__", 1);
jpayne@68 21342 __Pyx_TraceCall("__reduce_cython__", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));
jpayne@68 21343
jpayne@68 21344 /* "(tree fragment)":2
jpayne@68 21345 * def __reduce_cython__(self):
jpayne@68 21346 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" # <<<<<<<<<<<<<<
jpayne@68 21347 * def __setstate_cython__(self, __pyx_state):
jpayne@68 21348 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
jpayne@68 21349 */
jpayne@68 21350 __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_no_default___reduce___due_to_non, 0, 0);
jpayne@68 21351 __PYX_ERR(1, 2, __pyx_L1_error)
jpayne@68 21352
jpayne@68 21353 /* "(tree fragment)":1
jpayne@68 21354 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
jpayne@68 21355 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
jpayne@68 21356 * def __setstate_cython__(self, __pyx_state):
jpayne@68 21357 */
jpayne@68 21358
jpayne@68 21359 /* function exit code */
jpayne@68 21360 __pyx_L1_error:;
jpayne@68 21361 __Pyx_AddTraceback("pysam.libctabix.tabix_file_iterator.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@68 21362 __pyx_r = NULL;
jpayne@68 21363 __Pyx_XGIVEREF(__pyx_r);
jpayne@68 21364 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@68 21365 __Pyx_RefNannyFinishContext();
jpayne@68 21366 return __pyx_r;
jpayne@68 21367 }
jpayne@68 21368
jpayne@68 21369 /* "(tree fragment)":3
jpayne@68 21370 * def __reduce_cython__(self):
jpayne@68 21371 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
jpayne@68 21372 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
jpayne@68 21373 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
jpayne@68 21374 */
jpayne@68 21375
jpayne@68 21376 /* Python wrapper */
jpayne@68 21377 static PyObject *__pyx_pw_5pysam_9libctabix_19tabix_file_iterator_11__setstate_cython__(PyObject *__pyx_v_self,
jpayne@68 21378 #if CYTHON_METH_FASTCALL
jpayne@68 21379 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@68 21380 #else
jpayne@68 21381 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@68 21382 #endif
jpayne@68 21383 ); /*proto*/
jpayne@68 21384 PyDoc_STRVAR(__pyx_doc_5pysam_9libctabix_19tabix_file_iterator_10__setstate_cython__, "tabix_file_iterator.__setstate_cython__(self, __pyx_state)");
jpayne@68 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@68 21386 static PyObject *__pyx_pw_5pysam_9libctabix_19tabix_file_iterator_11__setstate_cython__(PyObject *__pyx_v_self,
jpayne@68 21387 #if CYTHON_METH_FASTCALL
jpayne@68 21388 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@68 21389 #else
jpayne@68 21390 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@68 21391 #endif
jpayne@68 21392 ) {
jpayne@68 21393 CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0;
jpayne@68 21394 #if !CYTHON_METH_FASTCALL
jpayne@68 21395 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
jpayne@68 21396 #endif
jpayne@68 21397 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@68 21398 PyObject* values[1] = {0};
jpayne@68 21399 int __pyx_lineno = 0;
jpayne@68 21400 const char *__pyx_filename = NULL;
jpayne@68 21401 int __pyx_clineno = 0;
jpayne@68 21402 PyObject *__pyx_r = 0;
jpayne@68 21403 __Pyx_RefNannyDeclarations
jpayne@68 21404 __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
jpayne@68 21405 #if !CYTHON_METH_FASTCALL
jpayne@68 21406 #if CYTHON_ASSUME_SAFE_MACROS
jpayne@68 21407 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
jpayne@68 21408 #else
jpayne@68 21409 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
jpayne@68 21410 #endif
jpayne@68 21411 #endif
jpayne@68 21412 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
jpayne@68 21413 {
jpayne@68 21414 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0};
jpayne@68 21415 if (__pyx_kwds) {
jpayne@68 21416 Py_ssize_t kw_args;
jpayne@68 21417 switch (__pyx_nargs) {
jpayne@68 21418 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
jpayne@68 21419 CYTHON_FALLTHROUGH;
jpayne@68 21420 case 0: break;
jpayne@68 21421 default: goto __pyx_L5_argtuple_error;
jpayne@68 21422 }
jpayne@68 21423 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
jpayne@68 21424 switch (__pyx_nargs) {
jpayne@68 21425 case 0:
jpayne@68 21426 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) {
jpayne@68 21427 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
jpayne@68 21428 kw_args--;
jpayne@68 21429 }
jpayne@68 21430 else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 3, __pyx_L3_error)
jpayne@68 21431 else goto __pyx_L5_argtuple_error;
jpayne@68 21432 }
jpayne@68 21433 if (unlikely(kw_args > 0)) {
jpayne@68 21434 const Py_ssize_t kwd_pos_args = __pyx_nargs;
jpayne@68 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@68 21436 }
jpayne@68 21437 } else if (unlikely(__pyx_nargs != 1)) {
jpayne@68 21438 goto __pyx_L5_argtuple_error;
jpayne@68 21439 } else {
jpayne@68 21440 values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
jpayne@68 21441 }
jpayne@68 21442 __pyx_v___pyx_state = values[0];
jpayne@68 21443 }
jpayne@68 21444 goto __pyx_L6_skip;
jpayne@68 21445 __pyx_L5_argtuple_error:;
jpayne@68 21446 __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 3, __pyx_L3_error)
jpayne@68 21447 __pyx_L6_skip:;
jpayne@68 21448 goto __pyx_L4_argument_unpacking_done;
jpayne@68 21449 __pyx_L3_error:;
jpayne@68 21450 {
jpayne@68 21451 Py_ssize_t __pyx_temp;
jpayne@68 21452 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
jpayne@68 21453 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
jpayne@68 21454 }
jpayne@68 21455 }
jpayne@68 21456 __Pyx_AddTraceback("pysam.libctabix.tabix_file_iterator.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@68 21457 __Pyx_RefNannyFinishContext();
jpayne@68 21458 return NULL;
jpayne@68 21459 __pyx_L4_argument_unpacking_done:;
jpayne@68 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@68 21461
jpayne@68 21462 /* function exit code */
jpayne@68 21463 {
jpayne@68 21464 Py_ssize_t __pyx_temp;
jpayne@68 21465 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
jpayne@68 21466 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
jpayne@68 21467 }
jpayne@68 21468 }
jpayne@68 21469 __Pyx_RefNannyFinishContext();
jpayne@68 21470 return __pyx_r;
jpayne@68 21471 }
jpayne@68 21472
jpayne@68 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@68 21474 PyObject *__pyx_r = NULL;
jpayne@68 21475 __Pyx_TraceDeclarations
jpayne@68 21476 __Pyx_RefNannyDeclarations
jpayne@68 21477 int __pyx_lineno = 0;
jpayne@68 21478 const char *__pyx_filename = NULL;
jpayne@68 21479 int __pyx_clineno = 0;
jpayne@68 21480 __Pyx_TraceFrameInit(__pyx_codeobj__47)
jpayne@68 21481 __Pyx_RefNannySetupContext("__setstate_cython__", 1);
jpayne@68 21482 __Pyx_TraceCall("__setstate_cython__", __pyx_f[1], 3, 0, __PYX_ERR(1, 3, __pyx_L1_error));
jpayne@68 21483
jpayne@68 21484 /* "(tree fragment)":4
jpayne@68 21485 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
jpayne@68 21486 * def __setstate_cython__(self, __pyx_state):
jpayne@68 21487 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" # <<<<<<<<<<<<<<
jpayne@68 21488 */
jpayne@68 21489 __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_no_default___reduce___due_to_non, 0, 0);
jpayne@68 21490 __PYX_ERR(1, 4, __pyx_L1_error)
jpayne@68 21491
jpayne@68 21492 /* "(tree fragment)":3
jpayne@68 21493 * def __reduce_cython__(self):
jpayne@68 21494 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
jpayne@68 21495 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
jpayne@68 21496 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
jpayne@68 21497 */
jpayne@68 21498
jpayne@68 21499 /* function exit code */
jpayne@68 21500 __pyx_L1_error:;
jpayne@68 21501 __Pyx_AddTraceback("pysam.libctabix.tabix_file_iterator.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@68 21502 __pyx_r = NULL;
jpayne@68 21503 __Pyx_XGIVEREF(__pyx_r);
jpayne@68 21504 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@68 21505 __Pyx_RefNannyFinishContext();
jpayne@68 21506 return __pyx_r;
jpayne@68 21507 }
jpayne@68 21508
jpayne@68 21509 /* "pysam/libctabix.pyx":1183
jpayne@68 21510 * Permits the use of file-like objects for example from the gzip module.
jpayne@68 21511 * '''
jpayne@68 21512 * def __init__(self, infile, parser): # <<<<<<<<<<<<<<
jpayne@68 21513 *
jpayne@68 21514 * self.infile = infile
jpayne@68 21515 */
jpayne@68 21516
jpayne@68 21517 /* Python wrapper */
jpayne@68 21518 static PyObject *__pyx_pw_5pysam_9libctabix_22tabix_generic_iterator_1__init__(PyObject *__pyx_self,
jpayne@68 21519 #if CYTHON_METH_FASTCALL
jpayne@68 21520 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@68 21521 #else
jpayne@68 21522 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@68 21523 #endif
jpayne@68 21524 ); /*proto*/
jpayne@68 21525 PyDoc_STRVAR(__pyx_doc_5pysam_9libctabix_22tabix_generic_iterator___init__, "tabix_generic_iterator.__init__(self, infile, parser)");
jpayne@68 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@68 21527 static PyObject *__pyx_pw_5pysam_9libctabix_22tabix_generic_iterator_1__init__(PyObject *__pyx_self,
jpayne@68 21528 #if CYTHON_METH_FASTCALL
jpayne@68 21529 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@68 21530 #else
jpayne@68 21531 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@68 21532 #endif
jpayne@68 21533 ) {
jpayne@68 21534 PyObject *__pyx_v_self = 0;
jpayne@68 21535 PyObject *__pyx_v_infile = 0;
jpayne@68 21536 PyObject *__pyx_v_parser = 0;
jpayne@68 21537 #if !CYTHON_METH_FASTCALL
jpayne@68 21538 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
jpayne@68 21539 #endif
jpayne@68 21540 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@68 21541 PyObject* values[3] = {0,0,0};
jpayne@68 21542 int __pyx_lineno = 0;
jpayne@68 21543 const char *__pyx_filename = NULL;
jpayne@68 21544 int __pyx_clineno = 0;
jpayne@68 21545 PyObject *__pyx_r = 0;
jpayne@68 21546 __Pyx_RefNannyDeclarations
jpayne@68 21547 __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
jpayne@68 21548 #if !CYTHON_METH_FASTCALL
jpayne@68 21549 #if CYTHON_ASSUME_SAFE_MACROS
jpayne@68 21550 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
jpayne@68 21551 #else
jpayne@68 21552 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
jpayne@68 21553 #endif
jpayne@68 21554 #endif
jpayne@68 21555 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
jpayne@68 21556 {
jpayne@68 21557 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,&__pyx_n_s_infile,&__pyx_n_s_parser,0};
jpayne@68 21558 if (__pyx_kwds) {
jpayne@68 21559 Py_ssize_t kw_args;
jpayne@68 21560 switch (__pyx_nargs) {
jpayne@68 21561 case 3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
jpayne@68 21562 CYTHON_FALLTHROUGH;
jpayne@68 21563 case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
jpayne@68 21564 CYTHON_FALLTHROUGH;
jpayne@68 21565 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
jpayne@68 21566 CYTHON_FALLTHROUGH;
jpayne@68 21567 case 0: break;
jpayne@68 21568 default: goto __pyx_L5_argtuple_error;
jpayne@68 21569 }
jpayne@68 21570 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
jpayne@68 21571 switch (__pyx_nargs) {
jpayne@68 21572 case 0:
jpayne@68 21573 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
jpayne@68 21574 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
jpayne@68 21575 kw_args--;
jpayne@68 21576 }
jpayne@68 21577 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1183, __pyx_L3_error)
jpayne@68 21578 else goto __pyx_L5_argtuple_error;
jpayne@68 21579 CYTHON_FALLTHROUGH;
jpayne@68 21580 case 1:
jpayne@68 21581 if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_infile)) != 0)) {
jpayne@68 21582 (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
jpayne@68 21583 kw_args--;
jpayne@68 21584 }
jpayne@68 21585 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1183, __pyx_L3_error)
jpayne@68 21586 else {
jpayne@68 21587 __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, 1); __PYX_ERR(0, 1183, __pyx_L3_error)
jpayne@68 21588 }
jpayne@68 21589 CYTHON_FALLTHROUGH;
jpayne@68 21590 case 2:
jpayne@68 21591 if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_parser)) != 0)) {
jpayne@68 21592 (void)__Pyx_Arg_NewRef_FASTCALL(values[2]);
jpayne@68 21593 kw_args--;
jpayne@68 21594 }
jpayne@68 21595 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1183, __pyx_L3_error)
jpayne@68 21596 else {
jpayne@68 21597 __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, 2); __PYX_ERR(0, 1183, __pyx_L3_error)
jpayne@68 21598 }
jpayne@68 21599 }
jpayne@68 21600 if (unlikely(kw_args > 0)) {
jpayne@68 21601 const Py_ssize_t kwd_pos_args = __pyx_nargs;
jpayne@68 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@68 21603 }
jpayne@68 21604 } else if (unlikely(__pyx_nargs != 3)) {
jpayne@68 21605 goto __pyx_L5_argtuple_error;
jpayne@68 21606 } else {
jpayne@68 21607 values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
jpayne@68 21608 values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
jpayne@68 21609 values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
jpayne@68 21610 }
jpayne@68 21611 __pyx_v_self = values[0];
jpayne@68 21612 __pyx_v_infile = values[1];
jpayne@68 21613 __pyx_v_parser = values[2];
jpayne@68 21614 }
jpayne@68 21615 goto __pyx_L6_skip;
jpayne@68 21616 __pyx_L5_argtuple_error:;
jpayne@68 21617 __Pyx_RaiseArgtupleInvalid("__init__", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 1183, __pyx_L3_error)
jpayne@68 21618 __pyx_L6_skip:;
jpayne@68 21619 goto __pyx_L4_argument_unpacking_done;
jpayne@68 21620 __pyx_L3_error:;
jpayne@68 21621 {
jpayne@68 21622 Py_ssize_t __pyx_temp;
jpayne@68 21623 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
jpayne@68 21624 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
jpayne@68 21625 }
jpayne@68 21626 }
jpayne@68 21627 __Pyx_AddTraceback("pysam.libctabix.tabix_generic_iterator.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@68 21628 __Pyx_RefNannyFinishContext();
jpayne@68 21629 return NULL;
jpayne@68 21630 __pyx_L4_argument_unpacking_done:;
jpayne@68 21631 __pyx_r = __pyx_pf_5pysam_9libctabix_22tabix_generic_iterator___init__(__pyx_self, __pyx_v_self, __pyx_v_infile, __pyx_v_parser);
jpayne@68 21632
jpayne@68 21633 /* function exit code */
jpayne@68 21634 {
jpayne@68 21635 Py_ssize_t __pyx_temp;
jpayne@68 21636 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
jpayne@68 21637 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
jpayne@68 21638 }
jpayne@68 21639 }
jpayne@68 21640 __Pyx_RefNannyFinishContext();
jpayne@68 21641 return __pyx_r;
jpayne@68 21642 }
jpayne@68 21643
jpayne@68 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@68 21645 PyObject *__pyx_r = NULL;
jpayne@68 21646 __Pyx_TraceDeclarations
jpayne@68 21647 __Pyx_RefNannyDeclarations
jpayne@68 21648 PyObject *__pyx_t_1 = NULL;
jpayne@68 21649 PyObject *__pyx_t_2 = NULL;
jpayne@68 21650 int __pyx_t_3;
jpayne@68 21651 int __pyx_lineno = 0;
jpayne@68 21652 const char *__pyx_filename = NULL;
jpayne@68 21653 int __pyx_clineno = 0;
jpayne@68 21654 __Pyx_TraceFrameInit(__pyx_codeobj__48)
jpayne@68 21655 __Pyx_RefNannySetupContext("__init__", 1);
jpayne@68 21656 __Pyx_TraceCall("__init__", __pyx_f[0], 1183, 0, __PYX_ERR(0, 1183, __pyx_L1_error));
jpayne@68 21657
jpayne@68 21658 /* "pysam/libctabix.pyx":1185
jpayne@68 21659 * def __init__(self, infile, parser):
jpayne@68 21660 *
jpayne@68 21661 * self.infile = infile # <<<<<<<<<<<<<<
jpayne@68 21662 * if self.infile.closed:
jpayne@68 21663 * raise ValueError("I/O operation on closed file.")
jpayne@68 21664 */
jpayne@68 21665 if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_infile, __pyx_v_infile) < 0) __PYX_ERR(0, 1185, __pyx_L1_error)
jpayne@68 21666
jpayne@68 21667 /* "pysam/libctabix.pyx":1186
jpayne@68 21668 *
jpayne@68 21669 * self.infile = infile
jpayne@68 21670 * if self.infile.closed: # <<<<<<<<<<<<<<
jpayne@68 21671 * raise ValueError("I/O operation on closed file.")
jpayne@68 21672 * self.parser = parser
jpayne@68 21673 */
jpayne@68 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@68 21675 __Pyx_GOTREF(__pyx_t_1);
jpayne@68 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@68 21677 __Pyx_GOTREF(__pyx_t_2);
jpayne@68 21678 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@68 21679 __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 1186, __pyx_L1_error)
jpayne@68 21680 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@68 21681 if (unlikely(__pyx_t_3)) {
jpayne@68 21682
jpayne@68 21683 /* "pysam/libctabix.pyx":1187
jpayne@68 21684 * self.infile = infile
jpayne@68 21685 * if self.infile.closed:
jpayne@68 21686 * raise ValueError("I/O operation on closed file.") # <<<<<<<<<<<<<<
jpayne@68 21687 * self.parser = parser
jpayne@68 21688 *
jpayne@68 21689 */
jpayne@68 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@68 21691 __Pyx_GOTREF(__pyx_t_2);
jpayne@68 21692 __Pyx_Raise(__pyx_t_2, 0, 0, 0);
jpayne@68 21693 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@68 21694 __PYX_ERR(0, 1187, __pyx_L1_error)
jpayne@68 21695
jpayne@68 21696 /* "pysam/libctabix.pyx":1186
jpayne@68 21697 *
jpayne@68 21698 * self.infile = infile
jpayne@68 21699 * if self.infile.closed: # <<<<<<<<<<<<<<
jpayne@68 21700 * raise ValueError("I/O operation on closed file.")
jpayne@68 21701 * self.parser = parser
jpayne@68 21702 */
jpayne@68 21703 }
jpayne@68 21704
jpayne@68 21705 /* "pysam/libctabix.pyx":1188
jpayne@68 21706 * if self.infile.closed:
jpayne@68 21707 * raise ValueError("I/O operation on closed file.")
jpayne@68 21708 * self.parser = parser # <<<<<<<<<<<<<<
jpayne@68 21709 *
jpayne@68 21710 * def __iter__(self):
jpayne@68 21711 */
jpayne@68 21712 if (__Pyx_PyObject_SetAttrStr(__pyx_v_self, __pyx_n_s_parser, __pyx_v_parser) < 0) __PYX_ERR(0, 1188, __pyx_L1_error)
jpayne@68 21713
jpayne@68 21714 /* "pysam/libctabix.pyx":1183
jpayne@68 21715 * Permits the use of file-like objects for example from the gzip module.
jpayne@68 21716 * '''
jpayne@68 21717 * def __init__(self, infile, parser): # <<<<<<<<<<<<<<
jpayne@68 21718 *
jpayne@68 21719 * self.infile = infile
jpayne@68 21720 */
jpayne@68 21721
jpayne@68 21722 /* function exit code */
jpayne@68 21723 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
jpayne@68 21724 goto __pyx_L0;
jpayne@68 21725 __pyx_L1_error:;
jpayne@68 21726 __Pyx_XDECREF(__pyx_t_1);
jpayne@68 21727 __Pyx_XDECREF(__pyx_t_2);
jpayne@68 21728 __Pyx_AddTraceback("pysam.libctabix.tabix_generic_iterator.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@68 21729 __pyx_r = NULL;
jpayne@68 21730 __pyx_L0:;
jpayne@68 21731 __Pyx_XGIVEREF(__pyx_r);
jpayne@68 21732 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@68 21733 __Pyx_RefNannyFinishContext();
jpayne@68 21734 return __pyx_r;
jpayne@68 21735 }
jpayne@68 21736
jpayne@68 21737 /* "pysam/libctabix.pyx":1190
jpayne@68 21738 * self.parser = parser
jpayne@68 21739 *
jpayne@68 21740 * def __iter__(self): # <<<<<<<<<<<<<<
jpayne@68 21741 * return self
jpayne@68 21742 *
jpayne@68 21743 */
jpayne@68 21744
jpayne@68 21745 /* Python wrapper */
jpayne@68 21746 static PyObject *__pyx_pw_5pysam_9libctabix_22tabix_generic_iterator_3__iter__(PyObject *__pyx_self,
jpayne@68 21747 #if CYTHON_METH_FASTCALL
jpayne@68 21748 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@68 21749 #else
jpayne@68 21750 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@68 21751 #endif
jpayne@68 21752 ); /*proto*/
jpayne@68 21753 PyDoc_STRVAR(__pyx_doc_5pysam_9libctabix_22tabix_generic_iterator_2__iter__, "tabix_generic_iterator.__iter__(self)");
jpayne@68 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@68 21755 static PyObject *__pyx_pw_5pysam_9libctabix_22tabix_generic_iterator_3__iter__(PyObject *__pyx_self,
jpayne@68 21756 #if CYTHON_METH_FASTCALL
jpayne@68 21757 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@68 21758 #else
jpayne@68 21759 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@68 21760 #endif
jpayne@68 21761 ) {
jpayne@68 21762 PyObject *__pyx_v_self = 0;
jpayne@68 21763 #if !CYTHON_METH_FASTCALL
jpayne@68 21764 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
jpayne@68 21765 #endif
jpayne@68 21766 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@68 21767 PyObject* values[1] = {0};
jpayne@68 21768 int __pyx_lineno = 0;
jpayne@68 21769 const char *__pyx_filename = NULL;
jpayne@68 21770 int __pyx_clineno = 0;
jpayne@68 21771 PyObject *__pyx_r = 0;
jpayne@68 21772 __Pyx_RefNannyDeclarations
jpayne@68 21773 __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
jpayne@68 21774 #if !CYTHON_METH_FASTCALL
jpayne@68 21775 #if CYTHON_ASSUME_SAFE_MACROS
jpayne@68 21776 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
jpayne@68 21777 #else
jpayne@68 21778 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
jpayne@68 21779 #endif
jpayne@68 21780 #endif
jpayne@68 21781 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
jpayne@68 21782 {
jpayne@68 21783 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,0};
jpayne@68 21784 if (__pyx_kwds) {
jpayne@68 21785 Py_ssize_t kw_args;
jpayne@68 21786 switch (__pyx_nargs) {
jpayne@68 21787 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
jpayne@68 21788 CYTHON_FALLTHROUGH;
jpayne@68 21789 case 0: break;
jpayne@68 21790 default: goto __pyx_L5_argtuple_error;
jpayne@68 21791 }
jpayne@68 21792 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
jpayne@68 21793 switch (__pyx_nargs) {
jpayne@68 21794 case 0:
jpayne@68 21795 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
jpayne@68 21796 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
jpayne@68 21797 kw_args--;
jpayne@68 21798 }
jpayne@68 21799 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1190, __pyx_L3_error)
jpayne@68 21800 else goto __pyx_L5_argtuple_error;
jpayne@68 21801 }
jpayne@68 21802 if (unlikely(kw_args > 0)) {
jpayne@68 21803 const Py_ssize_t kwd_pos_args = __pyx_nargs;
jpayne@68 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@68 21805 }
jpayne@68 21806 } else if (unlikely(__pyx_nargs != 1)) {
jpayne@68 21807 goto __pyx_L5_argtuple_error;
jpayne@68 21808 } else {
jpayne@68 21809 values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
jpayne@68 21810 }
jpayne@68 21811 __pyx_v_self = values[0];
jpayne@68 21812 }
jpayne@68 21813 goto __pyx_L6_skip;
jpayne@68 21814 __pyx_L5_argtuple_error:;
jpayne@68 21815 __Pyx_RaiseArgtupleInvalid("__iter__", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1190, __pyx_L3_error)
jpayne@68 21816 __pyx_L6_skip:;
jpayne@68 21817 goto __pyx_L4_argument_unpacking_done;
jpayne@68 21818 __pyx_L3_error:;
jpayne@68 21819 {
jpayne@68 21820 Py_ssize_t __pyx_temp;
jpayne@68 21821 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
jpayne@68 21822 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
jpayne@68 21823 }
jpayne@68 21824 }
jpayne@68 21825 __Pyx_AddTraceback("pysam.libctabix.tabix_generic_iterator.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@68 21826 __Pyx_RefNannyFinishContext();
jpayne@68 21827 return NULL;
jpayne@68 21828 __pyx_L4_argument_unpacking_done:;
jpayne@68 21829 __pyx_r = __pyx_pf_5pysam_9libctabix_22tabix_generic_iterator_2__iter__(__pyx_self, __pyx_v_self);
jpayne@68 21830
jpayne@68 21831 /* function exit code */
jpayne@68 21832 {
jpayne@68 21833 Py_ssize_t __pyx_temp;
jpayne@68 21834 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
jpayne@68 21835 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
jpayne@68 21836 }
jpayne@68 21837 }
jpayne@68 21838 __Pyx_RefNannyFinishContext();
jpayne@68 21839 return __pyx_r;
jpayne@68 21840 }
jpayne@68 21841
jpayne@68 21842 static PyObject *__pyx_pf_5pysam_9libctabix_22tabix_generic_iterator_2__iter__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
jpayne@68 21843 PyObject *__pyx_r = NULL;
jpayne@68 21844 __Pyx_TraceDeclarations
jpayne@68 21845 __Pyx_RefNannyDeclarations
jpayne@68 21846 int __pyx_lineno = 0;
jpayne@68 21847 const char *__pyx_filename = NULL;
jpayne@68 21848 int __pyx_clineno = 0;
jpayne@68 21849 __Pyx_TraceFrameInit(__pyx_codeobj__49)
jpayne@68 21850 __Pyx_RefNannySetupContext("__iter__", 1);
jpayne@68 21851 __Pyx_TraceCall("__iter__", __pyx_f[0], 1190, 0, __PYX_ERR(0, 1190, __pyx_L1_error));
jpayne@68 21852
jpayne@68 21853 /* "pysam/libctabix.pyx":1191
jpayne@68 21854 *
jpayne@68 21855 * def __iter__(self):
jpayne@68 21856 * return self # <<<<<<<<<<<<<<
jpayne@68 21857 *
jpayne@68 21858 * # cython version - required for python 3
jpayne@68 21859 */
jpayne@68 21860 __Pyx_XDECREF(__pyx_r);
jpayne@68 21861 __Pyx_INCREF(__pyx_v_self);
jpayne@68 21862 __pyx_r = __pyx_v_self;
jpayne@68 21863 goto __pyx_L0;
jpayne@68 21864
jpayne@68 21865 /* "pysam/libctabix.pyx":1190
jpayne@68 21866 * self.parser = parser
jpayne@68 21867 *
jpayne@68 21868 * def __iter__(self): # <<<<<<<<<<<<<<
jpayne@68 21869 * return self
jpayne@68 21870 *
jpayne@68 21871 */
jpayne@68 21872
jpayne@68 21873 /* function exit code */
jpayne@68 21874 __pyx_L1_error:;
jpayne@68 21875 __Pyx_AddTraceback("pysam.libctabix.tabix_generic_iterator.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@68 21876 __pyx_r = NULL;
jpayne@68 21877 __pyx_L0:;
jpayne@68 21878 __Pyx_XGIVEREF(__pyx_r);
jpayne@68 21879 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@68 21880 __Pyx_RefNannyFinishContext();
jpayne@68 21881 return __pyx_r;
jpayne@68 21882 }
jpayne@68 21883
jpayne@68 21884 /* "pysam/libctabix.pyx":1194
jpayne@68 21885 *
jpayne@68 21886 * # cython version - required for python 3
jpayne@68 21887 * def __next__(self): # <<<<<<<<<<<<<<
jpayne@68 21888 *
jpayne@68 21889 * cdef char * b
jpayne@68 21890 */
jpayne@68 21891
jpayne@68 21892 /* Python wrapper */
jpayne@68 21893 static PyObject *__pyx_pw_5pysam_9libctabix_22tabix_generic_iterator_5__next__(PyObject *__pyx_self,
jpayne@68 21894 #if CYTHON_METH_FASTCALL
jpayne@68 21895 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@68 21896 #else
jpayne@68 21897 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@68 21898 #endif
jpayne@68 21899 ); /*proto*/
jpayne@68 21900 PyDoc_STRVAR(__pyx_doc_5pysam_9libctabix_22tabix_generic_iterator_4__next__, "tabix_generic_iterator.__next__(self)");
jpayne@68 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@68 21902 static PyObject *__pyx_pw_5pysam_9libctabix_22tabix_generic_iterator_5__next__(PyObject *__pyx_self,
jpayne@68 21903 #if CYTHON_METH_FASTCALL
jpayne@68 21904 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@68 21905 #else
jpayne@68 21906 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@68 21907 #endif
jpayne@68 21908 ) {
jpayne@68 21909 PyObject *__pyx_v_self = 0;
jpayne@68 21910 #if !CYTHON_METH_FASTCALL
jpayne@68 21911 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
jpayne@68 21912 #endif
jpayne@68 21913 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@68 21914 PyObject* values[1] = {0};
jpayne@68 21915 int __pyx_lineno = 0;
jpayne@68 21916 const char *__pyx_filename = NULL;
jpayne@68 21917 int __pyx_clineno = 0;
jpayne@68 21918 PyObject *__pyx_r = 0;
jpayne@68 21919 __Pyx_RefNannyDeclarations
jpayne@68 21920 __Pyx_RefNannySetupContext("__next__ (wrapper)", 0);
jpayne@68 21921 #if !CYTHON_METH_FASTCALL
jpayne@68 21922 #if CYTHON_ASSUME_SAFE_MACROS
jpayne@68 21923 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
jpayne@68 21924 #else
jpayne@68 21925 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
jpayne@68 21926 #endif
jpayne@68 21927 #endif
jpayne@68 21928 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
jpayne@68 21929 {
jpayne@68 21930 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_self,0};
jpayne@68 21931 if (__pyx_kwds) {
jpayne@68 21932 Py_ssize_t kw_args;
jpayne@68 21933 switch (__pyx_nargs) {
jpayne@68 21934 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
jpayne@68 21935 CYTHON_FALLTHROUGH;
jpayne@68 21936 case 0: break;
jpayne@68 21937 default: goto __pyx_L5_argtuple_error;
jpayne@68 21938 }
jpayne@68 21939 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
jpayne@68 21940 switch (__pyx_nargs) {
jpayne@68 21941 case 0:
jpayne@68 21942 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_self)) != 0)) {
jpayne@68 21943 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
jpayne@68 21944 kw_args--;
jpayne@68 21945 }
jpayne@68 21946 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1194, __pyx_L3_error)
jpayne@68 21947 else goto __pyx_L5_argtuple_error;
jpayne@68 21948 }
jpayne@68 21949 if (unlikely(kw_args > 0)) {
jpayne@68 21950 const Py_ssize_t kwd_pos_args = __pyx_nargs;
jpayne@68 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@68 21952 }
jpayne@68 21953 } else if (unlikely(__pyx_nargs != 1)) {
jpayne@68 21954 goto __pyx_L5_argtuple_error;
jpayne@68 21955 } else {
jpayne@68 21956 values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
jpayne@68 21957 }
jpayne@68 21958 __pyx_v_self = values[0];
jpayne@68 21959 }
jpayne@68 21960 goto __pyx_L6_skip;
jpayne@68 21961 __pyx_L5_argtuple_error:;
jpayne@68 21962 __Pyx_RaiseArgtupleInvalid("__next__", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 1194, __pyx_L3_error)
jpayne@68 21963 __pyx_L6_skip:;
jpayne@68 21964 goto __pyx_L4_argument_unpacking_done;
jpayne@68 21965 __pyx_L3_error:;
jpayne@68 21966 {
jpayne@68 21967 Py_ssize_t __pyx_temp;
jpayne@68 21968 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
jpayne@68 21969 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
jpayne@68 21970 }
jpayne@68 21971 }
jpayne@68 21972 __Pyx_AddTraceback("pysam.libctabix.tabix_generic_iterator.__next__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@68 21973 __Pyx_RefNannyFinishContext();
jpayne@68 21974 return NULL;
jpayne@68 21975 __pyx_L4_argument_unpacking_done:;
jpayne@68 21976 __pyx_r = __pyx_pf_5pysam_9libctabix_22tabix_generic_iterator_4__next__(__pyx_self, __pyx_v_self);
jpayne@68 21977
jpayne@68 21978 /* function exit code */
jpayne@68 21979 {
jpayne@68 21980 Py_ssize_t __pyx_temp;
jpayne@68 21981 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
jpayne@68 21982 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
jpayne@68 21983 }
jpayne@68 21984 }
jpayne@68 21985 __Pyx_RefNannyFinishContext();
jpayne@68 21986 return __pyx_r;
jpayne@68 21987 }
jpayne@68 21988
jpayne@68 21989 static PyObject *__pyx_pf_5pysam_9libctabix_22tabix_generic_iterator_4__next__(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_self) {
jpayne@68 21990 char *__pyx_v_b;
jpayne@68 21991 char *__pyx_v_cpy;
jpayne@68 21992 size_t __pyx_v_nbytes;
jpayne@68 21993 PyObject *__pyx_v_encoding = NULL;
jpayne@68 21994 PyObject *__pyx_v_line = NULL;
jpayne@68 21995 PyObject *__pyx_v_s = NULL;
jpayne@68 21996 PyObject *__pyx_v_bytes_cpy = NULL;
jpayne@68 21997 PyObject *__pyx_r = NULL;
jpayne@68 21998 __Pyx_TraceDeclarations
jpayne@68 21999 __Pyx_RefNannyDeclarations
jpayne@68 22000 PyObject *__pyx_t_1 = NULL;
jpayne@68 22001 PyObject *__pyx_t_2 = NULL;
jpayne@68 22002 PyObject *__pyx_t_3 = NULL;
jpayne@68 22003 unsigned int __pyx_t_4;
jpayne@68 22004 int __pyx_t_5;
jpayne@68 22005 int __pyx_t_6;
jpayne@68 22006 struct __pyx_opt_args_5pysam_9libcutils_force_bytes __pyx_t_7;
jpayne@68 22007 char *__pyx_t_8;
jpayne@68 22008 Py_ssize_t __pyx_t_9;
jpayne@68 22009 PyObject *__pyx_t_10 = NULL;
jpayne@68 22010 PyObject *__pyx_t_11 = NULL;
jpayne@68 22011 int __pyx_lineno = 0;
jpayne@68 22012 const char *__pyx_filename = NULL;
jpayne@68 22013 int __pyx_clineno = 0;
jpayne@68 22014 __Pyx_TraceFrameInit(__pyx_codeobj__50)
jpayne@68 22015 __Pyx_RefNannySetupContext("__next__", 1);
jpayne@68 22016 __Pyx_TraceCall("__next__", __pyx_f[0], 1194, 0, __PYX_ERR(0, 1194, __pyx_L1_error));
jpayne@68 22017
jpayne@68 22018 /* "pysam/libctabix.pyx":1200
jpayne@68 22019 * cdef size_t nbytes
jpayne@68 22020 *
jpayne@68 22021 * encoding = self.parser.get_encoding() # <<<<<<<<<<<<<<
jpayne@68 22022 *
jpayne@68 22023 * # note that GzipFile.close() does not close the file
jpayne@68 22024 */
jpayne@68 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@68 22026 __Pyx_GOTREF(__pyx_t_2);
jpayne@68 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@68 22028 __Pyx_GOTREF(__pyx_t_3);
jpayne@68 22029 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@68 22030 __pyx_t_2 = NULL;
jpayne@68 22031 __pyx_t_4 = 0;
jpayne@68 22032 #if CYTHON_UNPACK_METHODS
jpayne@68 22033 if (likely(PyMethod_Check(__pyx_t_3))) {
jpayne@68 22034 __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_3);
jpayne@68 22035 if (likely(__pyx_t_2)) {
jpayne@68 22036 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
jpayne@68 22037 __Pyx_INCREF(__pyx_t_2);
jpayne@68 22038 __Pyx_INCREF(function);
jpayne@68 22039 __Pyx_DECREF_SET(__pyx_t_3, function);
jpayne@68 22040 __pyx_t_4 = 1;
jpayne@68 22041 }
jpayne@68 22042 }
jpayne@68 22043 #endif
jpayne@68 22044 {
jpayne@68 22045 PyObject *__pyx_callargs[2] = {__pyx_t_2, NULL};
jpayne@68 22046 __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
jpayne@68 22047 __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@68 22048 if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1200, __pyx_L1_error)
jpayne@68 22049 __Pyx_GOTREF(__pyx_t_1);
jpayne@68 22050 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
jpayne@68 22051 }
jpayne@68 22052 __pyx_v_encoding = __pyx_t_1;
jpayne@68 22053 __pyx_t_1 = 0;
jpayne@68 22054
jpayne@68 22055 /* "pysam/libctabix.pyx":1204
jpayne@68 22056 * # note that GzipFile.close() does not close the file
jpayne@68 22057 * # reading is still possible.
jpayne@68 22058 * if self.infile.closed: # <<<<<<<<<<<<<<
jpayne@68 22059 * raise ValueError("I/O operation on closed file.")
jpayne@68 22060 *
jpayne@68 22061 */
jpayne@68 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@68 22063 __Pyx_GOTREF(__pyx_t_1);
jpayne@68 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@68 22065 __Pyx_GOTREF(__pyx_t_3);
jpayne@68 22066 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@68 22067 __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 1204, __pyx_L1_error)
jpayne@68 22068 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
jpayne@68 22069 if (unlikely(__pyx_t_5)) {
jpayne@68 22070
jpayne@68 22071 /* "pysam/libctabix.pyx":1205
jpayne@68 22072 * # reading is still possible.
jpayne@68 22073 * if self.infile.closed:
jpayne@68 22074 * raise ValueError("I/O operation on closed file.") # <<<<<<<<<<<<<<
jpayne@68 22075 *
jpayne@68 22076 * while 1:
jpayne@68 22077 */
jpayne@68 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@68 22079 __Pyx_GOTREF(__pyx_t_3);
jpayne@68 22080 __Pyx_Raise(__pyx_t_3, 0, 0, 0);
jpayne@68 22081 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
jpayne@68 22082 __PYX_ERR(0, 1205, __pyx_L1_error)
jpayne@68 22083
jpayne@68 22084 /* "pysam/libctabix.pyx":1204
jpayne@68 22085 * # note that GzipFile.close() does not close the file
jpayne@68 22086 * # reading is still possible.
jpayne@68 22087 * if self.infile.closed: # <<<<<<<<<<<<<<
jpayne@68 22088 * raise ValueError("I/O operation on closed file.")
jpayne@68 22089 *
jpayne@68 22090 */
jpayne@68 22091 }
jpayne@68 22092
jpayne@68 22093 /* "pysam/libctabix.pyx":1207
jpayne@68 22094 * raise ValueError("I/O operation on closed file.")
jpayne@68 22095 *
jpayne@68 22096 * while 1: # <<<<<<<<<<<<<<
jpayne@68 22097 *
jpayne@68 22098 * line = self.infile.readline()
jpayne@68 22099 */
jpayne@68 22100 while (1) {
jpayne@68 22101
jpayne@68 22102 /* "pysam/libctabix.pyx":1209
jpayne@68 22103 * while 1:
jpayne@68 22104 *
jpayne@68 22105 * line = self.infile.readline() # <<<<<<<<<<<<<<
jpayne@68 22106 * if not line:
jpayne@68 22107 * break
jpayne@68 22108 */
jpayne@68 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@68 22110 __Pyx_GOTREF(__pyx_t_1);
jpayne@68 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@68 22112 __Pyx_GOTREF(__pyx_t_2);
jpayne@68 22113 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@68 22114 __pyx_t_1 = NULL;
jpayne@68 22115 __pyx_t_4 = 0;
jpayne@68 22116 #if CYTHON_UNPACK_METHODS
jpayne@68 22117 if (likely(PyMethod_Check(__pyx_t_2))) {
jpayne@68 22118 __pyx_t_1 = PyMethod_GET_SELF(__pyx_t_2);
jpayne@68 22119 if (likely(__pyx_t_1)) {
jpayne@68 22120 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
jpayne@68 22121 __Pyx_INCREF(__pyx_t_1);
jpayne@68 22122 __Pyx_INCREF(function);
jpayne@68 22123 __Pyx_DECREF_SET(__pyx_t_2, function);
jpayne@68 22124 __pyx_t_4 = 1;
jpayne@68 22125 }
jpayne@68 22126 }
jpayne@68 22127 #endif
jpayne@68 22128 {
jpayne@68 22129 PyObject *__pyx_callargs[2] = {__pyx_t_1, NULL};
jpayne@68 22130 __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
jpayne@68 22131 __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@68 22132 if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1209, __pyx_L1_error)
jpayne@68 22133 __Pyx_GOTREF(__pyx_t_3);
jpayne@68 22134 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@68 22135 }
jpayne@68 22136 __Pyx_XDECREF_SET(__pyx_v_line, __pyx_t_3);
jpayne@68 22137 __pyx_t_3 = 0;
jpayne@68 22138
jpayne@68 22139 /* "pysam/libctabix.pyx":1210
jpayne@68 22140 *
jpayne@68 22141 * line = self.infile.readline()
jpayne@68 22142 * if not line: # <<<<<<<<<<<<<<
jpayne@68 22143 * break
jpayne@68 22144 *
jpayne@68 22145 */
jpayne@68 22146 __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_v_line); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 1210, __pyx_L1_error)
jpayne@68 22147 __pyx_t_6 = (!__pyx_t_5);
jpayne@68 22148 if (__pyx_t_6) {
jpayne@68 22149
jpayne@68 22150 /* "pysam/libctabix.pyx":1211
jpayne@68 22151 * line = self.infile.readline()
jpayne@68 22152 * if not line:
jpayne@68 22153 * break # <<<<<<<<<<<<<<
jpayne@68 22154 *
jpayne@68 22155 * s = force_bytes(line, encoding)
jpayne@68 22156 */
jpayne@68 22157 goto __pyx_L5_break;
jpayne@68 22158
jpayne@68 22159 /* "pysam/libctabix.pyx":1210
jpayne@68 22160 *
jpayne@68 22161 * line = self.infile.readline()
jpayne@68 22162 * if not line: # <<<<<<<<<<<<<<
jpayne@68 22163 * break
jpayne@68 22164 *
jpayne@68 22165 */
jpayne@68 22166 }
jpayne@68 22167
jpayne@68 22168 /* "pysam/libctabix.pyx":1213
jpayne@68 22169 * break
jpayne@68 22170 *
jpayne@68 22171 * s = force_bytes(line, encoding) # <<<<<<<<<<<<<<
jpayne@68 22172 * b = s
jpayne@68 22173 * nbytes = len(line)
jpayne@68 22174 */
jpayne@68 22175 __pyx_t_7.__pyx_n = 1;
jpayne@68 22176 __pyx_t_7.encoding = __pyx_v_encoding;
jpayne@68 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@68 22178 __Pyx_GOTREF(__pyx_t_3);
jpayne@68 22179 __Pyx_XDECREF_SET(__pyx_v_s, ((PyObject*)__pyx_t_3));
jpayne@68 22180 __pyx_t_3 = 0;
jpayne@68 22181
jpayne@68 22182 /* "pysam/libctabix.pyx":1214
jpayne@68 22183 *
jpayne@68 22184 * s = force_bytes(line, encoding)
jpayne@68 22185 * b = s # <<<<<<<<<<<<<<
jpayne@68 22186 * nbytes = len(line)
jpayne@68 22187 * assert b[nbytes] == b'\0'
jpayne@68 22188 */
jpayne@68 22189 if (unlikely(__pyx_v_s == Py_None)) {
jpayne@68 22190 PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
jpayne@68 22191 __PYX_ERR(0, 1214, __pyx_L1_error)
jpayne@68 22192 }
jpayne@68 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@68 22194 __pyx_v_b = __pyx_t_8;
jpayne@68 22195
jpayne@68 22196 /* "pysam/libctabix.pyx":1215
jpayne@68 22197 * s = force_bytes(line, encoding)
jpayne@68 22198 * b = s
jpayne@68 22199 * nbytes = len(line) # <<<<<<<<<<<<<<
jpayne@68 22200 * assert b[nbytes] == b'\0'
jpayne@68 22201 *
jpayne@68 22202 */
jpayne@68 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@68 22204 __pyx_v_nbytes = __pyx_t_9;
jpayne@68 22205
jpayne@68 22206 /* "pysam/libctabix.pyx":1216
jpayne@68 22207 * b = s
jpayne@68 22208 * nbytes = len(line)
jpayne@68 22209 * assert b[nbytes] == b'\0' # <<<<<<<<<<<<<<
jpayne@68 22210 *
jpayne@68 22211 * # skip comments
jpayne@68 22212 */
jpayne@68 22213 #ifndef CYTHON_WITHOUT_ASSERTIONS
jpayne@68 22214 if (unlikely(__pyx_assertions_enabled())) {
jpayne@68 22215 __pyx_t_6 = ((__pyx_v_b[__pyx_v_nbytes]) == '\x00');
jpayne@68 22216 if (unlikely(!__pyx_t_6)) {
jpayne@68 22217 __Pyx_Raise(__pyx_builtin_AssertionError, 0, 0, 0);
jpayne@68 22218 __PYX_ERR(0, 1216, __pyx_L1_error)
jpayne@68 22219 }
jpayne@68 22220 }
jpayne@68 22221 #else
jpayne@68 22222 if ((1)); else __PYX_ERR(0, 1216, __pyx_L1_error)
jpayne@68 22223 #endif
jpayne@68 22224
jpayne@68 22225 /* "pysam/libctabix.pyx":1219
jpayne@68 22226 *
jpayne@68 22227 * # skip comments
jpayne@68 22228 * if b[0] == b'#': # <<<<<<<<<<<<<<
jpayne@68 22229 * continue
jpayne@68 22230 *
jpayne@68 22231 */
jpayne@68 22232 __pyx_t_6 = ((__pyx_v_b[0]) == '#');
jpayne@68 22233 if (__pyx_t_6) {
jpayne@68 22234
jpayne@68 22235 /* "pysam/libctabix.pyx":1220
jpayne@68 22236 * # skip comments
jpayne@68 22237 * if b[0] == b'#':
jpayne@68 22238 * continue # <<<<<<<<<<<<<<
jpayne@68 22239 *
jpayne@68 22240 * # skip empty lines
jpayne@68 22241 */
jpayne@68 22242 goto __pyx_L4_continue;
jpayne@68 22243
jpayne@68 22244 /* "pysam/libctabix.pyx":1219
jpayne@68 22245 *
jpayne@68 22246 * # skip comments
jpayne@68 22247 * if b[0] == b'#': # <<<<<<<<<<<<<<
jpayne@68 22248 * continue
jpayne@68 22249 *
jpayne@68 22250 */
jpayne@68 22251 }
jpayne@68 22252
jpayne@68 22253 /* "pysam/libctabix.pyx":1223
jpayne@68 22254 *
jpayne@68 22255 * # skip empty lines
jpayne@68 22256 * if b[0] == b'\0' or b[0] == b'\n' or b[0] == b'\r': # <<<<<<<<<<<<<<
jpayne@68 22257 * continue
jpayne@68 22258 *
jpayne@68 22259 */
jpayne@68 22260 __pyx_t_5 = ((__pyx_v_b[0]) == '\x00');
jpayne@68 22261 if (!__pyx_t_5) {
jpayne@68 22262 } else {
jpayne@68 22263 __pyx_t_6 = __pyx_t_5;
jpayne@68 22264 goto __pyx_L9_bool_binop_done;
jpayne@68 22265 }
jpayne@68 22266 __pyx_t_5 = ((__pyx_v_b[0]) == '\n');
jpayne@68 22267 if (!__pyx_t_5) {
jpayne@68 22268 } else {
jpayne@68 22269 __pyx_t_6 = __pyx_t_5;
jpayne@68 22270 goto __pyx_L9_bool_binop_done;
jpayne@68 22271 }
jpayne@68 22272 __pyx_t_5 = ((__pyx_v_b[0]) == '\r');
jpayne@68 22273 __pyx_t_6 = __pyx_t_5;
jpayne@68 22274 __pyx_L9_bool_binop_done:;
jpayne@68 22275 if (__pyx_t_6) {
jpayne@68 22276
jpayne@68 22277 /* "pysam/libctabix.pyx":1224
jpayne@68 22278 * # skip empty lines
jpayne@68 22279 * if b[0] == b'\0' or b[0] == b'\n' or b[0] == b'\r':
jpayne@68 22280 * continue # <<<<<<<<<<<<<<
jpayne@68 22281 *
jpayne@68 22282 * # make sure that entry is complete
jpayne@68 22283 */
jpayne@68 22284 goto __pyx_L4_continue;
jpayne@68 22285
jpayne@68 22286 /* "pysam/libctabix.pyx":1223
jpayne@68 22287 *
jpayne@68 22288 * # skip empty lines
jpayne@68 22289 * if b[0] == b'\0' or b[0] == b'\n' or b[0] == b'\r': # <<<<<<<<<<<<<<
jpayne@68 22290 * continue
jpayne@68 22291 *
jpayne@68 22292 */
jpayne@68 22293 }
jpayne@68 22294
jpayne@68 22295 /* "pysam/libctabix.pyx":1227
jpayne@68 22296 *
jpayne@68 22297 * # make sure that entry is complete
jpayne@68 22298 * if b[nbytes-1] != b'\n' and b[nbytes-1] != b'\r': # <<<<<<<<<<<<<<
jpayne@68 22299 * raise ValueError("incomplete line at %s" % line)
jpayne@68 22300 *
jpayne@68 22301 */
jpayne@68 22302 __pyx_t_5 = ((__pyx_v_b[(__pyx_v_nbytes - 1)]) != '\n');
jpayne@68 22303 if (__pyx_t_5) {
jpayne@68 22304 } else {
jpayne@68 22305 __pyx_t_6 = __pyx_t_5;
jpayne@68 22306 goto __pyx_L13_bool_binop_done;
jpayne@68 22307 }
jpayne@68 22308 __pyx_t_5 = ((__pyx_v_b[(__pyx_v_nbytes - 1)]) != '\r');
jpayne@68 22309 __pyx_t_6 = __pyx_t_5;
jpayne@68 22310 __pyx_L13_bool_binop_done:;
jpayne@68 22311 if (unlikely(__pyx_t_6)) {
jpayne@68 22312
jpayne@68 22313 /* "pysam/libctabix.pyx":1228
jpayne@68 22314 * # make sure that entry is complete
jpayne@68 22315 * if b[nbytes-1] != b'\n' and b[nbytes-1] != b'\r':
jpayne@68 22316 * raise ValueError("incomplete line at %s" % line) # <<<<<<<<<<<<<<
jpayne@68 22317 *
jpayne@68 22318 * bytes_cpy = <bytes> b
jpayne@68 22319 */
jpayne@68 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@68 22321 __Pyx_GOTREF(__pyx_t_3);
jpayne@68 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@68 22323 __Pyx_GOTREF(__pyx_t_2);
jpayne@68 22324 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
jpayne@68 22325 __Pyx_Raise(__pyx_t_2, 0, 0, 0);
jpayne@68 22326 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@68 22327 __PYX_ERR(0, 1228, __pyx_L1_error)
jpayne@68 22328
jpayne@68 22329 /* "pysam/libctabix.pyx":1227
jpayne@68 22330 *
jpayne@68 22331 * # make sure that entry is complete
jpayne@68 22332 * if b[nbytes-1] != b'\n' and b[nbytes-1] != b'\r': # <<<<<<<<<<<<<<
jpayne@68 22333 * raise ValueError("incomplete line at %s" % line)
jpayne@68 22334 *
jpayne@68 22335 */
jpayne@68 22336 }
jpayne@68 22337
jpayne@68 22338 /* "pysam/libctabix.pyx":1230
jpayne@68 22339 * raise ValueError("incomplete line at %s" % line)
jpayne@68 22340 *
jpayne@68 22341 * bytes_cpy = <bytes> b # <<<<<<<<<<<<<<
jpayne@68 22342 * cpy = <char *> bytes_cpy
jpayne@68 22343 *
jpayne@68 22344 */
jpayne@68 22345 __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v_b); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1230, __pyx_L1_error)
jpayne@68 22346 __Pyx_GOTREF(__pyx_t_2);
jpayne@68 22347 __pyx_t_3 = __pyx_t_2;
jpayne@68 22348 __Pyx_INCREF(__pyx_t_3);
jpayne@68 22349 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@68 22350 __pyx_v_bytes_cpy = ((PyObject*)__pyx_t_3);
jpayne@68 22351 __pyx_t_3 = 0;
jpayne@68 22352
jpayne@68 22353 /* "pysam/libctabix.pyx":1231
jpayne@68 22354 *
jpayne@68 22355 * bytes_cpy = <bytes> b
jpayne@68 22356 * cpy = <char *> bytes_cpy # <<<<<<<<<<<<<<
jpayne@68 22357 *
jpayne@68 22358 * return self.parser(cpy, nbytes)
jpayne@68 22359 */
jpayne@68 22360 if (unlikely(__pyx_v_bytes_cpy == Py_None)) {
jpayne@68 22361 PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
jpayne@68 22362 __PYX_ERR(0, 1231, __pyx_L1_error)
jpayne@68 22363 }
jpayne@68 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@68 22365 __pyx_v_cpy = ((char *)__pyx_t_8);
jpayne@68 22366
jpayne@68 22367 /* "pysam/libctabix.pyx":1233
jpayne@68 22368 * cpy = <char *> bytes_cpy
jpayne@68 22369 *
jpayne@68 22370 * return self.parser(cpy, nbytes) # <<<<<<<<<<<<<<
jpayne@68 22371 *
jpayne@68 22372 * raise StopIteration
jpayne@68 22373 */
jpayne@68 22374 __Pyx_XDECREF(__pyx_r);
jpayne@68 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@68 22376 __Pyx_GOTREF(__pyx_t_2);
jpayne@68 22377 __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_v_cpy); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1233, __pyx_L1_error)
jpayne@68 22378 __Pyx_GOTREF(__pyx_t_1);
jpayne@68 22379 __pyx_t_10 = __Pyx_PyInt_FromSize_t(__pyx_v_nbytes); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 1233, __pyx_L1_error)
jpayne@68 22380 __Pyx_GOTREF(__pyx_t_10);
jpayne@68 22381 __pyx_t_11 = NULL;
jpayne@68 22382 __pyx_t_4 = 0;
jpayne@68 22383 #if CYTHON_UNPACK_METHODS
jpayne@68 22384 if (likely(PyMethod_Check(__pyx_t_2))) {
jpayne@68 22385 __pyx_t_11 = PyMethod_GET_SELF(__pyx_t_2);
jpayne@68 22386 if (likely(__pyx_t_11)) {
jpayne@68 22387 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
jpayne@68 22388 __Pyx_INCREF(__pyx_t_11);
jpayne@68 22389 __Pyx_INCREF(function);
jpayne@68 22390 __Pyx_DECREF_SET(__pyx_t_2, function);
jpayne@68 22391 __pyx_t_4 = 1;
jpayne@68 22392 }
jpayne@68 22393 }
jpayne@68 22394 #endif
jpayne@68 22395 {
jpayne@68 22396 PyObject *__pyx_callargs[3] = {__pyx_t_11, __pyx_t_1, __pyx_t_10};
jpayne@68 22397 __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 2+__pyx_t_4);
jpayne@68 22398 __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
jpayne@68 22399 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@68 22400 __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
jpayne@68 22401 if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1233, __pyx_L1_error)
jpayne@68 22402 __Pyx_GOTREF(__pyx_t_3);
jpayne@68 22403 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@68 22404 }
jpayne@68 22405 __pyx_r = __pyx_t_3;
jpayne@68 22406 __pyx_t_3 = 0;
jpayne@68 22407 goto __pyx_L0;
jpayne@68 22408 __pyx_L4_continue:;
jpayne@68 22409 }
jpayne@68 22410 __pyx_L5_break:;
jpayne@68 22411
jpayne@68 22412 /* "pysam/libctabix.pyx":1235
jpayne@68 22413 * return self.parser(cpy, nbytes)
jpayne@68 22414 *
jpayne@68 22415 * raise StopIteration # <<<<<<<<<<<<<<
jpayne@68 22416 *
jpayne@68 22417 *
jpayne@68 22418 */
jpayne@68 22419 __Pyx_Raise(__pyx_builtin_StopIteration, 0, 0, 0);
jpayne@68 22420 __PYX_ERR(0, 1235, __pyx_L1_error)
jpayne@68 22421
jpayne@68 22422 /* "pysam/libctabix.pyx":1194
jpayne@68 22423 *
jpayne@68 22424 * # cython version - required for python 3
jpayne@68 22425 * def __next__(self): # <<<<<<<<<<<<<<
jpayne@68 22426 *
jpayne@68 22427 * cdef char * b
jpayne@68 22428 */
jpayne@68 22429
jpayne@68 22430 /* function exit code */
jpayne@68 22431 __pyx_L1_error:;
jpayne@68 22432 __Pyx_XDECREF(__pyx_t_1);
jpayne@68 22433 __Pyx_XDECREF(__pyx_t_2);
jpayne@68 22434 __Pyx_XDECREF(__pyx_t_3);
jpayne@68 22435 __Pyx_XDECREF(__pyx_t_10);
jpayne@68 22436 __Pyx_XDECREF(__pyx_t_11);
jpayne@68 22437 __Pyx_AddTraceback("pysam.libctabix.tabix_generic_iterator.__next__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@68 22438 __pyx_r = NULL;
jpayne@68 22439 __pyx_L0:;
jpayne@68 22440 __Pyx_XDECREF(__pyx_v_encoding);
jpayne@68 22441 __Pyx_XDECREF(__pyx_v_line);
jpayne@68 22442 __Pyx_XDECREF(__pyx_v_s);
jpayne@68 22443 __Pyx_XDECREF(__pyx_v_bytes_cpy);
jpayne@68 22444 __Pyx_XGIVEREF(__pyx_r);
jpayne@68 22445 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@68 22446 __Pyx_RefNannyFinishContext();
jpayne@68 22447 return __pyx_r;
jpayne@68 22448 }
jpayne@68 22449
jpayne@68 22450 /* "pysam/libctabix.pyx":1238
jpayne@68 22451 *
jpayne@68 22452 *
jpayne@68 22453 * def tabix_iterator(infile, parser): # <<<<<<<<<<<<<<
jpayne@68 22454 * """return an iterator over all entries in a file.
jpayne@68 22455 *
jpayne@68 22456 */
jpayne@68 22457
jpayne@68 22458 /* Python wrapper */
jpayne@68 22459 static PyObject *__pyx_pw_5pysam_9libctabix_5tabix_iterator(PyObject *__pyx_self,
jpayne@68 22460 #if CYTHON_METH_FASTCALL
jpayne@68 22461 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@68 22462 #else
jpayne@68 22463 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@68 22464 #endif
jpayne@68 22465 ); /*proto*/
jpayne@68 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@68 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@68 22468 static PyObject *__pyx_pw_5pysam_9libctabix_5tabix_iterator(PyObject *__pyx_self,
jpayne@68 22469 #if CYTHON_METH_FASTCALL
jpayne@68 22470 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@68 22471 #else
jpayne@68 22472 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@68 22473 #endif
jpayne@68 22474 ) {
jpayne@68 22475 PyObject *__pyx_v_infile = 0;
jpayne@68 22476 PyObject *__pyx_v_parser = 0;
jpayne@68 22477 #if !CYTHON_METH_FASTCALL
jpayne@68 22478 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
jpayne@68 22479 #endif
jpayne@68 22480 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@68 22481 PyObject* values[2] = {0,0};
jpayne@68 22482 int __pyx_lineno = 0;
jpayne@68 22483 const char *__pyx_filename = NULL;
jpayne@68 22484 int __pyx_clineno = 0;
jpayne@68 22485 PyObject *__pyx_r = 0;
jpayne@68 22486 __Pyx_RefNannyDeclarations
jpayne@68 22487 __Pyx_RefNannySetupContext("tabix_iterator (wrapper)", 0);
jpayne@68 22488 #if !CYTHON_METH_FASTCALL
jpayne@68 22489 #if CYTHON_ASSUME_SAFE_MACROS
jpayne@68 22490 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
jpayne@68 22491 #else
jpayne@68 22492 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
jpayne@68 22493 #endif
jpayne@68 22494 #endif
jpayne@68 22495 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
jpayne@68 22496 {
jpayne@68 22497 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_infile,&__pyx_n_s_parser,0};
jpayne@68 22498 if (__pyx_kwds) {
jpayne@68 22499 Py_ssize_t kw_args;
jpayne@68 22500 switch (__pyx_nargs) {
jpayne@68 22501 case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
jpayne@68 22502 CYTHON_FALLTHROUGH;
jpayne@68 22503 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
jpayne@68 22504 CYTHON_FALLTHROUGH;
jpayne@68 22505 case 0: break;
jpayne@68 22506 default: goto __pyx_L5_argtuple_error;
jpayne@68 22507 }
jpayne@68 22508 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
jpayne@68 22509 switch (__pyx_nargs) {
jpayne@68 22510 case 0:
jpayne@68 22511 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_infile)) != 0)) {
jpayne@68 22512 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
jpayne@68 22513 kw_args--;
jpayne@68 22514 }
jpayne@68 22515 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1238, __pyx_L3_error)
jpayne@68 22516 else goto __pyx_L5_argtuple_error;
jpayne@68 22517 CYTHON_FALLTHROUGH;
jpayne@68 22518 case 1:
jpayne@68 22519 if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_parser)) != 0)) {
jpayne@68 22520 (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
jpayne@68 22521 kw_args--;
jpayne@68 22522 }
jpayne@68 22523 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1238, __pyx_L3_error)
jpayne@68 22524 else {
jpayne@68 22525 __Pyx_RaiseArgtupleInvalid("tabix_iterator", 1, 2, 2, 1); __PYX_ERR(0, 1238, __pyx_L3_error)
jpayne@68 22526 }
jpayne@68 22527 }
jpayne@68 22528 if (unlikely(kw_args > 0)) {
jpayne@68 22529 const Py_ssize_t kwd_pos_args = __pyx_nargs;
jpayne@68 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@68 22531 }
jpayne@68 22532 } else if (unlikely(__pyx_nargs != 2)) {
jpayne@68 22533 goto __pyx_L5_argtuple_error;
jpayne@68 22534 } else {
jpayne@68 22535 values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
jpayne@68 22536 values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
jpayne@68 22537 }
jpayne@68 22538 __pyx_v_infile = values[0];
jpayne@68 22539 __pyx_v_parser = values[1];
jpayne@68 22540 }
jpayne@68 22541 goto __pyx_L6_skip;
jpayne@68 22542 __pyx_L5_argtuple_error:;
jpayne@68 22543 __Pyx_RaiseArgtupleInvalid("tabix_iterator", 1, 2, 2, __pyx_nargs); __PYX_ERR(0, 1238, __pyx_L3_error)
jpayne@68 22544 __pyx_L6_skip:;
jpayne@68 22545 goto __pyx_L4_argument_unpacking_done;
jpayne@68 22546 __pyx_L3_error:;
jpayne@68 22547 {
jpayne@68 22548 Py_ssize_t __pyx_temp;
jpayne@68 22549 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
jpayne@68 22550 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
jpayne@68 22551 }
jpayne@68 22552 }
jpayne@68 22553 __Pyx_AddTraceback("pysam.libctabix.tabix_iterator", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@68 22554 __Pyx_RefNannyFinishContext();
jpayne@68 22555 return NULL;
jpayne@68 22556 __pyx_L4_argument_unpacking_done:;
jpayne@68 22557 __pyx_r = __pyx_pf_5pysam_9libctabix_4tabix_iterator(__pyx_self, __pyx_v_infile, __pyx_v_parser);
jpayne@68 22558
jpayne@68 22559 /* function exit code */
jpayne@68 22560 {
jpayne@68 22561 Py_ssize_t __pyx_temp;
jpayne@68 22562 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
jpayne@68 22563 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
jpayne@68 22564 }
jpayne@68 22565 }
jpayne@68 22566 __Pyx_RefNannyFinishContext();
jpayne@68 22567 return __pyx_r;
jpayne@68 22568 }
jpayne@68 22569
jpayne@68 22570 static PyObject *__pyx_pf_5pysam_9libctabix_4tabix_iterator(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_infile, PyObject *__pyx_v_parser) {
jpayne@68 22571 PyObject *__pyx_r = NULL;
jpayne@68 22572 __Pyx_TraceDeclarations
jpayne@68 22573 __Pyx_RefNannyDeclarations
jpayne@68 22574 PyObject *__pyx_t_1 = NULL;
jpayne@68 22575 PyObject *__pyx_t_2 = NULL;
jpayne@68 22576 PyObject *__pyx_t_3 = NULL;
jpayne@68 22577 unsigned int __pyx_t_4;
jpayne@68 22578 int __pyx_lineno = 0;
jpayne@68 22579 const char *__pyx_filename = NULL;
jpayne@68 22580 int __pyx_clineno = 0;
jpayne@68 22581 __Pyx_TraceFrameInit(__pyx_codeobj__51)
jpayne@68 22582 __Pyx_RefNannySetupContext("tabix_iterator", 1);
jpayne@68 22583 __Pyx_TraceCall("tabix_iterator", __pyx_f[0], 1238, 0, __PYX_ERR(0, 1238, __pyx_L1_error));
jpayne@68 22584
jpayne@68 22585 /* "pysam/libctabix.pyx":1248
jpayne@68 22586 *
jpayne@68 22587 * """
jpayne@68 22588 * return tabix_generic_iterator(infile, parser) # <<<<<<<<<<<<<<
jpayne@68 22589 *
jpayne@68 22590 *
jpayne@68 22591 */
jpayne@68 22592 __Pyx_XDECREF(__pyx_r);
jpayne@68 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@68 22594 __Pyx_GOTREF(__pyx_t_2);
jpayne@68 22595 __pyx_t_3 = NULL;
jpayne@68 22596 __pyx_t_4 = 0;
jpayne@68 22597 #if CYTHON_UNPACK_METHODS
jpayne@68 22598 if (unlikely(PyMethod_Check(__pyx_t_2))) {
jpayne@68 22599 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
jpayne@68 22600 if (likely(__pyx_t_3)) {
jpayne@68 22601 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
jpayne@68 22602 __Pyx_INCREF(__pyx_t_3);
jpayne@68 22603 __Pyx_INCREF(function);
jpayne@68 22604 __Pyx_DECREF_SET(__pyx_t_2, function);
jpayne@68 22605 __pyx_t_4 = 1;
jpayne@68 22606 }
jpayne@68 22607 }
jpayne@68 22608 #endif
jpayne@68 22609 {
jpayne@68 22610 PyObject *__pyx_callargs[3] = {__pyx_t_3, __pyx_v_infile, __pyx_v_parser};
jpayne@68 22611 __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 2+__pyx_t_4);
jpayne@68 22612 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
jpayne@68 22613 if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1248, __pyx_L1_error)
jpayne@68 22614 __Pyx_GOTREF(__pyx_t_1);
jpayne@68 22615 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@68 22616 }
jpayne@68 22617 __pyx_r = __pyx_t_1;
jpayne@68 22618 __pyx_t_1 = 0;
jpayne@68 22619 goto __pyx_L0;
jpayne@68 22620
jpayne@68 22621 /* "pysam/libctabix.pyx":1238
jpayne@68 22622 *
jpayne@68 22623 *
jpayne@68 22624 * def tabix_iterator(infile, parser): # <<<<<<<<<<<<<<
jpayne@68 22625 * """return an iterator over all entries in a file.
jpayne@68 22626 *
jpayne@68 22627 */
jpayne@68 22628
jpayne@68 22629 /* function exit code */
jpayne@68 22630 __pyx_L1_error:;
jpayne@68 22631 __Pyx_XDECREF(__pyx_t_1);
jpayne@68 22632 __Pyx_XDECREF(__pyx_t_2);
jpayne@68 22633 __Pyx_XDECREF(__pyx_t_3);
jpayne@68 22634 __Pyx_AddTraceback("pysam.libctabix.tabix_iterator", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@68 22635 __pyx_r = NULL;
jpayne@68 22636 __pyx_L0:;
jpayne@68 22637 __Pyx_XGIVEREF(__pyx_r);
jpayne@68 22638 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@68 22639 __Pyx_RefNannyFinishContext();
jpayne@68 22640 return __pyx_r;
jpayne@68 22641 }
jpayne@68 22642
jpayne@68 22643 /* "(tree fragment)":1
jpayne@68 22644 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
jpayne@68 22645 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
jpayne@68 22646 * def __setstate_cython__(self, __pyx_state):
jpayne@68 22647 */
jpayne@68 22648
jpayne@68 22649 /* Python wrapper */
jpayne@68 22650 static PyObject *__pyx_pw_5pysam_9libctabix_9Tabixfile_1__reduce_cython__(PyObject *__pyx_v_self,
jpayne@68 22651 #if CYTHON_METH_FASTCALL
jpayne@68 22652 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@68 22653 #else
jpayne@68 22654 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@68 22655 #endif
jpayne@68 22656 ); /*proto*/
jpayne@68 22657 PyDoc_STRVAR(__pyx_doc_5pysam_9libctabix_9Tabixfile___reduce_cython__, "Tabixfile.__reduce_cython__(self)");
jpayne@68 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@68 22659 static PyObject *__pyx_pw_5pysam_9libctabix_9Tabixfile_1__reduce_cython__(PyObject *__pyx_v_self,
jpayne@68 22660 #if CYTHON_METH_FASTCALL
jpayne@68 22661 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@68 22662 #else
jpayne@68 22663 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@68 22664 #endif
jpayne@68 22665 ) {
jpayne@68 22666 #if !CYTHON_METH_FASTCALL
jpayne@68 22667 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
jpayne@68 22668 #endif
jpayne@68 22669 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@68 22670 PyObject *__pyx_r = 0;
jpayne@68 22671 __Pyx_RefNannyDeclarations
jpayne@68 22672 __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
jpayne@68 22673 #if !CYTHON_METH_FASTCALL
jpayne@68 22674 #if CYTHON_ASSUME_SAFE_MACROS
jpayne@68 22675 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
jpayne@68 22676 #else
jpayne@68 22677 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
jpayne@68 22678 #endif
jpayne@68 22679 #endif
jpayne@68 22680 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
jpayne@68 22681 if (unlikely(__pyx_nargs > 0)) {
jpayne@68 22682 __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL;}
jpayne@68 22683 if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__reduce_cython__", 0))) return NULL;
jpayne@68 22684 __pyx_r = __pyx_pf_5pysam_9libctabix_9Tabixfile___reduce_cython__(((struct __pyx_obj_5pysam_9libctabix_Tabixfile *)__pyx_v_self));
jpayne@68 22685
jpayne@68 22686 /* function exit code */
jpayne@68 22687 __Pyx_RefNannyFinishContext();
jpayne@68 22688 return __pyx_r;
jpayne@68 22689 }
jpayne@68 22690
jpayne@68 22691 static PyObject *__pyx_pf_5pysam_9libctabix_9Tabixfile___reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5pysam_9libctabix_Tabixfile *__pyx_v_self) {
jpayne@68 22692 PyObject *__pyx_r = NULL;
jpayne@68 22693 __Pyx_TraceDeclarations
jpayne@68 22694 __Pyx_RefNannyDeclarations
jpayne@68 22695 int __pyx_lineno = 0;
jpayne@68 22696 const char *__pyx_filename = NULL;
jpayne@68 22697 int __pyx_clineno = 0;
jpayne@68 22698 __Pyx_TraceFrameInit(__pyx_codeobj__52)
jpayne@68 22699 __Pyx_RefNannySetupContext("__reduce_cython__", 1);
jpayne@68 22700 __Pyx_TraceCall("__reduce_cython__", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));
jpayne@68 22701
jpayne@68 22702 /* "(tree fragment)":2
jpayne@68 22703 * def __reduce_cython__(self):
jpayne@68 22704 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" # <<<<<<<<<<<<<<
jpayne@68 22705 * def __setstate_cython__(self, __pyx_state):
jpayne@68 22706 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
jpayne@68 22707 */
jpayne@68 22708 __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_no_default___reduce___due_to_non, 0, 0);
jpayne@68 22709 __PYX_ERR(1, 2, __pyx_L1_error)
jpayne@68 22710
jpayne@68 22711 /* "(tree fragment)":1
jpayne@68 22712 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
jpayne@68 22713 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
jpayne@68 22714 * def __setstate_cython__(self, __pyx_state):
jpayne@68 22715 */
jpayne@68 22716
jpayne@68 22717 /* function exit code */
jpayne@68 22718 __pyx_L1_error:;
jpayne@68 22719 __Pyx_AddTraceback("pysam.libctabix.Tabixfile.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@68 22720 __pyx_r = NULL;
jpayne@68 22721 __Pyx_XGIVEREF(__pyx_r);
jpayne@68 22722 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@68 22723 __Pyx_RefNannyFinishContext();
jpayne@68 22724 return __pyx_r;
jpayne@68 22725 }
jpayne@68 22726
jpayne@68 22727 /* "(tree fragment)":3
jpayne@68 22728 * def __reduce_cython__(self):
jpayne@68 22729 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
jpayne@68 22730 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
jpayne@68 22731 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
jpayne@68 22732 */
jpayne@68 22733
jpayne@68 22734 /* Python wrapper */
jpayne@68 22735 static PyObject *__pyx_pw_5pysam_9libctabix_9Tabixfile_3__setstate_cython__(PyObject *__pyx_v_self,
jpayne@68 22736 #if CYTHON_METH_FASTCALL
jpayne@68 22737 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@68 22738 #else
jpayne@68 22739 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@68 22740 #endif
jpayne@68 22741 ); /*proto*/
jpayne@68 22742 PyDoc_STRVAR(__pyx_doc_5pysam_9libctabix_9Tabixfile_2__setstate_cython__, "Tabixfile.__setstate_cython__(self, __pyx_state)");
jpayne@68 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@68 22744 static PyObject *__pyx_pw_5pysam_9libctabix_9Tabixfile_3__setstate_cython__(PyObject *__pyx_v_self,
jpayne@68 22745 #if CYTHON_METH_FASTCALL
jpayne@68 22746 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@68 22747 #else
jpayne@68 22748 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@68 22749 #endif
jpayne@68 22750 ) {
jpayne@68 22751 CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0;
jpayne@68 22752 #if !CYTHON_METH_FASTCALL
jpayne@68 22753 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
jpayne@68 22754 #endif
jpayne@68 22755 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@68 22756 PyObject* values[1] = {0};
jpayne@68 22757 int __pyx_lineno = 0;
jpayne@68 22758 const char *__pyx_filename = NULL;
jpayne@68 22759 int __pyx_clineno = 0;
jpayne@68 22760 PyObject *__pyx_r = 0;
jpayne@68 22761 __Pyx_RefNannyDeclarations
jpayne@68 22762 __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
jpayne@68 22763 #if !CYTHON_METH_FASTCALL
jpayne@68 22764 #if CYTHON_ASSUME_SAFE_MACROS
jpayne@68 22765 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
jpayne@68 22766 #else
jpayne@68 22767 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
jpayne@68 22768 #endif
jpayne@68 22769 #endif
jpayne@68 22770 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
jpayne@68 22771 {
jpayne@68 22772 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0};
jpayne@68 22773 if (__pyx_kwds) {
jpayne@68 22774 Py_ssize_t kw_args;
jpayne@68 22775 switch (__pyx_nargs) {
jpayne@68 22776 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
jpayne@68 22777 CYTHON_FALLTHROUGH;
jpayne@68 22778 case 0: break;
jpayne@68 22779 default: goto __pyx_L5_argtuple_error;
jpayne@68 22780 }
jpayne@68 22781 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
jpayne@68 22782 switch (__pyx_nargs) {
jpayne@68 22783 case 0:
jpayne@68 22784 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) {
jpayne@68 22785 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
jpayne@68 22786 kw_args--;
jpayne@68 22787 }
jpayne@68 22788 else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 3, __pyx_L3_error)
jpayne@68 22789 else goto __pyx_L5_argtuple_error;
jpayne@68 22790 }
jpayne@68 22791 if (unlikely(kw_args > 0)) {
jpayne@68 22792 const Py_ssize_t kwd_pos_args = __pyx_nargs;
jpayne@68 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@68 22794 }
jpayne@68 22795 } else if (unlikely(__pyx_nargs != 1)) {
jpayne@68 22796 goto __pyx_L5_argtuple_error;
jpayne@68 22797 } else {
jpayne@68 22798 values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
jpayne@68 22799 }
jpayne@68 22800 __pyx_v___pyx_state = values[0];
jpayne@68 22801 }
jpayne@68 22802 goto __pyx_L6_skip;
jpayne@68 22803 __pyx_L5_argtuple_error:;
jpayne@68 22804 __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 3, __pyx_L3_error)
jpayne@68 22805 __pyx_L6_skip:;
jpayne@68 22806 goto __pyx_L4_argument_unpacking_done;
jpayne@68 22807 __pyx_L3_error:;
jpayne@68 22808 {
jpayne@68 22809 Py_ssize_t __pyx_temp;
jpayne@68 22810 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
jpayne@68 22811 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
jpayne@68 22812 }
jpayne@68 22813 }
jpayne@68 22814 __Pyx_AddTraceback("pysam.libctabix.Tabixfile.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@68 22815 __Pyx_RefNannyFinishContext();
jpayne@68 22816 return NULL;
jpayne@68 22817 __pyx_L4_argument_unpacking_done:;
jpayne@68 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@68 22819
jpayne@68 22820 /* function exit code */
jpayne@68 22821 {
jpayne@68 22822 Py_ssize_t __pyx_temp;
jpayne@68 22823 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
jpayne@68 22824 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
jpayne@68 22825 }
jpayne@68 22826 }
jpayne@68 22827 __Pyx_RefNannyFinishContext();
jpayne@68 22828 return __pyx_r;
jpayne@68 22829 }
jpayne@68 22830
jpayne@68 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@68 22832 PyObject *__pyx_r = NULL;
jpayne@68 22833 __Pyx_TraceDeclarations
jpayne@68 22834 __Pyx_RefNannyDeclarations
jpayne@68 22835 int __pyx_lineno = 0;
jpayne@68 22836 const char *__pyx_filename = NULL;
jpayne@68 22837 int __pyx_clineno = 0;
jpayne@68 22838 __Pyx_TraceFrameInit(__pyx_codeobj__53)
jpayne@68 22839 __Pyx_RefNannySetupContext("__setstate_cython__", 1);
jpayne@68 22840 __Pyx_TraceCall("__setstate_cython__", __pyx_f[1], 3, 0, __PYX_ERR(1, 3, __pyx_L1_error));
jpayne@68 22841
jpayne@68 22842 /* "(tree fragment)":4
jpayne@68 22843 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
jpayne@68 22844 * def __setstate_cython__(self, __pyx_state):
jpayne@68 22845 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" # <<<<<<<<<<<<<<
jpayne@68 22846 */
jpayne@68 22847 __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_no_default___reduce___due_to_non, 0, 0);
jpayne@68 22848 __PYX_ERR(1, 4, __pyx_L1_error)
jpayne@68 22849
jpayne@68 22850 /* "(tree fragment)":3
jpayne@68 22851 * def __reduce_cython__(self):
jpayne@68 22852 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
jpayne@68 22853 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
jpayne@68 22854 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
jpayne@68 22855 */
jpayne@68 22856
jpayne@68 22857 /* function exit code */
jpayne@68 22858 __pyx_L1_error:;
jpayne@68 22859 __Pyx_AddTraceback("pysam.libctabix.Tabixfile.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@68 22860 __pyx_r = NULL;
jpayne@68 22861 __Pyx_XGIVEREF(__pyx_r);
jpayne@68 22862 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@68 22863 __Pyx_RefNannyFinishContext();
jpayne@68 22864 return __pyx_r;
jpayne@68 22865 }
jpayne@68 22866
jpayne@68 22867 /* "(tree fragment)":1
jpayne@68 22868 * def __pyx_unpickle_Parser(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
jpayne@68 22869 * cdef object __pyx_PickleError
jpayne@68 22870 * cdef object __pyx_result
jpayne@68 22871 */
jpayne@68 22872
jpayne@68 22873 /* Python wrapper */
jpayne@68 22874 static PyObject *__pyx_pw_5pysam_9libctabix_7__pyx_unpickle_Parser(PyObject *__pyx_self,
jpayne@68 22875 #if CYTHON_METH_FASTCALL
jpayne@68 22876 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@68 22877 #else
jpayne@68 22878 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@68 22879 #endif
jpayne@68 22880 ); /*proto*/
jpayne@68 22881 PyDoc_STRVAR(__pyx_doc_5pysam_9libctabix_6__pyx_unpickle_Parser, "__pyx_unpickle_Parser(__pyx_type, long __pyx_checksum, __pyx_state)");
jpayne@68 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@68 22883 static PyObject *__pyx_pw_5pysam_9libctabix_7__pyx_unpickle_Parser(PyObject *__pyx_self,
jpayne@68 22884 #if CYTHON_METH_FASTCALL
jpayne@68 22885 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@68 22886 #else
jpayne@68 22887 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@68 22888 #endif
jpayne@68 22889 ) {
jpayne@68 22890 PyObject *__pyx_v___pyx_type = 0;
jpayne@68 22891 long __pyx_v___pyx_checksum;
jpayne@68 22892 PyObject *__pyx_v___pyx_state = 0;
jpayne@68 22893 #if !CYTHON_METH_FASTCALL
jpayne@68 22894 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
jpayne@68 22895 #endif
jpayne@68 22896 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@68 22897 PyObject* values[3] = {0,0,0};
jpayne@68 22898 int __pyx_lineno = 0;
jpayne@68 22899 const char *__pyx_filename = NULL;
jpayne@68 22900 int __pyx_clineno = 0;
jpayne@68 22901 PyObject *__pyx_r = 0;
jpayne@68 22902 __Pyx_RefNannyDeclarations
jpayne@68 22903 __Pyx_RefNannySetupContext("__pyx_unpickle_Parser (wrapper)", 0);
jpayne@68 22904 #if !CYTHON_METH_FASTCALL
jpayne@68 22905 #if CYTHON_ASSUME_SAFE_MACROS
jpayne@68 22906 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
jpayne@68 22907 #else
jpayne@68 22908 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
jpayne@68 22909 #endif
jpayne@68 22910 #endif
jpayne@68 22911 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
jpayne@68 22912 {
jpayne@68 22913 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
jpayne@68 22914 if (__pyx_kwds) {
jpayne@68 22915 Py_ssize_t kw_args;
jpayne@68 22916 switch (__pyx_nargs) {
jpayne@68 22917 case 3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
jpayne@68 22918 CYTHON_FALLTHROUGH;
jpayne@68 22919 case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
jpayne@68 22920 CYTHON_FALLTHROUGH;
jpayne@68 22921 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
jpayne@68 22922 CYTHON_FALLTHROUGH;
jpayne@68 22923 case 0: break;
jpayne@68 22924 default: goto __pyx_L5_argtuple_error;
jpayne@68 22925 }
jpayne@68 22926 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
jpayne@68 22927 switch (__pyx_nargs) {
jpayne@68 22928 case 0:
jpayne@68 22929 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_type)) != 0)) {
jpayne@68 22930 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
jpayne@68 22931 kw_args--;
jpayne@68 22932 }
jpayne@68 22933 else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
jpayne@68 22934 else goto __pyx_L5_argtuple_error;
jpayne@68 22935 CYTHON_FALLTHROUGH;
jpayne@68 22936 case 1:
jpayne@68 22937 if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_checksum)) != 0)) {
jpayne@68 22938 (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
jpayne@68 22939 kw_args--;
jpayne@68 22940 }
jpayne@68 22941 else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
jpayne@68 22942 else {
jpayne@68 22943 __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Parser", 1, 3, 3, 1); __PYX_ERR(1, 1, __pyx_L3_error)
jpayne@68 22944 }
jpayne@68 22945 CYTHON_FALLTHROUGH;
jpayne@68 22946 case 2:
jpayne@68 22947 if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) {
jpayne@68 22948 (void)__Pyx_Arg_NewRef_FASTCALL(values[2]);
jpayne@68 22949 kw_args--;
jpayne@68 22950 }
jpayne@68 22951 else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
jpayne@68 22952 else {
jpayne@68 22953 __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Parser", 1, 3, 3, 2); __PYX_ERR(1, 1, __pyx_L3_error)
jpayne@68 22954 }
jpayne@68 22955 }
jpayne@68 22956 if (unlikely(kw_args > 0)) {
jpayne@68 22957 const Py_ssize_t kwd_pos_args = __pyx_nargs;
jpayne@68 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@68 22959 }
jpayne@68 22960 } else if (unlikely(__pyx_nargs != 3)) {
jpayne@68 22961 goto __pyx_L5_argtuple_error;
jpayne@68 22962 } else {
jpayne@68 22963 values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
jpayne@68 22964 values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
jpayne@68 22965 values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
jpayne@68 22966 }
jpayne@68 22967 __pyx_v___pyx_type = values[0];
jpayne@68 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@68 22969 __pyx_v___pyx_state = values[2];
jpayne@68 22970 }
jpayne@68 22971 goto __pyx_L6_skip;
jpayne@68 22972 __pyx_L5_argtuple_error:;
jpayne@68 22973 __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_Parser", 1, 3, 3, __pyx_nargs); __PYX_ERR(1, 1, __pyx_L3_error)
jpayne@68 22974 __pyx_L6_skip:;
jpayne@68 22975 goto __pyx_L4_argument_unpacking_done;
jpayne@68 22976 __pyx_L3_error:;
jpayne@68 22977 {
jpayne@68 22978 Py_ssize_t __pyx_temp;
jpayne@68 22979 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
jpayne@68 22980 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
jpayne@68 22981 }
jpayne@68 22982 }
jpayne@68 22983 __Pyx_AddTraceback("pysam.libctabix.__pyx_unpickle_Parser", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@68 22984 __Pyx_RefNannyFinishContext();
jpayne@68 22985 return NULL;
jpayne@68 22986 __pyx_L4_argument_unpacking_done:;
jpayne@68 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@68 22988
jpayne@68 22989 /* function exit code */
jpayne@68 22990 {
jpayne@68 22991 Py_ssize_t __pyx_temp;
jpayne@68 22992 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
jpayne@68 22993 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
jpayne@68 22994 }
jpayne@68 22995 }
jpayne@68 22996 __Pyx_RefNannyFinishContext();
jpayne@68 22997 return __pyx_r;
jpayne@68 22998 }
jpayne@68 22999
jpayne@68 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@68 23001 PyObject *__pyx_v___pyx_PickleError = 0;
jpayne@68 23002 PyObject *__pyx_v___pyx_result = 0;
jpayne@68 23003 PyObject *__pyx_r = NULL;
jpayne@68 23004 __Pyx_TraceDeclarations
jpayne@68 23005 __Pyx_RefNannyDeclarations
jpayne@68 23006 PyObject *__pyx_t_1 = NULL;
jpayne@68 23007 int __pyx_t_2;
jpayne@68 23008 PyObject *__pyx_t_3 = NULL;
jpayne@68 23009 PyObject *__pyx_t_4 = NULL;
jpayne@68 23010 unsigned int __pyx_t_5;
jpayne@68 23011 int __pyx_lineno = 0;
jpayne@68 23012 const char *__pyx_filename = NULL;
jpayne@68 23013 int __pyx_clineno = 0;
jpayne@68 23014 __Pyx_TraceFrameInit(__pyx_codeobj__54)
jpayne@68 23015 __Pyx_RefNannySetupContext("__pyx_unpickle_Parser", 1);
jpayne@68 23016 __Pyx_TraceCall("__pyx_unpickle_Parser", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));
jpayne@68 23017
jpayne@68 23018 /* "(tree fragment)":4
jpayne@68 23019 * cdef object __pyx_PickleError
jpayne@68 23020 * cdef object __pyx_result
jpayne@68 23021 * if __pyx_checksum not in (0xe8424ea, 0x14a9dc0, 0x84bea1f): # <<<<<<<<<<<<<<
jpayne@68 23022 * from pickle import PickleError as __pyx_PickleError
jpayne@68 23023 * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xe8424ea, 0x14a9dc0, 0x84bea1f) = (encoding))" % __pyx_checksum
jpayne@68 23024 */
jpayne@68 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@68 23026 __Pyx_GOTREF(__pyx_t_1);
jpayne@68 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@68 23028 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@68 23029 if (__pyx_t_2) {
jpayne@68 23030
jpayne@68 23031 /* "(tree fragment)":5
jpayne@68 23032 * cdef object __pyx_result
jpayne@68 23033 * if __pyx_checksum not in (0xe8424ea, 0x14a9dc0, 0x84bea1f):
jpayne@68 23034 * from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<<
jpayne@68 23035 * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xe8424ea, 0x14a9dc0, 0x84bea1f) = (encoding))" % __pyx_checksum
jpayne@68 23036 * __pyx_result = Parser.__new__(__pyx_type)
jpayne@68 23037 */
jpayne@68 23038 __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
jpayne@68 23039 __Pyx_GOTREF(__pyx_t_1);
jpayne@68 23040 __Pyx_INCREF(__pyx_n_s_PickleError);
jpayne@68 23041 __Pyx_GIVEREF(__pyx_n_s_PickleError);
jpayne@68 23042 if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_PickleError)) __PYX_ERR(1, 5, __pyx_L1_error);
jpayne@68 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@68 23044 __Pyx_GOTREF(__pyx_t_3);
jpayne@68 23045 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@68 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@68 23047 __Pyx_GOTREF(__pyx_t_1);
jpayne@68 23048 __Pyx_INCREF(__pyx_t_1);
jpayne@68 23049 __pyx_v___pyx_PickleError = __pyx_t_1;
jpayne@68 23050 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@68 23051 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
jpayne@68 23052
jpayne@68 23053 /* "(tree fragment)":6
jpayne@68 23054 * if __pyx_checksum not in (0xe8424ea, 0x14a9dc0, 0x84bea1f):
jpayne@68 23055 * from pickle import PickleError as __pyx_PickleError
jpayne@68 23056 * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xe8424ea, 0x14a9dc0, 0x84bea1f) = (encoding))" % __pyx_checksum # <<<<<<<<<<<<<<
jpayne@68 23057 * __pyx_result = Parser.__new__(__pyx_type)
jpayne@68 23058 * if __pyx_state is not None:
jpayne@68 23059 */
jpayne@68 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@68 23061 __Pyx_GOTREF(__pyx_t_3);
jpayne@68 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@68 23063 __Pyx_GOTREF(__pyx_t_1);
jpayne@68 23064 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
jpayne@68 23065 __Pyx_Raise(__pyx_v___pyx_PickleError, __pyx_t_1, 0, 0);
jpayne@68 23066 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@68 23067 __PYX_ERR(1, 6, __pyx_L1_error)
jpayne@68 23068
jpayne@68 23069 /* "(tree fragment)":4
jpayne@68 23070 * cdef object __pyx_PickleError
jpayne@68 23071 * cdef object __pyx_result
jpayne@68 23072 * if __pyx_checksum not in (0xe8424ea, 0x14a9dc0, 0x84bea1f): # <<<<<<<<<<<<<<
jpayne@68 23073 * from pickle import PickleError as __pyx_PickleError
jpayne@68 23074 * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xe8424ea, 0x14a9dc0, 0x84bea1f) = (encoding))" % __pyx_checksum
jpayne@68 23075 */
jpayne@68 23076 }
jpayne@68 23077
jpayne@68 23078 /* "(tree fragment)":7
jpayne@68 23079 * from pickle import PickleError as __pyx_PickleError
jpayne@68 23080 * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xe8424ea, 0x14a9dc0, 0x84bea1f) = (encoding))" % __pyx_checksum
jpayne@68 23081 * __pyx_result = Parser.__new__(__pyx_type) # <<<<<<<<<<<<<<
jpayne@68 23082 * if __pyx_state is not None:
jpayne@68 23083 * __pyx_unpickle_Parser__set_state(<Parser> __pyx_result, __pyx_state)
jpayne@68 23084 */
jpayne@68 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@68 23086 __Pyx_GOTREF(__pyx_t_3);
jpayne@68 23087 __pyx_t_4 = NULL;
jpayne@68 23088 __pyx_t_5 = 0;
jpayne@68 23089 #if CYTHON_UNPACK_METHODS
jpayne@68 23090 if (likely(PyMethod_Check(__pyx_t_3))) {
jpayne@68 23091 __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
jpayne@68 23092 if (likely(__pyx_t_4)) {
jpayne@68 23093 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
jpayne@68 23094 __Pyx_INCREF(__pyx_t_4);
jpayne@68 23095 __Pyx_INCREF(function);
jpayne@68 23096 __Pyx_DECREF_SET(__pyx_t_3, function);
jpayne@68 23097 __pyx_t_5 = 1;
jpayne@68 23098 }
jpayne@68 23099 }
jpayne@68 23100 #endif
jpayne@68 23101 {
jpayne@68 23102 PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v___pyx_type};
jpayne@68 23103 __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
jpayne@68 23104 __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
jpayne@68 23105 if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 7, __pyx_L1_error)
jpayne@68 23106 __Pyx_GOTREF(__pyx_t_1);
jpayne@68 23107 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
jpayne@68 23108 }
jpayne@68 23109 __pyx_v___pyx_result = __pyx_t_1;
jpayne@68 23110 __pyx_t_1 = 0;
jpayne@68 23111
jpayne@68 23112 /* "(tree fragment)":8
jpayne@68 23113 * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xe8424ea, 0x14a9dc0, 0x84bea1f) = (encoding))" % __pyx_checksum
jpayne@68 23114 * __pyx_result = Parser.__new__(__pyx_type)
jpayne@68 23115 * if __pyx_state is not None: # <<<<<<<<<<<<<<
jpayne@68 23116 * __pyx_unpickle_Parser__set_state(<Parser> __pyx_result, __pyx_state)
jpayne@68 23117 * return __pyx_result
jpayne@68 23118 */
jpayne@68 23119 __pyx_t_2 = (__pyx_v___pyx_state != Py_None);
jpayne@68 23120 if (__pyx_t_2) {
jpayne@68 23121
jpayne@68 23122 /* "(tree fragment)":9
jpayne@68 23123 * __pyx_result = Parser.__new__(__pyx_type)
jpayne@68 23124 * if __pyx_state is not None:
jpayne@68 23125 * __pyx_unpickle_Parser__set_state(<Parser> __pyx_result, __pyx_state) # <<<<<<<<<<<<<<
jpayne@68 23126 * return __pyx_result
jpayne@68 23127 * cdef __pyx_unpickle_Parser__set_state(Parser __pyx_result, tuple __pyx_state):
jpayne@68 23128 */
jpayne@68 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@68 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@68 23131 __Pyx_GOTREF(__pyx_t_1);
jpayne@68 23132 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@68 23133
jpayne@68 23134 /* "(tree fragment)":8
jpayne@68 23135 * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xe8424ea, 0x14a9dc0, 0x84bea1f) = (encoding))" % __pyx_checksum
jpayne@68 23136 * __pyx_result = Parser.__new__(__pyx_type)
jpayne@68 23137 * if __pyx_state is not None: # <<<<<<<<<<<<<<
jpayne@68 23138 * __pyx_unpickle_Parser__set_state(<Parser> __pyx_result, __pyx_state)
jpayne@68 23139 * return __pyx_result
jpayne@68 23140 */
jpayne@68 23141 }
jpayne@68 23142
jpayne@68 23143 /* "(tree fragment)":10
jpayne@68 23144 * if __pyx_state is not None:
jpayne@68 23145 * __pyx_unpickle_Parser__set_state(<Parser> __pyx_result, __pyx_state)
jpayne@68 23146 * return __pyx_result # <<<<<<<<<<<<<<
jpayne@68 23147 * cdef __pyx_unpickle_Parser__set_state(Parser __pyx_result, tuple __pyx_state):
jpayne@68 23148 * __pyx_result.encoding = __pyx_state[0]
jpayne@68 23149 */
jpayne@68 23150 __Pyx_XDECREF(__pyx_r);
jpayne@68 23151 __Pyx_INCREF(__pyx_v___pyx_result);
jpayne@68 23152 __pyx_r = __pyx_v___pyx_result;
jpayne@68 23153 goto __pyx_L0;
jpayne@68 23154
jpayne@68 23155 /* "(tree fragment)":1
jpayne@68 23156 * def __pyx_unpickle_Parser(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
jpayne@68 23157 * cdef object __pyx_PickleError
jpayne@68 23158 * cdef object __pyx_result
jpayne@68 23159 */
jpayne@68 23160
jpayne@68 23161 /* function exit code */
jpayne@68 23162 __pyx_L1_error:;
jpayne@68 23163 __Pyx_XDECREF(__pyx_t_1);
jpayne@68 23164 __Pyx_XDECREF(__pyx_t_3);
jpayne@68 23165 __Pyx_XDECREF(__pyx_t_4);
jpayne@68 23166 __Pyx_AddTraceback("pysam.libctabix.__pyx_unpickle_Parser", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@68 23167 __pyx_r = NULL;
jpayne@68 23168 __pyx_L0:;
jpayne@68 23169 __Pyx_XDECREF(__pyx_v___pyx_PickleError);
jpayne@68 23170 __Pyx_XDECREF(__pyx_v___pyx_result);
jpayne@68 23171 __Pyx_XGIVEREF(__pyx_r);
jpayne@68 23172 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@68 23173 __Pyx_RefNannyFinishContext();
jpayne@68 23174 return __pyx_r;
jpayne@68 23175 }
jpayne@68 23176
jpayne@68 23177 /* "(tree fragment)":11
jpayne@68 23178 * __pyx_unpickle_Parser__set_state(<Parser> __pyx_result, __pyx_state)
jpayne@68 23179 * return __pyx_result
jpayne@68 23180 * cdef __pyx_unpickle_Parser__set_state(Parser __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
jpayne@68 23181 * __pyx_result.encoding = __pyx_state[0]
jpayne@68 23182 * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
jpayne@68 23183 */
jpayne@68 23184
jpayne@68 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@68 23186 PyObject *__pyx_r = NULL;
jpayne@68 23187 __Pyx_TraceDeclarations
jpayne@68 23188 __Pyx_RefNannyDeclarations
jpayne@68 23189 PyObject *__pyx_t_1 = NULL;
jpayne@68 23190 int __pyx_t_2;
jpayne@68 23191 Py_ssize_t __pyx_t_3;
jpayne@68 23192 int __pyx_t_4;
jpayne@68 23193 PyObject *__pyx_t_5 = NULL;
jpayne@68 23194 PyObject *__pyx_t_6 = NULL;
jpayne@68 23195 PyObject *__pyx_t_7 = NULL;
jpayne@68 23196 unsigned int __pyx_t_8;
jpayne@68 23197 int __pyx_lineno = 0;
jpayne@68 23198 const char *__pyx_filename = NULL;
jpayne@68 23199 int __pyx_clineno = 0;
jpayne@68 23200 __Pyx_RefNannySetupContext("__pyx_unpickle_Parser__set_state", 1);
jpayne@68 23201 __Pyx_TraceCall("__pyx_unpickle_Parser__set_state", __pyx_f[1], 11, 0, __PYX_ERR(1, 11, __pyx_L1_error));
jpayne@68 23202
jpayne@68 23203 /* "(tree fragment)":12
jpayne@68 23204 * return __pyx_result
jpayne@68 23205 * cdef __pyx_unpickle_Parser__set_state(Parser __pyx_result, tuple __pyx_state):
jpayne@68 23206 * __pyx_result.encoding = __pyx_state[0] # <<<<<<<<<<<<<<
jpayne@68 23207 * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
jpayne@68 23208 * __pyx_result.__dict__.update(__pyx_state[1])
jpayne@68 23209 */
jpayne@68 23210 if (unlikely(__pyx_v___pyx_state == Py_None)) {
jpayne@68 23211 PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
jpayne@68 23212 __PYX_ERR(1, 12, __pyx_L1_error)
jpayne@68 23213 }
jpayne@68 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@68 23215 __Pyx_GOTREF(__pyx_t_1);
jpayne@68 23216 __Pyx_GIVEREF(__pyx_t_1);
jpayne@68 23217 __Pyx_GOTREF(__pyx_v___pyx_result->encoding);
jpayne@68 23218 __Pyx_DECREF(__pyx_v___pyx_result->encoding);
jpayne@68 23219 __pyx_v___pyx_result->encoding = __pyx_t_1;
jpayne@68 23220 __pyx_t_1 = 0;
jpayne@68 23221
jpayne@68 23222 /* "(tree fragment)":13
jpayne@68 23223 * cdef __pyx_unpickle_Parser__set_state(Parser __pyx_result, tuple __pyx_state):
jpayne@68 23224 * __pyx_result.encoding = __pyx_state[0]
jpayne@68 23225 * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
jpayne@68 23226 * __pyx_result.__dict__.update(__pyx_state[1])
jpayne@68 23227 */
jpayne@68 23228 if (unlikely(__pyx_v___pyx_state == Py_None)) {
jpayne@68 23229 PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
jpayne@68 23230 __PYX_ERR(1, 13, __pyx_L1_error)
jpayne@68 23231 }
jpayne@68 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@68 23233 __pyx_t_4 = (__pyx_t_3 > 1);
jpayne@68 23234 if (__pyx_t_4) {
jpayne@68 23235 } else {
jpayne@68 23236 __pyx_t_2 = __pyx_t_4;
jpayne@68 23237 goto __pyx_L4_bool_binop_done;
jpayne@68 23238 }
jpayne@68 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@68 23240 __pyx_t_2 = __pyx_t_4;
jpayne@68 23241 __pyx_L4_bool_binop_done:;
jpayne@68 23242 if (__pyx_t_2) {
jpayne@68 23243
jpayne@68 23244 /* "(tree fragment)":14
jpayne@68 23245 * __pyx_result.encoding = __pyx_state[0]
jpayne@68 23246 * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
jpayne@68 23247 * __pyx_result.__dict__.update(__pyx_state[1]) # <<<<<<<<<<<<<<
jpayne@68 23248 */
jpayne@68 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@68 23250 __Pyx_GOTREF(__pyx_t_5);
jpayne@68 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@68 23252 __Pyx_GOTREF(__pyx_t_6);
jpayne@68 23253 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
jpayne@68 23254 if (unlikely(__pyx_v___pyx_state == Py_None)) {
jpayne@68 23255 PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
jpayne@68 23256 __PYX_ERR(1, 14, __pyx_L1_error)
jpayne@68 23257 }
jpayne@68 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@68 23259 __Pyx_GOTREF(__pyx_t_5);
jpayne@68 23260 __pyx_t_7 = NULL;
jpayne@68 23261 __pyx_t_8 = 0;
jpayne@68 23262 #if CYTHON_UNPACK_METHODS
jpayne@68 23263 if (likely(PyMethod_Check(__pyx_t_6))) {
jpayne@68 23264 __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
jpayne@68 23265 if (likely(__pyx_t_7)) {
jpayne@68 23266 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
jpayne@68 23267 __Pyx_INCREF(__pyx_t_7);
jpayne@68 23268 __Pyx_INCREF(function);
jpayne@68 23269 __Pyx_DECREF_SET(__pyx_t_6, function);
jpayne@68 23270 __pyx_t_8 = 1;
jpayne@68 23271 }
jpayne@68 23272 }
jpayne@68 23273 #endif
jpayne@68 23274 {
jpayne@68 23275 PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_5};
jpayne@68 23276 __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8);
jpayne@68 23277 __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
jpayne@68 23278 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
jpayne@68 23279 if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 14, __pyx_L1_error)
jpayne@68 23280 __Pyx_GOTREF(__pyx_t_1);
jpayne@68 23281 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
jpayne@68 23282 }
jpayne@68 23283 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@68 23284
jpayne@68 23285 /* "(tree fragment)":13
jpayne@68 23286 * cdef __pyx_unpickle_Parser__set_state(Parser __pyx_result, tuple __pyx_state):
jpayne@68 23287 * __pyx_result.encoding = __pyx_state[0]
jpayne@68 23288 * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
jpayne@68 23289 * __pyx_result.__dict__.update(__pyx_state[1])
jpayne@68 23290 */
jpayne@68 23291 }
jpayne@68 23292
jpayne@68 23293 /* "(tree fragment)":11
jpayne@68 23294 * __pyx_unpickle_Parser__set_state(<Parser> __pyx_result, __pyx_state)
jpayne@68 23295 * return __pyx_result
jpayne@68 23296 * cdef __pyx_unpickle_Parser__set_state(Parser __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
jpayne@68 23297 * __pyx_result.encoding = __pyx_state[0]
jpayne@68 23298 * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
jpayne@68 23299 */
jpayne@68 23300
jpayne@68 23301 /* function exit code */
jpayne@68 23302 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
jpayne@68 23303 goto __pyx_L0;
jpayne@68 23304 __pyx_L1_error:;
jpayne@68 23305 __Pyx_XDECREF(__pyx_t_1);
jpayne@68 23306 __Pyx_XDECREF(__pyx_t_5);
jpayne@68 23307 __Pyx_XDECREF(__pyx_t_6);
jpayne@68 23308 __Pyx_XDECREF(__pyx_t_7);
jpayne@68 23309 __Pyx_AddTraceback("pysam.libctabix.__pyx_unpickle_Parser__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@68 23310 __pyx_r = 0;
jpayne@68 23311 __pyx_L0:;
jpayne@68 23312 __Pyx_XGIVEREF(__pyx_r);
jpayne@68 23313 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@68 23314 __Pyx_RefNannyFinishContext();
jpayne@68 23315 return __pyx_r;
jpayne@68 23316 }
jpayne@68 23317
jpayne@68 23318 /* "(tree fragment)":1
jpayne@68 23319 * def __pyx_unpickle_asTuple(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
jpayne@68 23320 * cdef object __pyx_PickleError
jpayne@68 23321 * cdef object __pyx_result
jpayne@68 23322 */
jpayne@68 23323
jpayne@68 23324 /* Python wrapper */
jpayne@68 23325 static PyObject *__pyx_pw_5pysam_9libctabix_9__pyx_unpickle_asTuple(PyObject *__pyx_self,
jpayne@68 23326 #if CYTHON_METH_FASTCALL
jpayne@68 23327 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@68 23328 #else
jpayne@68 23329 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@68 23330 #endif
jpayne@68 23331 ); /*proto*/
jpayne@68 23332 PyDoc_STRVAR(__pyx_doc_5pysam_9libctabix_8__pyx_unpickle_asTuple, "__pyx_unpickle_asTuple(__pyx_type, long __pyx_checksum, __pyx_state)");
jpayne@68 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@68 23334 static PyObject *__pyx_pw_5pysam_9libctabix_9__pyx_unpickle_asTuple(PyObject *__pyx_self,
jpayne@68 23335 #if CYTHON_METH_FASTCALL
jpayne@68 23336 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@68 23337 #else
jpayne@68 23338 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@68 23339 #endif
jpayne@68 23340 ) {
jpayne@68 23341 PyObject *__pyx_v___pyx_type = 0;
jpayne@68 23342 long __pyx_v___pyx_checksum;
jpayne@68 23343 PyObject *__pyx_v___pyx_state = 0;
jpayne@68 23344 #if !CYTHON_METH_FASTCALL
jpayne@68 23345 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
jpayne@68 23346 #endif
jpayne@68 23347 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@68 23348 PyObject* values[3] = {0,0,0};
jpayne@68 23349 int __pyx_lineno = 0;
jpayne@68 23350 const char *__pyx_filename = NULL;
jpayne@68 23351 int __pyx_clineno = 0;
jpayne@68 23352 PyObject *__pyx_r = 0;
jpayne@68 23353 __Pyx_RefNannyDeclarations
jpayne@68 23354 __Pyx_RefNannySetupContext("__pyx_unpickle_asTuple (wrapper)", 0);
jpayne@68 23355 #if !CYTHON_METH_FASTCALL
jpayne@68 23356 #if CYTHON_ASSUME_SAFE_MACROS
jpayne@68 23357 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
jpayne@68 23358 #else
jpayne@68 23359 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
jpayne@68 23360 #endif
jpayne@68 23361 #endif
jpayne@68 23362 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
jpayne@68 23363 {
jpayne@68 23364 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
jpayne@68 23365 if (__pyx_kwds) {
jpayne@68 23366 Py_ssize_t kw_args;
jpayne@68 23367 switch (__pyx_nargs) {
jpayne@68 23368 case 3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
jpayne@68 23369 CYTHON_FALLTHROUGH;
jpayne@68 23370 case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
jpayne@68 23371 CYTHON_FALLTHROUGH;
jpayne@68 23372 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
jpayne@68 23373 CYTHON_FALLTHROUGH;
jpayne@68 23374 case 0: break;
jpayne@68 23375 default: goto __pyx_L5_argtuple_error;
jpayne@68 23376 }
jpayne@68 23377 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
jpayne@68 23378 switch (__pyx_nargs) {
jpayne@68 23379 case 0:
jpayne@68 23380 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_type)) != 0)) {
jpayne@68 23381 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
jpayne@68 23382 kw_args--;
jpayne@68 23383 }
jpayne@68 23384 else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
jpayne@68 23385 else goto __pyx_L5_argtuple_error;
jpayne@68 23386 CYTHON_FALLTHROUGH;
jpayne@68 23387 case 1:
jpayne@68 23388 if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_checksum)) != 0)) {
jpayne@68 23389 (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
jpayne@68 23390 kw_args--;
jpayne@68 23391 }
jpayne@68 23392 else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
jpayne@68 23393 else {
jpayne@68 23394 __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_asTuple", 1, 3, 3, 1); __PYX_ERR(1, 1, __pyx_L3_error)
jpayne@68 23395 }
jpayne@68 23396 CYTHON_FALLTHROUGH;
jpayne@68 23397 case 2:
jpayne@68 23398 if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) {
jpayne@68 23399 (void)__Pyx_Arg_NewRef_FASTCALL(values[2]);
jpayne@68 23400 kw_args--;
jpayne@68 23401 }
jpayne@68 23402 else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
jpayne@68 23403 else {
jpayne@68 23404 __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_asTuple", 1, 3, 3, 2); __PYX_ERR(1, 1, __pyx_L3_error)
jpayne@68 23405 }
jpayne@68 23406 }
jpayne@68 23407 if (unlikely(kw_args > 0)) {
jpayne@68 23408 const Py_ssize_t kwd_pos_args = __pyx_nargs;
jpayne@68 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@68 23410 }
jpayne@68 23411 } else if (unlikely(__pyx_nargs != 3)) {
jpayne@68 23412 goto __pyx_L5_argtuple_error;
jpayne@68 23413 } else {
jpayne@68 23414 values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
jpayne@68 23415 values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
jpayne@68 23416 values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
jpayne@68 23417 }
jpayne@68 23418 __pyx_v___pyx_type = values[0];
jpayne@68 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@68 23420 __pyx_v___pyx_state = values[2];
jpayne@68 23421 }
jpayne@68 23422 goto __pyx_L6_skip;
jpayne@68 23423 __pyx_L5_argtuple_error:;
jpayne@68 23424 __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_asTuple", 1, 3, 3, __pyx_nargs); __PYX_ERR(1, 1, __pyx_L3_error)
jpayne@68 23425 __pyx_L6_skip:;
jpayne@68 23426 goto __pyx_L4_argument_unpacking_done;
jpayne@68 23427 __pyx_L3_error:;
jpayne@68 23428 {
jpayne@68 23429 Py_ssize_t __pyx_temp;
jpayne@68 23430 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
jpayne@68 23431 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
jpayne@68 23432 }
jpayne@68 23433 }
jpayne@68 23434 __Pyx_AddTraceback("pysam.libctabix.__pyx_unpickle_asTuple", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@68 23435 __Pyx_RefNannyFinishContext();
jpayne@68 23436 return NULL;
jpayne@68 23437 __pyx_L4_argument_unpacking_done:;
jpayne@68 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@68 23439
jpayne@68 23440 /* function exit code */
jpayne@68 23441 {
jpayne@68 23442 Py_ssize_t __pyx_temp;
jpayne@68 23443 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
jpayne@68 23444 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
jpayne@68 23445 }
jpayne@68 23446 }
jpayne@68 23447 __Pyx_RefNannyFinishContext();
jpayne@68 23448 return __pyx_r;
jpayne@68 23449 }
jpayne@68 23450
jpayne@68 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@68 23452 PyObject *__pyx_v___pyx_PickleError = 0;
jpayne@68 23453 PyObject *__pyx_v___pyx_result = 0;
jpayne@68 23454 PyObject *__pyx_r = NULL;
jpayne@68 23455 __Pyx_TraceDeclarations
jpayne@68 23456 __Pyx_RefNannyDeclarations
jpayne@68 23457 PyObject *__pyx_t_1 = NULL;
jpayne@68 23458 int __pyx_t_2;
jpayne@68 23459 PyObject *__pyx_t_3 = NULL;
jpayne@68 23460 PyObject *__pyx_t_4 = NULL;
jpayne@68 23461 unsigned int __pyx_t_5;
jpayne@68 23462 int __pyx_lineno = 0;
jpayne@68 23463 const char *__pyx_filename = NULL;
jpayne@68 23464 int __pyx_clineno = 0;
jpayne@68 23465 __Pyx_TraceFrameInit(__pyx_codeobj__57)
jpayne@68 23466 __Pyx_RefNannySetupContext("__pyx_unpickle_asTuple", 1);
jpayne@68 23467 __Pyx_TraceCall("__pyx_unpickle_asTuple", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));
jpayne@68 23468
jpayne@68 23469 /* "(tree fragment)":4
jpayne@68 23470 * cdef object __pyx_PickleError
jpayne@68 23471 * cdef object __pyx_result
jpayne@68 23472 * if __pyx_checksum not in (0xe8424ea, 0x14a9dc0, 0x84bea1f): # <<<<<<<<<<<<<<
jpayne@68 23473 * from pickle import PickleError as __pyx_PickleError
jpayne@68 23474 * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xe8424ea, 0x14a9dc0, 0x84bea1f) = (encoding))" % __pyx_checksum
jpayne@68 23475 */
jpayne@68 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@68 23477 __Pyx_GOTREF(__pyx_t_1);
jpayne@68 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@68 23479 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@68 23480 if (__pyx_t_2) {
jpayne@68 23481
jpayne@68 23482 /* "(tree fragment)":5
jpayne@68 23483 * cdef object __pyx_result
jpayne@68 23484 * if __pyx_checksum not in (0xe8424ea, 0x14a9dc0, 0x84bea1f):
jpayne@68 23485 * from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<<
jpayne@68 23486 * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xe8424ea, 0x14a9dc0, 0x84bea1f) = (encoding))" % __pyx_checksum
jpayne@68 23487 * __pyx_result = asTuple.__new__(__pyx_type)
jpayne@68 23488 */
jpayne@68 23489 __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
jpayne@68 23490 __Pyx_GOTREF(__pyx_t_1);
jpayne@68 23491 __Pyx_INCREF(__pyx_n_s_PickleError);
jpayne@68 23492 __Pyx_GIVEREF(__pyx_n_s_PickleError);
jpayne@68 23493 if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_PickleError)) __PYX_ERR(1, 5, __pyx_L1_error);
jpayne@68 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@68 23495 __Pyx_GOTREF(__pyx_t_3);
jpayne@68 23496 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@68 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@68 23498 __Pyx_GOTREF(__pyx_t_1);
jpayne@68 23499 __Pyx_INCREF(__pyx_t_1);
jpayne@68 23500 __pyx_v___pyx_PickleError = __pyx_t_1;
jpayne@68 23501 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@68 23502 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
jpayne@68 23503
jpayne@68 23504 /* "(tree fragment)":6
jpayne@68 23505 * if __pyx_checksum not in (0xe8424ea, 0x14a9dc0, 0x84bea1f):
jpayne@68 23506 * from pickle import PickleError as __pyx_PickleError
jpayne@68 23507 * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xe8424ea, 0x14a9dc0, 0x84bea1f) = (encoding))" % __pyx_checksum # <<<<<<<<<<<<<<
jpayne@68 23508 * __pyx_result = asTuple.__new__(__pyx_type)
jpayne@68 23509 * if __pyx_state is not None:
jpayne@68 23510 */
jpayne@68 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@68 23512 __Pyx_GOTREF(__pyx_t_3);
jpayne@68 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@68 23514 __Pyx_GOTREF(__pyx_t_1);
jpayne@68 23515 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
jpayne@68 23516 __Pyx_Raise(__pyx_v___pyx_PickleError, __pyx_t_1, 0, 0);
jpayne@68 23517 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@68 23518 __PYX_ERR(1, 6, __pyx_L1_error)
jpayne@68 23519
jpayne@68 23520 /* "(tree fragment)":4
jpayne@68 23521 * cdef object __pyx_PickleError
jpayne@68 23522 * cdef object __pyx_result
jpayne@68 23523 * if __pyx_checksum not in (0xe8424ea, 0x14a9dc0, 0x84bea1f): # <<<<<<<<<<<<<<
jpayne@68 23524 * from pickle import PickleError as __pyx_PickleError
jpayne@68 23525 * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xe8424ea, 0x14a9dc0, 0x84bea1f) = (encoding))" % __pyx_checksum
jpayne@68 23526 */
jpayne@68 23527 }
jpayne@68 23528
jpayne@68 23529 /* "(tree fragment)":7
jpayne@68 23530 * from pickle import PickleError as __pyx_PickleError
jpayne@68 23531 * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xe8424ea, 0x14a9dc0, 0x84bea1f) = (encoding))" % __pyx_checksum
jpayne@68 23532 * __pyx_result = asTuple.__new__(__pyx_type) # <<<<<<<<<<<<<<
jpayne@68 23533 * if __pyx_state is not None:
jpayne@68 23534 * __pyx_unpickle_asTuple__set_state(<asTuple> __pyx_result, __pyx_state)
jpayne@68 23535 */
jpayne@68 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@68 23537 __Pyx_GOTREF(__pyx_t_3);
jpayne@68 23538 __pyx_t_4 = NULL;
jpayne@68 23539 __pyx_t_5 = 0;
jpayne@68 23540 #if CYTHON_UNPACK_METHODS
jpayne@68 23541 if (likely(PyMethod_Check(__pyx_t_3))) {
jpayne@68 23542 __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
jpayne@68 23543 if (likely(__pyx_t_4)) {
jpayne@68 23544 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
jpayne@68 23545 __Pyx_INCREF(__pyx_t_4);
jpayne@68 23546 __Pyx_INCREF(function);
jpayne@68 23547 __Pyx_DECREF_SET(__pyx_t_3, function);
jpayne@68 23548 __pyx_t_5 = 1;
jpayne@68 23549 }
jpayne@68 23550 }
jpayne@68 23551 #endif
jpayne@68 23552 {
jpayne@68 23553 PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v___pyx_type};
jpayne@68 23554 __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
jpayne@68 23555 __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
jpayne@68 23556 if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 7, __pyx_L1_error)
jpayne@68 23557 __Pyx_GOTREF(__pyx_t_1);
jpayne@68 23558 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
jpayne@68 23559 }
jpayne@68 23560 __pyx_v___pyx_result = __pyx_t_1;
jpayne@68 23561 __pyx_t_1 = 0;
jpayne@68 23562
jpayne@68 23563 /* "(tree fragment)":8
jpayne@68 23564 * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xe8424ea, 0x14a9dc0, 0x84bea1f) = (encoding))" % __pyx_checksum
jpayne@68 23565 * __pyx_result = asTuple.__new__(__pyx_type)
jpayne@68 23566 * if __pyx_state is not None: # <<<<<<<<<<<<<<
jpayne@68 23567 * __pyx_unpickle_asTuple__set_state(<asTuple> __pyx_result, __pyx_state)
jpayne@68 23568 * return __pyx_result
jpayne@68 23569 */
jpayne@68 23570 __pyx_t_2 = (__pyx_v___pyx_state != Py_None);
jpayne@68 23571 if (__pyx_t_2) {
jpayne@68 23572
jpayne@68 23573 /* "(tree fragment)":9
jpayne@68 23574 * __pyx_result = asTuple.__new__(__pyx_type)
jpayne@68 23575 * if __pyx_state is not None:
jpayne@68 23576 * __pyx_unpickle_asTuple__set_state(<asTuple> __pyx_result, __pyx_state) # <<<<<<<<<<<<<<
jpayne@68 23577 * return __pyx_result
jpayne@68 23578 * cdef __pyx_unpickle_asTuple__set_state(asTuple __pyx_result, tuple __pyx_state):
jpayne@68 23579 */
jpayne@68 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@68 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@68 23582 __Pyx_GOTREF(__pyx_t_1);
jpayne@68 23583 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@68 23584
jpayne@68 23585 /* "(tree fragment)":8
jpayne@68 23586 * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xe8424ea, 0x14a9dc0, 0x84bea1f) = (encoding))" % __pyx_checksum
jpayne@68 23587 * __pyx_result = asTuple.__new__(__pyx_type)
jpayne@68 23588 * if __pyx_state is not None: # <<<<<<<<<<<<<<
jpayne@68 23589 * __pyx_unpickle_asTuple__set_state(<asTuple> __pyx_result, __pyx_state)
jpayne@68 23590 * return __pyx_result
jpayne@68 23591 */
jpayne@68 23592 }
jpayne@68 23593
jpayne@68 23594 /* "(tree fragment)":10
jpayne@68 23595 * if __pyx_state is not None:
jpayne@68 23596 * __pyx_unpickle_asTuple__set_state(<asTuple> __pyx_result, __pyx_state)
jpayne@68 23597 * return __pyx_result # <<<<<<<<<<<<<<
jpayne@68 23598 * cdef __pyx_unpickle_asTuple__set_state(asTuple __pyx_result, tuple __pyx_state):
jpayne@68 23599 * __pyx_result.encoding = __pyx_state[0]
jpayne@68 23600 */
jpayne@68 23601 __Pyx_XDECREF(__pyx_r);
jpayne@68 23602 __Pyx_INCREF(__pyx_v___pyx_result);
jpayne@68 23603 __pyx_r = __pyx_v___pyx_result;
jpayne@68 23604 goto __pyx_L0;
jpayne@68 23605
jpayne@68 23606 /* "(tree fragment)":1
jpayne@68 23607 * def __pyx_unpickle_asTuple(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
jpayne@68 23608 * cdef object __pyx_PickleError
jpayne@68 23609 * cdef object __pyx_result
jpayne@68 23610 */
jpayne@68 23611
jpayne@68 23612 /* function exit code */
jpayne@68 23613 __pyx_L1_error:;
jpayne@68 23614 __Pyx_XDECREF(__pyx_t_1);
jpayne@68 23615 __Pyx_XDECREF(__pyx_t_3);
jpayne@68 23616 __Pyx_XDECREF(__pyx_t_4);
jpayne@68 23617 __Pyx_AddTraceback("pysam.libctabix.__pyx_unpickle_asTuple", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@68 23618 __pyx_r = NULL;
jpayne@68 23619 __pyx_L0:;
jpayne@68 23620 __Pyx_XDECREF(__pyx_v___pyx_PickleError);
jpayne@68 23621 __Pyx_XDECREF(__pyx_v___pyx_result);
jpayne@68 23622 __Pyx_XGIVEREF(__pyx_r);
jpayne@68 23623 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@68 23624 __Pyx_RefNannyFinishContext();
jpayne@68 23625 return __pyx_r;
jpayne@68 23626 }
jpayne@68 23627
jpayne@68 23628 /* "(tree fragment)":11
jpayne@68 23629 * __pyx_unpickle_asTuple__set_state(<asTuple> __pyx_result, __pyx_state)
jpayne@68 23630 * return __pyx_result
jpayne@68 23631 * cdef __pyx_unpickle_asTuple__set_state(asTuple __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
jpayne@68 23632 * __pyx_result.encoding = __pyx_state[0]
jpayne@68 23633 * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
jpayne@68 23634 */
jpayne@68 23635
jpayne@68 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@68 23637 PyObject *__pyx_r = NULL;
jpayne@68 23638 __Pyx_TraceDeclarations
jpayne@68 23639 __Pyx_RefNannyDeclarations
jpayne@68 23640 PyObject *__pyx_t_1 = NULL;
jpayne@68 23641 int __pyx_t_2;
jpayne@68 23642 Py_ssize_t __pyx_t_3;
jpayne@68 23643 int __pyx_t_4;
jpayne@68 23644 PyObject *__pyx_t_5 = NULL;
jpayne@68 23645 PyObject *__pyx_t_6 = NULL;
jpayne@68 23646 PyObject *__pyx_t_7 = NULL;
jpayne@68 23647 unsigned int __pyx_t_8;
jpayne@68 23648 int __pyx_lineno = 0;
jpayne@68 23649 const char *__pyx_filename = NULL;
jpayne@68 23650 int __pyx_clineno = 0;
jpayne@68 23651 __Pyx_RefNannySetupContext("__pyx_unpickle_asTuple__set_state", 1);
jpayne@68 23652 __Pyx_TraceCall("__pyx_unpickle_asTuple__set_state", __pyx_f[1], 11, 0, __PYX_ERR(1, 11, __pyx_L1_error));
jpayne@68 23653
jpayne@68 23654 /* "(tree fragment)":12
jpayne@68 23655 * return __pyx_result
jpayne@68 23656 * cdef __pyx_unpickle_asTuple__set_state(asTuple __pyx_result, tuple __pyx_state):
jpayne@68 23657 * __pyx_result.encoding = __pyx_state[0] # <<<<<<<<<<<<<<
jpayne@68 23658 * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
jpayne@68 23659 * __pyx_result.__dict__.update(__pyx_state[1])
jpayne@68 23660 */
jpayne@68 23661 if (unlikely(__pyx_v___pyx_state == Py_None)) {
jpayne@68 23662 PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
jpayne@68 23663 __PYX_ERR(1, 12, __pyx_L1_error)
jpayne@68 23664 }
jpayne@68 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@68 23666 __Pyx_GOTREF(__pyx_t_1);
jpayne@68 23667 __Pyx_GIVEREF(__pyx_t_1);
jpayne@68 23668 __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.encoding);
jpayne@68 23669 __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.encoding);
jpayne@68 23670 __pyx_v___pyx_result->__pyx_base.encoding = __pyx_t_1;
jpayne@68 23671 __pyx_t_1 = 0;
jpayne@68 23672
jpayne@68 23673 /* "(tree fragment)":13
jpayne@68 23674 * cdef __pyx_unpickle_asTuple__set_state(asTuple __pyx_result, tuple __pyx_state):
jpayne@68 23675 * __pyx_result.encoding = __pyx_state[0]
jpayne@68 23676 * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
jpayne@68 23677 * __pyx_result.__dict__.update(__pyx_state[1])
jpayne@68 23678 */
jpayne@68 23679 if (unlikely(__pyx_v___pyx_state == Py_None)) {
jpayne@68 23680 PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
jpayne@68 23681 __PYX_ERR(1, 13, __pyx_L1_error)
jpayne@68 23682 }
jpayne@68 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@68 23684 __pyx_t_4 = (__pyx_t_3 > 1);
jpayne@68 23685 if (__pyx_t_4) {
jpayne@68 23686 } else {
jpayne@68 23687 __pyx_t_2 = __pyx_t_4;
jpayne@68 23688 goto __pyx_L4_bool_binop_done;
jpayne@68 23689 }
jpayne@68 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@68 23691 __pyx_t_2 = __pyx_t_4;
jpayne@68 23692 __pyx_L4_bool_binop_done:;
jpayne@68 23693 if (__pyx_t_2) {
jpayne@68 23694
jpayne@68 23695 /* "(tree fragment)":14
jpayne@68 23696 * __pyx_result.encoding = __pyx_state[0]
jpayne@68 23697 * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
jpayne@68 23698 * __pyx_result.__dict__.update(__pyx_state[1]) # <<<<<<<<<<<<<<
jpayne@68 23699 */
jpayne@68 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@68 23701 __Pyx_GOTREF(__pyx_t_5);
jpayne@68 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@68 23703 __Pyx_GOTREF(__pyx_t_6);
jpayne@68 23704 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
jpayne@68 23705 if (unlikely(__pyx_v___pyx_state == Py_None)) {
jpayne@68 23706 PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
jpayne@68 23707 __PYX_ERR(1, 14, __pyx_L1_error)
jpayne@68 23708 }
jpayne@68 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@68 23710 __Pyx_GOTREF(__pyx_t_5);
jpayne@68 23711 __pyx_t_7 = NULL;
jpayne@68 23712 __pyx_t_8 = 0;
jpayne@68 23713 #if CYTHON_UNPACK_METHODS
jpayne@68 23714 if (likely(PyMethod_Check(__pyx_t_6))) {
jpayne@68 23715 __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
jpayne@68 23716 if (likely(__pyx_t_7)) {
jpayne@68 23717 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
jpayne@68 23718 __Pyx_INCREF(__pyx_t_7);
jpayne@68 23719 __Pyx_INCREF(function);
jpayne@68 23720 __Pyx_DECREF_SET(__pyx_t_6, function);
jpayne@68 23721 __pyx_t_8 = 1;
jpayne@68 23722 }
jpayne@68 23723 }
jpayne@68 23724 #endif
jpayne@68 23725 {
jpayne@68 23726 PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_5};
jpayne@68 23727 __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8);
jpayne@68 23728 __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
jpayne@68 23729 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
jpayne@68 23730 if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 14, __pyx_L1_error)
jpayne@68 23731 __Pyx_GOTREF(__pyx_t_1);
jpayne@68 23732 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
jpayne@68 23733 }
jpayne@68 23734 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@68 23735
jpayne@68 23736 /* "(tree fragment)":13
jpayne@68 23737 * cdef __pyx_unpickle_asTuple__set_state(asTuple __pyx_result, tuple __pyx_state):
jpayne@68 23738 * __pyx_result.encoding = __pyx_state[0]
jpayne@68 23739 * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
jpayne@68 23740 * __pyx_result.__dict__.update(__pyx_state[1])
jpayne@68 23741 */
jpayne@68 23742 }
jpayne@68 23743
jpayne@68 23744 /* "(tree fragment)":11
jpayne@68 23745 * __pyx_unpickle_asTuple__set_state(<asTuple> __pyx_result, __pyx_state)
jpayne@68 23746 * return __pyx_result
jpayne@68 23747 * cdef __pyx_unpickle_asTuple__set_state(asTuple __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
jpayne@68 23748 * __pyx_result.encoding = __pyx_state[0]
jpayne@68 23749 * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
jpayne@68 23750 */
jpayne@68 23751
jpayne@68 23752 /* function exit code */
jpayne@68 23753 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
jpayne@68 23754 goto __pyx_L0;
jpayne@68 23755 __pyx_L1_error:;
jpayne@68 23756 __Pyx_XDECREF(__pyx_t_1);
jpayne@68 23757 __Pyx_XDECREF(__pyx_t_5);
jpayne@68 23758 __Pyx_XDECREF(__pyx_t_6);
jpayne@68 23759 __Pyx_XDECREF(__pyx_t_7);
jpayne@68 23760 __Pyx_AddTraceback("pysam.libctabix.__pyx_unpickle_asTuple__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@68 23761 __pyx_r = 0;
jpayne@68 23762 __pyx_L0:;
jpayne@68 23763 __Pyx_XGIVEREF(__pyx_r);
jpayne@68 23764 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@68 23765 __Pyx_RefNannyFinishContext();
jpayne@68 23766 return __pyx_r;
jpayne@68 23767 }
jpayne@68 23768
jpayne@68 23769 /* "(tree fragment)":1
jpayne@68 23770 * def __pyx_unpickle_asGFF3(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
jpayne@68 23771 * cdef object __pyx_PickleError
jpayne@68 23772 * cdef object __pyx_result
jpayne@68 23773 */
jpayne@68 23774
jpayne@68 23775 /* Python wrapper */
jpayne@68 23776 static PyObject *__pyx_pw_5pysam_9libctabix_11__pyx_unpickle_asGFF3(PyObject *__pyx_self,
jpayne@68 23777 #if CYTHON_METH_FASTCALL
jpayne@68 23778 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@68 23779 #else
jpayne@68 23780 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@68 23781 #endif
jpayne@68 23782 ); /*proto*/
jpayne@68 23783 PyDoc_STRVAR(__pyx_doc_5pysam_9libctabix_10__pyx_unpickle_asGFF3, "__pyx_unpickle_asGFF3(__pyx_type, long __pyx_checksum, __pyx_state)");
jpayne@68 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@68 23785 static PyObject *__pyx_pw_5pysam_9libctabix_11__pyx_unpickle_asGFF3(PyObject *__pyx_self,
jpayne@68 23786 #if CYTHON_METH_FASTCALL
jpayne@68 23787 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@68 23788 #else
jpayne@68 23789 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@68 23790 #endif
jpayne@68 23791 ) {
jpayne@68 23792 PyObject *__pyx_v___pyx_type = 0;
jpayne@68 23793 long __pyx_v___pyx_checksum;
jpayne@68 23794 PyObject *__pyx_v___pyx_state = 0;
jpayne@68 23795 #if !CYTHON_METH_FASTCALL
jpayne@68 23796 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
jpayne@68 23797 #endif
jpayne@68 23798 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@68 23799 PyObject* values[3] = {0,0,0};
jpayne@68 23800 int __pyx_lineno = 0;
jpayne@68 23801 const char *__pyx_filename = NULL;
jpayne@68 23802 int __pyx_clineno = 0;
jpayne@68 23803 PyObject *__pyx_r = 0;
jpayne@68 23804 __Pyx_RefNannyDeclarations
jpayne@68 23805 __Pyx_RefNannySetupContext("__pyx_unpickle_asGFF3 (wrapper)", 0);
jpayne@68 23806 #if !CYTHON_METH_FASTCALL
jpayne@68 23807 #if CYTHON_ASSUME_SAFE_MACROS
jpayne@68 23808 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
jpayne@68 23809 #else
jpayne@68 23810 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
jpayne@68 23811 #endif
jpayne@68 23812 #endif
jpayne@68 23813 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
jpayne@68 23814 {
jpayne@68 23815 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
jpayne@68 23816 if (__pyx_kwds) {
jpayne@68 23817 Py_ssize_t kw_args;
jpayne@68 23818 switch (__pyx_nargs) {
jpayne@68 23819 case 3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
jpayne@68 23820 CYTHON_FALLTHROUGH;
jpayne@68 23821 case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
jpayne@68 23822 CYTHON_FALLTHROUGH;
jpayne@68 23823 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
jpayne@68 23824 CYTHON_FALLTHROUGH;
jpayne@68 23825 case 0: break;
jpayne@68 23826 default: goto __pyx_L5_argtuple_error;
jpayne@68 23827 }
jpayne@68 23828 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
jpayne@68 23829 switch (__pyx_nargs) {
jpayne@68 23830 case 0:
jpayne@68 23831 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_type)) != 0)) {
jpayne@68 23832 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
jpayne@68 23833 kw_args--;
jpayne@68 23834 }
jpayne@68 23835 else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
jpayne@68 23836 else goto __pyx_L5_argtuple_error;
jpayne@68 23837 CYTHON_FALLTHROUGH;
jpayne@68 23838 case 1:
jpayne@68 23839 if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_checksum)) != 0)) {
jpayne@68 23840 (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
jpayne@68 23841 kw_args--;
jpayne@68 23842 }
jpayne@68 23843 else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
jpayne@68 23844 else {
jpayne@68 23845 __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_asGFF3", 1, 3, 3, 1); __PYX_ERR(1, 1, __pyx_L3_error)
jpayne@68 23846 }
jpayne@68 23847 CYTHON_FALLTHROUGH;
jpayne@68 23848 case 2:
jpayne@68 23849 if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) {
jpayne@68 23850 (void)__Pyx_Arg_NewRef_FASTCALL(values[2]);
jpayne@68 23851 kw_args--;
jpayne@68 23852 }
jpayne@68 23853 else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
jpayne@68 23854 else {
jpayne@68 23855 __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_asGFF3", 1, 3, 3, 2); __PYX_ERR(1, 1, __pyx_L3_error)
jpayne@68 23856 }
jpayne@68 23857 }
jpayne@68 23858 if (unlikely(kw_args > 0)) {
jpayne@68 23859 const Py_ssize_t kwd_pos_args = __pyx_nargs;
jpayne@68 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@68 23861 }
jpayne@68 23862 } else if (unlikely(__pyx_nargs != 3)) {
jpayne@68 23863 goto __pyx_L5_argtuple_error;
jpayne@68 23864 } else {
jpayne@68 23865 values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
jpayne@68 23866 values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
jpayne@68 23867 values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
jpayne@68 23868 }
jpayne@68 23869 __pyx_v___pyx_type = values[0];
jpayne@68 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@68 23871 __pyx_v___pyx_state = values[2];
jpayne@68 23872 }
jpayne@68 23873 goto __pyx_L6_skip;
jpayne@68 23874 __pyx_L5_argtuple_error:;
jpayne@68 23875 __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_asGFF3", 1, 3, 3, __pyx_nargs); __PYX_ERR(1, 1, __pyx_L3_error)
jpayne@68 23876 __pyx_L6_skip:;
jpayne@68 23877 goto __pyx_L4_argument_unpacking_done;
jpayne@68 23878 __pyx_L3_error:;
jpayne@68 23879 {
jpayne@68 23880 Py_ssize_t __pyx_temp;
jpayne@68 23881 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
jpayne@68 23882 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
jpayne@68 23883 }
jpayne@68 23884 }
jpayne@68 23885 __Pyx_AddTraceback("pysam.libctabix.__pyx_unpickle_asGFF3", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@68 23886 __Pyx_RefNannyFinishContext();
jpayne@68 23887 return NULL;
jpayne@68 23888 __pyx_L4_argument_unpacking_done:;
jpayne@68 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@68 23890
jpayne@68 23891 /* function exit code */
jpayne@68 23892 {
jpayne@68 23893 Py_ssize_t __pyx_temp;
jpayne@68 23894 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
jpayne@68 23895 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
jpayne@68 23896 }
jpayne@68 23897 }
jpayne@68 23898 __Pyx_RefNannyFinishContext();
jpayne@68 23899 return __pyx_r;
jpayne@68 23900 }
jpayne@68 23901
jpayne@68 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@68 23903 PyObject *__pyx_v___pyx_PickleError = 0;
jpayne@68 23904 PyObject *__pyx_v___pyx_result = 0;
jpayne@68 23905 PyObject *__pyx_r = NULL;
jpayne@68 23906 __Pyx_TraceDeclarations
jpayne@68 23907 __Pyx_RefNannyDeclarations
jpayne@68 23908 PyObject *__pyx_t_1 = NULL;
jpayne@68 23909 int __pyx_t_2;
jpayne@68 23910 PyObject *__pyx_t_3 = NULL;
jpayne@68 23911 PyObject *__pyx_t_4 = NULL;
jpayne@68 23912 unsigned int __pyx_t_5;
jpayne@68 23913 int __pyx_lineno = 0;
jpayne@68 23914 const char *__pyx_filename = NULL;
jpayne@68 23915 int __pyx_clineno = 0;
jpayne@68 23916 __Pyx_TraceFrameInit(__pyx_codeobj__58)
jpayne@68 23917 __Pyx_RefNannySetupContext("__pyx_unpickle_asGFF3", 1);
jpayne@68 23918 __Pyx_TraceCall("__pyx_unpickle_asGFF3", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));
jpayne@68 23919
jpayne@68 23920 /* "(tree fragment)":4
jpayne@68 23921 * cdef object __pyx_PickleError
jpayne@68 23922 * cdef object __pyx_result
jpayne@68 23923 * if __pyx_checksum not in (0xe8424ea, 0x14a9dc0, 0x84bea1f): # <<<<<<<<<<<<<<
jpayne@68 23924 * from pickle import PickleError as __pyx_PickleError
jpayne@68 23925 * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xe8424ea, 0x14a9dc0, 0x84bea1f) = (encoding))" % __pyx_checksum
jpayne@68 23926 */
jpayne@68 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@68 23928 __Pyx_GOTREF(__pyx_t_1);
jpayne@68 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@68 23930 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@68 23931 if (__pyx_t_2) {
jpayne@68 23932
jpayne@68 23933 /* "(tree fragment)":5
jpayne@68 23934 * cdef object __pyx_result
jpayne@68 23935 * if __pyx_checksum not in (0xe8424ea, 0x14a9dc0, 0x84bea1f):
jpayne@68 23936 * from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<<
jpayne@68 23937 * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xe8424ea, 0x14a9dc0, 0x84bea1f) = (encoding))" % __pyx_checksum
jpayne@68 23938 * __pyx_result = asGFF3.__new__(__pyx_type)
jpayne@68 23939 */
jpayne@68 23940 __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
jpayne@68 23941 __Pyx_GOTREF(__pyx_t_1);
jpayne@68 23942 __Pyx_INCREF(__pyx_n_s_PickleError);
jpayne@68 23943 __Pyx_GIVEREF(__pyx_n_s_PickleError);
jpayne@68 23944 if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_PickleError)) __PYX_ERR(1, 5, __pyx_L1_error);
jpayne@68 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@68 23946 __Pyx_GOTREF(__pyx_t_3);
jpayne@68 23947 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@68 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@68 23949 __Pyx_GOTREF(__pyx_t_1);
jpayne@68 23950 __Pyx_INCREF(__pyx_t_1);
jpayne@68 23951 __pyx_v___pyx_PickleError = __pyx_t_1;
jpayne@68 23952 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@68 23953 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
jpayne@68 23954
jpayne@68 23955 /* "(tree fragment)":6
jpayne@68 23956 * if __pyx_checksum not in (0xe8424ea, 0x14a9dc0, 0x84bea1f):
jpayne@68 23957 * from pickle import PickleError as __pyx_PickleError
jpayne@68 23958 * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xe8424ea, 0x14a9dc0, 0x84bea1f) = (encoding))" % __pyx_checksum # <<<<<<<<<<<<<<
jpayne@68 23959 * __pyx_result = asGFF3.__new__(__pyx_type)
jpayne@68 23960 * if __pyx_state is not None:
jpayne@68 23961 */
jpayne@68 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@68 23963 __Pyx_GOTREF(__pyx_t_3);
jpayne@68 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@68 23965 __Pyx_GOTREF(__pyx_t_1);
jpayne@68 23966 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
jpayne@68 23967 __Pyx_Raise(__pyx_v___pyx_PickleError, __pyx_t_1, 0, 0);
jpayne@68 23968 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@68 23969 __PYX_ERR(1, 6, __pyx_L1_error)
jpayne@68 23970
jpayne@68 23971 /* "(tree fragment)":4
jpayne@68 23972 * cdef object __pyx_PickleError
jpayne@68 23973 * cdef object __pyx_result
jpayne@68 23974 * if __pyx_checksum not in (0xe8424ea, 0x14a9dc0, 0x84bea1f): # <<<<<<<<<<<<<<
jpayne@68 23975 * from pickle import PickleError as __pyx_PickleError
jpayne@68 23976 * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xe8424ea, 0x14a9dc0, 0x84bea1f) = (encoding))" % __pyx_checksum
jpayne@68 23977 */
jpayne@68 23978 }
jpayne@68 23979
jpayne@68 23980 /* "(tree fragment)":7
jpayne@68 23981 * from pickle import PickleError as __pyx_PickleError
jpayne@68 23982 * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xe8424ea, 0x14a9dc0, 0x84bea1f) = (encoding))" % __pyx_checksum
jpayne@68 23983 * __pyx_result = asGFF3.__new__(__pyx_type) # <<<<<<<<<<<<<<
jpayne@68 23984 * if __pyx_state is not None:
jpayne@68 23985 * __pyx_unpickle_asGFF3__set_state(<asGFF3> __pyx_result, __pyx_state)
jpayne@68 23986 */
jpayne@68 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@68 23988 __Pyx_GOTREF(__pyx_t_3);
jpayne@68 23989 __pyx_t_4 = NULL;
jpayne@68 23990 __pyx_t_5 = 0;
jpayne@68 23991 #if CYTHON_UNPACK_METHODS
jpayne@68 23992 if (likely(PyMethod_Check(__pyx_t_3))) {
jpayne@68 23993 __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
jpayne@68 23994 if (likely(__pyx_t_4)) {
jpayne@68 23995 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
jpayne@68 23996 __Pyx_INCREF(__pyx_t_4);
jpayne@68 23997 __Pyx_INCREF(function);
jpayne@68 23998 __Pyx_DECREF_SET(__pyx_t_3, function);
jpayne@68 23999 __pyx_t_5 = 1;
jpayne@68 24000 }
jpayne@68 24001 }
jpayne@68 24002 #endif
jpayne@68 24003 {
jpayne@68 24004 PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v___pyx_type};
jpayne@68 24005 __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
jpayne@68 24006 __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
jpayne@68 24007 if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 7, __pyx_L1_error)
jpayne@68 24008 __Pyx_GOTREF(__pyx_t_1);
jpayne@68 24009 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
jpayne@68 24010 }
jpayne@68 24011 __pyx_v___pyx_result = __pyx_t_1;
jpayne@68 24012 __pyx_t_1 = 0;
jpayne@68 24013
jpayne@68 24014 /* "(tree fragment)":8
jpayne@68 24015 * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xe8424ea, 0x14a9dc0, 0x84bea1f) = (encoding))" % __pyx_checksum
jpayne@68 24016 * __pyx_result = asGFF3.__new__(__pyx_type)
jpayne@68 24017 * if __pyx_state is not None: # <<<<<<<<<<<<<<
jpayne@68 24018 * __pyx_unpickle_asGFF3__set_state(<asGFF3> __pyx_result, __pyx_state)
jpayne@68 24019 * return __pyx_result
jpayne@68 24020 */
jpayne@68 24021 __pyx_t_2 = (__pyx_v___pyx_state != Py_None);
jpayne@68 24022 if (__pyx_t_2) {
jpayne@68 24023
jpayne@68 24024 /* "(tree fragment)":9
jpayne@68 24025 * __pyx_result = asGFF3.__new__(__pyx_type)
jpayne@68 24026 * if __pyx_state is not None:
jpayne@68 24027 * __pyx_unpickle_asGFF3__set_state(<asGFF3> __pyx_result, __pyx_state) # <<<<<<<<<<<<<<
jpayne@68 24028 * return __pyx_result
jpayne@68 24029 * cdef __pyx_unpickle_asGFF3__set_state(asGFF3 __pyx_result, tuple __pyx_state):
jpayne@68 24030 */
jpayne@68 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@68 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@68 24033 __Pyx_GOTREF(__pyx_t_1);
jpayne@68 24034 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@68 24035
jpayne@68 24036 /* "(tree fragment)":8
jpayne@68 24037 * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xe8424ea, 0x14a9dc0, 0x84bea1f) = (encoding))" % __pyx_checksum
jpayne@68 24038 * __pyx_result = asGFF3.__new__(__pyx_type)
jpayne@68 24039 * if __pyx_state is not None: # <<<<<<<<<<<<<<
jpayne@68 24040 * __pyx_unpickle_asGFF3__set_state(<asGFF3> __pyx_result, __pyx_state)
jpayne@68 24041 * return __pyx_result
jpayne@68 24042 */
jpayne@68 24043 }
jpayne@68 24044
jpayne@68 24045 /* "(tree fragment)":10
jpayne@68 24046 * if __pyx_state is not None:
jpayne@68 24047 * __pyx_unpickle_asGFF3__set_state(<asGFF3> __pyx_result, __pyx_state)
jpayne@68 24048 * return __pyx_result # <<<<<<<<<<<<<<
jpayne@68 24049 * cdef __pyx_unpickle_asGFF3__set_state(asGFF3 __pyx_result, tuple __pyx_state):
jpayne@68 24050 * __pyx_result.encoding = __pyx_state[0]
jpayne@68 24051 */
jpayne@68 24052 __Pyx_XDECREF(__pyx_r);
jpayne@68 24053 __Pyx_INCREF(__pyx_v___pyx_result);
jpayne@68 24054 __pyx_r = __pyx_v___pyx_result;
jpayne@68 24055 goto __pyx_L0;
jpayne@68 24056
jpayne@68 24057 /* "(tree fragment)":1
jpayne@68 24058 * def __pyx_unpickle_asGFF3(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
jpayne@68 24059 * cdef object __pyx_PickleError
jpayne@68 24060 * cdef object __pyx_result
jpayne@68 24061 */
jpayne@68 24062
jpayne@68 24063 /* function exit code */
jpayne@68 24064 __pyx_L1_error:;
jpayne@68 24065 __Pyx_XDECREF(__pyx_t_1);
jpayne@68 24066 __Pyx_XDECREF(__pyx_t_3);
jpayne@68 24067 __Pyx_XDECREF(__pyx_t_4);
jpayne@68 24068 __Pyx_AddTraceback("pysam.libctabix.__pyx_unpickle_asGFF3", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@68 24069 __pyx_r = NULL;
jpayne@68 24070 __pyx_L0:;
jpayne@68 24071 __Pyx_XDECREF(__pyx_v___pyx_PickleError);
jpayne@68 24072 __Pyx_XDECREF(__pyx_v___pyx_result);
jpayne@68 24073 __Pyx_XGIVEREF(__pyx_r);
jpayne@68 24074 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@68 24075 __Pyx_RefNannyFinishContext();
jpayne@68 24076 return __pyx_r;
jpayne@68 24077 }
jpayne@68 24078
jpayne@68 24079 /* "(tree fragment)":11
jpayne@68 24080 * __pyx_unpickle_asGFF3__set_state(<asGFF3> __pyx_result, __pyx_state)
jpayne@68 24081 * return __pyx_result
jpayne@68 24082 * cdef __pyx_unpickle_asGFF3__set_state(asGFF3 __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
jpayne@68 24083 * __pyx_result.encoding = __pyx_state[0]
jpayne@68 24084 * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
jpayne@68 24085 */
jpayne@68 24086
jpayne@68 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@68 24088 PyObject *__pyx_r = NULL;
jpayne@68 24089 __Pyx_TraceDeclarations
jpayne@68 24090 __Pyx_RefNannyDeclarations
jpayne@68 24091 PyObject *__pyx_t_1 = NULL;
jpayne@68 24092 int __pyx_t_2;
jpayne@68 24093 Py_ssize_t __pyx_t_3;
jpayne@68 24094 int __pyx_t_4;
jpayne@68 24095 PyObject *__pyx_t_5 = NULL;
jpayne@68 24096 PyObject *__pyx_t_6 = NULL;
jpayne@68 24097 PyObject *__pyx_t_7 = NULL;
jpayne@68 24098 unsigned int __pyx_t_8;
jpayne@68 24099 int __pyx_lineno = 0;
jpayne@68 24100 const char *__pyx_filename = NULL;
jpayne@68 24101 int __pyx_clineno = 0;
jpayne@68 24102 __Pyx_RefNannySetupContext("__pyx_unpickle_asGFF3__set_state", 1);
jpayne@68 24103 __Pyx_TraceCall("__pyx_unpickle_asGFF3__set_state", __pyx_f[1], 11, 0, __PYX_ERR(1, 11, __pyx_L1_error));
jpayne@68 24104
jpayne@68 24105 /* "(tree fragment)":12
jpayne@68 24106 * return __pyx_result
jpayne@68 24107 * cdef __pyx_unpickle_asGFF3__set_state(asGFF3 __pyx_result, tuple __pyx_state):
jpayne@68 24108 * __pyx_result.encoding = __pyx_state[0] # <<<<<<<<<<<<<<
jpayne@68 24109 * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
jpayne@68 24110 * __pyx_result.__dict__.update(__pyx_state[1])
jpayne@68 24111 */
jpayne@68 24112 if (unlikely(__pyx_v___pyx_state == Py_None)) {
jpayne@68 24113 PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
jpayne@68 24114 __PYX_ERR(1, 12, __pyx_L1_error)
jpayne@68 24115 }
jpayne@68 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@68 24117 __Pyx_GOTREF(__pyx_t_1);
jpayne@68 24118 __Pyx_GIVEREF(__pyx_t_1);
jpayne@68 24119 __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.encoding);
jpayne@68 24120 __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.encoding);
jpayne@68 24121 __pyx_v___pyx_result->__pyx_base.encoding = __pyx_t_1;
jpayne@68 24122 __pyx_t_1 = 0;
jpayne@68 24123
jpayne@68 24124 /* "(tree fragment)":13
jpayne@68 24125 * cdef __pyx_unpickle_asGFF3__set_state(asGFF3 __pyx_result, tuple __pyx_state):
jpayne@68 24126 * __pyx_result.encoding = __pyx_state[0]
jpayne@68 24127 * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
jpayne@68 24128 * __pyx_result.__dict__.update(__pyx_state[1])
jpayne@68 24129 */
jpayne@68 24130 if (unlikely(__pyx_v___pyx_state == Py_None)) {
jpayne@68 24131 PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
jpayne@68 24132 __PYX_ERR(1, 13, __pyx_L1_error)
jpayne@68 24133 }
jpayne@68 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@68 24135 __pyx_t_4 = (__pyx_t_3 > 1);
jpayne@68 24136 if (__pyx_t_4) {
jpayne@68 24137 } else {
jpayne@68 24138 __pyx_t_2 = __pyx_t_4;
jpayne@68 24139 goto __pyx_L4_bool_binop_done;
jpayne@68 24140 }
jpayne@68 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@68 24142 __pyx_t_2 = __pyx_t_4;
jpayne@68 24143 __pyx_L4_bool_binop_done:;
jpayne@68 24144 if (__pyx_t_2) {
jpayne@68 24145
jpayne@68 24146 /* "(tree fragment)":14
jpayne@68 24147 * __pyx_result.encoding = __pyx_state[0]
jpayne@68 24148 * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
jpayne@68 24149 * __pyx_result.__dict__.update(__pyx_state[1]) # <<<<<<<<<<<<<<
jpayne@68 24150 */
jpayne@68 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@68 24152 __Pyx_GOTREF(__pyx_t_5);
jpayne@68 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@68 24154 __Pyx_GOTREF(__pyx_t_6);
jpayne@68 24155 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
jpayne@68 24156 if (unlikely(__pyx_v___pyx_state == Py_None)) {
jpayne@68 24157 PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
jpayne@68 24158 __PYX_ERR(1, 14, __pyx_L1_error)
jpayne@68 24159 }
jpayne@68 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@68 24161 __Pyx_GOTREF(__pyx_t_5);
jpayne@68 24162 __pyx_t_7 = NULL;
jpayne@68 24163 __pyx_t_8 = 0;
jpayne@68 24164 #if CYTHON_UNPACK_METHODS
jpayne@68 24165 if (likely(PyMethod_Check(__pyx_t_6))) {
jpayne@68 24166 __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
jpayne@68 24167 if (likely(__pyx_t_7)) {
jpayne@68 24168 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
jpayne@68 24169 __Pyx_INCREF(__pyx_t_7);
jpayne@68 24170 __Pyx_INCREF(function);
jpayne@68 24171 __Pyx_DECREF_SET(__pyx_t_6, function);
jpayne@68 24172 __pyx_t_8 = 1;
jpayne@68 24173 }
jpayne@68 24174 }
jpayne@68 24175 #endif
jpayne@68 24176 {
jpayne@68 24177 PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_5};
jpayne@68 24178 __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8);
jpayne@68 24179 __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
jpayne@68 24180 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
jpayne@68 24181 if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 14, __pyx_L1_error)
jpayne@68 24182 __Pyx_GOTREF(__pyx_t_1);
jpayne@68 24183 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
jpayne@68 24184 }
jpayne@68 24185 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@68 24186
jpayne@68 24187 /* "(tree fragment)":13
jpayne@68 24188 * cdef __pyx_unpickle_asGFF3__set_state(asGFF3 __pyx_result, tuple __pyx_state):
jpayne@68 24189 * __pyx_result.encoding = __pyx_state[0]
jpayne@68 24190 * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
jpayne@68 24191 * __pyx_result.__dict__.update(__pyx_state[1])
jpayne@68 24192 */
jpayne@68 24193 }
jpayne@68 24194
jpayne@68 24195 /* "(tree fragment)":11
jpayne@68 24196 * __pyx_unpickle_asGFF3__set_state(<asGFF3> __pyx_result, __pyx_state)
jpayne@68 24197 * return __pyx_result
jpayne@68 24198 * cdef __pyx_unpickle_asGFF3__set_state(asGFF3 __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
jpayne@68 24199 * __pyx_result.encoding = __pyx_state[0]
jpayne@68 24200 * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
jpayne@68 24201 */
jpayne@68 24202
jpayne@68 24203 /* function exit code */
jpayne@68 24204 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
jpayne@68 24205 goto __pyx_L0;
jpayne@68 24206 __pyx_L1_error:;
jpayne@68 24207 __Pyx_XDECREF(__pyx_t_1);
jpayne@68 24208 __Pyx_XDECREF(__pyx_t_5);
jpayne@68 24209 __Pyx_XDECREF(__pyx_t_6);
jpayne@68 24210 __Pyx_XDECREF(__pyx_t_7);
jpayne@68 24211 __Pyx_AddTraceback("pysam.libctabix.__pyx_unpickle_asGFF3__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@68 24212 __pyx_r = 0;
jpayne@68 24213 __pyx_L0:;
jpayne@68 24214 __Pyx_XGIVEREF(__pyx_r);
jpayne@68 24215 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@68 24216 __Pyx_RefNannyFinishContext();
jpayne@68 24217 return __pyx_r;
jpayne@68 24218 }
jpayne@68 24219
jpayne@68 24220 /* "(tree fragment)":1
jpayne@68 24221 * def __pyx_unpickle_asGTF(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
jpayne@68 24222 * cdef object __pyx_PickleError
jpayne@68 24223 * cdef object __pyx_result
jpayne@68 24224 */
jpayne@68 24225
jpayne@68 24226 /* Python wrapper */
jpayne@68 24227 static PyObject *__pyx_pw_5pysam_9libctabix_13__pyx_unpickle_asGTF(PyObject *__pyx_self,
jpayne@68 24228 #if CYTHON_METH_FASTCALL
jpayne@68 24229 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@68 24230 #else
jpayne@68 24231 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@68 24232 #endif
jpayne@68 24233 ); /*proto*/
jpayne@68 24234 PyDoc_STRVAR(__pyx_doc_5pysam_9libctabix_12__pyx_unpickle_asGTF, "__pyx_unpickle_asGTF(__pyx_type, long __pyx_checksum, __pyx_state)");
jpayne@68 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@68 24236 static PyObject *__pyx_pw_5pysam_9libctabix_13__pyx_unpickle_asGTF(PyObject *__pyx_self,
jpayne@68 24237 #if CYTHON_METH_FASTCALL
jpayne@68 24238 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@68 24239 #else
jpayne@68 24240 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@68 24241 #endif
jpayne@68 24242 ) {
jpayne@68 24243 PyObject *__pyx_v___pyx_type = 0;
jpayne@68 24244 long __pyx_v___pyx_checksum;
jpayne@68 24245 PyObject *__pyx_v___pyx_state = 0;
jpayne@68 24246 #if !CYTHON_METH_FASTCALL
jpayne@68 24247 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
jpayne@68 24248 #endif
jpayne@68 24249 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@68 24250 PyObject* values[3] = {0,0,0};
jpayne@68 24251 int __pyx_lineno = 0;
jpayne@68 24252 const char *__pyx_filename = NULL;
jpayne@68 24253 int __pyx_clineno = 0;
jpayne@68 24254 PyObject *__pyx_r = 0;
jpayne@68 24255 __Pyx_RefNannyDeclarations
jpayne@68 24256 __Pyx_RefNannySetupContext("__pyx_unpickle_asGTF (wrapper)", 0);
jpayne@68 24257 #if !CYTHON_METH_FASTCALL
jpayne@68 24258 #if CYTHON_ASSUME_SAFE_MACROS
jpayne@68 24259 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
jpayne@68 24260 #else
jpayne@68 24261 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
jpayne@68 24262 #endif
jpayne@68 24263 #endif
jpayne@68 24264 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
jpayne@68 24265 {
jpayne@68 24266 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
jpayne@68 24267 if (__pyx_kwds) {
jpayne@68 24268 Py_ssize_t kw_args;
jpayne@68 24269 switch (__pyx_nargs) {
jpayne@68 24270 case 3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
jpayne@68 24271 CYTHON_FALLTHROUGH;
jpayne@68 24272 case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
jpayne@68 24273 CYTHON_FALLTHROUGH;
jpayne@68 24274 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
jpayne@68 24275 CYTHON_FALLTHROUGH;
jpayne@68 24276 case 0: break;
jpayne@68 24277 default: goto __pyx_L5_argtuple_error;
jpayne@68 24278 }
jpayne@68 24279 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
jpayne@68 24280 switch (__pyx_nargs) {
jpayne@68 24281 case 0:
jpayne@68 24282 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_type)) != 0)) {
jpayne@68 24283 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
jpayne@68 24284 kw_args--;
jpayne@68 24285 }
jpayne@68 24286 else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
jpayne@68 24287 else goto __pyx_L5_argtuple_error;
jpayne@68 24288 CYTHON_FALLTHROUGH;
jpayne@68 24289 case 1:
jpayne@68 24290 if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_checksum)) != 0)) {
jpayne@68 24291 (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
jpayne@68 24292 kw_args--;
jpayne@68 24293 }
jpayne@68 24294 else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
jpayne@68 24295 else {
jpayne@68 24296 __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_asGTF", 1, 3, 3, 1); __PYX_ERR(1, 1, __pyx_L3_error)
jpayne@68 24297 }
jpayne@68 24298 CYTHON_FALLTHROUGH;
jpayne@68 24299 case 2:
jpayne@68 24300 if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) {
jpayne@68 24301 (void)__Pyx_Arg_NewRef_FASTCALL(values[2]);
jpayne@68 24302 kw_args--;
jpayne@68 24303 }
jpayne@68 24304 else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
jpayne@68 24305 else {
jpayne@68 24306 __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_asGTF", 1, 3, 3, 2); __PYX_ERR(1, 1, __pyx_L3_error)
jpayne@68 24307 }
jpayne@68 24308 }
jpayne@68 24309 if (unlikely(kw_args > 0)) {
jpayne@68 24310 const Py_ssize_t kwd_pos_args = __pyx_nargs;
jpayne@68 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@68 24312 }
jpayne@68 24313 } else if (unlikely(__pyx_nargs != 3)) {
jpayne@68 24314 goto __pyx_L5_argtuple_error;
jpayne@68 24315 } else {
jpayne@68 24316 values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
jpayne@68 24317 values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
jpayne@68 24318 values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
jpayne@68 24319 }
jpayne@68 24320 __pyx_v___pyx_type = values[0];
jpayne@68 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@68 24322 __pyx_v___pyx_state = values[2];
jpayne@68 24323 }
jpayne@68 24324 goto __pyx_L6_skip;
jpayne@68 24325 __pyx_L5_argtuple_error:;
jpayne@68 24326 __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_asGTF", 1, 3, 3, __pyx_nargs); __PYX_ERR(1, 1, __pyx_L3_error)
jpayne@68 24327 __pyx_L6_skip:;
jpayne@68 24328 goto __pyx_L4_argument_unpacking_done;
jpayne@68 24329 __pyx_L3_error:;
jpayne@68 24330 {
jpayne@68 24331 Py_ssize_t __pyx_temp;
jpayne@68 24332 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
jpayne@68 24333 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
jpayne@68 24334 }
jpayne@68 24335 }
jpayne@68 24336 __Pyx_AddTraceback("pysam.libctabix.__pyx_unpickle_asGTF", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@68 24337 __Pyx_RefNannyFinishContext();
jpayne@68 24338 return NULL;
jpayne@68 24339 __pyx_L4_argument_unpacking_done:;
jpayne@68 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@68 24341
jpayne@68 24342 /* function exit code */
jpayne@68 24343 {
jpayne@68 24344 Py_ssize_t __pyx_temp;
jpayne@68 24345 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
jpayne@68 24346 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
jpayne@68 24347 }
jpayne@68 24348 }
jpayne@68 24349 __Pyx_RefNannyFinishContext();
jpayne@68 24350 return __pyx_r;
jpayne@68 24351 }
jpayne@68 24352
jpayne@68 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@68 24354 PyObject *__pyx_v___pyx_PickleError = 0;
jpayne@68 24355 PyObject *__pyx_v___pyx_result = 0;
jpayne@68 24356 PyObject *__pyx_r = NULL;
jpayne@68 24357 __Pyx_TraceDeclarations
jpayne@68 24358 __Pyx_RefNannyDeclarations
jpayne@68 24359 PyObject *__pyx_t_1 = NULL;
jpayne@68 24360 int __pyx_t_2;
jpayne@68 24361 PyObject *__pyx_t_3 = NULL;
jpayne@68 24362 PyObject *__pyx_t_4 = NULL;
jpayne@68 24363 unsigned int __pyx_t_5;
jpayne@68 24364 int __pyx_lineno = 0;
jpayne@68 24365 const char *__pyx_filename = NULL;
jpayne@68 24366 int __pyx_clineno = 0;
jpayne@68 24367 __Pyx_TraceFrameInit(__pyx_codeobj__59)
jpayne@68 24368 __Pyx_RefNannySetupContext("__pyx_unpickle_asGTF", 1);
jpayne@68 24369 __Pyx_TraceCall("__pyx_unpickle_asGTF", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));
jpayne@68 24370
jpayne@68 24371 /* "(tree fragment)":4
jpayne@68 24372 * cdef object __pyx_PickleError
jpayne@68 24373 * cdef object __pyx_result
jpayne@68 24374 * if __pyx_checksum not in (0xe8424ea, 0x14a9dc0, 0x84bea1f): # <<<<<<<<<<<<<<
jpayne@68 24375 * from pickle import PickleError as __pyx_PickleError
jpayne@68 24376 * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xe8424ea, 0x14a9dc0, 0x84bea1f) = (encoding))" % __pyx_checksum
jpayne@68 24377 */
jpayne@68 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@68 24379 __Pyx_GOTREF(__pyx_t_1);
jpayne@68 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@68 24381 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@68 24382 if (__pyx_t_2) {
jpayne@68 24383
jpayne@68 24384 /* "(tree fragment)":5
jpayne@68 24385 * cdef object __pyx_result
jpayne@68 24386 * if __pyx_checksum not in (0xe8424ea, 0x14a9dc0, 0x84bea1f):
jpayne@68 24387 * from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<<
jpayne@68 24388 * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xe8424ea, 0x14a9dc0, 0x84bea1f) = (encoding))" % __pyx_checksum
jpayne@68 24389 * __pyx_result = asGTF.__new__(__pyx_type)
jpayne@68 24390 */
jpayne@68 24391 __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
jpayne@68 24392 __Pyx_GOTREF(__pyx_t_1);
jpayne@68 24393 __Pyx_INCREF(__pyx_n_s_PickleError);
jpayne@68 24394 __Pyx_GIVEREF(__pyx_n_s_PickleError);
jpayne@68 24395 if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_PickleError)) __PYX_ERR(1, 5, __pyx_L1_error);
jpayne@68 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@68 24397 __Pyx_GOTREF(__pyx_t_3);
jpayne@68 24398 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@68 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@68 24400 __Pyx_GOTREF(__pyx_t_1);
jpayne@68 24401 __Pyx_INCREF(__pyx_t_1);
jpayne@68 24402 __pyx_v___pyx_PickleError = __pyx_t_1;
jpayne@68 24403 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@68 24404 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
jpayne@68 24405
jpayne@68 24406 /* "(tree fragment)":6
jpayne@68 24407 * if __pyx_checksum not in (0xe8424ea, 0x14a9dc0, 0x84bea1f):
jpayne@68 24408 * from pickle import PickleError as __pyx_PickleError
jpayne@68 24409 * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xe8424ea, 0x14a9dc0, 0x84bea1f) = (encoding))" % __pyx_checksum # <<<<<<<<<<<<<<
jpayne@68 24410 * __pyx_result = asGTF.__new__(__pyx_type)
jpayne@68 24411 * if __pyx_state is not None:
jpayne@68 24412 */
jpayne@68 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@68 24414 __Pyx_GOTREF(__pyx_t_3);
jpayne@68 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@68 24416 __Pyx_GOTREF(__pyx_t_1);
jpayne@68 24417 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
jpayne@68 24418 __Pyx_Raise(__pyx_v___pyx_PickleError, __pyx_t_1, 0, 0);
jpayne@68 24419 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@68 24420 __PYX_ERR(1, 6, __pyx_L1_error)
jpayne@68 24421
jpayne@68 24422 /* "(tree fragment)":4
jpayne@68 24423 * cdef object __pyx_PickleError
jpayne@68 24424 * cdef object __pyx_result
jpayne@68 24425 * if __pyx_checksum not in (0xe8424ea, 0x14a9dc0, 0x84bea1f): # <<<<<<<<<<<<<<
jpayne@68 24426 * from pickle import PickleError as __pyx_PickleError
jpayne@68 24427 * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xe8424ea, 0x14a9dc0, 0x84bea1f) = (encoding))" % __pyx_checksum
jpayne@68 24428 */
jpayne@68 24429 }
jpayne@68 24430
jpayne@68 24431 /* "(tree fragment)":7
jpayne@68 24432 * from pickle import PickleError as __pyx_PickleError
jpayne@68 24433 * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xe8424ea, 0x14a9dc0, 0x84bea1f) = (encoding))" % __pyx_checksum
jpayne@68 24434 * __pyx_result = asGTF.__new__(__pyx_type) # <<<<<<<<<<<<<<
jpayne@68 24435 * if __pyx_state is not None:
jpayne@68 24436 * __pyx_unpickle_asGTF__set_state(<asGTF> __pyx_result, __pyx_state)
jpayne@68 24437 */
jpayne@68 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@68 24439 __Pyx_GOTREF(__pyx_t_3);
jpayne@68 24440 __pyx_t_4 = NULL;
jpayne@68 24441 __pyx_t_5 = 0;
jpayne@68 24442 #if CYTHON_UNPACK_METHODS
jpayne@68 24443 if (likely(PyMethod_Check(__pyx_t_3))) {
jpayne@68 24444 __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
jpayne@68 24445 if (likely(__pyx_t_4)) {
jpayne@68 24446 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
jpayne@68 24447 __Pyx_INCREF(__pyx_t_4);
jpayne@68 24448 __Pyx_INCREF(function);
jpayne@68 24449 __Pyx_DECREF_SET(__pyx_t_3, function);
jpayne@68 24450 __pyx_t_5 = 1;
jpayne@68 24451 }
jpayne@68 24452 }
jpayne@68 24453 #endif
jpayne@68 24454 {
jpayne@68 24455 PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v___pyx_type};
jpayne@68 24456 __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
jpayne@68 24457 __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
jpayne@68 24458 if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 7, __pyx_L1_error)
jpayne@68 24459 __Pyx_GOTREF(__pyx_t_1);
jpayne@68 24460 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
jpayne@68 24461 }
jpayne@68 24462 __pyx_v___pyx_result = __pyx_t_1;
jpayne@68 24463 __pyx_t_1 = 0;
jpayne@68 24464
jpayne@68 24465 /* "(tree fragment)":8
jpayne@68 24466 * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xe8424ea, 0x14a9dc0, 0x84bea1f) = (encoding))" % __pyx_checksum
jpayne@68 24467 * __pyx_result = asGTF.__new__(__pyx_type)
jpayne@68 24468 * if __pyx_state is not None: # <<<<<<<<<<<<<<
jpayne@68 24469 * __pyx_unpickle_asGTF__set_state(<asGTF> __pyx_result, __pyx_state)
jpayne@68 24470 * return __pyx_result
jpayne@68 24471 */
jpayne@68 24472 __pyx_t_2 = (__pyx_v___pyx_state != Py_None);
jpayne@68 24473 if (__pyx_t_2) {
jpayne@68 24474
jpayne@68 24475 /* "(tree fragment)":9
jpayne@68 24476 * __pyx_result = asGTF.__new__(__pyx_type)
jpayne@68 24477 * if __pyx_state is not None:
jpayne@68 24478 * __pyx_unpickle_asGTF__set_state(<asGTF> __pyx_result, __pyx_state) # <<<<<<<<<<<<<<
jpayne@68 24479 * return __pyx_result
jpayne@68 24480 * cdef __pyx_unpickle_asGTF__set_state(asGTF __pyx_result, tuple __pyx_state):
jpayne@68 24481 */
jpayne@68 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@68 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@68 24484 __Pyx_GOTREF(__pyx_t_1);
jpayne@68 24485 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@68 24486
jpayne@68 24487 /* "(tree fragment)":8
jpayne@68 24488 * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xe8424ea, 0x14a9dc0, 0x84bea1f) = (encoding))" % __pyx_checksum
jpayne@68 24489 * __pyx_result = asGTF.__new__(__pyx_type)
jpayne@68 24490 * if __pyx_state is not None: # <<<<<<<<<<<<<<
jpayne@68 24491 * __pyx_unpickle_asGTF__set_state(<asGTF> __pyx_result, __pyx_state)
jpayne@68 24492 * return __pyx_result
jpayne@68 24493 */
jpayne@68 24494 }
jpayne@68 24495
jpayne@68 24496 /* "(tree fragment)":10
jpayne@68 24497 * if __pyx_state is not None:
jpayne@68 24498 * __pyx_unpickle_asGTF__set_state(<asGTF> __pyx_result, __pyx_state)
jpayne@68 24499 * return __pyx_result # <<<<<<<<<<<<<<
jpayne@68 24500 * cdef __pyx_unpickle_asGTF__set_state(asGTF __pyx_result, tuple __pyx_state):
jpayne@68 24501 * __pyx_result.encoding = __pyx_state[0]
jpayne@68 24502 */
jpayne@68 24503 __Pyx_XDECREF(__pyx_r);
jpayne@68 24504 __Pyx_INCREF(__pyx_v___pyx_result);
jpayne@68 24505 __pyx_r = __pyx_v___pyx_result;
jpayne@68 24506 goto __pyx_L0;
jpayne@68 24507
jpayne@68 24508 /* "(tree fragment)":1
jpayne@68 24509 * def __pyx_unpickle_asGTF(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
jpayne@68 24510 * cdef object __pyx_PickleError
jpayne@68 24511 * cdef object __pyx_result
jpayne@68 24512 */
jpayne@68 24513
jpayne@68 24514 /* function exit code */
jpayne@68 24515 __pyx_L1_error:;
jpayne@68 24516 __Pyx_XDECREF(__pyx_t_1);
jpayne@68 24517 __Pyx_XDECREF(__pyx_t_3);
jpayne@68 24518 __Pyx_XDECREF(__pyx_t_4);
jpayne@68 24519 __Pyx_AddTraceback("pysam.libctabix.__pyx_unpickle_asGTF", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@68 24520 __pyx_r = NULL;
jpayne@68 24521 __pyx_L0:;
jpayne@68 24522 __Pyx_XDECREF(__pyx_v___pyx_PickleError);
jpayne@68 24523 __Pyx_XDECREF(__pyx_v___pyx_result);
jpayne@68 24524 __Pyx_XGIVEREF(__pyx_r);
jpayne@68 24525 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@68 24526 __Pyx_RefNannyFinishContext();
jpayne@68 24527 return __pyx_r;
jpayne@68 24528 }
jpayne@68 24529
jpayne@68 24530 /* "(tree fragment)":11
jpayne@68 24531 * __pyx_unpickle_asGTF__set_state(<asGTF> __pyx_result, __pyx_state)
jpayne@68 24532 * return __pyx_result
jpayne@68 24533 * cdef __pyx_unpickle_asGTF__set_state(asGTF __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
jpayne@68 24534 * __pyx_result.encoding = __pyx_state[0]
jpayne@68 24535 * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
jpayne@68 24536 */
jpayne@68 24537
jpayne@68 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@68 24539 PyObject *__pyx_r = NULL;
jpayne@68 24540 __Pyx_TraceDeclarations
jpayne@68 24541 __Pyx_RefNannyDeclarations
jpayne@68 24542 PyObject *__pyx_t_1 = NULL;
jpayne@68 24543 int __pyx_t_2;
jpayne@68 24544 Py_ssize_t __pyx_t_3;
jpayne@68 24545 int __pyx_t_4;
jpayne@68 24546 PyObject *__pyx_t_5 = NULL;
jpayne@68 24547 PyObject *__pyx_t_6 = NULL;
jpayne@68 24548 PyObject *__pyx_t_7 = NULL;
jpayne@68 24549 unsigned int __pyx_t_8;
jpayne@68 24550 int __pyx_lineno = 0;
jpayne@68 24551 const char *__pyx_filename = NULL;
jpayne@68 24552 int __pyx_clineno = 0;
jpayne@68 24553 __Pyx_RefNannySetupContext("__pyx_unpickle_asGTF__set_state", 1);
jpayne@68 24554 __Pyx_TraceCall("__pyx_unpickle_asGTF__set_state", __pyx_f[1], 11, 0, __PYX_ERR(1, 11, __pyx_L1_error));
jpayne@68 24555
jpayne@68 24556 /* "(tree fragment)":12
jpayne@68 24557 * return __pyx_result
jpayne@68 24558 * cdef __pyx_unpickle_asGTF__set_state(asGTF __pyx_result, tuple __pyx_state):
jpayne@68 24559 * __pyx_result.encoding = __pyx_state[0] # <<<<<<<<<<<<<<
jpayne@68 24560 * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
jpayne@68 24561 * __pyx_result.__dict__.update(__pyx_state[1])
jpayne@68 24562 */
jpayne@68 24563 if (unlikely(__pyx_v___pyx_state == Py_None)) {
jpayne@68 24564 PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
jpayne@68 24565 __PYX_ERR(1, 12, __pyx_L1_error)
jpayne@68 24566 }
jpayne@68 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@68 24568 __Pyx_GOTREF(__pyx_t_1);
jpayne@68 24569 __Pyx_GIVEREF(__pyx_t_1);
jpayne@68 24570 __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.encoding);
jpayne@68 24571 __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.encoding);
jpayne@68 24572 __pyx_v___pyx_result->__pyx_base.encoding = __pyx_t_1;
jpayne@68 24573 __pyx_t_1 = 0;
jpayne@68 24574
jpayne@68 24575 /* "(tree fragment)":13
jpayne@68 24576 * cdef __pyx_unpickle_asGTF__set_state(asGTF __pyx_result, tuple __pyx_state):
jpayne@68 24577 * __pyx_result.encoding = __pyx_state[0]
jpayne@68 24578 * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
jpayne@68 24579 * __pyx_result.__dict__.update(__pyx_state[1])
jpayne@68 24580 */
jpayne@68 24581 if (unlikely(__pyx_v___pyx_state == Py_None)) {
jpayne@68 24582 PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
jpayne@68 24583 __PYX_ERR(1, 13, __pyx_L1_error)
jpayne@68 24584 }
jpayne@68 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@68 24586 __pyx_t_4 = (__pyx_t_3 > 1);
jpayne@68 24587 if (__pyx_t_4) {
jpayne@68 24588 } else {
jpayne@68 24589 __pyx_t_2 = __pyx_t_4;
jpayne@68 24590 goto __pyx_L4_bool_binop_done;
jpayne@68 24591 }
jpayne@68 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@68 24593 __pyx_t_2 = __pyx_t_4;
jpayne@68 24594 __pyx_L4_bool_binop_done:;
jpayne@68 24595 if (__pyx_t_2) {
jpayne@68 24596
jpayne@68 24597 /* "(tree fragment)":14
jpayne@68 24598 * __pyx_result.encoding = __pyx_state[0]
jpayne@68 24599 * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
jpayne@68 24600 * __pyx_result.__dict__.update(__pyx_state[1]) # <<<<<<<<<<<<<<
jpayne@68 24601 */
jpayne@68 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@68 24603 __Pyx_GOTREF(__pyx_t_5);
jpayne@68 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@68 24605 __Pyx_GOTREF(__pyx_t_6);
jpayne@68 24606 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
jpayne@68 24607 if (unlikely(__pyx_v___pyx_state == Py_None)) {
jpayne@68 24608 PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
jpayne@68 24609 __PYX_ERR(1, 14, __pyx_L1_error)
jpayne@68 24610 }
jpayne@68 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@68 24612 __Pyx_GOTREF(__pyx_t_5);
jpayne@68 24613 __pyx_t_7 = NULL;
jpayne@68 24614 __pyx_t_8 = 0;
jpayne@68 24615 #if CYTHON_UNPACK_METHODS
jpayne@68 24616 if (likely(PyMethod_Check(__pyx_t_6))) {
jpayne@68 24617 __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
jpayne@68 24618 if (likely(__pyx_t_7)) {
jpayne@68 24619 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
jpayne@68 24620 __Pyx_INCREF(__pyx_t_7);
jpayne@68 24621 __Pyx_INCREF(function);
jpayne@68 24622 __Pyx_DECREF_SET(__pyx_t_6, function);
jpayne@68 24623 __pyx_t_8 = 1;
jpayne@68 24624 }
jpayne@68 24625 }
jpayne@68 24626 #endif
jpayne@68 24627 {
jpayne@68 24628 PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_5};
jpayne@68 24629 __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8);
jpayne@68 24630 __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
jpayne@68 24631 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
jpayne@68 24632 if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 14, __pyx_L1_error)
jpayne@68 24633 __Pyx_GOTREF(__pyx_t_1);
jpayne@68 24634 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
jpayne@68 24635 }
jpayne@68 24636 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@68 24637
jpayne@68 24638 /* "(tree fragment)":13
jpayne@68 24639 * cdef __pyx_unpickle_asGTF__set_state(asGTF __pyx_result, tuple __pyx_state):
jpayne@68 24640 * __pyx_result.encoding = __pyx_state[0]
jpayne@68 24641 * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
jpayne@68 24642 * __pyx_result.__dict__.update(__pyx_state[1])
jpayne@68 24643 */
jpayne@68 24644 }
jpayne@68 24645
jpayne@68 24646 /* "(tree fragment)":11
jpayne@68 24647 * __pyx_unpickle_asGTF__set_state(<asGTF> __pyx_result, __pyx_state)
jpayne@68 24648 * return __pyx_result
jpayne@68 24649 * cdef __pyx_unpickle_asGTF__set_state(asGTF __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
jpayne@68 24650 * __pyx_result.encoding = __pyx_state[0]
jpayne@68 24651 * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
jpayne@68 24652 */
jpayne@68 24653
jpayne@68 24654 /* function exit code */
jpayne@68 24655 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
jpayne@68 24656 goto __pyx_L0;
jpayne@68 24657 __pyx_L1_error:;
jpayne@68 24658 __Pyx_XDECREF(__pyx_t_1);
jpayne@68 24659 __Pyx_XDECREF(__pyx_t_5);
jpayne@68 24660 __Pyx_XDECREF(__pyx_t_6);
jpayne@68 24661 __Pyx_XDECREF(__pyx_t_7);
jpayne@68 24662 __Pyx_AddTraceback("pysam.libctabix.__pyx_unpickle_asGTF__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@68 24663 __pyx_r = 0;
jpayne@68 24664 __pyx_L0:;
jpayne@68 24665 __Pyx_XGIVEREF(__pyx_r);
jpayne@68 24666 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@68 24667 __Pyx_RefNannyFinishContext();
jpayne@68 24668 return __pyx_r;
jpayne@68 24669 }
jpayne@68 24670
jpayne@68 24671 /* "(tree fragment)":1
jpayne@68 24672 * def __pyx_unpickle_asBed(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
jpayne@68 24673 * cdef object __pyx_PickleError
jpayne@68 24674 * cdef object __pyx_result
jpayne@68 24675 */
jpayne@68 24676
jpayne@68 24677 /* Python wrapper */
jpayne@68 24678 static PyObject *__pyx_pw_5pysam_9libctabix_15__pyx_unpickle_asBed(PyObject *__pyx_self,
jpayne@68 24679 #if CYTHON_METH_FASTCALL
jpayne@68 24680 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@68 24681 #else
jpayne@68 24682 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@68 24683 #endif
jpayne@68 24684 ); /*proto*/
jpayne@68 24685 PyDoc_STRVAR(__pyx_doc_5pysam_9libctabix_14__pyx_unpickle_asBed, "__pyx_unpickle_asBed(__pyx_type, long __pyx_checksum, __pyx_state)");
jpayne@68 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@68 24687 static PyObject *__pyx_pw_5pysam_9libctabix_15__pyx_unpickle_asBed(PyObject *__pyx_self,
jpayne@68 24688 #if CYTHON_METH_FASTCALL
jpayne@68 24689 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@68 24690 #else
jpayne@68 24691 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@68 24692 #endif
jpayne@68 24693 ) {
jpayne@68 24694 PyObject *__pyx_v___pyx_type = 0;
jpayne@68 24695 long __pyx_v___pyx_checksum;
jpayne@68 24696 PyObject *__pyx_v___pyx_state = 0;
jpayne@68 24697 #if !CYTHON_METH_FASTCALL
jpayne@68 24698 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
jpayne@68 24699 #endif
jpayne@68 24700 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@68 24701 PyObject* values[3] = {0,0,0};
jpayne@68 24702 int __pyx_lineno = 0;
jpayne@68 24703 const char *__pyx_filename = NULL;
jpayne@68 24704 int __pyx_clineno = 0;
jpayne@68 24705 PyObject *__pyx_r = 0;
jpayne@68 24706 __Pyx_RefNannyDeclarations
jpayne@68 24707 __Pyx_RefNannySetupContext("__pyx_unpickle_asBed (wrapper)", 0);
jpayne@68 24708 #if !CYTHON_METH_FASTCALL
jpayne@68 24709 #if CYTHON_ASSUME_SAFE_MACROS
jpayne@68 24710 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
jpayne@68 24711 #else
jpayne@68 24712 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
jpayne@68 24713 #endif
jpayne@68 24714 #endif
jpayne@68 24715 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
jpayne@68 24716 {
jpayne@68 24717 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
jpayne@68 24718 if (__pyx_kwds) {
jpayne@68 24719 Py_ssize_t kw_args;
jpayne@68 24720 switch (__pyx_nargs) {
jpayne@68 24721 case 3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
jpayne@68 24722 CYTHON_FALLTHROUGH;
jpayne@68 24723 case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
jpayne@68 24724 CYTHON_FALLTHROUGH;
jpayne@68 24725 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
jpayne@68 24726 CYTHON_FALLTHROUGH;
jpayne@68 24727 case 0: break;
jpayne@68 24728 default: goto __pyx_L5_argtuple_error;
jpayne@68 24729 }
jpayne@68 24730 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
jpayne@68 24731 switch (__pyx_nargs) {
jpayne@68 24732 case 0:
jpayne@68 24733 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_type)) != 0)) {
jpayne@68 24734 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
jpayne@68 24735 kw_args--;
jpayne@68 24736 }
jpayne@68 24737 else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
jpayne@68 24738 else goto __pyx_L5_argtuple_error;
jpayne@68 24739 CYTHON_FALLTHROUGH;
jpayne@68 24740 case 1:
jpayne@68 24741 if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_checksum)) != 0)) {
jpayne@68 24742 (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
jpayne@68 24743 kw_args--;
jpayne@68 24744 }
jpayne@68 24745 else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
jpayne@68 24746 else {
jpayne@68 24747 __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_asBed", 1, 3, 3, 1); __PYX_ERR(1, 1, __pyx_L3_error)
jpayne@68 24748 }
jpayne@68 24749 CYTHON_FALLTHROUGH;
jpayne@68 24750 case 2:
jpayne@68 24751 if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) {
jpayne@68 24752 (void)__Pyx_Arg_NewRef_FASTCALL(values[2]);
jpayne@68 24753 kw_args--;
jpayne@68 24754 }
jpayne@68 24755 else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
jpayne@68 24756 else {
jpayne@68 24757 __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_asBed", 1, 3, 3, 2); __PYX_ERR(1, 1, __pyx_L3_error)
jpayne@68 24758 }
jpayne@68 24759 }
jpayne@68 24760 if (unlikely(kw_args > 0)) {
jpayne@68 24761 const Py_ssize_t kwd_pos_args = __pyx_nargs;
jpayne@68 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@68 24763 }
jpayne@68 24764 } else if (unlikely(__pyx_nargs != 3)) {
jpayne@68 24765 goto __pyx_L5_argtuple_error;
jpayne@68 24766 } else {
jpayne@68 24767 values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
jpayne@68 24768 values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
jpayne@68 24769 values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
jpayne@68 24770 }
jpayne@68 24771 __pyx_v___pyx_type = values[0];
jpayne@68 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@68 24773 __pyx_v___pyx_state = values[2];
jpayne@68 24774 }
jpayne@68 24775 goto __pyx_L6_skip;
jpayne@68 24776 __pyx_L5_argtuple_error:;
jpayne@68 24777 __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_asBed", 1, 3, 3, __pyx_nargs); __PYX_ERR(1, 1, __pyx_L3_error)
jpayne@68 24778 __pyx_L6_skip:;
jpayne@68 24779 goto __pyx_L4_argument_unpacking_done;
jpayne@68 24780 __pyx_L3_error:;
jpayne@68 24781 {
jpayne@68 24782 Py_ssize_t __pyx_temp;
jpayne@68 24783 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
jpayne@68 24784 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
jpayne@68 24785 }
jpayne@68 24786 }
jpayne@68 24787 __Pyx_AddTraceback("pysam.libctabix.__pyx_unpickle_asBed", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@68 24788 __Pyx_RefNannyFinishContext();
jpayne@68 24789 return NULL;
jpayne@68 24790 __pyx_L4_argument_unpacking_done:;
jpayne@68 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@68 24792
jpayne@68 24793 /* function exit code */
jpayne@68 24794 {
jpayne@68 24795 Py_ssize_t __pyx_temp;
jpayne@68 24796 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
jpayne@68 24797 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
jpayne@68 24798 }
jpayne@68 24799 }
jpayne@68 24800 __Pyx_RefNannyFinishContext();
jpayne@68 24801 return __pyx_r;
jpayne@68 24802 }
jpayne@68 24803
jpayne@68 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@68 24805 PyObject *__pyx_v___pyx_PickleError = 0;
jpayne@68 24806 PyObject *__pyx_v___pyx_result = 0;
jpayne@68 24807 PyObject *__pyx_r = NULL;
jpayne@68 24808 __Pyx_TraceDeclarations
jpayne@68 24809 __Pyx_RefNannyDeclarations
jpayne@68 24810 PyObject *__pyx_t_1 = NULL;
jpayne@68 24811 int __pyx_t_2;
jpayne@68 24812 PyObject *__pyx_t_3 = NULL;
jpayne@68 24813 PyObject *__pyx_t_4 = NULL;
jpayne@68 24814 unsigned int __pyx_t_5;
jpayne@68 24815 int __pyx_lineno = 0;
jpayne@68 24816 const char *__pyx_filename = NULL;
jpayne@68 24817 int __pyx_clineno = 0;
jpayne@68 24818 __Pyx_TraceFrameInit(__pyx_codeobj__60)
jpayne@68 24819 __Pyx_RefNannySetupContext("__pyx_unpickle_asBed", 1);
jpayne@68 24820 __Pyx_TraceCall("__pyx_unpickle_asBed", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));
jpayne@68 24821
jpayne@68 24822 /* "(tree fragment)":4
jpayne@68 24823 * cdef object __pyx_PickleError
jpayne@68 24824 * cdef object __pyx_result
jpayne@68 24825 * if __pyx_checksum not in (0xe8424ea, 0x14a9dc0, 0x84bea1f): # <<<<<<<<<<<<<<
jpayne@68 24826 * from pickle import PickleError as __pyx_PickleError
jpayne@68 24827 * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xe8424ea, 0x14a9dc0, 0x84bea1f) = (encoding))" % __pyx_checksum
jpayne@68 24828 */
jpayne@68 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@68 24830 __Pyx_GOTREF(__pyx_t_1);
jpayne@68 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@68 24832 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@68 24833 if (__pyx_t_2) {
jpayne@68 24834
jpayne@68 24835 /* "(tree fragment)":5
jpayne@68 24836 * cdef object __pyx_result
jpayne@68 24837 * if __pyx_checksum not in (0xe8424ea, 0x14a9dc0, 0x84bea1f):
jpayne@68 24838 * from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<<
jpayne@68 24839 * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xe8424ea, 0x14a9dc0, 0x84bea1f) = (encoding))" % __pyx_checksum
jpayne@68 24840 * __pyx_result = asBed.__new__(__pyx_type)
jpayne@68 24841 */
jpayne@68 24842 __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
jpayne@68 24843 __Pyx_GOTREF(__pyx_t_1);
jpayne@68 24844 __Pyx_INCREF(__pyx_n_s_PickleError);
jpayne@68 24845 __Pyx_GIVEREF(__pyx_n_s_PickleError);
jpayne@68 24846 if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_PickleError)) __PYX_ERR(1, 5, __pyx_L1_error);
jpayne@68 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@68 24848 __Pyx_GOTREF(__pyx_t_3);
jpayne@68 24849 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@68 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@68 24851 __Pyx_GOTREF(__pyx_t_1);
jpayne@68 24852 __Pyx_INCREF(__pyx_t_1);
jpayne@68 24853 __pyx_v___pyx_PickleError = __pyx_t_1;
jpayne@68 24854 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@68 24855 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
jpayne@68 24856
jpayne@68 24857 /* "(tree fragment)":6
jpayne@68 24858 * if __pyx_checksum not in (0xe8424ea, 0x14a9dc0, 0x84bea1f):
jpayne@68 24859 * from pickle import PickleError as __pyx_PickleError
jpayne@68 24860 * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xe8424ea, 0x14a9dc0, 0x84bea1f) = (encoding))" % __pyx_checksum # <<<<<<<<<<<<<<
jpayne@68 24861 * __pyx_result = asBed.__new__(__pyx_type)
jpayne@68 24862 * if __pyx_state is not None:
jpayne@68 24863 */
jpayne@68 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@68 24865 __Pyx_GOTREF(__pyx_t_3);
jpayne@68 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@68 24867 __Pyx_GOTREF(__pyx_t_1);
jpayne@68 24868 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
jpayne@68 24869 __Pyx_Raise(__pyx_v___pyx_PickleError, __pyx_t_1, 0, 0);
jpayne@68 24870 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@68 24871 __PYX_ERR(1, 6, __pyx_L1_error)
jpayne@68 24872
jpayne@68 24873 /* "(tree fragment)":4
jpayne@68 24874 * cdef object __pyx_PickleError
jpayne@68 24875 * cdef object __pyx_result
jpayne@68 24876 * if __pyx_checksum not in (0xe8424ea, 0x14a9dc0, 0x84bea1f): # <<<<<<<<<<<<<<
jpayne@68 24877 * from pickle import PickleError as __pyx_PickleError
jpayne@68 24878 * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xe8424ea, 0x14a9dc0, 0x84bea1f) = (encoding))" % __pyx_checksum
jpayne@68 24879 */
jpayne@68 24880 }
jpayne@68 24881
jpayne@68 24882 /* "(tree fragment)":7
jpayne@68 24883 * from pickle import PickleError as __pyx_PickleError
jpayne@68 24884 * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xe8424ea, 0x14a9dc0, 0x84bea1f) = (encoding))" % __pyx_checksum
jpayne@68 24885 * __pyx_result = asBed.__new__(__pyx_type) # <<<<<<<<<<<<<<
jpayne@68 24886 * if __pyx_state is not None:
jpayne@68 24887 * __pyx_unpickle_asBed__set_state(<asBed> __pyx_result, __pyx_state)
jpayne@68 24888 */
jpayne@68 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@68 24890 __Pyx_GOTREF(__pyx_t_3);
jpayne@68 24891 __pyx_t_4 = NULL;
jpayne@68 24892 __pyx_t_5 = 0;
jpayne@68 24893 #if CYTHON_UNPACK_METHODS
jpayne@68 24894 if (likely(PyMethod_Check(__pyx_t_3))) {
jpayne@68 24895 __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
jpayne@68 24896 if (likely(__pyx_t_4)) {
jpayne@68 24897 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
jpayne@68 24898 __Pyx_INCREF(__pyx_t_4);
jpayne@68 24899 __Pyx_INCREF(function);
jpayne@68 24900 __Pyx_DECREF_SET(__pyx_t_3, function);
jpayne@68 24901 __pyx_t_5 = 1;
jpayne@68 24902 }
jpayne@68 24903 }
jpayne@68 24904 #endif
jpayne@68 24905 {
jpayne@68 24906 PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v___pyx_type};
jpayne@68 24907 __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
jpayne@68 24908 __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
jpayne@68 24909 if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 7, __pyx_L1_error)
jpayne@68 24910 __Pyx_GOTREF(__pyx_t_1);
jpayne@68 24911 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
jpayne@68 24912 }
jpayne@68 24913 __pyx_v___pyx_result = __pyx_t_1;
jpayne@68 24914 __pyx_t_1 = 0;
jpayne@68 24915
jpayne@68 24916 /* "(tree fragment)":8
jpayne@68 24917 * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xe8424ea, 0x14a9dc0, 0x84bea1f) = (encoding))" % __pyx_checksum
jpayne@68 24918 * __pyx_result = asBed.__new__(__pyx_type)
jpayne@68 24919 * if __pyx_state is not None: # <<<<<<<<<<<<<<
jpayne@68 24920 * __pyx_unpickle_asBed__set_state(<asBed> __pyx_result, __pyx_state)
jpayne@68 24921 * return __pyx_result
jpayne@68 24922 */
jpayne@68 24923 __pyx_t_2 = (__pyx_v___pyx_state != Py_None);
jpayne@68 24924 if (__pyx_t_2) {
jpayne@68 24925
jpayne@68 24926 /* "(tree fragment)":9
jpayne@68 24927 * __pyx_result = asBed.__new__(__pyx_type)
jpayne@68 24928 * if __pyx_state is not None:
jpayne@68 24929 * __pyx_unpickle_asBed__set_state(<asBed> __pyx_result, __pyx_state) # <<<<<<<<<<<<<<
jpayne@68 24930 * return __pyx_result
jpayne@68 24931 * cdef __pyx_unpickle_asBed__set_state(asBed __pyx_result, tuple __pyx_state):
jpayne@68 24932 */
jpayne@68 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@68 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@68 24935 __Pyx_GOTREF(__pyx_t_1);
jpayne@68 24936 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@68 24937
jpayne@68 24938 /* "(tree fragment)":8
jpayne@68 24939 * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xe8424ea, 0x14a9dc0, 0x84bea1f) = (encoding))" % __pyx_checksum
jpayne@68 24940 * __pyx_result = asBed.__new__(__pyx_type)
jpayne@68 24941 * if __pyx_state is not None: # <<<<<<<<<<<<<<
jpayne@68 24942 * __pyx_unpickle_asBed__set_state(<asBed> __pyx_result, __pyx_state)
jpayne@68 24943 * return __pyx_result
jpayne@68 24944 */
jpayne@68 24945 }
jpayne@68 24946
jpayne@68 24947 /* "(tree fragment)":10
jpayne@68 24948 * if __pyx_state is not None:
jpayne@68 24949 * __pyx_unpickle_asBed__set_state(<asBed> __pyx_result, __pyx_state)
jpayne@68 24950 * return __pyx_result # <<<<<<<<<<<<<<
jpayne@68 24951 * cdef __pyx_unpickle_asBed__set_state(asBed __pyx_result, tuple __pyx_state):
jpayne@68 24952 * __pyx_result.encoding = __pyx_state[0]
jpayne@68 24953 */
jpayne@68 24954 __Pyx_XDECREF(__pyx_r);
jpayne@68 24955 __Pyx_INCREF(__pyx_v___pyx_result);
jpayne@68 24956 __pyx_r = __pyx_v___pyx_result;
jpayne@68 24957 goto __pyx_L0;
jpayne@68 24958
jpayne@68 24959 /* "(tree fragment)":1
jpayne@68 24960 * def __pyx_unpickle_asBed(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
jpayne@68 24961 * cdef object __pyx_PickleError
jpayne@68 24962 * cdef object __pyx_result
jpayne@68 24963 */
jpayne@68 24964
jpayne@68 24965 /* function exit code */
jpayne@68 24966 __pyx_L1_error:;
jpayne@68 24967 __Pyx_XDECREF(__pyx_t_1);
jpayne@68 24968 __Pyx_XDECREF(__pyx_t_3);
jpayne@68 24969 __Pyx_XDECREF(__pyx_t_4);
jpayne@68 24970 __Pyx_AddTraceback("pysam.libctabix.__pyx_unpickle_asBed", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@68 24971 __pyx_r = NULL;
jpayne@68 24972 __pyx_L0:;
jpayne@68 24973 __Pyx_XDECREF(__pyx_v___pyx_PickleError);
jpayne@68 24974 __Pyx_XDECREF(__pyx_v___pyx_result);
jpayne@68 24975 __Pyx_XGIVEREF(__pyx_r);
jpayne@68 24976 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@68 24977 __Pyx_RefNannyFinishContext();
jpayne@68 24978 return __pyx_r;
jpayne@68 24979 }
jpayne@68 24980
jpayne@68 24981 /* "(tree fragment)":11
jpayne@68 24982 * __pyx_unpickle_asBed__set_state(<asBed> __pyx_result, __pyx_state)
jpayne@68 24983 * return __pyx_result
jpayne@68 24984 * cdef __pyx_unpickle_asBed__set_state(asBed __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
jpayne@68 24985 * __pyx_result.encoding = __pyx_state[0]
jpayne@68 24986 * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
jpayne@68 24987 */
jpayne@68 24988
jpayne@68 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@68 24990 PyObject *__pyx_r = NULL;
jpayne@68 24991 __Pyx_TraceDeclarations
jpayne@68 24992 __Pyx_RefNannyDeclarations
jpayne@68 24993 PyObject *__pyx_t_1 = NULL;
jpayne@68 24994 int __pyx_t_2;
jpayne@68 24995 Py_ssize_t __pyx_t_3;
jpayne@68 24996 int __pyx_t_4;
jpayne@68 24997 PyObject *__pyx_t_5 = NULL;
jpayne@68 24998 PyObject *__pyx_t_6 = NULL;
jpayne@68 24999 PyObject *__pyx_t_7 = NULL;
jpayne@68 25000 unsigned int __pyx_t_8;
jpayne@68 25001 int __pyx_lineno = 0;
jpayne@68 25002 const char *__pyx_filename = NULL;
jpayne@68 25003 int __pyx_clineno = 0;
jpayne@68 25004 __Pyx_RefNannySetupContext("__pyx_unpickle_asBed__set_state", 1);
jpayne@68 25005 __Pyx_TraceCall("__pyx_unpickle_asBed__set_state", __pyx_f[1], 11, 0, __PYX_ERR(1, 11, __pyx_L1_error));
jpayne@68 25006
jpayne@68 25007 /* "(tree fragment)":12
jpayne@68 25008 * return __pyx_result
jpayne@68 25009 * cdef __pyx_unpickle_asBed__set_state(asBed __pyx_result, tuple __pyx_state):
jpayne@68 25010 * __pyx_result.encoding = __pyx_state[0] # <<<<<<<<<<<<<<
jpayne@68 25011 * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
jpayne@68 25012 * __pyx_result.__dict__.update(__pyx_state[1])
jpayne@68 25013 */
jpayne@68 25014 if (unlikely(__pyx_v___pyx_state == Py_None)) {
jpayne@68 25015 PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
jpayne@68 25016 __PYX_ERR(1, 12, __pyx_L1_error)
jpayne@68 25017 }
jpayne@68 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@68 25019 __Pyx_GOTREF(__pyx_t_1);
jpayne@68 25020 __Pyx_GIVEREF(__pyx_t_1);
jpayne@68 25021 __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.encoding);
jpayne@68 25022 __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.encoding);
jpayne@68 25023 __pyx_v___pyx_result->__pyx_base.encoding = __pyx_t_1;
jpayne@68 25024 __pyx_t_1 = 0;
jpayne@68 25025
jpayne@68 25026 /* "(tree fragment)":13
jpayne@68 25027 * cdef __pyx_unpickle_asBed__set_state(asBed __pyx_result, tuple __pyx_state):
jpayne@68 25028 * __pyx_result.encoding = __pyx_state[0]
jpayne@68 25029 * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
jpayne@68 25030 * __pyx_result.__dict__.update(__pyx_state[1])
jpayne@68 25031 */
jpayne@68 25032 if (unlikely(__pyx_v___pyx_state == Py_None)) {
jpayne@68 25033 PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
jpayne@68 25034 __PYX_ERR(1, 13, __pyx_L1_error)
jpayne@68 25035 }
jpayne@68 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@68 25037 __pyx_t_4 = (__pyx_t_3 > 1);
jpayne@68 25038 if (__pyx_t_4) {
jpayne@68 25039 } else {
jpayne@68 25040 __pyx_t_2 = __pyx_t_4;
jpayne@68 25041 goto __pyx_L4_bool_binop_done;
jpayne@68 25042 }
jpayne@68 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@68 25044 __pyx_t_2 = __pyx_t_4;
jpayne@68 25045 __pyx_L4_bool_binop_done:;
jpayne@68 25046 if (__pyx_t_2) {
jpayne@68 25047
jpayne@68 25048 /* "(tree fragment)":14
jpayne@68 25049 * __pyx_result.encoding = __pyx_state[0]
jpayne@68 25050 * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
jpayne@68 25051 * __pyx_result.__dict__.update(__pyx_state[1]) # <<<<<<<<<<<<<<
jpayne@68 25052 */
jpayne@68 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@68 25054 __Pyx_GOTREF(__pyx_t_5);
jpayne@68 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@68 25056 __Pyx_GOTREF(__pyx_t_6);
jpayne@68 25057 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
jpayne@68 25058 if (unlikely(__pyx_v___pyx_state == Py_None)) {
jpayne@68 25059 PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
jpayne@68 25060 __PYX_ERR(1, 14, __pyx_L1_error)
jpayne@68 25061 }
jpayne@68 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@68 25063 __Pyx_GOTREF(__pyx_t_5);
jpayne@68 25064 __pyx_t_7 = NULL;
jpayne@68 25065 __pyx_t_8 = 0;
jpayne@68 25066 #if CYTHON_UNPACK_METHODS
jpayne@68 25067 if (likely(PyMethod_Check(__pyx_t_6))) {
jpayne@68 25068 __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
jpayne@68 25069 if (likely(__pyx_t_7)) {
jpayne@68 25070 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
jpayne@68 25071 __Pyx_INCREF(__pyx_t_7);
jpayne@68 25072 __Pyx_INCREF(function);
jpayne@68 25073 __Pyx_DECREF_SET(__pyx_t_6, function);
jpayne@68 25074 __pyx_t_8 = 1;
jpayne@68 25075 }
jpayne@68 25076 }
jpayne@68 25077 #endif
jpayne@68 25078 {
jpayne@68 25079 PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_5};
jpayne@68 25080 __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8);
jpayne@68 25081 __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
jpayne@68 25082 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
jpayne@68 25083 if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 14, __pyx_L1_error)
jpayne@68 25084 __Pyx_GOTREF(__pyx_t_1);
jpayne@68 25085 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
jpayne@68 25086 }
jpayne@68 25087 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@68 25088
jpayne@68 25089 /* "(tree fragment)":13
jpayne@68 25090 * cdef __pyx_unpickle_asBed__set_state(asBed __pyx_result, tuple __pyx_state):
jpayne@68 25091 * __pyx_result.encoding = __pyx_state[0]
jpayne@68 25092 * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
jpayne@68 25093 * __pyx_result.__dict__.update(__pyx_state[1])
jpayne@68 25094 */
jpayne@68 25095 }
jpayne@68 25096
jpayne@68 25097 /* "(tree fragment)":11
jpayne@68 25098 * __pyx_unpickle_asBed__set_state(<asBed> __pyx_result, __pyx_state)
jpayne@68 25099 * return __pyx_result
jpayne@68 25100 * cdef __pyx_unpickle_asBed__set_state(asBed __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
jpayne@68 25101 * __pyx_result.encoding = __pyx_state[0]
jpayne@68 25102 * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
jpayne@68 25103 */
jpayne@68 25104
jpayne@68 25105 /* function exit code */
jpayne@68 25106 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
jpayne@68 25107 goto __pyx_L0;
jpayne@68 25108 __pyx_L1_error:;
jpayne@68 25109 __Pyx_XDECREF(__pyx_t_1);
jpayne@68 25110 __Pyx_XDECREF(__pyx_t_5);
jpayne@68 25111 __Pyx_XDECREF(__pyx_t_6);
jpayne@68 25112 __Pyx_XDECREF(__pyx_t_7);
jpayne@68 25113 __Pyx_AddTraceback("pysam.libctabix.__pyx_unpickle_asBed__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@68 25114 __pyx_r = 0;
jpayne@68 25115 __pyx_L0:;
jpayne@68 25116 __Pyx_XGIVEREF(__pyx_r);
jpayne@68 25117 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@68 25118 __Pyx_RefNannyFinishContext();
jpayne@68 25119 return __pyx_r;
jpayne@68 25120 }
jpayne@68 25121
jpayne@68 25122 /* "(tree fragment)":1
jpayne@68 25123 * def __pyx_unpickle_asVCF(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
jpayne@68 25124 * cdef object __pyx_PickleError
jpayne@68 25125 * cdef object __pyx_result
jpayne@68 25126 */
jpayne@68 25127
jpayne@68 25128 /* Python wrapper */
jpayne@68 25129 static PyObject *__pyx_pw_5pysam_9libctabix_17__pyx_unpickle_asVCF(PyObject *__pyx_self,
jpayne@68 25130 #if CYTHON_METH_FASTCALL
jpayne@68 25131 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@68 25132 #else
jpayne@68 25133 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@68 25134 #endif
jpayne@68 25135 ); /*proto*/
jpayne@68 25136 PyDoc_STRVAR(__pyx_doc_5pysam_9libctabix_16__pyx_unpickle_asVCF, "__pyx_unpickle_asVCF(__pyx_type, long __pyx_checksum, __pyx_state)");
jpayne@68 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@68 25138 static PyObject *__pyx_pw_5pysam_9libctabix_17__pyx_unpickle_asVCF(PyObject *__pyx_self,
jpayne@68 25139 #if CYTHON_METH_FASTCALL
jpayne@68 25140 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@68 25141 #else
jpayne@68 25142 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@68 25143 #endif
jpayne@68 25144 ) {
jpayne@68 25145 PyObject *__pyx_v___pyx_type = 0;
jpayne@68 25146 long __pyx_v___pyx_checksum;
jpayne@68 25147 PyObject *__pyx_v___pyx_state = 0;
jpayne@68 25148 #if !CYTHON_METH_FASTCALL
jpayne@68 25149 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
jpayne@68 25150 #endif
jpayne@68 25151 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@68 25152 PyObject* values[3] = {0,0,0};
jpayne@68 25153 int __pyx_lineno = 0;
jpayne@68 25154 const char *__pyx_filename = NULL;
jpayne@68 25155 int __pyx_clineno = 0;
jpayne@68 25156 PyObject *__pyx_r = 0;
jpayne@68 25157 __Pyx_RefNannyDeclarations
jpayne@68 25158 __Pyx_RefNannySetupContext("__pyx_unpickle_asVCF (wrapper)", 0);
jpayne@68 25159 #if !CYTHON_METH_FASTCALL
jpayne@68 25160 #if CYTHON_ASSUME_SAFE_MACROS
jpayne@68 25161 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
jpayne@68 25162 #else
jpayne@68 25163 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
jpayne@68 25164 #endif
jpayne@68 25165 #endif
jpayne@68 25166 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
jpayne@68 25167 {
jpayne@68 25168 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
jpayne@68 25169 if (__pyx_kwds) {
jpayne@68 25170 Py_ssize_t kw_args;
jpayne@68 25171 switch (__pyx_nargs) {
jpayne@68 25172 case 3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
jpayne@68 25173 CYTHON_FALLTHROUGH;
jpayne@68 25174 case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
jpayne@68 25175 CYTHON_FALLTHROUGH;
jpayne@68 25176 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
jpayne@68 25177 CYTHON_FALLTHROUGH;
jpayne@68 25178 case 0: break;
jpayne@68 25179 default: goto __pyx_L5_argtuple_error;
jpayne@68 25180 }
jpayne@68 25181 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
jpayne@68 25182 switch (__pyx_nargs) {
jpayne@68 25183 case 0:
jpayne@68 25184 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_type)) != 0)) {
jpayne@68 25185 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
jpayne@68 25186 kw_args--;
jpayne@68 25187 }
jpayne@68 25188 else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
jpayne@68 25189 else goto __pyx_L5_argtuple_error;
jpayne@68 25190 CYTHON_FALLTHROUGH;
jpayne@68 25191 case 1:
jpayne@68 25192 if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_checksum)) != 0)) {
jpayne@68 25193 (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
jpayne@68 25194 kw_args--;
jpayne@68 25195 }
jpayne@68 25196 else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
jpayne@68 25197 else {
jpayne@68 25198 __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_asVCF", 1, 3, 3, 1); __PYX_ERR(1, 1, __pyx_L3_error)
jpayne@68 25199 }
jpayne@68 25200 CYTHON_FALLTHROUGH;
jpayne@68 25201 case 2:
jpayne@68 25202 if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) {
jpayne@68 25203 (void)__Pyx_Arg_NewRef_FASTCALL(values[2]);
jpayne@68 25204 kw_args--;
jpayne@68 25205 }
jpayne@68 25206 else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
jpayne@68 25207 else {
jpayne@68 25208 __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_asVCF", 1, 3, 3, 2); __PYX_ERR(1, 1, __pyx_L3_error)
jpayne@68 25209 }
jpayne@68 25210 }
jpayne@68 25211 if (unlikely(kw_args > 0)) {
jpayne@68 25212 const Py_ssize_t kwd_pos_args = __pyx_nargs;
jpayne@68 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@68 25214 }
jpayne@68 25215 } else if (unlikely(__pyx_nargs != 3)) {
jpayne@68 25216 goto __pyx_L5_argtuple_error;
jpayne@68 25217 } else {
jpayne@68 25218 values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
jpayne@68 25219 values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
jpayne@68 25220 values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
jpayne@68 25221 }
jpayne@68 25222 __pyx_v___pyx_type = values[0];
jpayne@68 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@68 25224 __pyx_v___pyx_state = values[2];
jpayne@68 25225 }
jpayne@68 25226 goto __pyx_L6_skip;
jpayne@68 25227 __pyx_L5_argtuple_error:;
jpayne@68 25228 __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_asVCF", 1, 3, 3, __pyx_nargs); __PYX_ERR(1, 1, __pyx_L3_error)
jpayne@68 25229 __pyx_L6_skip:;
jpayne@68 25230 goto __pyx_L4_argument_unpacking_done;
jpayne@68 25231 __pyx_L3_error:;
jpayne@68 25232 {
jpayne@68 25233 Py_ssize_t __pyx_temp;
jpayne@68 25234 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
jpayne@68 25235 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
jpayne@68 25236 }
jpayne@68 25237 }
jpayne@68 25238 __Pyx_AddTraceback("pysam.libctabix.__pyx_unpickle_asVCF", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@68 25239 __Pyx_RefNannyFinishContext();
jpayne@68 25240 return NULL;
jpayne@68 25241 __pyx_L4_argument_unpacking_done:;
jpayne@68 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@68 25243
jpayne@68 25244 /* function exit code */
jpayne@68 25245 {
jpayne@68 25246 Py_ssize_t __pyx_temp;
jpayne@68 25247 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
jpayne@68 25248 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
jpayne@68 25249 }
jpayne@68 25250 }
jpayne@68 25251 __Pyx_RefNannyFinishContext();
jpayne@68 25252 return __pyx_r;
jpayne@68 25253 }
jpayne@68 25254
jpayne@68 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@68 25256 PyObject *__pyx_v___pyx_PickleError = 0;
jpayne@68 25257 PyObject *__pyx_v___pyx_result = 0;
jpayne@68 25258 PyObject *__pyx_r = NULL;
jpayne@68 25259 __Pyx_TraceDeclarations
jpayne@68 25260 __Pyx_RefNannyDeclarations
jpayne@68 25261 PyObject *__pyx_t_1 = NULL;
jpayne@68 25262 int __pyx_t_2;
jpayne@68 25263 PyObject *__pyx_t_3 = NULL;
jpayne@68 25264 PyObject *__pyx_t_4 = NULL;
jpayne@68 25265 unsigned int __pyx_t_5;
jpayne@68 25266 int __pyx_lineno = 0;
jpayne@68 25267 const char *__pyx_filename = NULL;
jpayne@68 25268 int __pyx_clineno = 0;
jpayne@68 25269 __Pyx_TraceFrameInit(__pyx_codeobj__61)
jpayne@68 25270 __Pyx_RefNannySetupContext("__pyx_unpickle_asVCF", 1);
jpayne@68 25271 __Pyx_TraceCall("__pyx_unpickle_asVCF", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));
jpayne@68 25272
jpayne@68 25273 /* "(tree fragment)":4
jpayne@68 25274 * cdef object __pyx_PickleError
jpayne@68 25275 * cdef object __pyx_result
jpayne@68 25276 * if __pyx_checksum not in (0xe8424ea, 0x14a9dc0, 0x84bea1f): # <<<<<<<<<<<<<<
jpayne@68 25277 * from pickle import PickleError as __pyx_PickleError
jpayne@68 25278 * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xe8424ea, 0x14a9dc0, 0x84bea1f) = (encoding))" % __pyx_checksum
jpayne@68 25279 */
jpayne@68 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@68 25281 __Pyx_GOTREF(__pyx_t_1);
jpayne@68 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@68 25283 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@68 25284 if (__pyx_t_2) {
jpayne@68 25285
jpayne@68 25286 /* "(tree fragment)":5
jpayne@68 25287 * cdef object __pyx_result
jpayne@68 25288 * if __pyx_checksum not in (0xe8424ea, 0x14a9dc0, 0x84bea1f):
jpayne@68 25289 * from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<<
jpayne@68 25290 * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xe8424ea, 0x14a9dc0, 0x84bea1f) = (encoding))" % __pyx_checksum
jpayne@68 25291 * __pyx_result = asVCF.__new__(__pyx_type)
jpayne@68 25292 */
jpayne@68 25293 __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
jpayne@68 25294 __Pyx_GOTREF(__pyx_t_1);
jpayne@68 25295 __Pyx_INCREF(__pyx_n_s_PickleError);
jpayne@68 25296 __Pyx_GIVEREF(__pyx_n_s_PickleError);
jpayne@68 25297 if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_PickleError)) __PYX_ERR(1, 5, __pyx_L1_error);
jpayne@68 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@68 25299 __Pyx_GOTREF(__pyx_t_3);
jpayne@68 25300 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@68 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@68 25302 __Pyx_GOTREF(__pyx_t_1);
jpayne@68 25303 __Pyx_INCREF(__pyx_t_1);
jpayne@68 25304 __pyx_v___pyx_PickleError = __pyx_t_1;
jpayne@68 25305 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@68 25306 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
jpayne@68 25307
jpayne@68 25308 /* "(tree fragment)":6
jpayne@68 25309 * if __pyx_checksum not in (0xe8424ea, 0x14a9dc0, 0x84bea1f):
jpayne@68 25310 * from pickle import PickleError as __pyx_PickleError
jpayne@68 25311 * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xe8424ea, 0x14a9dc0, 0x84bea1f) = (encoding))" % __pyx_checksum # <<<<<<<<<<<<<<
jpayne@68 25312 * __pyx_result = asVCF.__new__(__pyx_type)
jpayne@68 25313 * if __pyx_state is not None:
jpayne@68 25314 */
jpayne@68 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@68 25316 __Pyx_GOTREF(__pyx_t_3);
jpayne@68 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@68 25318 __Pyx_GOTREF(__pyx_t_1);
jpayne@68 25319 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
jpayne@68 25320 __Pyx_Raise(__pyx_v___pyx_PickleError, __pyx_t_1, 0, 0);
jpayne@68 25321 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@68 25322 __PYX_ERR(1, 6, __pyx_L1_error)
jpayne@68 25323
jpayne@68 25324 /* "(tree fragment)":4
jpayne@68 25325 * cdef object __pyx_PickleError
jpayne@68 25326 * cdef object __pyx_result
jpayne@68 25327 * if __pyx_checksum not in (0xe8424ea, 0x14a9dc0, 0x84bea1f): # <<<<<<<<<<<<<<
jpayne@68 25328 * from pickle import PickleError as __pyx_PickleError
jpayne@68 25329 * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xe8424ea, 0x14a9dc0, 0x84bea1f) = (encoding))" % __pyx_checksum
jpayne@68 25330 */
jpayne@68 25331 }
jpayne@68 25332
jpayne@68 25333 /* "(tree fragment)":7
jpayne@68 25334 * from pickle import PickleError as __pyx_PickleError
jpayne@68 25335 * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xe8424ea, 0x14a9dc0, 0x84bea1f) = (encoding))" % __pyx_checksum
jpayne@68 25336 * __pyx_result = asVCF.__new__(__pyx_type) # <<<<<<<<<<<<<<
jpayne@68 25337 * if __pyx_state is not None:
jpayne@68 25338 * __pyx_unpickle_asVCF__set_state(<asVCF> __pyx_result, __pyx_state)
jpayne@68 25339 */
jpayne@68 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@68 25341 __Pyx_GOTREF(__pyx_t_3);
jpayne@68 25342 __pyx_t_4 = NULL;
jpayne@68 25343 __pyx_t_5 = 0;
jpayne@68 25344 #if CYTHON_UNPACK_METHODS
jpayne@68 25345 if (likely(PyMethod_Check(__pyx_t_3))) {
jpayne@68 25346 __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
jpayne@68 25347 if (likely(__pyx_t_4)) {
jpayne@68 25348 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
jpayne@68 25349 __Pyx_INCREF(__pyx_t_4);
jpayne@68 25350 __Pyx_INCREF(function);
jpayne@68 25351 __Pyx_DECREF_SET(__pyx_t_3, function);
jpayne@68 25352 __pyx_t_5 = 1;
jpayne@68 25353 }
jpayne@68 25354 }
jpayne@68 25355 #endif
jpayne@68 25356 {
jpayne@68 25357 PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v___pyx_type};
jpayne@68 25358 __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
jpayne@68 25359 __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
jpayne@68 25360 if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 7, __pyx_L1_error)
jpayne@68 25361 __Pyx_GOTREF(__pyx_t_1);
jpayne@68 25362 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
jpayne@68 25363 }
jpayne@68 25364 __pyx_v___pyx_result = __pyx_t_1;
jpayne@68 25365 __pyx_t_1 = 0;
jpayne@68 25366
jpayne@68 25367 /* "(tree fragment)":8
jpayne@68 25368 * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xe8424ea, 0x14a9dc0, 0x84bea1f) = (encoding))" % __pyx_checksum
jpayne@68 25369 * __pyx_result = asVCF.__new__(__pyx_type)
jpayne@68 25370 * if __pyx_state is not None: # <<<<<<<<<<<<<<
jpayne@68 25371 * __pyx_unpickle_asVCF__set_state(<asVCF> __pyx_result, __pyx_state)
jpayne@68 25372 * return __pyx_result
jpayne@68 25373 */
jpayne@68 25374 __pyx_t_2 = (__pyx_v___pyx_state != Py_None);
jpayne@68 25375 if (__pyx_t_2) {
jpayne@68 25376
jpayne@68 25377 /* "(tree fragment)":9
jpayne@68 25378 * __pyx_result = asVCF.__new__(__pyx_type)
jpayne@68 25379 * if __pyx_state is not None:
jpayne@68 25380 * __pyx_unpickle_asVCF__set_state(<asVCF> __pyx_result, __pyx_state) # <<<<<<<<<<<<<<
jpayne@68 25381 * return __pyx_result
jpayne@68 25382 * cdef __pyx_unpickle_asVCF__set_state(asVCF __pyx_result, tuple __pyx_state):
jpayne@68 25383 */
jpayne@68 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@68 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@68 25386 __Pyx_GOTREF(__pyx_t_1);
jpayne@68 25387 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@68 25388
jpayne@68 25389 /* "(tree fragment)":8
jpayne@68 25390 * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xe8424ea, 0x14a9dc0, 0x84bea1f) = (encoding))" % __pyx_checksum
jpayne@68 25391 * __pyx_result = asVCF.__new__(__pyx_type)
jpayne@68 25392 * if __pyx_state is not None: # <<<<<<<<<<<<<<
jpayne@68 25393 * __pyx_unpickle_asVCF__set_state(<asVCF> __pyx_result, __pyx_state)
jpayne@68 25394 * return __pyx_result
jpayne@68 25395 */
jpayne@68 25396 }
jpayne@68 25397
jpayne@68 25398 /* "(tree fragment)":10
jpayne@68 25399 * if __pyx_state is not None:
jpayne@68 25400 * __pyx_unpickle_asVCF__set_state(<asVCF> __pyx_result, __pyx_state)
jpayne@68 25401 * return __pyx_result # <<<<<<<<<<<<<<
jpayne@68 25402 * cdef __pyx_unpickle_asVCF__set_state(asVCF __pyx_result, tuple __pyx_state):
jpayne@68 25403 * __pyx_result.encoding = __pyx_state[0]
jpayne@68 25404 */
jpayne@68 25405 __Pyx_XDECREF(__pyx_r);
jpayne@68 25406 __Pyx_INCREF(__pyx_v___pyx_result);
jpayne@68 25407 __pyx_r = __pyx_v___pyx_result;
jpayne@68 25408 goto __pyx_L0;
jpayne@68 25409
jpayne@68 25410 /* "(tree fragment)":1
jpayne@68 25411 * def __pyx_unpickle_asVCF(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
jpayne@68 25412 * cdef object __pyx_PickleError
jpayne@68 25413 * cdef object __pyx_result
jpayne@68 25414 */
jpayne@68 25415
jpayne@68 25416 /* function exit code */
jpayne@68 25417 __pyx_L1_error:;
jpayne@68 25418 __Pyx_XDECREF(__pyx_t_1);
jpayne@68 25419 __Pyx_XDECREF(__pyx_t_3);
jpayne@68 25420 __Pyx_XDECREF(__pyx_t_4);
jpayne@68 25421 __Pyx_AddTraceback("pysam.libctabix.__pyx_unpickle_asVCF", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@68 25422 __pyx_r = NULL;
jpayne@68 25423 __pyx_L0:;
jpayne@68 25424 __Pyx_XDECREF(__pyx_v___pyx_PickleError);
jpayne@68 25425 __Pyx_XDECREF(__pyx_v___pyx_result);
jpayne@68 25426 __Pyx_XGIVEREF(__pyx_r);
jpayne@68 25427 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@68 25428 __Pyx_RefNannyFinishContext();
jpayne@68 25429 return __pyx_r;
jpayne@68 25430 }
jpayne@68 25431
jpayne@68 25432 /* "(tree fragment)":11
jpayne@68 25433 * __pyx_unpickle_asVCF__set_state(<asVCF> __pyx_result, __pyx_state)
jpayne@68 25434 * return __pyx_result
jpayne@68 25435 * cdef __pyx_unpickle_asVCF__set_state(asVCF __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
jpayne@68 25436 * __pyx_result.encoding = __pyx_state[0]
jpayne@68 25437 * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
jpayne@68 25438 */
jpayne@68 25439
jpayne@68 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@68 25441 PyObject *__pyx_r = NULL;
jpayne@68 25442 __Pyx_TraceDeclarations
jpayne@68 25443 __Pyx_RefNannyDeclarations
jpayne@68 25444 PyObject *__pyx_t_1 = NULL;
jpayne@68 25445 int __pyx_t_2;
jpayne@68 25446 Py_ssize_t __pyx_t_3;
jpayne@68 25447 int __pyx_t_4;
jpayne@68 25448 PyObject *__pyx_t_5 = NULL;
jpayne@68 25449 PyObject *__pyx_t_6 = NULL;
jpayne@68 25450 PyObject *__pyx_t_7 = NULL;
jpayne@68 25451 unsigned int __pyx_t_8;
jpayne@68 25452 int __pyx_lineno = 0;
jpayne@68 25453 const char *__pyx_filename = NULL;
jpayne@68 25454 int __pyx_clineno = 0;
jpayne@68 25455 __Pyx_RefNannySetupContext("__pyx_unpickle_asVCF__set_state", 1);
jpayne@68 25456 __Pyx_TraceCall("__pyx_unpickle_asVCF__set_state", __pyx_f[1], 11, 0, __PYX_ERR(1, 11, __pyx_L1_error));
jpayne@68 25457
jpayne@68 25458 /* "(tree fragment)":12
jpayne@68 25459 * return __pyx_result
jpayne@68 25460 * cdef __pyx_unpickle_asVCF__set_state(asVCF __pyx_result, tuple __pyx_state):
jpayne@68 25461 * __pyx_result.encoding = __pyx_state[0] # <<<<<<<<<<<<<<
jpayne@68 25462 * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
jpayne@68 25463 * __pyx_result.__dict__.update(__pyx_state[1])
jpayne@68 25464 */
jpayne@68 25465 if (unlikely(__pyx_v___pyx_state == Py_None)) {
jpayne@68 25466 PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
jpayne@68 25467 __PYX_ERR(1, 12, __pyx_L1_error)
jpayne@68 25468 }
jpayne@68 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@68 25470 __Pyx_GOTREF(__pyx_t_1);
jpayne@68 25471 __Pyx_GIVEREF(__pyx_t_1);
jpayne@68 25472 __Pyx_GOTREF(__pyx_v___pyx_result->__pyx_base.encoding);
jpayne@68 25473 __Pyx_DECREF(__pyx_v___pyx_result->__pyx_base.encoding);
jpayne@68 25474 __pyx_v___pyx_result->__pyx_base.encoding = __pyx_t_1;
jpayne@68 25475 __pyx_t_1 = 0;
jpayne@68 25476
jpayne@68 25477 /* "(tree fragment)":13
jpayne@68 25478 * cdef __pyx_unpickle_asVCF__set_state(asVCF __pyx_result, tuple __pyx_state):
jpayne@68 25479 * __pyx_result.encoding = __pyx_state[0]
jpayne@68 25480 * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
jpayne@68 25481 * __pyx_result.__dict__.update(__pyx_state[1])
jpayne@68 25482 */
jpayne@68 25483 if (unlikely(__pyx_v___pyx_state == Py_None)) {
jpayne@68 25484 PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
jpayne@68 25485 __PYX_ERR(1, 13, __pyx_L1_error)
jpayne@68 25486 }
jpayne@68 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@68 25488 __pyx_t_4 = (__pyx_t_3 > 1);
jpayne@68 25489 if (__pyx_t_4) {
jpayne@68 25490 } else {
jpayne@68 25491 __pyx_t_2 = __pyx_t_4;
jpayne@68 25492 goto __pyx_L4_bool_binop_done;
jpayne@68 25493 }
jpayne@68 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@68 25495 __pyx_t_2 = __pyx_t_4;
jpayne@68 25496 __pyx_L4_bool_binop_done:;
jpayne@68 25497 if (__pyx_t_2) {
jpayne@68 25498
jpayne@68 25499 /* "(tree fragment)":14
jpayne@68 25500 * __pyx_result.encoding = __pyx_state[0]
jpayne@68 25501 * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
jpayne@68 25502 * __pyx_result.__dict__.update(__pyx_state[1]) # <<<<<<<<<<<<<<
jpayne@68 25503 */
jpayne@68 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@68 25505 __Pyx_GOTREF(__pyx_t_5);
jpayne@68 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@68 25507 __Pyx_GOTREF(__pyx_t_6);
jpayne@68 25508 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
jpayne@68 25509 if (unlikely(__pyx_v___pyx_state == Py_None)) {
jpayne@68 25510 PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
jpayne@68 25511 __PYX_ERR(1, 14, __pyx_L1_error)
jpayne@68 25512 }
jpayne@68 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@68 25514 __Pyx_GOTREF(__pyx_t_5);
jpayne@68 25515 __pyx_t_7 = NULL;
jpayne@68 25516 __pyx_t_8 = 0;
jpayne@68 25517 #if CYTHON_UNPACK_METHODS
jpayne@68 25518 if (likely(PyMethod_Check(__pyx_t_6))) {
jpayne@68 25519 __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
jpayne@68 25520 if (likely(__pyx_t_7)) {
jpayne@68 25521 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
jpayne@68 25522 __Pyx_INCREF(__pyx_t_7);
jpayne@68 25523 __Pyx_INCREF(function);
jpayne@68 25524 __Pyx_DECREF_SET(__pyx_t_6, function);
jpayne@68 25525 __pyx_t_8 = 1;
jpayne@68 25526 }
jpayne@68 25527 }
jpayne@68 25528 #endif
jpayne@68 25529 {
jpayne@68 25530 PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_5};
jpayne@68 25531 __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8);
jpayne@68 25532 __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
jpayne@68 25533 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
jpayne@68 25534 if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 14, __pyx_L1_error)
jpayne@68 25535 __Pyx_GOTREF(__pyx_t_1);
jpayne@68 25536 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
jpayne@68 25537 }
jpayne@68 25538 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@68 25539
jpayne@68 25540 /* "(tree fragment)":13
jpayne@68 25541 * cdef __pyx_unpickle_asVCF__set_state(asVCF __pyx_result, tuple __pyx_state):
jpayne@68 25542 * __pyx_result.encoding = __pyx_state[0]
jpayne@68 25543 * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
jpayne@68 25544 * __pyx_result.__dict__.update(__pyx_state[1])
jpayne@68 25545 */
jpayne@68 25546 }
jpayne@68 25547
jpayne@68 25548 /* "(tree fragment)":11
jpayne@68 25549 * __pyx_unpickle_asVCF__set_state(<asVCF> __pyx_result, __pyx_state)
jpayne@68 25550 * return __pyx_result
jpayne@68 25551 * cdef __pyx_unpickle_asVCF__set_state(asVCF __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
jpayne@68 25552 * __pyx_result.encoding = __pyx_state[0]
jpayne@68 25553 * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
jpayne@68 25554 */
jpayne@68 25555
jpayne@68 25556 /* function exit code */
jpayne@68 25557 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
jpayne@68 25558 goto __pyx_L0;
jpayne@68 25559 __pyx_L1_error:;
jpayne@68 25560 __Pyx_XDECREF(__pyx_t_1);
jpayne@68 25561 __Pyx_XDECREF(__pyx_t_5);
jpayne@68 25562 __Pyx_XDECREF(__pyx_t_6);
jpayne@68 25563 __Pyx_XDECREF(__pyx_t_7);
jpayne@68 25564 __Pyx_AddTraceback("pysam.libctabix.__pyx_unpickle_asVCF__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@68 25565 __pyx_r = 0;
jpayne@68 25566 __pyx_L0:;
jpayne@68 25567 __Pyx_XGIVEREF(__pyx_r);
jpayne@68 25568 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@68 25569 __Pyx_RefNannyFinishContext();
jpayne@68 25570 return __pyx_r;
jpayne@68 25571 }
jpayne@68 25572 static struct __pyx_vtabstruct_5pysam_9libctabix_tabix_file_iterator __pyx_vtable_5pysam_9libctabix_tabix_file_iterator;
jpayne@68 25573
jpayne@68 25574 static PyObject *__pyx_tp_new_5pysam_9libctabix_tabix_file_iterator(PyTypeObject *t, PyObject *a, PyObject *k) {
jpayne@68 25575 struct __pyx_obj_5pysam_9libctabix_tabix_file_iterator *p;
jpayne@68 25576 PyObject *o;
jpayne@68 25577 #if CYTHON_COMPILING_IN_LIMITED_API
jpayne@68 25578 allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc);
jpayne@68 25579 o = alloc_func(t, 0);
jpayne@68 25580 #else
jpayne@68 25581 if (likely(!__Pyx_PyType_HasFeature(t, Py_TPFLAGS_IS_ABSTRACT))) {
jpayne@68 25582 o = (*t->tp_alloc)(t, 0);
jpayne@68 25583 } else {
jpayne@68 25584 o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
jpayne@68 25585 }
jpayne@68 25586 if (unlikely(!o)) return 0;
jpayne@68 25587 #endif
jpayne@68 25588 p = ((struct __pyx_obj_5pysam_9libctabix_tabix_file_iterator *)o);
jpayne@68 25589 p->__pyx_vtab = __pyx_vtabptr_5pysam_9libctabix_tabix_file_iterator;
jpayne@68 25590 p->parser = ((struct __pyx_obj_5pysam_9libctabix_Parser *)Py_None); Py_INCREF(Py_None);
jpayne@68 25591 p->infile = Py_None; Py_INCREF(Py_None);
jpayne@68 25592 if (unlikely(__pyx_pw_5pysam_9libctabix_19tabix_file_iterator_1__cinit__(o, a, k) < 0)) goto bad;
jpayne@68 25593 return o;
jpayne@68 25594 bad:
jpayne@68 25595 Py_DECREF(o); o = 0;
jpayne@68 25596 return NULL;
jpayne@68 25597 }
jpayne@68 25598
jpayne@68 25599 static void __pyx_tp_dealloc_5pysam_9libctabix_tabix_file_iterator(PyObject *o) {
jpayne@68 25600 struct __pyx_obj_5pysam_9libctabix_tabix_file_iterator *p = (struct __pyx_obj_5pysam_9libctabix_tabix_file_iterator *)o;
jpayne@68 25601 #if CYTHON_USE_TP_FINALIZE
jpayne@68 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@68 25603 if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_5pysam_9libctabix_tabix_file_iterator) {
jpayne@68 25604 if (PyObject_CallFinalizerFromDealloc(o)) return;
jpayne@68 25605 }
jpayne@68 25606 }
jpayne@68 25607 #endif
jpayne@68 25608 PyObject_GC_UnTrack(o);
jpayne@68 25609 {
jpayne@68 25610 PyObject *etype, *eval, *etb;
jpayne@68 25611 PyErr_Fetch(&etype, &eval, &etb);
jpayne@68 25612 __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
jpayne@68 25613 __pyx_pw_5pysam_9libctabix_19tabix_file_iterator_5__dealloc__(o);
jpayne@68 25614 __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
jpayne@68 25615 PyErr_Restore(etype, eval, etb);
jpayne@68 25616 }
jpayne@68 25617 Py_CLEAR(p->parser);
jpayne@68 25618 Py_CLEAR(p->infile);
jpayne@68 25619 #if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY
jpayne@68 25620 (*Py_TYPE(o)->tp_free)(o);
jpayne@68 25621 #else
jpayne@68 25622 {
jpayne@68 25623 freefunc tp_free = (freefunc)PyType_GetSlot(Py_TYPE(o), Py_tp_free);
jpayne@68 25624 if (tp_free) tp_free(o);
jpayne@68 25625 }
jpayne@68 25626 #endif
jpayne@68 25627 }
jpayne@68 25628
jpayne@68 25629 static int __pyx_tp_traverse_5pysam_9libctabix_tabix_file_iterator(PyObject *o, visitproc v, void *a) {
jpayne@68 25630 int e;
jpayne@68 25631 struct __pyx_obj_5pysam_9libctabix_tabix_file_iterator *p = (struct __pyx_obj_5pysam_9libctabix_tabix_file_iterator *)o;
jpayne@68 25632 if (p->parser) {
jpayne@68 25633 e = (*v)(((PyObject *)p->parser), a); if (e) return e;
jpayne@68 25634 }
jpayne@68 25635 if (p->infile) {
jpayne@68 25636 e = (*v)(p->infile, a); if (e) return e;
jpayne@68 25637 }
jpayne@68 25638 return 0;
jpayne@68 25639 }
jpayne@68 25640
jpayne@68 25641 static int __pyx_tp_clear_5pysam_9libctabix_tabix_file_iterator(PyObject *o) {
jpayne@68 25642 PyObject* tmp;
jpayne@68 25643 struct __pyx_obj_5pysam_9libctabix_tabix_file_iterator *p = (struct __pyx_obj_5pysam_9libctabix_tabix_file_iterator *)o;
jpayne@68 25644 tmp = ((PyObject*)p->parser);
jpayne@68 25645 p->parser = ((struct __pyx_obj_5pysam_9libctabix_Parser *)Py_None); Py_INCREF(Py_None);
jpayne@68 25646 Py_XDECREF(tmp);
jpayne@68 25647 tmp = ((PyObject*)p->infile);
jpayne@68 25648 p->infile = Py_None; Py_INCREF(Py_None);
jpayne@68 25649 Py_XDECREF(tmp);
jpayne@68 25650 return 0;
jpayne@68 25651 }
jpayne@68 25652
jpayne@68 25653 static PyObject *__pyx_specialmethod___pyx_pw_5pysam_9libctabix_19tabix_file_iterator_7__next__(PyObject *self, CYTHON_UNUSED PyObject *arg) {
jpayne@68 25654 PyObject *res = __pyx_pw_5pysam_9libctabix_19tabix_file_iterator_7__next__(self);
jpayne@68 25655 if (!res && !PyErr_Occurred()) { PyErr_SetNone(PyExc_StopIteration); }
jpayne@68 25656 return res;
jpayne@68 25657 }
jpayne@68 25658
jpayne@68 25659 static PyMethodDef __pyx_methods_5pysam_9libctabix_tabix_file_iterator[] = {
jpayne@68 25660 {"__next__", (PyCFunction)__pyx_specialmethod___pyx_pw_5pysam_9libctabix_19tabix_file_iterator_7__next__, METH_NOARGS|METH_COEXIST, 0},
jpayne@68 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@68 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@68 25663 {0, 0, 0, 0}
jpayne@68 25664 };
jpayne@68 25665 #if CYTHON_USE_TYPE_SPECS
jpayne@68 25666 static PyType_Slot __pyx_type_5pysam_9libctabix_tabix_file_iterator_slots[] = {
jpayne@68 25667 {Py_tp_dealloc, (void *)__pyx_tp_dealloc_5pysam_9libctabix_tabix_file_iterator},
jpayne@68 25668 {Py_tp_doc, (void *)PyDoc_STR("iterate over a compressed or uncompressed ``infile``.\n ")},
jpayne@68 25669 {Py_tp_traverse, (void *)__pyx_tp_traverse_5pysam_9libctabix_tabix_file_iterator},
jpayne@68 25670 {Py_tp_clear, (void *)__pyx_tp_clear_5pysam_9libctabix_tabix_file_iterator},
jpayne@68 25671 {Py_tp_iter, (void *)__pyx_pw_5pysam_9libctabix_19tabix_file_iterator_3__iter__},
jpayne@68 25672 {Py_tp_iternext, (void *)__pyx_pw_5pysam_9libctabix_19tabix_file_iterator_7__next__},
jpayne@68 25673 {Py_tp_methods, (void *)__pyx_methods_5pysam_9libctabix_tabix_file_iterator},
jpayne@68 25674 {Py_tp_new, (void *)__pyx_tp_new_5pysam_9libctabix_tabix_file_iterator},
jpayne@68 25675 {0, 0},
jpayne@68 25676 };
jpayne@68 25677 static PyType_Spec __pyx_type_5pysam_9libctabix_tabix_file_iterator_spec = {
jpayne@68 25678 "pysam.libctabix.tabix_file_iterator",
jpayne@68 25679 sizeof(struct __pyx_obj_5pysam_9libctabix_tabix_file_iterator),
jpayne@68 25680 0,
jpayne@68 25681 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
jpayne@68 25682 __pyx_type_5pysam_9libctabix_tabix_file_iterator_slots,
jpayne@68 25683 };
jpayne@68 25684 #else
jpayne@68 25685
jpayne@68 25686 static PyTypeObject __pyx_type_5pysam_9libctabix_tabix_file_iterator = {
jpayne@68 25687 PyVarObject_HEAD_INIT(0, 0)
jpayne@68 25688 "pysam.libctabix.""tabix_file_iterator", /*tp_name*/
jpayne@68 25689 sizeof(struct __pyx_obj_5pysam_9libctabix_tabix_file_iterator), /*tp_basicsize*/
jpayne@68 25690 0, /*tp_itemsize*/
jpayne@68 25691 __pyx_tp_dealloc_5pysam_9libctabix_tabix_file_iterator, /*tp_dealloc*/
jpayne@68 25692 #if PY_VERSION_HEX < 0x030800b4
jpayne@68 25693 0, /*tp_print*/
jpayne@68 25694 #endif
jpayne@68 25695 #if PY_VERSION_HEX >= 0x030800b4
jpayne@68 25696 0, /*tp_vectorcall_offset*/
jpayne@68 25697 #endif
jpayne@68 25698 0, /*tp_getattr*/
jpayne@68 25699 0, /*tp_setattr*/
jpayne@68 25700 #if PY_MAJOR_VERSION < 3
jpayne@68 25701 0, /*tp_compare*/
jpayne@68 25702 #endif
jpayne@68 25703 #if PY_MAJOR_VERSION >= 3
jpayne@68 25704 0, /*tp_as_async*/
jpayne@68 25705 #endif
jpayne@68 25706 0, /*tp_repr*/
jpayne@68 25707 0, /*tp_as_number*/
jpayne@68 25708 0, /*tp_as_sequence*/
jpayne@68 25709 0, /*tp_as_mapping*/
jpayne@68 25710 0, /*tp_hash*/
jpayne@68 25711 0, /*tp_call*/
jpayne@68 25712 0, /*tp_str*/
jpayne@68 25713 0, /*tp_getattro*/
jpayne@68 25714 0, /*tp_setattro*/
jpayne@68 25715 0, /*tp_as_buffer*/
jpayne@68 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@68 25717 PyDoc_STR("iterate over a compressed or uncompressed ``infile``.\n "), /*tp_doc*/
jpayne@68 25718 __pyx_tp_traverse_5pysam_9libctabix_tabix_file_iterator, /*tp_traverse*/
jpayne@68 25719 __pyx_tp_clear_5pysam_9libctabix_tabix_file_iterator, /*tp_clear*/
jpayne@68 25720 0, /*tp_richcompare*/
jpayne@68 25721 0, /*tp_weaklistoffset*/
jpayne@68 25722 __pyx_pw_5pysam_9libctabix_19tabix_file_iterator_3__iter__, /*tp_iter*/
jpayne@68 25723 __pyx_pw_5pysam_9libctabix_19tabix_file_iterator_7__next__, /*tp_iternext*/
jpayne@68 25724 __pyx_methods_5pysam_9libctabix_tabix_file_iterator, /*tp_methods*/
jpayne@68 25725 0, /*tp_members*/
jpayne@68 25726 0, /*tp_getset*/
jpayne@68 25727 0, /*tp_base*/
jpayne@68 25728 0, /*tp_dict*/
jpayne@68 25729 0, /*tp_descr_get*/
jpayne@68 25730 0, /*tp_descr_set*/
jpayne@68 25731 #if !CYTHON_USE_TYPE_SPECS
jpayne@68 25732 0, /*tp_dictoffset*/
jpayne@68 25733 #endif
jpayne@68 25734 0, /*tp_init*/
jpayne@68 25735 0, /*tp_alloc*/
jpayne@68 25736 __pyx_tp_new_5pysam_9libctabix_tabix_file_iterator, /*tp_new*/
jpayne@68 25737 0, /*tp_free*/
jpayne@68 25738 0, /*tp_is_gc*/
jpayne@68 25739 0, /*tp_bases*/
jpayne@68 25740 0, /*tp_mro*/
jpayne@68 25741 0, /*tp_cache*/
jpayne@68 25742 0, /*tp_subclasses*/
jpayne@68 25743 0, /*tp_weaklist*/
jpayne@68 25744 0, /*tp_del*/
jpayne@68 25745 0, /*tp_version_tag*/
jpayne@68 25746 #if PY_VERSION_HEX >= 0x030400a1
jpayne@68 25747 #if CYTHON_USE_TP_FINALIZE
jpayne@68 25748 0, /*tp_finalize*/
jpayne@68 25749 #else
jpayne@68 25750 NULL, /*tp_finalize*/
jpayne@68 25751 #endif
jpayne@68 25752 #endif
jpayne@68 25753 #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
jpayne@68 25754 0, /*tp_vectorcall*/
jpayne@68 25755 #endif
jpayne@68 25756 #if __PYX_NEED_TP_PRINT_SLOT == 1
jpayne@68 25757 0, /*tp_print*/
jpayne@68 25758 #endif
jpayne@68 25759 #if PY_VERSION_HEX >= 0x030C0000
jpayne@68 25760 0, /*tp_watched*/
jpayne@68 25761 #endif
jpayne@68 25762 #if PY_VERSION_HEX >= 0x030d00A4
jpayne@68 25763 0, /*tp_versions_used*/
jpayne@68 25764 #endif
jpayne@68 25765 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
jpayne@68 25766 0, /*tp_pypy_flags*/
jpayne@68 25767 #endif
jpayne@68 25768 };
jpayne@68 25769 #endif
jpayne@68 25770 static struct __pyx_vtabstruct_5pysam_9libctabix_TabixFile __pyx_vtable_5pysam_9libctabix_TabixFile;
jpayne@68 25771
jpayne@68 25772 static PyObject *__pyx_tp_new_5pysam_9libctabix_TabixFile(PyTypeObject *t, PyObject *a, PyObject *k) {
jpayne@68 25773 struct __pyx_obj_5pysam_9libctabix_TabixFile *p;
jpayne@68 25774 PyObject *o = __Pyx_PyType_GetSlot(__pyx_ptype_5pysam_10libchtslib_HTSFile, tp_new, newfunc)(t, a, k);
jpayne@68 25775 if (unlikely(!o)) return 0;
jpayne@68 25776 p = ((struct __pyx_obj_5pysam_9libctabix_TabixFile *)o);
jpayne@68 25777 p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_5pysam_10libchtslib_HTSFile*)__pyx_vtabptr_5pysam_9libctabix_TabixFile;
jpayne@68 25778 p->filename_index = Py_None; Py_INCREF(Py_None);
jpayne@68 25779 p->parser = ((struct __pyx_obj_5pysam_9libctabix_Parser *)Py_None); Py_INCREF(Py_None);
jpayne@68 25780 p->encoding = Py_None; Py_INCREF(Py_None);
jpayne@68 25781 if (unlikely(__pyx_pw_5pysam_9libctabix_9TabixFile_1__cinit__(o, a, k) < 0)) goto bad;
jpayne@68 25782 return o;
jpayne@68 25783 bad:
jpayne@68 25784 Py_DECREF(o); o = 0;
jpayne@68 25785 return NULL;
jpayne@68 25786 }
jpayne@68 25787
jpayne@68 25788 static void __pyx_tp_dealloc_5pysam_9libctabix_TabixFile(PyObject *o) {
jpayne@68 25789 struct __pyx_obj_5pysam_9libctabix_TabixFile *p = (struct __pyx_obj_5pysam_9libctabix_TabixFile *)o;
jpayne@68 25790 #if CYTHON_USE_TP_FINALIZE
jpayne@68 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@68 25792 if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_5pysam_9libctabix_TabixFile) {
jpayne@68 25793 if (PyObject_CallFinalizerFromDealloc(o)) return;
jpayne@68 25794 }
jpayne@68 25795 }
jpayne@68 25796 #endif
jpayne@68 25797 PyObject_GC_UnTrack(o);
jpayne@68 25798 {
jpayne@68 25799 PyObject *etype, *eval, *etb;
jpayne@68 25800 PyErr_Fetch(&etype, &eval, &etb);
jpayne@68 25801 __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
jpayne@68 25802 __pyx_pw_5pysam_9libctabix_9TabixFile_11__dealloc__(o);
jpayne@68 25803 __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
jpayne@68 25804 PyErr_Restore(etype, eval, etb);
jpayne@68 25805 }
jpayne@68 25806 Py_CLEAR(p->filename_index);
jpayne@68 25807 Py_CLEAR(p->parser);
jpayne@68 25808 Py_CLEAR(p->encoding);
jpayne@68 25809 #if PY_MAJOR_VERSION < 3
jpayne@68 25810 if (!(__pyx_ptype_5pysam_10libchtslib_HTSFile) || PyType_IS_GC(__pyx_ptype_5pysam_10libchtslib_HTSFile)) PyObject_GC_Track(o);
jpayne@68 25811 #else
jpayne@68 25812 if (PyType_IS_GC(__pyx_ptype_5pysam_10libchtslib_HTSFile)) PyObject_GC_Track(o);
jpayne@68 25813 #endif
jpayne@68 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@68 25815 }
jpayne@68 25816
jpayne@68 25817 static int __pyx_tp_traverse_5pysam_9libctabix_TabixFile(PyObject *o, visitproc v, void *a) {
jpayne@68 25818 int e;
jpayne@68 25819 struct __pyx_obj_5pysam_9libctabix_TabixFile *p = (struct __pyx_obj_5pysam_9libctabix_TabixFile *)o;
jpayne@68 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@68 25821 if (p->filename_index) {
jpayne@68 25822 e = (*v)(p->filename_index, a); if (e) return e;
jpayne@68 25823 }
jpayne@68 25824 if (p->parser) {
jpayne@68 25825 e = (*v)(((PyObject *)p->parser), a); if (e) return e;
jpayne@68 25826 }
jpayne@68 25827 if (p->encoding) {
jpayne@68 25828 e = (*v)(p->encoding, a); if (e) return e;
jpayne@68 25829 }
jpayne@68 25830 return 0;
jpayne@68 25831 }
jpayne@68 25832
jpayne@68 25833 static int __pyx_tp_clear_5pysam_9libctabix_TabixFile(PyObject *o) {
jpayne@68 25834 PyObject* tmp;
jpayne@68 25835 struct __pyx_obj_5pysam_9libctabix_TabixFile *p = (struct __pyx_obj_5pysam_9libctabix_TabixFile *)o;
jpayne@68 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@68 25837 tmp = ((PyObject*)p->filename_index);
jpayne@68 25838 p->filename_index = Py_None; Py_INCREF(Py_None);
jpayne@68 25839 Py_XDECREF(tmp);
jpayne@68 25840 tmp = ((PyObject*)p->parser);
jpayne@68 25841 p->parser = ((struct __pyx_obj_5pysam_9libctabix_Parser *)Py_None); Py_INCREF(Py_None);
jpayne@68 25842 Py_XDECREF(tmp);
jpayne@68 25843 tmp = ((PyObject*)p->encoding);
jpayne@68 25844 p->encoding = Py_None; Py_INCREF(Py_None);
jpayne@68 25845 Py_XDECREF(tmp);
jpayne@68 25846 return 0;
jpayne@68 25847 }
jpayne@68 25848
jpayne@68 25849 static PyObject *__pyx_getprop_5pysam_9libctabix_9TabixFile_header(PyObject *o, CYTHON_UNUSED void *x) {
jpayne@68 25850 return __pyx_pw_5pysam_9libctabix_9TabixFile_6header_1__get__(o);
jpayne@68 25851 }
jpayne@68 25852
jpayne@68 25853 static PyObject *__pyx_getprop_5pysam_9libctabix_9TabixFile_contigs(PyObject *o, CYTHON_UNUSED void *x) {
jpayne@68 25854 return __pyx_pw_5pysam_9libctabix_9TabixFile_7contigs_1__get__(o);
jpayne@68 25855 }
jpayne@68 25856
jpayne@68 25857 static PyObject *__pyx_getprop_5pysam_9libctabix_9TabixFile_filename_index(PyObject *o, CYTHON_UNUSED void *x) {
jpayne@68 25858 return __pyx_pw_5pysam_9libctabix_9TabixFile_14filename_index_1__get__(o);
jpayne@68 25859 }
jpayne@68 25860
jpayne@68 25861 static PyMethodDef __pyx_methods_5pysam_9libctabix_TabixFile[] = {
jpayne@68 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@68 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@68 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@68 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@68 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@68 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@68 25868 {0, 0, 0, 0}
jpayne@68 25869 };
jpayne@68 25870
jpayne@68 25871 static struct PyGetSetDef __pyx_getsets_5pysam_9libctabix_TabixFile[] = {
jpayne@68 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@68 25873 {(char *)"contigs", __pyx_getprop_5pysam_9libctabix_9TabixFile_contigs, 0, (char *)PyDoc_STR("list of chromosome names"), 0},
jpayne@68 25874 {(char *)"filename_index", __pyx_getprop_5pysam_9libctabix_9TabixFile_filename_index, 0, (char *)0, 0},
jpayne@68 25875 {0, 0, 0, 0, 0}
jpayne@68 25876 };
jpayne@68 25877 #if CYTHON_USE_TYPE_SPECS
jpayne@68 25878 static PyType_Slot __pyx_type_5pysam_9libctabix_TabixFile_slots[] = {
jpayne@68 25879 {Py_tp_dealloc, (void *)__pyx_tp_dealloc_5pysam_9libctabix_TabixFile},
jpayne@68 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@68 25881 {Py_tp_traverse, (void *)__pyx_tp_traverse_5pysam_9libctabix_TabixFile},
jpayne@68 25882 {Py_tp_clear, (void *)__pyx_tp_clear_5pysam_9libctabix_TabixFile},
jpayne@68 25883 {Py_tp_methods, (void *)__pyx_methods_5pysam_9libctabix_TabixFile},
jpayne@68 25884 {Py_tp_getset, (void *)__pyx_getsets_5pysam_9libctabix_TabixFile},
jpayne@68 25885 {Py_tp_new, (void *)__pyx_tp_new_5pysam_9libctabix_TabixFile},
jpayne@68 25886 {0, 0},
jpayne@68 25887 };
jpayne@68 25888 static PyType_Spec __pyx_type_5pysam_9libctabix_TabixFile_spec = {
jpayne@68 25889 "pysam.libctabix.TabixFile",
jpayne@68 25890 sizeof(struct __pyx_obj_5pysam_9libctabix_TabixFile),
jpayne@68 25891 0,
jpayne@68 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@68 25893 __pyx_type_5pysam_9libctabix_TabixFile_slots,
jpayne@68 25894 };
jpayne@68 25895 #else
jpayne@68 25896
jpayne@68 25897 static PyTypeObject __pyx_type_5pysam_9libctabix_TabixFile = {
jpayne@68 25898 PyVarObject_HEAD_INIT(0, 0)
jpayne@68 25899 "pysam.libctabix.""TabixFile", /*tp_name*/
jpayne@68 25900 sizeof(struct __pyx_obj_5pysam_9libctabix_TabixFile), /*tp_basicsize*/
jpayne@68 25901 0, /*tp_itemsize*/
jpayne@68 25902 __pyx_tp_dealloc_5pysam_9libctabix_TabixFile, /*tp_dealloc*/
jpayne@68 25903 #if PY_VERSION_HEX < 0x030800b4
jpayne@68 25904 0, /*tp_print*/
jpayne@68 25905 #endif
jpayne@68 25906 #if PY_VERSION_HEX >= 0x030800b4
jpayne@68 25907 0, /*tp_vectorcall_offset*/
jpayne@68 25908 #endif
jpayne@68 25909 0, /*tp_getattr*/
jpayne@68 25910 0, /*tp_setattr*/
jpayne@68 25911 #if PY_MAJOR_VERSION < 3
jpayne@68 25912 0, /*tp_compare*/
jpayne@68 25913 #endif
jpayne@68 25914 #if PY_MAJOR_VERSION >= 3
jpayne@68 25915 0, /*tp_as_async*/
jpayne@68 25916 #endif
jpayne@68 25917 0, /*tp_repr*/
jpayne@68 25918 0, /*tp_as_number*/
jpayne@68 25919 0, /*tp_as_sequence*/
jpayne@68 25920 0, /*tp_as_mapping*/
jpayne@68 25921 0, /*tp_hash*/
jpayne@68 25922 0, /*tp_call*/
jpayne@68 25923 0, /*tp_str*/
jpayne@68 25924 0, /*tp_getattro*/
jpayne@68 25925 0, /*tp_setattro*/
jpayne@68 25926 0, /*tp_as_buffer*/
jpayne@68 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@68 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@68 25929 __pyx_tp_traverse_5pysam_9libctabix_TabixFile, /*tp_traverse*/
jpayne@68 25930 __pyx_tp_clear_5pysam_9libctabix_TabixFile, /*tp_clear*/
jpayne@68 25931 0, /*tp_richcompare*/
jpayne@68 25932 0, /*tp_weaklistoffset*/
jpayne@68 25933 0, /*tp_iter*/
jpayne@68 25934 0, /*tp_iternext*/
jpayne@68 25935 __pyx_methods_5pysam_9libctabix_TabixFile, /*tp_methods*/
jpayne@68 25936 0, /*tp_members*/
jpayne@68 25937 __pyx_getsets_5pysam_9libctabix_TabixFile, /*tp_getset*/
jpayne@68 25938 0, /*tp_base*/
jpayne@68 25939 0, /*tp_dict*/
jpayne@68 25940 0, /*tp_descr_get*/
jpayne@68 25941 0, /*tp_descr_set*/
jpayne@68 25942 #if !CYTHON_USE_TYPE_SPECS
jpayne@68 25943 0, /*tp_dictoffset*/
jpayne@68 25944 #endif
jpayne@68 25945 0, /*tp_init*/
jpayne@68 25946 0, /*tp_alloc*/
jpayne@68 25947 __pyx_tp_new_5pysam_9libctabix_TabixFile, /*tp_new*/
jpayne@68 25948 0, /*tp_free*/
jpayne@68 25949 0, /*tp_is_gc*/
jpayne@68 25950 0, /*tp_bases*/
jpayne@68 25951 0, /*tp_mro*/
jpayne@68 25952 0, /*tp_cache*/
jpayne@68 25953 0, /*tp_subclasses*/
jpayne@68 25954 0, /*tp_weaklist*/
jpayne@68 25955 0, /*tp_del*/
jpayne@68 25956 0, /*tp_version_tag*/
jpayne@68 25957 #if PY_VERSION_HEX >= 0x030400a1
jpayne@68 25958 #if CYTHON_USE_TP_FINALIZE
jpayne@68 25959 0, /*tp_finalize*/
jpayne@68 25960 #else
jpayne@68 25961 NULL, /*tp_finalize*/
jpayne@68 25962 #endif
jpayne@68 25963 #endif
jpayne@68 25964 #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
jpayne@68 25965 0, /*tp_vectorcall*/
jpayne@68 25966 #endif
jpayne@68 25967 #if __PYX_NEED_TP_PRINT_SLOT == 1
jpayne@68 25968 0, /*tp_print*/
jpayne@68 25969 #endif
jpayne@68 25970 #if PY_VERSION_HEX >= 0x030C0000
jpayne@68 25971 0, /*tp_watched*/
jpayne@68 25972 #endif
jpayne@68 25973 #if PY_VERSION_HEX >= 0x030d00A4
jpayne@68 25974 0, /*tp_versions_used*/
jpayne@68 25975 #endif
jpayne@68 25976 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
jpayne@68 25977 0, /*tp_pypy_flags*/
jpayne@68 25978 #endif
jpayne@68 25979 };
jpayne@68 25980 #endif
jpayne@68 25981 static struct __pyx_vtabstruct_5pysam_9libctabix_Parser __pyx_vtable_5pysam_9libctabix_Parser;
jpayne@68 25982
jpayne@68 25983 static PyObject *__pyx_tp_new_5pysam_9libctabix_Parser(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
jpayne@68 25984 struct __pyx_obj_5pysam_9libctabix_Parser *p;
jpayne@68 25985 PyObject *o;
jpayne@68 25986 #if CYTHON_COMPILING_IN_LIMITED_API
jpayne@68 25987 allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc);
jpayne@68 25988 o = alloc_func(t, 0);
jpayne@68 25989 #else
jpayne@68 25990 if (likely(!__Pyx_PyType_HasFeature(t, Py_TPFLAGS_IS_ABSTRACT))) {
jpayne@68 25991 o = (*t->tp_alloc)(t, 0);
jpayne@68 25992 } else {
jpayne@68 25993 o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
jpayne@68 25994 }
jpayne@68 25995 if (unlikely(!o)) return 0;
jpayne@68 25996 #endif
jpayne@68 25997 p = ((struct __pyx_obj_5pysam_9libctabix_Parser *)o);
jpayne@68 25998 p->__pyx_vtab = __pyx_vtabptr_5pysam_9libctabix_Parser;
jpayne@68 25999 p->encoding = Py_None; Py_INCREF(Py_None);
jpayne@68 26000 return o;
jpayne@68 26001 }
jpayne@68 26002
jpayne@68 26003 static void __pyx_tp_dealloc_5pysam_9libctabix_Parser(PyObject *o) {
jpayne@68 26004 struct __pyx_obj_5pysam_9libctabix_Parser *p = (struct __pyx_obj_5pysam_9libctabix_Parser *)o;
jpayne@68 26005 #if CYTHON_USE_TP_FINALIZE
jpayne@68 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@68 26007 if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_5pysam_9libctabix_Parser) {
jpayne@68 26008 if (PyObject_CallFinalizerFromDealloc(o)) return;
jpayne@68 26009 }
jpayne@68 26010 }
jpayne@68 26011 #endif
jpayne@68 26012 PyObject_GC_UnTrack(o);
jpayne@68 26013 Py_CLEAR(p->encoding);
jpayne@68 26014 #if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY
jpayne@68 26015 (*Py_TYPE(o)->tp_free)(o);
jpayne@68 26016 #else
jpayne@68 26017 {
jpayne@68 26018 freefunc tp_free = (freefunc)PyType_GetSlot(Py_TYPE(o), Py_tp_free);
jpayne@68 26019 if (tp_free) tp_free(o);
jpayne@68 26020 }
jpayne@68 26021 #endif
jpayne@68 26022 }
jpayne@68 26023
jpayne@68 26024 static int __pyx_tp_traverse_5pysam_9libctabix_Parser(PyObject *o, visitproc v, void *a) {
jpayne@68 26025 int e;
jpayne@68 26026 struct __pyx_obj_5pysam_9libctabix_Parser *p = (struct __pyx_obj_5pysam_9libctabix_Parser *)o;
jpayne@68 26027 if (p->encoding) {
jpayne@68 26028 e = (*v)(p->encoding, a); if (e) return e;
jpayne@68 26029 }
jpayne@68 26030 return 0;
jpayne@68 26031 }
jpayne@68 26032
jpayne@68 26033 static int __pyx_tp_clear_5pysam_9libctabix_Parser(PyObject *o) {
jpayne@68 26034 PyObject* tmp;
jpayne@68 26035 struct __pyx_obj_5pysam_9libctabix_Parser *p = (struct __pyx_obj_5pysam_9libctabix_Parser *)o;
jpayne@68 26036 tmp = ((PyObject*)p->encoding);
jpayne@68 26037 p->encoding = Py_None; Py_INCREF(Py_None);
jpayne@68 26038 Py_XDECREF(tmp);
jpayne@68 26039 return 0;
jpayne@68 26040 }
jpayne@68 26041
jpayne@68 26042 static PyMethodDef __pyx_methods_5pysam_9libctabix_Parser[] = {
jpayne@68 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@68 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@68 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@68 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@68 26047 {0, 0, 0, 0}
jpayne@68 26048 };
jpayne@68 26049 #if CYTHON_USE_TYPE_SPECS
jpayne@68 26050 static PyType_Slot __pyx_type_5pysam_9libctabix_Parser_slots[] = {
jpayne@68 26051 {Py_tp_dealloc, (void *)__pyx_tp_dealloc_5pysam_9libctabix_Parser},
jpayne@68 26052 {Py_tp_call, (void *)__pyx_pw_5pysam_9libctabix_6Parser_7__call__},
jpayne@68 26053 {Py_tp_doc, (void *)PyDoc_STR("Parser(encoding=u'ascii')")},
jpayne@68 26054 {Py_tp_traverse, (void *)__pyx_tp_traverse_5pysam_9libctabix_Parser},
jpayne@68 26055 {Py_tp_clear, (void *)__pyx_tp_clear_5pysam_9libctabix_Parser},
jpayne@68 26056 {Py_tp_methods, (void *)__pyx_methods_5pysam_9libctabix_Parser},
jpayne@68 26057 {Py_tp_init, (void *)__pyx_pw_5pysam_9libctabix_6Parser_1__init__},
jpayne@68 26058 {Py_tp_new, (void *)__pyx_tp_new_5pysam_9libctabix_Parser},
jpayne@68 26059 {0, 0},
jpayne@68 26060 };
jpayne@68 26061 static PyType_Spec __pyx_type_5pysam_9libctabix_Parser_spec = {
jpayne@68 26062 "pysam.libctabix.Parser",
jpayne@68 26063 sizeof(struct __pyx_obj_5pysam_9libctabix_Parser),
jpayne@68 26064 0,
jpayne@68 26065 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
jpayne@68 26066 __pyx_type_5pysam_9libctabix_Parser_slots,
jpayne@68 26067 };
jpayne@68 26068 #else
jpayne@68 26069
jpayne@68 26070 static PyTypeObject __pyx_type_5pysam_9libctabix_Parser = {
jpayne@68 26071 PyVarObject_HEAD_INIT(0, 0)
jpayne@68 26072 "pysam.libctabix.""Parser", /*tp_name*/
jpayne@68 26073 sizeof(struct __pyx_obj_5pysam_9libctabix_Parser), /*tp_basicsize*/
jpayne@68 26074 0, /*tp_itemsize*/
jpayne@68 26075 __pyx_tp_dealloc_5pysam_9libctabix_Parser, /*tp_dealloc*/
jpayne@68 26076 #if PY_VERSION_HEX < 0x030800b4
jpayne@68 26077 0, /*tp_print*/
jpayne@68 26078 #endif
jpayne@68 26079 #if PY_VERSION_HEX >= 0x030800b4
jpayne@68 26080 0, /*tp_vectorcall_offset*/
jpayne@68 26081 #endif
jpayne@68 26082 0, /*tp_getattr*/
jpayne@68 26083 0, /*tp_setattr*/
jpayne@68 26084 #if PY_MAJOR_VERSION < 3
jpayne@68 26085 0, /*tp_compare*/
jpayne@68 26086 #endif
jpayne@68 26087 #if PY_MAJOR_VERSION >= 3
jpayne@68 26088 0, /*tp_as_async*/
jpayne@68 26089 #endif
jpayne@68 26090 0, /*tp_repr*/
jpayne@68 26091 0, /*tp_as_number*/
jpayne@68 26092 0, /*tp_as_sequence*/
jpayne@68 26093 0, /*tp_as_mapping*/
jpayne@68 26094 0, /*tp_hash*/
jpayne@68 26095 __pyx_pw_5pysam_9libctabix_6Parser_7__call__, /*tp_call*/
jpayne@68 26096 0, /*tp_str*/
jpayne@68 26097 0, /*tp_getattro*/
jpayne@68 26098 0, /*tp_setattro*/
jpayne@68 26099 0, /*tp_as_buffer*/
jpayne@68 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@68 26101 PyDoc_STR("Parser(encoding=u'ascii')"), /*tp_doc*/
jpayne@68 26102 __pyx_tp_traverse_5pysam_9libctabix_Parser, /*tp_traverse*/
jpayne@68 26103 __pyx_tp_clear_5pysam_9libctabix_Parser, /*tp_clear*/
jpayne@68 26104 0, /*tp_richcompare*/
jpayne@68 26105 0, /*tp_weaklistoffset*/
jpayne@68 26106 0, /*tp_iter*/
jpayne@68 26107 0, /*tp_iternext*/
jpayne@68 26108 __pyx_methods_5pysam_9libctabix_Parser, /*tp_methods*/
jpayne@68 26109 0, /*tp_members*/
jpayne@68 26110 0, /*tp_getset*/
jpayne@68 26111 0, /*tp_base*/
jpayne@68 26112 0, /*tp_dict*/
jpayne@68 26113 0, /*tp_descr_get*/
jpayne@68 26114 0, /*tp_descr_set*/
jpayne@68 26115 #if !CYTHON_USE_TYPE_SPECS
jpayne@68 26116 0, /*tp_dictoffset*/
jpayne@68 26117 #endif
jpayne@68 26118 __pyx_pw_5pysam_9libctabix_6Parser_1__init__, /*tp_init*/
jpayne@68 26119 0, /*tp_alloc*/
jpayne@68 26120 __pyx_tp_new_5pysam_9libctabix_Parser, /*tp_new*/
jpayne@68 26121 0, /*tp_free*/
jpayne@68 26122 0, /*tp_is_gc*/
jpayne@68 26123 0, /*tp_bases*/
jpayne@68 26124 0, /*tp_mro*/
jpayne@68 26125 0, /*tp_cache*/
jpayne@68 26126 0, /*tp_subclasses*/
jpayne@68 26127 0, /*tp_weaklist*/
jpayne@68 26128 0, /*tp_del*/
jpayne@68 26129 0, /*tp_version_tag*/
jpayne@68 26130 #if PY_VERSION_HEX >= 0x030400a1
jpayne@68 26131 #if CYTHON_USE_TP_FINALIZE
jpayne@68 26132 0, /*tp_finalize*/
jpayne@68 26133 #else
jpayne@68 26134 NULL, /*tp_finalize*/
jpayne@68 26135 #endif
jpayne@68 26136 #endif
jpayne@68 26137 #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
jpayne@68 26138 0, /*tp_vectorcall*/
jpayne@68 26139 #endif
jpayne@68 26140 #if __PYX_NEED_TP_PRINT_SLOT == 1
jpayne@68 26141 0, /*tp_print*/
jpayne@68 26142 #endif
jpayne@68 26143 #if PY_VERSION_HEX >= 0x030C0000
jpayne@68 26144 0, /*tp_watched*/
jpayne@68 26145 #endif
jpayne@68 26146 #if PY_VERSION_HEX >= 0x030d00A4
jpayne@68 26147 0, /*tp_versions_used*/
jpayne@68 26148 #endif
jpayne@68 26149 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
jpayne@68 26150 0, /*tp_pypy_flags*/
jpayne@68 26151 #endif
jpayne@68 26152 };
jpayne@68 26153 #endif
jpayne@68 26154 static struct __pyx_vtabstruct_5pysam_9libctabix_asTuple __pyx_vtable_5pysam_9libctabix_asTuple;
jpayne@68 26155
jpayne@68 26156 static PyObject *__pyx_tp_new_5pysam_9libctabix_asTuple(PyTypeObject *t, PyObject *a, PyObject *k) {
jpayne@68 26157 struct __pyx_obj_5pysam_9libctabix_asTuple *p;
jpayne@68 26158 PyObject *o = __pyx_tp_new_5pysam_9libctabix_Parser(t, a, k);
jpayne@68 26159 if (unlikely(!o)) return 0;
jpayne@68 26160 p = ((struct __pyx_obj_5pysam_9libctabix_asTuple *)o);
jpayne@68 26161 p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_5pysam_9libctabix_Parser*)__pyx_vtabptr_5pysam_9libctabix_asTuple;
jpayne@68 26162 return o;
jpayne@68 26163 }
jpayne@68 26164
jpayne@68 26165 static PyMethodDef __pyx_methods_5pysam_9libctabix_asTuple[] = {
jpayne@68 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@68 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@68 26168 {0, 0, 0, 0}
jpayne@68 26169 };
jpayne@68 26170 #if CYTHON_USE_TYPE_SPECS
jpayne@68 26171 static PyType_Slot __pyx_type_5pysam_9libctabix_asTuple_slots[] = {
jpayne@68 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@68 26173 {Py_tp_traverse, (void *)__pyx_tp_traverse_5pysam_9libctabix_Parser},
jpayne@68 26174 {Py_tp_clear, (void *)__pyx_tp_clear_5pysam_9libctabix_Parser},
jpayne@68 26175 {Py_tp_methods, (void *)__pyx_methods_5pysam_9libctabix_asTuple},
jpayne@68 26176 {Py_tp_new, (void *)__pyx_tp_new_5pysam_9libctabix_asTuple},
jpayne@68 26177 {0, 0},
jpayne@68 26178 };
jpayne@68 26179 static PyType_Spec __pyx_type_5pysam_9libctabix_asTuple_spec = {
jpayne@68 26180 "pysam.libctabix.asTuple",
jpayne@68 26181 sizeof(struct __pyx_obj_5pysam_9libctabix_asTuple),
jpayne@68 26182 0,
jpayne@68 26183 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
jpayne@68 26184 __pyx_type_5pysam_9libctabix_asTuple_slots,
jpayne@68 26185 };
jpayne@68 26186 #else
jpayne@68 26187
jpayne@68 26188 static PyTypeObject __pyx_type_5pysam_9libctabix_asTuple = {
jpayne@68 26189 PyVarObject_HEAD_INIT(0, 0)
jpayne@68 26190 "pysam.libctabix.""asTuple", /*tp_name*/
jpayne@68 26191 sizeof(struct __pyx_obj_5pysam_9libctabix_asTuple), /*tp_basicsize*/
jpayne@68 26192 0, /*tp_itemsize*/
jpayne@68 26193 __pyx_tp_dealloc_5pysam_9libctabix_Parser, /*tp_dealloc*/
jpayne@68 26194 #if PY_VERSION_HEX < 0x030800b4
jpayne@68 26195 0, /*tp_print*/
jpayne@68 26196 #endif
jpayne@68 26197 #if PY_VERSION_HEX >= 0x030800b4
jpayne@68 26198 0, /*tp_vectorcall_offset*/
jpayne@68 26199 #endif
jpayne@68 26200 0, /*tp_getattr*/
jpayne@68 26201 0, /*tp_setattr*/
jpayne@68 26202 #if PY_MAJOR_VERSION < 3
jpayne@68 26203 0, /*tp_compare*/
jpayne@68 26204 #endif
jpayne@68 26205 #if PY_MAJOR_VERSION >= 3
jpayne@68 26206 0, /*tp_as_async*/
jpayne@68 26207 #endif
jpayne@68 26208 0, /*tp_repr*/
jpayne@68 26209 0, /*tp_as_number*/
jpayne@68 26210 0, /*tp_as_sequence*/
jpayne@68 26211 0, /*tp_as_mapping*/
jpayne@68 26212 0, /*tp_hash*/
jpayne@68 26213 #if CYTHON_COMPILING_IN_PYPY || 0
jpayne@68 26214 __pyx_pw_5pysam_9libctabix_6Parser_7__call__, /*tp_call*/
jpayne@68 26215 #else
jpayne@68 26216 0, /*tp_call*/
jpayne@68 26217 #endif
jpayne@68 26218 0, /*tp_str*/
jpayne@68 26219 0, /*tp_getattro*/
jpayne@68 26220 0, /*tp_setattro*/
jpayne@68 26221 0, /*tp_as_buffer*/
jpayne@68 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@68 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@68 26224 __pyx_tp_traverse_5pysam_9libctabix_Parser, /*tp_traverse*/
jpayne@68 26225 __pyx_tp_clear_5pysam_9libctabix_Parser, /*tp_clear*/
jpayne@68 26226 0, /*tp_richcompare*/
jpayne@68 26227 0, /*tp_weaklistoffset*/
jpayne@68 26228 0, /*tp_iter*/
jpayne@68 26229 0, /*tp_iternext*/
jpayne@68 26230 __pyx_methods_5pysam_9libctabix_asTuple, /*tp_methods*/
jpayne@68 26231 0, /*tp_members*/
jpayne@68 26232 0, /*tp_getset*/
jpayne@68 26233 0, /*tp_base*/
jpayne@68 26234 0, /*tp_dict*/
jpayne@68 26235 0, /*tp_descr_get*/
jpayne@68 26236 0, /*tp_descr_set*/
jpayne@68 26237 #if !CYTHON_USE_TYPE_SPECS
jpayne@68 26238 0, /*tp_dictoffset*/
jpayne@68 26239 #endif
jpayne@68 26240 #if CYTHON_COMPILING_IN_PYPY || 0
jpayne@68 26241 __pyx_pw_5pysam_9libctabix_6Parser_1__init__, /*tp_init*/
jpayne@68 26242 #else
jpayne@68 26243 0, /*tp_init*/
jpayne@68 26244 #endif
jpayne@68 26245 0, /*tp_alloc*/
jpayne@68 26246 __pyx_tp_new_5pysam_9libctabix_asTuple, /*tp_new*/
jpayne@68 26247 0, /*tp_free*/
jpayne@68 26248 0, /*tp_is_gc*/
jpayne@68 26249 0, /*tp_bases*/
jpayne@68 26250 0, /*tp_mro*/
jpayne@68 26251 0, /*tp_cache*/
jpayne@68 26252 0, /*tp_subclasses*/
jpayne@68 26253 0, /*tp_weaklist*/
jpayne@68 26254 0, /*tp_del*/
jpayne@68 26255 0, /*tp_version_tag*/
jpayne@68 26256 #if PY_VERSION_HEX >= 0x030400a1
jpayne@68 26257 #if CYTHON_USE_TP_FINALIZE
jpayne@68 26258 0, /*tp_finalize*/
jpayne@68 26259 #else
jpayne@68 26260 NULL, /*tp_finalize*/
jpayne@68 26261 #endif
jpayne@68 26262 #endif
jpayne@68 26263 #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
jpayne@68 26264 0, /*tp_vectorcall*/
jpayne@68 26265 #endif
jpayne@68 26266 #if __PYX_NEED_TP_PRINT_SLOT == 1
jpayne@68 26267 0, /*tp_print*/
jpayne@68 26268 #endif
jpayne@68 26269 #if PY_VERSION_HEX >= 0x030C0000
jpayne@68 26270 0, /*tp_watched*/
jpayne@68 26271 #endif
jpayne@68 26272 #if PY_VERSION_HEX >= 0x030d00A4
jpayne@68 26273 0, /*tp_versions_used*/
jpayne@68 26274 #endif
jpayne@68 26275 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
jpayne@68 26276 0, /*tp_pypy_flags*/
jpayne@68 26277 #endif
jpayne@68 26278 };
jpayne@68 26279 #endif
jpayne@68 26280 static struct __pyx_vtabstruct_5pysam_9libctabix_asGTF __pyx_vtable_5pysam_9libctabix_asGTF;
jpayne@68 26281
jpayne@68 26282 static PyObject *__pyx_tp_new_5pysam_9libctabix_asGTF(PyTypeObject *t, PyObject *a, PyObject *k) {
jpayne@68 26283 struct __pyx_obj_5pysam_9libctabix_asGTF *p;
jpayne@68 26284 PyObject *o = __pyx_tp_new_5pysam_9libctabix_Parser(t, a, k);
jpayne@68 26285 if (unlikely(!o)) return 0;
jpayne@68 26286 p = ((struct __pyx_obj_5pysam_9libctabix_asGTF *)o);
jpayne@68 26287 p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_5pysam_9libctabix_Parser*)__pyx_vtabptr_5pysam_9libctabix_asGTF;
jpayne@68 26288 return o;
jpayne@68 26289 }
jpayne@68 26290
jpayne@68 26291 static PyMethodDef __pyx_methods_5pysam_9libctabix_asGTF[] = {
jpayne@68 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@68 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@68 26294 {0, 0, 0, 0}
jpayne@68 26295 };
jpayne@68 26296 #if CYTHON_USE_TYPE_SPECS
jpayne@68 26297 static PyType_Slot __pyx_type_5pysam_9libctabix_asGTF_slots[] = {
jpayne@68 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@68 26299 {Py_tp_traverse, (void *)__pyx_tp_traverse_5pysam_9libctabix_Parser},
jpayne@68 26300 {Py_tp_clear, (void *)__pyx_tp_clear_5pysam_9libctabix_Parser},
jpayne@68 26301 {Py_tp_methods, (void *)__pyx_methods_5pysam_9libctabix_asGTF},
jpayne@68 26302 {Py_tp_new, (void *)__pyx_tp_new_5pysam_9libctabix_asGTF},
jpayne@68 26303 {0, 0},
jpayne@68 26304 };
jpayne@68 26305 static PyType_Spec __pyx_type_5pysam_9libctabix_asGTF_spec = {
jpayne@68 26306 "pysam.libctabix.asGTF",
jpayne@68 26307 sizeof(struct __pyx_obj_5pysam_9libctabix_asGTF),
jpayne@68 26308 0,
jpayne@68 26309 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
jpayne@68 26310 __pyx_type_5pysam_9libctabix_asGTF_slots,
jpayne@68 26311 };
jpayne@68 26312 #else
jpayne@68 26313
jpayne@68 26314 static PyTypeObject __pyx_type_5pysam_9libctabix_asGTF = {
jpayne@68 26315 PyVarObject_HEAD_INIT(0, 0)
jpayne@68 26316 "pysam.libctabix.""asGTF", /*tp_name*/
jpayne@68 26317 sizeof(struct __pyx_obj_5pysam_9libctabix_asGTF), /*tp_basicsize*/
jpayne@68 26318 0, /*tp_itemsize*/
jpayne@68 26319 __pyx_tp_dealloc_5pysam_9libctabix_Parser, /*tp_dealloc*/
jpayne@68 26320 #if PY_VERSION_HEX < 0x030800b4
jpayne@68 26321 0, /*tp_print*/
jpayne@68 26322 #endif
jpayne@68 26323 #if PY_VERSION_HEX >= 0x030800b4
jpayne@68 26324 0, /*tp_vectorcall_offset*/
jpayne@68 26325 #endif
jpayne@68 26326 0, /*tp_getattr*/
jpayne@68 26327 0, /*tp_setattr*/
jpayne@68 26328 #if PY_MAJOR_VERSION < 3
jpayne@68 26329 0, /*tp_compare*/
jpayne@68 26330 #endif
jpayne@68 26331 #if PY_MAJOR_VERSION >= 3
jpayne@68 26332 0, /*tp_as_async*/
jpayne@68 26333 #endif
jpayne@68 26334 0, /*tp_repr*/
jpayne@68 26335 0, /*tp_as_number*/
jpayne@68 26336 0, /*tp_as_sequence*/
jpayne@68 26337 0, /*tp_as_mapping*/
jpayne@68 26338 0, /*tp_hash*/
jpayne@68 26339 #if CYTHON_COMPILING_IN_PYPY || 0
jpayne@68 26340 __pyx_pw_5pysam_9libctabix_6Parser_7__call__, /*tp_call*/
jpayne@68 26341 #else
jpayne@68 26342 0, /*tp_call*/
jpayne@68 26343 #endif
jpayne@68 26344 0, /*tp_str*/
jpayne@68 26345 0, /*tp_getattro*/
jpayne@68 26346 0, /*tp_setattro*/
jpayne@68 26347 0, /*tp_as_buffer*/
jpayne@68 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@68 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@68 26350 __pyx_tp_traverse_5pysam_9libctabix_Parser, /*tp_traverse*/
jpayne@68 26351 __pyx_tp_clear_5pysam_9libctabix_Parser, /*tp_clear*/
jpayne@68 26352 0, /*tp_richcompare*/
jpayne@68 26353 0, /*tp_weaklistoffset*/
jpayne@68 26354 0, /*tp_iter*/
jpayne@68 26355 0, /*tp_iternext*/
jpayne@68 26356 __pyx_methods_5pysam_9libctabix_asGTF, /*tp_methods*/
jpayne@68 26357 0, /*tp_members*/
jpayne@68 26358 0, /*tp_getset*/
jpayne@68 26359 0, /*tp_base*/
jpayne@68 26360 0, /*tp_dict*/
jpayne@68 26361 0, /*tp_descr_get*/
jpayne@68 26362 0, /*tp_descr_set*/
jpayne@68 26363 #if !CYTHON_USE_TYPE_SPECS
jpayne@68 26364 0, /*tp_dictoffset*/
jpayne@68 26365 #endif
jpayne@68 26366 #if CYTHON_COMPILING_IN_PYPY || 0
jpayne@68 26367 __pyx_pw_5pysam_9libctabix_6Parser_1__init__, /*tp_init*/
jpayne@68 26368 #else
jpayne@68 26369 0, /*tp_init*/
jpayne@68 26370 #endif
jpayne@68 26371 0, /*tp_alloc*/
jpayne@68 26372 __pyx_tp_new_5pysam_9libctabix_asGTF, /*tp_new*/
jpayne@68 26373 0, /*tp_free*/
jpayne@68 26374 0, /*tp_is_gc*/
jpayne@68 26375 0, /*tp_bases*/
jpayne@68 26376 0, /*tp_mro*/
jpayne@68 26377 0, /*tp_cache*/
jpayne@68 26378 0, /*tp_subclasses*/
jpayne@68 26379 0, /*tp_weaklist*/
jpayne@68 26380 0, /*tp_del*/
jpayne@68 26381 0, /*tp_version_tag*/
jpayne@68 26382 #if PY_VERSION_HEX >= 0x030400a1
jpayne@68 26383 #if CYTHON_USE_TP_FINALIZE
jpayne@68 26384 0, /*tp_finalize*/
jpayne@68 26385 #else
jpayne@68 26386 NULL, /*tp_finalize*/
jpayne@68 26387 #endif
jpayne@68 26388 #endif
jpayne@68 26389 #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
jpayne@68 26390 0, /*tp_vectorcall*/
jpayne@68 26391 #endif
jpayne@68 26392 #if __PYX_NEED_TP_PRINT_SLOT == 1
jpayne@68 26393 0, /*tp_print*/
jpayne@68 26394 #endif
jpayne@68 26395 #if PY_VERSION_HEX >= 0x030C0000
jpayne@68 26396 0, /*tp_watched*/
jpayne@68 26397 #endif
jpayne@68 26398 #if PY_VERSION_HEX >= 0x030d00A4
jpayne@68 26399 0, /*tp_versions_used*/
jpayne@68 26400 #endif
jpayne@68 26401 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
jpayne@68 26402 0, /*tp_pypy_flags*/
jpayne@68 26403 #endif
jpayne@68 26404 };
jpayne@68 26405 #endif
jpayne@68 26406 static struct __pyx_vtabstruct_5pysam_9libctabix_asGFF3 __pyx_vtable_5pysam_9libctabix_asGFF3;
jpayne@68 26407
jpayne@68 26408 static PyObject *__pyx_tp_new_5pysam_9libctabix_asGFF3(PyTypeObject *t, PyObject *a, PyObject *k) {
jpayne@68 26409 struct __pyx_obj_5pysam_9libctabix_asGFF3 *p;
jpayne@68 26410 PyObject *o = __pyx_tp_new_5pysam_9libctabix_Parser(t, a, k);
jpayne@68 26411 if (unlikely(!o)) return 0;
jpayne@68 26412 p = ((struct __pyx_obj_5pysam_9libctabix_asGFF3 *)o);
jpayne@68 26413 p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_5pysam_9libctabix_Parser*)__pyx_vtabptr_5pysam_9libctabix_asGFF3;
jpayne@68 26414 return o;
jpayne@68 26415 }
jpayne@68 26416
jpayne@68 26417 static PyMethodDef __pyx_methods_5pysam_9libctabix_asGFF3[] = {
jpayne@68 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@68 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@68 26420 {0, 0, 0, 0}
jpayne@68 26421 };
jpayne@68 26422 #if CYTHON_USE_TYPE_SPECS
jpayne@68 26423 static PyType_Slot __pyx_type_5pysam_9libctabix_asGFF3_slots[] = {
jpayne@68 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@68 26425 {Py_tp_traverse, (void *)__pyx_tp_traverse_5pysam_9libctabix_Parser},
jpayne@68 26426 {Py_tp_clear, (void *)__pyx_tp_clear_5pysam_9libctabix_Parser},
jpayne@68 26427 {Py_tp_methods, (void *)__pyx_methods_5pysam_9libctabix_asGFF3},
jpayne@68 26428 {Py_tp_new, (void *)__pyx_tp_new_5pysam_9libctabix_asGFF3},
jpayne@68 26429 {0, 0},
jpayne@68 26430 };
jpayne@68 26431 static PyType_Spec __pyx_type_5pysam_9libctabix_asGFF3_spec = {
jpayne@68 26432 "pysam.libctabix.asGFF3",
jpayne@68 26433 sizeof(struct __pyx_obj_5pysam_9libctabix_asGFF3),
jpayne@68 26434 0,
jpayne@68 26435 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
jpayne@68 26436 __pyx_type_5pysam_9libctabix_asGFF3_slots,
jpayne@68 26437 };
jpayne@68 26438 #else
jpayne@68 26439
jpayne@68 26440 static PyTypeObject __pyx_type_5pysam_9libctabix_asGFF3 = {
jpayne@68 26441 PyVarObject_HEAD_INIT(0, 0)
jpayne@68 26442 "pysam.libctabix.""asGFF3", /*tp_name*/
jpayne@68 26443 sizeof(struct __pyx_obj_5pysam_9libctabix_asGFF3), /*tp_basicsize*/
jpayne@68 26444 0, /*tp_itemsize*/
jpayne@68 26445 __pyx_tp_dealloc_5pysam_9libctabix_Parser, /*tp_dealloc*/
jpayne@68 26446 #if PY_VERSION_HEX < 0x030800b4
jpayne@68 26447 0, /*tp_print*/
jpayne@68 26448 #endif
jpayne@68 26449 #if PY_VERSION_HEX >= 0x030800b4
jpayne@68 26450 0, /*tp_vectorcall_offset*/
jpayne@68 26451 #endif
jpayne@68 26452 0, /*tp_getattr*/
jpayne@68 26453 0, /*tp_setattr*/
jpayne@68 26454 #if PY_MAJOR_VERSION < 3
jpayne@68 26455 0, /*tp_compare*/
jpayne@68 26456 #endif
jpayne@68 26457 #if PY_MAJOR_VERSION >= 3
jpayne@68 26458 0, /*tp_as_async*/
jpayne@68 26459 #endif
jpayne@68 26460 0, /*tp_repr*/
jpayne@68 26461 0, /*tp_as_number*/
jpayne@68 26462 0, /*tp_as_sequence*/
jpayne@68 26463 0, /*tp_as_mapping*/
jpayne@68 26464 0, /*tp_hash*/
jpayne@68 26465 #if CYTHON_COMPILING_IN_PYPY || 0
jpayne@68 26466 __pyx_pw_5pysam_9libctabix_6Parser_7__call__, /*tp_call*/
jpayne@68 26467 #else
jpayne@68 26468 0, /*tp_call*/
jpayne@68 26469 #endif
jpayne@68 26470 0, /*tp_str*/
jpayne@68 26471 0, /*tp_getattro*/
jpayne@68 26472 0, /*tp_setattro*/
jpayne@68 26473 0, /*tp_as_buffer*/
jpayne@68 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@68 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@68 26476 __pyx_tp_traverse_5pysam_9libctabix_Parser, /*tp_traverse*/
jpayne@68 26477 __pyx_tp_clear_5pysam_9libctabix_Parser, /*tp_clear*/
jpayne@68 26478 0, /*tp_richcompare*/
jpayne@68 26479 0, /*tp_weaklistoffset*/
jpayne@68 26480 0, /*tp_iter*/
jpayne@68 26481 0, /*tp_iternext*/
jpayne@68 26482 __pyx_methods_5pysam_9libctabix_asGFF3, /*tp_methods*/
jpayne@68 26483 0, /*tp_members*/
jpayne@68 26484 0, /*tp_getset*/
jpayne@68 26485 0, /*tp_base*/
jpayne@68 26486 0, /*tp_dict*/
jpayne@68 26487 0, /*tp_descr_get*/
jpayne@68 26488 0, /*tp_descr_set*/
jpayne@68 26489 #if !CYTHON_USE_TYPE_SPECS
jpayne@68 26490 0, /*tp_dictoffset*/
jpayne@68 26491 #endif
jpayne@68 26492 #if CYTHON_COMPILING_IN_PYPY || 0
jpayne@68 26493 __pyx_pw_5pysam_9libctabix_6Parser_1__init__, /*tp_init*/
jpayne@68 26494 #else
jpayne@68 26495 0, /*tp_init*/
jpayne@68 26496 #endif
jpayne@68 26497 0, /*tp_alloc*/
jpayne@68 26498 __pyx_tp_new_5pysam_9libctabix_asGFF3, /*tp_new*/
jpayne@68 26499 0, /*tp_free*/
jpayne@68 26500 0, /*tp_is_gc*/
jpayne@68 26501 0, /*tp_bases*/
jpayne@68 26502 0, /*tp_mro*/
jpayne@68 26503 0, /*tp_cache*/
jpayne@68 26504 0, /*tp_subclasses*/
jpayne@68 26505 0, /*tp_weaklist*/
jpayne@68 26506 0, /*tp_del*/
jpayne@68 26507 0, /*tp_version_tag*/
jpayne@68 26508 #if PY_VERSION_HEX >= 0x030400a1
jpayne@68 26509 #if CYTHON_USE_TP_FINALIZE
jpayne@68 26510 0, /*tp_finalize*/
jpayne@68 26511 #else
jpayne@68 26512 NULL, /*tp_finalize*/
jpayne@68 26513 #endif
jpayne@68 26514 #endif
jpayne@68 26515 #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
jpayne@68 26516 0, /*tp_vectorcall*/
jpayne@68 26517 #endif
jpayne@68 26518 #if __PYX_NEED_TP_PRINT_SLOT == 1
jpayne@68 26519 0, /*tp_print*/
jpayne@68 26520 #endif
jpayne@68 26521 #if PY_VERSION_HEX >= 0x030C0000
jpayne@68 26522 0, /*tp_watched*/
jpayne@68 26523 #endif
jpayne@68 26524 #if PY_VERSION_HEX >= 0x030d00A4
jpayne@68 26525 0, /*tp_versions_used*/
jpayne@68 26526 #endif
jpayne@68 26527 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
jpayne@68 26528 0, /*tp_pypy_flags*/
jpayne@68 26529 #endif
jpayne@68 26530 };
jpayne@68 26531 #endif
jpayne@68 26532 static struct __pyx_vtabstruct_5pysam_9libctabix_asBed __pyx_vtable_5pysam_9libctabix_asBed;
jpayne@68 26533
jpayne@68 26534 static PyObject *__pyx_tp_new_5pysam_9libctabix_asBed(PyTypeObject *t, PyObject *a, PyObject *k) {
jpayne@68 26535 struct __pyx_obj_5pysam_9libctabix_asBed *p;
jpayne@68 26536 PyObject *o = __pyx_tp_new_5pysam_9libctabix_Parser(t, a, k);
jpayne@68 26537 if (unlikely(!o)) return 0;
jpayne@68 26538 p = ((struct __pyx_obj_5pysam_9libctabix_asBed *)o);
jpayne@68 26539 p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_5pysam_9libctabix_Parser*)__pyx_vtabptr_5pysam_9libctabix_asBed;
jpayne@68 26540 return o;
jpayne@68 26541 }
jpayne@68 26542
jpayne@68 26543 static PyMethodDef __pyx_methods_5pysam_9libctabix_asBed[] = {
jpayne@68 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@68 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@68 26546 {0, 0, 0, 0}
jpayne@68 26547 };
jpayne@68 26548 #if CYTHON_USE_TYPE_SPECS
jpayne@68 26549 static PyType_Slot __pyx_type_5pysam_9libctabix_asBed_slots[] = {
jpayne@68 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@68 26551 {Py_tp_traverse, (void *)__pyx_tp_traverse_5pysam_9libctabix_Parser},
jpayne@68 26552 {Py_tp_clear, (void *)__pyx_tp_clear_5pysam_9libctabix_Parser},
jpayne@68 26553 {Py_tp_methods, (void *)__pyx_methods_5pysam_9libctabix_asBed},
jpayne@68 26554 {Py_tp_new, (void *)__pyx_tp_new_5pysam_9libctabix_asBed},
jpayne@68 26555 {0, 0},
jpayne@68 26556 };
jpayne@68 26557 static PyType_Spec __pyx_type_5pysam_9libctabix_asBed_spec = {
jpayne@68 26558 "pysam.libctabix.asBed",
jpayne@68 26559 sizeof(struct __pyx_obj_5pysam_9libctabix_asBed),
jpayne@68 26560 0,
jpayne@68 26561 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
jpayne@68 26562 __pyx_type_5pysam_9libctabix_asBed_slots,
jpayne@68 26563 };
jpayne@68 26564 #else
jpayne@68 26565
jpayne@68 26566 static PyTypeObject __pyx_type_5pysam_9libctabix_asBed = {
jpayne@68 26567 PyVarObject_HEAD_INIT(0, 0)
jpayne@68 26568 "pysam.libctabix.""asBed", /*tp_name*/
jpayne@68 26569 sizeof(struct __pyx_obj_5pysam_9libctabix_asBed), /*tp_basicsize*/
jpayne@68 26570 0, /*tp_itemsize*/
jpayne@68 26571 __pyx_tp_dealloc_5pysam_9libctabix_Parser, /*tp_dealloc*/
jpayne@68 26572 #if PY_VERSION_HEX < 0x030800b4
jpayne@68 26573 0, /*tp_print*/
jpayne@68 26574 #endif
jpayne@68 26575 #if PY_VERSION_HEX >= 0x030800b4
jpayne@68 26576 0, /*tp_vectorcall_offset*/
jpayne@68 26577 #endif
jpayne@68 26578 0, /*tp_getattr*/
jpayne@68 26579 0, /*tp_setattr*/
jpayne@68 26580 #if PY_MAJOR_VERSION < 3
jpayne@68 26581 0, /*tp_compare*/
jpayne@68 26582 #endif
jpayne@68 26583 #if PY_MAJOR_VERSION >= 3
jpayne@68 26584 0, /*tp_as_async*/
jpayne@68 26585 #endif
jpayne@68 26586 0, /*tp_repr*/
jpayne@68 26587 0, /*tp_as_number*/
jpayne@68 26588 0, /*tp_as_sequence*/
jpayne@68 26589 0, /*tp_as_mapping*/
jpayne@68 26590 0, /*tp_hash*/
jpayne@68 26591 #if CYTHON_COMPILING_IN_PYPY || 0
jpayne@68 26592 __pyx_pw_5pysam_9libctabix_6Parser_7__call__, /*tp_call*/
jpayne@68 26593 #else
jpayne@68 26594 0, /*tp_call*/
jpayne@68 26595 #endif
jpayne@68 26596 0, /*tp_str*/
jpayne@68 26597 0, /*tp_getattro*/
jpayne@68 26598 0, /*tp_setattro*/
jpayne@68 26599 0, /*tp_as_buffer*/
jpayne@68 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@68 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@68 26602 __pyx_tp_traverse_5pysam_9libctabix_Parser, /*tp_traverse*/
jpayne@68 26603 __pyx_tp_clear_5pysam_9libctabix_Parser, /*tp_clear*/
jpayne@68 26604 0, /*tp_richcompare*/
jpayne@68 26605 0, /*tp_weaklistoffset*/
jpayne@68 26606 0, /*tp_iter*/
jpayne@68 26607 0, /*tp_iternext*/
jpayne@68 26608 __pyx_methods_5pysam_9libctabix_asBed, /*tp_methods*/
jpayne@68 26609 0, /*tp_members*/
jpayne@68 26610 0, /*tp_getset*/
jpayne@68 26611 0, /*tp_base*/
jpayne@68 26612 0, /*tp_dict*/
jpayne@68 26613 0, /*tp_descr_get*/
jpayne@68 26614 0, /*tp_descr_set*/
jpayne@68 26615 #if !CYTHON_USE_TYPE_SPECS
jpayne@68 26616 0, /*tp_dictoffset*/
jpayne@68 26617 #endif
jpayne@68 26618 #if CYTHON_COMPILING_IN_PYPY || 0
jpayne@68 26619 __pyx_pw_5pysam_9libctabix_6Parser_1__init__, /*tp_init*/
jpayne@68 26620 #else
jpayne@68 26621 0, /*tp_init*/
jpayne@68 26622 #endif
jpayne@68 26623 0, /*tp_alloc*/
jpayne@68 26624 __pyx_tp_new_5pysam_9libctabix_asBed, /*tp_new*/
jpayne@68 26625 0, /*tp_free*/
jpayne@68 26626 0, /*tp_is_gc*/
jpayne@68 26627 0, /*tp_bases*/
jpayne@68 26628 0, /*tp_mro*/
jpayne@68 26629 0, /*tp_cache*/
jpayne@68 26630 0, /*tp_subclasses*/
jpayne@68 26631 0, /*tp_weaklist*/
jpayne@68 26632 0, /*tp_del*/
jpayne@68 26633 0, /*tp_version_tag*/
jpayne@68 26634 #if PY_VERSION_HEX >= 0x030400a1
jpayne@68 26635 #if CYTHON_USE_TP_FINALIZE
jpayne@68 26636 0, /*tp_finalize*/
jpayne@68 26637 #else
jpayne@68 26638 NULL, /*tp_finalize*/
jpayne@68 26639 #endif
jpayne@68 26640 #endif
jpayne@68 26641 #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
jpayne@68 26642 0, /*tp_vectorcall*/
jpayne@68 26643 #endif
jpayne@68 26644 #if __PYX_NEED_TP_PRINT_SLOT == 1
jpayne@68 26645 0, /*tp_print*/
jpayne@68 26646 #endif
jpayne@68 26647 #if PY_VERSION_HEX >= 0x030C0000
jpayne@68 26648 0, /*tp_watched*/
jpayne@68 26649 #endif
jpayne@68 26650 #if PY_VERSION_HEX >= 0x030d00A4
jpayne@68 26651 0, /*tp_versions_used*/
jpayne@68 26652 #endif
jpayne@68 26653 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
jpayne@68 26654 0, /*tp_pypy_flags*/
jpayne@68 26655 #endif
jpayne@68 26656 };
jpayne@68 26657 #endif
jpayne@68 26658 static struct __pyx_vtabstruct_5pysam_9libctabix_asVCF __pyx_vtable_5pysam_9libctabix_asVCF;
jpayne@68 26659
jpayne@68 26660 static PyObject *__pyx_tp_new_5pysam_9libctabix_asVCF(PyTypeObject *t, PyObject *a, PyObject *k) {
jpayne@68 26661 struct __pyx_obj_5pysam_9libctabix_asVCF *p;
jpayne@68 26662 PyObject *o = __pyx_tp_new_5pysam_9libctabix_Parser(t, a, k);
jpayne@68 26663 if (unlikely(!o)) return 0;
jpayne@68 26664 p = ((struct __pyx_obj_5pysam_9libctabix_asVCF *)o);
jpayne@68 26665 p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_5pysam_9libctabix_Parser*)__pyx_vtabptr_5pysam_9libctabix_asVCF;
jpayne@68 26666 return o;
jpayne@68 26667 }
jpayne@68 26668
jpayne@68 26669 static PyMethodDef __pyx_methods_5pysam_9libctabix_asVCF[] = {
jpayne@68 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@68 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@68 26672 {0, 0, 0, 0}
jpayne@68 26673 };
jpayne@68 26674 #if CYTHON_USE_TYPE_SPECS
jpayne@68 26675 static PyType_Slot __pyx_type_5pysam_9libctabix_asVCF_slots[] = {
jpayne@68 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@68 26677 {Py_tp_traverse, (void *)__pyx_tp_traverse_5pysam_9libctabix_Parser},
jpayne@68 26678 {Py_tp_clear, (void *)__pyx_tp_clear_5pysam_9libctabix_Parser},
jpayne@68 26679 {Py_tp_methods, (void *)__pyx_methods_5pysam_9libctabix_asVCF},
jpayne@68 26680 {Py_tp_new, (void *)__pyx_tp_new_5pysam_9libctabix_asVCF},
jpayne@68 26681 {0, 0},
jpayne@68 26682 };
jpayne@68 26683 static PyType_Spec __pyx_type_5pysam_9libctabix_asVCF_spec = {
jpayne@68 26684 "pysam.libctabix.asVCF",
jpayne@68 26685 sizeof(struct __pyx_obj_5pysam_9libctabix_asVCF),
jpayne@68 26686 0,
jpayne@68 26687 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
jpayne@68 26688 __pyx_type_5pysam_9libctabix_asVCF_slots,
jpayne@68 26689 };
jpayne@68 26690 #else
jpayne@68 26691
jpayne@68 26692 static PyTypeObject __pyx_type_5pysam_9libctabix_asVCF = {
jpayne@68 26693 PyVarObject_HEAD_INIT(0, 0)
jpayne@68 26694 "pysam.libctabix.""asVCF", /*tp_name*/
jpayne@68 26695 sizeof(struct __pyx_obj_5pysam_9libctabix_asVCF), /*tp_basicsize*/
jpayne@68 26696 0, /*tp_itemsize*/
jpayne@68 26697 __pyx_tp_dealloc_5pysam_9libctabix_Parser, /*tp_dealloc*/
jpayne@68 26698 #if PY_VERSION_HEX < 0x030800b4
jpayne@68 26699 0, /*tp_print*/
jpayne@68 26700 #endif
jpayne@68 26701 #if PY_VERSION_HEX >= 0x030800b4
jpayne@68 26702 0, /*tp_vectorcall_offset*/
jpayne@68 26703 #endif
jpayne@68 26704 0, /*tp_getattr*/
jpayne@68 26705 0, /*tp_setattr*/
jpayne@68 26706 #if PY_MAJOR_VERSION < 3
jpayne@68 26707 0, /*tp_compare*/
jpayne@68 26708 #endif
jpayne@68 26709 #if PY_MAJOR_VERSION >= 3
jpayne@68 26710 0, /*tp_as_async*/
jpayne@68 26711 #endif
jpayne@68 26712 0, /*tp_repr*/
jpayne@68 26713 0, /*tp_as_number*/
jpayne@68 26714 0, /*tp_as_sequence*/
jpayne@68 26715 0, /*tp_as_mapping*/
jpayne@68 26716 0, /*tp_hash*/
jpayne@68 26717 #if CYTHON_COMPILING_IN_PYPY || 0
jpayne@68 26718 __pyx_pw_5pysam_9libctabix_6Parser_7__call__, /*tp_call*/
jpayne@68 26719 #else
jpayne@68 26720 0, /*tp_call*/
jpayne@68 26721 #endif
jpayne@68 26722 0, /*tp_str*/
jpayne@68 26723 0, /*tp_getattro*/
jpayne@68 26724 0, /*tp_setattro*/
jpayne@68 26725 0, /*tp_as_buffer*/
jpayne@68 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@68 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@68 26728 __pyx_tp_traverse_5pysam_9libctabix_Parser, /*tp_traverse*/
jpayne@68 26729 __pyx_tp_clear_5pysam_9libctabix_Parser, /*tp_clear*/
jpayne@68 26730 0, /*tp_richcompare*/
jpayne@68 26731 0, /*tp_weaklistoffset*/
jpayne@68 26732 0, /*tp_iter*/
jpayne@68 26733 0, /*tp_iternext*/
jpayne@68 26734 __pyx_methods_5pysam_9libctabix_asVCF, /*tp_methods*/
jpayne@68 26735 0, /*tp_members*/
jpayne@68 26736 0, /*tp_getset*/
jpayne@68 26737 0, /*tp_base*/
jpayne@68 26738 0, /*tp_dict*/
jpayne@68 26739 0, /*tp_descr_get*/
jpayne@68 26740 0, /*tp_descr_set*/
jpayne@68 26741 #if !CYTHON_USE_TYPE_SPECS
jpayne@68 26742 0, /*tp_dictoffset*/
jpayne@68 26743 #endif
jpayne@68 26744 #if CYTHON_COMPILING_IN_PYPY || 0
jpayne@68 26745 __pyx_pw_5pysam_9libctabix_6Parser_1__init__, /*tp_init*/
jpayne@68 26746 #else
jpayne@68 26747 0, /*tp_init*/
jpayne@68 26748 #endif
jpayne@68 26749 0, /*tp_alloc*/
jpayne@68 26750 __pyx_tp_new_5pysam_9libctabix_asVCF, /*tp_new*/
jpayne@68 26751 0, /*tp_free*/
jpayne@68 26752 0, /*tp_is_gc*/
jpayne@68 26753 0, /*tp_bases*/
jpayne@68 26754 0, /*tp_mro*/
jpayne@68 26755 0, /*tp_cache*/
jpayne@68 26756 0, /*tp_subclasses*/
jpayne@68 26757 0, /*tp_weaklist*/
jpayne@68 26758 0, /*tp_del*/
jpayne@68 26759 0, /*tp_version_tag*/
jpayne@68 26760 #if PY_VERSION_HEX >= 0x030400a1
jpayne@68 26761 #if CYTHON_USE_TP_FINALIZE
jpayne@68 26762 0, /*tp_finalize*/
jpayne@68 26763 #else
jpayne@68 26764 NULL, /*tp_finalize*/
jpayne@68 26765 #endif
jpayne@68 26766 #endif
jpayne@68 26767 #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
jpayne@68 26768 0, /*tp_vectorcall*/
jpayne@68 26769 #endif
jpayne@68 26770 #if __PYX_NEED_TP_PRINT_SLOT == 1
jpayne@68 26771 0, /*tp_print*/
jpayne@68 26772 #endif
jpayne@68 26773 #if PY_VERSION_HEX >= 0x030C0000
jpayne@68 26774 0, /*tp_watched*/
jpayne@68 26775 #endif
jpayne@68 26776 #if PY_VERSION_HEX >= 0x030d00A4
jpayne@68 26777 0, /*tp_versions_used*/
jpayne@68 26778 #endif
jpayne@68 26779 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
jpayne@68 26780 0, /*tp_pypy_flags*/
jpayne@68 26781 #endif
jpayne@68 26782 };
jpayne@68 26783 #endif
jpayne@68 26784 static struct __pyx_vtabstruct_5pysam_9libctabix_TabixIterator __pyx_vtable_5pysam_9libctabix_TabixIterator;
jpayne@68 26785
jpayne@68 26786 static PyObject *__pyx_tp_new_5pysam_9libctabix_TabixIterator(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
jpayne@68 26787 struct __pyx_obj_5pysam_9libctabix_TabixIterator *p;
jpayne@68 26788 PyObject *o;
jpayne@68 26789 #if CYTHON_COMPILING_IN_LIMITED_API
jpayne@68 26790 allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc);
jpayne@68 26791 o = alloc_func(t, 0);
jpayne@68 26792 #else
jpayne@68 26793 if (likely(!__Pyx_PyType_HasFeature(t, Py_TPFLAGS_IS_ABSTRACT))) {
jpayne@68 26794 o = (*t->tp_alloc)(t, 0);
jpayne@68 26795 } else {
jpayne@68 26796 o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
jpayne@68 26797 }
jpayne@68 26798 if (unlikely(!o)) return 0;
jpayne@68 26799 #endif
jpayne@68 26800 p = ((struct __pyx_obj_5pysam_9libctabix_TabixIterator *)o);
jpayne@68 26801 p->__pyx_vtab = __pyx_vtabptr_5pysam_9libctabix_TabixIterator;
jpayne@68 26802 p->tabixfile = ((struct __pyx_obj_5pysam_9libctabix_TabixFile *)Py_None); Py_INCREF(Py_None);
jpayne@68 26803 p->encoding = Py_None; Py_INCREF(Py_None);
jpayne@68 26804 return o;
jpayne@68 26805 }
jpayne@68 26806
jpayne@68 26807 static void __pyx_tp_dealloc_5pysam_9libctabix_TabixIterator(PyObject *o) {
jpayne@68 26808 struct __pyx_obj_5pysam_9libctabix_TabixIterator *p = (struct __pyx_obj_5pysam_9libctabix_TabixIterator *)o;
jpayne@68 26809 #if CYTHON_USE_TP_FINALIZE
jpayne@68 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@68 26811 if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_5pysam_9libctabix_TabixIterator) {
jpayne@68 26812 if (PyObject_CallFinalizerFromDealloc(o)) return;
jpayne@68 26813 }
jpayne@68 26814 }
jpayne@68 26815 #endif
jpayne@68 26816 PyObject_GC_UnTrack(o);
jpayne@68 26817 {
jpayne@68 26818 PyObject *etype, *eval, *etb;
jpayne@68 26819 PyErr_Fetch(&etype, &eval, &etb);
jpayne@68 26820 __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
jpayne@68 26821 __pyx_pw_5pysam_9libctabix_13TabixIterator_7__dealloc__(o);
jpayne@68 26822 __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
jpayne@68 26823 PyErr_Restore(etype, eval, etb);
jpayne@68 26824 }
jpayne@68 26825 Py_CLEAR(p->tabixfile);
jpayne@68 26826 Py_CLEAR(p->encoding);
jpayne@68 26827 #if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY
jpayne@68 26828 (*Py_TYPE(o)->tp_free)(o);
jpayne@68 26829 #else
jpayne@68 26830 {
jpayne@68 26831 freefunc tp_free = (freefunc)PyType_GetSlot(Py_TYPE(o), Py_tp_free);
jpayne@68 26832 if (tp_free) tp_free(o);
jpayne@68 26833 }
jpayne@68 26834 #endif
jpayne@68 26835 }
jpayne@68 26836
jpayne@68 26837 static int __pyx_tp_traverse_5pysam_9libctabix_TabixIterator(PyObject *o, visitproc v, void *a) {
jpayne@68 26838 int e;
jpayne@68 26839 struct __pyx_obj_5pysam_9libctabix_TabixIterator *p = (struct __pyx_obj_5pysam_9libctabix_TabixIterator *)o;
jpayne@68 26840 if (p->tabixfile) {
jpayne@68 26841 e = (*v)(((PyObject *)p->tabixfile), a); if (e) return e;
jpayne@68 26842 }
jpayne@68 26843 if (p->encoding) {
jpayne@68 26844 e = (*v)(p->encoding, a); if (e) return e;
jpayne@68 26845 }
jpayne@68 26846 return 0;
jpayne@68 26847 }
jpayne@68 26848
jpayne@68 26849 static int __pyx_tp_clear_5pysam_9libctabix_TabixIterator(PyObject *o) {
jpayne@68 26850 PyObject* tmp;
jpayne@68 26851 struct __pyx_obj_5pysam_9libctabix_TabixIterator *p = (struct __pyx_obj_5pysam_9libctabix_TabixIterator *)o;
jpayne@68 26852 tmp = ((PyObject*)p->tabixfile);
jpayne@68 26853 p->tabixfile = ((struct __pyx_obj_5pysam_9libctabix_TabixFile *)Py_None); Py_INCREF(Py_None);
jpayne@68 26854 Py_XDECREF(tmp);
jpayne@68 26855 tmp = ((PyObject*)p->encoding);
jpayne@68 26856 p->encoding = Py_None; Py_INCREF(Py_None);
jpayne@68 26857 Py_XDECREF(tmp);
jpayne@68 26858 return 0;
jpayne@68 26859 }
jpayne@68 26860
jpayne@68 26861 static PyObject *__pyx_specialmethod___pyx_pw_5pysam_9libctabix_13TabixIterator_5__next__(PyObject *self, CYTHON_UNUSED PyObject *arg) {
jpayne@68 26862 PyObject *res = __pyx_pw_5pysam_9libctabix_13TabixIterator_5__next__(self);
jpayne@68 26863 if (!res && !PyErr_Occurred()) { PyErr_SetNone(PyExc_StopIteration); }
jpayne@68 26864 return res;
jpayne@68 26865 }
jpayne@68 26866
jpayne@68 26867 static PyMethodDef __pyx_methods_5pysam_9libctabix_TabixIterator[] = {
jpayne@68 26868 {"__next__", (PyCFunction)__pyx_specialmethod___pyx_pw_5pysam_9libctabix_13TabixIterator_5__next__, METH_NOARGS|METH_COEXIST, __pyx_doc_5pysam_9libctabix_13TabixIterator_4__next__},
jpayne@68 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@68 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@68 26871 {0, 0, 0, 0}
jpayne@68 26872 };
jpayne@68 26873 #if CYTHON_USE_TYPE_SPECS
jpayne@68 26874 static PyType_Slot __pyx_type_5pysam_9libctabix_TabixIterator_slots[] = {
jpayne@68 26875 {Py_tp_dealloc, (void *)__pyx_tp_dealloc_5pysam_9libctabix_TabixIterator},
jpayne@68 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@68 26877 {Py_tp_traverse, (void *)__pyx_tp_traverse_5pysam_9libctabix_TabixIterator},
jpayne@68 26878 {Py_tp_clear, (void *)__pyx_tp_clear_5pysam_9libctabix_TabixIterator},
jpayne@68 26879 {Py_tp_iter, (void *)__pyx_pw_5pysam_9libctabix_13TabixIterator_3__iter__},
jpayne@68 26880 {Py_tp_iternext, (void *)__pyx_pw_5pysam_9libctabix_13TabixIterator_5__next__},
jpayne@68 26881 {Py_tp_methods, (void *)__pyx_methods_5pysam_9libctabix_TabixIterator},
jpayne@68 26882 {Py_tp_init, (void *)__pyx_pw_5pysam_9libctabix_13TabixIterator_1__init__},
jpayne@68 26883 {Py_tp_new, (void *)__pyx_tp_new_5pysam_9libctabix_TabixIterator},
jpayne@68 26884 {0, 0},
jpayne@68 26885 };
jpayne@68 26886 static PyType_Spec __pyx_type_5pysam_9libctabix_TabixIterator_spec = {
jpayne@68 26887 "pysam.libctabix.TabixIterator",
jpayne@68 26888 sizeof(struct __pyx_obj_5pysam_9libctabix_TabixIterator),
jpayne@68 26889 0,
jpayne@68 26890 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
jpayne@68 26891 __pyx_type_5pysam_9libctabix_TabixIterator_slots,
jpayne@68 26892 };
jpayne@68 26893 #else
jpayne@68 26894
jpayne@68 26895 static PyTypeObject __pyx_type_5pysam_9libctabix_TabixIterator = {
jpayne@68 26896 PyVarObject_HEAD_INIT(0, 0)
jpayne@68 26897 "pysam.libctabix.""TabixIterator", /*tp_name*/
jpayne@68 26898 sizeof(struct __pyx_obj_5pysam_9libctabix_TabixIterator), /*tp_basicsize*/
jpayne@68 26899 0, /*tp_itemsize*/
jpayne@68 26900 __pyx_tp_dealloc_5pysam_9libctabix_TabixIterator, /*tp_dealloc*/
jpayne@68 26901 #if PY_VERSION_HEX < 0x030800b4
jpayne@68 26902 0, /*tp_print*/
jpayne@68 26903 #endif
jpayne@68 26904 #if PY_VERSION_HEX >= 0x030800b4
jpayne@68 26905 0, /*tp_vectorcall_offset*/
jpayne@68 26906 #endif
jpayne@68 26907 0, /*tp_getattr*/
jpayne@68 26908 0, /*tp_setattr*/
jpayne@68 26909 #if PY_MAJOR_VERSION < 3
jpayne@68 26910 0, /*tp_compare*/
jpayne@68 26911 #endif
jpayne@68 26912 #if PY_MAJOR_VERSION >= 3
jpayne@68 26913 0, /*tp_as_async*/
jpayne@68 26914 #endif
jpayne@68 26915 0, /*tp_repr*/
jpayne@68 26916 0, /*tp_as_number*/
jpayne@68 26917 0, /*tp_as_sequence*/
jpayne@68 26918 0, /*tp_as_mapping*/
jpayne@68 26919 0, /*tp_hash*/
jpayne@68 26920 0, /*tp_call*/
jpayne@68 26921 0, /*tp_str*/
jpayne@68 26922 0, /*tp_getattro*/
jpayne@68 26923 0, /*tp_setattro*/
jpayne@68 26924 0, /*tp_as_buffer*/
jpayne@68 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@68 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@68 26927 __pyx_tp_traverse_5pysam_9libctabix_TabixIterator, /*tp_traverse*/
jpayne@68 26928 __pyx_tp_clear_5pysam_9libctabix_TabixIterator, /*tp_clear*/
jpayne@68 26929 0, /*tp_richcompare*/
jpayne@68 26930 0, /*tp_weaklistoffset*/
jpayne@68 26931 __pyx_pw_5pysam_9libctabix_13TabixIterator_3__iter__, /*tp_iter*/
jpayne@68 26932 __pyx_pw_5pysam_9libctabix_13TabixIterator_5__next__, /*tp_iternext*/
jpayne@68 26933 __pyx_methods_5pysam_9libctabix_TabixIterator, /*tp_methods*/
jpayne@68 26934 0, /*tp_members*/
jpayne@68 26935 0, /*tp_getset*/
jpayne@68 26936 0, /*tp_base*/
jpayne@68 26937 0, /*tp_dict*/
jpayne@68 26938 0, /*tp_descr_get*/
jpayne@68 26939 0, /*tp_descr_set*/
jpayne@68 26940 #if !CYTHON_USE_TYPE_SPECS
jpayne@68 26941 0, /*tp_dictoffset*/
jpayne@68 26942 #endif
jpayne@68 26943 __pyx_pw_5pysam_9libctabix_13TabixIterator_1__init__, /*tp_init*/
jpayne@68 26944 0, /*tp_alloc*/
jpayne@68 26945 __pyx_tp_new_5pysam_9libctabix_TabixIterator, /*tp_new*/
jpayne@68 26946 0, /*tp_free*/
jpayne@68 26947 0, /*tp_is_gc*/
jpayne@68 26948 0, /*tp_bases*/
jpayne@68 26949 0, /*tp_mro*/
jpayne@68 26950 0, /*tp_cache*/
jpayne@68 26951 0, /*tp_subclasses*/
jpayne@68 26952 0, /*tp_weaklist*/
jpayne@68 26953 0, /*tp_del*/
jpayne@68 26954 0, /*tp_version_tag*/
jpayne@68 26955 #if PY_VERSION_HEX >= 0x030400a1
jpayne@68 26956 #if CYTHON_USE_TP_FINALIZE
jpayne@68 26957 0, /*tp_finalize*/
jpayne@68 26958 #else
jpayne@68 26959 NULL, /*tp_finalize*/
jpayne@68 26960 #endif
jpayne@68 26961 #endif
jpayne@68 26962 #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
jpayne@68 26963 0, /*tp_vectorcall*/
jpayne@68 26964 #endif
jpayne@68 26965 #if __PYX_NEED_TP_PRINT_SLOT == 1
jpayne@68 26966 0, /*tp_print*/
jpayne@68 26967 #endif
jpayne@68 26968 #if PY_VERSION_HEX >= 0x030C0000
jpayne@68 26969 0, /*tp_watched*/
jpayne@68 26970 #endif
jpayne@68 26971 #if PY_VERSION_HEX >= 0x030d00A4
jpayne@68 26972 0, /*tp_versions_used*/
jpayne@68 26973 #endif
jpayne@68 26974 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
jpayne@68 26975 0, /*tp_pypy_flags*/
jpayne@68 26976 #endif
jpayne@68 26977 };
jpayne@68 26978 #endif
jpayne@68 26979 static struct __pyx_vtabstruct_5pysam_9libctabix_TabixIteratorParsed __pyx_vtable_5pysam_9libctabix_TabixIteratorParsed;
jpayne@68 26980
jpayne@68 26981 static PyObject *__pyx_tp_new_5pysam_9libctabix_TabixIteratorParsed(PyTypeObject *t, PyObject *a, PyObject *k) {
jpayne@68 26982 struct __pyx_obj_5pysam_9libctabix_TabixIteratorParsed *p;
jpayne@68 26983 PyObject *o = __pyx_tp_new_5pysam_9libctabix_TabixIterator(t, a, k);
jpayne@68 26984 if (unlikely(!o)) return 0;
jpayne@68 26985 p = ((struct __pyx_obj_5pysam_9libctabix_TabixIteratorParsed *)o);
jpayne@68 26986 p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_5pysam_9libctabix_TabixIterator*)__pyx_vtabptr_5pysam_9libctabix_TabixIteratorParsed;
jpayne@68 26987 p->parser = ((struct __pyx_obj_5pysam_9libctabix_Parser *)Py_None); Py_INCREF(Py_None);
jpayne@68 26988 return o;
jpayne@68 26989 }
jpayne@68 26990
jpayne@68 26991 static void __pyx_tp_dealloc_5pysam_9libctabix_TabixIteratorParsed(PyObject *o) {
jpayne@68 26992 struct __pyx_obj_5pysam_9libctabix_TabixIteratorParsed *p = (struct __pyx_obj_5pysam_9libctabix_TabixIteratorParsed *)o;
jpayne@68 26993 #if CYTHON_USE_TP_FINALIZE
jpayne@68 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@68 26995 if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_5pysam_9libctabix_TabixIteratorParsed) {
jpayne@68 26996 if (PyObject_CallFinalizerFromDealloc(o)) return;
jpayne@68 26997 }
jpayne@68 26998 }
jpayne@68 26999 #endif
jpayne@68 27000 PyObject_GC_UnTrack(o);
jpayne@68 27001 Py_CLEAR(p->parser);
jpayne@68 27002 PyObject_GC_Track(o);
jpayne@68 27003 __pyx_tp_dealloc_5pysam_9libctabix_TabixIterator(o);
jpayne@68 27004 }
jpayne@68 27005
jpayne@68 27006 static int __pyx_tp_traverse_5pysam_9libctabix_TabixIteratorParsed(PyObject *o, visitproc v, void *a) {
jpayne@68 27007 int e;
jpayne@68 27008 struct __pyx_obj_5pysam_9libctabix_TabixIteratorParsed *p = (struct __pyx_obj_5pysam_9libctabix_TabixIteratorParsed *)o;
jpayne@68 27009 e = __pyx_tp_traverse_5pysam_9libctabix_TabixIterator(o, v, a); if (e) return e;
jpayne@68 27010 if (p->parser) {
jpayne@68 27011 e = (*v)(((PyObject *)p->parser), a); if (e) return e;
jpayne@68 27012 }
jpayne@68 27013 return 0;
jpayne@68 27014 }
jpayne@68 27015
jpayne@68 27016 static int __pyx_tp_clear_5pysam_9libctabix_TabixIteratorParsed(PyObject *o) {
jpayne@68 27017 PyObject* tmp;
jpayne@68 27018 struct __pyx_obj_5pysam_9libctabix_TabixIteratorParsed *p = (struct __pyx_obj_5pysam_9libctabix_TabixIteratorParsed *)o;
jpayne@68 27019 __pyx_tp_clear_5pysam_9libctabix_TabixIterator(o);
jpayne@68 27020 tmp = ((PyObject*)p->parser);
jpayne@68 27021 p->parser = ((struct __pyx_obj_5pysam_9libctabix_Parser *)Py_None); Py_INCREF(Py_None);
jpayne@68 27022 Py_XDECREF(tmp);
jpayne@68 27023 return 0;
jpayne@68 27024 }
jpayne@68 27025
jpayne@68 27026 static PyObject *__pyx_specialmethod___pyx_pw_5pysam_9libctabix_19TabixIteratorParsed_3__next__(PyObject *self, CYTHON_UNUSED PyObject *arg) {
jpayne@68 27027 PyObject *res = __pyx_pw_5pysam_9libctabix_19TabixIteratorParsed_3__next__(self);
jpayne@68 27028 if (!res && !PyErr_Occurred()) { PyErr_SetNone(PyExc_StopIteration); }
jpayne@68 27029 return res;
jpayne@68 27030 }
jpayne@68 27031
jpayne@68 27032 static PyMethodDef __pyx_methods_5pysam_9libctabix_TabixIteratorParsed[] = {
jpayne@68 27033 {"__next__", (PyCFunction)__pyx_specialmethod___pyx_pw_5pysam_9libctabix_19TabixIteratorParsed_3__next__, METH_NOARGS|METH_COEXIST, __pyx_doc_5pysam_9libctabix_19TabixIteratorParsed_2__next__},
jpayne@68 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@68 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@68 27036 {0, 0, 0, 0}
jpayne@68 27037 };
jpayne@68 27038 #if CYTHON_USE_TYPE_SPECS
jpayne@68 27039 static PyType_Slot __pyx_type_5pysam_9libctabix_TabixIteratorParsed_slots[] = {
jpayne@68 27040 {Py_tp_dealloc, (void *)__pyx_tp_dealloc_5pysam_9libctabix_TabixIteratorParsed},
jpayne@68 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@68 27042 {Py_tp_traverse, (void *)__pyx_tp_traverse_5pysam_9libctabix_TabixIteratorParsed},
jpayne@68 27043 {Py_tp_clear, (void *)__pyx_tp_clear_5pysam_9libctabix_TabixIteratorParsed},
jpayne@68 27044 {Py_tp_iternext, (void *)__pyx_pw_5pysam_9libctabix_19TabixIteratorParsed_3__next__},
jpayne@68 27045 {Py_tp_methods, (void *)__pyx_methods_5pysam_9libctabix_TabixIteratorParsed},
jpayne@68 27046 {Py_tp_init, (void *)__pyx_pw_5pysam_9libctabix_19TabixIteratorParsed_1__init__},
jpayne@68 27047 {Py_tp_new, (void *)__pyx_tp_new_5pysam_9libctabix_TabixIteratorParsed},
jpayne@68 27048 {0, 0},
jpayne@68 27049 };
jpayne@68 27050 static PyType_Spec __pyx_type_5pysam_9libctabix_TabixIteratorParsed_spec = {
jpayne@68 27051 "pysam.libctabix.TabixIteratorParsed",
jpayne@68 27052 sizeof(struct __pyx_obj_5pysam_9libctabix_TabixIteratorParsed),
jpayne@68 27053 0,
jpayne@68 27054 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
jpayne@68 27055 __pyx_type_5pysam_9libctabix_TabixIteratorParsed_slots,
jpayne@68 27056 };
jpayne@68 27057 #else
jpayne@68 27058
jpayne@68 27059 static PyTypeObject __pyx_type_5pysam_9libctabix_TabixIteratorParsed = {
jpayne@68 27060 PyVarObject_HEAD_INIT(0, 0)
jpayne@68 27061 "pysam.libctabix.""TabixIteratorParsed", /*tp_name*/
jpayne@68 27062 sizeof(struct __pyx_obj_5pysam_9libctabix_TabixIteratorParsed), /*tp_basicsize*/
jpayne@68 27063 0, /*tp_itemsize*/
jpayne@68 27064 __pyx_tp_dealloc_5pysam_9libctabix_TabixIteratorParsed, /*tp_dealloc*/
jpayne@68 27065 #if PY_VERSION_HEX < 0x030800b4
jpayne@68 27066 0, /*tp_print*/
jpayne@68 27067 #endif
jpayne@68 27068 #if PY_VERSION_HEX >= 0x030800b4
jpayne@68 27069 0, /*tp_vectorcall_offset*/
jpayne@68 27070 #endif
jpayne@68 27071 0, /*tp_getattr*/
jpayne@68 27072 0, /*tp_setattr*/
jpayne@68 27073 #if PY_MAJOR_VERSION < 3
jpayne@68 27074 0, /*tp_compare*/
jpayne@68 27075 #endif
jpayne@68 27076 #if PY_MAJOR_VERSION >= 3
jpayne@68 27077 0, /*tp_as_async*/
jpayne@68 27078 #endif
jpayne@68 27079 0, /*tp_repr*/
jpayne@68 27080 0, /*tp_as_number*/
jpayne@68 27081 0, /*tp_as_sequence*/
jpayne@68 27082 0, /*tp_as_mapping*/
jpayne@68 27083 0, /*tp_hash*/
jpayne@68 27084 0, /*tp_call*/
jpayne@68 27085 0, /*tp_str*/
jpayne@68 27086 0, /*tp_getattro*/
jpayne@68 27087 0, /*tp_setattro*/
jpayne@68 27088 0, /*tp_as_buffer*/
jpayne@68 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@68 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@68 27091 __pyx_tp_traverse_5pysam_9libctabix_TabixIteratorParsed, /*tp_traverse*/
jpayne@68 27092 __pyx_tp_clear_5pysam_9libctabix_TabixIteratorParsed, /*tp_clear*/
jpayne@68 27093 0, /*tp_richcompare*/
jpayne@68 27094 0, /*tp_weaklistoffset*/
jpayne@68 27095 #if CYTHON_COMPILING_IN_PYPY || 0
jpayne@68 27096 __pyx_pw_5pysam_9libctabix_13TabixIterator_3__iter__, /*tp_iter*/
jpayne@68 27097 #else
jpayne@68 27098 0, /*tp_iter*/
jpayne@68 27099 #endif
jpayne@68 27100 __pyx_pw_5pysam_9libctabix_19TabixIteratorParsed_3__next__, /*tp_iternext*/
jpayne@68 27101 __pyx_methods_5pysam_9libctabix_TabixIteratorParsed, /*tp_methods*/
jpayne@68 27102 0, /*tp_members*/
jpayne@68 27103 0, /*tp_getset*/
jpayne@68 27104 0, /*tp_base*/
jpayne@68 27105 0, /*tp_dict*/
jpayne@68 27106 0, /*tp_descr_get*/
jpayne@68 27107 0, /*tp_descr_set*/
jpayne@68 27108 #if !CYTHON_USE_TYPE_SPECS
jpayne@68 27109 0, /*tp_dictoffset*/
jpayne@68 27110 #endif
jpayne@68 27111 __pyx_pw_5pysam_9libctabix_19TabixIteratorParsed_1__init__, /*tp_init*/
jpayne@68 27112 0, /*tp_alloc*/
jpayne@68 27113 __pyx_tp_new_5pysam_9libctabix_TabixIteratorParsed, /*tp_new*/
jpayne@68 27114 0, /*tp_free*/
jpayne@68 27115 0, /*tp_is_gc*/
jpayne@68 27116 0, /*tp_bases*/
jpayne@68 27117 0, /*tp_mro*/
jpayne@68 27118 0, /*tp_cache*/
jpayne@68 27119 0, /*tp_subclasses*/
jpayne@68 27120 0, /*tp_weaklist*/
jpayne@68 27121 0, /*tp_del*/
jpayne@68 27122 0, /*tp_version_tag*/
jpayne@68 27123 #if PY_VERSION_HEX >= 0x030400a1
jpayne@68 27124 #if CYTHON_USE_TP_FINALIZE
jpayne@68 27125 0, /*tp_finalize*/
jpayne@68 27126 #else
jpayne@68 27127 NULL, /*tp_finalize*/
jpayne@68 27128 #endif
jpayne@68 27129 #endif
jpayne@68 27130 #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
jpayne@68 27131 0, /*tp_vectorcall*/
jpayne@68 27132 #endif
jpayne@68 27133 #if __PYX_NEED_TP_PRINT_SLOT == 1
jpayne@68 27134 0, /*tp_print*/
jpayne@68 27135 #endif
jpayne@68 27136 #if PY_VERSION_HEX >= 0x030C0000
jpayne@68 27137 0, /*tp_watched*/
jpayne@68 27138 #endif
jpayne@68 27139 #if PY_VERSION_HEX >= 0x030d00A4
jpayne@68 27140 0, /*tp_versions_used*/
jpayne@68 27141 #endif
jpayne@68 27142 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
jpayne@68 27143 0, /*tp_pypy_flags*/
jpayne@68 27144 #endif
jpayne@68 27145 };
jpayne@68 27146 #endif
jpayne@68 27147 static struct __pyx_vtabstruct_5pysam_9libctabix_GZIterator __pyx_vtable_5pysam_9libctabix_GZIterator;
jpayne@68 27148
jpayne@68 27149 static PyObject *__pyx_tp_new_5pysam_9libctabix_GZIterator(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
jpayne@68 27150 struct __pyx_obj_5pysam_9libctabix_GZIterator *p;
jpayne@68 27151 PyObject *o;
jpayne@68 27152 #if CYTHON_COMPILING_IN_LIMITED_API
jpayne@68 27153 allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc);
jpayne@68 27154 o = alloc_func(t, 0);
jpayne@68 27155 #else
jpayne@68 27156 if (likely(!__Pyx_PyType_HasFeature(t, Py_TPFLAGS_IS_ABSTRACT))) {
jpayne@68 27157 o = (*t->tp_alloc)(t, 0);
jpayne@68 27158 } else {
jpayne@68 27159 o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
jpayne@68 27160 }
jpayne@68 27161 if (unlikely(!o)) return 0;
jpayne@68 27162 #endif
jpayne@68 27163 p = ((struct __pyx_obj_5pysam_9libctabix_GZIterator *)o);
jpayne@68 27164 p->__pyx_vtab = __pyx_vtabptr_5pysam_9libctabix_GZIterator;
jpayne@68 27165 p->_filename = Py_None; Py_INCREF(Py_None);
jpayne@68 27166 p->encoding = Py_None; Py_INCREF(Py_None);
jpayne@68 27167 return o;
jpayne@68 27168 }
jpayne@68 27169
jpayne@68 27170 static void __pyx_tp_dealloc_5pysam_9libctabix_GZIterator(PyObject *o) {
jpayne@68 27171 struct __pyx_obj_5pysam_9libctabix_GZIterator *p = (struct __pyx_obj_5pysam_9libctabix_GZIterator *)o;
jpayne@68 27172 #if CYTHON_USE_TP_FINALIZE
jpayne@68 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@68 27174 if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_5pysam_9libctabix_GZIterator) {
jpayne@68 27175 if (PyObject_CallFinalizerFromDealloc(o)) return;
jpayne@68 27176 }
jpayne@68 27177 }
jpayne@68 27178 #endif
jpayne@68 27179 PyObject_GC_UnTrack(o);
jpayne@68 27180 {
jpayne@68 27181 PyObject *etype, *eval, *etb;
jpayne@68 27182 PyErr_Fetch(&etype, &eval, &etb);
jpayne@68 27183 __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
jpayne@68 27184 __pyx_pw_5pysam_9libctabix_10GZIterator_3__dealloc__(o);
jpayne@68 27185 __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
jpayne@68 27186 PyErr_Restore(etype, eval, etb);
jpayne@68 27187 }
jpayne@68 27188 Py_CLEAR(p->_filename);
jpayne@68 27189 Py_CLEAR(p->encoding);
jpayne@68 27190 #if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY
jpayne@68 27191 (*Py_TYPE(o)->tp_free)(o);
jpayne@68 27192 #else
jpayne@68 27193 {
jpayne@68 27194 freefunc tp_free = (freefunc)PyType_GetSlot(Py_TYPE(o), Py_tp_free);
jpayne@68 27195 if (tp_free) tp_free(o);
jpayne@68 27196 }
jpayne@68 27197 #endif
jpayne@68 27198 }
jpayne@68 27199
jpayne@68 27200 static int __pyx_tp_traverse_5pysam_9libctabix_GZIterator(PyObject *o, visitproc v, void *a) {
jpayne@68 27201 int e;
jpayne@68 27202 struct __pyx_obj_5pysam_9libctabix_GZIterator *p = (struct __pyx_obj_5pysam_9libctabix_GZIterator *)o;
jpayne@68 27203 if (p->_filename) {
jpayne@68 27204 e = (*v)(p->_filename, a); if (e) return e;
jpayne@68 27205 }
jpayne@68 27206 if (p->encoding) {
jpayne@68 27207 e = (*v)(p->encoding, a); if (e) return e;
jpayne@68 27208 }
jpayne@68 27209 return 0;
jpayne@68 27210 }
jpayne@68 27211
jpayne@68 27212 static int __pyx_tp_clear_5pysam_9libctabix_GZIterator(PyObject *o) {
jpayne@68 27213 PyObject* tmp;
jpayne@68 27214 struct __pyx_obj_5pysam_9libctabix_GZIterator *p = (struct __pyx_obj_5pysam_9libctabix_GZIterator *)o;
jpayne@68 27215 tmp = ((PyObject*)p->_filename);
jpayne@68 27216 p->_filename = Py_None; Py_INCREF(Py_None);
jpayne@68 27217 Py_XDECREF(tmp);
jpayne@68 27218 tmp = ((PyObject*)p->encoding);
jpayne@68 27219 p->encoding = Py_None; Py_INCREF(Py_None);
jpayne@68 27220 Py_XDECREF(tmp);
jpayne@68 27221 return 0;
jpayne@68 27222 }
jpayne@68 27223
jpayne@68 27224 static PyObject *__pyx_specialmethod___pyx_pw_5pysam_9libctabix_10GZIterator_7__next__(PyObject *self, CYTHON_UNUSED PyObject *arg) {
jpayne@68 27225 PyObject *res = __pyx_pw_5pysam_9libctabix_10GZIterator_7__next__(self);
jpayne@68 27226 if (!res && !PyErr_Occurred()) { PyErr_SetNone(PyExc_StopIteration); }
jpayne@68 27227 return res;
jpayne@68 27228 }
jpayne@68 27229
jpayne@68 27230 static PyMethodDef __pyx_methods_5pysam_9libctabix_GZIterator[] = {
jpayne@68 27231 {"__next__", (PyCFunction)__pyx_specialmethod___pyx_pw_5pysam_9libctabix_10GZIterator_7__next__, METH_NOARGS|METH_COEXIST, __pyx_doc_5pysam_9libctabix_10GZIterator_6__next__},
jpayne@68 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@68 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@68 27234 {0, 0, 0, 0}
jpayne@68 27235 };
jpayne@68 27236 #if CYTHON_USE_TYPE_SPECS
jpayne@68 27237 static PyType_Slot __pyx_type_5pysam_9libctabix_GZIterator_slots[] = {
jpayne@68 27238 {Py_tp_dealloc, (void *)__pyx_tp_dealloc_5pysam_9libctabix_GZIterator},
jpayne@68 27239 {Py_tp_doc, (void *)PyDoc_STR("GZIterator(filename, int buffer_size=65536, encoding=u'ascii')")},
jpayne@68 27240 {Py_tp_traverse, (void *)__pyx_tp_traverse_5pysam_9libctabix_GZIterator},
jpayne@68 27241 {Py_tp_clear, (void *)__pyx_tp_clear_5pysam_9libctabix_GZIterator},
jpayne@68 27242 {Py_tp_iter, (void *)__pyx_pw_5pysam_9libctabix_10GZIterator_5__iter__},
jpayne@68 27243 {Py_tp_iternext, (void *)__pyx_pw_5pysam_9libctabix_10GZIterator_7__next__},
jpayne@68 27244 {Py_tp_methods, (void *)__pyx_methods_5pysam_9libctabix_GZIterator},
jpayne@68 27245 {Py_tp_init, (void *)__pyx_pw_5pysam_9libctabix_10GZIterator_1__init__},
jpayne@68 27246 {Py_tp_new, (void *)__pyx_tp_new_5pysam_9libctabix_GZIterator},
jpayne@68 27247 {0, 0},
jpayne@68 27248 };
jpayne@68 27249 static PyType_Spec __pyx_type_5pysam_9libctabix_GZIterator_spec = {
jpayne@68 27250 "pysam.libctabix.GZIterator",
jpayne@68 27251 sizeof(struct __pyx_obj_5pysam_9libctabix_GZIterator),
jpayne@68 27252 0,
jpayne@68 27253 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
jpayne@68 27254 __pyx_type_5pysam_9libctabix_GZIterator_slots,
jpayne@68 27255 };
jpayne@68 27256 #else
jpayne@68 27257
jpayne@68 27258 static PyTypeObject __pyx_type_5pysam_9libctabix_GZIterator = {
jpayne@68 27259 PyVarObject_HEAD_INIT(0, 0)
jpayne@68 27260 "pysam.libctabix.""GZIterator", /*tp_name*/
jpayne@68 27261 sizeof(struct __pyx_obj_5pysam_9libctabix_GZIterator), /*tp_basicsize*/
jpayne@68 27262 0, /*tp_itemsize*/
jpayne@68 27263 __pyx_tp_dealloc_5pysam_9libctabix_GZIterator, /*tp_dealloc*/
jpayne@68 27264 #if PY_VERSION_HEX < 0x030800b4
jpayne@68 27265 0, /*tp_print*/
jpayne@68 27266 #endif
jpayne@68 27267 #if PY_VERSION_HEX >= 0x030800b4
jpayne@68 27268 0, /*tp_vectorcall_offset*/
jpayne@68 27269 #endif
jpayne@68 27270 0, /*tp_getattr*/
jpayne@68 27271 0, /*tp_setattr*/
jpayne@68 27272 #if PY_MAJOR_VERSION < 3
jpayne@68 27273 0, /*tp_compare*/
jpayne@68 27274 #endif
jpayne@68 27275 #if PY_MAJOR_VERSION >= 3
jpayne@68 27276 0, /*tp_as_async*/
jpayne@68 27277 #endif
jpayne@68 27278 0, /*tp_repr*/
jpayne@68 27279 0, /*tp_as_number*/
jpayne@68 27280 0, /*tp_as_sequence*/
jpayne@68 27281 0, /*tp_as_mapping*/
jpayne@68 27282 0, /*tp_hash*/
jpayne@68 27283 0, /*tp_call*/
jpayne@68 27284 0, /*tp_str*/
jpayne@68 27285 0, /*tp_getattro*/
jpayne@68 27286 0, /*tp_setattro*/
jpayne@68 27287 0, /*tp_as_buffer*/
jpayne@68 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@68 27289 PyDoc_STR("GZIterator(filename, int buffer_size=65536, encoding=u'ascii')"), /*tp_doc*/
jpayne@68 27290 __pyx_tp_traverse_5pysam_9libctabix_GZIterator, /*tp_traverse*/
jpayne@68 27291 __pyx_tp_clear_5pysam_9libctabix_GZIterator, /*tp_clear*/
jpayne@68 27292 0, /*tp_richcompare*/
jpayne@68 27293 0, /*tp_weaklistoffset*/
jpayne@68 27294 __pyx_pw_5pysam_9libctabix_10GZIterator_5__iter__, /*tp_iter*/
jpayne@68 27295 __pyx_pw_5pysam_9libctabix_10GZIterator_7__next__, /*tp_iternext*/
jpayne@68 27296 __pyx_methods_5pysam_9libctabix_GZIterator, /*tp_methods*/
jpayne@68 27297 0, /*tp_members*/
jpayne@68 27298 0, /*tp_getset*/
jpayne@68 27299 0, /*tp_base*/
jpayne@68 27300 0, /*tp_dict*/
jpayne@68 27301 0, /*tp_descr_get*/
jpayne@68 27302 0, /*tp_descr_set*/
jpayne@68 27303 #if !CYTHON_USE_TYPE_SPECS
jpayne@68 27304 0, /*tp_dictoffset*/
jpayne@68 27305 #endif
jpayne@68 27306 __pyx_pw_5pysam_9libctabix_10GZIterator_1__init__, /*tp_init*/
jpayne@68 27307 0, /*tp_alloc*/
jpayne@68 27308 __pyx_tp_new_5pysam_9libctabix_GZIterator, /*tp_new*/
jpayne@68 27309 0, /*tp_free*/
jpayne@68 27310 0, /*tp_is_gc*/
jpayne@68 27311 0, /*tp_bases*/
jpayne@68 27312 0, /*tp_mro*/
jpayne@68 27313 0, /*tp_cache*/
jpayne@68 27314 0, /*tp_subclasses*/
jpayne@68 27315 0, /*tp_weaklist*/
jpayne@68 27316 0, /*tp_del*/
jpayne@68 27317 0, /*tp_version_tag*/
jpayne@68 27318 #if PY_VERSION_HEX >= 0x030400a1
jpayne@68 27319 #if CYTHON_USE_TP_FINALIZE
jpayne@68 27320 0, /*tp_finalize*/
jpayne@68 27321 #else
jpayne@68 27322 NULL, /*tp_finalize*/
jpayne@68 27323 #endif
jpayne@68 27324 #endif
jpayne@68 27325 #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
jpayne@68 27326 0, /*tp_vectorcall*/
jpayne@68 27327 #endif
jpayne@68 27328 #if __PYX_NEED_TP_PRINT_SLOT == 1
jpayne@68 27329 0, /*tp_print*/
jpayne@68 27330 #endif
jpayne@68 27331 #if PY_VERSION_HEX >= 0x030C0000
jpayne@68 27332 0, /*tp_watched*/
jpayne@68 27333 #endif
jpayne@68 27334 #if PY_VERSION_HEX >= 0x030d00A4
jpayne@68 27335 0, /*tp_versions_used*/
jpayne@68 27336 #endif
jpayne@68 27337 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
jpayne@68 27338 0, /*tp_pypy_flags*/
jpayne@68 27339 #endif
jpayne@68 27340 };
jpayne@68 27341 #endif
jpayne@68 27342 static struct __pyx_vtabstruct_5pysam_9libctabix_GZIteratorHead __pyx_vtable_5pysam_9libctabix_GZIteratorHead;
jpayne@68 27343
jpayne@68 27344 static PyObject *__pyx_tp_new_5pysam_9libctabix_GZIteratorHead(PyTypeObject *t, PyObject *a, PyObject *k) {
jpayne@68 27345 struct __pyx_obj_5pysam_9libctabix_GZIteratorHead *p;
jpayne@68 27346 PyObject *o = __pyx_tp_new_5pysam_9libctabix_GZIterator(t, a, k);
jpayne@68 27347 if (unlikely(!o)) return 0;
jpayne@68 27348 p = ((struct __pyx_obj_5pysam_9libctabix_GZIteratorHead *)o);
jpayne@68 27349 p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_5pysam_9libctabix_GZIterator*)__pyx_vtabptr_5pysam_9libctabix_GZIteratorHead;
jpayne@68 27350 return o;
jpayne@68 27351 }
jpayne@68 27352
jpayne@68 27353 static PyObject *__pyx_specialmethod___pyx_pw_5pysam_9libctabix_14GZIteratorHead_1__next__(PyObject *self, CYTHON_UNUSED PyObject *arg) {
jpayne@68 27354 PyObject *res = __pyx_pw_5pysam_9libctabix_14GZIteratorHead_1__next__(self);
jpayne@68 27355 if (!res && !PyErr_Occurred()) { PyErr_SetNone(PyExc_StopIteration); }
jpayne@68 27356 return res;
jpayne@68 27357 }
jpayne@68 27358
jpayne@68 27359 static PyMethodDef __pyx_methods_5pysam_9libctabix_GZIteratorHead[] = {
jpayne@68 27360 {"__next__", (PyCFunction)__pyx_specialmethod___pyx_pw_5pysam_9libctabix_14GZIteratorHead_1__next__, METH_NOARGS|METH_COEXIST, __pyx_doc_5pysam_9libctabix_14GZIteratorHead___next__},
jpayne@68 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@68 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@68 27363 {0, 0, 0, 0}
jpayne@68 27364 };
jpayne@68 27365 #if CYTHON_USE_TYPE_SPECS
jpayne@68 27366 static PyType_Slot __pyx_type_5pysam_9libctabix_GZIteratorHead_slots[] = {
jpayne@68 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@68 27368 {Py_tp_traverse, (void *)__pyx_tp_traverse_5pysam_9libctabix_GZIterator},
jpayne@68 27369 {Py_tp_clear, (void *)__pyx_tp_clear_5pysam_9libctabix_GZIterator},
jpayne@68 27370 {Py_tp_iternext, (void *)__pyx_pw_5pysam_9libctabix_14GZIteratorHead_1__next__},
jpayne@68 27371 {Py_tp_methods, (void *)__pyx_methods_5pysam_9libctabix_GZIteratorHead},
jpayne@68 27372 {Py_tp_new, (void *)__pyx_tp_new_5pysam_9libctabix_GZIteratorHead},
jpayne@68 27373 {0, 0},
jpayne@68 27374 };
jpayne@68 27375 static PyType_Spec __pyx_type_5pysam_9libctabix_GZIteratorHead_spec = {
jpayne@68 27376 "pysam.libctabix.GZIteratorHead",
jpayne@68 27377 sizeof(struct __pyx_obj_5pysam_9libctabix_GZIteratorHead),
jpayne@68 27378 0,
jpayne@68 27379 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
jpayne@68 27380 __pyx_type_5pysam_9libctabix_GZIteratorHead_slots,
jpayne@68 27381 };
jpayne@68 27382 #else
jpayne@68 27383
jpayne@68 27384 static PyTypeObject __pyx_type_5pysam_9libctabix_GZIteratorHead = {
jpayne@68 27385 PyVarObject_HEAD_INIT(0, 0)
jpayne@68 27386 "pysam.libctabix.""GZIteratorHead", /*tp_name*/
jpayne@68 27387 sizeof(struct __pyx_obj_5pysam_9libctabix_GZIteratorHead), /*tp_basicsize*/
jpayne@68 27388 0, /*tp_itemsize*/
jpayne@68 27389 __pyx_tp_dealloc_5pysam_9libctabix_GZIterator, /*tp_dealloc*/
jpayne@68 27390 #if PY_VERSION_HEX < 0x030800b4
jpayne@68 27391 0, /*tp_print*/
jpayne@68 27392 #endif
jpayne@68 27393 #if PY_VERSION_HEX >= 0x030800b4
jpayne@68 27394 0, /*tp_vectorcall_offset*/
jpayne@68 27395 #endif
jpayne@68 27396 0, /*tp_getattr*/
jpayne@68 27397 0, /*tp_setattr*/
jpayne@68 27398 #if PY_MAJOR_VERSION < 3
jpayne@68 27399 0, /*tp_compare*/
jpayne@68 27400 #endif
jpayne@68 27401 #if PY_MAJOR_VERSION >= 3
jpayne@68 27402 0, /*tp_as_async*/
jpayne@68 27403 #endif
jpayne@68 27404 0, /*tp_repr*/
jpayne@68 27405 0, /*tp_as_number*/
jpayne@68 27406 0, /*tp_as_sequence*/
jpayne@68 27407 0, /*tp_as_mapping*/
jpayne@68 27408 0, /*tp_hash*/
jpayne@68 27409 0, /*tp_call*/
jpayne@68 27410 0, /*tp_str*/
jpayne@68 27411 0, /*tp_getattro*/
jpayne@68 27412 0, /*tp_setattro*/
jpayne@68 27413 0, /*tp_as_buffer*/
jpayne@68 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@68 27415 PyDoc_STR("iterate line-by-line through gzip (or bgzip)\n compressed file returning comments at top of file.\n "), /*tp_doc*/
jpayne@68 27416 __pyx_tp_traverse_5pysam_9libctabix_GZIterator, /*tp_traverse*/
jpayne@68 27417 __pyx_tp_clear_5pysam_9libctabix_GZIterator, /*tp_clear*/
jpayne@68 27418 0, /*tp_richcompare*/
jpayne@68 27419 0, /*tp_weaklistoffset*/
jpayne@68 27420 #if CYTHON_COMPILING_IN_PYPY || 0
jpayne@68 27421 __pyx_pw_5pysam_9libctabix_10GZIterator_5__iter__, /*tp_iter*/
jpayne@68 27422 #else
jpayne@68 27423 0, /*tp_iter*/
jpayne@68 27424 #endif
jpayne@68 27425 __pyx_pw_5pysam_9libctabix_14GZIteratorHead_1__next__, /*tp_iternext*/
jpayne@68 27426 __pyx_methods_5pysam_9libctabix_GZIteratorHead, /*tp_methods*/
jpayne@68 27427 0, /*tp_members*/
jpayne@68 27428 0, /*tp_getset*/
jpayne@68 27429 0, /*tp_base*/
jpayne@68 27430 0, /*tp_dict*/
jpayne@68 27431 0, /*tp_descr_get*/
jpayne@68 27432 0, /*tp_descr_set*/
jpayne@68 27433 #if !CYTHON_USE_TYPE_SPECS
jpayne@68 27434 0, /*tp_dictoffset*/
jpayne@68 27435 #endif
jpayne@68 27436 #if CYTHON_COMPILING_IN_PYPY || 0
jpayne@68 27437 __pyx_pw_5pysam_9libctabix_10GZIterator_1__init__, /*tp_init*/
jpayne@68 27438 #else
jpayne@68 27439 0, /*tp_init*/
jpayne@68 27440 #endif
jpayne@68 27441 0, /*tp_alloc*/
jpayne@68 27442 __pyx_tp_new_5pysam_9libctabix_GZIteratorHead, /*tp_new*/
jpayne@68 27443 0, /*tp_free*/
jpayne@68 27444 0, /*tp_is_gc*/
jpayne@68 27445 0, /*tp_bases*/
jpayne@68 27446 0, /*tp_mro*/
jpayne@68 27447 0, /*tp_cache*/
jpayne@68 27448 0, /*tp_subclasses*/
jpayne@68 27449 0, /*tp_weaklist*/
jpayne@68 27450 0, /*tp_del*/
jpayne@68 27451 0, /*tp_version_tag*/
jpayne@68 27452 #if PY_VERSION_HEX >= 0x030400a1
jpayne@68 27453 #if CYTHON_USE_TP_FINALIZE
jpayne@68 27454 0, /*tp_finalize*/
jpayne@68 27455 #else
jpayne@68 27456 NULL, /*tp_finalize*/
jpayne@68 27457 #endif
jpayne@68 27458 #endif
jpayne@68 27459 #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
jpayne@68 27460 0, /*tp_vectorcall*/
jpayne@68 27461 #endif
jpayne@68 27462 #if __PYX_NEED_TP_PRINT_SLOT == 1
jpayne@68 27463 0, /*tp_print*/
jpayne@68 27464 #endif
jpayne@68 27465 #if PY_VERSION_HEX >= 0x030C0000
jpayne@68 27466 0, /*tp_watched*/
jpayne@68 27467 #endif
jpayne@68 27468 #if PY_VERSION_HEX >= 0x030d00A4
jpayne@68 27469 0, /*tp_versions_used*/
jpayne@68 27470 #endif
jpayne@68 27471 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
jpayne@68 27472 0, /*tp_pypy_flags*/
jpayne@68 27473 #endif
jpayne@68 27474 };
jpayne@68 27475 #endif
jpayne@68 27476 static struct __pyx_vtabstruct_5pysam_9libctabix_GZIteratorParsed __pyx_vtable_5pysam_9libctabix_GZIteratorParsed;
jpayne@68 27477
jpayne@68 27478 static PyObject *__pyx_tp_new_5pysam_9libctabix_GZIteratorParsed(PyTypeObject *t, PyObject *a, PyObject *k) {
jpayne@68 27479 struct __pyx_obj_5pysam_9libctabix_GZIteratorParsed *p;
jpayne@68 27480 PyObject *o = __pyx_tp_new_5pysam_9libctabix_GZIterator(t, a, k);
jpayne@68 27481 if (unlikely(!o)) return 0;
jpayne@68 27482 p = ((struct __pyx_obj_5pysam_9libctabix_GZIteratorParsed *)o);
jpayne@68 27483 p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_5pysam_9libctabix_GZIterator*)__pyx_vtabptr_5pysam_9libctabix_GZIteratorParsed;
jpayne@68 27484 p->parser = ((struct __pyx_obj_5pysam_9libctabix_Parser *)Py_None); Py_INCREF(Py_None);
jpayne@68 27485 return o;
jpayne@68 27486 }
jpayne@68 27487
jpayne@68 27488 static void __pyx_tp_dealloc_5pysam_9libctabix_GZIteratorParsed(PyObject *o) {
jpayne@68 27489 struct __pyx_obj_5pysam_9libctabix_GZIteratorParsed *p = (struct __pyx_obj_5pysam_9libctabix_GZIteratorParsed *)o;
jpayne@68 27490 #if CYTHON_USE_TP_FINALIZE
jpayne@68 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@68 27492 if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_5pysam_9libctabix_GZIteratorParsed) {
jpayne@68 27493 if (PyObject_CallFinalizerFromDealloc(o)) return;
jpayne@68 27494 }
jpayne@68 27495 }
jpayne@68 27496 #endif
jpayne@68 27497 PyObject_GC_UnTrack(o);
jpayne@68 27498 Py_CLEAR(p->parser);
jpayne@68 27499 PyObject_GC_Track(o);
jpayne@68 27500 __pyx_tp_dealloc_5pysam_9libctabix_GZIterator(o);
jpayne@68 27501 }
jpayne@68 27502
jpayne@68 27503 static int __pyx_tp_traverse_5pysam_9libctabix_GZIteratorParsed(PyObject *o, visitproc v, void *a) {
jpayne@68 27504 int e;
jpayne@68 27505 struct __pyx_obj_5pysam_9libctabix_GZIteratorParsed *p = (struct __pyx_obj_5pysam_9libctabix_GZIteratorParsed *)o;
jpayne@68 27506 e = __pyx_tp_traverse_5pysam_9libctabix_GZIterator(o, v, a); if (e) return e;
jpayne@68 27507 if (p->parser) {
jpayne@68 27508 e = (*v)(((PyObject *)p->parser), a); if (e) return e;
jpayne@68 27509 }
jpayne@68 27510 return 0;
jpayne@68 27511 }
jpayne@68 27512
jpayne@68 27513 static int __pyx_tp_clear_5pysam_9libctabix_GZIteratorParsed(PyObject *o) {
jpayne@68 27514 PyObject* tmp;
jpayne@68 27515 struct __pyx_obj_5pysam_9libctabix_GZIteratorParsed *p = (struct __pyx_obj_5pysam_9libctabix_GZIteratorParsed *)o;
jpayne@68 27516 __pyx_tp_clear_5pysam_9libctabix_GZIterator(o);
jpayne@68 27517 tmp = ((PyObject*)p->parser);
jpayne@68 27518 p->parser = ((struct __pyx_obj_5pysam_9libctabix_Parser *)Py_None); Py_INCREF(Py_None);
jpayne@68 27519 Py_XDECREF(tmp);
jpayne@68 27520 return 0;
jpayne@68 27521 }
jpayne@68 27522
jpayne@68 27523 static PyObject *__pyx_specialmethod___pyx_pw_5pysam_9libctabix_16GZIteratorParsed_3__next__(PyObject *self, CYTHON_UNUSED PyObject *arg) {
jpayne@68 27524 PyObject *res = __pyx_pw_5pysam_9libctabix_16GZIteratorParsed_3__next__(self);
jpayne@68 27525 if (!res && !PyErr_Occurred()) { PyErr_SetNone(PyExc_StopIteration); }
jpayne@68 27526 return res;
jpayne@68 27527 }
jpayne@68 27528
jpayne@68 27529 static PyMethodDef __pyx_methods_5pysam_9libctabix_GZIteratorParsed[] = {
jpayne@68 27530 {"__next__", (PyCFunction)__pyx_specialmethod___pyx_pw_5pysam_9libctabix_16GZIteratorParsed_3__next__, METH_NOARGS|METH_COEXIST, __pyx_doc_5pysam_9libctabix_16GZIteratorParsed_2__next__},
jpayne@68 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@68 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@68 27533 {0, 0, 0, 0}
jpayne@68 27534 };
jpayne@68 27535 #if CYTHON_USE_TYPE_SPECS
jpayne@68 27536 static PyType_Slot __pyx_type_5pysam_9libctabix_GZIteratorParsed_slots[] = {
jpayne@68 27537 {Py_tp_dealloc, (void *)__pyx_tp_dealloc_5pysam_9libctabix_GZIteratorParsed},
jpayne@68 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@68 27539 {Py_tp_traverse, (void *)__pyx_tp_traverse_5pysam_9libctabix_GZIteratorParsed},
jpayne@68 27540 {Py_tp_clear, (void *)__pyx_tp_clear_5pysam_9libctabix_GZIteratorParsed},
jpayne@68 27541 {Py_tp_iternext, (void *)__pyx_pw_5pysam_9libctabix_16GZIteratorParsed_3__next__},
jpayne@68 27542 {Py_tp_methods, (void *)__pyx_methods_5pysam_9libctabix_GZIteratorParsed},
jpayne@68 27543 {Py_tp_init, (void *)__pyx_pw_5pysam_9libctabix_16GZIteratorParsed_1__init__},
jpayne@68 27544 {Py_tp_new, (void *)__pyx_tp_new_5pysam_9libctabix_GZIteratorParsed},
jpayne@68 27545 {0, 0},
jpayne@68 27546 };
jpayne@68 27547 static PyType_Spec __pyx_type_5pysam_9libctabix_GZIteratorParsed_spec = {
jpayne@68 27548 "pysam.libctabix.GZIteratorParsed",
jpayne@68 27549 sizeof(struct __pyx_obj_5pysam_9libctabix_GZIteratorParsed),
jpayne@68 27550 0,
jpayne@68 27551 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
jpayne@68 27552 __pyx_type_5pysam_9libctabix_GZIteratorParsed_slots,
jpayne@68 27553 };
jpayne@68 27554 #else
jpayne@68 27555
jpayne@68 27556 static PyTypeObject __pyx_type_5pysam_9libctabix_GZIteratorParsed = {
jpayne@68 27557 PyVarObject_HEAD_INIT(0, 0)
jpayne@68 27558 "pysam.libctabix.""GZIteratorParsed", /*tp_name*/
jpayne@68 27559 sizeof(struct __pyx_obj_5pysam_9libctabix_GZIteratorParsed), /*tp_basicsize*/
jpayne@68 27560 0, /*tp_itemsize*/
jpayne@68 27561 __pyx_tp_dealloc_5pysam_9libctabix_GZIteratorParsed, /*tp_dealloc*/
jpayne@68 27562 #if PY_VERSION_HEX < 0x030800b4
jpayne@68 27563 0, /*tp_print*/
jpayne@68 27564 #endif
jpayne@68 27565 #if PY_VERSION_HEX >= 0x030800b4
jpayne@68 27566 0, /*tp_vectorcall_offset*/
jpayne@68 27567 #endif
jpayne@68 27568 0, /*tp_getattr*/
jpayne@68 27569 0, /*tp_setattr*/
jpayne@68 27570 #if PY_MAJOR_VERSION < 3
jpayne@68 27571 0, /*tp_compare*/
jpayne@68 27572 #endif
jpayne@68 27573 #if PY_MAJOR_VERSION >= 3
jpayne@68 27574 0, /*tp_as_async*/
jpayne@68 27575 #endif
jpayne@68 27576 0, /*tp_repr*/
jpayne@68 27577 0, /*tp_as_number*/
jpayne@68 27578 0, /*tp_as_sequence*/
jpayne@68 27579 0, /*tp_as_mapping*/
jpayne@68 27580 0, /*tp_hash*/
jpayne@68 27581 0, /*tp_call*/
jpayne@68 27582 0, /*tp_str*/
jpayne@68 27583 0, /*tp_getattro*/
jpayne@68 27584 0, /*tp_setattro*/
jpayne@68 27585 0, /*tp_as_buffer*/
jpayne@68 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@68 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@68 27588 __pyx_tp_traverse_5pysam_9libctabix_GZIteratorParsed, /*tp_traverse*/
jpayne@68 27589 __pyx_tp_clear_5pysam_9libctabix_GZIteratorParsed, /*tp_clear*/
jpayne@68 27590 0, /*tp_richcompare*/
jpayne@68 27591 0, /*tp_weaklistoffset*/
jpayne@68 27592 #if CYTHON_COMPILING_IN_PYPY || 0
jpayne@68 27593 __pyx_pw_5pysam_9libctabix_10GZIterator_5__iter__, /*tp_iter*/
jpayne@68 27594 #else
jpayne@68 27595 0, /*tp_iter*/
jpayne@68 27596 #endif
jpayne@68 27597 __pyx_pw_5pysam_9libctabix_16GZIteratorParsed_3__next__, /*tp_iternext*/
jpayne@68 27598 __pyx_methods_5pysam_9libctabix_GZIteratorParsed, /*tp_methods*/
jpayne@68 27599 0, /*tp_members*/
jpayne@68 27600 0, /*tp_getset*/
jpayne@68 27601 0, /*tp_base*/
jpayne@68 27602 0, /*tp_dict*/
jpayne@68 27603 0, /*tp_descr_get*/
jpayne@68 27604 0, /*tp_descr_set*/
jpayne@68 27605 #if !CYTHON_USE_TYPE_SPECS
jpayne@68 27606 0, /*tp_dictoffset*/
jpayne@68 27607 #endif
jpayne@68 27608 __pyx_pw_5pysam_9libctabix_16GZIteratorParsed_1__init__, /*tp_init*/
jpayne@68 27609 0, /*tp_alloc*/
jpayne@68 27610 __pyx_tp_new_5pysam_9libctabix_GZIteratorParsed, /*tp_new*/
jpayne@68 27611 0, /*tp_free*/
jpayne@68 27612 0, /*tp_is_gc*/
jpayne@68 27613 0, /*tp_bases*/
jpayne@68 27614 0, /*tp_mro*/
jpayne@68 27615 0, /*tp_cache*/
jpayne@68 27616 0, /*tp_subclasses*/
jpayne@68 27617 0, /*tp_weaklist*/
jpayne@68 27618 0, /*tp_del*/
jpayne@68 27619 0, /*tp_version_tag*/
jpayne@68 27620 #if PY_VERSION_HEX >= 0x030400a1
jpayne@68 27621 #if CYTHON_USE_TP_FINALIZE
jpayne@68 27622 0, /*tp_finalize*/
jpayne@68 27623 #else
jpayne@68 27624 NULL, /*tp_finalize*/
jpayne@68 27625 #endif
jpayne@68 27626 #endif
jpayne@68 27627 #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
jpayne@68 27628 0, /*tp_vectorcall*/
jpayne@68 27629 #endif
jpayne@68 27630 #if __PYX_NEED_TP_PRINT_SLOT == 1
jpayne@68 27631 0, /*tp_print*/
jpayne@68 27632 #endif
jpayne@68 27633 #if PY_VERSION_HEX >= 0x030C0000
jpayne@68 27634 0, /*tp_watched*/
jpayne@68 27635 #endif
jpayne@68 27636 #if PY_VERSION_HEX >= 0x030d00A4
jpayne@68 27637 0, /*tp_versions_used*/
jpayne@68 27638 #endif
jpayne@68 27639 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
jpayne@68 27640 0, /*tp_pypy_flags*/
jpayne@68 27641 #endif
jpayne@68 27642 };
jpayne@68 27643 #endif
jpayne@68 27644 static struct __pyx_vtabstruct_5pysam_9libctabix_Tabixfile __pyx_vtable_5pysam_9libctabix_Tabixfile;
jpayne@68 27645
jpayne@68 27646 static PyObject *__pyx_tp_new_5pysam_9libctabix_Tabixfile(PyTypeObject *t, PyObject *a, PyObject *k) {
jpayne@68 27647 struct __pyx_obj_5pysam_9libctabix_Tabixfile *p;
jpayne@68 27648 PyObject *o = __pyx_tp_new_5pysam_9libctabix_TabixFile(t, a, k);
jpayne@68 27649 if (unlikely(!o)) return 0;
jpayne@68 27650 p = ((struct __pyx_obj_5pysam_9libctabix_Tabixfile *)o);
jpayne@68 27651 p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_5pysam_10libchtslib_HTSFile*)__pyx_vtabptr_5pysam_9libctabix_Tabixfile;
jpayne@68 27652 return o;
jpayne@68 27653 }
jpayne@68 27654
jpayne@68 27655 static PyMethodDef __pyx_methods_5pysam_9libctabix_Tabixfile[] = {
jpayne@68 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@68 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@68 27658 {0, 0, 0, 0}
jpayne@68 27659 };
jpayne@68 27660 #if CYTHON_USE_TYPE_SPECS
jpayne@68 27661 static PyType_Slot __pyx_type_5pysam_9libctabix_Tabixfile_slots[] = {
jpayne@68 27662 {Py_tp_doc, (void *)PyDoc_STR("Tabixfile is deprecated: use TabixFile instead")},
jpayne@68 27663 {Py_tp_traverse, (void *)__pyx_tp_traverse_5pysam_9libctabix_TabixFile},
jpayne@68 27664 {Py_tp_clear, (void *)__pyx_tp_clear_5pysam_9libctabix_TabixFile},
jpayne@68 27665 {Py_tp_methods, (void *)__pyx_methods_5pysam_9libctabix_Tabixfile},
jpayne@68 27666 {Py_tp_new, (void *)__pyx_tp_new_5pysam_9libctabix_Tabixfile},
jpayne@68 27667 {0, 0},
jpayne@68 27668 };
jpayne@68 27669 static PyType_Spec __pyx_type_5pysam_9libctabix_Tabixfile_spec = {
jpayne@68 27670 "pysam.libctabix.Tabixfile",
jpayne@68 27671 sizeof(struct __pyx_obj_5pysam_9libctabix_Tabixfile),
jpayne@68 27672 0,
jpayne@68 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@68 27674 __pyx_type_5pysam_9libctabix_Tabixfile_slots,
jpayne@68 27675 };
jpayne@68 27676 #else
jpayne@68 27677
jpayne@68 27678 static PyTypeObject __pyx_type_5pysam_9libctabix_Tabixfile = {
jpayne@68 27679 PyVarObject_HEAD_INIT(0, 0)
jpayne@68 27680 "pysam.libctabix.""Tabixfile", /*tp_name*/
jpayne@68 27681 sizeof(struct __pyx_obj_5pysam_9libctabix_Tabixfile), /*tp_basicsize*/
jpayne@68 27682 0, /*tp_itemsize*/
jpayne@68 27683 __pyx_tp_dealloc_5pysam_9libctabix_TabixFile, /*tp_dealloc*/
jpayne@68 27684 #if PY_VERSION_HEX < 0x030800b4
jpayne@68 27685 0, /*tp_print*/
jpayne@68 27686 #endif
jpayne@68 27687 #if PY_VERSION_HEX >= 0x030800b4
jpayne@68 27688 0, /*tp_vectorcall_offset*/
jpayne@68 27689 #endif
jpayne@68 27690 0, /*tp_getattr*/
jpayne@68 27691 0, /*tp_setattr*/
jpayne@68 27692 #if PY_MAJOR_VERSION < 3
jpayne@68 27693 0, /*tp_compare*/
jpayne@68 27694 #endif
jpayne@68 27695 #if PY_MAJOR_VERSION >= 3
jpayne@68 27696 0, /*tp_as_async*/
jpayne@68 27697 #endif
jpayne@68 27698 0, /*tp_repr*/
jpayne@68 27699 0, /*tp_as_number*/
jpayne@68 27700 0, /*tp_as_sequence*/
jpayne@68 27701 0, /*tp_as_mapping*/
jpayne@68 27702 0, /*tp_hash*/
jpayne@68 27703 0, /*tp_call*/
jpayne@68 27704 0, /*tp_str*/
jpayne@68 27705 0, /*tp_getattro*/
jpayne@68 27706 0, /*tp_setattro*/
jpayne@68 27707 0, /*tp_as_buffer*/
jpayne@68 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@68 27709 PyDoc_STR("Tabixfile is deprecated: use TabixFile instead"), /*tp_doc*/
jpayne@68 27710 __pyx_tp_traverse_5pysam_9libctabix_TabixFile, /*tp_traverse*/
jpayne@68 27711 __pyx_tp_clear_5pysam_9libctabix_TabixFile, /*tp_clear*/
jpayne@68 27712 0, /*tp_richcompare*/
jpayne@68 27713 0, /*tp_weaklistoffset*/
jpayne@68 27714 0, /*tp_iter*/
jpayne@68 27715 0, /*tp_iternext*/
jpayne@68 27716 __pyx_methods_5pysam_9libctabix_Tabixfile, /*tp_methods*/
jpayne@68 27717 0, /*tp_members*/
jpayne@68 27718 0, /*tp_getset*/
jpayne@68 27719 0, /*tp_base*/
jpayne@68 27720 0, /*tp_dict*/
jpayne@68 27721 0, /*tp_descr_get*/
jpayne@68 27722 0, /*tp_descr_set*/
jpayne@68 27723 #if !CYTHON_USE_TYPE_SPECS
jpayne@68 27724 0, /*tp_dictoffset*/
jpayne@68 27725 #endif
jpayne@68 27726 0, /*tp_init*/
jpayne@68 27727 0, /*tp_alloc*/
jpayne@68 27728 __pyx_tp_new_5pysam_9libctabix_Tabixfile, /*tp_new*/
jpayne@68 27729 0, /*tp_free*/
jpayne@68 27730 0, /*tp_is_gc*/
jpayne@68 27731 0, /*tp_bases*/
jpayne@68 27732 0, /*tp_mro*/
jpayne@68 27733 0, /*tp_cache*/
jpayne@68 27734 0, /*tp_subclasses*/
jpayne@68 27735 0, /*tp_weaklist*/
jpayne@68 27736 0, /*tp_del*/
jpayne@68 27737 0, /*tp_version_tag*/
jpayne@68 27738 #if PY_VERSION_HEX >= 0x030400a1
jpayne@68 27739 #if CYTHON_USE_TP_FINALIZE
jpayne@68 27740 0, /*tp_finalize*/
jpayne@68 27741 #else
jpayne@68 27742 NULL, /*tp_finalize*/
jpayne@68 27743 #endif
jpayne@68 27744 #endif
jpayne@68 27745 #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
jpayne@68 27746 0, /*tp_vectorcall*/
jpayne@68 27747 #endif
jpayne@68 27748 #if __PYX_NEED_TP_PRINT_SLOT == 1
jpayne@68 27749 0, /*tp_print*/
jpayne@68 27750 #endif
jpayne@68 27751 #if PY_VERSION_HEX >= 0x030C0000
jpayne@68 27752 0, /*tp_watched*/
jpayne@68 27753 #endif
jpayne@68 27754 #if PY_VERSION_HEX >= 0x030d00A4
jpayne@68 27755 0, /*tp_versions_used*/
jpayne@68 27756 #endif
jpayne@68 27757 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
jpayne@68 27758 0, /*tp_pypy_flags*/
jpayne@68 27759 #endif
jpayne@68 27760 };
jpayne@68 27761 #endif
jpayne@68 27762
jpayne@68 27763 static PyMethodDef __pyx_methods[] = {
jpayne@68 27764 {0, 0, 0, 0}
jpayne@68 27765 };
jpayne@68 27766 #ifndef CYTHON_SMALL_CODE
jpayne@68 27767 #if defined(__clang__)
jpayne@68 27768 #define CYTHON_SMALL_CODE
jpayne@68 27769 #elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))
jpayne@68 27770 #define CYTHON_SMALL_CODE __attribute__((cold))
jpayne@68 27771 #else
jpayne@68 27772 #define CYTHON_SMALL_CODE
jpayne@68 27773 #endif
jpayne@68 27774 #endif
jpayne@68 27775 /* #### Code section: pystring_table ### */
jpayne@68 27776
jpayne@68 27777 static int __Pyx_CreateStringTabAndInitStrings(void) {
jpayne@68 27778 __Pyx_StringTabEntry __pyx_string_tab[] = {
jpayne@68 27779 {&__pyx_n_s_AssertionError, __pyx_k_AssertionError, sizeof(__pyx_k_AssertionError), 0, 0, 1, 1},
jpayne@68 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@68 27781 {&__pyx_n_s_EmptyIterator, __pyx_k_EmptyIterator, sizeof(__pyx_k_EmptyIterator), 0, 0, 1, 1},
jpayne@68 27782 {&__pyx_n_s_EmptyIterator___iter, __pyx_k_EmptyIterator___iter, sizeof(__pyx_k_EmptyIterator___iter), 0, 0, 1, 1},
jpayne@68 27783 {&__pyx_n_s_EmptyIterator___next, __pyx_k_EmptyIterator___next, sizeof(__pyx_k_EmptyIterator___next), 0, 0, 1, 1},
jpayne@68 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@68 27785 {&__pyx_n_s_GZIterator, __pyx_k_GZIterator, sizeof(__pyx_k_GZIterator), 0, 0, 1, 1},
jpayne@68 27786 {&__pyx_n_u_GZIterator, __pyx_k_GZIterator, sizeof(__pyx_k_GZIterator), 0, 1, 0, 1},
jpayne@68 27787 {&__pyx_n_s_GZIteratorHead, __pyx_k_GZIteratorHead, sizeof(__pyx_k_GZIteratorHead), 0, 0, 1, 1},
jpayne@68 27788 {&__pyx_n_u_GZIteratorHead, __pyx_k_GZIteratorHead, sizeof(__pyx_k_GZIteratorHead), 0, 1, 0, 1},
jpayne@68 27789 {&__pyx_n_s_GZIteratorHead___reduce_cython, __pyx_k_GZIteratorHead___reduce_cython, sizeof(__pyx_k_GZIteratorHead___reduce_cython), 0, 0, 1, 1},
jpayne@68 27790 {&__pyx_n_s_GZIteratorHead___setstate_cython, __pyx_k_GZIteratorHead___setstate_cython, sizeof(__pyx_k_GZIteratorHead___setstate_cython), 0, 0, 1, 1},
jpayne@68 27791 {&__pyx_n_s_GZIteratorParsed, __pyx_k_GZIteratorParsed, sizeof(__pyx_k_GZIteratorParsed), 0, 0, 1, 1},
jpayne@68 27792 {&__pyx_n_s_GZIteratorParsed___reduce_cython, __pyx_k_GZIteratorParsed___reduce_cython, sizeof(__pyx_k_GZIteratorParsed___reduce_cython), 0, 0, 1, 1},
jpayne@68 27793 {&__pyx_n_s_GZIteratorParsed___setstate_cyth, __pyx_k_GZIteratorParsed___setstate_cyth, sizeof(__pyx_k_GZIteratorParsed___setstate_cyth), 0, 0, 1, 1},
jpayne@68 27794 {&__pyx_n_s_GZIterator___reduce_cython, __pyx_k_GZIterator___reduce_cython, sizeof(__pyx_k_GZIterator___reduce_cython), 0, 0, 1, 1},
jpayne@68 27795 {&__pyx_n_s_GZIterator___setstate_cython, __pyx_k_GZIterator___setstate_cython, sizeof(__pyx_k_GZIterator___setstate_cython), 0, 0, 1, 1},
jpayne@68 27796 {&__pyx_n_s_IOError, __pyx_k_IOError, sizeof(__pyx_k_IOError), 0, 0, 1, 1},
jpayne@68 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@68 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@68 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@68 27800 {&__pyx_n_s_KeyError, __pyx_k_KeyError, sizeof(__pyx_k_KeyError), 0, 0, 1, 1},
jpayne@68 27801 {&__pyx_n_s_MemoryError, __pyx_k_MemoryError, sizeof(__pyx_k_MemoryError), 0, 0, 1, 1},
jpayne@68 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@68 27803 {&__pyx_n_s_NotImplementedError, __pyx_k_NotImplementedError, sizeof(__pyx_k_NotImplementedError), 0, 0, 1, 1},
jpayne@68 27804 {&__pyx_n_s_OSError, __pyx_k_OSError, sizeof(__pyx_k_OSError), 0, 0, 1, 1},
jpayne@68 27805 {&__pyx_n_s_O_RDONLY, __pyx_k_O_RDONLY, sizeof(__pyx_k_O_RDONLY), 0, 0, 1, 1},
jpayne@68 27806 {&__pyx_n_s_Parser, __pyx_k_Parser, sizeof(__pyx_k_Parser), 0, 0, 1, 1},
jpayne@68 27807 {&__pyx_n_s_Parser___reduce_cython, __pyx_k_Parser___reduce_cython, sizeof(__pyx_k_Parser___reduce_cython), 0, 0, 1, 1},
jpayne@68 27808 {&__pyx_n_s_Parser___setstate_cython, __pyx_k_Parser___setstate_cython, sizeof(__pyx_k_Parser___setstate_cython), 0, 0, 1, 1},
jpayne@68 27809 {&__pyx_n_s_Parser_get_encoding, __pyx_k_Parser_get_encoding, sizeof(__pyx_k_Parser_get_encoding), 0, 0, 1, 1},
jpayne@68 27810 {&__pyx_n_s_Parser_set_encoding, __pyx_k_Parser_set_encoding, sizeof(__pyx_k_Parser_set_encoding), 0, 0, 1, 1},
jpayne@68 27811 {&__pyx_n_s_PickleError, __pyx_k_PickleError, sizeof(__pyx_k_PickleError), 0, 0, 1, 1},
jpayne@68 27812 {&__pyx_n_s_StopIteration, __pyx_k_StopIteration, sizeof(__pyx_k_StopIteration), 0, 0, 1, 1},
jpayne@68 27813 {&__pyx_n_s_TabixFile, __pyx_k_TabixFile, sizeof(__pyx_k_TabixFile), 0, 0, 1, 1},
jpayne@68 27814 {&__pyx_n_u_TabixFile, __pyx_k_TabixFile, sizeof(__pyx_k_TabixFile), 0, 1, 0, 1},
jpayne@68 27815 {&__pyx_n_s_TabixFile___reduce_cython, __pyx_k_TabixFile___reduce_cython, sizeof(__pyx_k_TabixFile___reduce_cython), 0, 0, 1, 1},
jpayne@68 27816 {&__pyx_n_s_TabixFile___setstate_cython, __pyx_k_TabixFile___setstate_cython, sizeof(__pyx_k_TabixFile___setstate_cython), 0, 0, 1, 1},
jpayne@68 27817 {&__pyx_n_s_TabixFile__dup, __pyx_k_TabixFile__dup, sizeof(__pyx_k_TabixFile__dup), 0, 0, 1, 1},
jpayne@68 27818 {&__pyx_n_s_TabixFile__open, __pyx_k_TabixFile__open, sizeof(__pyx_k_TabixFile__open), 0, 0, 1, 1},
jpayne@68 27819 {&__pyx_n_s_TabixFile_close, __pyx_k_TabixFile_close, sizeof(__pyx_k_TabixFile_close), 0, 0, 1, 1},
jpayne@68 27820 {&__pyx_n_s_TabixFile_fetch, __pyx_k_TabixFile_fetch, sizeof(__pyx_k_TabixFile_fetch), 0, 0, 1, 1},
jpayne@68 27821 {&__pyx_n_s_TabixIterator, __pyx_k_TabixIterator, sizeof(__pyx_k_TabixIterator), 0, 0, 1, 1},
jpayne@68 27822 {&__pyx_n_s_TabixIteratorParsed, __pyx_k_TabixIteratorParsed, sizeof(__pyx_k_TabixIteratorParsed), 0, 0, 1, 1},
jpayne@68 27823 {&__pyx_n_s_TabixIteratorParsed___reduce_cyt, __pyx_k_TabixIteratorParsed___reduce_cyt, sizeof(__pyx_k_TabixIteratorParsed___reduce_cyt), 0, 0, 1, 1},
jpayne@68 27824 {&__pyx_n_s_TabixIteratorParsed___setstate_c, __pyx_k_TabixIteratorParsed___setstate_c, sizeof(__pyx_k_TabixIteratorParsed___setstate_c), 0, 0, 1, 1},
jpayne@68 27825 {&__pyx_n_s_TabixIterator___reduce_cython, __pyx_k_TabixIterator___reduce_cython, sizeof(__pyx_k_TabixIterator___reduce_cython), 0, 0, 1, 1},
jpayne@68 27826 {&__pyx_n_s_TabixIterator___setstate_cython, __pyx_k_TabixIterator___setstate_cython, sizeof(__pyx_k_TabixIterator___setstate_cython), 0, 0, 1, 1},
jpayne@68 27827 {&__pyx_n_s_Tabixfile, __pyx_k_Tabixfile, sizeof(__pyx_k_Tabixfile), 0, 0, 1, 1},
jpayne@68 27828 {&__pyx_n_u_Tabixfile, __pyx_k_Tabixfile, sizeof(__pyx_k_Tabixfile), 0, 1, 0, 1},
jpayne@68 27829 {&__pyx_n_s_Tabixfile___reduce_cython, __pyx_k_Tabixfile___reduce_cython, sizeof(__pyx_k_Tabixfile___reduce_cython), 0, 0, 1, 1},
jpayne@68 27830 {&__pyx_n_s_Tabixfile___setstate_cython, __pyx_k_Tabixfile___setstate_cython, sizeof(__pyx_k_Tabixfile___setstate_cython), 0, 0, 1, 1},
jpayne@68 27831 {&__pyx_n_s_TypeError, __pyx_k_TypeError, sizeof(__pyx_k_TypeError), 0, 0, 1, 1},
jpayne@68 27832 {&__pyx_n_s_ValueError, __pyx_k_ValueError, sizeof(__pyx_k_ValueError), 0, 0, 1, 1},
jpayne@68 27833 {&__pyx_n_s_WINDOW_SIZE, __pyx_k_WINDOW_SIZE, sizeof(__pyx_k_WINDOW_SIZE), 0, 0, 1, 1},
jpayne@68 27834 {&__pyx_kp_b__16, __pyx_k__16, sizeof(__pyx_k__16), 0, 0, 0, 0},
jpayne@68 27835 {&__pyx_kp_u__39, __pyx_k__39, sizeof(__pyx_k__39), 0, 1, 0, 0},
jpayne@68 27836 {&__pyx_kp_u__42, __pyx_k__42, sizeof(__pyx_k__42), 0, 1, 0, 0},
jpayne@68 27837 {&__pyx_kp_u__43, __pyx_k__43, sizeof(__pyx_k__43), 0, 1, 0, 0},
jpayne@68 27838 {&__pyx_kp_u__44, __pyx_k__44, sizeof(__pyx_k__44), 0, 1, 0, 0},
jpayne@68 27839 {&__pyx_kp_u__56, __pyx_k__56, sizeof(__pyx_k__56), 0, 1, 0, 0},
jpayne@68 27840 {&__pyx_n_s__62, __pyx_k__62, sizeof(__pyx_k__62), 0, 0, 1, 1},
jpayne@68 27841 {&__pyx_n_s__78, __pyx_k__78, sizeof(__pyx_k__78), 0, 0, 1, 1},
jpayne@68 27842 {&__pyx_n_s_a, __pyx_k_a, sizeof(__pyx_k_a), 0, 0, 1, 1},
jpayne@68 27843 {&__pyx_n_s_all, __pyx_k_all, sizeof(__pyx_k_all), 0, 0, 1, 1},
jpayne@68 27844 {&__pyx_n_s_asBed, __pyx_k_asBed, sizeof(__pyx_k_asBed), 0, 0, 1, 1},
jpayne@68 27845 {&__pyx_n_u_asBed, __pyx_k_asBed, sizeof(__pyx_k_asBed), 0, 1, 0, 1},
jpayne@68 27846 {&__pyx_n_s_asBed___reduce_cython, __pyx_k_asBed___reduce_cython, sizeof(__pyx_k_asBed___reduce_cython), 0, 0, 1, 1},
jpayne@68 27847 {&__pyx_n_s_asBed___setstate_cython, __pyx_k_asBed___setstate_cython, sizeof(__pyx_k_asBed___setstate_cython), 0, 0, 1, 1},
jpayne@68 27848 {&__pyx_n_s_asGFF3, __pyx_k_asGFF3, sizeof(__pyx_k_asGFF3), 0, 0, 1, 1},
jpayne@68 27849 {&__pyx_n_u_asGFF3, __pyx_k_asGFF3, sizeof(__pyx_k_asGFF3), 0, 1, 0, 1},
jpayne@68 27850 {&__pyx_n_s_asGFF3___reduce_cython, __pyx_k_asGFF3___reduce_cython, sizeof(__pyx_k_asGFF3___reduce_cython), 0, 0, 1, 1},
jpayne@68 27851 {&__pyx_n_s_asGFF3___setstate_cython, __pyx_k_asGFF3___setstate_cython, sizeof(__pyx_k_asGFF3___setstate_cython), 0, 0, 1, 1},
jpayne@68 27852 {&__pyx_n_s_asGTF, __pyx_k_asGTF, sizeof(__pyx_k_asGTF), 0, 0, 1, 1},
jpayne@68 27853 {&__pyx_n_u_asGTF, __pyx_k_asGTF, sizeof(__pyx_k_asGTF), 0, 1, 0, 1},
jpayne@68 27854 {&__pyx_n_s_asGTF___reduce_cython, __pyx_k_asGTF___reduce_cython, sizeof(__pyx_k_asGTF___reduce_cython), 0, 0, 1, 1},
jpayne@68 27855 {&__pyx_n_s_asGTF___setstate_cython, __pyx_k_asGTF___setstate_cython, sizeof(__pyx_k_asGTF___setstate_cython), 0, 0, 1, 1},
jpayne@68 27856 {&__pyx_n_s_asTuple, __pyx_k_asTuple, sizeof(__pyx_k_asTuple), 0, 0, 1, 1},
jpayne@68 27857 {&__pyx_n_u_asTuple, __pyx_k_asTuple, sizeof(__pyx_k_asTuple), 0, 1, 0, 1},
jpayne@68 27858 {&__pyx_n_s_asTuple___reduce_cython, __pyx_k_asTuple___reduce_cython, sizeof(__pyx_k_asTuple___reduce_cython), 0, 0, 1, 1},
jpayne@68 27859 {&__pyx_n_s_asTuple___setstate_cython, __pyx_k_asTuple___setstate_cython, sizeof(__pyx_k_asTuple___setstate_cython), 0, 0, 1, 1},
jpayne@68 27860 {&__pyx_n_s_asVCF, __pyx_k_asVCF, sizeof(__pyx_k_asVCF), 0, 0, 1, 1},
jpayne@68 27861 {&__pyx_n_u_asVCF, __pyx_k_asVCF, sizeof(__pyx_k_asVCF), 0, 1, 0, 1},
jpayne@68 27862 {&__pyx_n_s_asVCF___reduce_cython, __pyx_k_asVCF___reduce_cython, sizeof(__pyx_k_asVCF___reduce_cython), 0, 0, 1, 1},
jpayne@68 27863 {&__pyx_n_s_asVCF___setstate_cython, __pyx_k_asVCF___setstate_cython, sizeof(__pyx_k_asVCF___setstate_cython), 0, 0, 1, 1},
jpayne@68 27864 {&__pyx_n_u_ascii, __pyx_k_ascii, sizeof(__pyx_k_ascii), 0, 1, 0, 1},
jpayne@68 27865 {&__pyx_n_s_asyncio_coroutines, __pyx_k_asyncio_coroutines, sizeof(__pyx_k_asyncio_coroutines), 0, 0, 1, 1},
jpayne@68 27866 {&__pyx_n_s_b, __pyx_k_b, sizeof(__pyx_k_b), 0, 0, 1, 1},
jpayne@68 27867 {&__pyx_n_u_bcf, __pyx_k_bcf, sizeof(__pyx_k_bcf), 0, 1, 0, 1},
jpayne@68 27868 {&__pyx_n_u_bed, __pyx_k_bed, sizeof(__pyx_k_bed), 0, 1, 0, 1},
jpayne@68 27869 {&__pyx_n_s_buffer, __pyx_k_buffer, sizeof(__pyx_k_buffer), 0, 0, 1, 1},
jpayne@68 27870 {&__pyx_n_s_buffer_size, __pyx_k_buffer_size, sizeof(__pyx_k_buffer_size), 0, 0, 1, 1},
jpayne@68 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@68 27872 {&__pyx_n_s_bytes_cpy, __pyx_k_bytes_cpy, sizeof(__pyx_k_bytes_cpy), 0, 0, 1, 1},
jpayne@68 27873 {&__pyx_n_s_c, __pyx_k_c, sizeof(__pyx_k_c), 0, 0, 1, 1},
jpayne@68 27874 {&__pyx_n_s_cfilename, __pyx_k_cfilename, sizeof(__pyx_k_cfilename), 0, 0, 1, 1},
jpayne@68 27875 {&__pyx_n_s_cfilename_index, __pyx_k_cfilename_index, sizeof(__pyx_k_cfilename_index), 0, 0, 1, 1},
jpayne@68 27876 {&__pyx_n_s_cfn, __pyx_k_cfn, sizeof(__pyx_k_cfn), 0, 0, 1, 1},
jpayne@68 27877 {&__pyx_n_s_cline_in_traceback, __pyx_k_cline_in_traceback, sizeof(__pyx_k_cline_in_traceback), 0, 0, 1, 1},
jpayne@68 27878 {&__pyx_n_s_close, __pyx_k_close, sizeof(__pyx_k_close), 0, 0, 1, 1},
jpayne@68 27879 {&__pyx_n_s_closed, __pyx_k_closed, sizeof(__pyx_k_closed), 0, 0, 1, 1},
jpayne@68 27880 {&__pyx_n_s_conf, __pyx_k_conf, sizeof(__pyx_k_conf), 0, 0, 1, 1},
jpayne@68 27881 {&__pyx_n_s_conf_data, __pyx_k_conf_data, sizeof(__pyx_k_conf_data), 0, 0, 1, 1},
jpayne@68 27882 {&__pyx_n_s_contigs, __pyx_k_contigs, sizeof(__pyx_k_contigs), 0, 0, 1, 1},
jpayne@68 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@68 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@68 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@68 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@68 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@68 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@68 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@68 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@68 27891 {&__pyx_n_s_cpy, __pyx_k_cpy, sizeof(__pyx_k_cpy), 0, 0, 1, 1},
jpayne@68 27892 {&__pyx_n_s_csi, __pyx_k_csi, sizeof(__pyx_k_csi), 0, 0, 1, 1},
jpayne@68 27893 {&__pyx_kp_u_csi_2, __pyx_k_csi_2, sizeof(__pyx_k_csi_2), 0, 1, 0, 0},
jpayne@68 27894 {&__pyx_n_s_cstr, __pyx_k_cstr, sizeof(__pyx_k_cstr), 0, 0, 1, 1},
jpayne@68 27895 {&__pyx_n_s_dict, __pyx_k_dict, sizeof(__pyx_k_dict), 0, 0, 1, 1},
jpayne@68 27896 {&__pyx_n_s_dict_2, __pyx_k_dict_2, sizeof(__pyx_k_dict_2), 0, 0, 1, 1},
jpayne@68 27897 {&__pyx_kp_u_disable, __pyx_k_disable, sizeof(__pyx_k_disable), 0, 1, 0, 0},
jpayne@68 27898 {&__pyx_n_s_doc, __pyx_k_doc, sizeof(__pyx_k_doc), 0, 0, 1, 1},
jpayne@68 27899 {&__pyx_n_s_dup, __pyx_k_dup, sizeof(__pyx_k_dup), 0, 0, 1, 1},
jpayne@68 27900 {&__pyx_kp_s_empty_iterator, __pyx_k_empty_iterator, sizeof(__pyx_k_empty_iterator), 0, 0, 1, 0},
jpayne@68 27901 {&__pyx_kp_u_enable, __pyx_k_enable, sizeof(__pyx_k_enable), 0, 1, 0, 0},
jpayne@68 27902 {&__pyx_n_s_encoding, __pyx_k_encoding, sizeof(__pyx_k_encoding), 0, 0, 1, 1},
jpayne@68 27903 {&__pyx_n_s_end, __pyx_k_end, sizeof(__pyx_k_end), 0, 0, 1, 1},
jpayne@68 27904 {&__pyx_n_s_end_col, __pyx_k_end_col, sizeof(__pyx_k_end_col), 0, 0, 1, 1},
jpayne@68 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@68 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@68 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@68 27908 {&__pyx_n_s_exists, __pyx_k_exists, sizeof(__pyx_k_exists), 0, 0, 1, 1},
jpayne@68 27909 {&__pyx_n_s_fd_src, __pyx_k_fd_src, sizeof(__pyx_k_fd_src), 0, 0, 1, 1},
jpayne@68 27910 {&__pyx_n_s_fetch, __pyx_k_fetch, sizeof(__pyx_k_fetch), 0, 0, 1, 1},
jpayne@68 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@68 27912 {&__pyx_n_s_filename, __pyx_k_filename, sizeof(__pyx_k_filename), 0, 0, 1, 1},
jpayne@68 27913 {&__pyx_n_s_filename_in, __pyx_k_filename_in, sizeof(__pyx_k_filename_in), 0, 0, 1, 1},
jpayne@68 27914 {&__pyx_n_s_filename_index, __pyx_k_filename_index, sizeof(__pyx_k_filename_index), 0, 0, 1, 1},
jpayne@68 27915 {&__pyx_n_s_filename_out, __pyx_k_filename_out, sizeof(__pyx_k_filename_out), 0, 0, 1, 1},
jpayne@68 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@68 27917 {&__pyx_n_s_fileobj, __pyx_k_fileobj, sizeof(__pyx_k_fileobj), 0, 0, 1, 1},
jpayne@68 27918 {&__pyx_n_s_fmt, __pyx_k_fmt, sizeof(__pyx_k_fmt), 0, 0, 1, 1},
jpayne@68 27919 {&__pyx_n_s_fn, __pyx_k_fn, sizeof(__pyx_k_fn), 0, 0, 1, 1},
jpayne@68 27920 {&__pyx_n_s_fn_index, __pyx_k_fn_index, sizeof(__pyx_k_fn_index), 0, 0, 1, 1},
jpayne@68 27921 {&__pyx_n_s_fnidx, __pyx_k_fnidx, sizeof(__pyx_k_fnidx), 0, 0, 1, 1},
jpayne@68 27922 {&__pyx_n_s_force, __pyx_k_force, sizeof(__pyx_k_force), 0, 0, 1, 1},
jpayne@68 27923 {&__pyx_n_s_format, __pyx_k_format, sizeof(__pyx_k_format), 0, 0, 1, 1},
jpayne@68 27924 {&__pyx_n_s_fp, __pyx_k_fp, sizeof(__pyx_k_fp), 0, 0, 1, 1},
jpayne@68 27925 {&__pyx_kp_u_gc, __pyx_k_gc, sizeof(__pyx_k_gc), 0, 1, 0, 0},
jpayne@68 27926 {&__pyx_n_s_get_encoding, __pyx_k_get_encoding, sizeof(__pyx_k_get_encoding), 0, 0, 1, 1},
jpayne@68 27927 {&__pyx_n_s_getstate, __pyx_k_getstate, sizeof(__pyx_k_getstate), 0, 0, 1, 1},
jpayne@68 27928 {&__pyx_n_u_gff, __pyx_k_gff, sizeof(__pyx_k_gff), 0, 1, 0, 1},
jpayne@68 27929 {&__pyx_kp_u_gz, __pyx_k_gz, sizeof(__pyx_k_gz), 0, 1, 0, 0},
jpayne@68 27930 {&__pyx_n_s_import, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1},
jpayne@68 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@68 27932 {&__pyx_n_s_index, __pyx_k_index, sizeof(__pyx_k_index), 0, 0, 1, 1},
jpayne@68 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@68 27934 {&__pyx_n_s_infile, __pyx_k_infile, sizeof(__pyx_k_infile), 0, 0, 1, 1},
jpayne@68 27935 {&__pyx_n_s_init, __pyx_k_init, sizeof(__pyx_k_init), 0, 0, 1, 1},
jpayne@68 27936 {&__pyx_n_s_init_subclass, __pyx_k_init_subclass, sizeof(__pyx_k_init_subclass), 0, 0, 1, 1},
jpayne@68 27937 {&__pyx_n_s_initializing, __pyx_k_initializing, sizeof(__pyx_k_initializing), 0, 0, 1, 1},
jpayne@68 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@68 27939 {&__pyx_n_s_is_coroutine, __pyx_k_is_coroutine, sizeof(__pyx_k_is_coroutine), 0, 0, 1, 1},
jpayne@68 27940 {&__pyx_n_s_is_empty, __pyx_k_is_empty, sizeof(__pyx_k_is_empty), 0, 0, 1, 1},
jpayne@68 27941 {&__pyx_n_s_is_open, __pyx_k_is_open, sizeof(__pyx_k_is_open), 0, 0, 1, 1},
jpayne@68 27942 {&__pyx_kp_u_isenabled, __pyx_k_isenabled, sizeof(__pyx_k_isenabled), 0, 1, 0, 0},
jpayne@68 27943 {&__pyx_n_s_iter, __pyx_k_iter, sizeof(__pyx_k_iter), 0, 0, 1, 1},
jpayne@68 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@68 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@68 27946 {&__pyx_n_s_itr, __pyx_k_itr, sizeof(__pyx_k_itr), 0, 0, 1, 1},
jpayne@68 27947 {&__pyx_n_s_keep_original, __pyx_k_keep_original, sizeof(__pyx_k_keep_original), 0, 0, 1, 1},
jpayne@68 27948 {&__pyx_n_s_keys, __pyx_k_keys, sizeof(__pyx_k_keys), 0, 0, 1, 1},
jpayne@68 27949 {&__pyx_n_s_length, __pyx_k_length, sizeof(__pyx_k_length), 0, 0, 1, 1},
jpayne@68 27950 {&__pyx_n_s_line, __pyx_k_line, sizeof(__pyx_k_line), 0, 0, 1, 1},
jpayne@68 27951 {&__pyx_n_s_line_skip, __pyx_k_line_skip, sizeof(__pyx_k_line_skip), 0, 0, 1, 1},
jpayne@68 27952 {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1},
jpayne@68 27953 {&__pyx_n_s_meta_char, __pyx_k_meta_char, sizeof(__pyx_k_meta_char), 0, 0, 1, 1},
jpayne@68 27954 {&__pyx_n_s_metaclass, __pyx_k_metaclass, sizeof(__pyx_k_metaclass), 0, 0, 1, 1},
jpayne@68 27955 {&__pyx_n_s_min_shift, __pyx_k_min_shift, sizeof(__pyx_k_min_shift), 0, 0, 1, 1},
jpayne@68 27956 {&__pyx_n_s_mode, __pyx_k_mode, sizeof(__pyx_k_mode), 0, 0, 1, 1},
jpayne@68 27957 {&__pyx_n_s_module, __pyx_k_module, sizeof(__pyx_k_module), 0, 0, 1, 1},
jpayne@68 27958 {&__pyx_n_s_multiple_iterators, __pyx_k_multiple_iterators, sizeof(__pyx_k_multiple_iterators), 0, 0, 1, 1},
jpayne@68 27959 {&__pyx_n_s_name, __pyx_k_name, sizeof(__pyx_k_name), 0, 0, 1, 1},
jpayne@68 27960 {&__pyx_n_s_nbytes, __pyx_k_nbytes, sizeof(__pyx_k_nbytes), 0, 0, 1, 1},
jpayne@68 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@68 27962 {&__pyx_n_s_new, __pyx_k_new, sizeof(__pyx_k_new), 0, 0, 1, 1},
jpayne@68 27963 {&__pyx_n_s_next, __pyx_k_next, sizeof(__pyx_k_next), 0, 0, 1, 1},
jpayne@68 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@68 27965 {&__pyx_n_s_open, __pyx_k_open, sizeof(__pyx_k_open), 0, 0, 1, 1},
jpayne@68 27966 {&__pyx_n_s_os, __pyx_k_os, sizeof(__pyx_k_os), 0, 0, 1, 1},
jpayne@68 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@68 27968 {&__pyx_n_s_parser, __pyx_k_parser, sizeof(__pyx_k_parser), 0, 0, 1, 1},
jpayne@68 27969 {&__pyx_n_s_path, __pyx_k_path, sizeof(__pyx_k_path), 0, 0, 1, 1},
jpayne@68 27970 {&__pyx_n_s_pickle, __pyx_k_pickle, sizeof(__pyx_k_pickle), 0, 0, 1, 1},
jpayne@68 27971 {&__pyx_n_s_prepare, __pyx_k_prepare, sizeof(__pyx_k_prepare), 0, 0, 1, 1},
jpayne@68 27972 {&__pyx_n_s_preset, __pyx_k_preset, sizeof(__pyx_k_preset), 0, 0, 1, 1},
jpayne@68 27973 {&__pyx_n_s_preset2conf, __pyx_k_preset2conf, sizeof(__pyx_k_preset2conf), 0, 0, 1, 1},
jpayne@68 27974 {&__pyx_n_u_psltbl, __pyx_k_psltbl, sizeof(__pyx_k_psltbl), 0, 1, 0, 1},
jpayne@68 27975 {&__pyx_n_s_pysam_libctabix, __pyx_k_pysam_libctabix, sizeof(__pyx_k_pysam_libctabix), 0, 0, 1, 1},
jpayne@68 27976 {&__pyx_kp_s_pysam_libctabix_pyx, __pyx_k_pysam_libctabix_pyx, sizeof(__pyx_k_pysam_libctabix_pyx), 0, 0, 1, 0},
jpayne@68 27977 {&__pyx_n_s_pyx_PickleError, __pyx_k_pyx_PickleError, sizeof(__pyx_k_pyx_PickleError), 0, 0, 1, 1},
jpayne@68 27978 {&__pyx_n_s_pyx_checksum, __pyx_k_pyx_checksum, sizeof(__pyx_k_pyx_checksum), 0, 0, 1, 1},
jpayne@68 27979 {&__pyx_n_s_pyx_result, __pyx_k_pyx_result, sizeof(__pyx_k_pyx_result), 0, 0, 1, 1},
jpayne@68 27980 {&__pyx_n_s_pyx_state, __pyx_k_pyx_state, sizeof(__pyx_k_pyx_state), 0, 0, 1, 1},
jpayne@68 27981 {&__pyx_n_s_pyx_type, __pyx_k_pyx_type, sizeof(__pyx_k_pyx_type), 0, 0, 1, 1},
jpayne@68 27982 {&__pyx_n_s_pyx_unpickle_Parser, __pyx_k_pyx_unpickle_Parser, sizeof(__pyx_k_pyx_unpickle_Parser), 0, 0, 1, 1},
jpayne@68 27983 {&__pyx_n_s_pyx_unpickle_asBed, __pyx_k_pyx_unpickle_asBed, sizeof(__pyx_k_pyx_unpickle_asBed), 0, 0, 1, 1},
jpayne@68 27984 {&__pyx_n_s_pyx_unpickle_asGFF3, __pyx_k_pyx_unpickle_asGFF3, sizeof(__pyx_k_pyx_unpickle_asGFF3), 0, 0, 1, 1},
jpayne@68 27985 {&__pyx_n_s_pyx_unpickle_asGTF, __pyx_k_pyx_unpickle_asGTF, sizeof(__pyx_k_pyx_unpickle_asGTF), 0, 0, 1, 1},
jpayne@68 27986 {&__pyx_n_s_pyx_unpickle_asTuple, __pyx_k_pyx_unpickle_asTuple, sizeof(__pyx_k_pyx_unpickle_asTuple), 0, 0, 1, 1},
jpayne@68 27987 {&__pyx_n_s_pyx_unpickle_asVCF, __pyx_k_pyx_unpickle_asVCF, sizeof(__pyx_k_pyx_unpickle_asVCF), 0, 0, 1, 1},
jpayne@68 27988 {&__pyx_n_s_pyx_vtable, __pyx_k_pyx_vtable, sizeof(__pyx_k_pyx_vtable), 0, 0, 1, 1},
jpayne@68 27989 {&__pyx_n_s_qualname, __pyx_k_qualname, sizeof(__pyx_k_qualname), 0, 0, 1, 1},
jpayne@68 27990 {&__pyx_n_s_r, __pyx_k_r, sizeof(__pyx_k_r), 0, 0, 1, 1},
jpayne@68 27991 {&__pyx_n_u_r, __pyx_k_r, sizeof(__pyx_k_r), 0, 1, 0, 1},
jpayne@68 27992 {&__pyx_n_s_readline, __pyx_k_readline, sizeof(__pyx_k_readline), 0, 0, 1, 1},
jpayne@68 27993 {&__pyx_n_s_reduce, __pyx_k_reduce, sizeof(__pyx_k_reduce), 0, 0, 1, 1},
jpayne@68 27994 {&__pyx_n_s_reduce_cython, __pyx_k_reduce_cython, sizeof(__pyx_k_reduce_cython), 0, 0, 1, 1},
jpayne@68 27995 {&__pyx_n_s_reduce_ex, __pyx_k_reduce_ex, sizeof(__pyx_k_reduce_ex), 0, 0, 1, 1},
jpayne@68 27996 {&__pyx_n_s_reference, __pyx_k_reference, sizeof(__pyx_k_reference), 0, 0, 1, 1},
jpayne@68 27997 {&__pyx_n_s_region, __pyx_k_region, sizeof(__pyx_k_region), 0, 0, 1, 1},
jpayne@68 27998 {&__pyx_n_s_retval, __pyx_k_retval, sizeof(__pyx_k_retval), 0, 0, 1, 1},
jpayne@68 27999 {&__pyx_kp_u_s, __pyx_k_s, sizeof(__pyx_k_s), 0, 1, 0, 0},
jpayne@68 28000 {&__pyx_n_s_s_2, __pyx_k_s_2, sizeof(__pyx_k_s_2), 0, 0, 1, 1},
jpayne@68 28001 {&__pyx_kp_u_s_i, __pyx_k_s_i, sizeof(__pyx_k_s_i), 0, 1, 0, 0},
jpayne@68 28002 {&__pyx_kp_u_s_i_i, __pyx_k_s_i_i, sizeof(__pyx_k_s_i_i), 0, 1, 0, 0},
jpayne@68 28003 {&__pyx_n_u_sam, __pyx_k_sam, sizeof(__pyx_k_sam), 0, 1, 0, 1},
jpayne@68 28004 {&__pyx_n_s_self, __pyx_k_self, sizeof(__pyx_k_self), 0, 0, 1, 1},
jpayne@68 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@68 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@68 28007 {&__pyx_n_s_seq_col, __pyx_k_seq_col, sizeof(__pyx_k_seq_col), 0, 0, 1, 1},
jpayne@68 28008 {&__pyx_n_s_set_encoding, __pyx_k_set_encoding, sizeof(__pyx_k_set_encoding), 0, 0, 1, 1},
jpayne@68 28009 {&__pyx_n_s_set_name, __pyx_k_set_name, sizeof(__pyx_k_set_name), 0, 0, 1, 1},
jpayne@68 28010 {&__pyx_n_s_setstate, __pyx_k_setstate, sizeof(__pyx_k_setstate), 0, 0, 1, 1},
jpayne@68 28011 {&__pyx_n_s_setstate_cython, __pyx_k_setstate_cython, sizeof(__pyx_k_setstate_cython), 0, 0, 1, 1},
jpayne@68 28012 {&__pyx_n_s_spec, __pyx_k_spec, sizeof(__pyx_k_spec), 0, 0, 1, 1},
jpayne@68 28013 {&__pyx_n_s_start, __pyx_k_start, sizeof(__pyx_k_start), 0, 0, 1, 1},
jpayne@68 28014 {&__pyx_n_s_start_col, __pyx_k_start_col, sizeof(__pyx_k_start_col), 0, 0, 1, 1},
jpayne@68 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@68 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@68 28017 {&__pyx_n_s_state, __pyx_k_state, sizeof(__pyx_k_state), 0, 0, 1, 1},
jpayne@68 28018 {&__pyx_kp_s_stringsource, __pyx_k_stringsource, sizeof(__pyx_k_stringsource), 0, 0, 1, 0},
jpayne@68 28019 {&__pyx_n_s_suffix, __pyx_k_suffix, sizeof(__pyx_k_suffix), 0, 0, 1, 1},
jpayne@68 28020 {&__pyx_n_s_super, __pyx_k_super, sizeof(__pyx_k_super), 0, 0, 1, 1},
jpayne@68 28021 {&__pyx_n_s_sys, __pyx_k_sys, sizeof(__pyx_k_sys), 0, 0, 1, 1},
jpayne@68 28022 {&__pyx_n_s_tabix_compress, __pyx_k_tabix_compress, sizeof(__pyx_k_tabix_compress), 0, 0, 1, 1},
jpayne@68 28023 {&__pyx_n_u_tabix_compress, __pyx_k_tabix_compress, sizeof(__pyx_k_tabix_compress), 0, 1, 0, 1},
jpayne@68 28024 {&__pyx_n_s_tabix_file_iterator, __pyx_k_tabix_file_iterator, sizeof(__pyx_k_tabix_file_iterator), 0, 0, 1, 1},
jpayne@68 28025 {&__pyx_n_u_tabix_file_iterator, __pyx_k_tabix_file_iterator, sizeof(__pyx_k_tabix_file_iterator), 0, 1, 0, 1},
jpayne@68 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@68 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@68 28028 {&__pyx_n_s_tabix_generic_iterator, __pyx_k_tabix_generic_iterator, sizeof(__pyx_k_tabix_generic_iterator), 0, 0, 1, 1},
jpayne@68 28029 {&__pyx_n_u_tabix_generic_iterator, __pyx_k_tabix_generic_iterator, sizeof(__pyx_k_tabix_generic_iterator), 0, 1, 0, 1},
jpayne@68 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@68 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@68 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@68 28033 {&__pyx_n_s_tabix_index, __pyx_k_tabix_index, sizeof(__pyx_k_tabix_index), 0, 0, 1, 1},
jpayne@68 28034 {&__pyx_n_u_tabix_index, __pyx_k_tabix_index, sizeof(__pyx_k_tabix_index), 0, 1, 0, 1},
jpayne@68 28035 {&__pyx_n_s_tabix_iterator, __pyx_k_tabix_iterator, sizeof(__pyx_k_tabix_iterator), 0, 0, 1, 1},
jpayne@68 28036 {&__pyx_n_u_tabix_iterator, __pyx_k_tabix_iterator, sizeof(__pyx_k_tabix_iterator), 0, 1, 0, 1},
jpayne@68 28037 {&__pyx_kp_u_tbi, __pyx_k_tbi, sizeof(__pyx_k_tbi), 0, 1, 0, 0},
jpayne@68 28038 {&__pyx_n_s_tell, __pyx_k_tell, sizeof(__pyx_k_tell), 0, 0, 1, 1},
jpayne@68 28039 {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1},
jpayne@68 28040 {&__pyx_n_s_threads, __pyx_k_threads, sizeof(__pyx_k_threads), 0, 0, 1, 1},
jpayne@68 28041 {&__pyx_kp_u_unknown_preset, __pyx_k_unknown_preset, sizeof(__pyx_k_unknown_preset), 0, 1, 0, 0},
jpayne@68 28042 {&__pyx_n_s_unlink, __pyx_k_unlink, sizeof(__pyx_k_unlink), 0, 0, 1, 1},
jpayne@68 28043 {&__pyx_n_s_update, __pyx_k_update, sizeof(__pyx_k_update), 0, 0, 1, 1},
jpayne@68 28044 {&__pyx_n_s_use_setstate, __pyx_k_use_setstate, sizeof(__pyx_k_use_setstate), 0, 0, 1, 1},
jpayne@68 28045 {&__pyx_kp_u_valid_presets_are, __pyx_k_valid_presets_are, sizeof(__pyx_k_valid_presets_are), 0, 1, 0, 0},
jpayne@68 28046 {&__pyx_n_u_vcf, __pyx_k_vcf, sizeof(__pyx_k_vcf), 0, 1, 0, 1},
jpayne@68 28047 {&__pyx_kp_u_writing_failed, __pyx_k_writing_failed, sizeof(__pyx_k_writing_failed), 0, 1, 0, 0},
jpayne@68 28048 {&__pyx_n_s_zerobased, __pyx_k_zerobased, sizeof(__pyx_k_zerobased), 0, 0, 1, 1},
jpayne@68 28049 {0, 0, 0, 0, 0, 0, 0}
jpayne@68 28050 };
jpayne@68 28051 return __Pyx_InitStrings(__pyx_string_tab);
jpayne@68 28052 }
jpayne@68 28053 /* #### Code section: cached_builtins ### */
jpayne@68 28054 static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(void) {
jpayne@68 28055 __pyx_builtin_NotImplementedError = __Pyx_GetBuiltinName(__pyx_n_s_NotImplementedError); if (!__pyx_builtin_NotImplementedError) __PYX_ERR(0, 94, __pyx_L1_error)
jpayne@68 28056 __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) __PYX_ERR(0, 361, __pyx_L1_error)
jpayne@68 28057 __pyx_builtin_IOError = __Pyx_GetBuiltinName(__pyx_n_s_IOError); if (!__pyx_builtin_IOError) __PYX_ERR(0, 378, __pyx_L1_error)
jpayne@68 28058 __pyx_builtin_OSError = __Pyx_GetBuiltinName(__pyx_n_s_OSError); if (!__pyx_builtin_OSError) __PYX_ERR(0, 560, __pyx_L1_error)
jpayne@68 28059 __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) __PYX_ERR(1, 2, __pyx_L1_error)
jpayne@68 28060 __pyx_builtin_StopIteration = __Pyx_GetBuiltinName(__pyx_n_s_StopIteration); if (!__pyx_builtin_StopIteration) __PYX_ERR(0, 671, __pyx_L1_error)
jpayne@68 28061 __pyx_builtin_super = __Pyx_GetBuiltinName(__pyx_n_s_super); if (!__pyx_builtin_super) __PYX_ERR(0, 701, __pyx_L1_error)
jpayne@68 28062 __pyx_builtin_KeyError = __Pyx_GetBuiltinName(__pyx_n_s_KeyError); if (!__pyx_builtin_KeyError) __PYX_ERR(0, 969, __pyx_L1_error)
jpayne@68 28063 __pyx_builtin_AssertionError = __Pyx_GetBuiltinName(__pyx_n_s_AssertionError); if (!__pyx_builtin_AssertionError) __PYX_ERR(0, 1216, __pyx_L1_error)
jpayne@68 28064 __pyx_builtin_MemoryError = __Pyx_GetBuiltinName(__pyx_n_s_MemoryError); if (!__pyx_builtin_MemoryError) __PYX_ERR(3, 120, __pyx_L1_error)
jpayne@68 28065 return 0;
jpayne@68 28066 __pyx_L1_error:;
jpayne@68 28067 return -1;
jpayne@68 28068 }
jpayne@68 28069 /* #### Code section: cached_constants ### */
jpayne@68 28070
jpayne@68 28071 static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) {
jpayne@68 28072 __Pyx_RefNannyDeclarations
jpayne@68 28073 __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0);
jpayne@68 28074
jpayne@68 28075 /* "pysam/libctabix.pyx":444
jpayne@68 28076 * '''
jpayne@68 28077 * if not self.is_open():
jpayne@68 28078 * raise ValueError("I/O operation on closed file") # <<<<<<<<<<<<<<
jpayne@68 28079 *
jpayne@68 28080 * # convert coordinates to region string, which is one-based
jpayne@68 28081 */
jpayne@68 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@68 28083 __Pyx_GOTREF(__pyx_tuple__19);
jpayne@68 28084 __Pyx_GIVEREF(__pyx_tuple__19);
jpayne@68 28085
jpayne@68 28086 /* "pysam/libctabix.pyx":499
jpayne@68 28087 * # when accessing a tabix file created prior tabix 1.0
jpayne@68 28088 * # the full-file iterator is empty.
jpayne@68 28089 * raise ValueError( # <<<<<<<<<<<<<<
jpayne@68 28090 * "could not create iterator, possible "
jpayne@68 28091 * "tabix version mismatch")
jpayne@68 28092 */
jpayne@68 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@68 28094 __Pyx_GOTREF(__pyx_tuple__20);
jpayne@68 28095 __Pyx_GIVEREF(__pyx_tuple__20);
jpayne@68 28096
jpayne@68 28097 /* "pysam/libctabix.pyx":669
jpayne@68 28098 * cdef int retval = self.__cnext__()
jpayne@68 28099 * if retval == -5:
jpayne@68 28100 * raise IOError("iteration on closed file") # <<<<<<<<<<<<<<
jpayne@68 28101 * elif retval < 0:
jpayne@68 28102 * raise StopIteration
jpayne@68 28103 */
jpayne@68 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@68 28105 __Pyx_GOTREF(__pyx_tuple__24);
jpayne@68 28106 __Pyx_GIVEREF(__pyx_tuple__24);
jpayne@68 28107
jpayne@68 28108 /* "pysam/libctabix.pyx":859
jpayne@68 28109 * if r < 0:
jpayne@68 28110 * free(buffer)
jpayne@68 28111 * raise IOError("writing failed") # <<<<<<<<<<<<<<
jpayne@68 28112 *
jpayne@68 28113 * free(buffer)
jpayne@68 28114 */
jpayne@68 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@68 28116 __Pyx_GOTREF(__pyx_tuple__38);
jpayne@68 28117 __Pyx_GIVEREF(__pyx_tuple__38);
jpayne@68 28118
jpayne@68 28119 /* "pysam/libctabix.pyx":930
jpayne@68 28120 * if preset is None and \
jpayne@68 28121 * (seq_col is None or start_col is None or end_col is None):
jpayne@68 28122 * raise ValueError( # <<<<<<<<<<<<<<
jpayne@68 28123 * "neither preset nor seq_col,start_col and end_col given")
jpayne@68 28124 *
jpayne@68 28125 */
jpayne@68 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@68 28127 __Pyx_GOTREF(__pyx_tuple__41);
jpayne@68 28128 __Pyx_GIVEREF(__pyx_tuple__41);
jpayne@68 28129
jpayne@68 28130 /* "pysam/libctabix.pyx":1108
jpayne@68 28131 *
jpayne@68 28132 * if infile.closed:
jpayne@68 28133 * raise ValueError("I/O operation on closed file.") # <<<<<<<<<<<<<<
jpayne@68 28134 *
jpayne@68 28135 * self.infile = infile
jpayne@68 28136 */
jpayne@68 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@68 28138 __Pyx_GOTREF(__pyx_tuple__45);
jpayne@68 28139 __Pyx_GIVEREF(__pyx_tuple__45);
jpayne@68 28140
jpayne@68 28141 /* "(tree fragment)":4
jpayne@68 28142 * cdef object __pyx_PickleError
jpayne@68 28143 * cdef object __pyx_result
jpayne@68 28144 * if __pyx_checksum not in (0xe8424ea, 0x14a9dc0, 0x84bea1f): # <<<<<<<<<<<<<<
jpayne@68 28145 * from pickle import PickleError as __pyx_PickleError
jpayne@68 28146 * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0xe8424ea, 0x14a9dc0, 0x84bea1f) = (encoding))" % __pyx_checksum
jpayne@68 28147 */
jpayne@68 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@68 28149 __Pyx_GOTREF(__pyx_tuple__55);
jpayne@68 28150 __Pyx_GIVEREF(__pyx_tuple__55);
jpayne@68 28151
jpayne@68 28152 /* "pysam/libctabix.pyx":87
jpayne@68 28153 * self.encoding = encoding
jpayne@68 28154 *
jpayne@68 28155 * def set_encoding(self, encoding): # <<<<<<<<<<<<<<
jpayne@68 28156 * self.encoding = encoding
jpayne@68 28157 *
jpayne@68 28158 */
jpayne@68 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@68 28160 __Pyx_GOTREF(__pyx_tuple__63);
jpayne@68 28161 __Pyx_GIVEREF(__pyx_tuple__63);
jpayne@68 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@68 28163
jpayne@68 28164 /* "pysam/libctabix.pyx":90
jpayne@68 28165 * self.encoding = encoding
jpayne@68 28166 *
jpayne@68 28167 * def get_encoding(self): # <<<<<<<<<<<<<<
jpayne@68 28168 * return self.encoding
jpayne@68 28169 *
jpayne@68 28170 */
jpayne@68 28171 __pyx_tuple__64 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__64)) __PYX_ERR(0, 90, __pyx_L1_error)
jpayne@68 28172 __Pyx_GOTREF(__pyx_tuple__64);
jpayne@68 28173 __Pyx_GIVEREF(__pyx_tuple__64);
jpayne@68 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@68 28175
jpayne@68 28176 /* "(tree fragment)":1
jpayne@68 28177 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
jpayne@68 28178 * cdef tuple state
jpayne@68 28179 * cdef object _dict
jpayne@68 28180 */
jpayne@68 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@68 28182 __Pyx_GOTREF(__pyx_tuple__65);
jpayne@68 28183 __Pyx_GIVEREF(__pyx_tuple__65);
jpayne@68 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@68 28185
jpayne@68 28186 /* "(tree fragment)":16
jpayne@68 28187 * else:
jpayne@68 28188 * return __pyx_unpickle_Parser, (type(self), 0xe8424ea, state)
jpayne@68 28189 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
jpayne@68 28190 * __pyx_unpickle_Parser__set_state(self, __pyx_state)
jpayne@68 28191 */
jpayne@68 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@68 28193 __Pyx_GOTREF(__pyx_tuple__66);
jpayne@68 28194 __Pyx_GIVEREF(__pyx_tuple__66);
jpayne@68 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@68 28196
jpayne@68 28197 /* "(tree fragment)":1
jpayne@68 28198 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
jpayne@68 28199 * cdef tuple state
jpayne@68 28200 * cdef object _dict
jpayne@68 28201 */
jpayne@68 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@68 28203
jpayne@68 28204 /* "(tree fragment)":16
jpayne@68 28205 * else:
jpayne@68 28206 * return __pyx_unpickle_asTuple, (type(self), 0xe8424ea, state)
jpayne@68 28207 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
jpayne@68 28208 * __pyx_unpickle_asTuple__set_state(self, __pyx_state)
jpayne@68 28209 */
jpayne@68 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@68 28211
jpayne@68 28212 /* "(tree fragment)":1
jpayne@68 28213 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
jpayne@68 28214 * cdef tuple state
jpayne@68 28215 * cdef object _dict
jpayne@68 28216 */
jpayne@68 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@68 28218
jpayne@68 28219 /* "(tree fragment)":16
jpayne@68 28220 * else:
jpayne@68 28221 * return __pyx_unpickle_asGFF3, (type(self), 0xe8424ea, state)
jpayne@68 28222 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
jpayne@68 28223 * __pyx_unpickle_asGFF3__set_state(self, __pyx_state)
jpayne@68 28224 */
jpayne@68 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@68 28226
jpayne@68 28227 /* "(tree fragment)":1
jpayne@68 28228 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
jpayne@68 28229 * cdef tuple state
jpayne@68 28230 * cdef object _dict
jpayne@68 28231 */
jpayne@68 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@68 28233
jpayne@68 28234 /* "(tree fragment)":16
jpayne@68 28235 * else:
jpayne@68 28236 * return __pyx_unpickle_asGTF, (type(self), 0xe8424ea, state)
jpayne@68 28237 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
jpayne@68 28238 * __pyx_unpickle_asGTF__set_state(self, __pyx_state)
jpayne@68 28239 */
jpayne@68 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@68 28241
jpayne@68 28242 /* "(tree fragment)":1
jpayne@68 28243 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
jpayne@68 28244 * cdef tuple state
jpayne@68 28245 * cdef object _dict
jpayne@68 28246 */
jpayne@68 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@68 28248
jpayne@68 28249 /* "(tree fragment)":16
jpayne@68 28250 * else:
jpayne@68 28251 * return __pyx_unpickle_asBed, (type(self), 0xe8424ea, state)
jpayne@68 28252 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
jpayne@68 28253 * __pyx_unpickle_asBed__set_state(self, __pyx_state)
jpayne@68 28254 */
jpayne@68 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@68 28256
jpayne@68 28257 /* "(tree fragment)":1
jpayne@68 28258 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
jpayne@68 28259 * cdef tuple state
jpayne@68 28260 * cdef object _dict
jpayne@68 28261 */
jpayne@68 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@68 28263
jpayne@68 28264 /* "(tree fragment)":16
jpayne@68 28265 * else:
jpayne@68 28266 * return __pyx_unpickle_asVCF, (type(self), 0xe8424ea, state)
jpayne@68 28267 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
jpayne@68 28268 * __pyx_unpickle_asVCF__set_state(self, __pyx_state)
jpayne@68 28269 */
jpayne@68 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@68 28271
jpayne@68 28272 /* "pysam/libctabix.pyx":352
jpayne@68 28273 * self.encoding = encoding
jpayne@68 28274 *
jpayne@68 28275 * def _open( self, # <<<<<<<<<<<<<<
jpayne@68 28276 * filename,
jpayne@68 28277 * mode='r',
jpayne@68 28278 */
jpayne@68 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@68 28280 __Pyx_GOTREF(__pyx_tuple__67);
jpayne@68 28281 __Pyx_GIVEREF(__pyx_tuple__67);
jpayne@68 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@68 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@68 28284 __Pyx_GOTREF(__pyx_tuple__68);
jpayne@68 28285 __Pyx_GIVEREF(__pyx_tuple__68);
jpayne@68 28286
jpayne@68 28287 /* "pysam/libctabix.pyx":404
jpayne@68 28288 * self.start_offset = self.tell()
jpayne@68 28289 *
jpayne@68 28290 * def _dup(self): # <<<<<<<<<<<<<<
jpayne@68 28291 * '''return a copy of this tabix file.
jpayne@68 28292 *
jpayne@68 28293 */
jpayne@68 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@68 28295
jpayne@68 28296 /* "pysam/libctabix.pyx":416
jpayne@68 28297 * encoding=self.encoding)
jpayne@68 28298 *
jpayne@68 28299 * def fetch(self, # <<<<<<<<<<<<<<
jpayne@68 28300 * reference=None,
jpayne@68 28301 * start=None,
jpayne@68 28302 */
jpayne@68 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@68 28304 __Pyx_GOTREF(__pyx_tuple__69);
jpayne@68 28305 __Pyx_GIVEREF(__pyx_tuple__69);
jpayne@68 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@68 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@68 28308 __Pyx_GOTREF(__pyx_tuple__70);
jpayne@68 28309 __Pyx_GIVEREF(__pyx_tuple__70);
jpayne@68 28310
jpayne@68 28311 /* "pysam/libctabix.pyx":598
jpayne@68 28312 * return result
jpayne@68 28313 *
jpayne@68 28314 * def close(self): # <<<<<<<<<<<<<<
jpayne@68 28315 * '''
jpayne@68 28316 * closes the :class:`pysam.TabixFile`.'''
jpayne@68 28317 */
jpayne@68 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@68 28319
jpayne@68 28320 /* "(tree fragment)":1
jpayne@68 28321 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
jpayne@68 28322 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
jpayne@68 28323 * def __setstate_cython__(self, __pyx_state):
jpayne@68 28324 */
jpayne@68 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@68 28326
jpayne@68 28327 /* "(tree fragment)":3
jpayne@68 28328 * def __reduce_cython__(self):
jpayne@68 28329 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
jpayne@68 28330 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
jpayne@68 28331 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
jpayne@68 28332 */
jpayne@68 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@68 28334
jpayne@68 28335 /* "(tree fragment)":1
jpayne@68 28336 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
jpayne@68 28337 * raise TypeError, "self.iterator cannot be converted to a Python object for pickling"
jpayne@68 28338 * def __setstate_cython__(self, __pyx_state):
jpayne@68 28339 */
jpayne@68 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@68 28341
jpayne@68 28342 /* "(tree fragment)":3
jpayne@68 28343 * def __reduce_cython__(self):
jpayne@68 28344 * raise TypeError, "self.iterator cannot be converted to a Python object for pickling"
jpayne@68 28345 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
jpayne@68 28346 * raise TypeError, "self.iterator cannot be converted to a Python object for pickling"
jpayne@68 28347 */
jpayne@68 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@68 28349
jpayne@68 28350 /* "pysam/libctabix.pyx":685
jpayne@68 28351 * '''empty iterator'''
jpayne@68 28352 *
jpayne@68 28353 * def __iter__(self): # <<<<<<<<<<<<<<
jpayne@68 28354 * return self
jpayne@68 28355 *
jpayne@68 28356 */
jpayne@68 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@68 28358
jpayne@68 28359 /* "pysam/libctabix.pyx":688
jpayne@68 28360 * return self
jpayne@68 28361 *
jpayne@68 28362 * def __next__(self): # <<<<<<<<<<<<<<
jpayne@68 28363 * raise StopIteration()
jpayne@68 28364 *
jpayne@68 28365 */
jpayne@68 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@68 28367
jpayne@68 28368 /* "(tree fragment)":1
jpayne@68 28369 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
jpayne@68 28370 * raise TypeError, "self.iterator cannot be converted to a Python object for pickling"
jpayne@68 28371 * def __setstate_cython__(self, __pyx_state):
jpayne@68 28372 */
jpayne@68 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@68 28374
jpayne@68 28375 /* "(tree fragment)":3
jpayne@68 28376 * def __reduce_cython__(self):
jpayne@68 28377 * raise TypeError, "self.iterator cannot be converted to a Python object for pickling"
jpayne@68 28378 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
jpayne@68 28379 * raise TypeError, "self.iterator cannot be converted to a Python object for pickling"
jpayne@68 28380 */
jpayne@68 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@68 28382
jpayne@68 28383 /* "(tree fragment)":1
jpayne@68 28384 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
jpayne@68 28385 * raise TypeError, "self.gzipfile,self.kstream cannot be converted to a Python object for pickling"
jpayne@68 28386 * def __setstate_cython__(self, __pyx_state):
jpayne@68 28387 */
jpayne@68 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@68 28389
jpayne@68 28390 /* "(tree fragment)":3
jpayne@68 28391 * def __reduce_cython__(self):
jpayne@68 28392 * raise TypeError, "self.gzipfile,self.kstream cannot be converted to a Python object for pickling"
jpayne@68 28393 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
jpayne@68 28394 * raise TypeError, "self.gzipfile,self.kstream cannot be converted to a Python object for pickling"
jpayne@68 28395 */
jpayne@68 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@68 28397
jpayne@68 28398 /* "(tree fragment)":1
jpayne@68 28399 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
jpayne@68 28400 * raise TypeError, "self.gzipfile,self.kstream cannot be converted to a Python object for pickling"
jpayne@68 28401 * def __setstate_cython__(self, __pyx_state):
jpayne@68 28402 */
jpayne@68 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@68 28404
jpayne@68 28405 /* "(tree fragment)":3
jpayne@68 28406 * def __reduce_cython__(self):
jpayne@68 28407 * raise TypeError, "self.gzipfile,self.kstream cannot be converted to a Python object for pickling"
jpayne@68 28408 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
jpayne@68 28409 * raise TypeError, "self.gzipfile,self.kstream cannot be converted to a Python object for pickling"
jpayne@68 28410 */
jpayne@68 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@68 28412
jpayne@68 28413 /* "(tree fragment)":1
jpayne@68 28414 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
jpayne@68 28415 * raise TypeError, "self.gzipfile,self.kstream cannot be converted to a Python object for pickling"
jpayne@68 28416 * def __setstate_cython__(self, __pyx_state):
jpayne@68 28417 */
jpayne@68 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@68 28419
jpayne@68 28420 /* "(tree fragment)":3
jpayne@68 28421 * def __reduce_cython__(self):
jpayne@68 28422 * raise TypeError, "self.gzipfile,self.kstream cannot be converted to a Python object for pickling"
jpayne@68 28423 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
jpayne@68 28424 * raise TypeError, "self.gzipfile,self.kstream cannot be converted to a Python object for pickling"
jpayne@68 28425 */
jpayne@68 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@68 28427
jpayne@68 28428 /* "pysam/libctabix.pyx":811
jpayne@68 28429 *
jpayne@68 28430 *
jpayne@68 28431 * def tabix_compress(filename_in, # <<<<<<<<<<<<<<
jpayne@68 28432 * filename_out,
jpayne@68 28433 * force=False):
jpayne@68 28434 */
jpayne@68 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@68 28436 __Pyx_GOTREF(__pyx_tuple__71);
jpayne@68 28437 __Pyx_GIVEREF(__pyx_tuple__71);
jpayne@68 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@68 28439 __pyx_tuple__72 = PyTuple_Pack(1, ((PyObject *)Py_False)); if (unlikely(!__pyx_tuple__72)) __PYX_ERR(0, 811, __pyx_L1_error)
jpayne@68 28440 __Pyx_GOTREF(__pyx_tuple__72);
jpayne@68 28441 __Pyx_GIVEREF(__pyx_tuple__72);
jpayne@68 28442
jpayne@68 28443 /* "pysam/libctabix.pyx":873
jpayne@68 28444 *
jpayne@68 28445 *
jpayne@68 28446 * def tabix_index(filename, # <<<<<<<<<<<<<<
jpayne@68 28447 * force=False,
jpayne@68 28448 * seq_col=None,
jpayne@68 28449 */
jpayne@68 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@68 28451 __Pyx_GOTREF(__pyx_tuple__73);
jpayne@68 28452 __Pyx_GIVEREF(__pyx_tuple__73);
jpayne@68 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@68 28454
jpayne@68 28455 /* "(tree fragment)":1
jpayne@68 28456 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
jpayne@68 28457 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
jpayne@68 28458 * def __setstate_cython__(self, __pyx_state):
jpayne@68 28459 */
jpayne@68 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@68 28461
jpayne@68 28462 /* "(tree fragment)":3
jpayne@68 28463 * def __reduce_cython__(self):
jpayne@68 28464 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
jpayne@68 28465 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
jpayne@68 28466 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
jpayne@68 28467 */
jpayne@68 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@68 28469
jpayne@68 28470 /* "pysam/libctabix.pyx":1183
jpayne@68 28471 * Permits the use of file-like objects for example from the gzip module.
jpayne@68 28472 * '''
jpayne@68 28473 * def __init__(self, infile, parser): # <<<<<<<<<<<<<<
jpayne@68 28474 *
jpayne@68 28475 * self.infile = infile
jpayne@68 28476 */
jpayne@68 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@68 28478 __Pyx_GOTREF(__pyx_tuple__74);
jpayne@68 28479 __Pyx_GIVEREF(__pyx_tuple__74);
jpayne@68 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@68 28481
jpayne@68 28482 /* "pysam/libctabix.pyx":1190
jpayne@68 28483 * self.parser = parser
jpayne@68 28484 *
jpayne@68 28485 * def __iter__(self): # <<<<<<<<<<<<<<
jpayne@68 28486 * return self
jpayne@68 28487 *
jpayne@68 28488 */
jpayne@68 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@68 28490
jpayne@68 28491 /* "pysam/libctabix.pyx":1194
jpayne@68 28492 *
jpayne@68 28493 * # cython version - required for python 3
jpayne@68 28494 * def __next__(self): # <<<<<<<<<<<<<<
jpayne@68 28495 *
jpayne@68 28496 * cdef char * b
jpayne@68 28497 */
jpayne@68 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@68 28499 __Pyx_GOTREF(__pyx_tuple__75);
jpayne@68 28500 __Pyx_GIVEREF(__pyx_tuple__75);
jpayne@68 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@68 28502
jpayne@68 28503 /* "pysam/libctabix.pyx":1238
jpayne@68 28504 *
jpayne@68 28505 *
jpayne@68 28506 * def tabix_iterator(infile, parser): # <<<<<<<<<<<<<<
jpayne@68 28507 * """return an iterator over all entries in a file.
jpayne@68 28508 *
jpayne@68 28509 */
jpayne@68 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@68 28511 __Pyx_GOTREF(__pyx_tuple__76);
jpayne@68 28512 __Pyx_GIVEREF(__pyx_tuple__76);
jpayne@68 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@68 28514
jpayne@68 28515 /* "(tree fragment)":1
jpayne@68 28516 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
jpayne@68 28517 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
jpayne@68 28518 * def __setstate_cython__(self, __pyx_state):
jpayne@68 28519 */
jpayne@68 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@68 28521
jpayne@68 28522 /* "(tree fragment)":3
jpayne@68 28523 * def __reduce_cython__(self):
jpayne@68 28524 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
jpayne@68 28525 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
jpayne@68 28526 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
jpayne@68 28527 */
jpayne@68 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@68 28529
jpayne@68 28530 /* "(tree fragment)":1
jpayne@68 28531 * def __pyx_unpickle_Parser(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
jpayne@68 28532 * cdef object __pyx_PickleError
jpayne@68 28533 * cdef object __pyx_result
jpayne@68 28534 */
jpayne@68 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@68 28536 __Pyx_GOTREF(__pyx_tuple__77);
jpayne@68 28537 __Pyx_GIVEREF(__pyx_tuple__77);
jpayne@68 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@68 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@68 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@68 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@68 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@68 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@68 28544 __Pyx_RefNannyFinishContext();
jpayne@68 28545 return 0;
jpayne@68 28546 __pyx_L1_error:;
jpayne@68 28547 __Pyx_RefNannyFinishContext();
jpayne@68 28548 return -1;
jpayne@68 28549 }
jpayne@68 28550 /* #### Code section: init_constants ### */
jpayne@68 28551
jpayne@68 28552 static CYTHON_SMALL_CODE int __Pyx_InitConstants(void) {
jpayne@68 28553 __pyx_umethod_PyDict_Type_keys.type = (PyObject*)&PyDict_Type;
jpayne@68 28554 __pyx_umethod_PyDict_Type_keys.method_name = &__pyx_n_s_keys;
jpayne@68 28555 if (__Pyx_CreateStringTabAndInitStrings() < 0) __PYX_ERR(0, 1, __pyx_L1_error);
jpayne@68 28556 __pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) __PYX_ERR(0, 1, __pyx_L1_error)
jpayne@68 28557 __pyx_int_1 = PyInt_FromLong(1); if (unlikely(!__pyx_int_1)) __PYX_ERR(0, 1, __pyx_L1_error)
jpayne@68 28558 __pyx_int_2 = PyInt_FromLong(2); if (unlikely(!__pyx_int_2)) __PYX_ERR(0, 1, __pyx_L1_error)
jpayne@68 28559 __pyx_int_3 = PyInt_FromLong(3); if (unlikely(!__pyx_int_3)) __PYX_ERR(0, 1, __pyx_L1_error)
jpayne@68 28560 __pyx_int_4 = PyInt_FromLong(4); if (unlikely(!__pyx_int_4)) __PYX_ERR(0, 1, __pyx_L1_error)
jpayne@68 28561 __pyx_int_5 = PyInt_FromLong(5); if (unlikely(!__pyx_int_5)) __PYX_ERR(0, 1, __pyx_L1_error)
jpayne@68 28562 __pyx_int_15 = PyInt_FromLong(15); if (unlikely(!__pyx_int_15)) __PYX_ERR(0, 1, __pyx_L1_error)
jpayne@68 28563 __pyx_int_17 = PyInt_FromLong(17); if (unlikely(!__pyx_int_17)) __PYX_ERR(0, 1, __pyx_L1_error)
jpayne@68 28564 __pyx_int_18 = PyInt_FromLong(18); if (unlikely(!__pyx_int_18)) __PYX_ERR(0, 1, __pyx_L1_error)
jpayne@68 28565 __pyx_int_35 = PyInt_FromLong(35); if (unlikely(!__pyx_int_35)) __PYX_ERR(0, 1, __pyx_L1_error)
jpayne@68 28566 __pyx_int_64 = PyInt_FromLong(64); if (unlikely(!__pyx_int_64)) __PYX_ERR(0, 1, __pyx_L1_error)
jpayne@68 28567 __pyx_int_21667264 = PyInt_FromLong(21667264L); if (unlikely(!__pyx_int_21667264)) __PYX_ERR(0, 1, __pyx_L1_error)
jpayne@68 28568 __pyx_int_139192863 = PyInt_FromLong(139192863L); if (unlikely(!__pyx_int_139192863)) __PYX_ERR(0, 1, __pyx_L1_error)
jpayne@68 28569 __pyx_int_243541226 = PyInt_FromLong(243541226L); if (unlikely(!__pyx_int_243541226)) __PYX_ERR(0, 1, __pyx_L1_error)
jpayne@68 28570 __pyx_int_neg_1 = PyInt_FromLong(-1); if (unlikely(!__pyx_int_neg_1)) __PYX_ERR(0, 1, __pyx_L1_error)
jpayne@68 28571 return 0;
jpayne@68 28572 __pyx_L1_error:;
jpayne@68 28573 return -1;
jpayne@68 28574 }
jpayne@68 28575 /* #### Code section: init_globals ### */
jpayne@68 28576
jpayne@68 28577 static CYTHON_SMALL_CODE int __Pyx_InitGlobals(void) {
jpayne@68 28578 /* AssertionsEnabled.init */
jpayne@68 28579 if (likely(__Pyx_init_assertions_enabled() == 0)); else
jpayne@68 28580
jpayne@68 28581 if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 1, __pyx_L1_error)
jpayne@68 28582
jpayne@68 28583 return 0;
jpayne@68 28584 __pyx_L1_error:;
jpayne@68 28585 return -1;
jpayne@68 28586 }
jpayne@68 28587 /* #### Code section: init_module ### */
jpayne@68 28588
jpayne@68 28589 static CYTHON_SMALL_CODE int __Pyx_modinit_global_init_code(void); /*proto*/
jpayne@68 28590 static CYTHON_SMALL_CODE int __Pyx_modinit_variable_export_code(void); /*proto*/
jpayne@68 28591 static CYTHON_SMALL_CODE int __Pyx_modinit_function_export_code(void); /*proto*/
jpayne@68 28592 static CYTHON_SMALL_CODE int __Pyx_modinit_type_init_code(void); /*proto*/
jpayne@68 28593 static CYTHON_SMALL_CODE int __Pyx_modinit_type_import_code(void); /*proto*/
jpayne@68 28594 static CYTHON_SMALL_CODE int __Pyx_modinit_variable_import_code(void); /*proto*/
jpayne@68 28595 static CYTHON_SMALL_CODE int __Pyx_modinit_function_import_code(void); /*proto*/
jpayne@68 28596
jpayne@68 28597 static int __Pyx_modinit_global_init_code(void) {
jpayne@68 28598 __Pyx_RefNannyDeclarations
jpayne@68 28599 __Pyx_RefNannySetupContext("__Pyx_modinit_global_init_code", 0);
jpayne@68 28600 /*--- Global init code ---*/
jpayne@68 28601 __Pyx_RefNannyFinishContext();
jpayne@68 28602 return 0;
jpayne@68 28603 }
jpayne@68 28604
jpayne@68 28605 static int __Pyx_modinit_variable_export_code(void) {
jpayne@68 28606 __Pyx_RefNannyDeclarations
jpayne@68 28607 __Pyx_RefNannySetupContext("__Pyx_modinit_variable_export_code", 0);
jpayne@68 28608 /*--- Variable export code ---*/
jpayne@68 28609 __Pyx_RefNannyFinishContext();
jpayne@68 28610 return 0;
jpayne@68 28611 }
jpayne@68 28612
jpayne@68 28613 static int __Pyx_modinit_function_export_code(void) {
jpayne@68 28614 __Pyx_RefNannyDeclarations
jpayne@68 28615 __Pyx_RefNannySetupContext("__Pyx_modinit_function_export_code", 0);
jpayne@68 28616 /*--- Function export code ---*/
jpayne@68 28617 __Pyx_RefNannyFinishContext();
jpayne@68 28618 return 0;
jpayne@68 28619 }
jpayne@68 28620
jpayne@68 28621 static int __Pyx_modinit_type_init_code(void) {
jpayne@68 28622 __Pyx_RefNannyDeclarations
jpayne@68 28623 PyObject *__pyx_t_1 = NULL;
jpayne@68 28624 PyObject *__pyx_t_2 = NULL;
jpayne@68 28625 int __pyx_lineno = 0;
jpayne@68 28626 const char *__pyx_filename = NULL;
jpayne@68 28627 int __pyx_clineno = 0;
jpayne@68 28628 __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0);
jpayne@68 28629 /*--- Type init code ---*/
jpayne@68 28630 __pyx_vtabptr_5pysam_9libctabix_tabix_file_iterator = &__pyx_vtable_5pysam_9libctabix_tabix_file_iterator;
jpayne@68 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@68 28632 #if CYTHON_USE_TYPE_SPECS
jpayne@68 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@68 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@68 28635 #else
jpayne@68 28636 __pyx_ptype_5pysam_9libctabix_tabix_file_iterator = &__pyx_type_5pysam_9libctabix_tabix_file_iterator;
jpayne@68 28637 #endif
jpayne@68 28638 #if !CYTHON_COMPILING_IN_LIMITED_API
jpayne@68 28639 #endif
jpayne@68 28640 #if !CYTHON_USE_TYPE_SPECS
jpayne@68 28641 if (__Pyx_PyType_Ready(__pyx_ptype_5pysam_9libctabix_tabix_file_iterator) < 0) __PYX_ERR(0, 1098, __pyx_L1_error)
jpayne@68 28642 #endif
jpayne@68 28643 #if PY_MAJOR_VERSION < 3
jpayne@68 28644 __pyx_ptype_5pysam_9libctabix_tabix_file_iterator->tp_print = 0;
jpayne@68 28645 #endif
jpayne@68 28646 #if !CYTHON_COMPILING_IN_LIMITED_API
jpayne@68 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@68 28648 __pyx_ptype_5pysam_9libctabix_tabix_file_iterator->tp_getattro = __Pyx_PyObject_GenericGetAttr;
jpayne@68 28649 }
jpayne@68 28650 #endif
jpayne@68 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@68 28652 #if !CYTHON_COMPILING_IN_LIMITED_API
jpayne@68 28653 if (__Pyx_MergeVtables(__pyx_ptype_5pysam_9libctabix_tabix_file_iterator) < 0) __PYX_ERR(0, 1098, __pyx_L1_error)
jpayne@68 28654 #endif
jpayne@68 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@68 28656 #if !CYTHON_COMPILING_IN_LIMITED_API
jpayne@68 28657 if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_5pysam_9libctabix_tabix_file_iterator) < 0) __PYX_ERR(0, 1098, __pyx_L1_error)
jpayne@68 28658 #endif
jpayne@68 28659 __pyx_t_1 = PyImport_ImportModule("pysam.libchtslib"); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error)
jpayne@68 28660 __Pyx_GOTREF(__pyx_t_1);
jpayne@68 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@68 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@68 28663 __pyx_vtabptr_5pysam_9libctabix_TabixFile = &__pyx_vtable_5pysam_9libctabix_TabixFile;
jpayne@68 28664 __pyx_vtable_5pysam_9libctabix_TabixFile.__pyx_base = *__pyx_vtabptr_5pysam_10libchtslib_HTSFile;
jpayne@68 28665 #if CYTHON_USE_TYPE_SPECS
jpayne@68 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@68 28667 __Pyx_GOTREF(__pyx_t_2);
jpayne@68 28668 __pyx_ptype_5pysam_9libctabix_TabixFile = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_5pysam_9libctabix_TabixFile_spec, __pyx_t_2);
jpayne@68 28669 __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@68 28670 if (unlikely(!__pyx_ptype_5pysam_9libctabix_TabixFile)) __PYX_ERR(0, 287, __pyx_L1_error)
jpayne@68 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@68 28672 #else
jpayne@68 28673 __pyx_ptype_5pysam_9libctabix_TabixFile = &__pyx_type_5pysam_9libctabix_TabixFile;
jpayne@68 28674 #endif
jpayne@68 28675 #if !CYTHON_COMPILING_IN_LIMITED_API
jpayne@68 28676 __pyx_ptype_5pysam_9libctabix_TabixFile->tp_base = __pyx_ptype_5pysam_10libchtslib_HTSFile;
jpayne@68 28677 #endif
jpayne@68 28678 #if !CYTHON_USE_TYPE_SPECS
jpayne@68 28679 if (__Pyx_PyType_Ready(__pyx_ptype_5pysam_9libctabix_TabixFile) < 0) __PYX_ERR(0, 287, __pyx_L1_error)
jpayne@68 28680 #endif
jpayne@68 28681 #if PY_MAJOR_VERSION < 3
jpayne@68 28682 __pyx_ptype_5pysam_9libctabix_TabixFile->tp_print = 0;
jpayne@68 28683 #endif
jpayne@68 28684 #if !CYTHON_COMPILING_IN_LIMITED_API
jpayne@68 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@68 28686 __pyx_ptype_5pysam_9libctabix_TabixFile->tp_getattro = __Pyx_PyObject_GenericGetAttr;
jpayne@68 28687 }
jpayne@68 28688 #endif
jpayne@68 28689 if (__Pyx_SetVtable(__pyx_ptype_5pysam_9libctabix_TabixFile, __pyx_vtabptr_5pysam_9libctabix_TabixFile) < 0) __PYX_ERR(0, 287, __pyx_L1_error)
jpayne@68 28690 #if !CYTHON_COMPILING_IN_LIMITED_API
jpayne@68 28691 if (__Pyx_MergeVtables(__pyx_ptype_5pysam_9libctabix_TabixFile) < 0) __PYX_ERR(0, 287, __pyx_L1_error)
jpayne@68 28692 #endif
jpayne@68 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@68 28694 #if !CYTHON_COMPILING_IN_LIMITED_API
jpayne@68 28695 if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_5pysam_9libctabix_TabixFile) < 0) __PYX_ERR(0, 287, __pyx_L1_error)
jpayne@68 28696 #endif
jpayne@68 28697 __pyx_vtabptr_5pysam_9libctabix_Parser = &__pyx_vtable_5pysam_9libctabix_Parser;
jpayne@68 28698 __pyx_vtable_5pysam_9libctabix_Parser.parse = (PyObject *(*)(struct __pyx_obj_5pysam_9libctabix_Parser *, char *, int))__pyx_f_5pysam_9libctabix_6Parser_parse;
jpayne@68 28699 #if CYTHON_USE_TYPE_SPECS
jpayne@68 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@68 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@68 28702 #else
jpayne@68 28703 __pyx_ptype_5pysam_9libctabix_Parser = &__pyx_type_5pysam_9libctabix_Parser;
jpayne@68 28704 #endif
jpayne@68 28705 #if !CYTHON_COMPILING_IN_LIMITED_API
jpayne@68 28706 #endif
jpayne@68 28707 #if !CYTHON_USE_TYPE_SPECS
jpayne@68 28708 if (__Pyx_PyType_Ready(__pyx_ptype_5pysam_9libctabix_Parser) < 0) __PYX_ERR(0, 82, __pyx_L1_error)
jpayne@68 28709 #endif
jpayne@68 28710 #if PY_MAJOR_VERSION < 3
jpayne@68 28711 __pyx_ptype_5pysam_9libctabix_Parser->tp_print = 0;
jpayne@68 28712 #endif
jpayne@68 28713 #if !CYTHON_COMPILING_IN_LIMITED_API
jpayne@68 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@68 28715 __pyx_ptype_5pysam_9libctabix_Parser->tp_getattro = __Pyx_PyObject_GenericGetAttr;
jpayne@68 28716 }
jpayne@68 28717 #endif
jpayne@68 28718 if (__Pyx_SetVtable(__pyx_ptype_5pysam_9libctabix_Parser, __pyx_vtabptr_5pysam_9libctabix_Parser) < 0) __PYX_ERR(0, 82, __pyx_L1_error)
jpayne@68 28719 #if !CYTHON_COMPILING_IN_LIMITED_API
jpayne@68 28720 if (__Pyx_MergeVtables(__pyx_ptype_5pysam_9libctabix_Parser) < 0) __PYX_ERR(0, 82, __pyx_L1_error)
jpayne@68 28721 #endif
jpayne@68 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@68 28723 #if !CYTHON_COMPILING_IN_LIMITED_API
jpayne@68 28724 if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_5pysam_9libctabix_Parser) < 0) __PYX_ERR(0, 82, __pyx_L1_error)
jpayne@68 28725 #endif
jpayne@68 28726 __pyx_vtabptr_5pysam_9libctabix_asTuple = &__pyx_vtable_5pysam_9libctabix_asTuple;
jpayne@68 28727 __pyx_vtable_5pysam_9libctabix_asTuple.__pyx_base = *__pyx_vtabptr_5pysam_9libctabix_Parser;
jpayne@68 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@68 28729 #if CYTHON_USE_TYPE_SPECS
jpayne@68 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@68 28731 __Pyx_GOTREF(__pyx_t_2);
jpayne@68 28732 __pyx_ptype_5pysam_9libctabix_asTuple = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_5pysam_9libctabix_asTuple_spec, __pyx_t_2);
jpayne@68 28733 __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@68 28734 if (unlikely(!__pyx_ptype_5pysam_9libctabix_asTuple)) __PYX_ERR(0, 101, __pyx_L1_error)
jpayne@68 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@68 28736 #else
jpayne@68 28737 __pyx_ptype_5pysam_9libctabix_asTuple = &__pyx_type_5pysam_9libctabix_asTuple;
jpayne@68 28738 #endif
jpayne@68 28739 #if !CYTHON_COMPILING_IN_LIMITED_API
jpayne@68 28740 __pyx_ptype_5pysam_9libctabix_asTuple->tp_base = __pyx_ptype_5pysam_9libctabix_Parser;
jpayne@68 28741 #endif
jpayne@68 28742 #if !CYTHON_USE_TYPE_SPECS
jpayne@68 28743 if (__Pyx_PyType_Ready(__pyx_ptype_5pysam_9libctabix_asTuple) < 0) __PYX_ERR(0, 101, __pyx_L1_error)
jpayne@68 28744 #endif
jpayne@68 28745 #if PY_MAJOR_VERSION < 3
jpayne@68 28746 __pyx_ptype_5pysam_9libctabix_asTuple->tp_print = 0;
jpayne@68 28747 #endif
jpayne@68 28748 #if !CYTHON_COMPILING_IN_LIMITED_API
jpayne@68 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@68 28750 __pyx_ptype_5pysam_9libctabix_asTuple->tp_getattro = __Pyx_PyObject_GenericGetAttr;
jpayne@68 28751 }
jpayne@68 28752 #endif
jpayne@68 28753 if (__Pyx_SetVtable(__pyx_ptype_5pysam_9libctabix_asTuple, __pyx_vtabptr_5pysam_9libctabix_asTuple) < 0) __PYX_ERR(0, 101, __pyx_L1_error)
jpayne@68 28754 #if !CYTHON_COMPILING_IN_LIMITED_API
jpayne@68 28755 if (__Pyx_MergeVtables(__pyx_ptype_5pysam_9libctabix_asTuple) < 0) __PYX_ERR(0, 101, __pyx_L1_error)
jpayne@68 28756 #endif
jpayne@68 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@68 28758 #if !CYTHON_COMPILING_IN_LIMITED_API
jpayne@68 28759 if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_5pysam_9libctabix_asTuple) < 0) __PYX_ERR(0, 101, __pyx_L1_error)
jpayne@68 28760 #endif
jpayne@68 28761 __pyx_vtabptr_5pysam_9libctabix_asGTF = &__pyx_vtable_5pysam_9libctabix_asGTF;
jpayne@68 28762 __pyx_vtable_5pysam_9libctabix_asGTF.__pyx_base = *__pyx_vtabptr_5pysam_9libctabix_Parser;
jpayne@68 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@68 28764 #if CYTHON_USE_TYPE_SPECS
jpayne@68 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@68 28766 __Pyx_GOTREF(__pyx_t_2);
jpayne@68 28767 __pyx_ptype_5pysam_9libctabix_asGTF = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_5pysam_9libctabix_asGTF_spec, __pyx_t_2);
jpayne@68 28768 __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@68 28769 if (unlikely(!__pyx_ptype_5pysam_9libctabix_asGTF)) __PYX_ERR(0, 151, __pyx_L1_error)
jpayne@68 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@68 28771 #else
jpayne@68 28772 __pyx_ptype_5pysam_9libctabix_asGTF = &__pyx_type_5pysam_9libctabix_asGTF;
jpayne@68 28773 #endif
jpayne@68 28774 #if !CYTHON_COMPILING_IN_LIMITED_API
jpayne@68 28775 __pyx_ptype_5pysam_9libctabix_asGTF->tp_base = __pyx_ptype_5pysam_9libctabix_Parser;
jpayne@68 28776 #endif
jpayne@68 28777 #if !CYTHON_USE_TYPE_SPECS
jpayne@68 28778 if (__Pyx_PyType_Ready(__pyx_ptype_5pysam_9libctabix_asGTF) < 0) __PYX_ERR(0, 151, __pyx_L1_error)
jpayne@68 28779 #endif
jpayne@68 28780 #if PY_MAJOR_VERSION < 3
jpayne@68 28781 __pyx_ptype_5pysam_9libctabix_asGTF->tp_print = 0;
jpayne@68 28782 #endif
jpayne@68 28783 #if !CYTHON_COMPILING_IN_LIMITED_API
jpayne@68 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@68 28785 __pyx_ptype_5pysam_9libctabix_asGTF->tp_getattro = __Pyx_PyObject_GenericGetAttr;
jpayne@68 28786 }
jpayne@68 28787 #endif
jpayne@68 28788 if (__Pyx_SetVtable(__pyx_ptype_5pysam_9libctabix_asGTF, __pyx_vtabptr_5pysam_9libctabix_asGTF) < 0) __PYX_ERR(0, 151, __pyx_L1_error)
jpayne@68 28789 #if !CYTHON_COMPILING_IN_LIMITED_API
jpayne@68 28790 if (__Pyx_MergeVtables(__pyx_ptype_5pysam_9libctabix_asGTF) < 0) __PYX_ERR(0, 151, __pyx_L1_error)
jpayne@68 28791 #endif
jpayne@68 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@68 28793 #if !CYTHON_COMPILING_IN_LIMITED_API
jpayne@68 28794 if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_5pysam_9libctabix_asGTF) < 0) __PYX_ERR(0, 151, __pyx_L1_error)
jpayne@68 28795 #endif
jpayne@68 28796 __pyx_vtabptr_5pysam_9libctabix_asGFF3 = &__pyx_vtable_5pysam_9libctabix_asGFF3;
jpayne@68 28797 __pyx_vtable_5pysam_9libctabix_asGFF3.__pyx_base = *__pyx_vtabptr_5pysam_9libctabix_Parser;
jpayne@68 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@68 28799 #if CYTHON_USE_TYPE_SPECS
jpayne@68 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@68 28801 __Pyx_GOTREF(__pyx_t_2);
jpayne@68 28802 __pyx_ptype_5pysam_9libctabix_asGFF3 = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_5pysam_9libctabix_asGFF3_spec, __pyx_t_2);
jpayne@68 28803 __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@68 28804 if (unlikely(!__pyx_ptype_5pysam_9libctabix_asGFF3)) __PYX_ERR(0, 115, __pyx_L1_error)
jpayne@68 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@68 28806 #else
jpayne@68 28807 __pyx_ptype_5pysam_9libctabix_asGFF3 = &__pyx_type_5pysam_9libctabix_asGFF3;
jpayne@68 28808 #endif
jpayne@68 28809 #if !CYTHON_COMPILING_IN_LIMITED_API
jpayne@68 28810 __pyx_ptype_5pysam_9libctabix_asGFF3->tp_base = __pyx_ptype_5pysam_9libctabix_Parser;
jpayne@68 28811 #endif
jpayne@68 28812 #if !CYTHON_USE_TYPE_SPECS
jpayne@68 28813 if (__Pyx_PyType_Ready(__pyx_ptype_5pysam_9libctabix_asGFF3) < 0) __PYX_ERR(0, 115, __pyx_L1_error)
jpayne@68 28814 #endif
jpayne@68 28815 #if PY_MAJOR_VERSION < 3
jpayne@68 28816 __pyx_ptype_5pysam_9libctabix_asGFF3->tp_print = 0;
jpayne@68 28817 #endif
jpayne@68 28818 #if !CYTHON_COMPILING_IN_LIMITED_API
jpayne@68 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@68 28820 __pyx_ptype_5pysam_9libctabix_asGFF3->tp_getattro = __Pyx_PyObject_GenericGetAttr;
jpayne@68 28821 }
jpayne@68 28822 #endif
jpayne@68 28823 if (__Pyx_SetVtable(__pyx_ptype_5pysam_9libctabix_asGFF3, __pyx_vtabptr_5pysam_9libctabix_asGFF3) < 0) __PYX_ERR(0, 115, __pyx_L1_error)
jpayne@68 28824 #if !CYTHON_COMPILING_IN_LIMITED_API
jpayne@68 28825 if (__Pyx_MergeVtables(__pyx_ptype_5pysam_9libctabix_asGFF3) < 0) __PYX_ERR(0, 115, __pyx_L1_error)
jpayne@68 28826 #endif
jpayne@68 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@68 28828 #if !CYTHON_COMPILING_IN_LIMITED_API
jpayne@68 28829 if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_5pysam_9libctabix_asGFF3) < 0) __PYX_ERR(0, 115, __pyx_L1_error)
jpayne@68 28830 #endif
jpayne@68 28831 __pyx_vtabptr_5pysam_9libctabix_asBed = &__pyx_vtable_5pysam_9libctabix_asBed;
jpayne@68 28832 __pyx_vtable_5pysam_9libctabix_asBed.__pyx_base = *__pyx_vtabptr_5pysam_9libctabix_Parser;
jpayne@68 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@68 28834 #if CYTHON_USE_TYPE_SPECS
jpayne@68 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@68 28836 __Pyx_GOTREF(__pyx_t_2);
jpayne@68 28837 __pyx_ptype_5pysam_9libctabix_asBed = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_5pysam_9libctabix_asBed_spec, __pyx_t_2);
jpayne@68 28838 __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@68 28839 if (unlikely(!__pyx_ptype_5pysam_9libctabix_asBed)) __PYX_ERR(0, 198, __pyx_L1_error)
jpayne@68 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@68 28841 #else
jpayne@68 28842 __pyx_ptype_5pysam_9libctabix_asBed = &__pyx_type_5pysam_9libctabix_asBed;
jpayne@68 28843 #endif
jpayne@68 28844 #if !CYTHON_COMPILING_IN_LIMITED_API
jpayne@68 28845 __pyx_ptype_5pysam_9libctabix_asBed->tp_base = __pyx_ptype_5pysam_9libctabix_Parser;
jpayne@68 28846 #endif
jpayne@68 28847 #if !CYTHON_USE_TYPE_SPECS
jpayne@68 28848 if (__Pyx_PyType_Ready(__pyx_ptype_5pysam_9libctabix_asBed) < 0) __PYX_ERR(0, 198, __pyx_L1_error)
jpayne@68 28849 #endif
jpayne@68 28850 #if PY_MAJOR_VERSION < 3
jpayne@68 28851 __pyx_ptype_5pysam_9libctabix_asBed->tp_print = 0;
jpayne@68 28852 #endif
jpayne@68 28853 #if !CYTHON_COMPILING_IN_LIMITED_API
jpayne@68 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@68 28855 __pyx_ptype_5pysam_9libctabix_asBed->tp_getattro = __Pyx_PyObject_GenericGetAttr;
jpayne@68 28856 }
jpayne@68 28857 #endif
jpayne@68 28858 if (__Pyx_SetVtable(__pyx_ptype_5pysam_9libctabix_asBed, __pyx_vtabptr_5pysam_9libctabix_asBed) < 0) __PYX_ERR(0, 198, __pyx_L1_error)
jpayne@68 28859 #if !CYTHON_COMPILING_IN_LIMITED_API
jpayne@68 28860 if (__Pyx_MergeVtables(__pyx_ptype_5pysam_9libctabix_asBed) < 0) __PYX_ERR(0, 198, __pyx_L1_error)
jpayne@68 28861 #endif
jpayne@68 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@68 28863 #if !CYTHON_COMPILING_IN_LIMITED_API
jpayne@68 28864 if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_5pysam_9libctabix_asBed) < 0) __PYX_ERR(0, 198, __pyx_L1_error)
jpayne@68 28865 #endif
jpayne@68 28866 __pyx_vtabptr_5pysam_9libctabix_asVCF = &__pyx_vtable_5pysam_9libctabix_asVCF;
jpayne@68 28867 __pyx_vtable_5pysam_9libctabix_asVCF.__pyx_base = *__pyx_vtabptr_5pysam_9libctabix_Parser;
jpayne@68 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@68 28869 #if CYTHON_USE_TYPE_SPECS
jpayne@68 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@68 28871 __Pyx_GOTREF(__pyx_t_2);
jpayne@68 28872 __pyx_ptype_5pysam_9libctabix_asVCF = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_5pysam_9libctabix_asVCF_spec, __pyx_t_2);
jpayne@68 28873 __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@68 28874 if (unlikely(!__pyx_ptype_5pysam_9libctabix_asVCF)) __PYX_ERR(0, 246, __pyx_L1_error)
jpayne@68 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@68 28876 #else
jpayne@68 28877 __pyx_ptype_5pysam_9libctabix_asVCF = &__pyx_type_5pysam_9libctabix_asVCF;
jpayne@68 28878 #endif
jpayne@68 28879 #if !CYTHON_COMPILING_IN_LIMITED_API
jpayne@68 28880 __pyx_ptype_5pysam_9libctabix_asVCF->tp_base = __pyx_ptype_5pysam_9libctabix_Parser;
jpayne@68 28881 #endif
jpayne@68 28882 #if !CYTHON_USE_TYPE_SPECS
jpayne@68 28883 if (__Pyx_PyType_Ready(__pyx_ptype_5pysam_9libctabix_asVCF) < 0) __PYX_ERR(0, 246, __pyx_L1_error)
jpayne@68 28884 #endif
jpayne@68 28885 #if PY_MAJOR_VERSION < 3
jpayne@68 28886 __pyx_ptype_5pysam_9libctabix_asVCF->tp_print = 0;
jpayne@68 28887 #endif
jpayne@68 28888 #if !CYTHON_COMPILING_IN_LIMITED_API
jpayne@68 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@68 28890 __pyx_ptype_5pysam_9libctabix_asVCF->tp_getattro = __Pyx_PyObject_GenericGetAttr;
jpayne@68 28891 }
jpayne@68 28892 #endif
jpayne@68 28893 if (__Pyx_SetVtable(__pyx_ptype_5pysam_9libctabix_asVCF, __pyx_vtabptr_5pysam_9libctabix_asVCF) < 0) __PYX_ERR(0, 246, __pyx_L1_error)
jpayne@68 28894 #if !CYTHON_COMPILING_IN_LIMITED_API
jpayne@68 28895 if (__Pyx_MergeVtables(__pyx_ptype_5pysam_9libctabix_asVCF) < 0) __PYX_ERR(0, 246, __pyx_L1_error)
jpayne@68 28896 #endif
jpayne@68 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@68 28898 #if !CYTHON_COMPILING_IN_LIMITED_API
jpayne@68 28899 if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_5pysam_9libctabix_asVCF) < 0) __PYX_ERR(0, 246, __pyx_L1_error)
jpayne@68 28900 #endif
jpayne@68 28901 __pyx_vtabptr_5pysam_9libctabix_TabixIterator = &__pyx_vtable_5pysam_9libctabix_TabixIterator;
jpayne@68 28902 __pyx_vtable_5pysam_9libctabix_TabixIterator.__pyx___cnext__ = (int (*)(struct __pyx_obj_5pysam_9libctabix_TabixIterator *))__pyx_f_5pysam_9libctabix_13TabixIterator___cnext__;
jpayne@68 28903 #if CYTHON_USE_TYPE_SPECS
jpayne@68 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@68 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@68 28906 #else
jpayne@68 28907 __pyx_ptype_5pysam_9libctabix_TabixIterator = &__pyx_type_5pysam_9libctabix_TabixIterator;
jpayne@68 28908 #endif
jpayne@68 28909 #if !CYTHON_COMPILING_IN_LIMITED_API
jpayne@68 28910 #endif
jpayne@68 28911 #if !CYTHON_USE_TYPE_SPECS
jpayne@68 28912 if (__Pyx_PyType_Ready(__pyx_ptype_5pysam_9libctabix_TabixIterator) < 0) __PYX_ERR(0, 619, __pyx_L1_error)
jpayne@68 28913 #endif
jpayne@68 28914 #if PY_MAJOR_VERSION < 3
jpayne@68 28915 __pyx_ptype_5pysam_9libctabix_TabixIterator->tp_print = 0;
jpayne@68 28916 #endif
jpayne@68 28917 #if !CYTHON_COMPILING_IN_LIMITED_API
jpayne@68 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@68 28919 __pyx_ptype_5pysam_9libctabix_TabixIterator->tp_getattro = __Pyx_PyObject_GenericGetAttr;
jpayne@68 28920 }
jpayne@68 28921 #endif
jpayne@68 28922 #if CYTHON_UPDATE_DESCRIPTOR_DOC
jpayne@68 28923 {
jpayne@68 28924 PyObject *wrapper = PyObject_GetAttrString((PyObject *)__pyx_ptype_5pysam_9libctabix_TabixIterator, "__next__"); if (unlikely(!wrapper)) __PYX_ERR(0, 619, __pyx_L1_error)
jpayne@68 28925 if (__Pyx_IS_TYPE(wrapper, &PyWrapperDescr_Type)) {
jpayne@68 28926 __pyx_wrapperbase_5pysam_9libctabix_13TabixIterator_4__next__ = *((PyWrapperDescrObject *)wrapper)->d_base;
jpayne@68 28927 __pyx_wrapperbase_5pysam_9libctabix_13TabixIterator_4__next__.doc = __pyx_doc_5pysam_9libctabix_13TabixIterator_4__next__;
jpayne@68 28928 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_5pysam_9libctabix_13TabixIterator_4__next__;
jpayne@68 28929 }
jpayne@68 28930 }
jpayne@68 28931 #endif
jpayne@68 28932 if (__Pyx_SetVtable(__pyx_ptype_5pysam_9libctabix_TabixIterator, __pyx_vtabptr_5pysam_9libctabix_TabixIterator) < 0) __PYX_ERR(0, 619, __pyx_L1_error)
jpayne@68 28933 #if !CYTHON_COMPILING_IN_LIMITED_API
jpayne@68 28934 if (__Pyx_MergeVtables(__pyx_ptype_5pysam_9libctabix_TabixIterator) < 0) __PYX_ERR(0, 619, __pyx_L1_error)
jpayne@68 28935 #endif
jpayne@68 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@68 28937 #if !CYTHON_COMPILING_IN_LIMITED_API
jpayne@68 28938 if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_5pysam_9libctabix_TabixIterator) < 0) __PYX_ERR(0, 619, __pyx_L1_error)
jpayne@68 28939 #endif
jpayne@68 28940 __pyx_vtabptr_5pysam_9libctabix_TabixIteratorParsed = &__pyx_vtable_5pysam_9libctabix_TabixIteratorParsed;
jpayne@68 28941 __pyx_vtable_5pysam_9libctabix_TabixIteratorParsed.__pyx_base = *__pyx_vtabptr_5pysam_9libctabix_TabixIterator;
jpayne@68 28942 #if CYTHON_USE_TYPE_SPECS
jpayne@68 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@68 28944 __Pyx_GOTREF(__pyx_t_2);
jpayne@68 28945 __pyx_ptype_5pysam_9libctabix_TabixIteratorParsed = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_5pysam_9libctabix_TabixIteratorParsed_spec, __pyx_t_2);
jpayne@68 28946 __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@68 28947 if (unlikely(!__pyx_ptype_5pysam_9libctabix_TabixIteratorParsed)) __PYX_ERR(0, 692, __pyx_L1_error)
jpayne@68 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@68 28949 #else
jpayne@68 28950 __pyx_ptype_5pysam_9libctabix_TabixIteratorParsed = &__pyx_type_5pysam_9libctabix_TabixIteratorParsed;
jpayne@68 28951 #endif
jpayne@68 28952 #if !CYTHON_COMPILING_IN_LIMITED_API
jpayne@68 28953 __pyx_ptype_5pysam_9libctabix_TabixIteratorParsed->tp_base = __pyx_ptype_5pysam_9libctabix_TabixIterator;
jpayne@68 28954 #endif
jpayne@68 28955 #if !CYTHON_USE_TYPE_SPECS
jpayne@68 28956 if (__Pyx_PyType_Ready(__pyx_ptype_5pysam_9libctabix_TabixIteratorParsed) < 0) __PYX_ERR(0, 692, __pyx_L1_error)
jpayne@68 28957 #endif
jpayne@68 28958 #if PY_MAJOR_VERSION < 3
jpayne@68 28959 __pyx_ptype_5pysam_9libctabix_TabixIteratorParsed->tp_print = 0;
jpayne@68 28960 #endif
jpayne@68 28961 #if !CYTHON_COMPILING_IN_LIMITED_API
jpayne@68 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@68 28963 __pyx_ptype_5pysam_9libctabix_TabixIteratorParsed->tp_getattro = __Pyx_PyObject_GenericGetAttr;
jpayne@68 28964 }
jpayne@68 28965 #endif
jpayne@68 28966 #if CYTHON_UPDATE_DESCRIPTOR_DOC
jpayne@68 28967 {
jpayne@68 28968 PyObject *wrapper = PyObject_GetAttrString((PyObject *)__pyx_ptype_5pysam_9libctabix_TabixIteratorParsed, "__next__"); if (unlikely(!wrapper)) __PYX_ERR(0, 692, __pyx_L1_error)
jpayne@68 28969 if (__Pyx_IS_TYPE(wrapper, &PyWrapperDescr_Type)) {
jpayne@68 28970 __pyx_wrapperbase_5pysam_9libctabix_19TabixIteratorParsed_2__next__ = *((PyWrapperDescrObject *)wrapper)->d_base;
jpayne@68 28971 __pyx_wrapperbase_5pysam_9libctabix_19TabixIteratorParsed_2__next__.doc = __pyx_doc_5pysam_9libctabix_19TabixIteratorParsed_2__next__;
jpayne@68 28972 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_5pysam_9libctabix_19TabixIteratorParsed_2__next__;
jpayne@68 28973 }
jpayne@68 28974 }
jpayne@68 28975 #endif
jpayne@68 28976 if (__Pyx_SetVtable(__pyx_ptype_5pysam_9libctabix_TabixIteratorParsed, __pyx_vtabptr_5pysam_9libctabix_TabixIteratorParsed) < 0) __PYX_ERR(0, 692, __pyx_L1_error)
jpayne@68 28977 #if !CYTHON_COMPILING_IN_LIMITED_API
jpayne@68 28978 if (__Pyx_MergeVtables(__pyx_ptype_5pysam_9libctabix_TabixIteratorParsed) < 0) __PYX_ERR(0, 692, __pyx_L1_error)
jpayne@68 28979 #endif
jpayne@68 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@68 28981 #if !CYTHON_COMPILING_IN_LIMITED_API
jpayne@68 28982 if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_5pysam_9libctabix_TabixIteratorParsed) < 0) __PYX_ERR(0, 692, __pyx_L1_error)
jpayne@68 28983 #endif
jpayne@68 28984 __pyx_vtabptr_5pysam_9libctabix_GZIterator = &__pyx_vtable_5pysam_9libctabix_GZIterator;
jpayne@68 28985 __pyx_vtable_5pysam_9libctabix_GZIterator.__pyx___cnext__ = (int (*)(struct __pyx_obj_5pysam_9libctabix_GZIterator *))__pyx_f_5pysam_9libctabix_10GZIterator___cnext__;
jpayne@68 28986 #if CYTHON_USE_TYPE_SPECS
jpayne@68 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@68 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@68 28989 #else
jpayne@68 28990 __pyx_ptype_5pysam_9libctabix_GZIterator = &__pyx_type_5pysam_9libctabix_GZIterator;
jpayne@68 28991 #endif
jpayne@68 28992 #if !CYTHON_COMPILING_IN_LIMITED_API
jpayne@68 28993 #endif
jpayne@68 28994 #if !CYTHON_USE_TYPE_SPECS
jpayne@68 28995 if (__Pyx_PyType_Ready(__pyx_ptype_5pysam_9libctabix_GZIterator) < 0) __PYX_ERR(0, 720, __pyx_L1_error)
jpayne@68 28996 #endif
jpayne@68 28997 #if PY_MAJOR_VERSION < 3
jpayne@68 28998 __pyx_ptype_5pysam_9libctabix_GZIterator->tp_print = 0;
jpayne@68 28999 #endif
jpayne@68 29000 #if !CYTHON_COMPILING_IN_LIMITED_API
jpayne@68 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@68 29002 __pyx_ptype_5pysam_9libctabix_GZIterator->tp_getattro = __Pyx_PyObject_GenericGetAttr;
jpayne@68 29003 }
jpayne@68 29004 #endif
jpayne@68 29005 #if CYTHON_UPDATE_DESCRIPTOR_DOC
jpayne@68 29006 {
jpayne@68 29007 PyObject *wrapper = PyObject_GetAttrString((PyObject *)__pyx_ptype_5pysam_9libctabix_GZIterator, "__init__"); if (unlikely(!wrapper)) __PYX_ERR(0, 720, __pyx_L1_error)
jpayne@68 29008 if (__Pyx_IS_TYPE(wrapper, &PyWrapperDescr_Type)) {
jpayne@68 29009 __pyx_wrapperbase_5pysam_9libctabix_10GZIterator___init__ = *((PyWrapperDescrObject *)wrapper)->d_base;
jpayne@68 29010 __pyx_wrapperbase_5pysam_9libctabix_10GZIterator___init__.doc = __pyx_doc_5pysam_9libctabix_10GZIterator___init__;
jpayne@68 29011 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_5pysam_9libctabix_10GZIterator___init__;
jpayne@68 29012 }
jpayne@68 29013 }
jpayne@68 29014 #endif
jpayne@68 29015 #if CYTHON_UPDATE_DESCRIPTOR_DOC
jpayne@68 29016 {
jpayne@68 29017 PyObject *wrapper = PyObject_GetAttrString((PyObject *)__pyx_ptype_5pysam_9libctabix_GZIterator, "__next__"); if (unlikely(!wrapper)) __PYX_ERR(0, 720, __pyx_L1_error)
jpayne@68 29018 if (__Pyx_IS_TYPE(wrapper, &PyWrapperDescr_Type)) {
jpayne@68 29019 __pyx_wrapperbase_5pysam_9libctabix_10GZIterator_6__next__ = *((PyWrapperDescrObject *)wrapper)->d_base;
jpayne@68 29020 __pyx_wrapperbase_5pysam_9libctabix_10GZIterator_6__next__.doc = __pyx_doc_5pysam_9libctabix_10GZIterator_6__next__;
jpayne@68 29021 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_5pysam_9libctabix_10GZIterator_6__next__;
jpayne@68 29022 }
jpayne@68 29023 }
jpayne@68 29024 #endif
jpayne@68 29025 if (__Pyx_SetVtable(__pyx_ptype_5pysam_9libctabix_GZIterator, __pyx_vtabptr_5pysam_9libctabix_GZIterator) < 0) __PYX_ERR(0, 720, __pyx_L1_error)
jpayne@68 29026 #if !CYTHON_COMPILING_IN_LIMITED_API
jpayne@68 29027 if (__Pyx_MergeVtables(__pyx_ptype_5pysam_9libctabix_GZIterator) < 0) __PYX_ERR(0, 720, __pyx_L1_error)
jpayne@68 29028 #endif
jpayne@68 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@68 29030 #if !CYTHON_COMPILING_IN_LIMITED_API
jpayne@68 29031 if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_5pysam_9libctabix_GZIterator) < 0) __PYX_ERR(0, 720, __pyx_L1_error)
jpayne@68 29032 #endif
jpayne@68 29033 __pyx_vtabptr_5pysam_9libctabix_GZIteratorHead = &__pyx_vtable_5pysam_9libctabix_GZIteratorHead;
jpayne@68 29034 __pyx_vtable_5pysam_9libctabix_GZIteratorHead.__pyx_base = *__pyx_vtabptr_5pysam_9libctabix_GZIterator;
jpayne@68 29035 #if CYTHON_USE_TYPE_SPECS
jpayne@68 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@68 29037 __Pyx_GOTREF(__pyx_t_2);
jpayne@68 29038 __pyx_ptype_5pysam_9libctabix_GZIteratorHead = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_5pysam_9libctabix_GZIteratorHead_spec, __pyx_t_2);
jpayne@68 29039 __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@68 29040 if (unlikely(!__pyx_ptype_5pysam_9libctabix_GZIteratorHead)) __PYX_ERR(0, 775, __pyx_L1_error)
jpayne@68 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@68 29042 #else
jpayne@68 29043 __pyx_ptype_5pysam_9libctabix_GZIteratorHead = &__pyx_type_5pysam_9libctabix_GZIteratorHead;
jpayne@68 29044 #endif
jpayne@68 29045 #if !CYTHON_COMPILING_IN_LIMITED_API
jpayne@68 29046 __pyx_ptype_5pysam_9libctabix_GZIteratorHead->tp_base = __pyx_ptype_5pysam_9libctabix_GZIterator;
jpayne@68 29047 #endif
jpayne@68 29048 #if !CYTHON_USE_TYPE_SPECS
jpayne@68 29049 if (__Pyx_PyType_Ready(__pyx_ptype_5pysam_9libctabix_GZIteratorHead) < 0) __PYX_ERR(0, 775, __pyx_L1_error)
jpayne@68 29050 #endif
jpayne@68 29051 #if PY_MAJOR_VERSION < 3
jpayne@68 29052 __pyx_ptype_5pysam_9libctabix_GZIteratorHead->tp_print = 0;
jpayne@68 29053 #endif
jpayne@68 29054 #if !CYTHON_COMPILING_IN_LIMITED_API
jpayne@68 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@68 29056 __pyx_ptype_5pysam_9libctabix_GZIteratorHead->tp_getattro = __Pyx_PyObject_GenericGetAttr;
jpayne@68 29057 }
jpayne@68 29058 #endif
jpayne@68 29059 #if CYTHON_UPDATE_DESCRIPTOR_DOC
jpayne@68 29060 {
jpayne@68 29061 PyObject *wrapper = PyObject_GetAttrString((PyObject *)__pyx_ptype_5pysam_9libctabix_GZIteratorHead, "__next__"); if (unlikely(!wrapper)) __PYX_ERR(0, 775, __pyx_L1_error)
jpayne@68 29062 if (__Pyx_IS_TYPE(wrapper, &PyWrapperDescr_Type)) {
jpayne@68 29063 __pyx_wrapperbase_5pysam_9libctabix_14GZIteratorHead___next__ = *((PyWrapperDescrObject *)wrapper)->d_base;
jpayne@68 29064 __pyx_wrapperbase_5pysam_9libctabix_14GZIteratorHead___next__.doc = __pyx_doc_5pysam_9libctabix_14GZIteratorHead___next__;
jpayne@68 29065 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_5pysam_9libctabix_14GZIteratorHead___next__;
jpayne@68 29066 }
jpayne@68 29067 }
jpayne@68 29068 #endif
jpayne@68 29069 if (__Pyx_SetVtable(__pyx_ptype_5pysam_9libctabix_GZIteratorHead, __pyx_vtabptr_5pysam_9libctabix_GZIteratorHead) < 0) __PYX_ERR(0, 775, __pyx_L1_error)
jpayne@68 29070 #if !CYTHON_COMPILING_IN_LIMITED_API
jpayne@68 29071 if (__Pyx_MergeVtables(__pyx_ptype_5pysam_9libctabix_GZIteratorHead) < 0) __PYX_ERR(0, 775, __pyx_L1_error)
jpayne@68 29072 #endif
jpayne@68 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@68 29074 #if !CYTHON_COMPILING_IN_LIMITED_API
jpayne@68 29075 if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_5pysam_9libctabix_GZIteratorHead) < 0) __PYX_ERR(0, 775, __pyx_L1_error)
jpayne@68 29076 #endif
jpayne@68 29077 __pyx_vtabptr_5pysam_9libctabix_GZIteratorParsed = &__pyx_vtable_5pysam_9libctabix_GZIteratorParsed;
jpayne@68 29078 __pyx_vtable_5pysam_9libctabix_GZIteratorParsed.__pyx_base = *__pyx_vtabptr_5pysam_9libctabix_GZIterator;
jpayne@68 29079 #if CYTHON_USE_TYPE_SPECS
jpayne@68 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@68 29081 __Pyx_GOTREF(__pyx_t_2);
jpayne@68 29082 __pyx_ptype_5pysam_9libctabix_GZIteratorParsed = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_5pysam_9libctabix_GZIteratorParsed_spec, __pyx_t_2);
jpayne@68 29083 __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@68 29084 if (unlikely(!__pyx_ptype_5pysam_9libctabix_GZIteratorParsed)) __PYX_ERR(0, 792, __pyx_L1_error)
jpayne@68 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@68 29086 #else
jpayne@68 29087 __pyx_ptype_5pysam_9libctabix_GZIteratorParsed = &__pyx_type_5pysam_9libctabix_GZIteratorParsed;
jpayne@68 29088 #endif
jpayne@68 29089 #if !CYTHON_COMPILING_IN_LIMITED_API
jpayne@68 29090 __pyx_ptype_5pysam_9libctabix_GZIteratorParsed->tp_base = __pyx_ptype_5pysam_9libctabix_GZIterator;
jpayne@68 29091 #endif
jpayne@68 29092 #if !CYTHON_USE_TYPE_SPECS
jpayne@68 29093 if (__Pyx_PyType_Ready(__pyx_ptype_5pysam_9libctabix_GZIteratorParsed) < 0) __PYX_ERR(0, 792, __pyx_L1_error)
jpayne@68 29094 #endif
jpayne@68 29095 #if PY_MAJOR_VERSION < 3
jpayne@68 29096 __pyx_ptype_5pysam_9libctabix_GZIteratorParsed->tp_print = 0;
jpayne@68 29097 #endif
jpayne@68 29098 #if !CYTHON_COMPILING_IN_LIMITED_API
jpayne@68 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@68 29100 __pyx_ptype_5pysam_9libctabix_GZIteratorParsed->tp_getattro = __Pyx_PyObject_GenericGetAttr;
jpayne@68 29101 }
jpayne@68 29102 #endif
jpayne@68 29103 #if CYTHON_UPDATE_DESCRIPTOR_DOC
jpayne@68 29104 {
jpayne@68 29105 PyObject *wrapper = PyObject_GetAttrString((PyObject *)__pyx_ptype_5pysam_9libctabix_GZIteratorParsed, "__next__"); if (unlikely(!wrapper)) __PYX_ERR(0, 792, __pyx_L1_error)
jpayne@68 29106 if (__Pyx_IS_TYPE(wrapper, &PyWrapperDescr_Type)) {
jpayne@68 29107 __pyx_wrapperbase_5pysam_9libctabix_16GZIteratorParsed_2__next__ = *((PyWrapperDescrObject *)wrapper)->d_base;
jpayne@68 29108 __pyx_wrapperbase_5pysam_9libctabix_16GZIteratorParsed_2__next__.doc = __pyx_doc_5pysam_9libctabix_16GZIteratorParsed_2__next__;
jpayne@68 29109 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_5pysam_9libctabix_16GZIteratorParsed_2__next__;
jpayne@68 29110 }
jpayne@68 29111 }
jpayne@68 29112 #endif
jpayne@68 29113 if (__Pyx_SetVtable(__pyx_ptype_5pysam_9libctabix_GZIteratorParsed, __pyx_vtabptr_5pysam_9libctabix_GZIteratorParsed) < 0) __PYX_ERR(0, 792, __pyx_L1_error)
jpayne@68 29114 #if !CYTHON_COMPILING_IN_LIMITED_API
jpayne@68 29115 if (__Pyx_MergeVtables(__pyx_ptype_5pysam_9libctabix_GZIteratorParsed) < 0) __PYX_ERR(0, 792, __pyx_L1_error)
jpayne@68 29116 #endif
jpayne@68 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@68 29118 #if !CYTHON_COMPILING_IN_LIMITED_API
jpayne@68 29119 if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_5pysam_9libctabix_GZIteratorParsed) < 0) __PYX_ERR(0, 792, __pyx_L1_error)
jpayne@68 29120 #endif
jpayne@68 29121 __pyx_vtabptr_5pysam_9libctabix_Tabixfile = &__pyx_vtable_5pysam_9libctabix_Tabixfile;
jpayne@68 29122 __pyx_vtable_5pysam_9libctabix_Tabixfile.__pyx_base = *__pyx_vtabptr_5pysam_9libctabix_TabixFile;
jpayne@68 29123 #if CYTHON_USE_TYPE_SPECS
jpayne@68 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@68 29125 __Pyx_GOTREF(__pyx_t_2);
jpayne@68 29126 __pyx_ptype_5pysam_9libctabix_Tabixfile = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_5pysam_9libctabix_Tabixfile_spec, __pyx_t_2);
jpayne@68 29127 __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@68 29128 if (unlikely(!__pyx_ptype_5pysam_9libctabix_Tabixfile)) __PYX_ERR(0, 1251, __pyx_L1_error)
jpayne@68 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@68 29130 #else
jpayne@68 29131 __pyx_ptype_5pysam_9libctabix_Tabixfile = &__pyx_type_5pysam_9libctabix_Tabixfile;
jpayne@68 29132 #endif
jpayne@68 29133 #if !CYTHON_COMPILING_IN_LIMITED_API
jpayne@68 29134 __pyx_ptype_5pysam_9libctabix_Tabixfile->tp_base = __pyx_ptype_5pysam_9libctabix_TabixFile;
jpayne@68 29135 #endif
jpayne@68 29136 #if !CYTHON_USE_TYPE_SPECS
jpayne@68 29137 if (__Pyx_PyType_Ready(__pyx_ptype_5pysam_9libctabix_Tabixfile) < 0) __PYX_ERR(0, 1251, __pyx_L1_error)
jpayne@68 29138 #endif
jpayne@68 29139 #if PY_MAJOR_VERSION < 3
jpayne@68 29140 __pyx_ptype_5pysam_9libctabix_Tabixfile->tp_print = 0;
jpayne@68 29141 #endif
jpayne@68 29142 #if !CYTHON_COMPILING_IN_LIMITED_API
jpayne@68 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@68 29144 __pyx_ptype_5pysam_9libctabix_Tabixfile->tp_getattro = __Pyx_PyObject_GenericGetAttr;
jpayne@68 29145 }
jpayne@68 29146 #endif
jpayne@68 29147 if (__Pyx_SetVtable(__pyx_ptype_5pysam_9libctabix_Tabixfile, __pyx_vtabptr_5pysam_9libctabix_Tabixfile) < 0) __PYX_ERR(0, 1251, __pyx_L1_error)
jpayne@68 29148 #if !CYTHON_COMPILING_IN_LIMITED_API
jpayne@68 29149 if (__Pyx_MergeVtables(__pyx_ptype_5pysam_9libctabix_Tabixfile) < 0) __PYX_ERR(0, 1251, __pyx_L1_error)
jpayne@68 29150 #endif
jpayne@68 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@68 29152 #if !CYTHON_COMPILING_IN_LIMITED_API
jpayne@68 29153 if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_5pysam_9libctabix_Tabixfile) < 0) __PYX_ERR(0, 1251, __pyx_L1_error)
jpayne@68 29154 #endif
jpayne@68 29155 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@68 29156 __Pyx_RefNannyFinishContext();
jpayne@68 29157 return 0;
jpayne@68 29158 __pyx_L1_error:;
jpayne@68 29159 __Pyx_XDECREF(__pyx_t_1);
jpayne@68 29160 __Pyx_XDECREF(__pyx_t_2);
jpayne@68 29161 __Pyx_RefNannyFinishContext();
jpayne@68 29162 return -1;
jpayne@68 29163 }
jpayne@68 29164
jpayne@68 29165 static int __Pyx_modinit_type_import_code(void) {
jpayne@68 29166 __Pyx_RefNannyDeclarations
jpayne@68 29167 PyObject *__pyx_t_1 = NULL;
jpayne@68 29168 int __pyx_lineno = 0;
jpayne@68 29169 const char *__pyx_filename = NULL;
jpayne@68 29170 int __pyx_clineno = 0;
jpayne@68 29171 __Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0);
jpayne@68 29172 /*--- Type import code ---*/
jpayne@68 29173 __pyx_t_1 = PyImport_ImportModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 9, __pyx_L1_error)
jpayne@68 29174 __Pyx_GOTREF(__pyx_t_1);
jpayne@68 29175 __pyx_ptype_7cpython_4type_type = __Pyx_ImportType_3_0_11(__pyx_t_1, __Pyx_BUILTIN_MODULE_NAME, "type",
jpayne@68 29176 #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
jpayne@68 29177 sizeof(PyTypeObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_11(PyTypeObject),
jpayne@68 29178 #elif CYTHON_COMPILING_IN_LIMITED_API
jpayne@68 29179 sizeof(PyTypeObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_11(PyTypeObject),
jpayne@68 29180 #else
jpayne@68 29181 sizeof(PyHeapTypeObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_11(PyHeapTypeObject),
jpayne@68 29182 #endif
jpayne@68 29183 __Pyx_ImportType_CheckSize_Warn_3_0_11); if (!__pyx_ptype_7cpython_4type_type) __PYX_ERR(5, 9, __pyx_L1_error)
jpayne@68 29184 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@68 29185 __pyx_t_1 = PyImport_ImportModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 8, __pyx_L1_error)
jpayne@68 29186 __Pyx_GOTREF(__pyx_t_1);
jpayne@68 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@68 29188 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@68 29189 __pyx_t_1 = PyImport_ImportModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 15, __pyx_L1_error)
jpayne@68 29190 __Pyx_GOTREF(__pyx_t_1);
jpayne@68 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@68 29192 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@68 29193 __pyx_t_1 = PyImport_ImportModule("pysam.libctabixproxies"); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 5, __pyx_L1_error)
jpayne@68 29194 __Pyx_GOTREF(__pyx_t_1);
jpayne@68 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@68 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@68 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@68 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@68 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@68 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@68 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@68 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@68 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@68 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@68 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@68 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@68 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@68 29208 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@68 29209 __pyx_t_1 = PyImport_ImportModule("array"); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 69, __pyx_L1_error)
jpayne@68 29210 __Pyx_GOTREF(__pyx_t_1);
jpayne@68 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@68 29212 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@68 29213 __Pyx_RefNannyFinishContext();
jpayne@68 29214 return 0;
jpayne@68 29215 __pyx_L1_error:;
jpayne@68 29216 __Pyx_XDECREF(__pyx_t_1);
jpayne@68 29217 __Pyx_RefNannyFinishContext();
jpayne@68 29218 return -1;
jpayne@68 29219 }
jpayne@68 29220
jpayne@68 29221 static int __Pyx_modinit_variable_import_code(void) {
jpayne@68 29222 __Pyx_RefNannyDeclarations
jpayne@68 29223 __Pyx_RefNannySetupContext("__Pyx_modinit_variable_import_code", 0);
jpayne@68 29224 /*--- Variable import code ---*/
jpayne@68 29225 __Pyx_RefNannyFinishContext();
jpayne@68 29226 return 0;
jpayne@68 29227 }
jpayne@68 29228
jpayne@68 29229 static int __Pyx_modinit_function_import_code(void) {
jpayne@68 29230 __Pyx_RefNannyDeclarations
jpayne@68 29231 PyObject *__pyx_t_1 = NULL;
jpayne@68 29232 int __pyx_lineno = 0;
jpayne@68 29233 const char *__pyx_filename = NULL;
jpayne@68 29234 int __pyx_clineno = 0;
jpayne@68 29235 __Pyx_RefNannySetupContext("__Pyx_modinit_function_import_code", 0);
jpayne@68 29236 /*--- Function import code ---*/
jpayne@68 29237 __pyx_t_1 = PyImport_ImportModule("pysam.libcutils"); if (!__pyx_t_1) __PYX_ERR(0, 1, __pyx_L1_error)
jpayne@68 29238 __Pyx_GOTREF(__pyx_t_1);
jpayne@68 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@68 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@68 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@68 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@68 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@68 29244 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@68 29245 __Pyx_RefNannyFinishContext();
jpayne@68 29246 return 0;
jpayne@68 29247 __pyx_L1_error:;
jpayne@68 29248 __Pyx_XDECREF(__pyx_t_1);
jpayne@68 29249 __Pyx_RefNannyFinishContext();
jpayne@68 29250 return -1;
jpayne@68 29251 }
jpayne@68 29252
jpayne@68 29253
jpayne@68 29254 #if PY_MAJOR_VERSION >= 3
jpayne@68 29255 #if CYTHON_PEP489_MULTI_PHASE_INIT
jpayne@68 29256 static PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def); /*proto*/
jpayne@68 29257 static int __pyx_pymod_exec_libctabix(PyObject* module); /*proto*/
jpayne@68 29258 static PyModuleDef_Slot __pyx_moduledef_slots[] = {
jpayne@68 29259 {Py_mod_create, (void*)__pyx_pymod_create},
jpayne@68 29260 {Py_mod_exec, (void*)__pyx_pymod_exec_libctabix},
jpayne@68 29261 {0, NULL}
jpayne@68 29262 };
jpayne@68 29263 #endif
jpayne@68 29264
jpayne@68 29265 #ifdef __cplusplus
jpayne@68 29266 namespace {
jpayne@68 29267 struct PyModuleDef __pyx_moduledef =
jpayne@68 29268 #else
jpayne@68 29269 static struct PyModuleDef __pyx_moduledef =
jpayne@68 29270 #endif
jpayne@68 29271 {
jpayne@68 29272 PyModuleDef_HEAD_INIT,
jpayne@68 29273 "libctabix",
jpayne@68 29274 0, /* m_doc */
jpayne@68 29275 #if CYTHON_PEP489_MULTI_PHASE_INIT
jpayne@68 29276 0, /* m_size */
jpayne@68 29277 #elif CYTHON_USE_MODULE_STATE
jpayne@68 29278 sizeof(__pyx_mstate), /* m_size */
jpayne@68 29279 #else
jpayne@68 29280 -1, /* m_size */
jpayne@68 29281 #endif
jpayne@68 29282 __pyx_methods /* m_methods */,
jpayne@68 29283 #if CYTHON_PEP489_MULTI_PHASE_INIT
jpayne@68 29284 __pyx_moduledef_slots, /* m_slots */
jpayne@68 29285 #else
jpayne@68 29286 NULL, /* m_reload */
jpayne@68 29287 #endif
jpayne@68 29288 #if CYTHON_USE_MODULE_STATE
jpayne@68 29289 __pyx_m_traverse, /* m_traverse */
jpayne@68 29290 __pyx_m_clear, /* m_clear */
jpayne@68 29291 NULL /* m_free */
jpayne@68 29292 #else
jpayne@68 29293 NULL, /* m_traverse */
jpayne@68 29294 NULL, /* m_clear */
jpayne@68 29295 NULL /* m_free */
jpayne@68 29296 #endif
jpayne@68 29297 };
jpayne@68 29298 #ifdef __cplusplus
jpayne@68 29299 } /* anonymous namespace */
jpayne@68 29300 #endif
jpayne@68 29301 #endif
jpayne@68 29302
jpayne@68 29303 #ifndef CYTHON_NO_PYINIT_EXPORT
jpayne@68 29304 #define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC
jpayne@68 29305 #elif PY_MAJOR_VERSION < 3
jpayne@68 29306 #ifdef __cplusplus
jpayne@68 29307 #define __Pyx_PyMODINIT_FUNC extern "C" void
jpayne@68 29308 #else
jpayne@68 29309 #define __Pyx_PyMODINIT_FUNC void
jpayne@68 29310 #endif
jpayne@68 29311 #else
jpayne@68 29312 #ifdef __cplusplus
jpayne@68 29313 #define __Pyx_PyMODINIT_FUNC extern "C" PyObject *
jpayne@68 29314 #else
jpayne@68 29315 #define __Pyx_PyMODINIT_FUNC PyObject *
jpayne@68 29316 #endif
jpayne@68 29317 #endif
jpayne@68 29318
jpayne@68 29319
jpayne@68 29320 #if PY_MAJOR_VERSION < 3
jpayne@68 29321 __Pyx_PyMODINIT_FUNC initlibctabix(void) CYTHON_SMALL_CODE; /*proto*/
jpayne@68 29322 __Pyx_PyMODINIT_FUNC initlibctabix(void)
jpayne@68 29323 #else
jpayne@68 29324 __Pyx_PyMODINIT_FUNC PyInit_libctabix(void) CYTHON_SMALL_CODE; /*proto*/
jpayne@68 29325 __Pyx_PyMODINIT_FUNC PyInit_libctabix(void)
jpayne@68 29326 #if CYTHON_PEP489_MULTI_PHASE_INIT
jpayne@68 29327 {
jpayne@68 29328 return PyModuleDef_Init(&__pyx_moduledef);
jpayne@68 29329 }
jpayne@68 29330 static CYTHON_SMALL_CODE int __Pyx_check_single_interpreter(void) {
jpayne@68 29331 #if PY_VERSION_HEX >= 0x030700A1
jpayne@68 29332 static PY_INT64_T main_interpreter_id = -1;
jpayne@68 29333 PY_INT64_T current_id = PyInterpreterState_GetID(PyThreadState_Get()->interp);
jpayne@68 29334 if (main_interpreter_id == -1) {
jpayne@68 29335 main_interpreter_id = current_id;
jpayne@68 29336 return (unlikely(current_id == -1)) ? -1 : 0;
jpayne@68 29337 } else if (unlikely(main_interpreter_id != current_id))
jpayne@68 29338 #else
jpayne@68 29339 static PyInterpreterState *main_interpreter = NULL;
jpayne@68 29340 PyInterpreterState *current_interpreter = PyThreadState_Get()->interp;
jpayne@68 29341 if (!main_interpreter) {
jpayne@68 29342 main_interpreter = current_interpreter;
jpayne@68 29343 } else if (unlikely(main_interpreter != current_interpreter))
jpayne@68 29344 #endif
jpayne@68 29345 {
jpayne@68 29346 PyErr_SetString(
jpayne@68 29347 PyExc_ImportError,
jpayne@68 29348 "Interpreter change detected - this module can only be loaded into one interpreter per process.");
jpayne@68 29349 return -1;
jpayne@68 29350 }
jpayne@68 29351 return 0;
jpayne@68 29352 }
jpayne@68 29353 #if CYTHON_COMPILING_IN_LIMITED_API
jpayne@68 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@68 29355 #else
jpayne@68 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@68 29357 #endif
jpayne@68 29358 {
jpayne@68 29359 PyObject *value = PyObject_GetAttrString(spec, from_name);
jpayne@68 29360 int result = 0;
jpayne@68 29361 if (likely(value)) {
jpayne@68 29362 if (allow_none || value != Py_None) {
jpayne@68 29363 #if CYTHON_COMPILING_IN_LIMITED_API
jpayne@68 29364 result = PyModule_AddObject(module, to_name, value);
jpayne@68 29365 #else
jpayne@68 29366 result = PyDict_SetItemString(moddict, to_name, value);
jpayne@68 29367 #endif
jpayne@68 29368 }
jpayne@68 29369 Py_DECREF(value);
jpayne@68 29370 } else if (PyErr_ExceptionMatches(PyExc_AttributeError)) {
jpayne@68 29371 PyErr_Clear();
jpayne@68 29372 } else {
jpayne@68 29373 result = -1;
jpayne@68 29374 }
jpayne@68 29375 return result;
jpayne@68 29376 }
jpayne@68 29377 static CYTHON_SMALL_CODE PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def) {
jpayne@68 29378 PyObject *module = NULL, *moddict, *modname;
jpayne@68 29379 CYTHON_UNUSED_VAR(def);
jpayne@68 29380 if (__Pyx_check_single_interpreter())
jpayne@68 29381 return NULL;
jpayne@68 29382 if (__pyx_m)
jpayne@68 29383 return __Pyx_NewRef(__pyx_m);
jpayne@68 29384 modname = PyObject_GetAttrString(spec, "name");
jpayne@68 29385 if (unlikely(!modname)) goto bad;
jpayne@68 29386 module = PyModule_NewObject(modname);
jpayne@68 29387 Py_DECREF(modname);
jpayne@68 29388 if (unlikely(!module)) goto bad;
jpayne@68 29389 #if CYTHON_COMPILING_IN_LIMITED_API
jpayne@68 29390 moddict = module;
jpayne@68 29391 #else
jpayne@68 29392 moddict = PyModule_GetDict(module);
jpayne@68 29393 if (unlikely(!moddict)) goto bad;
jpayne@68 29394 #endif
jpayne@68 29395 if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "loader", "__loader__", 1) < 0)) goto bad;
jpayne@68 29396 if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "origin", "__file__", 1) < 0)) goto bad;
jpayne@68 29397 if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "parent", "__package__", 1) < 0)) goto bad;
jpayne@68 29398 if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "submodule_search_locations", "__path__", 0) < 0)) goto bad;
jpayne@68 29399 return module;
jpayne@68 29400 bad:
jpayne@68 29401 Py_XDECREF(module);
jpayne@68 29402 return NULL;
jpayne@68 29403 }
jpayne@68 29404
jpayne@68 29405
jpayne@68 29406 static CYTHON_SMALL_CODE int __pyx_pymod_exec_libctabix(PyObject *__pyx_pyinit_module)
jpayne@68 29407 #endif
jpayne@68 29408 #endif
jpayne@68 29409 {
jpayne@68 29410 int stringtab_initialized = 0;
jpayne@68 29411 #if CYTHON_USE_MODULE_STATE
jpayne@68 29412 int pystate_addmodule_run = 0;
jpayne@68 29413 #endif
jpayne@68 29414 __Pyx_TraceDeclarations
jpayne@68 29415 PyObject *__pyx_t_1 = NULL;
jpayne@68 29416 PyObject *__pyx_t_2 = NULL;
jpayne@68 29417 PyObject *__pyx_t_3 = NULL;
jpayne@68 29418 PyObject *__pyx_t_4 = NULL;
jpayne@68 29419 int __pyx_lineno = 0;
jpayne@68 29420 const char *__pyx_filename = NULL;
jpayne@68 29421 int __pyx_clineno = 0;
jpayne@68 29422 __Pyx_RefNannyDeclarations
jpayne@68 29423 #if CYTHON_PEP489_MULTI_PHASE_INIT
jpayne@68 29424 if (__pyx_m) {
jpayne@68 29425 if (__pyx_m == __pyx_pyinit_module) return 0;
jpayne@68 29426 PyErr_SetString(PyExc_RuntimeError, "Module 'libctabix' has already been imported. Re-initialisation is not supported.");
jpayne@68 29427 return -1;
jpayne@68 29428 }
jpayne@68 29429 #elif PY_MAJOR_VERSION >= 3
jpayne@68 29430 if (__pyx_m) return __Pyx_NewRef(__pyx_m);
jpayne@68 29431 #endif
jpayne@68 29432 /*--- Module creation code ---*/
jpayne@68 29433 #if CYTHON_PEP489_MULTI_PHASE_INIT
jpayne@68 29434 __pyx_m = __pyx_pyinit_module;
jpayne@68 29435 Py_INCREF(__pyx_m);
jpayne@68 29436 #else
jpayne@68 29437 #if PY_MAJOR_VERSION < 3
jpayne@68 29438 __pyx_m = Py_InitModule4("libctabix", __pyx_methods, 0, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m);
jpayne@68 29439 if (unlikely(!__pyx_m)) __PYX_ERR(0, 1, __pyx_L1_error)
jpayne@68 29440 #elif CYTHON_USE_MODULE_STATE
jpayne@68 29441 __pyx_t_1 = PyModule_Create(&__pyx_moduledef); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error)
jpayne@68 29442 {
jpayne@68 29443 int add_module_result = PyState_AddModule(__pyx_t_1, &__pyx_moduledef);
jpayne@68 29444 __pyx_t_1 = 0; /* transfer ownership from __pyx_t_1 to "libctabix" pseudovariable */
jpayne@68 29445 if (unlikely((add_module_result < 0))) __PYX_ERR(0, 1, __pyx_L1_error)
jpayne@68 29446 pystate_addmodule_run = 1;
jpayne@68 29447 }
jpayne@68 29448 #else
jpayne@68 29449 __pyx_m = PyModule_Create(&__pyx_moduledef);
jpayne@68 29450 if (unlikely(!__pyx_m)) __PYX_ERR(0, 1, __pyx_L1_error)
jpayne@68 29451 #endif
jpayne@68 29452 #endif
jpayne@68 29453 CYTHON_UNUSED_VAR(__pyx_t_1);
jpayne@68 29454 __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) __PYX_ERR(0, 1, __pyx_L1_error)
jpayne@68 29455 Py_INCREF(__pyx_d);
jpayne@68 29456 __pyx_b = __Pyx_PyImport_AddModuleRef(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_b)) __PYX_ERR(0, 1, __pyx_L1_error)
jpayne@68 29457 __pyx_cython_runtime = __Pyx_PyImport_AddModuleRef((const char *) "cython_runtime"); if (unlikely(!__pyx_cython_runtime)) __PYX_ERR(0, 1, __pyx_L1_error)
jpayne@68 29458 if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
jpayne@68 29459 #if CYTHON_REFNANNY
jpayne@68 29460 __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny");
jpayne@68 29461 if (!__Pyx_RefNanny) {
jpayne@68 29462 PyErr_Clear();
jpayne@68 29463 __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny");
jpayne@68 29464 if (!__Pyx_RefNanny)
jpayne@68 29465 Py_FatalError("failed to import 'refnanny' module");
jpayne@68 29466 }
jpayne@68 29467 #endif
jpayne@68 29468 __Pyx_RefNannySetupContext("__Pyx_PyMODINIT_FUNC PyInit_libctabix(void)", 0);
jpayne@68 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@68 29470 #ifdef __Pxy_PyFrame_Initialize_Offsets
jpayne@68 29471 __Pxy_PyFrame_Initialize_Offsets();
jpayne@68 29472 #endif
jpayne@68 29473 __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) __PYX_ERR(0, 1, __pyx_L1_error)
jpayne@68 29474 __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) __PYX_ERR(0, 1, __pyx_L1_error)
jpayne@68 29475 __pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_unicode)) __PYX_ERR(0, 1, __pyx_L1_error)
jpayne@68 29476 #ifdef __Pyx_CyFunction_USED
jpayne@68 29477 if (__pyx_CyFunction_init(__pyx_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
jpayne@68 29478 #endif
jpayne@68 29479 #ifdef __Pyx_FusedFunction_USED
jpayne@68 29480 if (__pyx_FusedFunction_init(__pyx_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
jpayne@68 29481 #endif
jpayne@68 29482 #ifdef __Pyx_Coroutine_USED
jpayne@68 29483 if (__pyx_Coroutine_init(__pyx_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
jpayne@68 29484 #endif
jpayne@68 29485 #ifdef __Pyx_Generator_USED
jpayne@68 29486 if (__pyx_Generator_init(__pyx_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
jpayne@68 29487 #endif
jpayne@68 29488 #ifdef __Pyx_AsyncGen_USED
jpayne@68 29489 if (__pyx_AsyncGen_init(__pyx_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
jpayne@68 29490 #endif
jpayne@68 29491 #ifdef __Pyx_StopAsyncIteration_USED
jpayne@68 29492 if (__pyx_StopAsyncIteration_init(__pyx_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
jpayne@68 29493 #endif
jpayne@68 29494 /*--- Library function declarations ---*/
jpayne@68 29495 /*--- Threads initialization code ---*/
jpayne@68 29496 #if defined(WITH_THREAD) && PY_VERSION_HEX < 0x030700F0 && defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS
jpayne@68 29497 PyEval_InitThreads();
jpayne@68 29498 #endif
jpayne@68 29499 /*--- Initialize various global constants etc. ---*/
jpayne@68 29500 if (__Pyx_InitConstants() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
jpayne@68 29501 stringtab_initialized = 1;
jpayne@68 29502 if (__Pyx_InitGlobals() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
jpayne@68 29503 #if PY_MAJOR_VERSION < 3 && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT)
jpayne@68 29504 if (__Pyx_init_sys_getdefaultencoding_params() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
jpayne@68 29505 #endif
jpayne@68 29506 if (__pyx_module_is_main_pysam__libctabix) {
jpayne@68 29507 if (PyObject_SetAttr(__pyx_m, __pyx_n_s_name, __pyx_n_s_main) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
jpayne@68 29508 }
jpayne@68 29509 #if PY_MAJOR_VERSION >= 3
jpayne@68 29510 {
jpayne@68 29511 PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(0, 1, __pyx_L1_error)
jpayne@68 29512 if (!PyDict_GetItemString(modules, "pysam.libctabix")) {
jpayne@68 29513 if (unlikely((PyDict_SetItemString(modules, "pysam.libctabix", __pyx_m) < 0))) __PYX_ERR(0, 1, __pyx_L1_error)
jpayne@68 29514 }
jpayne@68 29515 }
jpayne@68 29516 #endif
jpayne@68 29517 /*--- Builtin init code ---*/
jpayne@68 29518 if (__Pyx_InitCachedBuiltins() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
jpayne@68 29519 /*--- Constants init code ---*/
jpayne@68 29520 if (__Pyx_InitCachedConstants() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
jpayne@68 29521 /*--- Global type/function init code ---*/
jpayne@68 29522 (void)__Pyx_modinit_global_init_code();
jpayne@68 29523 (void)__Pyx_modinit_variable_export_code();
jpayne@68 29524 (void)__Pyx_modinit_function_export_code();
jpayne@68 29525 if (unlikely((__Pyx_modinit_type_init_code() < 0))) __PYX_ERR(0, 1, __pyx_L1_error)
jpayne@68 29526 if (unlikely((__Pyx_modinit_type_import_code() < 0))) __PYX_ERR(0, 1, __pyx_L1_error)
jpayne@68 29527 (void)__Pyx_modinit_variable_import_code();
jpayne@68 29528 if (unlikely((__Pyx_modinit_function_import_code() < 0))) __PYX_ERR(0, 1, __pyx_L1_error)
jpayne@68 29529 /*--- Execution code ---*/
jpayne@68 29530 #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
jpayne@68 29531 if (__Pyx_patch_abc() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
jpayne@68 29532 #endif
jpayne@68 29533 __Pyx_TraceCall("__Pyx_PyMODINIT_FUNC PyInit_libctabix(void)", __pyx_f[0], 1, 0, __PYX_ERR(0, 1, __pyx_L1_error));
jpayne@68 29534
jpayne@68 29535 /* "pysam/libctabix.pyx":57
jpayne@68 29536 * #
jpayne@68 29537 * ###############################################################################
jpayne@68 29538 * import os # <<<<<<<<<<<<<<
jpayne@68 29539 * import sys
jpayne@68 29540 *
jpayne@68 29541 */
jpayne@68 29542 __pyx_t_2 = __Pyx_ImportDottedModule(__pyx_n_s_os, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 57, __pyx_L1_error)
jpayne@68 29543 __Pyx_GOTREF(__pyx_t_2);
jpayne@68 29544 if (PyDict_SetItem(__pyx_d, __pyx_n_s_os, __pyx_t_2) < 0) __PYX_ERR(0, 57, __pyx_L1_error)
jpayne@68 29545 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@68 29546
jpayne@68 29547 /* "pysam/libctabix.pyx":58
jpayne@68 29548 * ###############################################################################
jpayne@68 29549 * import os
jpayne@68 29550 * import sys # <<<<<<<<<<<<<<
jpayne@68 29551 *
jpayne@68 29552 * from libc.stdio cimport printf, fprintf, stderr
jpayne@68 29553 */
jpayne@68 29554 __pyx_t_2 = __Pyx_ImportDottedModule(__pyx_n_s_sys, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 58, __pyx_L1_error)
jpayne@68 29555 __Pyx_GOTREF(__pyx_t_2);
jpayne@68 29556 if (PyDict_SetItem(__pyx_d, __pyx_n_s_sys, __pyx_t_2) < 0) __PYX_ERR(0, 58, __pyx_L1_error)
jpayne@68 29557 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@68 29558
jpayne@68 29559 /* "pysam/libctabix.pyx":87
jpayne@68 29560 * self.encoding = encoding
jpayne@68 29561 *
jpayne@68 29562 * def set_encoding(self, encoding): # <<<<<<<<<<<<<<
jpayne@68 29563 * self.encoding = encoding
jpayne@68 29564 *
jpayne@68 29565 */
jpayne@68 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@68 29567 __Pyx_GOTREF(__pyx_t_2);
jpayne@68 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@68 29569 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@68 29570 PyType_Modified(__pyx_ptype_5pysam_9libctabix_Parser);
jpayne@68 29571
jpayne@68 29572 /* "pysam/libctabix.pyx":90
jpayne@68 29573 * self.encoding = encoding
jpayne@68 29574 *
jpayne@68 29575 * def get_encoding(self): # <<<<<<<<<<<<<<
jpayne@68 29576 * return self.encoding
jpayne@68 29577 *
jpayne@68 29578 */
jpayne@68 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@68 29580 __Pyx_GOTREF(__pyx_t_2);
jpayne@68 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@68 29582 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@68 29583 PyType_Modified(__pyx_ptype_5pysam_9libctabix_Parser);
jpayne@68 29584
jpayne@68 29585 /* "(tree fragment)":1
jpayne@68 29586 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
jpayne@68 29587 * cdef tuple state
jpayne@68 29588 * cdef object _dict
jpayne@68 29589 */
jpayne@68 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@68 29591 __Pyx_GOTREF(__pyx_t_2);
jpayne@68 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@68 29593 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@68 29594 PyType_Modified(__pyx_ptype_5pysam_9libctabix_Parser);
jpayne@68 29595
jpayne@68 29596 /* "(tree fragment)":16
jpayne@68 29597 * else:
jpayne@68 29598 * return __pyx_unpickle_Parser, (type(self), 0xe8424ea, state)
jpayne@68 29599 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
jpayne@68 29600 * __pyx_unpickle_Parser__set_state(self, __pyx_state)
jpayne@68 29601 */
jpayne@68 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@68 29603 __Pyx_GOTREF(__pyx_t_2);
jpayne@68 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@68 29605 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@68 29606 PyType_Modified(__pyx_ptype_5pysam_9libctabix_Parser);
jpayne@68 29607
jpayne@68 29608 /* "(tree fragment)":1
jpayne@68 29609 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
jpayne@68 29610 * cdef tuple state
jpayne@68 29611 * cdef object _dict
jpayne@68 29612 */
jpayne@68 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@68 29614 __Pyx_GOTREF(__pyx_t_2);
jpayne@68 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@68 29616 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@68 29617 PyType_Modified(__pyx_ptype_5pysam_9libctabix_asTuple);
jpayne@68 29618
jpayne@68 29619 /* "(tree fragment)":16
jpayne@68 29620 * else:
jpayne@68 29621 * return __pyx_unpickle_asTuple, (type(self), 0xe8424ea, state)
jpayne@68 29622 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
jpayne@68 29623 * __pyx_unpickle_asTuple__set_state(self, __pyx_state)
jpayne@68 29624 */
jpayne@68 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@68 29626 __Pyx_GOTREF(__pyx_t_2);
jpayne@68 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@68 29628 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@68 29629 PyType_Modified(__pyx_ptype_5pysam_9libctabix_asTuple);
jpayne@68 29630
jpayne@68 29631 /* "(tree fragment)":1
jpayne@68 29632 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
jpayne@68 29633 * cdef tuple state
jpayne@68 29634 * cdef object _dict
jpayne@68 29635 */
jpayne@68 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@68 29637 __Pyx_GOTREF(__pyx_t_2);
jpayne@68 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@68 29639 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@68 29640 PyType_Modified(__pyx_ptype_5pysam_9libctabix_asGFF3);
jpayne@68 29641
jpayne@68 29642 /* "(tree fragment)":16
jpayne@68 29643 * else:
jpayne@68 29644 * return __pyx_unpickle_asGFF3, (type(self), 0xe8424ea, state)
jpayne@68 29645 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
jpayne@68 29646 * __pyx_unpickle_asGFF3__set_state(self, __pyx_state)
jpayne@68 29647 */
jpayne@68 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@68 29649 __Pyx_GOTREF(__pyx_t_2);
jpayne@68 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@68 29651 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@68 29652 PyType_Modified(__pyx_ptype_5pysam_9libctabix_asGFF3);
jpayne@68 29653
jpayne@68 29654 /* "(tree fragment)":1
jpayne@68 29655 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
jpayne@68 29656 * cdef tuple state
jpayne@68 29657 * cdef object _dict
jpayne@68 29658 */
jpayne@68 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@68 29660 __Pyx_GOTREF(__pyx_t_2);
jpayne@68 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@68 29662 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@68 29663 PyType_Modified(__pyx_ptype_5pysam_9libctabix_asGTF);
jpayne@68 29664
jpayne@68 29665 /* "(tree fragment)":16
jpayne@68 29666 * else:
jpayne@68 29667 * return __pyx_unpickle_asGTF, (type(self), 0xe8424ea, state)
jpayne@68 29668 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
jpayne@68 29669 * __pyx_unpickle_asGTF__set_state(self, __pyx_state)
jpayne@68 29670 */
jpayne@68 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@68 29672 __Pyx_GOTREF(__pyx_t_2);
jpayne@68 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@68 29674 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@68 29675 PyType_Modified(__pyx_ptype_5pysam_9libctabix_asGTF);
jpayne@68 29676
jpayne@68 29677 /* "(tree fragment)":1
jpayne@68 29678 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
jpayne@68 29679 * cdef tuple state
jpayne@68 29680 * cdef object _dict
jpayne@68 29681 */
jpayne@68 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@68 29683 __Pyx_GOTREF(__pyx_t_2);
jpayne@68 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@68 29685 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@68 29686 PyType_Modified(__pyx_ptype_5pysam_9libctabix_asBed);
jpayne@68 29687
jpayne@68 29688 /* "(tree fragment)":16
jpayne@68 29689 * else:
jpayne@68 29690 * return __pyx_unpickle_asBed, (type(self), 0xe8424ea, state)
jpayne@68 29691 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
jpayne@68 29692 * __pyx_unpickle_asBed__set_state(self, __pyx_state)
jpayne@68 29693 */
jpayne@68 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@68 29695 __Pyx_GOTREF(__pyx_t_2);
jpayne@68 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@68 29697 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@68 29698 PyType_Modified(__pyx_ptype_5pysam_9libctabix_asBed);
jpayne@68 29699
jpayne@68 29700 /* "(tree fragment)":1
jpayne@68 29701 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
jpayne@68 29702 * cdef tuple state
jpayne@68 29703 * cdef object _dict
jpayne@68 29704 */
jpayne@68 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@68 29706 __Pyx_GOTREF(__pyx_t_2);
jpayne@68 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@68 29708 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@68 29709 PyType_Modified(__pyx_ptype_5pysam_9libctabix_asVCF);
jpayne@68 29710
jpayne@68 29711 /* "(tree fragment)":16
jpayne@68 29712 * else:
jpayne@68 29713 * return __pyx_unpickle_asVCF, (type(self), 0xe8424ea, state)
jpayne@68 29714 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
jpayne@68 29715 * __pyx_unpickle_asVCF__set_state(self, __pyx_state)
jpayne@68 29716 */
jpayne@68 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@68 29718 __Pyx_GOTREF(__pyx_t_2);
jpayne@68 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@68 29720 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@68 29721 PyType_Modified(__pyx_ptype_5pysam_9libctabix_asVCF);
jpayne@68 29722
jpayne@68 29723 /* "pysam/libctabix.pyx":352
jpayne@68 29724 * self.encoding = encoding
jpayne@68 29725 *
jpayne@68 29726 * def _open( self, # <<<<<<<<<<<<<<
jpayne@68 29727 * filename,
jpayne@68 29728 * mode='r',
jpayne@68 29729 */
jpayne@68 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@68 29731 __Pyx_GOTREF(__pyx_t_2);
jpayne@68 29732 __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_tuple__68);
jpayne@68 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@68 29734 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@68 29735 PyType_Modified(__pyx_ptype_5pysam_9libctabix_TabixFile);
jpayne@68 29736
jpayne@68 29737 /* "pysam/libctabix.pyx":404
jpayne@68 29738 * self.start_offset = self.tell()
jpayne@68 29739 *
jpayne@68 29740 * def _dup(self): # <<<<<<<<<<<<<<
jpayne@68 29741 * '''return a copy of this tabix file.
jpayne@68 29742 *
jpayne@68 29743 */
jpayne@68 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@68 29745 __Pyx_GOTREF(__pyx_t_2);
jpayne@68 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@68 29747 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@68 29748 PyType_Modified(__pyx_ptype_5pysam_9libctabix_TabixFile);
jpayne@68 29749
jpayne@68 29750 /* "pysam/libctabix.pyx":416
jpayne@68 29751 * encoding=self.encoding)
jpayne@68 29752 *
jpayne@68 29753 * def fetch(self, # <<<<<<<<<<<<<<
jpayne@68 29754 * reference=None,
jpayne@68 29755 * start=None,
jpayne@68 29756 */
jpayne@68 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@68 29758 __Pyx_GOTREF(__pyx_t_2);
jpayne@68 29759 __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_tuple__70);
jpayne@68 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@68 29761 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@68 29762 PyType_Modified(__pyx_ptype_5pysam_9libctabix_TabixFile);
jpayne@68 29763
jpayne@68 29764 /* "pysam/libctabix.pyx":598
jpayne@68 29765 * return result
jpayne@68 29766 *
jpayne@68 29767 * def close(self): # <<<<<<<<<<<<<<
jpayne@68 29768 * '''
jpayne@68 29769 * closes the :class:`pysam.TabixFile`.'''
jpayne@68 29770 */
jpayne@68 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@68 29772 __Pyx_GOTREF(__pyx_t_2);
jpayne@68 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@68 29774 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@68 29775 PyType_Modified(__pyx_ptype_5pysam_9libctabix_TabixFile);
jpayne@68 29776
jpayne@68 29777 /* "(tree fragment)":1
jpayne@68 29778 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
jpayne@68 29779 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
jpayne@68 29780 * def __setstate_cython__(self, __pyx_state):
jpayne@68 29781 */
jpayne@68 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@68 29783 __Pyx_GOTREF(__pyx_t_2);
jpayne@68 29784 if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
jpayne@68 29785 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@68 29786
jpayne@68 29787 /* "(tree fragment)":3
jpayne@68 29788 * def __reduce_cython__(self):
jpayne@68 29789 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
jpayne@68 29790 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
jpayne@68 29791 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
jpayne@68 29792 */
jpayne@68 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@68 29794 __Pyx_GOTREF(__pyx_t_2);
jpayne@68 29795 if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_2) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
jpayne@68 29796 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@68 29797
jpayne@68 29798 /* "(tree fragment)":1
jpayne@68 29799 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
jpayne@68 29800 * raise TypeError, "self.iterator cannot be converted to a Python object for pickling"
jpayne@68 29801 * def __setstate_cython__(self, __pyx_state):
jpayne@68 29802 */
jpayne@68 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@68 29804 __Pyx_GOTREF(__pyx_t_2);
jpayne@68 29805 if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
jpayne@68 29806 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@68 29807
jpayne@68 29808 /* "(tree fragment)":3
jpayne@68 29809 * def __reduce_cython__(self):
jpayne@68 29810 * raise TypeError, "self.iterator cannot be converted to a Python object for pickling"
jpayne@68 29811 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
jpayne@68 29812 * raise TypeError, "self.iterator cannot be converted to a Python object for pickling"
jpayne@68 29813 */
jpayne@68 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@68 29815 __Pyx_GOTREF(__pyx_t_2);
jpayne@68 29816 if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_2) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
jpayne@68 29817 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@68 29818
jpayne@68 29819 /* "pysam/libctabix.pyx":682
jpayne@68 29820 *
jpayne@68 29821 *
jpayne@68 29822 * class EmptyIterator: # <<<<<<<<<<<<<<
jpayne@68 29823 * '''empty iterator'''
jpayne@68 29824 *
jpayne@68 29825 */
jpayne@68 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@68 29827 __Pyx_GOTREF(__pyx_t_2);
jpayne@68 29828
jpayne@68 29829 /* "pysam/libctabix.pyx":685
jpayne@68 29830 * '''empty iterator'''
jpayne@68 29831 *
jpayne@68 29832 * def __iter__(self): # <<<<<<<<<<<<<<
jpayne@68 29833 * return self
jpayne@68 29834 *
jpayne@68 29835 */
jpayne@68 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@68 29837 __Pyx_GOTREF(__pyx_t_3);
jpayne@68 29838 if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_iter, __pyx_t_3) < 0) __PYX_ERR(0, 685, __pyx_L1_error)
jpayne@68 29839 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
jpayne@68 29840
jpayne@68 29841 /* "pysam/libctabix.pyx":688
jpayne@68 29842 * return self
jpayne@68 29843 *
jpayne@68 29844 * def __next__(self): # <<<<<<<<<<<<<<
jpayne@68 29845 * raise StopIteration()
jpayne@68 29846 *
jpayne@68 29847 */
jpayne@68 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@68 29849 __Pyx_GOTREF(__pyx_t_3);
jpayne@68 29850 if (__Pyx_SetNameInClass(__pyx_t_2, __pyx_n_s_next, __pyx_t_3) < 0) __PYX_ERR(0, 688, __pyx_L1_error)
jpayne@68 29851 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
jpayne@68 29852
jpayne@68 29853 /* "pysam/libctabix.pyx":682
jpayne@68 29854 *
jpayne@68 29855 *
jpayne@68 29856 * class EmptyIterator: # <<<<<<<<<<<<<<
jpayne@68 29857 * '''empty iterator'''
jpayne@68 29858 *
jpayne@68 29859 */
jpayne@68 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@68 29861 __Pyx_GOTREF(__pyx_t_3);
jpayne@68 29862 if (PyDict_SetItem(__pyx_d, __pyx_n_s_EmptyIterator, __pyx_t_3) < 0) __PYX_ERR(0, 682, __pyx_L1_error)
jpayne@68 29863 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
jpayne@68 29864 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@68 29865
jpayne@68 29866 /* "(tree fragment)":1
jpayne@68 29867 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
jpayne@68 29868 * raise TypeError, "self.iterator cannot be converted to a Python object for pickling"
jpayne@68 29869 * def __setstate_cython__(self, __pyx_state):
jpayne@68 29870 */
jpayne@68 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@68 29872 __Pyx_GOTREF(__pyx_t_2);
jpayne@68 29873 if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
jpayne@68 29874 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@68 29875
jpayne@68 29876 /* "(tree fragment)":3
jpayne@68 29877 * def __reduce_cython__(self):
jpayne@68 29878 * raise TypeError, "self.iterator cannot be converted to a Python object for pickling"
jpayne@68 29879 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
jpayne@68 29880 * raise TypeError, "self.iterator cannot be converted to a Python object for pickling"
jpayne@68 29881 */
jpayne@68 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@68 29883 __Pyx_GOTREF(__pyx_t_2);
jpayne@68 29884 if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_2) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
jpayne@68 29885 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@68 29886
jpayne@68 29887 /* "(tree fragment)":1
jpayne@68 29888 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
jpayne@68 29889 * raise TypeError, "self.gzipfile,self.kstream cannot be converted to a Python object for pickling"
jpayne@68 29890 * def __setstate_cython__(self, __pyx_state):
jpayne@68 29891 */
jpayne@68 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@68 29893 __Pyx_GOTREF(__pyx_t_2);
jpayne@68 29894 if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
jpayne@68 29895 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@68 29896
jpayne@68 29897 /* "(tree fragment)":3
jpayne@68 29898 * def __reduce_cython__(self):
jpayne@68 29899 * raise TypeError, "self.gzipfile,self.kstream cannot be converted to a Python object for pickling"
jpayne@68 29900 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
jpayne@68 29901 * raise TypeError, "self.gzipfile,self.kstream cannot be converted to a Python object for pickling"
jpayne@68 29902 */
jpayne@68 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@68 29904 __Pyx_GOTREF(__pyx_t_2);
jpayne@68 29905 if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_2) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
jpayne@68 29906 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@68 29907
jpayne@68 29908 /* "(tree fragment)":1
jpayne@68 29909 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
jpayne@68 29910 * raise TypeError, "self.gzipfile,self.kstream cannot be converted to a Python object for pickling"
jpayne@68 29911 * def __setstate_cython__(self, __pyx_state):
jpayne@68 29912 */
jpayne@68 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@68 29914 __Pyx_GOTREF(__pyx_t_2);
jpayne@68 29915 if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
jpayne@68 29916 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@68 29917
jpayne@68 29918 /* "(tree fragment)":3
jpayne@68 29919 * def __reduce_cython__(self):
jpayne@68 29920 * raise TypeError, "self.gzipfile,self.kstream cannot be converted to a Python object for pickling"
jpayne@68 29921 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
jpayne@68 29922 * raise TypeError, "self.gzipfile,self.kstream cannot be converted to a Python object for pickling"
jpayne@68 29923 */
jpayne@68 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@68 29925 __Pyx_GOTREF(__pyx_t_2);
jpayne@68 29926 if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_2) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
jpayne@68 29927 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@68 29928
jpayne@68 29929 /* "(tree fragment)":1
jpayne@68 29930 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
jpayne@68 29931 * raise TypeError, "self.gzipfile,self.kstream cannot be converted to a Python object for pickling"
jpayne@68 29932 * def __setstate_cython__(self, __pyx_state):
jpayne@68 29933 */
jpayne@68 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@68 29935 __Pyx_GOTREF(__pyx_t_2);
jpayne@68 29936 if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
jpayne@68 29937 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@68 29938
jpayne@68 29939 /* "(tree fragment)":3
jpayne@68 29940 * def __reduce_cython__(self):
jpayne@68 29941 * raise TypeError, "self.gzipfile,self.kstream cannot be converted to a Python object for pickling"
jpayne@68 29942 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
jpayne@68 29943 * raise TypeError, "self.gzipfile,self.kstream cannot be converted to a Python object for pickling"
jpayne@68 29944 */
jpayne@68 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@68 29946 __Pyx_GOTREF(__pyx_t_2);
jpayne@68 29947 if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_2) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
jpayne@68 29948 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@68 29949
jpayne@68 29950 /* "pysam/libctabix.pyx":811
jpayne@68 29951 *
jpayne@68 29952 *
jpayne@68 29953 * def tabix_compress(filename_in, # <<<<<<<<<<<<<<
jpayne@68 29954 * filename_out,
jpayne@68 29955 * force=False):
jpayne@68 29956 */
jpayne@68 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@68 29958 __Pyx_GOTREF(__pyx_t_2);
jpayne@68 29959 __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_tuple__72);
jpayne@68 29960 if (PyDict_SetItem(__pyx_d, __pyx_n_s_tabix_compress, __pyx_t_2) < 0) __PYX_ERR(0, 811, __pyx_L1_error)
jpayne@68 29961 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@68 29962
jpayne@68 29963 /* "pysam/libctabix.pyx":880
jpayne@68 29964 * preset=None,
jpayne@68 29965 * meta_char="#",
jpayne@68 29966 * int line_skip=0, # <<<<<<<<<<<<<<
jpayne@68 29967 * zerobased=False,
jpayne@68 29968 * int min_shift=-1,
jpayne@68 29969 */
jpayne@68 29970 __pyx_t_2 = __Pyx_PyInt_From_int(((int)0)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 880, __pyx_L1_error)
jpayne@68 29971 __Pyx_GOTREF(__pyx_t_2);
jpayne@68 29972
jpayne@68 29973 /* "pysam/libctabix.pyx":882
jpayne@68 29974 * int line_skip=0,
jpayne@68 29975 * zerobased=False,
jpayne@68 29976 * int min_shift=-1, # <<<<<<<<<<<<<<
jpayne@68 29977 * index=None,
jpayne@68 29978 * keep_original=False,
jpayne@68 29979 */
jpayne@68 29980 __pyx_t_3 = __Pyx_PyInt_From_int(((int)-1)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 882, __pyx_L1_error)
jpayne@68 29981 __Pyx_GOTREF(__pyx_t_3);
jpayne@68 29982
jpayne@68 29983 /* "pysam/libctabix.pyx":873
jpayne@68 29984 *
jpayne@68 29985 *
jpayne@68 29986 * def tabix_index(filename, # <<<<<<<<<<<<<<
jpayne@68 29987 * force=False,
jpayne@68 29988 * seq_col=None,
jpayne@68 29989 */
jpayne@68 29990 __pyx_t_4 = PyTuple_New(12); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 873, __pyx_L1_error)
jpayne@68 29991 __Pyx_GOTREF(__pyx_t_4);
jpayne@68 29992 __Pyx_INCREF(((PyObject *)Py_False));
jpayne@68 29993 __Pyx_GIVEREF(((PyObject *)Py_False));
jpayne@68 29994 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)Py_False))) __PYX_ERR(0, 873, __pyx_L1_error);
jpayne@68 29995 __Pyx_INCREF(Py_None);
jpayne@68 29996 __Pyx_GIVEREF(Py_None);
jpayne@68 29997 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, Py_None)) __PYX_ERR(0, 873, __pyx_L1_error);
jpayne@68 29998 __Pyx_INCREF(Py_None);
jpayne@68 29999 __Pyx_GIVEREF(Py_None);
jpayne@68 30000 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 2, Py_None)) __PYX_ERR(0, 873, __pyx_L1_error);
jpayne@68 30001 __Pyx_INCREF(Py_None);
jpayne@68 30002 __Pyx_GIVEREF(Py_None);
jpayne@68 30003 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 3, Py_None)) __PYX_ERR(0, 873, __pyx_L1_error);
jpayne@68 30004 __Pyx_INCREF(Py_None);
jpayne@68 30005 __Pyx_GIVEREF(Py_None);
jpayne@68 30006 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 4, Py_None)) __PYX_ERR(0, 873, __pyx_L1_error);
jpayne@68 30007 __Pyx_INCREF(((PyObject*)__pyx_kp_u__39));
jpayne@68 30008 __Pyx_GIVEREF(((PyObject*)__pyx_kp_u__39));
jpayne@68 30009 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 5, ((PyObject*)__pyx_kp_u__39))) __PYX_ERR(0, 873, __pyx_L1_error);
jpayne@68 30010 __Pyx_GIVEREF(__pyx_t_2);
jpayne@68 30011 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 6, __pyx_t_2)) __PYX_ERR(0, 873, __pyx_L1_error);
jpayne@68 30012 __Pyx_INCREF(((PyObject *)Py_False));
jpayne@68 30013 __Pyx_GIVEREF(((PyObject *)Py_False));
jpayne@68 30014 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 7, ((PyObject *)Py_False))) __PYX_ERR(0, 873, __pyx_L1_error);
jpayne@68 30015 __Pyx_GIVEREF(__pyx_t_3);
jpayne@68 30016 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 8, __pyx_t_3)) __PYX_ERR(0, 873, __pyx_L1_error);
jpayne@68 30017 __Pyx_INCREF(Py_None);
jpayne@68 30018 __Pyx_GIVEREF(Py_None);
jpayne@68 30019 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 9, Py_None)) __PYX_ERR(0, 873, __pyx_L1_error);
jpayne@68 30020 __Pyx_INCREF(((PyObject *)Py_False));
jpayne@68 30021 __Pyx_GIVEREF(((PyObject *)Py_False));
jpayne@68 30022 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 10, ((PyObject *)Py_False))) __PYX_ERR(0, 873, __pyx_L1_error);
jpayne@68 30023 __Pyx_INCREF(((PyObject *)Py_False));
jpayne@68 30024 __Pyx_GIVEREF(((PyObject *)Py_False));
jpayne@68 30025 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 11, ((PyObject *)Py_False))) __PYX_ERR(0, 873, __pyx_L1_error);
jpayne@68 30026 __pyx_t_2 = 0;
jpayne@68 30027 __pyx_t_3 = 0;
jpayne@68 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@68 30029 __Pyx_GOTREF(__pyx_t_3);
jpayne@68 30030 __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_3, __pyx_t_4);
jpayne@68 30031 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
jpayne@68 30032 if (PyDict_SetItem(__pyx_d, __pyx_n_s_tabix_index, __pyx_t_3) < 0) __PYX_ERR(0, 873, __pyx_L1_error)
jpayne@68 30033 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
jpayne@68 30034
jpayne@68 30035 /* "(tree fragment)":1
jpayne@68 30036 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
jpayne@68 30037 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
jpayne@68 30038 * def __setstate_cython__(self, __pyx_state):
jpayne@68 30039 */
jpayne@68 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@68 30041 __Pyx_GOTREF(__pyx_t_3);
jpayne@68 30042 if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_3) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
jpayne@68 30043 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
jpayne@68 30044
jpayne@68 30045 /* "(tree fragment)":3
jpayne@68 30046 * def __reduce_cython__(self):
jpayne@68 30047 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
jpayne@68 30048 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
jpayne@68 30049 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
jpayne@68 30050 */
jpayne@68 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@68 30052 __Pyx_GOTREF(__pyx_t_3);
jpayne@68 30053 if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_3) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
jpayne@68 30054 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
jpayne@68 30055
jpayne@68 30056 /* "pysam/libctabix.pyx":1178
jpayne@68 30057 *
jpayne@68 30058 *
jpayne@68 30059 * class tabix_generic_iterator: # <<<<<<<<<<<<<<
jpayne@68 30060 * '''iterate over ``infile``.
jpayne@68 30061 *
jpayne@68 30062 */
jpayne@68 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@68 30064 __Pyx_GOTREF(__pyx_t_3);
jpayne@68 30065
jpayne@68 30066 /* "pysam/libctabix.pyx":1183
jpayne@68 30067 * Permits the use of file-like objects for example from the gzip module.
jpayne@68 30068 * '''
jpayne@68 30069 * def __init__(self, infile, parser): # <<<<<<<<<<<<<<
jpayne@68 30070 *
jpayne@68 30071 * self.infile = infile
jpayne@68 30072 */
jpayne@68 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@68 30074 __Pyx_GOTREF(__pyx_t_4);
jpayne@68 30075 if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_init, __pyx_t_4) < 0) __PYX_ERR(0, 1183, __pyx_L1_error)
jpayne@68 30076 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
jpayne@68 30077
jpayne@68 30078 /* "pysam/libctabix.pyx":1190
jpayne@68 30079 * self.parser = parser
jpayne@68 30080 *
jpayne@68 30081 * def __iter__(self): # <<<<<<<<<<<<<<
jpayne@68 30082 * return self
jpayne@68 30083 *
jpayne@68 30084 */
jpayne@68 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@68 30086 __Pyx_GOTREF(__pyx_t_4);
jpayne@68 30087 if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_iter, __pyx_t_4) < 0) __PYX_ERR(0, 1190, __pyx_L1_error)
jpayne@68 30088 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
jpayne@68 30089
jpayne@68 30090 /* "pysam/libctabix.pyx":1194
jpayne@68 30091 *
jpayne@68 30092 * # cython version - required for python 3
jpayne@68 30093 * def __next__(self): # <<<<<<<<<<<<<<
jpayne@68 30094 *
jpayne@68 30095 * cdef char * b
jpayne@68 30096 */
jpayne@68 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@68 30098 __Pyx_GOTREF(__pyx_t_4);
jpayne@68 30099 if (__Pyx_SetNameInClass(__pyx_t_3, __pyx_n_s_next, __pyx_t_4) < 0) __PYX_ERR(0, 1194, __pyx_L1_error)
jpayne@68 30100 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
jpayne@68 30101
jpayne@68 30102 /* "pysam/libctabix.pyx":1178
jpayne@68 30103 *
jpayne@68 30104 *
jpayne@68 30105 * class tabix_generic_iterator: # <<<<<<<<<<<<<<
jpayne@68 30106 * '''iterate over ``infile``.
jpayne@68 30107 *
jpayne@68 30108 */
jpayne@68 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@68 30110 __Pyx_GOTREF(__pyx_t_4);
jpayne@68 30111 if (PyDict_SetItem(__pyx_d, __pyx_n_s_tabix_generic_iterator, __pyx_t_4) < 0) __PYX_ERR(0, 1178, __pyx_L1_error)
jpayne@68 30112 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
jpayne@68 30113 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
jpayne@68 30114
jpayne@68 30115 /* "pysam/libctabix.pyx":1238
jpayne@68 30116 *
jpayne@68 30117 *
jpayne@68 30118 * def tabix_iterator(infile, parser): # <<<<<<<<<<<<<<
jpayne@68 30119 * """return an iterator over all entries in a file.
jpayne@68 30120 *
jpayne@68 30121 */
jpayne@68 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@68 30123 __Pyx_GOTREF(__pyx_t_3);
jpayne@68 30124 if (PyDict_SetItem(__pyx_d, __pyx_n_s_tabix_iterator, __pyx_t_3) < 0) __PYX_ERR(0, 1238, __pyx_L1_error)
jpayne@68 30125 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
jpayne@68 30126
jpayne@68 30127 /* "(tree fragment)":1
jpayne@68 30128 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
jpayne@68 30129 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
jpayne@68 30130 * def __setstate_cython__(self, __pyx_state):
jpayne@68 30131 */
jpayne@68 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@68 30133 __Pyx_GOTREF(__pyx_t_3);
jpayne@68 30134 if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_3) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
jpayne@68 30135 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
jpayne@68 30136
jpayne@68 30137 /* "(tree fragment)":3
jpayne@68 30138 * def __reduce_cython__(self):
jpayne@68 30139 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
jpayne@68 30140 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
jpayne@68 30141 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
jpayne@68 30142 */
jpayne@68 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@68 30144 __Pyx_GOTREF(__pyx_t_3);
jpayne@68 30145 if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_3) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
jpayne@68 30146 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
jpayne@68 30147
jpayne@68 30148 /* "pysam/libctabix.pyx":1256
jpayne@68 30149 *
jpayne@68 30150 *
jpayne@68 30151 * __all__ = [ # <<<<<<<<<<<<<<
jpayne@68 30152 * "tabix_index",
jpayne@68 30153 * "tabix_compress",
jpayne@68 30154 */
jpayne@68 30155 __pyx_t_3 = PyList_New(14); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1256, __pyx_L1_error)
jpayne@68 30156 __Pyx_GOTREF(__pyx_t_3);
jpayne@68 30157 __Pyx_INCREF(__pyx_n_u_tabix_index);
jpayne@68 30158 __Pyx_GIVEREF(__pyx_n_u_tabix_index);
jpayne@68 30159 if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 0, __pyx_n_u_tabix_index)) __PYX_ERR(0, 1256, __pyx_L1_error);
jpayne@68 30160 __Pyx_INCREF(__pyx_n_u_tabix_compress);
jpayne@68 30161 __Pyx_GIVEREF(__pyx_n_u_tabix_compress);
jpayne@68 30162 if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 1, __pyx_n_u_tabix_compress)) __PYX_ERR(0, 1256, __pyx_L1_error);
jpayne@68 30163 __Pyx_INCREF(__pyx_n_u_TabixFile);
jpayne@68 30164 __Pyx_GIVEREF(__pyx_n_u_TabixFile);
jpayne@68 30165 if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 2, __pyx_n_u_TabixFile)) __PYX_ERR(0, 1256, __pyx_L1_error);
jpayne@68 30166 __Pyx_INCREF(__pyx_n_u_Tabixfile);
jpayne@68 30167 __Pyx_GIVEREF(__pyx_n_u_Tabixfile);
jpayne@68 30168 if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 3, __pyx_n_u_Tabixfile)) __PYX_ERR(0, 1256, __pyx_L1_error);
jpayne@68 30169 __Pyx_INCREF(__pyx_n_u_asTuple);
jpayne@68 30170 __Pyx_GIVEREF(__pyx_n_u_asTuple);
jpayne@68 30171 if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 4, __pyx_n_u_asTuple)) __PYX_ERR(0, 1256, __pyx_L1_error);
jpayne@68 30172 __Pyx_INCREF(__pyx_n_u_asGTF);
jpayne@68 30173 __Pyx_GIVEREF(__pyx_n_u_asGTF);
jpayne@68 30174 if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 5, __pyx_n_u_asGTF)) __PYX_ERR(0, 1256, __pyx_L1_error);
jpayne@68 30175 __Pyx_INCREF(__pyx_n_u_asGFF3);
jpayne@68 30176 __Pyx_GIVEREF(__pyx_n_u_asGFF3);
jpayne@68 30177 if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 6, __pyx_n_u_asGFF3)) __PYX_ERR(0, 1256, __pyx_L1_error);
jpayne@68 30178 __Pyx_INCREF(__pyx_n_u_asVCF);
jpayne@68 30179 __Pyx_GIVEREF(__pyx_n_u_asVCF);
jpayne@68 30180 if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 7, __pyx_n_u_asVCF)) __PYX_ERR(0, 1256, __pyx_L1_error);
jpayne@68 30181 __Pyx_INCREF(__pyx_n_u_asBed);
jpayne@68 30182 __Pyx_GIVEREF(__pyx_n_u_asBed);
jpayne@68 30183 if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 8, __pyx_n_u_asBed)) __PYX_ERR(0, 1256, __pyx_L1_error);
jpayne@68 30184 __Pyx_INCREF(__pyx_n_u_GZIterator);
jpayne@68 30185 __Pyx_GIVEREF(__pyx_n_u_GZIterator);
jpayne@68 30186 if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 9, __pyx_n_u_GZIterator)) __PYX_ERR(0, 1256, __pyx_L1_error);
jpayne@68 30187 __Pyx_INCREF(__pyx_n_u_GZIteratorHead);
jpayne@68 30188 __Pyx_GIVEREF(__pyx_n_u_GZIteratorHead);
jpayne@68 30189 if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 10, __pyx_n_u_GZIteratorHead)) __PYX_ERR(0, 1256, __pyx_L1_error);
jpayne@68 30190 __Pyx_INCREF(__pyx_n_u_tabix_iterator);
jpayne@68 30191 __Pyx_GIVEREF(__pyx_n_u_tabix_iterator);
jpayne@68 30192 if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 11, __pyx_n_u_tabix_iterator)) __PYX_ERR(0, 1256, __pyx_L1_error);
jpayne@68 30193 __Pyx_INCREF(__pyx_n_u_tabix_generic_iterator);
jpayne@68 30194 __Pyx_GIVEREF(__pyx_n_u_tabix_generic_iterator);
jpayne@68 30195 if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 12, __pyx_n_u_tabix_generic_iterator)) __PYX_ERR(0, 1256, __pyx_L1_error);
jpayne@68 30196 __Pyx_INCREF(__pyx_n_u_tabix_file_iterator);
jpayne@68 30197 __Pyx_GIVEREF(__pyx_n_u_tabix_file_iterator);
jpayne@68 30198 if (__Pyx_PyList_SET_ITEM(__pyx_t_3, 13, __pyx_n_u_tabix_file_iterator)) __PYX_ERR(0, 1256, __pyx_L1_error);
jpayne@68 30199 if (PyDict_SetItem(__pyx_d, __pyx_n_s_all, __pyx_t_3) < 0) __PYX_ERR(0, 1256, __pyx_L1_error)
jpayne@68 30200 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
jpayne@68 30201
jpayne@68 30202 /* "(tree fragment)":1
jpayne@68 30203 * def __pyx_unpickle_Parser(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
jpayne@68 30204 * cdef object __pyx_PickleError
jpayne@68 30205 * cdef object __pyx_result
jpayne@68 30206 */
jpayne@68 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@68 30208 __Pyx_GOTREF(__pyx_t_3);
jpayne@68 30209 if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_Parser, __pyx_t_3) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
jpayne@68 30210 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
jpayne@68 30211
jpayne@68 30212 /* "(tree fragment)":11
jpayne@68 30213 * __pyx_unpickle_Parser__set_state(<Parser> __pyx_result, __pyx_state)
jpayne@68 30214 * return __pyx_result
jpayne@68 30215 * cdef __pyx_unpickle_Parser__set_state(Parser __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
jpayne@68 30216 * __pyx_result.encoding = __pyx_state[0]
jpayne@68 30217 * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
jpayne@68 30218 */
jpayne@68 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@68 30220 __Pyx_GOTREF(__pyx_t_3);
jpayne@68 30221 if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_asTuple, __pyx_t_3) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
jpayne@68 30222 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
jpayne@68 30223
jpayne@68 30224 /* "(tree fragment)":1
jpayne@68 30225 * def __pyx_unpickle_asGFF3(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
jpayne@68 30226 * cdef object __pyx_PickleError
jpayne@68 30227 * cdef object __pyx_result
jpayne@68 30228 */
jpayne@68 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@68 30230 __Pyx_GOTREF(__pyx_t_3);
jpayne@68 30231 if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_asGFF3, __pyx_t_3) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
jpayne@68 30232 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
jpayne@68 30233
jpayne@68 30234 /* "(tree fragment)":11
jpayne@68 30235 * __pyx_unpickle_asGFF3__set_state(<asGFF3> __pyx_result, __pyx_state)
jpayne@68 30236 * return __pyx_result
jpayne@68 30237 * cdef __pyx_unpickle_asGFF3__set_state(asGFF3 __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
jpayne@68 30238 * __pyx_result.encoding = __pyx_state[0]
jpayne@68 30239 * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
jpayne@68 30240 */
jpayne@68 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@68 30242 __Pyx_GOTREF(__pyx_t_3);
jpayne@68 30243 if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_asGTF, __pyx_t_3) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
jpayne@68 30244 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
jpayne@68 30245
jpayne@68 30246 /* "(tree fragment)":1
jpayne@68 30247 * def __pyx_unpickle_asBed(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
jpayne@68 30248 * cdef object __pyx_PickleError
jpayne@68 30249 * cdef object __pyx_result
jpayne@68 30250 */
jpayne@68 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@68 30252 __Pyx_GOTREF(__pyx_t_3);
jpayne@68 30253 if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_asBed, __pyx_t_3) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
jpayne@68 30254 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
jpayne@68 30255
jpayne@68 30256 /* "(tree fragment)":11
jpayne@68 30257 * __pyx_unpickle_asBed__set_state(<asBed> __pyx_result, __pyx_state)
jpayne@68 30258 * return __pyx_result
jpayne@68 30259 * cdef __pyx_unpickle_asBed__set_state(asBed __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
jpayne@68 30260 * __pyx_result.encoding = __pyx_state[0]
jpayne@68 30261 * if len(__pyx_state) > 1 and hasattr(__pyx_result, '__dict__'):
jpayne@68 30262 */
jpayne@68 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@68 30264 __Pyx_GOTREF(__pyx_t_3);
jpayne@68 30265 if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_asVCF, __pyx_t_3) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
jpayne@68 30266 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
jpayne@68 30267
jpayne@68 30268 /* "pysam/libctabix.pyx":1
jpayne@68 30269 * # cython: language_level=3 # <<<<<<<<<<<<<<
jpayne@68 30270 * # cython: embedsignature=True
jpayne@68 30271 * # cython: profile=True
jpayne@68 30272 */
jpayne@68 30273 __pyx_t_3 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 1, __pyx_L1_error)
jpayne@68 30274 __Pyx_GOTREF(__pyx_t_3);
jpayne@68 30275 if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_3) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
jpayne@68 30276 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
jpayne@68 30277 __Pyx_TraceReturn(Py_None, 0);
jpayne@68 30278
jpayne@68 30279 /*--- Wrapped vars code ---*/
jpayne@68 30280
jpayne@68 30281 goto __pyx_L0;
jpayne@68 30282 __pyx_L1_error:;
jpayne@68 30283 __Pyx_XDECREF(__pyx_t_2);
jpayne@68 30284 __Pyx_XDECREF(__pyx_t_3);
jpayne@68 30285 __Pyx_XDECREF(__pyx_t_4);
jpayne@68 30286 if (__pyx_m) {
jpayne@68 30287 if (__pyx_d && stringtab_initialized) {
jpayne@68 30288 __Pyx_AddTraceback("init pysam.libctabix", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@68 30289 }
jpayne@68 30290 #if !CYTHON_USE_MODULE_STATE
jpayne@68 30291 Py_CLEAR(__pyx_m);
jpayne@68 30292 #else
jpayne@68 30293 Py_DECREF(__pyx_m);
jpayne@68 30294 if (pystate_addmodule_run) {
jpayne@68 30295 PyObject *tp, *value, *tb;
jpayne@68 30296 PyErr_Fetch(&tp, &value, &tb);
jpayne@68 30297 PyState_RemoveModule(&__pyx_moduledef);
jpayne@68 30298 PyErr_Restore(tp, value, tb);
jpayne@68 30299 }
jpayne@68 30300 #endif
jpayne@68 30301 } else if (!PyErr_Occurred()) {
jpayne@68 30302 PyErr_SetString(PyExc_ImportError, "init pysam.libctabix");
jpayne@68 30303 }
jpayne@68 30304 __pyx_L0:;
jpayne@68 30305 __Pyx_RefNannyFinishContext();
jpayne@68 30306 #if CYTHON_PEP489_MULTI_PHASE_INIT
jpayne@68 30307 return (__pyx_m != NULL) ? 0 : -1;
jpayne@68 30308 #elif PY_MAJOR_VERSION >= 3
jpayne@68 30309 return __pyx_m;
jpayne@68 30310 #else
jpayne@68 30311 return;
jpayne@68 30312 #endif
jpayne@68 30313 }
jpayne@68 30314 /* #### Code section: cleanup_globals ### */
jpayne@68 30315 /* #### Code section: cleanup_module ### */
jpayne@68 30316 /* #### Code section: main_method ### */
jpayne@68 30317 /* #### Code section: utility_code_pragmas ### */
jpayne@68 30318 #ifdef _MSC_VER
jpayne@68 30319 #pragma warning( push )
jpayne@68 30320 /* Warning 4127: conditional expression is constant
jpayne@68 30321 * Cython uses constant conditional expressions to allow in inline functions to be optimized at
jpayne@68 30322 * compile-time, so this warning is not useful
jpayne@68 30323 */
jpayne@68 30324 #pragma warning( disable : 4127 )
jpayne@68 30325 #endif
jpayne@68 30326
jpayne@68 30327
jpayne@68 30328
jpayne@68 30329 /* #### Code section: utility_code_def ### */
jpayne@68 30330
jpayne@68 30331 /* --- Runtime support code --- */
jpayne@68 30332 /* Refnanny */
jpayne@68 30333 #if CYTHON_REFNANNY
jpayne@68 30334 static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) {
jpayne@68 30335 PyObject *m = NULL, *p = NULL;
jpayne@68 30336 void *r = NULL;
jpayne@68 30337 m = PyImport_ImportModule(modname);
jpayne@68 30338 if (!m) goto end;
jpayne@68 30339 p = PyObject_GetAttrString(m, "RefNannyAPI");
jpayne@68 30340 if (!p) goto end;
jpayne@68 30341 r = PyLong_AsVoidPtr(p);
jpayne@68 30342 end:
jpayne@68 30343 Py_XDECREF(p);
jpayne@68 30344 Py_XDECREF(m);
jpayne@68 30345 return (__Pyx_RefNannyAPIStruct *)r;
jpayne@68 30346 }
jpayne@68 30347 #endif
jpayne@68 30348
jpayne@68 30349 /* PyErrExceptionMatches */
jpayne@68 30350 #if CYTHON_FAST_THREAD_STATE
jpayne@68 30351 static int __Pyx_PyErr_ExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
jpayne@68 30352 Py_ssize_t i, n;
jpayne@68 30353 n = PyTuple_GET_SIZE(tuple);
jpayne@68 30354 #if PY_MAJOR_VERSION >= 3
jpayne@68 30355 for (i=0; i<n; i++) {
jpayne@68 30356 if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
jpayne@68 30357 }
jpayne@68 30358 #endif
jpayne@68 30359 for (i=0; i<n; i++) {
jpayne@68 30360 if (__Pyx_PyErr_GivenExceptionMatches(exc_type, PyTuple_GET_ITEM(tuple, i))) return 1;
jpayne@68 30361 }
jpayne@68 30362 return 0;
jpayne@68 30363 }
jpayne@68 30364 static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err) {
jpayne@68 30365 int result;
jpayne@68 30366 PyObject *exc_type;
jpayne@68 30367 #if PY_VERSION_HEX >= 0x030C00A6
jpayne@68 30368 PyObject *current_exception = tstate->current_exception;
jpayne@68 30369 if (unlikely(!current_exception)) return 0;
jpayne@68 30370 exc_type = (PyObject*) Py_TYPE(current_exception);
jpayne@68 30371 if (exc_type == err) return 1;
jpayne@68 30372 #else
jpayne@68 30373 exc_type = tstate->curexc_type;
jpayne@68 30374 if (exc_type == err) return 1;
jpayne@68 30375 if (unlikely(!exc_type)) return 0;
jpayne@68 30376 #endif
jpayne@68 30377 #if CYTHON_AVOID_BORROWED_REFS
jpayne@68 30378 Py_INCREF(exc_type);
jpayne@68 30379 #endif
jpayne@68 30380 if (unlikely(PyTuple_Check(err))) {
jpayne@68 30381 result = __Pyx_PyErr_ExceptionMatchesTuple(exc_type, err);
jpayne@68 30382 } else {
jpayne@68 30383 result = __Pyx_PyErr_GivenExceptionMatches(exc_type, err);
jpayne@68 30384 }
jpayne@68 30385 #if CYTHON_AVOID_BORROWED_REFS
jpayne@68 30386 Py_DECREF(exc_type);
jpayne@68 30387 #endif
jpayne@68 30388 return result;
jpayne@68 30389 }
jpayne@68 30390 #endif
jpayne@68 30391
jpayne@68 30392 /* PyErrFetchRestore */
jpayne@68 30393 #if CYTHON_FAST_THREAD_STATE
jpayne@68 30394 static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
jpayne@68 30395 #if PY_VERSION_HEX >= 0x030C00A6
jpayne@68 30396 PyObject *tmp_value;
jpayne@68 30397 assert(type == NULL || (value != NULL && type == (PyObject*) Py_TYPE(value)));
jpayne@68 30398 if (value) {
jpayne@68 30399 #if CYTHON_COMPILING_IN_CPYTHON
jpayne@68 30400 if (unlikely(((PyBaseExceptionObject*) value)->traceback != tb))
jpayne@68 30401 #endif
jpayne@68 30402 PyException_SetTraceback(value, tb);
jpayne@68 30403 }
jpayne@68 30404 tmp_value = tstate->current_exception;
jpayne@68 30405 tstate->current_exception = value;
jpayne@68 30406 Py_XDECREF(tmp_value);
jpayne@68 30407 Py_XDECREF(type);
jpayne@68 30408 Py_XDECREF(tb);
jpayne@68 30409 #else
jpayne@68 30410 PyObject *tmp_type, *tmp_value, *tmp_tb;
jpayne@68 30411 tmp_type = tstate->curexc_type;
jpayne@68 30412 tmp_value = tstate->curexc_value;
jpayne@68 30413 tmp_tb = tstate->curexc_traceback;
jpayne@68 30414 tstate->curexc_type = type;
jpayne@68 30415 tstate->curexc_value = value;
jpayne@68 30416 tstate->curexc_traceback = tb;
jpayne@68 30417 Py_XDECREF(tmp_type);
jpayne@68 30418 Py_XDECREF(tmp_value);
jpayne@68 30419 Py_XDECREF(tmp_tb);
jpayne@68 30420 #endif
jpayne@68 30421 }
jpayne@68 30422 static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
jpayne@68 30423 #if PY_VERSION_HEX >= 0x030C00A6
jpayne@68 30424 PyObject* exc_value;
jpayne@68 30425 exc_value = tstate->current_exception;
jpayne@68 30426 tstate->current_exception = 0;
jpayne@68 30427 *value = exc_value;
jpayne@68 30428 *type = NULL;
jpayne@68 30429 *tb = NULL;
jpayne@68 30430 if (exc_value) {
jpayne@68 30431 *type = (PyObject*) Py_TYPE(exc_value);
jpayne@68 30432 Py_INCREF(*type);
jpayne@68 30433 #if CYTHON_COMPILING_IN_CPYTHON
jpayne@68 30434 *tb = ((PyBaseExceptionObject*) exc_value)->traceback;
jpayne@68 30435 Py_XINCREF(*tb);
jpayne@68 30436 #else
jpayne@68 30437 *tb = PyException_GetTraceback(exc_value);
jpayne@68 30438 #endif
jpayne@68 30439 }
jpayne@68 30440 #else
jpayne@68 30441 *type = tstate->curexc_type;
jpayne@68 30442 *value = tstate->curexc_value;
jpayne@68 30443 *tb = tstate->curexc_traceback;
jpayne@68 30444 tstate->curexc_type = 0;
jpayne@68 30445 tstate->curexc_value = 0;
jpayne@68 30446 tstate->curexc_traceback = 0;
jpayne@68 30447 #endif
jpayne@68 30448 }
jpayne@68 30449 #endif
jpayne@68 30450
jpayne@68 30451 /* PyObjectGetAttrStr */
jpayne@68 30452 #if CYTHON_USE_TYPE_SLOTS
jpayne@68 30453 static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) {
jpayne@68 30454 PyTypeObject* tp = Py_TYPE(obj);
jpayne@68 30455 if (likely(tp->tp_getattro))
jpayne@68 30456 return tp->tp_getattro(obj, attr_name);
jpayne@68 30457 #if PY_MAJOR_VERSION < 3
jpayne@68 30458 if (likely(tp->tp_getattr))
jpayne@68 30459 return tp->tp_getattr(obj, PyString_AS_STRING(attr_name));
jpayne@68 30460 #endif
jpayne@68 30461 return PyObject_GetAttr(obj, attr_name);
jpayne@68 30462 }
jpayne@68 30463 #endif
jpayne@68 30464
jpayne@68 30465 /* PyObjectGetAttrStrNoError */
jpayne@68 30466 #if __PYX_LIMITED_VERSION_HEX < 0x030d00A1
jpayne@68 30467 static void __Pyx_PyObject_GetAttrStr_ClearAttributeError(void) {
jpayne@68 30468 __Pyx_PyThreadState_declare
jpayne@68 30469 __Pyx_PyThreadState_assign
jpayne@68 30470 if (likely(__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError)))
jpayne@68 30471 __Pyx_PyErr_Clear();
jpayne@68 30472 }
jpayne@68 30473 #endif
jpayne@68 30474 static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name) {
jpayne@68 30475 PyObject *result;
jpayne@68 30476 #if __PYX_LIMITED_VERSION_HEX >= 0x030d00A1
jpayne@68 30477 (void) PyObject_GetOptionalAttr(obj, attr_name, &result);
jpayne@68 30478 return result;
jpayne@68 30479 #else
jpayne@68 30480 #if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_TYPE_SLOTS && PY_VERSION_HEX >= 0x030700B1
jpayne@68 30481 PyTypeObject* tp = Py_TYPE(obj);
jpayne@68 30482 if (likely(tp->tp_getattro == PyObject_GenericGetAttr)) {
jpayne@68 30483 return _PyObject_GenericGetAttrWithDict(obj, attr_name, NULL, 1);
jpayne@68 30484 }
jpayne@68 30485 #endif
jpayne@68 30486 result = __Pyx_PyObject_GetAttrStr(obj, attr_name);
jpayne@68 30487 if (unlikely(!result)) {
jpayne@68 30488 __Pyx_PyObject_GetAttrStr_ClearAttributeError();
jpayne@68 30489 }
jpayne@68 30490 return result;
jpayne@68 30491 #endif
jpayne@68 30492 }
jpayne@68 30493
jpayne@68 30494 /* GetBuiltinName */
jpayne@68 30495 static PyObject *__Pyx_GetBuiltinName(PyObject *name) {
jpayne@68 30496 PyObject* result = __Pyx_PyObject_GetAttrStrNoError(__pyx_b, name);
jpayne@68 30497 if (unlikely(!result) && !PyErr_Occurred()) {
jpayne@68 30498 PyErr_Format(PyExc_NameError,
jpayne@68 30499 #if PY_MAJOR_VERSION >= 3
jpayne@68 30500 "name '%U' is not defined", name);
jpayne@68 30501 #else
jpayne@68 30502 "name '%.200s' is not defined", PyString_AS_STRING(name));
jpayne@68 30503 #endif
jpayne@68 30504 }
jpayne@68 30505 return result;
jpayne@68 30506 }
jpayne@68 30507
jpayne@68 30508 /* TupleAndListFromArray */
jpayne@68 30509 #if CYTHON_COMPILING_IN_CPYTHON
jpayne@68 30510 static CYTHON_INLINE void __Pyx_copy_object_array(PyObject *const *CYTHON_RESTRICT src, PyObject** CYTHON_RESTRICT dest, Py_ssize_t length) {
jpayne@68 30511 PyObject *v;
jpayne@68 30512 Py_ssize_t i;
jpayne@68 30513 for (i = 0; i < length; i++) {
jpayne@68 30514 v = dest[i] = src[i];
jpayne@68 30515 Py_INCREF(v);
jpayne@68 30516 }
jpayne@68 30517 }
jpayne@68 30518 static CYTHON_INLINE PyObject *
jpayne@68 30519 __Pyx_PyTuple_FromArray(PyObject *const *src, Py_ssize_t n)
jpayne@68 30520 {
jpayne@68 30521 PyObject *res;
jpayne@68 30522 if (n <= 0) {
jpayne@68 30523 Py_INCREF(__pyx_empty_tuple);
jpayne@68 30524 return __pyx_empty_tuple;
jpayne@68 30525 }
jpayne@68 30526 res = PyTuple_New(n);
jpayne@68 30527 if (unlikely(res == NULL)) return NULL;
jpayne@68 30528 __Pyx_copy_object_array(src, ((PyTupleObject*)res)->ob_item, n);
jpayne@68 30529 return res;
jpayne@68 30530 }
jpayne@68 30531 static CYTHON_INLINE PyObject *
jpayne@68 30532 __Pyx_PyList_FromArray(PyObject *const *src, Py_ssize_t n)
jpayne@68 30533 {
jpayne@68 30534 PyObject *res;
jpayne@68 30535 if (n <= 0) {
jpayne@68 30536 return PyList_New(0);
jpayne@68 30537 }
jpayne@68 30538 res = PyList_New(n);
jpayne@68 30539 if (unlikely(res == NULL)) return NULL;
jpayne@68 30540 __Pyx_copy_object_array(src, ((PyListObject*)res)->ob_item, n);
jpayne@68 30541 return res;
jpayne@68 30542 }
jpayne@68 30543 #endif
jpayne@68 30544
jpayne@68 30545 /* BytesEquals */
jpayne@68 30546 static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals) {
jpayne@68 30547 #if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API
jpayne@68 30548 return PyObject_RichCompareBool(s1, s2, equals);
jpayne@68 30549 #else
jpayne@68 30550 if (s1 == s2) {
jpayne@68 30551 return (equals == Py_EQ);
jpayne@68 30552 } else if (PyBytes_CheckExact(s1) & PyBytes_CheckExact(s2)) {
jpayne@68 30553 const char *ps1, *ps2;
jpayne@68 30554 Py_ssize_t length = PyBytes_GET_SIZE(s1);
jpayne@68 30555 if (length != PyBytes_GET_SIZE(s2))
jpayne@68 30556 return (equals == Py_NE);
jpayne@68 30557 ps1 = PyBytes_AS_STRING(s1);
jpayne@68 30558 ps2 = PyBytes_AS_STRING(s2);
jpayne@68 30559 if (ps1[0] != ps2[0]) {
jpayne@68 30560 return (equals == Py_NE);
jpayne@68 30561 } else if (length == 1) {
jpayne@68 30562 return (equals == Py_EQ);
jpayne@68 30563 } else {
jpayne@68 30564 int result;
jpayne@68 30565 #if CYTHON_USE_UNICODE_INTERNALS && (PY_VERSION_HEX < 0x030B0000)
jpayne@68 30566 Py_hash_t hash1, hash2;
jpayne@68 30567 hash1 = ((PyBytesObject*)s1)->ob_shash;
jpayne@68 30568 hash2 = ((PyBytesObject*)s2)->ob_shash;
jpayne@68 30569 if (hash1 != hash2 && hash1 != -1 && hash2 != -1) {
jpayne@68 30570 return (equals == Py_NE);
jpayne@68 30571 }
jpayne@68 30572 #endif
jpayne@68 30573 result = memcmp(ps1, ps2, (size_t)length);
jpayne@68 30574 return (equals == Py_EQ) ? (result == 0) : (result != 0);
jpayne@68 30575 }
jpayne@68 30576 } else if ((s1 == Py_None) & PyBytes_CheckExact(s2)) {
jpayne@68 30577 return (equals == Py_NE);
jpayne@68 30578 } else if ((s2 == Py_None) & PyBytes_CheckExact(s1)) {
jpayne@68 30579 return (equals == Py_NE);
jpayne@68 30580 } else {
jpayne@68 30581 int result;
jpayne@68 30582 PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
jpayne@68 30583 if (!py_result)
jpayne@68 30584 return -1;
jpayne@68 30585 result = __Pyx_PyObject_IsTrue(py_result);
jpayne@68 30586 Py_DECREF(py_result);
jpayne@68 30587 return result;
jpayne@68 30588 }
jpayne@68 30589 #endif
jpayne@68 30590 }
jpayne@68 30591
jpayne@68 30592 /* UnicodeEquals */
jpayne@68 30593 static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals) {
jpayne@68 30594 #if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API
jpayne@68 30595 return PyObject_RichCompareBool(s1, s2, equals);
jpayne@68 30596 #else
jpayne@68 30597 #if PY_MAJOR_VERSION < 3
jpayne@68 30598 PyObject* owned_ref = NULL;
jpayne@68 30599 #endif
jpayne@68 30600 int s1_is_unicode, s2_is_unicode;
jpayne@68 30601 if (s1 == s2) {
jpayne@68 30602 goto return_eq;
jpayne@68 30603 }
jpayne@68 30604 s1_is_unicode = PyUnicode_CheckExact(s1);
jpayne@68 30605 s2_is_unicode = PyUnicode_CheckExact(s2);
jpayne@68 30606 #if PY_MAJOR_VERSION < 3
jpayne@68 30607 if ((s1_is_unicode & (!s2_is_unicode)) && PyString_CheckExact(s2)) {
jpayne@68 30608 owned_ref = PyUnicode_FromObject(s2);
jpayne@68 30609 if (unlikely(!owned_ref))
jpayne@68 30610 return -1;
jpayne@68 30611 s2 = owned_ref;
jpayne@68 30612 s2_is_unicode = 1;
jpayne@68 30613 } else if ((s2_is_unicode & (!s1_is_unicode)) && PyString_CheckExact(s1)) {
jpayne@68 30614 owned_ref = PyUnicode_FromObject(s1);
jpayne@68 30615 if (unlikely(!owned_ref))
jpayne@68 30616 return -1;
jpayne@68 30617 s1 = owned_ref;
jpayne@68 30618 s1_is_unicode = 1;
jpayne@68 30619 } else if (((!s2_is_unicode) & (!s1_is_unicode))) {
jpayne@68 30620 return __Pyx_PyBytes_Equals(s1, s2, equals);
jpayne@68 30621 }
jpayne@68 30622 #endif
jpayne@68 30623 if (s1_is_unicode & s2_is_unicode) {
jpayne@68 30624 Py_ssize_t length;
jpayne@68 30625 int kind;
jpayne@68 30626 void *data1, *data2;
jpayne@68 30627 if (unlikely(__Pyx_PyUnicode_READY(s1) < 0) || unlikely(__Pyx_PyUnicode_READY(s2) < 0))
jpayne@68 30628 return -1;
jpayne@68 30629 length = __Pyx_PyUnicode_GET_LENGTH(s1);
jpayne@68 30630 if (length != __Pyx_PyUnicode_GET_LENGTH(s2)) {
jpayne@68 30631 goto return_ne;
jpayne@68 30632 }
jpayne@68 30633 #if CYTHON_USE_UNICODE_INTERNALS
jpayne@68 30634 {
jpayne@68 30635 Py_hash_t hash1, hash2;
jpayne@68 30636 #if CYTHON_PEP393_ENABLED
jpayne@68 30637 hash1 = ((PyASCIIObject*)s1)->hash;
jpayne@68 30638 hash2 = ((PyASCIIObject*)s2)->hash;
jpayne@68 30639 #else
jpayne@68 30640 hash1 = ((PyUnicodeObject*)s1)->hash;
jpayne@68 30641 hash2 = ((PyUnicodeObject*)s2)->hash;
jpayne@68 30642 #endif
jpayne@68 30643 if (hash1 != hash2 && hash1 != -1 && hash2 != -1) {
jpayne@68 30644 goto return_ne;
jpayne@68 30645 }
jpayne@68 30646 }
jpayne@68 30647 #endif
jpayne@68 30648 kind = __Pyx_PyUnicode_KIND(s1);
jpayne@68 30649 if (kind != __Pyx_PyUnicode_KIND(s2)) {
jpayne@68 30650 goto return_ne;
jpayne@68 30651 }
jpayne@68 30652 data1 = __Pyx_PyUnicode_DATA(s1);
jpayne@68 30653 data2 = __Pyx_PyUnicode_DATA(s2);
jpayne@68 30654 if (__Pyx_PyUnicode_READ(kind, data1, 0) != __Pyx_PyUnicode_READ(kind, data2, 0)) {
jpayne@68 30655 goto return_ne;
jpayne@68 30656 } else if (length == 1) {
jpayne@68 30657 goto return_eq;
jpayne@68 30658 } else {
jpayne@68 30659 int result = memcmp(data1, data2, (size_t)(length * kind));
jpayne@68 30660 #if PY_MAJOR_VERSION < 3
jpayne@68 30661 Py_XDECREF(owned_ref);
jpayne@68 30662 #endif
jpayne@68 30663 return (equals == Py_EQ) ? (result == 0) : (result != 0);
jpayne@68 30664 }
jpayne@68 30665 } else if ((s1 == Py_None) & s2_is_unicode) {
jpayne@68 30666 goto return_ne;
jpayne@68 30667 } else if ((s2 == Py_None) & s1_is_unicode) {
jpayne@68 30668 goto return_ne;
jpayne@68 30669 } else {
jpayne@68 30670 int result;
jpayne@68 30671 PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
jpayne@68 30672 #if PY_MAJOR_VERSION < 3
jpayne@68 30673 Py_XDECREF(owned_ref);
jpayne@68 30674 #endif
jpayne@68 30675 if (!py_result)
jpayne@68 30676 return -1;
jpayne@68 30677 result = __Pyx_PyObject_IsTrue(py_result);
jpayne@68 30678 Py_DECREF(py_result);
jpayne@68 30679 return result;
jpayne@68 30680 }
jpayne@68 30681 return_eq:
jpayne@68 30682 #if PY_MAJOR_VERSION < 3
jpayne@68 30683 Py_XDECREF(owned_ref);
jpayne@68 30684 #endif
jpayne@68 30685 return (equals == Py_EQ);
jpayne@68 30686 return_ne:
jpayne@68 30687 #if PY_MAJOR_VERSION < 3
jpayne@68 30688 Py_XDECREF(owned_ref);
jpayne@68 30689 #endif
jpayne@68 30690 return (equals == Py_NE);
jpayne@68 30691 #endif
jpayne@68 30692 }
jpayne@68 30693
jpayne@68 30694 /* fastcall */
jpayne@68 30695 #if CYTHON_METH_FASTCALL
jpayne@68 30696 static CYTHON_INLINE PyObject * __Pyx_GetKwValue_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues, PyObject *s)
jpayne@68 30697 {
jpayne@68 30698 Py_ssize_t i, n = PyTuple_GET_SIZE(kwnames);
jpayne@68 30699 for (i = 0; i < n; i++)
jpayne@68 30700 {
jpayne@68 30701 if (s == PyTuple_GET_ITEM(kwnames, i)) return kwvalues[i];
jpayne@68 30702 }
jpayne@68 30703 for (i = 0; i < n; i++)
jpayne@68 30704 {
jpayne@68 30705 int eq = __Pyx_PyUnicode_Equals(s, PyTuple_GET_ITEM(kwnames, i), Py_EQ);
jpayne@68 30706 if (unlikely(eq != 0)) {
jpayne@68 30707 if (unlikely(eq < 0)) return NULL;
jpayne@68 30708 return kwvalues[i];
jpayne@68 30709 }
jpayne@68 30710 }
jpayne@68 30711 return NULL;
jpayne@68 30712 }
jpayne@68 30713 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000
jpayne@68 30714 CYTHON_UNUSED static PyObject *__Pyx_KwargsAsDict_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues) {
jpayne@68 30715 Py_ssize_t i, nkwargs = PyTuple_GET_SIZE(kwnames);
jpayne@68 30716 PyObject *dict;
jpayne@68 30717 dict = PyDict_New();
jpayne@68 30718 if (unlikely(!dict))
jpayne@68 30719 return NULL;
jpayne@68 30720 for (i=0; i<nkwargs; i++) {
jpayne@68 30721 PyObject *key = PyTuple_GET_ITEM(kwnames, i);
jpayne@68 30722 if (unlikely(PyDict_SetItem(dict, key, kwvalues[i]) < 0))
jpayne@68 30723 goto bad;
jpayne@68 30724 }
jpayne@68 30725 return dict;
jpayne@68 30726 bad:
jpayne@68 30727 Py_DECREF(dict);
jpayne@68 30728 return NULL;
jpayne@68 30729 }
jpayne@68 30730 #endif
jpayne@68 30731 #endif
jpayne@68 30732
jpayne@68 30733 /* RaiseDoubleKeywords */
jpayne@68 30734 static void __Pyx_RaiseDoubleKeywordsError(
jpayne@68 30735 const char* func_name,
jpayne@68 30736 PyObject* kw_name)
jpayne@68 30737 {
jpayne@68 30738 PyErr_Format(PyExc_TypeError,
jpayne@68 30739 #if PY_MAJOR_VERSION >= 3
jpayne@68 30740 "%s() got multiple values for keyword argument '%U'", func_name, kw_name);
jpayne@68 30741 #else
jpayne@68 30742 "%s() got multiple values for keyword argument '%s'", func_name,
jpayne@68 30743 PyString_AsString(kw_name));
jpayne@68 30744 #endif
jpayne@68 30745 }
jpayne@68 30746
jpayne@68 30747 /* ParseKeywords */
jpayne@68 30748 static int __Pyx_ParseOptionalKeywords(
jpayne@68 30749 PyObject *kwds,
jpayne@68 30750 PyObject *const *kwvalues,
jpayne@68 30751 PyObject **argnames[],
jpayne@68 30752 PyObject *kwds2,
jpayne@68 30753 PyObject *values[],
jpayne@68 30754 Py_ssize_t num_pos_args,
jpayne@68 30755 const char* function_name)
jpayne@68 30756 {
jpayne@68 30757 PyObject *key = 0, *value = 0;
jpayne@68 30758 Py_ssize_t pos = 0;
jpayne@68 30759 PyObject*** name;
jpayne@68 30760 PyObject*** first_kw_arg = argnames + num_pos_args;
jpayne@68 30761 int kwds_is_tuple = CYTHON_METH_FASTCALL && likely(PyTuple_Check(kwds));
jpayne@68 30762 while (1) {
jpayne@68 30763 Py_XDECREF(key); key = NULL;
jpayne@68 30764 Py_XDECREF(value); value = NULL;
jpayne@68 30765 if (kwds_is_tuple) {
jpayne@68 30766 Py_ssize_t size;
jpayne@68 30767 #if CYTHON_ASSUME_SAFE_MACROS
jpayne@68 30768 size = PyTuple_GET_SIZE(kwds);
jpayne@68 30769 #else
jpayne@68 30770 size = PyTuple_Size(kwds);
jpayne@68 30771 if (size < 0) goto bad;
jpayne@68 30772 #endif
jpayne@68 30773 if (pos >= size) break;
jpayne@68 30774 #if CYTHON_AVOID_BORROWED_REFS
jpayne@68 30775 key = __Pyx_PySequence_ITEM(kwds, pos);
jpayne@68 30776 if (!key) goto bad;
jpayne@68 30777 #elif CYTHON_ASSUME_SAFE_MACROS
jpayne@68 30778 key = PyTuple_GET_ITEM(kwds, pos);
jpayne@68 30779 #else
jpayne@68 30780 key = PyTuple_GetItem(kwds, pos);
jpayne@68 30781 if (!key) goto bad;
jpayne@68 30782 #endif
jpayne@68 30783 value = kwvalues[pos];
jpayne@68 30784 pos++;
jpayne@68 30785 }
jpayne@68 30786 else
jpayne@68 30787 {
jpayne@68 30788 if (!PyDict_Next(kwds, &pos, &key, &value)) break;
jpayne@68 30789 #if CYTHON_AVOID_BORROWED_REFS
jpayne@68 30790 Py_INCREF(key);
jpayne@68 30791 #endif
jpayne@68 30792 }
jpayne@68 30793 name = first_kw_arg;
jpayne@68 30794 while (*name && (**name != key)) name++;
jpayne@68 30795 if (*name) {
jpayne@68 30796 values[name-argnames] = value;
jpayne@68 30797 #if CYTHON_AVOID_BORROWED_REFS
jpayne@68 30798 Py_INCREF(value);
jpayne@68 30799 Py_DECREF(key);
jpayne@68 30800 #endif
jpayne@68 30801 key = NULL;
jpayne@68 30802 value = NULL;
jpayne@68 30803 continue;
jpayne@68 30804 }
jpayne@68 30805 #if !CYTHON_AVOID_BORROWED_REFS
jpayne@68 30806 Py_INCREF(key);
jpayne@68 30807 #endif
jpayne@68 30808 Py_INCREF(value);
jpayne@68 30809 name = first_kw_arg;
jpayne@68 30810 #if PY_MAJOR_VERSION < 3
jpayne@68 30811 if (likely(PyString_Check(key))) {
jpayne@68 30812 while (*name) {
jpayne@68 30813 if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key))
jpayne@68 30814 && _PyString_Eq(**name, key)) {
jpayne@68 30815 values[name-argnames] = value;
jpayne@68 30816 #if CYTHON_AVOID_BORROWED_REFS
jpayne@68 30817 value = NULL;
jpayne@68 30818 #endif
jpayne@68 30819 break;
jpayne@68 30820 }
jpayne@68 30821 name++;
jpayne@68 30822 }
jpayne@68 30823 if (*name) continue;
jpayne@68 30824 else {
jpayne@68 30825 PyObject*** argname = argnames;
jpayne@68 30826 while (argname != first_kw_arg) {
jpayne@68 30827 if ((**argname == key) || (
jpayne@68 30828 (CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**argname) == PyString_GET_SIZE(key))
jpayne@68 30829 && _PyString_Eq(**argname, key))) {
jpayne@68 30830 goto arg_passed_twice;
jpayne@68 30831 }
jpayne@68 30832 argname++;
jpayne@68 30833 }
jpayne@68 30834 }
jpayne@68 30835 } else
jpayne@68 30836 #endif
jpayne@68 30837 if (likely(PyUnicode_Check(key))) {
jpayne@68 30838 while (*name) {
jpayne@68 30839 int cmp = (
jpayne@68 30840 #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
jpayne@68 30841 (__Pyx_PyUnicode_GET_LENGTH(**name) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 :
jpayne@68 30842 #endif
jpayne@68 30843 PyUnicode_Compare(**name, key)
jpayne@68 30844 );
jpayne@68 30845 if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
jpayne@68 30846 if (cmp == 0) {
jpayne@68 30847 values[name-argnames] = value;
jpayne@68 30848 #if CYTHON_AVOID_BORROWED_REFS
jpayne@68 30849 value = NULL;
jpayne@68 30850 #endif
jpayne@68 30851 break;
jpayne@68 30852 }
jpayne@68 30853 name++;
jpayne@68 30854 }
jpayne@68 30855 if (*name) continue;
jpayne@68 30856 else {
jpayne@68 30857 PyObject*** argname = argnames;
jpayne@68 30858 while (argname != first_kw_arg) {
jpayne@68 30859 int cmp = (**argname == key) ? 0 :
jpayne@68 30860 #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
jpayne@68 30861 (__Pyx_PyUnicode_GET_LENGTH(**argname) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 :
jpayne@68 30862 #endif
jpayne@68 30863 PyUnicode_Compare(**argname, key);
jpayne@68 30864 if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
jpayne@68 30865 if (cmp == 0) goto arg_passed_twice;
jpayne@68 30866 argname++;
jpayne@68 30867 }
jpayne@68 30868 }
jpayne@68 30869 } else
jpayne@68 30870 goto invalid_keyword_type;
jpayne@68 30871 if (kwds2) {
jpayne@68 30872 if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad;
jpayne@68 30873 } else {
jpayne@68 30874 goto invalid_keyword;
jpayne@68 30875 }
jpayne@68 30876 }
jpayne@68 30877 Py_XDECREF(key);
jpayne@68 30878 Py_XDECREF(value);
jpayne@68 30879 return 0;
jpayne@68 30880 arg_passed_twice:
jpayne@68 30881 __Pyx_RaiseDoubleKeywordsError(function_name, key);
jpayne@68 30882 goto bad;
jpayne@68 30883 invalid_keyword_type:
jpayne@68 30884 PyErr_Format(PyExc_TypeError,
jpayne@68 30885 "%.200s() keywords must be strings", function_name);
jpayne@68 30886 goto bad;
jpayne@68 30887 invalid_keyword:
jpayne@68 30888 #if PY_MAJOR_VERSION < 3
jpayne@68 30889 PyErr_Format(PyExc_TypeError,
jpayne@68 30890 "%.200s() got an unexpected keyword argument '%.200s'",
jpayne@68 30891 function_name, PyString_AsString(key));
jpayne@68 30892 #else
jpayne@68 30893 PyErr_Format(PyExc_TypeError,
jpayne@68 30894 "%s() got an unexpected keyword argument '%U'",
jpayne@68 30895 function_name, key);
jpayne@68 30896 #endif
jpayne@68 30897 bad:
jpayne@68 30898 Py_XDECREF(key);
jpayne@68 30899 Py_XDECREF(value);
jpayne@68 30900 return -1;
jpayne@68 30901 }
jpayne@68 30902
jpayne@68 30903 /* RaiseArgTupleInvalid */
jpayne@68 30904 static void __Pyx_RaiseArgtupleInvalid(
jpayne@68 30905 const char* func_name,
jpayne@68 30906 int exact,
jpayne@68 30907 Py_ssize_t num_min,
jpayne@68 30908 Py_ssize_t num_max,
jpayne@68 30909 Py_ssize_t num_found)
jpayne@68 30910 {
jpayne@68 30911 Py_ssize_t num_expected;
jpayne@68 30912 const char *more_or_less;
jpayne@68 30913 if (num_found < num_min) {
jpayne@68 30914 num_expected = num_min;
jpayne@68 30915 more_or_less = "at least";
jpayne@68 30916 } else {
jpayne@68 30917 num_expected = num_max;
jpayne@68 30918 more_or_less = "at most";
jpayne@68 30919 }
jpayne@68 30920 if (exact) {
jpayne@68 30921 more_or_less = "exactly";
jpayne@68 30922 }
jpayne@68 30923 PyErr_Format(PyExc_TypeError,
jpayne@68 30924 "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T "d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T "d given)",
jpayne@68 30925 func_name, more_or_less, num_expected,
jpayne@68 30926 (num_expected == 1) ? "" : "s", num_found);
jpayne@68 30927 }
jpayne@68 30928
jpayne@68 30929 /* Profile */
jpayne@68 30930 #if CYTHON_PROFILE
jpayne@68 30931 static int __Pyx_TraceSetupAndCall(PyCodeObject** code,
jpayne@68 30932 PyFrameObject** frame,
jpayne@68 30933 PyThreadState* tstate,
jpayne@68 30934 const char *funcname,
jpayne@68 30935 const char *srcfile,
jpayne@68 30936 int firstlineno) {
jpayne@68 30937 PyObject *type, *value, *traceback;
jpayne@68 30938 int retval;
jpayne@68 30939 if (*frame == NULL || !CYTHON_PROFILE_REUSE_FRAME) {
jpayne@68 30940 if (*code == NULL) {
jpayne@68 30941 *code = __Pyx_createFrameCodeObject(funcname, srcfile, firstlineno);
jpayne@68 30942 if (*code == NULL) return 0;
jpayne@68 30943 }
jpayne@68 30944 *frame = PyFrame_New(
jpayne@68 30945 tstate, /*PyThreadState *tstate*/
jpayne@68 30946 *code, /*PyCodeObject *code*/
jpayne@68 30947 __pyx_d, /*PyObject *globals*/
jpayne@68 30948 0 /*PyObject *locals*/
jpayne@68 30949 );
jpayne@68 30950 if (*frame == NULL) return 0;
jpayne@68 30951 if (CYTHON_TRACE && (*frame)->f_trace == NULL) {
jpayne@68 30952 Py_INCREF(Py_None);
jpayne@68 30953 (*frame)->f_trace = Py_None;
jpayne@68 30954 }
jpayne@68 30955 #if PY_VERSION_HEX < 0x030400B1
jpayne@68 30956 } else {
jpayne@68 30957 (*frame)->f_tstate = tstate;
jpayne@68 30958 #endif
jpayne@68 30959 }
jpayne@68 30960 __Pyx_PyFrame_SetLineNumber(*frame, firstlineno);
jpayne@68 30961 retval = 1;
jpayne@68 30962 __Pyx_EnterTracing(tstate);
jpayne@68 30963 __Pyx_ErrFetchInState(tstate, &type, &value, &traceback);
jpayne@68 30964 #if CYTHON_TRACE
jpayne@68 30965 if (tstate->c_tracefunc)
jpayne@68 30966 retval = tstate->c_tracefunc(tstate->c_traceobj, *frame, PyTrace_CALL, NULL) == 0;
jpayne@68 30967 if (retval && tstate->c_profilefunc)
jpayne@68 30968 #endif
jpayne@68 30969 retval = tstate->c_profilefunc(tstate->c_profileobj, *frame, PyTrace_CALL, NULL) == 0;
jpayne@68 30970 __Pyx_LeaveTracing(tstate);
jpayne@68 30971 if (retval) {
jpayne@68 30972 __Pyx_ErrRestoreInState(tstate, type, value, traceback);
jpayne@68 30973 return __Pyx_IsTracing(tstate, 0, 0) && retval;
jpayne@68 30974 } else {
jpayne@68 30975 Py_XDECREF(type);
jpayne@68 30976 Py_XDECREF(value);
jpayne@68 30977 Py_XDECREF(traceback);
jpayne@68 30978 return -1;
jpayne@68 30979 }
jpayne@68 30980 }
jpayne@68 30981 static PyCodeObject *__Pyx_createFrameCodeObject(const char *funcname, const char *srcfile, int firstlineno) {
jpayne@68 30982 PyCodeObject *py_code = 0;
jpayne@68 30983 #if PY_MAJOR_VERSION >= 3
jpayne@68 30984 py_code = PyCode_NewEmpty(srcfile, funcname, firstlineno);
jpayne@68 30985 if (likely(py_code)) {
jpayne@68 30986 py_code->co_flags |= CO_OPTIMIZED | CO_NEWLOCALS;
jpayne@68 30987 }
jpayne@68 30988 #else
jpayne@68 30989 PyObject *py_srcfile = 0;
jpayne@68 30990 PyObject *py_funcname = 0;
jpayne@68 30991 py_funcname = PyString_FromString(funcname);
jpayne@68 30992 if (unlikely(!py_funcname)) goto bad;
jpayne@68 30993 py_srcfile = PyString_FromString(srcfile);
jpayne@68 30994 if (unlikely(!py_srcfile)) goto bad;
jpayne@68 30995 py_code = PyCode_New(
jpayne@68 30996 0,
jpayne@68 30997 0,
jpayne@68 30998 0,
jpayne@68 30999 CO_OPTIMIZED | CO_NEWLOCALS,
jpayne@68 31000 __pyx_empty_bytes, /*PyObject *code,*/
jpayne@68 31001 __pyx_empty_tuple, /*PyObject *consts,*/
jpayne@68 31002 __pyx_empty_tuple, /*PyObject *names,*/
jpayne@68 31003 __pyx_empty_tuple, /*PyObject *varnames,*/
jpayne@68 31004 __pyx_empty_tuple, /*PyObject *freevars,*/
jpayne@68 31005 __pyx_empty_tuple, /*PyObject *cellvars,*/
jpayne@68 31006 py_srcfile, /*PyObject *filename,*/
jpayne@68 31007 py_funcname, /*PyObject *name,*/
jpayne@68 31008 firstlineno,
jpayne@68 31009 __pyx_empty_bytes /*PyObject *lnotab*/
jpayne@68 31010 );
jpayne@68 31011 bad:
jpayne@68 31012 Py_XDECREF(py_srcfile);
jpayne@68 31013 Py_XDECREF(py_funcname);
jpayne@68 31014 #endif
jpayne@68 31015 return py_code;
jpayne@68 31016 }
jpayne@68 31017 #endif
jpayne@68 31018
jpayne@68 31019 /* KeywordStringCheck */
jpayne@68 31020 static int __Pyx_CheckKeywordStrings(
jpayne@68 31021 PyObject *kw,
jpayne@68 31022 const char* function_name,
jpayne@68 31023 int kw_allowed)
jpayne@68 31024 {
jpayne@68 31025 PyObject* key = 0;
jpayne@68 31026 Py_ssize_t pos = 0;
jpayne@68 31027 #if CYTHON_COMPILING_IN_PYPY
jpayne@68 31028 if (!kw_allowed && PyDict_Next(kw, &pos, &key, 0))
jpayne@68 31029 goto invalid_keyword;
jpayne@68 31030 return 1;
jpayne@68 31031 #else
jpayne@68 31032 if (CYTHON_METH_FASTCALL && likely(PyTuple_Check(kw))) {
jpayne@68 31033 Py_ssize_t kwsize;
jpayne@68 31034 #if CYTHON_ASSUME_SAFE_MACROS
jpayne@68 31035 kwsize = PyTuple_GET_SIZE(kw);
jpayne@68 31036 #else
jpayne@68 31037 kwsize = PyTuple_Size(kw);
jpayne@68 31038 if (kwsize < 0) return 0;
jpayne@68 31039 #endif
jpayne@68 31040 if (unlikely(kwsize == 0))
jpayne@68 31041 return 1;
jpayne@68 31042 if (!kw_allowed) {
jpayne@68 31043 #if CYTHON_ASSUME_SAFE_MACROS
jpayne@68 31044 key = PyTuple_GET_ITEM(kw, 0);
jpayne@68 31045 #else
jpayne@68 31046 key = PyTuple_GetItem(kw, pos);
jpayne@68 31047 if (!key) return 0;
jpayne@68 31048 #endif
jpayne@68 31049 goto invalid_keyword;
jpayne@68 31050 }
jpayne@68 31051 #if PY_VERSION_HEX < 0x03090000
jpayne@68 31052 for (pos = 0; pos < kwsize; pos++) {
jpayne@68 31053 #if CYTHON_ASSUME_SAFE_MACROS
jpayne@68 31054 key = PyTuple_GET_ITEM(kw, pos);
jpayne@68 31055 #else
jpayne@68 31056 key = PyTuple_GetItem(kw, pos);
jpayne@68 31057 if (!key) return 0;
jpayne@68 31058 #endif
jpayne@68 31059 if (unlikely(!PyUnicode_Check(key)))
jpayne@68 31060 goto invalid_keyword_type;
jpayne@68 31061 }
jpayne@68 31062 #endif
jpayne@68 31063 return 1;
jpayne@68 31064 }
jpayne@68 31065 while (PyDict_Next(kw, &pos, &key, 0)) {
jpayne@68 31066 #if PY_MAJOR_VERSION < 3
jpayne@68 31067 if (unlikely(!PyString_Check(key)))
jpayne@68 31068 #endif
jpayne@68 31069 if (unlikely(!PyUnicode_Check(key)))
jpayne@68 31070 goto invalid_keyword_type;
jpayne@68 31071 }
jpayne@68 31072 if (!kw_allowed && unlikely(key))
jpayne@68 31073 goto invalid_keyword;
jpayne@68 31074 return 1;
jpayne@68 31075 invalid_keyword_type:
jpayne@68 31076 PyErr_Format(PyExc_TypeError,
jpayne@68 31077 "%.200s() keywords must be strings", function_name);
jpayne@68 31078 return 0;
jpayne@68 31079 #endif
jpayne@68 31080 invalid_keyword:
jpayne@68 31081 #if PY_MAJOR_VERSION < 3
jpayne@68 31082 PyErr_Format(PyExc_TypeError,
jpayne@68 31083 "%.200s() got an unexpected keyword argument '%.200s'",
jpayne@68 31084 function_name, PyString_AsString(key));
jpayne@68 31085 #else
jpayne@68 31086 PyErr_Format(PyExc_TypeError,
jpayne@68 31087 "%s() got an unexpected keyword argument '%U'",
jpayne@68 31088 function_name, key);
jpayne@68 31089 #endif
jpayne@68 31090 return 0;
jpayne@68 31091 }
jpayne@68 31092
jpayne@68 31093 /* PyFunctionFastCall */
jpayne@68 31094 #if CYTHON_FAST_PYCALL && !CYTHON_VECTORCALL
jpayne@68 31095 static PyObject* __Pyx_PyFunction_FastCallNoKw(PyCodeObject *co, PyObject **args, Py_ssize_t na,
jpayne@68 31096 PyObject *globals) {
jpayne@68 31097 PyFrameObject *f;
jpayne@68 31098 PyThreadState *tstate = __Pyx_PyThreadState_Current;
jpayne@68 31099 PyObject **fastlocals;
jpayne@68 31100 Py_ssize_t i;
jpayne@68 31101 PyObject *result;
jpayne@68 31102 assert(globals != NULL);
jpayne@68 31103 /* XXX Perhaps we should create a specialized
jpayne@68 31104 PyFrame_New() that doesn't take locals, but does
jpayne@68 31105 take builtins without sanity checking them.
jpayne@68 31106 */
jpayne@68 31107 assert(tstate != NULL);
jpayne@68 31108 f = PyFrame_New(tstate, co, globals, NULL);
jpayne@68 31109 if (f == NULL) {
jpayne@68 31110 return NULL;
jpayne@68 31111 }
jpayne@68 31112 fastlocals = __Pyx_PyFrame_GetLocalsplus(f);
jpayne@68 31113 for (i = 0; i < na; i++) {
jpayne@68 31114 Py_INCREF(*args);
jpayne@68 31115 fastlocals[i] = *args++;
jpayne@68 31116 }
jpayne@68 31117 result = PyEval_EvalFrameEx(f,0);
jpayne@68 31118 ++tstate->recursion_depth;
jpayne@68 31119 Py_DECREF(f);
jpayne@68 31120 --tstate->recursion_depth;
jpayne@68 31121 return result;
jpayne@68 31122 }
jpayne@68 31123 static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs) {
jpayne@68 31124 PyCodeObject *co = (PyCodeObject *)PyFunction_GET_CODE(func);
jpayne@68 31125 PyObject *globals = PyFunction_GET_GLOBALS(func);
jpayne@68 31126 PyObject *argdefs = PyFunction_GET_DEFAULTS(func);
jpayne@68 31127 PyObject *closure;
jpayne@68 31128 #if PY_MAJOR_VERSION >= 3
jpayne@68 31129 PyObject *kwdefs;
jpayne@68 31130 #endif
jpayne@68 31131 PyObject *kwtuple, **k;
jpayne@68 31132 PyObject **d;
jpayne@68 31133 Py_ssize_t nd;
jpayne@68 31134 Py_ssize_t nk;
jpayne@68 31135 PyObject *result;
jpayne@68 31136 assert(kwargs == NULL || PyDict_Check(kwargs));
jpayne@68 31137 nk = kwargs ? PyDict_Size(kwargs) : 0;
jpayne@68 31138 #if PY_MAJOR_VERSION < 3
jpayne@68 31139 if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object"))) {
jpayne@68 31140 return NULL;
jpayne@68 31141 }
jpayne@68 31142 #else
jpayne@68 31143 if (unlikely(Py_EnterRecursiveCall(" while calling a Python object"))) {
jpayne@68 31144 return NULL;
jpayne@68 31145 }
jpayne@68 31146 #endif
jpayne@68 31147 if (
jpayne@68 31148 #if PY_MAJOR_VERSION >= 3
jpayne@68 31149 co->co_kwonlyargcount == 0 &&
jpayne@68 31150 #endif
jpayne@68 31151 likely(kwargs == NULL || nk == 0) &&
jpayne@68 31152 co->co_flags == (CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE)) {
jpayne@68 31153 if (argdefs == NULL && co->co_argcount == nargs) {
jpayne@68 31154 result = __Pyx_PyFunction_FastCallNoKw(co, args, nargs, globals);
jpayne@68 31155 goto done;
jpayne@68 31156 }
jpayne@68 31157 else if (nargs == 0 && argdefs != NULL
jpayne@68 31158 && co->co_argcount == Py_SIZE(argdefs)) {
jpayne@68 31159 /* function called with no arguments, but all parameters have
jpayne@68 31160 a default value: use default values as arguments .*/
jpayne@68 31161 args = &PyTuple_GET_ITEM(argdefs, 0);
jpayne@68 31162 result =__Pyx_PyFunction_FastCallNoKw(co, args, Py_SIZE(argdefs), globals);
jpayne@68 31163 goto done;
jpayne@68 31164 }
jpayne@68 31165 }
jpayne@68 31166 if (kwargs != NULL) {
jpayne@68 31167 Py_ssize_t pos, i;
jpayne@68 31168 kwtuple = PyTuple_New(2 * nk);
jpayne@68 31169 if (kwtuple == NULL) {
jpayne@68 31170 result = NULL;
jpayne@68 31171 goto done;
jpayne@68 31172 }
jpayne@68 31173 k = &PyTuple_GET_ITEM(kwtuple, 0);
jpayne@68 31174 pos = i = 0;
jpayne@68 31175 while (PyDict_Next(kwargs, &pos, &k[i], &k[i+1])) {
jpayne@68 31176 Py_INCREF(k[i]);
jpayne@68 31177 Py_INCREF(k[i+1]);
jpayne@68 31178 i += 2;
jpayne@68 31179 }
jpayne@68 31180 nk = i / 2;
jpayne@68 31181 }
jpayne@68 31182 else {
jpayne@68 31183 kwtuple = NULL;
jpayne@68 31184 k = NULL;
jpayne@68 31185 }
jpayne@68 31186 closure = PyFunction_GET_CLOSURE(func);
jpayne@68 31187 #if PY_MAJOR_VERSION >= 3
jpayne@68 31188 kwdefs = PyFunction_GET_KW_DEFAULTS(func);
jpayne@68 31189 #endif
jpayne@68 31190 if (argdefs != NULL) {
jpayne@68 31191 d = &PyTuple_GET_ITEM(argdefs, 0);
jpayne@68 31192 nd = Py_SIZE(argdefs);
jpayne@68 31193 }
jpayne@68 31194 else {
jpayne@68 31195 d = NULL;
jpayne@68 31196 nd = 0;
jpayne@68 31197 }
jpayne@68 31198 #if PY_MAJOR_VERSION >= 3
jpayne@68 31199 result = PyEval_EvalCodeEx((PyObject*)co, globals, (PyObject *)NULL,
jpayne@68 31200 args, (int)nargs,
jpayne@68 31201 k, (int)nk,
jpayne@68 31202 d, (int)nd, kwdefs, closure);
jpayne@68 31203 #else
jpayne@68 31204 result = PyEval_EvalCodeEx(co, globals, (PyObject *)NULL,
jpayne@68 31205 args, (int)nargs,
jpayne@68 31206 k, (int)nk,
jpayne@68 31207 d, (int)nd, closure);
jpayne@68 31208 #endif
jpayne@68 31209 Py_XDECREF(kwtuple);
jpayne@68 31210 done:
jpayne@68 31211 Py_LeaveRecursiveCall();
jpayne@68 31212 return result;
jpayne@68 31213 }
jpayne@68 31214 #endif
jpayne@68 31215
jpayne@68 31216 /* PyObjectCall */
jpayne@68 31217 #if CYTHON_COMPILING_IN_CPYTHON
jpayne@68 31218 static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) {
jpayne@68 31219 PyObject *result;
jpayne@68 31220 ternaryfunc call = Py_TYPE(func)->tp_call;
jpayne@68 31221 if (unlikely(!call))
jpayne@68 31222 return PyObject_Call(func, arg, kw);
jpayne@68 31223 #if PY_MAJOR_VERSION < 3
jpayne@68 31224 if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
jpayne@68 31225 return NULL;
jpayne@68 31226 #else
jpayne@68 31227 if (unlikely(Py_EnterRecursiveCall(" while calling a Python object")))
jpayne@68 31228 return NULL;
jpayne@68 31229 #endif
jpayne@68 31230 result = (*call)(func, arg, kw);
jpayne@68 31231 Py_LeaveRecursiveCall();
jpayne@68 31232 if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
jpayne@68 31233 PyErr_SetString(
jpayne@68 31234 PyExc_SystemError,
jpayne@68 31235 "NULL result without error in PyObject_Call");
jpayne@68 31236 }
jpayne@68 31237 return result;
jpayne@68 31238 }
jpayne@68 31239 #endif
jpayne@68 31240
jpayne@68 31241 /* PyObjectCallMethO */
jpayne@68 31242 #if CYTHON_COMPILING_IN_CPYTHON
jpayne@68 31243 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) {
jpayne@68 31244 PyObject *self, *result;
jpayne@68 31245 PyCFunction cfunc;
jpayne@68 31246 cfunc = __Pyx_CyOrPyCFunction_GET_FUNCTION(func);
jpayne@68 31247 self = __Pyx_CyOrPyCFunction_GET_SELF(func);
jpayne@68 31248 #if PY_MAJOR_VERSION < 3
jpayne@68 31249 if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
jpayne@68 31250 return NULL;
jpayne@68 31251 #else
jpayne@68 31252 if (unlikely(Py_EnterRecursiveCall(" while calling a Python object")))
jpayne@68 31253 return NULL;
jpayne@68 31254 #endif
jpayne@68 31255 result = cfunc(self, arg);
jpayne@68 31256 Py_LeaveRecursiveCall();
jpayne@68 31257 if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
jpayne@68 31258 PyErr_SetString(
jpayne@68 31259 PyExc_SystemError,
jpayne@68 31260 "NULL result without error in PyObject_Call");
jpayne@68 31261 }
jpayne@68 31262 return result;
jpayne@68 31263 }
jpayne@68 31264 #endif
jpayne@68 31265
jpayne@68 31266 /* PyObjectFastCall */
jpayne@68 31267 #if PY_VERSION_HEX < 0x03090000 || CYTHON_COMPILING_IN_LIMITED_API
jpayne@68 31268 static PyObject* __Pyx_PyObject_FastCall_fallback(PyObject *func, PyObject **args, size_t nargs, PyObject *kwargs) {
jpayne@68 31269 PyObject *argstuple;
jpayne@68 31270 PyObject *result = 0;
jpayne@68 31271 size_t i;
jpayne@68 31272 argstuple = PyTuple_New((Py_ssize_t)nargs);
jpayne@68 31273 if (unlikely(!argstuple)) return NULL;
jpayne@68 31274 for (i = 0; i < nargs; i++) {
jpayne@68 31275 Py_INCREF(args[i]);
jpayne@68 31276 if (__Pyx_PyTuple_SET_ITEM(argstuple, (Py_ssize_t)i, args[i]) < 0) goto bad;
jpayne@68 31277 }
jpayne@68 31278 result = __Pyx_PyObject_Call(func, argstuple, kwargs);
jpayne@68 31279 bad:
jpayne@68 31280 Py_DECREF(argstuple);
jpayne@68 31281 return result;
jpayne@68 31282 }
jpayne@68 31283 #endif
jpayne@68 31284 static CYTHON_INLINE PyObject* __Pyx_PyObject_FastCallDict(PyObject *func, PyObject **args, size_t _nargs, PyObject *kwargs) {
jpayne@68 31285 Py_ssize_t nargs = __Pyx_PyVectorcall_NARGS(_nargs);
jpayne@68 31286 #if CYTHON_COMPILING_IN_CPYTHON
jpayne@68 31287 if (nargs == 0 && kwargs == NULL) {
jpayne@68 31288 if (__Pyx_CyOrPyCFunction_Check(func) && likely( __Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_NOARGS))
jpayne@68 31289 return __Pyx_PyObject_CallMethO(func, NULL);
jpayne@68 31290 }
jpayne@68 31291 else if (nargs == 1 && kwargs == NULL) {
jpayne@68 31292 if (__Pyx_CyOrPyCFunction_Check(func) && likely( __Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_O))
jpayne@68 31293 return __Pyx_PyObject_CallMethO(func, args[0]);
jpayne@68 31294 }
jpayne@68 31295 #endif
jpayne@68 31296 #if PY_VERSION_HEX < 0x030800B1
jpayne@68 31297 #if CYTHON_FAST_PYCCALL
jpayne@68 31298 if (PyCFunction_Check(func)) {
jpayne@68 31299 if (kwargs) {
jpayne@68 31300 return _PyCFunction_FastCallDict(func, args, nargs, kwargs);
jpayne@68 31301 } else {
jpayne@68 31302 return _PyCFunction_FastCallKeywords(func, args, nargs, NULL);
jpayne@68 31303 }
jpayne@68 31304 }
jpayne@68 31305 #if PY_VERSION_HEX >= 0x030700A1
jpayne@68 31306 if (!kwargs && __Pyx_IS_TYPE(func, &PyMethodDescr_Type)) {
jpayne@68 31307 return _PyMethodDescr_FastCallKeywords(func, args, nargs, NULL);
jpayne@68 31308 }
jpayne@68 31309 #endif
jpayne@68 31310 #endif
jpayne@68 31311 #if CYTHON_FAST_PYCALL
jpayne@68 31312 if (PyFunction_Check(func)) {
jpayne@68 31313 return __Pyx_PyFunction_FastCallDict(func, args, nargs, kwargs);
jpayne@68 31314 }
jpayne@68 31315 #endif
jpayne@68 31316 #endif
jpayne@68 31317 if (kwargs == NULL) {
jpayne@68 31318 #if CYTHON_VECTORCALL
jpayne@68 31319 #if PY_VERSION_HEX < 0x03090000
jpayne@68 31320 vectorcallfunc f = _PyVectorcall_Function(func);
jpayne@68 31321 #else
jpayne@68 31322 vectorcallfunc f = PyVectorcall_Function(func);
jpayne@68 31323 #endif
jpayne@68 31324 if (f) {
jpayne@68 31325 return f(func, args, (size_t)nargs, NULL);
jpayne@68 31326 }
jpayne@68 31327 #elif defined(__Pyx_CyFunction_USED) && CYTHON_BACKPORT_VECTORCALL
jpayne@68 31328 if (__Pyx_CyFunction_CheckExact(func)) {
jpayne@68 31329 __pyx_vectorcallfunc f = __Pyx_CyFunction_func_vectorcall(func);
jpayne@68 31330 if (f) return f(func, args, (size_t)nargs, NULL);
jpayne@68 31331 }
jpayne@68 31332 #endif
jpayne@68 31333 }
jpayne@68 31334 if (nargs == 0) {
jpayne@68 31335 return __Pyx_PyObject_Call(func, __pyx_empty_tuple, kwargs);
jpayne@68 31336 }
jpayne@68 31337 #if PY_VERSION_HEX >= 0x03090000 && !CYTHON_COMPILING_IN_LIMITED_API
jpayne@68 31338 return PyObject_VectorcallDict(func, args, (size_t)nargs, kwargs);
jpayne@68 31339 #else
jpayne@68 31340 return __Pyx_PyObject_FastCall_fallback(func, args, (size_t)nargs, kwargs);
jpayne@68 31341 #endif
jpayne@68 31342 }
jpayne@68 31343
jpayne@68 31344 /* PyObjectCallOneArg */
jpayne@68 31345 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
jpayne@68 31346 PyObject *args[2] = {NULL, arg};
jpayne@68 31347 return __Pyx_PyObject_FastCall(func, args+1, 1 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET);
jpayne@68 31348 }
jpayne@68 31349
jpayne@68 31350 /* RaiseException */
jpayne@68 31351 #if PY_MAJOR_VERSION < 3
jpayne@68 31352 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) {
jpayne@68 31353 __Pyx_PyThreadState_declare
jpayne@68 31354 CYTHON_UNUSED_VAR(cause);
jpayne@68 31355 Py_XINCREF(type);
jpayne@68 31356 if (!value || value == Py_None)
jpayne@68 31357 value = NULL;
jpayne@68 31358 else
jpayne@68 31359 Py_INCREF(value);
jpayne@68 31360 if (!tb || tb == Py_None)
jpayne@68 31361 tb = NULL;
jpayne@68 31362 else {
jpayne@68 31363 Py_INCREF(tb);
jpayne@68 31364 if (!PyTraceBack_Check(tb)) {
jpayne@68 31365 PyErr_SetString(PyExc_TypeError,
jpayne@68 31366 "raise: arg 3 must be a traceback or None");
jpayne@68 31367 goto raise_error;
jpayne@68 31368 }
jpayne@68 31369 }
jpayne@68 31370 if (PyType_Check(type)) {
jpayne@68 31371 #if CYTHON_COMPILING_IN_PYPY
jpayne@68 31372 if (!value) {
jpayne@68 31373 Py_INCREF(Py_None);
jpayne@68 31374 value = Py_None;
jpayne@68 31375 }
jpayne@68 31376 #endif
jpayne@68 31377 PyErr_NormalizeException(&type, &value, &tb);
jpayne@68 31378 } else {
jpayne@68 31379 if (value) {
jpayne@68 31380 PyErr_SetString(PyExc_TypeError,
jpayne@68 31381 "instance exception may not have a separate value");
jpayne@68 31382 goto raise_error;
jpayne@68 31383 }
jpayne@68 31384 value = type;
jpayne@68 31385 type = (PyObject*) Py_TYPE(type);
jpayne@68 31386 Py_INCREF(type);
jpayne@68 31387 if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) {
jpayne@68 31388 PyErr_SetString(PyExc_TypeError,
jpayne@68 31389 "raise: exception class must be a subclass of BaseException");
jpayne@68 31390 goto raise_error;
jpayne@68 31391 }
jpayne@68 31392 }
jpayne@68 31393 __Pyx_PyThreadState_assign
jpayne@68 31394 __Pyx_ErrRestore(type, value, tb);
jpayne@68 31395 return;
jpayne@68 31396 raise_error:
jpayne@68 31397 Py_XDECREF(value);
jpayne@68 31398 Py_XDECREF(type);
jpayne@68 31399 Py_XDECREF(tb);
jpayne@68 31400 return;
jpayne@68 31401 }
jpayne@68 31402 #else
jpayne@68 31403 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) {
jpayne@68 31404 PyObject* owned_instance = NULL;
jpayne@68 31405 if (tb == Py_None) {
jpayne@68 31406 tb = 0;
jpayne@68 31407 } else if (tb && !PyTraceBack_Check(tb)) {
jpayne@68 31408 PyErr_SetString(PyExc_TypeError,
jpayne@68 31409 "raise: arg 3 must be a traceback or None");
jpayne@68 31410 goto bad;
jpayne@68 31411 }
jpayne@68 31412 if (value == Py_None)
jpayne@68 31413 value = 0;
jpayne@68 31414 if (PyExceptionInstance_Check(type)) {
jpayne@68 31415 if (value) {
jpayne@68 31416 PyErr_SetString(PyExc_TypeError,
jpayne@68 31417 "instance exception may not have a separate value");
jpayne@68 31418 goto bad;
jpayne@68 31419 }
jpayne@68 31420 value = type;
jpayne@68 31421 type = (PyObject*) Py_TYPE(value);
jpayne@68 31422 } else if (PyExceptionClass_Check(type)) {
jpayne@68 31423 PyObject *instance_class = NULL;
jpayne@68 31424 if (value && PyExceptionInstance_Check(value)) {
jpayne@68 31425 instance_class = (PyObject*) Py_TYPE(value);
jpayne@68 31426 if (instance_class != type) {
jpayne@68 31427 int is_subclass = PyObject_IsSubclass(instance_class, type);
jpayne@68 31428 if (!is_subclass) {
jpayne@68 31429 instance_class = NULL;
jpayne@68 31430 } else if (unlikely(is_subclass == -1)) {
jpayne@68 31431 goto bad;
jpayne@68 31432 } else {
jpayne@68 31433 type = instance_class;
jpayne@68 31434 }
jpayne@68 31435 }
jpayne@68 31436 }
jpayne@68 31437 if (!instance_class) {
jpayne@68 31438 PyObject *args;
jpayne@68 31439 if (!value)
jpayne@68 31440 args = PyTuple_New(0);
jpayne@68 31441 else if (PyTuple_Check(value)) {
jpayne@68 31442 Py_INCREF(value);
jpayne@68 31443 args = value;
jpayne@68 31444 } else
jpayne@68 31445 args = PyTuple_Pack(1, value);
jpayne@68 31446 if (!args)
jpayne@68 31447 goto bad;
jpayne@68 31448 owned_instance = PyObject_Call(type, args, NULL);
jpayne@68 31449 Py_DECREF(args);
jpayne@68 31450 if (!owned_instance)
jpayne@68 31451 goto bad;
jpayne@68 31452 value = owned_instance;
jpayne@68 31453 if (!PyExceptionInstance_Check(value)) {
jpayne@68 31454 PyErr_Format(PyExc_TypeError,
jpayne@68 31455 "calling %R should have returned an instance of "
jpayne@68 31456 "BaseException, not %R",
jpayne@68 31457 type, Py_TYPE(value));
jpayne@68 31458 goto bad;
jpayne@68 31459 }
jpayne@68 31460 }
jpayne@68 31461 } else {
jpayne@68 31462 PyErr_SetString(PyExc_TypeError,
jpayne@68 31463 "raise: exception class must be a subclass of BaseException");
jpayne@68 31464 goto bad;
jpayne@68 31465 }
jpayne@68 31466 if (cause) {
jpayne@68 31467 PyObject *fixed_cause;
jpayne@68 31468 if (cause == Py_None) {
jpayne@68 31469 fixed_cause = NULL;
jpayne@68 31470 } else if (PyExceptionClass_Check(cause)) {
jpayne@68 31471 fixed_cause = PyObject_CallObject(cause, NULL);
jpayne@68 31472 if (fixed_cause == NULL)
jpayne@68 31473 goto bad;
jpayne@68 31474 } else if (PyExceptionInstance_Check(cause)) {
jpayne@68 31475 fixed_cause = cause;
jpayne@68 31476 Py_INCREF(fixed_cause);
jpayne@68 31477 } else {
jpayne@68 31478 PyErr_SetString(PyExc_TypeError,
jpayne@68 31479 "exception causes must derive from "
jpayne@68 31480 "BaseException");
jpayne@68 31481 goto bad;
jpayne@68 31482 }
jpayne@68 31483 PyException_SetCause(value, fixed_cause);
jpayne@68 31484 }
jpayne@68 31485 PyErr_SetObject(type, value);
jpayne@68 31486 if (tb) {
jpayne@68 31487 #if PY_VERSION_HEX >= 0x030C00A6
jpayne@68 31488 PyException_SetTraceback(value, tb);
jpayne@68 31489 #elif CYTHON_FAST_THREAD_STATE
jpayne@68 31490 PyThreadState *tstate = __Pyx_PyThreadState_Current;
jpayne@68 31491 PyObject* tmp_tb = tstate->curexc_traceback;
jpayne@68 31492 if (tb != tmp_tb) {
jpayne@68 31493 Py_INCREF(tb);
jpayne@68 31494 tstate->curexc_traceback = tb;
jpayne@68 31495 Py_XDECREF(tmp_tb);
jpayne@68 31496 }
jpayne@68 31497 #else
jpayne@68 31498 PyObject *tmp_type, *tmp_value, *tmp_tb;
jpayne@68 31499 PyErr_Fetch(&tmp_type, &tmp_value, &tmp_tb);
jpayne@68 31500 Py_INCREF(tb);
jpayne@68 31501 PyErr_Restore(tmp_type, tmp_value, tb);
jpayne@68 31502 Py_XDECREF(tmp_tb);
jpayne@68 31503 #endif
jpayne@68 31504 }
jpayne@68 31505 bad:
jpayne@68 31506 Py_XDECREF(owned_instance);
jpayne@68 31507 return;
jpayne@68 31508 }
jpayne@68 31509 #endif
jpayne@68 31510
jpayne@68 31511 /* GetAttr3 */
jpayne@68 31512 #if __PYX_LIMITED_VERSION_HEX < 0x030d00A1
jpayne@68 31513 static PyObject *__Pyx_GetAttr3Default(PyObject *d) {
jpayne@68 31514 __Pyx_PyThreadState_declare
jpayne@68 31515 __Pyx_PyThreadState_assign
jpayne@68 31516 if (unlikely(!__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError)))
jpayne@68 31517 return NULL;
jpayne@68 31518 __Pyx_PyErr_Clear();
jpayne@68 31519 Py_INCREF(d);
jpayne@68 31520 return d;
jpayne@68 31521 }
jpayne@68 31522 #endif
jpayne@68 31523 static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *o, PyObject *n, PyObject *d) {
jpayne@68 31524 PyObject *r;
jpayne@68 31525 #if __PYX_LIMITED_VERSION_HEX >= 0x030d00A1
jpayne@68 31526 int res = PyObject_GetOptionalAttr(o, n, &r);
jpayne@68 31527 return (res != 0) ? r : __Pyx_NewRef(d);
jpayne@68 31528 #else
jpayne@68 31529 #if CYTHON_USE_TYPE_SLOTS
jpayne@68 31530 if (likely(PyString_Check(n))) {
jpayne@68 31531 r = __Pyx_PyObject_GetAttrStrNoError(o, n);
jpayne@68 31532 if (unlikely(!r) && likely(!PyErr_Occurred())) {
jpayne@68 31533 r = __Pyx_NewRef(d);
jpayne@68 31534 }
jpayne@68 31535 return r;
jpayne@68 31536 }
jpayne@68 31537 #endif
jpayne@68 31538 r = PyObject_GetAttr(o, n);
jpayne@68 31539 return (likely(r)) ? r : __Pyx_GetAttr3Default(d);
jpayne@68 31540 #endif
jpayne@68 31541 }
jpayne@68 31542
jpayne@68 31543 /* PyDictVersioning */
jpayne@68 31544 #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS
jpayne@68 31545 static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj) {
jpayne@68 31546 PyObject *dict = Py_TYPE(obj)->tp_dict;
jpayne@68 31547 return likely(dict) ? __PYX_GET_DICT_VERSION(dict) : 0;
jpayne@68 31548 }
jpayne@68 31549 static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj) {
jpayne@68 31550 PyObject **dictptr = NULL;
jpayne@68 31551 Py_ssize_t offset = Py_TYPE(obj)->tp_dictoffset;
jpayne@68 31552 if (offset) {
jpayne@68 31553 #if CYTHON_COMPILING_IN_CPYTHON
jpayne@68 31554 dictptr = (likely(offset > 0)) ? (PyObject **) ((char *)obj + offset) : _PyObject_GetDictPtr(obj);
jpayne@68 31555 #else
jpayne@68 31556 dictptr = _PyObject_GetDictPtr(obj);
jpayne@68 31557 #endif
jpayne@68 31558 }
jpayne@68 31559 return (dictptr && *dictptr) ? __PYX_GET_DICT_VERSION(*dictptr) : 0;
jpayne@68 31560 }
jpayne@68 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@68 31562 PyObject *dict = Py_TYPE(obj)->tp_dict;
jpayne@68 31563 if (unlikely(!dict) || unlikely(tp_dict_version != __PYX_GET_DICT_VERSION(dict)))
jpayne@68 31564 return 0;
jpayne@68 31565 return obj_dict_version == __Pyx_get_object_dict_version(obj);
jpayne@68 31566 }
jpayne@68 31567 #endif
jpayne@68 31568
jpayne@68 31569 /* GetModuleGlobalName */
jpayne@68 31570 #if CYTHON_USE_DICT_VERSIONS
jpayne@68 31571 static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value)
jpayne@68 31572 #else
jpayne@68 31573 static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name)
jpayne@68 31574 #endif
jpayne@68 31575 {
jpayne@68 31576 PyObject *result;
jpayne@68 31577 #if !CYTHON_AVOID_BORROWED_REFS
jpayne@68 31578 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1 && PY_VERSION_HEX < 0x030d0000
jpayne@68 31579 result = _PyDict_GetItem_KnownHash(__pyx_d, name, ((PyASCIIObject *) name)->hash);
jpayne@68 31580 __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
jpayne@68 31581 if (likely(result)) {
jpayne@68 31582 return __Pyx_NewRef(result);
jpayne@68 31583 } else if (unlikely(PyErr_Occurred())) {
jpayne@68 31584 return NULL;
jpayne@68 31585 }
jpayne@68 31586 #elif CYTHON_COMPILING_IN_LIMITED_API
jpayne@68 31587 if (unlikely(!__pyx_m)) {
jpayne@68 31588 return NULL;
jpayne@68 31589 }
jpayne@68 31590 result = PyObject_GetAttr(__pyx_m, name);
jpayne@68 31591 if (likely(result)) {
jpayne@68 31592 return result;
jpayne@68 31593 }
jpayne@68 31594 #else
jpayne@68 31595 result = PyDict_GetItem(__pyx_d, name);
jpayne@68 31596 __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
jpayne@68 31597 if (likely(result)) {
jpayne@68 31598 return __Pyx_NewRef(result);
jpayne@68 31599 }
jpayne@68 31600 #endif
jpayne@68 31601 #else
jpayne@68 31602 result = PyObject_GetItem(__pyx_d, name);
jpayne@68 31603 __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
jpayne@68 31604 if (likely(result)) {
jpayne@68 31605 return __Pyx_NewRef(result);
jpayne@68 31606 }
jpayne@68 31607 PyErr_Clear();
jpayne@68 31608 #endif
jpayne@68 31609 return __Pyx_GetBuiltinName(name);
jpayne@68 31610 }
jpayne@68 31611
jpayne@68 31612 /* RaiseUnexpectedTypeError */
jpayne@68 31613 static int
jpayne@68 31614 __Pyx_RaiseUnexpectedTypeError(const char *expected, PyObject *obj)
jpayne@68 31615 {
jpayne@68 31616 __Pyx_TypeName obj_type_name = __Pyx_PyType_GetName(Py_TYPE(obj));
jpayne@68 31617 PyErr_Format(PyExc_TypeError, "Expected %s, got " __Pyx_FMT_TYPENAME,
jpayne@68 31618 expected, obj_type_name);
jpayne@68 31619 __Pyx_DECREF_TypeName(obj_type_name);
jpayne@68 31620 return 0;
jpayne@68 31621 }
jpayne@68 31622
jpayne@68 31623 /* ExtTypeTest */
jpayne@68 31624 static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) {
jpayne@68 31625 __Pyx_TypeName obj_type_name;
jpayne@68 31626 __Pyx_TypeName type_name;
jpayne@68 31627 if (unlikely(!type)) {
jpayne@68 31628 PyErr_SetString(PyExc_SystemError, "Missing type object");
jpayne@68 31629 return 0;
jpayne@68 31630 }
jpayne@68 31631 if (likely(__Pyx_TypeCheck(obj, type)))
jpayne@68 31632 return 1;
jpayne@68 31633 obj_type_name = __Pyx_PyType_GetName(Py_TYPE(obj));
jpayne@68 31634 type_name = __Pyx_PyType_GetName(type);
jpayne@68 31635 PyErr_Format(PyExc_TypeError,
jpayne@68 31636 "Cannot convert " __Pyx_FMT_TYPENAME " to " __Pyx_FMT_TYPENAME,
jpayne@68 31637 obj_type_name, type_name);
jpayne@68 31638 __Pyx_DECREF_TypeName(obj_type_name);
jpayne@68 31639 __Pyx_DECREF_TypeName(type_name);
jpayne@68 31640 return 0;
jpayne@68 31641 }
jpayne@68 31642
jpayne@68 31643 /* PyIntBinop */
jpayne@68 31644 #if !CYTHON_COMPILING_IN_PYPY
jpayne@68 31645 static PyObject* __Pyx_PyInt_AddObjC(PyObject *op1, PyObject *op2, long intval, int inplace, int zerodivision_check) {
jpayne@68 31646 CYTHON_MAYBE_UNUSED_VAR(intval);
jpayne@68 31647 CYTHON_MAYBE_UNUSED_VAR(inplace);
jpayne@68 31648 CYTHON_UNUSED_VAR(zerodivision_check);
jpayne@68 31649 #if PY_MAJOR_VERSION < 3
jpayne@68 31650 if (likely(PyInt_CheckExact(op1))) {
jpayne@68 31651 const long b = intval;
jpayne@68 31652 long x;
jpayne@68 31653 long a = PyInt_AS_LONG(op1);
jpayne@68 31654
jpayne@68 31655 x = (long)((unsigned long)a + (unsigned long)b);
jpayne@68 31656 if (likely((x^a) >= 0 || (x^b) >= 0))
jpayne@68 31657 return PyInt_FromLong(x);
jpayne@68 31658 return PyLong_Type.tp_as_number->nb_add(op1, op2);
jpayne@68 31659 }
jpayne@68 31660 #endif
jpayne@68 31661 #if CYTHON_USE_PYLONG_INTERNALS
jpayne@68 31662 if (likely(PyLong_CheckExact(op1))) {
jpayne@68 31663 const long b = intval;
jpayne@68 31664 long a, x;
jpayne@68 31665 #ifdef HAVE_LONG_LONG
jpayne@68 31666 const PY_LONG_LONG llb = intval;
jpayne@68 31667 PY_LONG_LONG lla, llx;
jpayne@68 31668 #endif
jpayne@68 31669 if (unlikely(__Pyx_PyLong_IsZero(op1))) {
jpayne@68 31670 return __Pyx_NewRef(op2);
jpayne@68 31671 }
jpayne@68 31672 if (likely(__Pyx_PyLong_IsCompact(op1))) {
jpayne@68 31673 a = __Pyx_PyLong_CompactValue(op1);
jpayne@68 31674 } else {
jpayne@68 31675 const digit* digits = __Pyx_PyLong_Digits(op1);
jpayne@68 31676 const Py_ssize_t size = __Pyx_PyLong_SignedDigitCount(op1);
jpayne@68 31677 switch (size) {
jpayne@68 31678 case -2:
jpayne@68 31679 if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
jpayne@68 31680 a = -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
jpayne@68 31681 break;
jpayne@68 31682 #ifdef HAVE_LONG_LONG
jpayne@68 31683 } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
jpayne@68 31684 lla = -(PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
jpayne@68 31685 goto long_long;
jpayne@68 31686 #endif
jpayne@68 31687 }
jpayne@68 31688 CYTHON_FALLTHROUGH;
jpayne@68 31689 case 2:
jpayne@68 31690 if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
jpayne@68 31691 a = (long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
jpayne@68 31692 break;
jpayne@68 31693 #ifdef HAVE_LONG_LONG
jpayne@68 31694 } else if (8 * sizeof(PY_LONG_LONG) - 1 > 2 * PyLong_SHIFT) {
jpayne@68 31695 lla = (PY_LONG_LONG) (((((unsigned PY_LONG_LONG)digits[1]) << PyLong_SHIFT) | (unsigned PY_LONG_LONG)digits[0]));
jpayne@68 31696 goto long_long;
jpayne@68 31697 #endif
jpayne@68 31698 }
jpayne@68 31699 CYTHON_FALLTHROUGH;
jpayne@68 31700 case -3:
jpayne@68 31701 if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
jpayne@68 31702 a = -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
jpayne@68 31703 break;
jpayne@68 31704 #ifdef HAVE_LONG_LONG
jpayne@68 31705 } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
jpayne@68 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@68 31707 goto long_long;
jpayne@68 31708 #endif
jpayne@68 31709 }
jpayne@68 31710 CYTHON_FALLTHROUGH;
jpayne@68 31711 case 3:
jpayne@68 31712 if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
jpayne@68 31713 a = (long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0]));
jpayne@68 31714 break;
jpayne@68 31715 #ifdef HAVE_LONG_LONG
jpayne@68 31716 } else if (8 * sizeof(PY_LONG_LONG) - 1 > 3 * PyLong_SHIFT) {
jpayne@68 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@68 31718 goto long_long;
jpayne@68 31719 #endif
jpayne@68 31720 }
jpayne@68 31721 CYTHON_FALLTHROUGH;
jpayne@68 31722 case -4:
jpayne@68 31723 if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
jpayne@68 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@68 31725 break;
jpayne@68 31726 #ifdef HAVE_LONG_LONG
jpayne@68 31727 } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
jpayne@68 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@68 31729 goto long_long;
jpayne@68 31730 #endif
jpayne@68 31731 }
jpayne@68 31732 CYTHON_FALLTHROUGH;
jpayne@68 31733 case 4:
jpayne@68 31734 if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
jpayne@68 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@68 31736 break;
jpayne@68 31737 #ifdef HAVE_LONG_LONG
jpayne@68 31738 } else if (8 * sizeof(PY_LONG_LONG) - 1 > 4 * PyLong_SHIFT) {
jpayne@68 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@68 31740 goto long_long;
jpayne@68 31741 #endif
jpayne@68 31742 }
jpayne@68 31743 CYTHON_FALLTHROUGH;
jpayne@68 31744 default: return PyLong_Type.tp_as_number->nb_add(op1, op2);
jpayne@68 31745 }
jpayne@68 31746 }
jpayne@68 31747 x = a + b;
jpayne@68 31748 return PyLong_FromLong(x);
jpayne@68 31749 #ifdef HAVE_LONG_LONG
jpayne@68 31750 long_long:
jpayne@68 31751 llx = lla + llb;
jpayne@68 31752 return PyLong_FromLongLong(llx);
jpayne@68 31753 #endif
jpayne@68 31754
jpayne@68 31755
jpayne@68 31756 }
jpayne@68 31757 #endif
jpayne@68 31758 if (PyFloat_CheckExact(op1)) {
jpayne@68 31759 const long b = intval;
jpayne@68 31760 #if CYTHON_COMPILING_IN_LIMITED_API
jpayne@68 31761 double a = __pyx_PyFloat_AsDouble(op1);
jpayne@68 31762 #else
jpayne@68 31763 double a = PyFloat_AS_DOUBLE(op1);
jpayne@68 31764 #endif
jpayne@68 31765 double result;
jpayne@68 31766
jpayne@68 31767 PyFPE_START_PROTECT("add", return NULL)
jpayne@68 31768 result = ((double)a) + (double)b;
jpayne@68 31769 PyFPE_END_PROTECT(result)
jpayne@68 31770 return PyFloat_FromDouble(result);
jpayne@68 31771 }
jpayne@68 31772 return (inplace ? PyNumber_InPlaceAdd : PyNumber_Add)(op1, op2);
jpayne@68 31773 }
jpayne@68 31774 #endif
jpayne@68 31775
jpayne@68 31776 /* WriteUnraisableException */
jpayne@68 31777 static void __Pyx_WriteUnraisable(const char *name, int clineno,
jpayne@68 31778 int lineno, const char *filename,
jpayne@68 31779 int full_traceback, int nogil) {
jpayne@68 31780 PyObject *old_exc, *old_val, *old_tb;
jpayne@68 31781 PyObject *ctx;
jpayne@68 31782 __Pyx_PyThreadState_declare
jpayne@68 31783 #ifdef WITH_THREAD
jpayne@68 31784 PyGILState_STATE state;
jpayne@68 31785 if (nogil)
jpayne@68 31786 state = PyGILState_Ensure();
jpayne@68 31787 else state = (PyGILState_STATE)0;
jpayne@68 31788 #endif
jpayne@68 31789 CYTHON_UNUSED_VAR(clineno);
jpayne@68 31790 CYTHON_UNUSED_VAR(lineno);
jpayne@68 31791 CYTHON_UNUSED_VAR(filename);
jpayne@68 31792 CYTHON_MAYBE_UNUSED_VAR(nogil);
jpayne@68 31793 __Pyx_PyThreadState_assign
jpayne@68 31794 __Pyx_ErrFetch(&old_exc, &old_val, &old_tb);
jpayne@68 31795 if (full_traceback) {
jpayne@68 31796 Py_XINCREF(old_exc);
jpayne@68 31797 Py_XINCREF(old_val);
jpayne@68 31798 Py_XINCREF(old_tb);
jpayne@68 31799 __Pyx_ErrRestore(old_exc, old_val, old_tb);
jpayne@68 31800 PyErr_PrintEx(0);
jpayne@68 31801 }
jpayne@68 31802 #if PY_MAJOR_VERSION < 3
jpayne@68 31803 ctx = PyString_FromString(name);
jpayne@68 31804 #else
jpayne@68 31805 ctx = PyUnicode_FromString(name);
jpayne@68 31806 #endif
jpayne@68 31807 __Pyx_ErrRestore(old_exc, old_val, old_tb);
jpayne@68 31808 if (!ctx) {
jpayne@68 31809 PyErr_WriteUnraisable(Py_None);
jpayne@68 31810 } else {
jpayne@68 31811 PyErr_WriteUnraisable(ctx);
jpayne@68 31812 Py_DECREF(ctx);
jpayne@68 31813 }
jpayne@68 31814 #ifdef WITH_THREAD
jpayne@68 31815 if (nogil)
jpayne@68 31816 PyGILState_Release(state);
jpayne@68 31817 #endif
jpayne@68 31818 }
jpayne@68 31819
jpayne@68 31820 /* PyObjectCallNoArg */
jpayne@68 31821 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) {
jpayne@68 31822 PyObject *arg[2] = {NULL, NULL};
jpayne@68 31823 return __Pyx_PyObject_FastCall(func, arg + 1, 0 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET);
jpayne@68 31824 }
jpayne@68 31825
jpayne@68 31826 /* ArgTypeTest */
jpayne@68 31827 static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact)
jpayne@68 31828 {
jpayne@68 31829 __Pyx_TypeName type_name;
jpayne@68 31830 __Pyx_TypeName obj_type_name;
jpayne@68 31831 if (unlikely(!type)) {
jpayne@68 31832 PyErr_SetString(PyExc_SystemError, "Missing type object");
jpayne@68 31833 return 0;
jpayne@68 31834 }
jpayne@68 31835 else if (exact) {
jpayne@68 31836 #if PY_MAJOR_VERSION == 2
jpayne@68 31837 if ((type == &PyBaseString_Type) && likely(__Pyx_PyBaseString_CheckExact(obj))) return 1;
jpayne@68 31838 #endif
jpayne@68 31839 }
jpayne@68 31840 else {
jpayne@68 31841 if (likely(__Pyx_TypeCheck(obj, type))) return 1;
jpayne@68 31842 }
jpayne@68 31843 type_name = __Pyx_PyType_GetName(type);
jpayne@68 31844 obj_type_name = __Pyx_PyType_GetName(Py_TYPE(obj));
jpayne@68 31845 PyErr_Format(PyExc_TypeError,
jpayne@68 31846 "Argument '%.200s' has incorrect type (expected " __Pyx_FMT_TYPENAME
jpayne@68 31847 ", got " __Pyx_FMT_TYPENAME ")", name, type_name, obj_type_name);
jpayne@68 31848 __Pyx_DECREF_TypeName(type_name);
jpayne@68 31849 __Pyx_DECREF_TypeName(obj_type_name);
jpayne@68 31850 return 0;
jpayne@68 31851 }
jpayne@68 31852
jpayne@68 31853 /* PyObjectFormatAndDecref */
jpayne@68 31854 static CYTHON_INLINE PyObject* __Pyx_PyObject_FormatSimpleAndDecref(PyObject* s, PyObject* f) {
jpayne@68 31855 if (unlikely(!s)) return NULL;
jpayne@68 31856 if (likely(PyUnicode_CheckExact(s))) return s;
jpayne@68 31857 #if PY_MAJOR_VERSION < 3
jpayne@68 31858 if (likely(PyString_CheckExact(s))) {
jpayne@68 31859 PyObject *result = PyUnicode_FromEncodedObject(s, NULL, "strict");
jpayne@68 31860 Py_DECREF(s);
jpayne@68 31861 return result;
jpayne@68 31862 }
jpayne@68 31863 #endif
jpayne@68 31864 return __Pyx_PyObject_FormatAndDecref(s, f);
jpayne@68 31865 }
jpayne@68 31866 static CYTHON_INLINE PyObject* __Pyx_PyObject_FormatAndDecref(PyObject* s, PyObject* f) {
jpayne@68 31867 PyObject *result;
jpayne@68 31868 if (unlikely(!s)) return NULL;
jpayne@68 31869 result = PyObject_Format(s, f);
jpayne@68 31870 Py_DECREF(s);
jpayne@68 31871 return result;
jpayne@68 31872 }
jpayne@68 31873
jpayne@68 31874 /* JoinPyUnicode */
jpayne@68 31875 static PyObject* __Pyx_PyUnicode_Join(PyObject* value_tuple, Py_ssize_t value_count, Py_ssize_t result_ulength,
jpayne@68 31876 Py_UCS4 max_char) {
jpayne@68 31877 #if CYTHON_USE_UNICODE_INTERNALS && CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
jpayne@68 31878 PyObject *result_uval;
jpayne@68 31879 int result_ukind, kind_shift;
jpayne@68 31880 Py_ssize_t i, char_pos;
jpayne@68 31881 void *result_udata;
jpayne@68 31882 CYTHON_MAYBE_UNUSED_VAR(max_char);
jpayne@68 31883 #if CYTHON_PEP393_ENABLED
jpayne@68 31884 result_uval = PyUnicode_New(result_ulength, max_char);
jpayne@68 31885 if (unlikely(!result_uval)) return NULL;
jpayne@68 31886 result_ukind = (max_char <= 255) ? PyUnicode_1BYTE_KIND : (max_char <= 65535) ? PyUnicode_2BYTE_KIND : PyUnicode_4BYTE_KIND;
jpayne@68 31887 kind_shift = (result_ukind == PyUnicode_4BYTE_KIND) ? 2 : result_ukind - 1;
jpayne@68 31888 result_udata = PyUnicode_DATA(result_uval);
jpayne@68 31889 #else
jpayne@68 31890 result_uval = PyUnicode_FromUnicode(NULL, result_ulength);
jpayne@68 31891 if (unlikely(!result_uval)) return NULL;
jpayne@68 31892 result_ukind = sizeof(Py_UNICODE);
jpayne@68 31893 kind_shift = (result_ukind == 4) ? 2 : result_ukind - 1;
jpayne@68 31894 result_udata = PyUnicode_AS_UNICODE(result_uval);
jpayne@68 31895 #endif
jpayne@68 31896 assert(kind_shift == 2 || kind_shift == 1 || kind_shift == 0);
jpayne@68 31897 char_pos = 0;
jpayne@68 31898 for (i=0; i < value_count; i++) {
jpayne@68 31899 int ukind;
jpayne@68 31900 Py_ssize_t ulength;
jpayne@68 31901 void *udata;
jpayne@68 31902 PyObject *uval = PyTuple_GET_ITEM(value_tuple, i);
jpayne@68 31903 if (unlikely(__Pyx_PyUnicode_READY(uval)))
jpayne@68 31904 goto bad;
jpayne@68 31905 ulength = __Pyx_PyUnicode_GET_LENGTH(uval);
jpayne@68 31906 if (unlikely(!ulength))
jpayne@68 31907 continue;
jpayne@68 31908 if (unlikely((PY_SSIZE_T_MAX >> kind_shift) - ulength < char_pos))
jpayne@68 31909 goto overflow;
jpayne@68 31910 ukind = __Pyx_PyUnicode_KIND(uval);
jpayne@68 31911 udata = __Pyx_PyUnicode_DATA(uval);
jpayne@68 31912 if (!CYTHON_PEP393_ENABLED || ukind == result_ukind) {
jpayne@68 31913 memcpy((char *)result_udata + (char_pos << kind_shift), udata, (size_t) (ulength << kind_shift));
jpayne@68 31914 } else {
jpayne@68 31915 #if PY_VERSION_HEX >= 0x030d0000
jpayne@68 31916 if (unlikely(PyUnicode_CopyCharacters(result_uval, char_pos, uval, 0, ulength) < 0)) goto bad;
jpayne@68 31917 #elif CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030300F0 || defined(_PyUnicode_FastCopyCharacters)
jpayne@68 31918 _PyUnicode_FastCopyCharacters(result_uval, char_pos, uval, 0, ulength);
jpayne@68 31919 #else
jpayne@68 31920 Py_ssize_t j;
jpayne@68 31921 for (j=0; j < ulength; j++) {
jpayne@68 31922 Py_UCS4 uchar = __Pyx_PyUnicode_READ(ukind, udata, j);
jpayne@68 31923 __Pyx_PyUnicode_WRITE(result_ukind, result_udata, char_pos+j, uchar);
jpayne@68 31924 }
jpayne@68 31925 #endif
jpayne@68 31926 }
jpayne@68 31927 char_pos += ulength;
jpayne@68 31928 }
jpayne@68 31929 return result_uval;
jpayne@68 31930 overflow:
jpayne@68 31931 PyErr_SetString(PyExc_OverflowError, "join() result is too long for a Python string");
jpayne@68 31932 bad:
jpayne@68 31933 Py_DECREF(result_uval);
jpayne@68 31934 return NULL;
jpayne@68 31935 #else
jpayne@68 31936 CYTHON_UNUSED_VAR(max_char);
jpayne@68 31937 CYTHON_UNUSED_VAR(result_ulength);
jpayne@68 31938 CYTHON_UNUSED_VAR(value_count);
jpayne@68 31939 return PyUnicode_Join(__pyx_empty_unicode, value_tuple);
jpayne@68 31940 #endif
jpayne@68 31941 }
jpayne@68 31942
jpayne@68 31943 /* DictGetItem */
jpayne@68 31944 #if PY_MAJOR_VERSION >= 3 && !CYTHON_COMPILING_IN_PYPY
jpayne@68 31945 static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key) {
jpayne@68 31946 PyObject *value;
jpayne@68 31947 value = PyDict_GetItemWithError(d, key);
jpayne@68 31948 if (unlikely(!value)) {
jpayne@68 31949 if (!PyErr_Occurred()) {
jpayne@68 31950 if (unlikely(PyTuple_Check(key))) {
jpayne@68 31951 PyObject* args = PyTuple_Pack(1, key);
jpayne@68 31952 if (likely(args)) {
jpayne@68 31953 PyErr_SetObject(PyExc_KeyError, args);
jpayne@68 31954 Py_DECREF(args);
jpayne@68 31955 }
jpayne@68 31956 } else {
jpayne@68 31957 PyErr_SetObject(PyExc_KeyError, key);
jpayne@68 31958 }
jpayne@68 31959 }
jpayne@68 31960 return NULL;
jpayne@68 31961 }
jpayne@68 31962 Py_INCREF(value);
jpayne@68 31963 return value;
jpayne@68 31964 }
jpayne@68 31965 #endif
jpayne@68 31966
jpayne@68 31967 /* GetTopmostException */
jpayne@68 31968 #if CYTHON_USE_EXC_INFO_STACK && CYTHON_FAST_THREAD_STATE
jpayne@68 31969 static _PyErr_StackItem *
jpayne@68 31970 __Pyx_PyErr_GetTopmostException(PyThreadState *tstate)
jpayne@68 31971 {
jpayne@68 31972 _PyErr_StackItem *exc_info = tstate->exc_info;
jpayne@68 31973 while ((exc_info->exc_value == NULL || exc_info->exc_value == Py_None) &&
jpayne@68 31974 exc_info->previous_item != NULL)
jpayne@68 31975 {
jpayne@68 31976 exc_info = exc_info->previous_item;
jpayne@68 31977 }
jpayne@68 31978 return exc_info;
jpayne@68 31979 }
jpayne@68 31980 #endif
jpayne@68 31981
jpayne@68 31982 /* SaveResetException */
jpayne@68 31983 #if CYTHON_FAST_THREAD_STATE
jpayne@68 31984 static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
jpayne@68 31985 #if CYTHON_USE_EXC_INFO_STACK && PY_VERSION_HEX >= 0x030B00a4
jpayne@68 31986 _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate);
jpayne@68 31987 PyObject *exc_value = exc_info->exc_value;
jpayne@68 31988 if (exc_value == NULL || exc_value == Py_None) {
jpayne@68 31989 *value = NULL;
jpayne@68 31990 *type = NULL;
jpayne@68 31991 *tb = NULL;
jpayne@68 31992 } else {
jpayne@68 31993 *value = exc_value;
jpayne@68 31994 Py_INCREF(*value);
jpayne@68 31995 *type = (PyObject*) Py_TYPE(exc_value);
jpayne@68 31996 Py_INCREF(*type);
jpayne@68 31997 *tb = PyException_GetTraceback(exc_value);
jpayne@68 31998 }
jpayne@68 31999 #elif CYTHON_USE_EXC_INFO_STACK
jpayne@68 32000 _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate);
jpayne@68 32001 *type = exc_info->exc_type;
jpayne@68 32002 *value = exc_info->exc_value;
jpayne@68 32003 *tb = exc_info->exc_traceback;
jpayne@68 32004 Py_XINCREF(*type);
jpayne@68 32005 Py_XINCREF(*value);
jpayne@68 32006 Py_XINCREF(*tb);
jpayne@68 32007 #else
jpayne@68 32008 *type = tstate->exc_type;
jpayne@68 32009 *value = tstate->exc_value;
jpayne@68 32010 *tb = tstate->exc_traceback;
jpayne@68 32011 Py_XINCREF(*type);
jpayne@68 32012 Py_XINCREF(*value);
jpayne@68 32013 Py_XINCREF(*tb);
jpayne@68 32014 #endif
jpayne@68 32015 }
jpayne@68 32016 static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
jpayne@68 32017 #if CYTHON_USE_EXC_INFO_STACK && PY_VERSION_HEX >= 0x030B00a4
jpayne@68 32018 _PyErr_StackItem *exc_info = tstate->exc_info;
jpayne@68 32019 PyObject *tmp_value = exc_info->exc_value;
jpayne@68 32020 exc_info->exc_value = value;
jpayne@68 32021 Py_XDECREF(tmp_value);
jpayne@68 32022 Py_XDECREF(type);
jpayne@68 32023 Py_XDECREF(tb);
jpayne@68 32024 #else
jpayne@68 32025 PyObject *tmp_type, *tmp_value, *tmp_tb;
jpayne@68 32026 #if CYTHON_USE_EXC_INFO_STACK
jpayne@68 32027 _PyErr_StackItem *exc_info = tstate->exc_info;
jpayne@68 32028 tmp_type = exc_info->exc_type;
jpayne@68 32029 tmp_value = exc_info->exc_value;
jpayne@68 32030 tmp_tb = exc_info->exc_traceback;
jpayne@68 32031 exc_info->exc_type = type;
jpayne@68 32032 exc_info->exc_value = value;
jpayne@68 32033 exc_info->exc_traceback = tb;
jpayne@68 32034 #else
jpayne@68 32035 tmp_type = tstate->exc_type;
jpayne@68 32036 tmp_value = tstate->exc_value;
jpayne@68 32037 tmp_tb = tstate->exc_traceback;
jpayne@68 32038 tstate->exc_type = type;
jpayne@68 32039 tstate->exc_value = value;
jpayne@68 32040 tstate->exc_traceback = tb;
jpayne@68 32041 #endif
jpayne@68 32042 Py_XDECREF(tmp_type);
jpayne@68 32043 Py_XDECREF(tmp_value);
jpayne@68 32044 Py_XDECREF(tmp_tb);
jpayne@68 32045 #endif
jpayne@68 32046 }
jpayne@68 32047 #endif
jpayne@68 32048
jpayne@68 32049 /* GetException */
jpayne@68 32050 #if CYTHON_FAST_THREAD_STATE
jpayne@68 32051 static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb)
jpayne@68 32052 #else
jpayne@68 32053 static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb)
jpayne@68 32054 #endif
jpayne@68 32055 {
jpayne@68 32056 PyObject *local_type = NULL, *local_value, *local_tb = NULL;
jpayne@68 32057 #if CYTHON_FAST_THREAD_STATE
jpayne@68 32058 PyObject *tmp_type, *tmp_value, *tmp_tb;
jpayne@68 32059 #if PY_VERSION_HEX >= 0x030C00A6
jpayne@68 32060 local_value = tstate->current_exception;
jpayne@68 32061 tstate->current_exception = 0;
jpayne@68 32062 if (likely(local_value)) {
jpayne@68 32063 local_type = (PyObject*) Py_TYPE(local_value);
jpayne@68 32064 Py_INCREF(local_type);
jpayne@68 32065 local_tb = PyException_GetTraceback(local_value);
jpayne@68 32066 }
jpayne@68 32067 #else
jpayne@68 32068 local_type = tstate->curexc_type;
jpayne@68 32069 local_value = tstate->curexc_value;
jpayne@68 32070 local_tb = tstate->curexc_traceback;
jpayne@68 32071 tstate->curexc_type = 0;
jpayne@68 32072 tstate->curexc_value = 0;
jpayne@68 32073 tstate->curexc_traceback = 0;
jpayne@68 32074 #endif
jpayne@68 32075 #else
jpayne@68 32076 PyErr_Fetch(&local_type, &local_value, &local_tb);
jpayne@68 32077 #endif
jpayne@68 32078 PyErr_NormalizeException(&local_type, &local_value, &local_tb);
jpayne@68 32079 #if CYTHON_FAST_THREAD_STATE && PY_VERSION_HEX >= 0x030C00A6
jpayne@68 32080 if (unlikely(tstate->current_exception))
jpayne@68 32081 #elif CYTHON_FAST_THREAD_STATE
jpayne@68 32082 if (unlikely(tstate->curexc_type))
jpayne@68 32083 #else
jpayne@68 32084 if (unlikely(PyErr_Occurred()))
jpayne@68 32085 #endif
jpayne@68 32086 goto bad;
jpayne@68 32087 #if PY_MAJOR_VERSION >= 3
jpayne@68 32088 if (local_tb) {
jpayne@68 32089 if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0))
jpayne@68 32090 goto bad;
jpayne@68 32091 }
jpayne@68 32092 #endif
jpayne@68 32093 Py_XINCREF(local_tb);
jpayne@68 32094 Py_XINCREF(local_type);
jpayne@68 32095 Py_XINCREF(local_value);
jpayne@68 32096 *type = local_type;
jpayne@68 32097 *value = local_value;
jpayne@68 32098 *tb = local_tb;
jpayne@68 32099 #if CYTHON_FAST_THREAD_STATE
jpayne@68 32100 #if CYTHON_USE_EXC_INFO_STACK
jpayne@68 32101 {
jpayne@68 32102 _PyErr_StackItem *exc_info = tstate->exc_info;
jpayne@68 32103 #if PY_VERSION_HEX >= 0x030B00a4
jpayne@68 32104 tmp_value = exc_info->exc_value;
jpayne@68 32105 exc_info->exc_value = local_value;
jpayne@68 32106 tmp_type = NULL;
jpayne@68 32107 tmp_tb = NULL;
jpayne@68 32108 Py_XDECREF(local_type);
jpayne@68 32109 Py_XDECREF(local_tb);
jpayne@68 32110 #else
jpayne@68 32111 tmp_type = exc_info->exc_type;
jpayne@68 32112 tmp_value = exc_info->exc_value;
jpayne@68 32113 tmp_tb = exc_info->exc_traceback;
jpayne@68 32114 exc_info->exc_type = local_type;
jpayne@68 32115 exc_info->exc_value = local_value;
jpayne@68 32116 exc_info->exc_traceback = local_tb;
jpayne@68 32117 #endif
jpayne@68 32118 }
jpayne@68 32119 #else
jpayne@68 32120 tmp_type = tstate->exc_type;
jpayne@68 32121 tmp_value = tstate->exc_value;
jpayne@68 32122 tmp_tb = tstate->exc_traceback;
jpayne@68 32123 tstate->exc_type = local_type;
jpayne@68 32124 tstate->exc_value = local_value;
jpayne@68 32125 tstate->exc_traceback = local_tb;
jpayne@68 32126 #endif
jpayne@68 32127 Py_XDECREF(tmp_type);
jpayne@68 32128 Py_XDECREF(tmp_value);
jpayne@68 32129 Py_XDECREF(tmp_tb);
jpayne@68 32130 #else
jpayne@68 32131 PyErr_SetExcInfo(local_type, local_value, local_tb);
jpayne@68 32132 #endif
jpayne@68 32133 return 0;
jpayne@68 32134 bad:
jpayne@68 32135 *type = 0;
jpayne@68 32136 *value = 0;
jpayne@68 32137 *tb = 0;
jpayne@68 32138 Py_XDECREF(local_type);
jpayne@68 32139 Py_XDECREF(local_value);
jpayne@68 32140 Py_XDECREF(local_tb);
jpayne@68 32141 return -1;
jpayne@68 32142 }
jpayne@68 32143
jpayne@68 32144 /* UnpackUnboundCMethod */
jpayne@68 32145 static PyObject *__Pyx_SelflessCall(PyObject *method, PyObject *args, PyObject *kwargs) {
jpayne@68 32146 PyObject *result;
jpayne@68 32147 PyObject *selfless_args = PyTuple_GetSlice(args, 1, PyTuple_Size(args));
jpayne@68 32148 if (unlikely(!selfless_args)) return NULL;
jpayne@68 32149 result = PyObject_Call(method, selfless_args, kwargs);
jpayne@68 32150 Py_DECREF(selfless_args);
jpayne@68 32151 return result;
jpayne@68 32152 }
jpayne@68 32153 static PyMethodDef __Pyx_UnboundCMethod_Def = {
jpayne@68 32154 "CythonUnboundCMethod",
jpayne@68 32155 __PYX_REINTERPRET_FUNCION(PyCFunction, __Pyx_SelflessCall),
jpayne@68 32156 METH_VARARGS | METH_KEYWORDS,
jpayne@68 32157 NULL
jpayne@68 32158 };
jpayne@68 32159 static int __Pyx_TryUnpackUnboundCMethod(__Pyx_CachedCFunction* target) {
jpayne@68 32160 PyObject *method;
jpayne@68 32161 method = __Pyx_PyObject_GetAttrStr(target->type, *target->method_name);
jpayne@68 32162 if (unlikely(!method))
jpayne@68 32163 return -1;
jpayne@68 32164 target->method = method;
jpayne@68 32165 #if CYTHON_COMPILING_IN_CPYTHON
jpayne@68 32166 #if PY_MAJOR_VERSION >= 3
jpayne@68 32167 if (likely(__Pyx_TypeCheck(method, &PyMethodDescr_Type)))
jpayne@68 32168 #else
jpayne@68 32169 if (likely(!__Pyx_CyOrPyCFunction_Check(method)))
jpayne@68 32170 #endif
jpayne@68 32171 {
jpayne@68 32172 PyMethodDescrObject *descr = (PyMethodDescrObject*) method;
jpayne@68 32173 target->func = descr->d_method->ml_meth;
jpayne@68 32174 target->flag = descr->d_method->ml_flags & ~(METH_CLASS | METH_STATIC | METH_COEXIST | METH_STACKLESS);
jpayne@68 32175 } else
jpayne@68 32176 #endif
jpayne@68 32177 #if CYTHON_COMPILING_IN_PYPY
jpayne@68 32178 #else
jpayne@68 32179 if (PyCFunction_Check(method))
jpayne@68 32180 #endif
jpayne@68 32181 {
jpayne@68 32182 PyObject *self;
jpayne@68 32183 int self_found;
jpayne@68 32184 #if CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_PYPY
jpayne@68 32185 self = PyObject_GetAttrString(method, "__self__");
jpayne@68 32186 if (!self) {
jpayne@68 32187 PyErr_Clear();
jpayne@68 32188 }
jpayne@68 32189 #else
jpayne@68 32190 self = PyCFunction_GET_SELF(method);
jpayne@68 32191 #endif
jpayne@68 32192 self_found = (self && self != Py_None);
jpayne@68 32193 #if CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_PYPY
jpayne@68 32194 Py_XDECREF(self);
jpayne@68 32195 #endif
jpayne@68 32196 if (self_found) {
jpayne@68 32197 PyObject *unbound_method = PyCFunction_New(&__Pyx_UnboundCMethod_Def, method);
jpayne@68 32198 if (unlikely(!unbound_method)) return -1;
jpayne@68 32199 Py_DECREF(method);
jpayne@68 32200 target->method = unbound_method;
jpayne@68 32201 }
jpayne@68 32202 }
jpayne@68 32203 return 0;
jpayne@68 32204 }
jpayne@68 32205
jpayne@68 32206 /* CallUnboundCMethod0 */
jpayne@68 32207 static PyObject* __Pyx__CallUnboundCMethod0(__Pyx_CachedCFunction* cfunc, PyObject* self) {
jpayne@68 32208 PyObject *args, *result = NULL;
jpayne@68 32209 if (unlikely(!cfunc->method) && unlikely(__Pyx_TryUnpackUnboundCMethod(cfunc) < 0)) return NULL;
jpayne@68 32210 #if CYTHON_ASSUME_SAFE_MACROS
jpayne@68 32211 args = PyTuple_New(1);
jpayne@68 32212 if (unlikely(!args)) goto bad;
jpayne@68 32213 Py_INCREF(self);
jpayne@68 32214 PyTuple_SET_ITEM(args, 0, self);
jpayne@68 32215 #else
jpayne@68 32216 args = PyTuple_Pack(1, self);
jpayne@68 32217 if (unlikely(!args)) goto bad;
jpayne@68 32218 #endif
jpayne@68 32219 result = __Pyx_PyObject_Call(cfunc->method, args, NULL);
jpayne@68 32220 Py_DECREF(args);
jpayne@68 32221 bad:
jpayne@68 32222 return result;
jpayne@68 32223 }
jpayne@68 32224
jpayne@68 32225 /* py_dict_keys */
jpayne@68 32226 static CYTHON_INLINE PyObject* __Pyx_PyDict_Keys(PyObject* d) {
jpayne@68 32227 if (PY_MAJOR_VERSION >= 3)
jpayne@68 32228 return __Pyx_CallUnboundCMethod0(&__pyx_umethod_PyDict_Type_keys, d);
jpayne@68 32229 else
jpayne@68 32230 return PyDict_Keys(d);
jpayne@68 32231 }
jpayne@68 32232
jpayne@68 32233 /* UnicodeAsUCS4 */
jpayne@68 32234 static CYTHON_INLINE Py_UCS4 __Pyx_PyUnicode_AsPy_UCS4(PyObject* x) {
jpayne@68 32235 Py_ssize_t length;
jpayne@68 32236 #if CYTHON_PEP393_ENABLED
jpayne@68 32237 length = PyUnicode_GET_LENGTH(x);
jpayne@68 32238 if (likely(length == 1)) {
jpayne@68 32239 return PyUnicode_READ_CHAR(x, 0);
jpayne@68 32240 }
jpayne@68 32241 #else
jpayne@68 32242 length = PyUnicode_GET_SIZE(x);
jpayne@68 32243 if (likely(length == 1)) {
jpayne@68 32244 return PyUnicode_AS_UNICODE(x)[0];
jpayne@68 32245 }
jpayne@68 32246 #if Py_UNICODE_SIZE == 2
jpayne@68 32247 else if (PyUnicode_GET_SIZE(x) == 2) {
jpayne@68 32248 Py_UCS4 high_val = PyUnicode_AS_UNICODE(x)[0];
jpayne@68 32249 if (high_val >= 0xD800 && high_val <= 0xDBFF) {
jpayne@68 32250 Py_UCS4 low_val = PyUnicode_AS_UNICODE(x)[1];
jpayne@68 32251 if (low_val >= 0xDC00 && low_val <= 0xDFFF) {
jpayne@68 32252 return 0x10000 + (((high_val & ((1<<10)-1)) << 10) | (low_val & ((1<<10)-1)));
jpayne@68 32253 }
jpayne@68 32254 }
jpayne@68 32255 }
jpayne@68 32256 #endif
jpayne@68 32257 #endif
jpayne@68 32258 PyErr_Format(PyExc_ValueError,
jpayne@68 32259 "only single character unicode strings can be converted to Py_UCS4, "
jpayne@68 32260 "got length %" CYTHON_FORMAT_SSIZE_T "d", length);
jpayne@68 32261 return (Py_UCS4)-1;
jpayne@68 32262 }
jpayne@68 32263
jpayne@68 32264 /* object_ord */
jpayne@68 32265 static long __Pyx__PyObject_Ord(PyObject* c) {
jpayne@68 32266 Py_ssize_t size;
jpayne@68 32267 if (PyBytes_Check(c)) {
jpayne@68 32268 size = PyBytes_GET_SIZE(c);
jpayne@68 32269 if (likely(size == 1)) {
jpayne@68 32270 return (unsigned char) PyBytes_AS_STRING(c)[0];
jpayne@68 32271 }
jpayne@68 32272 #if PY_MAJOR_VERSION < 3
jpayne@68 32273 } else if (PyUnicode_Check(c)) {
jpayne@68 32274 return (long)__Pyx_PyUnicode_AsPy_UCS4(c);
jpayne@68 32275 #endif
jpayne@68 32276 #if (!CYTHON_COMPILING_IN_PYPY) || (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE))
jpayne@68 32277 } else if (PyByteArray_Check(c)) {
jpayne@68 32278 size = PyByteArray_GET_SIZE(c);
jpayne@68 32279 if (likely(size == 1)) {
jpayne@68 32280 return (unsigned char) PyByteArray_AS_STRING(c)[0];
jpayne@68 32281 }
jpayne@68 32282 #endif
jpayne@68 32283 } else {
jpayne@68 32284 __Pyx_TypeName c_type_name = __Pyx_PyType_GetName(Py_TYPE(c));
jpayne@68 32285 PyErr_Format(PyExc_TypeError,
jpayne@68 32286 "ord() expected string of length 1, but " __Pyx_FMT_TYPENAME " found",
jpayne@68 32287 c_type_name);
jpayne@68 32288 __Pyx_DECREF_TypeName(c_type_name);
jpayne@68 32289 return (long)(Py_UCS4)-1;
jpayne@68 32290 }
jpayne@68 32291 PyErr_Format(PyExc_TypeError,
jpayne@68 32292 "ord() expected a character, but string of length %zd found", size);
jpayne@68 32293 return (long)(Py_UCS4)-1;
jpayne@68 32294 }
jpayne@68 32295
jpayne@68 32296 /* RaiseTooManyValuesToUnpack */
jpayne@68 32297 static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) {
jpayne@68 32298 PyErr_Format(PyExc_ValueError,
jpayne@68 32299 "too many values to unpack (expected %" CYTHON_FORMAT_SSIZE_T "d)", expected);
jpayne@68 32300 }
jpayne@68 32301
jpayne@68 32302 /* RaiseNeedMoreValuesToUnpack */
jpayne@68 32303 static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) {
jpayne@68 32304 PyErr_Format(PyExc_ValueError,
jpayne@68 32305 "need more than %" CYTHON_FORMAT_SSIZE_T "d value%.1s to unpack",
jpayne@68 32306 index, (index == 1) ? "" : "s");
jpayne@68 32307 }
jpayne@68 32308
jpayne@68 32309 /* IterFinish */
jpayne@68 32310 static CYTHON_INLINE int __Pyx_IterFinish(void) {
jpayne@68 32311 PyObject* exc_type;
jpayne@68 32312 __Pyx_PyThreadState_declare
jpayne@68 32313 __Pyx_PyThreadState_assign
jpayne@68 32314 exc_type = __Pyx_PyErr_CurrentExceptionType();
jpayne@68 32315 if (unlikely(exc_type)) {
jpayne@68 32316 if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration)))
jpayne@68 32317 return -1;
jpayne@68 32318 __Pyx_PyErr_Clear();
jpayne@68 32319 return 0;
jpayne@68 32320 }
jpayne@68 32321 return 0;
jpayne@68 32322 }
jpayne@68 32323
jpayne@68 32324 /* UnpackItemEndCheck */
jpayne@68 32325 static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected) {
jpayne@68 32326 if (unlikely(retval)) {
jpayne@68 32327 Py_DECREF(retval);
jpayne@68 32328 __Pyx_RaiseTooManyValuesError(expected);
jpayne@68 32329 return -1;
jpayne@68 32330 }
jpayne@68 32331 return __Pyx_IterFinish();
jpayne@68 32332 }
jpayne@68 32333
jpayne@68 32334 /* PyObjectSetAttrStr */
jpayne@68 32335 #if CYTHON_USE_TYPE_SLOTS
jpayne@68 32336 static CYTHON_INLINE int __Pyx_PyObject_SetAttrStr(PyObject* obj, PyObject* attr_name, PyObject* value) {
jpayne@68 32337 PyTypeObject* tp = Py_TYPE(obj);
jpayne@68 32338 if (likely(tp->tp_setattro))
jpayne@68 32339 return tp->tp_setattro(obj, attr_name, value);
jpayne@68 32340 #if PY_MAJOR_VERSION < 3
jpayne@68 32341 if (likely(tp->tp_setattr))
jpayne@68 32342 return tp->tp_setattr(obj, PyString_AS_STRING(attr_name), value);
jpayne@68 32343 #endif
jpayne@68 32344 return PyObject_SetAttr(obj, attr_name, value);
jpayne@68 32345 }
jpayne@68 32346 #endif
jpayne@68 32347
jpayne@68 32348 /* Import */
jpayne@68 32349 static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) {
jpayne@68 32350 PyObject *module = 0;
jpayne@68 32351 PyObject *empty_dict = 0;
jpayne@68 32352 PyObject *empty_list = 0;
jpayne@68 32353 #if PY_MAJOR_VERSION < 3
jpayne@68 32354 PyObject *py_import;
jpayne@68 32355 py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s_import);
jpayne@68 32356 if (unlikely(!py_import))
jpayne@68 32357 goto bad;
jpayne@68 32358 if (!from_list) {
jpayne@68 32359 empty_list = PyList_New(0);
jpayne@68 32360 if (unlikely(!empty_list))
jpayne@68 32361 goto bad;
jpayne@68 32362 from_list = empty_list;
jpayne@68 32363 }
jpayne@68 32364 #endif
jpayne@68 32365 empty_dict = PyDict_New();
jpayne@68 32366 if (unlikely(!empty_dict))
jpayne@68 32367 goto bad;
jpayne@68 32368 {
jpayne@68 32369 #if PY_MAJOR_VERSION >= 3
jpayne@68 32370 if (level == -1) {
jpayne@68 32371 if (strchr(__Pyx_MODULE_NAME, '.') != NULL) {
jpayne@68 32372 module = PyImport_ImportModuleLevelObject(
jpayne@68 32373 name, __pyx_d, empty_dict, from_list, 1);
jpayne@68 32374 if (unlikely(!module)) {
jpayne@68 32375 if (unlikely(!PyErr_ExceptionMatches(PyExc_ImportError)))
jpayne@68 32376 goto bad;
jpayne@68 32377 PyErr_Clear();
jpayne@68 32378 }
jpayne@68 32379 }
jpayne@68 32380 level = 0;
jpayne@68 32381 }
jpayne@68 32382 #endif
jpayne@68 32383 if (!module) {
jpayne@68 32384 #if PY_MAJOR_VERSION < 3
jpayne@68 32385 PyObject *py_level = PyInt_FromLong(level);
jpayne@68 32386 if (unlikely(!py_level))
jpayne@68 32387 goto bad;
jpayne@68 32388 module = PyObject_CallFunctionObjArgs(py_import,
jpayne@68 32389 name, __pyx_d, empty_dict, from_list, py_level, (PyObject *)NULL);
jpayne@68 32390 Py_DECREF(py_level);
jpayne@68 32391 #else
jpayne@68 32392 module = PyImport_ImportModuleLevelObject(
jpayne@68 32393 name, __pyx_d, empty_dict, from_list, level);
jpayne@68 32394 #endif
jpayne@68 32395 }
jpayne@68 32396 }
jpayne@68 32397 bad:
jpayne@68 32398 Py_XDECREF(empty_dict);
jpayne@68 32399 Py_XDECREF(empty_list);
jpayne@68 32400 #if PY_MAJOR_VERSION < 3
jpayne@68 32401 Py_XDECREF(py_import);
jpayne@68 32402 #endif
jpayne@68 32403 return module;
jpayne@68 32404 }
jpayne@68 32405
jpayne@68 32406 /* ImportFrom */
jpayne@68 32407 static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name) {
jpayne@68 32408 PyObject* value = __Pyx_PyObject_GetAttrStr(module, name);
jpayne@68 32409 if (unlikely(!value) && PyErr_ExceptionMatches(PyExc_AttributeError)) {
jpayne@68 32410 const char* module_name_str = 0;
jpayne@68 32411 PyObject* module_name = 0;
jpayne@68 32412 PyObject* module_dot = 0;
jpayne@68 32413 PyObject* full_name = 0;
jpayne@68 32414 PyErr_Clear();
jpayne@68 32415 module_name_str = PyModule_GetName(module);
jpayne@68 32416 if (unlikely(!module_name_str)) { goto modbad; }
jpayne@68 32417 module_name = PyUnicode_FromString(module_name_str);
jpayne@68 32418 if (unlikely(!module_name)) { goto modbad; }
jpayne@68 32419 module_dot = PyUnicode_Concat(module_name, __pyx_kp_u__56);
jpayne@68 32420 if (unlikely(!module_dot)) { goto modbad; }
jpayne@68 32421 full_name = PyUnicode_Concat(module_dot, name);
jpayne@68 32422 if (unlikely(!full_name)) { goto modbad; }
jpayne@68 32423 #if PY_VERSION_HEX < 0x030700A1 || (CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM < 0x07030400)
jpayne@68 32424 {
jpayne@68 32425 PyObject *modules = PyImport_GetModuleDict();
jpayne@68 32426 if (unlikely(!modules))
jpayne@68 32427 goto modbad;
jpayne@68 32428 value = PyObject_GetItem(modules, full_name);
jpayne@68 32429 }
jpayne@68 32430 #else
jpayne@68 32431 value = PyImport_GetModule(full_name);
jpayne@68 32432 #endif
jpayne@68 32433 modbad:
jpayne@68 32434 Py_XDECREF(full_name);
jpayne@68 32435 Py_XDECREF(module_dot);
jpayne@68 32436 Py_XDECREF(module_name);
jpayne@68 32437 }
jpayne@68 32438 if (unlikely(!value)) {
jpayne@68 32439 PyErr_Format(PyExc_ImportError,
jpayne@68 32440 #if PY_MAJOR_VERSION < 3
jpayne@68 32441 "cannot import name %.230s", PyString_AS_STRING(name));
jpayne@68 32442 #else
jpayne@68 32443 "cannot import name %S", name);
jpayne@68 32444 #endif
jpayne@68 32445 }
jpayne@68 32446 return value;
jpayne@68 32447 }
jpayne@68 32448
jpayne@68 32449 /* GetItemInt */
jpayne@68 32450 static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) {
jpayne@68 32451 PyObject *r;
jpayne@68 32452 if (unlikely(!j)) return NULL;
jpayne@68 32453 r = PyObject_GetItem(o, j);
jpayne@68 32454 Py_DECREF(j);
jpayne@68 32455 return r;
jpayne@68 32456 }
jpayne@68 32457 static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
jpayne@68 32458 CYTHON_NCP_UNUSED int wraparound,
jpayne@68 32459 CYTHON_NCP_UNUSED int boundscheck) {
jpayne@68 32460 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
jpayne@68 32461 Py_ssize_t wrapped_i = i;
jpayne@68 32462 if (wraparound & unlikely(i < 0)) {
jpayne@68 32463 wrapped_i += PyList_GET_SIZE(o);
jpayne@68 32464 }
jpayne@68 32465 if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyList_GET_SIZE(o)))) {
jpayne@68 32466 PyObject *r = PyList_GET_ITEM(o, wrapped_i);
jpayne@68 32467 Py_INCREF(r);
jpayne@68 32468 return r;
jpayne@68 32469 }
jpayne@68 32470 return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
jpayne@68 32471 #else
jpayne@68 32472 return PySequence_GetItem(o, i);
jpayne@68 32473 #endif
jpayne@68 32474 }
jpayne@68 32475 static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
jpayne@68 32476 CYTHON_NCP_UNUSED int wraparound,
jpayne@68 32477 CYTHON_NCP_UNUSED int boundscheck) {
jpayne@68 32478 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
jpayne@68 32479 Py_ssize_t wrapped_i = i;
jpayne@68 32480 if (wraparound & unlikely(i < 0)) {
jpayne@68 32481 wrapped_i += PyTuple_GET_SIZE(o);
jpayne@68 32482 }
jpayne@68 32483 if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyTuple_GET_SIZE(o)))) {
jpayne@68 32484 PyObject *r = PyTuple_GET_ITEM(o, wrapped_i);
jpayne@68 32485 Py_INCREF(r);
jpayne@68 32486 return r;
jpayne@68 32487 }
jpayne@68 32488 return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
jpayne@68 32489 #else
jpayne@68 32490 return PySequence_GetItem(o, i);
jpayne@68 32491 #endif
jpayne@68 32492 }
jpayne@68 32493 static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list,
jpayne@68 32494 CYTHON_NCP_UNUSED int wraparound,
jpayne@68 32495 CYTHON_NCP_UNUSED int boundscheck) {
jpayne@68 32496 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS && CYTHON_USE_TYPE_SLOTS
jpayne@68 32497 if (is_list || PyList_CheckExact(o)) {
jpayne@68 32498 Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyList_GET_SIZE(o);
jpayne@68 32499 if ((!boundscheck) || (likely(__Pyx_is_valid_index(n, PyList_GET_SIZE(o))))) {
jpayne@68 32500 PyObject *r = PyList_GET_ITEM(o, n);
jpayne@68 32501 Py_INCREF(r);
jpayne@68 32502 return r;
jpayne@68 32503 }
jpayne@68 32504 }
jpayne@68 32505 else if (PyTuple_CheckExact(o)) {
jpayne@68 32506 Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o);
jpayne@68 32507 if ((!boundscheck) || likely(__Pyx_is_valid_index(n, PyTuple_GET_SIZE(o)))) {
jpayne@68 32508 PyObject *r = PyTuple_GET_ITEM(o, n);
jpayne@68 32509 Py_INCREF(r);
jpayne@68 32510 return r;
jpayne@68 32511 }
jpayne@68 32512 } else {
jpayne@68 32513 PyMappingMethods *mm = Py_TYPE(o)->tp_as_mapping;
jpayne@68 32514 PySequenceMethods *sm = Py_TYPE(o)->tp_as_sequence;
jpayne@68 32515 if (mm && mm->mp_subscript) {
jpayne@68 32516 PyObject *r, *key = PyInt_FromSsize_t(i);
jpayne@68 32517 if (unlikely(!key)) return NULL;
jpayne@68 32518 r = mm->mp_subscript(o, key);
jpayne@68 32519 Py_DECREF(key);
jpayne@68 32520 return r;
jpayne@68 32521 }
jpayne@68 32522 if (likely(sm && sm->sq_item)) {
jpayne@68 32523 if (wraparound && unlikely(i < 0) && likely(sm->sq_length)) {
jpayne@68 32524 Py_ssize_t l = sm->sq_length(o);
jpayne@68 32525 if (likely(l >= 0)) {
jpayne@68 32526 i += l;
jpayne@68 32527 } else {
jpayne@68 32528 if (!PyErr_ExceptionMatches(PyExc_OverflowError))
jpayne@68 32529 return NULL;
jpayne@68 32530 PyErr_Clear();
jpayne@68 32531 }
jpayne@68 32532 }
jpayne@68 32533 return sm->sq_item(o, i);
jpayne@68 32534 }
jpayne@68 32535 }
jpayne@68 32536 #else
jpayne@68 32537 if (is_list || !PyMapping_Check(o)) {
jpayne@68 32538 return PySequence_GetItem(o, i);
jpayne@68 32539 }
jpayne@68 32540 #endif
jpayne@68 32541 return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
jpayne@68 32542 }
jpayne@68 32543
jpayne@68 32544 /* GetAttr */
jpayne@68 32545 static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *o, PyObject *n) {
jpayne@68 32546 #if CYTHON_USE_TYPE_SLOTS
jpayne@68 32547 #if PY_MAJOR_VERSION >= 3
jpayne@68 32548 if (likely(PyUnicode_Check(n)))
jpayne@68 32549 #else
jpayne@68 32550 if (likely(PyString_Check(n)))
jpayne@68 32551 #endif
jpayne@68 32552 return __Pyx_PyObject_GetAttrStr(o, n);
jpayne@68 32553 #endif
jpayne@68 32554 return PyObject_GetAttr(o, n);
jpayne@68 32555 }
jpayne@68 32556
jpayne@68 32557 /* HasAttr */
jpayne@68 32558 static CYTHON_INLINE int __Pyx_HasAttr(PyObject *o, PyObject *n) {
jpayne@68 32559 PyObject *r;
jpayne@68 32560 if (unlikely(!__Pyx_PyBaseString_Check(n))) {
jpayne@68 32561 PyErr_SetString(PyExc_TypeError,
jpayne@68 32562 "hasattr(): attribute name must be string");
jpayne@68 32563 return -1;
jpayne@68 32564 }
jpayne@68 32565 r = __Pyx_GetAttr(o, n);
jpayne@68 32566 if (!r) {
jpayne@68 32567 PyErr_Clear();
jpayne@68 32568 return 0;
jpayne@68 32569 } else {
jpayne@68 32570 Py_DECREF(r);
jpayne@68 32571 return 1;
jpayne@68 32572 }
jpayne@68 32573 }
jpayne@68 32574
jpayne@68 32575 /* CallNextTpDealloc */
jpayne@68 32576 static void __Pyx_call_next_tp_dealloc(PyObject* obj, destructor current_tp_dealloc) {
jpayne@68 32577 PyTypeObject* type = Py_TYPE(obj);
jpayne@68 32578 destructor tp_dealloc = NULL;
jpayne@68 32579 while (type && __Pyx_PyType_GetSlot(type, tp_dealloc, destructor) != current_tp_dealloc)
jpayne@68 32580 type = __Pyx_PyType_GetSlot(type, tp_base, PyTypeObject*);
jpayne@68 32581 while (type && (tp_dealloc = __Pyx_PyType_GetSlot(type, tp_dealloc, destructor)) == current_tp_dealloc)
jpayne@68 32582 type = __Pyx_PyType_GetSlot(type, tp_base, PyTypeObject*);
jpayne@68 32583 if (type)
jpayne@68 32584 tp_dealloc(obj);
jpayne@68 32585 }
jpayne@68 32586
jpayne@68 32587 /* CallNextTpTraverse */
jpayne@68 32588 static int __Pyx_call_next_tp_traverse(PyObject* obj, visitproc v, void *a, traverseproc current_tp_traverse) {
jpayne@68 32589 PyTypeObject* type = Py_TYPE(obj);
jpayne@68 32590 traverseproc tp_traverse = NULL;
jpayne@68 32591 while (type && __Pyx_PyType_GetSlot(type, tp_traverse, traverseproc) != current_tp_traverse)
jpayne@68 32592 type = __Pyx_PyType_GetSlot(type, tp_base, PyTypeObject*);
jpayne@68 32593 while (type && (tp_traverse = __Pyx_PyType_GetSlot(type, tp_traverse, traverseproc)) == current_tp_traverse)
jpayne@68 32594 type = __Pyx_PyType_GetSlot(type, tp_base, PyTypeObject*);
jpayne@68 32595 if (type && tp_traverse)
jpayne@68 32596 return tp_traverse(obj, v, a);
jpayne@68 32597 return 0;
jpayne@68 32598 }
jpayne@68 32599
jpayne@68 32600 /* CallNextTpClear */
jpayne@68 32601 static void __Pyx_call_next_tp_clear(PyObject* obj, inquiry current_tp_clear) {
jpayne@68 32602 PyTypeObject* type = Py_TYPE(obj);
jpayne@68 32603 inquiry tp_clear = NULL;
jpayne@68 32604 while (type && __Pyx_PyType_GetSlot(type, tp_clear, inquiry) != current_tp_clear)
jpayne@68 32605 type = __Pyx_PyType_GetSlot(type, tp_base, PyTypeObject*);
jpayne@68 32606 while (type && (tp_clear = __Pyx_PyType_GetSlot(type, tp_clear, inquiry)) == current_tp_clear)
jpayne@68 32607 type = __Pyx_PyType_GetSlot(type, tp_base, PyTypeObject*);
jpayne@68 32608 if (type && tp_clear)
jpayne@68 32609 tp_clear(obj);
jpayne@68 32610 }
jpayne@68 32611
jpayne@68 32612 /* FixUpExtensionType */
jpayne@68 32613 #if CYTHON_USE_TYPE_SPECS
jpayne@68 32614 static int __Pyx_fix_up_extension_type_from_spec(PyType_Spec *spec, PyTypeObject *type) {
jpayne@68 32615 #if PY_VERSION_HEX > 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API
jpayne@68 32616 CYTHON_UNUSED_VAR(spec);
jpayne@68 32617 CYTHON_UNUSED_VAR(type);
jpayne@68 32618 #else
jpayne@68 32619 const PyType_Slot *slot = spec->slots;
jpayne@68 32620 while (slot && slot->slot && slot->slot != Py_tp_members)
jpayne@68 32621 slot++;
jpayne@68 32622 if (slot && slot->slot == Py_tp_members) {
jpayne@68 32623 int changed = 0;
jpayne@68 32624 #if !(PY_VERSION_HEX <= 0x030900b1 && CYTHON_COMPILING_IN_CPYTHON)
jpayne@68 32625 const
jpayne@68 32626 #endif
jpayne@68 32627 PyMemberDef *memb = (PyMemberDef*) slot->pfunc;
jpayne@68 32628 while (memb && memb->name) {
jpayne@68 32629 if (memb->name[0] == '_' && memb->name[1] == '_') {
jpayne@68 32630 #if PY_VERSION_HEX < 0x030900b1
jpayne@68 32631 if (strcmp(memb->name, "__weaklistoffset__") == 0) {
jpayne@68 32632 assert(memb->type == T_PYSSIZET);
jpayne@68 32633 assert(memb->flags == READONLY);
jpayne@68 32634 type->tp_weaklistoffset = memb->offset;
jpayne@68 32635 changed = 1;
jpayne@68 32636 }
jpayne@68 32637 else if (strcmp(memb->name, "__dictoffset__") == 0) {
jpayne@68 32638 assert(memb->type == T_PYSSIZET);
jpayne@68 32639 assert(memb->flags == READONLY);
jpayne@68 32640 type->tp_dictoffset = memb->offset;
jpayne@68 32641 changed = 1;
jpayne@68 32642 }
jpayne@68 32643 #if CYTHON_METH_FASTCALL
jpayne@68 32644 else if (strcmp(memb->name, "__vectorcalloffset__") == 0) {
jpayne@68 32645 assert(memb->type == T_PYSSIZET);
jpayne@68 32646 assert(memb->flags == READONLY);
jpayne@68 32647 #if PY_VERSION_HEX >= 0x030800b4
jpayne@68 32648 type->tp_vectorcall_offset = memb->offset;
jpayne@68 32649 #else
jpayne@68 32650 type->tp_print = (printfunc) memb->offset;
jpayne@68 32651 #endif
jpayne@68 32652 changed = 1;
jpayne@68 32653 }
jpayne@68 32654 #endif
jpayne@68 32655 #else
jpayne@68 32656 if ((0));
jpayne@68 32657 #endif
jpayne@68 32658 #if PY_VERSION_HEX <= 0x030900b1 && CYTHON_COMPILING_IN_CPYTHON
jpayne@68 32659 else if (strcmp(memb->name, "__module__") == 0) {
jpayne@68 32660 PyObject *descr;
jpayne@68 32661 assert(memb->type == T_OBJECT);
jpayne@68 32662 assert(memb->flags == 0 || memb->flags == READONLY);
jpayne@68 32663 descr = PyDescr_NewMember(type, memb);
jpayne@68 32664 if (unlikely(!descr))
jpayne@68 32665 return -1;
jpayne@68 32666 if (unlikely(PyDict_SetItem(type->tp_dict, PyDescr_NAME(descr), descr) < 0)) {
jpayne@68 32667 Py_DECREF(descr);
jpayne@68 32668 return -1;
jpayne@68 32669 }
jpayne@68 32670 Py_DECREF(descr);
jpayne@68 32671 changed = 1;
jpayne@68 32672 }
jpayne@68 32673 #endif
jpayne@68 32674 }
jpayne@68 32675 memb++;
jpayne@68 32676 }
jpayne@68 32677 if (changed)
jpayne@68 32678 PyType_Modified(type);
jpayne@68 32679 }
jpayne@68 32680 #endif
jpayne@68 32681 return 0;
jpayne@68 32682 }
jpayne@68 32683 #endif
jpayne@68 32684
jpayne@68 32685 /* PyObjectGetMethod */
jpayne@68 32686 static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method) {
jpayne@68 32687 PyObject *attr;
jpayne@68 32688 #if CYTHON_UNPACK_METHODS && CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_PYTYPE_LOOKUP
jpayne@68 32689 __Pyx_TypeName type_name;
jpayne@68 32690 PyTypeObject *tp = Py_TYPE(obj);
jpayne@68 32691 PyObject *descr;
jpayne@68 32692 descrgetfunc f = NULL;
jpayne@68 32693 PyObject **dictptr, *dict;
jpayne@68 32694 int meth_found = 0;
jpayne@68 32695 assert (*method == NULL);
jpayne@68 32696 if (unlikely(tp->tp_getattro != PyObject_GenericGetAttr)) {
jpayne@68 32697 attr = __Pyx_PyObject_GetAttrStr(obj, name);
jpayne@68 32698 goto try_unpack;
jpayne@68 32699 }
jpayne@68 32700 if (unlikely(tp->tp_dict == NULL) && unlikely(PyType_Ready(tp) < 0)) {
jpayne@68 32701 return 0;
jpayne@68 32702 }
jpayne@68 32703 descr = _PyType_Lookup(tp, name);
jpayne@68 32704 if (likely(descr != NULL)) {
jpayne@68 32705 Py_INCREF(descr);
jpayne@68 32706 #if defined(Py_TPFLAGS_METHOD_DESCRIPTOR) && Py_TPFLAGS_METHOD_DESCRIPTOR
jpayne@68 32707 if (__Pyx_PyType_HasFeature(Py_TYPE(descr), Py_TPFLAGS_METHOD_DESCRIPTOR))
jpayne@68 32708 #elif PY_MAJOR_VERSION >= 3
jpayne@68 32709 #ifdef __Pyx_CyFunction_USED
jpayne@68 32710 if (likely(PyFunction_Check(descr) || __Pyx_IS_TYPE(descr, &PyMethodDescr_Type) || __Pyx_CyFunction_Check(descr)))
jpayne@68 32711 #else
jpayne@68 32712 if (likely(PyFunction_Check(descr) || __Pyx_IS_TYPE(descr, &PyMethodDescr_Type)))
jpayne@68 32713 #endif
jpayne@68 32714 #else
jpayne@68 32715 #ifdef __Pyx_CyFunction_USED
jpayne@68 32716 if (likely(PyFunction_Check(descr) || __Pyx_CyFunction_Check(descr)))
jpayne@68 32717 #else
jpayne@68 32718 if (likely(PyFunction_Check(descr)))
jpayne@68 32719 #endif
jpayne@68 32720 #endif
jpayne@68 32721 {
jpayne@68 32722 meth_found = 1;
jpayne@68 32723 } else {
jpayne@68 32724 f = Py_TYPE(descr)->tp_descr_get;
jpayne@68 32725 if (f != NULL && PyDescr_IsData(descr)) {
jpayne@68 32726 attr = f(descr, obj, (PyObject *)Py_TYPE(obj));
jpayne@68 32727 Py_DECREF(descr);
jpayne@68 32728 goto try_unpack;
jpayne@68 32729 }
jpayne@68 32730 }
jpayne@68 32731 }
jpayne@68 32732 dictptr = _PyObject_GetDictPtr(obj);
jpayne@68 32733 if (dictptr != NULL && (dict = *dictptr) != NULL) {
jpayne@68 32734 Py_INCREF(dict);
jpayne@68 32735 attr = __Pyx_PyDict_GetItemStr(dict, name);
jpayne@68 32736 if (attr != NULL) {
jpayne@68 32737 Py_INCREF(attr);
jpayne@68 32738 Py_DECREF(dict);
jpayne@68 32739 Py_XDECREF(descr);
jpayne@68 32740 goto try_unpack;
jpayne@68 32741 }
jpayne@68 32742 Py_DECREF(dict);
jpayne@68 32743 }
jpayne@68 32744 if (meth_found) {
jpayne@68 32745 *method = descr;
jpayne@68 32746 return 1;
jpayne@68 32747 }
jpayne@68 32748 if (f != NULL) {
jpayne@68 32749 attr = f(descr, obj, (PyObject *)Py_TYPE(obj));
jpayne@68 32750 Py_DECREF(descr);
jpayne@68 32751 goto try_unpack;
jpayne@68 32752 }
jpayne@68 32753 if (likely(descr != NULL)) {
jpayne@68 32754 *method = descr;
jpayne@68 32755 return 0;
jpayne@68 32756 }
jpayne@68 32757 type_name = __Pyx_PyType_GetName(tp);
jpayne@68 32758 PyErr_Format(PyExc_AttributeError,
jpayne@68 32759 #if PY_MAJOR_VERSION >= 3
jpayne@68 32760 "'" __Pyx_FMT_TYPENAME "' object has no attribute '%U'",
jpayne@68 32761 type_name, name);
jpayne@68 32762 #else
jpayne@68 32763 "'" __Pyx_FMT_TYPENAME "' object has no attribute '%.400s'",
jpayne@68 32764 type_name, PyString_AS_STRING(name));
jpayne@68 32765 #endif
jpayne@68 32766 __Pyx_DECREF_TypeName(type_name);
jpayne@68 32767 return 0;
jpayne@68 32768 #else
jpayne@68 32769 attr = __Pyx_PyObject_GetAttrStr(obj, name);
jpayne@68 32770 goto try_unpack;
jpayne@68 32771 #endif
jpayne@68 32772 try_unpack:
jpayne@68 32773 #if CYTHON_UNPACK_METHODS
jpayne@68 32774 if (likely(attr) && PyMethod_Check(attr) && likely(PyMethod_GET_SELF(attr) == obj)) {
jpayne@68 32775 PyObject *function = PyMethod_GET_FUNCTION(attr);
jpayne@68 32776 Py_INCREF(function);
jpayne@68 32777 Py_DECREF(attr);
jpayne@68 32778 *method = function;
jpayne@68 32779 return 1;
jpayne@68 32780 }
jpayne@68 32781 #endif
jpayne@68 32782 *method = attr;
jpayne@68 32783 return 0;
jpayne@68 32784 }
jpayne@68 32785
jpayne@68 32786 /* PyObjectCallMethod0 */
jpayne@68 32787 static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name) {
jpayne@68 32788 PyObject *method = NULL, *result = NULL;
jpayne@68 32789 int is_method = __Pyx_PyObject_GetMethod(obj, method_name, &method);
jpayne@68 32790 if (likely(is_method)) {
jpayne@68 32791 result = __Pyx_PyObject_CallOneArg(method, obj);
jpayne@68 32792 Py_DECREF(method);
jpayne@68 32793 return result;
jpayne@68 32794 }
jpayne@68 32795 if (unlikely(!method)) goto bad;
jpayne@68 32796 result = __Pyx_PyObject_CallNoArg(method);
jpayne@68 32797 Py_DECREF(method);
jpayne@68 32798 bad:
jpayne@68 32799 return result;
jpayne@68 32800 }
jpayne@68 32801
jpayne@68 32802 /* ValidateBasesTuple */
jpayne@68 32803 #if CYTHON_COMPILING_IN_CPYTHON || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_USE_TYPE_SPECS
jpayne@68 32804 static int __Pyx_validate_bases_tuple(const char *type_name, Py_ssize_t dictoffset, PyObject *bases) {
jpayne@68 32805 Py_ssize_t i, n;
jpayne@68 32806 #if CYTHON_ASSUME_SAFE_MACROS
jpayne@68 32807 n = PyTuple_GET_SIZE(bases);
jpayne@68 32808 #else
jpayne@68 32809 n = PyTuple_Size(bases);
jpayne@68 32810 if (n < 0) return -1;
jpayne@68 32811 #endif
jpayne@68 32812 for (i = 1; i < n; i++)
jpayne@68 32813 {
jpayne@68 32814 #if CYTHON_AVOID_BORROWED_REFS
jpayne@68 32815 PyObject *b0 = PySequence_GetItem(bases, i);
jpayne@68 32816 if (!b0) return -1;
jpayne@68 32817 #elif CYTHON_ASSUME_SAFE_MACROS
jpayne@68 32818 PyObject *b0 = PyTuple_GET_ITEM(bases, i);
jpayne@68 32819 #else
jpayne@68 32820 PyObject *b0 = PyTuple_GetItem(bases, i);
jpayne@68 32821 if (!b0) return -1;
jpayne@68 32822 #endif
jpayne@68 32823 PyTypeObject *b;
jpayne@68 32824 #if PY_MAJOR_VERSION < 3
jpayne@68 32825 if (PyClass_Check(b0))
jpayne@68 32826 {
jpayne@68 32827 PyErr_Format(PyExc_TypeError, "base class '%.200s' is an old-style class",
jpayne@68 32828 PyString_AS_STRING(((PyClassObject*)b0)->cl_name));
jpayne@68 32829 #if CYTHON_AVOID_BORROWED_REFS
jpayne@68 32830 Py_DECREF(b0);
jpayne@68 32831 #endif
jpayne@68 32832 return -1;
jpayne@68 32833 }
jpayne@68 32834 #endif
jpayne@68 32835 b = (PyTypeObject*) b0;
jpayne@68 32836 if (!__Pyx_PyType_HasFeature(b, Py_TPFLAGS_HEAPTYPE))
jpayne@68 32837 {
jpayne@68 32838 __Pyx_TypeName b_name = __Pyx_PyType_GetName(b);
jpayne@68 32839 PyErr_Format(PyExc_TypeError,
jpayne@68 32840 "base class '" __Pyx_FMT_TYPENAME "' is not a heap type", b_name);
jpayne@68 32841 __Pyx_DECREF_TypeName(b_name);
jpayne@68 32842 #if CYTHON_AVOID_BORROWED_REFS
jpayne@68 32843 Py_DECREF(b0);
jpayne@68 32844 #endif
jpayne@68 32845 return -1;
jpayne@68 32846 }
jpayne@68 32847 if (dictoffset == 0)
jpayne@68 32848 {
jpayne@68 32849 Py_ssize_t b_dictoffset = 0;
jpayne@68 32850 #if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY
jpayne@68 32851 b_dictoffset = b->tp_dictoffset;
jpayne@68 32852 #else
jpayne@68 32853 PyObject *py_b_dictoffset = PyObject_GetAttrString((PyObject*)b, "__dictoffset__");
jpayne@68 32854 if (!py_b_dictoffset) goto dictoffset_return;
jpayne@68 32855 b_dictoffset = PyLong_AsSsize_t(py_b_dictoffset);
jpayne@68 32856 Py_DECREF(py_b_dictoffset);
jpayne@68 32857 if (b_dictoffset == -1 && PyErr_Occurred()) goto dictoffset_return;
jpayne@68 32858 #endif
jpayne@68 32859 if (b_dictoffset) {
jpayne@68 32860 {
jpayne@68 32861 __Pyx_TypeName b_name = __Pyx_PyType_GetName(b);
jpayne@68 32862 PyErr_Format(PyExc_TypeError,
jpayne@68 32863 "extension type '%.200s' has no __dict__ slot, "
jpayne@68 32864 "but base type '" __Pyx_FMT_TYPENAME "' has: "
jpayne@68 32865 "either add 'cdef dict __dict__' to the extension type "
jpayne@68 32866 "or add '__slots__ = [...]' to the base type",
jpayne@68 32867 type_name, b_name);
jpayne@68 32868 __Pyx_DECREF_TypeName(b_name);
jpayne@68 32869 }
jpayne@68 32870 #if !(CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY)
jpayne@68 32871 dictoffset_return:
jpayne@68 32872 #endif
jpayne@68 32873 #if CYTHON_AVOID_BORROWED_REFS
jpayne@68 32874 Py_DECREF(b0);
jpayne@68 32875 #endif
jpayne@68 32876 return -1;
jpayne@68 32877 }
jpayne@68 32878 }
jpayne@68 32879 #if CYTHON_AVOID_BORROWED_REFS
jpayne@68 32880 Py_DECREF(b0);
jpayne@68 32881 #endif
jpayne@68 32882 }
jpayne@68 32883 return 0;
jpayne@68 32884 }
jpayne@68 32885 #endif
jpayne@68 32886
jpayne@68 32887 /* PyType_Ready */
jpayne@68 32888 static int __Pyx_PyType_Ready(PyTypeObject *t) {
jpayne@68 32889 #if CYTHON_USE_TYPE_SPECS || !(CYTHON_COMPILING_IN_CPYTHON || CYTHON_COMPILING_IN_LIMITED_API) || defined(PYSTON_MAJOR_VERSION)
jpayne@68 32890 (void)__Pyx_PyObject_CallMethod0;
jpayne@68 32891 #if CYTHON_USE_TYPE_SPECS
jpayne@68 32892 (void)__Pyx_validate_bases_tuple;
jpayne@68 32893 #endif
jpayne@68 32894 return PyType_Ready(t);
jpayne@68 32895 #else
jpayne@68 32896 int r;
jpayne@68 32897 PyObject *bases = __Pyx_PyType_GetSlot(t, tp_bases, PyObject*);
jpayne@68 32898 if (bases && unlikely(__Pyx_validate_bases_tuple(t->tp_name, t->tp_dictoffset, bases) == -1))
jpayne@68 32899 return -1;
jpayne@68 32900 #if PY_VERSION_HEX >= 0x03050000 && !defined(PYSTON_MAJOR_VERSION)
jpayne@68 32901 {
jpayne@68 32902 int gc_was_enabled;
jpayne@68 32903 #if PY_VERSION_HEX >= 0x030A00b1
jpayne@68 32904 gc_was_enabled = PyGC_Disable();
jpayne@68 32905 (void)__Pyx_PyObject_CallMethod0;
jpayne@68 32906 #else
jpayne@68 32907 PyObject *ret, *py_status;
jpayne@68 32908 PyObject *gc = NULL;
jpayne@68 32909 #if PY_VERSION_HEX >= 0x030700a1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM+0 >= 0x07030400)
jpayne@68 32910 gc = PyImport_GetModule(__pyx_kp_u_gc);
jpayne@68 32911 #endif
jpayne@68 32912 if (unlikely(!gc)) gc = PyImport_Import(__pyx_kp_u_gc);
jpayne@68 32913 if (unlikely(!gc)) return -1;
jpayne@68 32914 py_status = __Pyx_PyObject_CallMethod0(gc, __pyx_kp_u_isenabled);
jpayne@68 32915 if (unlikely(!py_status)) {
jpayne@68 32916 Py_DECREF(gc);
jpayne@68 32917 return -1;
jpayne@68 32918 }
jpayne@68 32919 gc_was_enabled = __Pyx_PyObject_IsTrue(py_status);
jpayne@68 32920 Py_DECREF(py_status);
jpayne@68 32921 if (gc_was_enabled > 0) {
jpayne@68 32922 ret = __Pyx_PyObject_CallMethod0(gc, __pyx_kp_u_disable);
jpayne@68 32923 if (unlikely(!ret)) {
jpayne@68 32924 Py_DECREF(gc);
jpayne@68 32925 return -1;
jpayne@68 32926 }
jpayne@68 32927 Py_DECREF(ret);
jpayne@68 32928 } else if (unlikely(gc_was_enabled == -1)) {
jpayne@68 32929 Py_DECREF(gc);
jpayne@68 32930 return -1;
jpayne@68 32931 }
jpayne@68 32932 #endif
jpayne@68 32933 t->tp_flags |= Py_TPFLAGS_HEAPTYPE;
jpayne@68 32934 #if PY_VERSION_HEX >= 0x030A0000
jpayne@68 32935 t->tp_flags |= Py_TPFLAGS_IMMUTABLETYPE;
jpayne@68 32936 #endif
jpayne@68 32937 #else
jpayne@68 32938 (void)__Pyx_PyObject_CallMethod0;
jpayne@68 32939 #endif
jpayne@68 32940 r = PyType_Ready(t);
jpayne@68 32941 #if PY_VERSION_HEX >= 0x03050000 && !defined(PYSTON_MAJOR_VERSION)
jpayne@68 32942 t->tp_flags &= ~Py_TPFLAGS_HEAPTYPE;
jpayne@68 32943 #if PY_VERSION_HEX >= 0x030A00b1
jpayne@68 32944 if (gc_was_enabled)
jpayne@68 32945 PyGC_Enable();
jpayne@68 32946 #else
jpayne@68 32947 if (gc_was_enabled) {
jpayne@68 32948 PyObject *tp, *v, *tb;
jpayne@68 32949 PyErr_Fetch(&tp, &v, &tb);
jpayne@68 32950 ret = __Pyx_PyObject_CallMethod0(gc, __pyx_kp_u_enable);
jpayne@68 32951 if (likely(ret || r == -1)) {
jpayne@68 32952 Py_XDECREF(ret);
jpayne@68 32953 PyErr_Restore(tp, v, tb);
jpayne@68 32954 } else {
jpayne@68 32955 Py_XDECREF(tp);
jpayne@68 32956 Py_XDECREF(v);
jpayne@68 32957 Py_XDECREF(tb);
jpayne@68 32958 r = -1;
jpayne@68 32959 }
jpayne@68 32960 }
jpayne@68 32961 Py_DECREF(gc);
jpayne@68 32962 #endif
jpayne@68 32963 }
jpayne@68 32964 #endif
jpayne@68 32965 return r;
jpayne@68 32966 #endif
jpayne@68 32967 }
jpayne@68 32968
jpayne@68 32969 /* PyObject_GenericGetAttrNoDict */
jpayne@68 32970 #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
jpayne@68 32971 static PyObject *__Pyx_RaiseGenericGetAttributeError(PyTypeObject *tp, PyObject *attr_name) {
jpayne@68 32972 __Pyx_TypeName type_name = __Pyx_PyType_GetName(tp);
jpayne@68 32973 PyErr_Format(PyExc_AttributeError,
jpayne@68 32974 #if PY_MAJOR_VERSION >= 3
jpayne@68 32975 "'" __Pyx_FMT_TYPENAME "' object has no attribute '%U'",
jpayne@68 32976 type_name, attr_name);
jpayne@68 32977 #else
jpayne@68 32978 "'" __Pyx_FMT_TYPENAME "' object has no attribute '%.400s'",
jpayne@68 32979 type_name, PyString_AS_STRING(attr_name));
jpayne@68 32980 #endif
jpayne@68 32981 __Pyx_DECREF_TypeName(type_name);
jpayne@68 32982 return NULL;
jpayne@68 32983 }
jpayne@68 32984 static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name) {
jpayne@68 32985 PyObject *descr;
jpayne@68 32986 PyTypeObject *tp = Py_TYPE(obj);
jpayne@68 32987 if (unlikely(!PyString_Check(attr_name))) {
jpayne@68 32988 return PyObject_GenericGetAttr(obj, attr_name);
jpayne@68 32989 }
jpayne@68 32990 assert(!tp->tp_dictoffset);
jpayne@68 32991 descr = _PyType_Lookup(tp, attr_name);
jpayne@68 32992 if (unlikely(!descr)) {
jpayne@68 32993 return __Pyx_RaiseGenericGetAttributeError(tp, attr_name);
jpayne@68 32994 }
jpayne@68 32995 Py_INCREF(descr);
jpayne@68 32996 #if PY_MAJOR_VERSION < 3
jpayne@68 32997 if (likely(PyType_HasFeature(Py_TYPE(descr), Py_TPFLAGS_HAVE_CLASS)))
jpayne@68 32998 #endif
jpayne@68 32999 {
jpayne@68 33000 descrgetfunc f = Py_TYPE(descr)->tp_descr_get;
jpayne@68 33001 if (unlikely(f)) {
jpayne@68 33002 PyObject *res = f(descr, obj, (PyObject *)tp);
jpayne@68 33003 Py_DECREF(descr);
jpayne@68 33004 return res;
jpayne@68 33005 }
jpayne@68 33006 }
jpayne@68 33007 return descr;
jpayne@68 33008 }
jpayne@68 33009 #endif
jpayne@68 33010
jpayne@68 33011 /* PyObject_GenericGetAttr */
jpayne@68 33012 #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
jpayne@68 33013 static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_name) {
jpayne@68 33014 if (unlikely(Py_TYPE(obj)->tp_dictoffset)) {
jpayne@68 33015 return PyObject_GenericGetAttr(obj, attr_name);
jpayne@68 33016 }
jpayne@68 33017 return __Pyx_PyObject_GenericGetAttrNoDict(obj, attr_name);
jpayne@68 33018 }
jpayne@68 33019 #endif
jpayne@68 33020
jpayne@68 33021 /* SetVTable */
jpayne@68 33022 static int __Pyx_SetVtable(PyTypeObject *type, void *vtable) {
jpayne@68 33023 PyObject *ob = PyCapsule_New(vtable, 0, 0);
jpayne@68 33024 if (unlikely(!ob))
jpayne@68 33025 goto bad;
jpayne@68 33026 #if CYTHON_COMPILING_IN_LIMITED_API
jpayne@68 33027 if (unlikely(PyObject_SetAttr((PyObject *) type, __pyx_n_s_pyx_vtable, ob) < 0))
jpayne@68 33028 #else
jpayne@68 33029 if (unlikely(PyDict_SetItem(type->tp_dict, __pyx_n_s_pyx_vtable, ob) < 0))
jpayne@68 33030 #endif
jpayne@68 33031 goto bad;
jpayne@68 33032 Py_DECREF(ob);
jpayne@68 33033 return 0;
jpayne@68 33034 bad:
jpayne@68 33035 Py_XDECREF(ob);
jpayne@68 33036 return -1;
jpayne@68 33037 }
jpayne@68 33038
jpayne@68 33039 /* GetVTable */
jpayne@68 33040 static void* __Pyx_GetVtable(PyTypeObject *type) {
jpayne@68 33041 void* ptr;
jpayne@68 33042 #if CYTHON_COMPILING_IN_LIMITED_API
jpayne@68 33043 PyObject *ob = PyObject_GetAttr((PyObject *)type, __pyx_n_s_pyx_vtable);
jpayne@68 33044 #else
jpayne@68 33045 PyObject *ob = PyObject_GetItem(type->tp_dict, __pyx_n_s_pyx_vtable);
jpayne@68 33046 #endif
jpayne@68 33047 if (!ob)
jpayne@68 33048 goto bad;
jpayne@68 33049 ptr = PyCapsule_GetPointer(ob, 0);
jpayne@68 33050 if (!ptr && !PyErr_Occurred())
jpayne@68 33051 PyErr_SetString(PyExc_RuntimeError, "invalid vtable found for imported type");
jpayne@68 33052 Py_DECREF(ob);
jpayne@68 33053 return ptr;
jpayne@68 33054 bad:
jpayne@68 33055 Py_XDECREF(ob);
jpayne@68 33056 return NULL;
jpayne@68 33057 }
jpayne@68 33058
jpayne@68 33059 /* MergeVTables */
jpayne@68 33060 #if !CYTHON_COMPILING_IN_LIMITED_API
jpayne@68 33061 static int __Pyx_MergeVtables(PyTypeObject *type) {
jpayne@68 33062 int i;
jpayne@68 33063 void** base_vtables;
jpayne@68 33064 __Pyx_TypeName tp_base_name;
jpayne@68 33065 __Pyx_TypeName base_name;
jpayne@68 33066 void* unknown = (void*)-1;
jpayne@68 33067 PyObject* bases = type->tp_bases;
jpayne@68 33068 int base_depth = 0;
jpayne@68 33069 {
jpayne@68 33070 PyTypeObject* base = type->tp_base;
jpayne@68 33071 while (base) {
jpayne@68 33072 base_depth += 1;
jpayne@68 33073 base = base->tp_base;
jpayne@68 33074 }
jpayne@68 33075 }
jpayne@68 33076 base_vtables = (void**) malloc(sizeof(void*) * (size_t)(base_depth + 1));
jpayne@68 33077 base_vtables[0] = unknown;
jpayne@68 33078 for (i = 1; i < PyTuple_GET_SIZE(bases); i++) {
jpayne@68 33079 void* base_vtable = __Pyx_GetVtable(((PyTypeObject*)PyTuple_GET_ITEM(bases, i)));
jpayne@68 33080 if (base_vtable != NULL) {
jpayne@68 33081 int j;
jpayne@68 33082 PyTypeObject* base = type->tp_base;
jpayne@68 33083 for (j = 0; j < base_depth; j++) {
jpayne@68 33084 if (base_vtables[j] == unknown) {
jpayne@68 33085 base_vtables[j] = __Pyx_GetVtable(base);
jpayne@68 33086 base_vtables[j + 1] = unknown;
jpayne@68 33087 }
jpayne@68 33088 if (base_vtables[j] == base_vtable) {
jpayne@68 33089 break;
jpayne@68 33090 } else if (base_vtables[j] == NULL) {
jpayne@68 33091 goto bad;
jpayne@68 33092 }
jpayne@68 33093 base = base->tp_base;
jpayne@68 33094 }
jpayne@68 33095 }
jpayne@68 33096 }
jpayne@68 33097 PyErr_Clear();
jpayne@68 33098 free(base_vtables);
jpayne@68 33099 return 0;
jpayne@68 33100 bad:
jpayne@68 33101 tp_base_name = __Pyx_PyType_GetName(type->tp_base);
jpayne@68 33102 base_name = __Pyx_PyType_GetName((PyTypeObject*)PyTuple_GET_ITEM(bases, i));
jpayne@68 33103 PyErr_Format(PyExc_TypeError,
jpayne@68 33104 "multiple bases have vtable conflict: '" __Pyx_FMT_TYPENAME "' and '" __Pyx_FMT_TYPENAME "'", tp_base_name, base_name);
jpayne@68 33105 __Pyx_DECREF_TypeName(tp_base_name);
jpayne@68 33106 __Pyx_DECREF_TypeName(base_name);
jpayne@68 33107 free(base_vtables);
jpayne@68 33108 return -1;
jpayne@68 33109 }
jpayne@68 33110 #endif
jpayne@68 33111
jpayne@68 33112 /* SetupReduce */
jpayne@68 33113 #if !CYTHON_COMPILING_IN_LIMITED_API
jpayne@68 33114 static int __Pyx_setup_reduce_is_named(PyObject* meth, PyObject* name) {
jpayne@68 33115 int ret;
jpayne@68 33116 PyObject *name_attr;
jpayne@68 33117 name_attr = __Pyx_PyObject_GetAttrStrNoError(meth, __pyx_n_s_name);
jpayne@68 33118 if (likely(name_attr)) {
jpayne@68 33119 ret = PyObject_RichCompareBool(name_attr, name, Py_EQ);
jpayne@68 33120 } else {
jpayne@68 33121 ret = -1;
jpayne@68 33122 }
jpayne@68 33123 if (unlikely(ret < 0)) {
jpayne@68 33124 PyErr_Clear();
jpayne@68 33125 ret = 0;
jpayne@68 33126 }
jpayne@68 33127 Py_XDECREF(name_attr);
jpayne@68 33128 return ret;
jpayne@68 33129 }
jpayne@68 33130 static int __Pyx_setup_reduce(PyObject* type_obj) {
jpayne@68 33131 int ret = 0;
jpayne@68 33132 PyObject *object_reduce = NULL;
jpayne@68 33133 PyObject *object_getstate = NULL;
jpayne@68 33134 PyObject *object_reduce_ex = NULL;
jpayne@68 33135 PyObject *reduce = NULL;
jpayne@68 33136 PyObject *reduce_ex = NULL;
jpayne@68 33137 PyObject *reduce_cython = NULL;
jpayne@68 33138 PyObject *setstate = NULL;
jpayne@68 33139 PyObject *setstate_cython = NULL;
jpayne@68 33140 PyObject *getstate = NULL;
jpayne@68 33141 #if CYTHON_USE_PYTYPE_LOOKUP
jpayne@68 33142 getstate = _PyType_Lookup((PyTypeObject*)type_obj, __pyx_n_s_getstate);
jpayne@68 33143 #else
jpayne@68 33144 getstate = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_getstate);
jpayne@68 33145 if (!getstate && PyErr_Occurred()) {
jpayne@68 33146 goto __PYX_BAD;
jpayne@68 33147 }
jpayne@68 33148 #endif
jpayne@68 33149 if (getstate) {
jpayne@68 33150 #if CYTHON_USE_PYTYPE_LOOKUP
jpayne@68 33151 object_getstate = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_getstate);
jpayne@68 33152 #else
jpayne@68 33153 object_getstate = __Pyx_PyObject_GetAttrStrNoError((PyObject*)&PyBaseObject_Type, __pyx_n_s_getstate);
jpayne@68 33154 if (!object_getstate && PyErr_Occurred()) {
jpayne@68 33155 goto __PYX_BAD;
jpayne@68 33156 }
jpayne@68 33157 #endif
jpayne@68 33158 if (object_getstate != getstate) {
jpayne@68 33159 goto __PYX_GOOD;
jpayne@68 33160 }
jpayne@68 33161 }
jpayne@68 33162 #if CYTHON_USE_PYTYPE_LOOKUP
jpayne@68 33163 object_reduce_ex = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD;
jpayne@68 33164 #else
jpayne@68 33165 object_reduce_ex = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD;
jpayne@68 33166 #endif
jpayne@68 33167 reduce_ex = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_ex); if (unlikely(!reduce_ex)) goto __PYX_BAD;
jpayne@68 33168 if (reduce_ex == object_reduce_ex) {
jpayne@68 33169 #if CYTHON_USE_PYTYPE_LOOKUP
jpayne@68 33170 object_reduce = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto __PYX_BAD;
jpayne@68 33171 #else
jpayne@68 33172 object_reduce = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto __PYX_BAD;
jpayne@68 33173 #endif
jpayne@68 33174 reduce = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce); if (unlikely(!reduce)) goto __PYX_BAD;
jpayne@68 33175 if (reduce == object_reduce || __Pyx_setup_reduce_is_named(reduce, __pyx_n_s_reduce_cython)) {
jpayne@68 33176 reduce_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_reduce_cython);
jpayne@68 33177 if (likely(reduce_cython)) {
jpayne@68 33178 ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce, reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
jpayne@68 33179 ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
jpayne@68 33180 } else if (reduce == object_reduce || PyErr_Occurred()) {
jpayne@68 33181 goto __PYX_BAD;
jpayne@68 33182 }
jpayne@68 33183 setstate = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_setstate);
jpayne@68 33184 if (!setstate) PyErr_Clear();
jpayne@68 33185 if (!setstate || __Pyx_setup_reduce_is_named(setstate, __pyx_n_s_setstate_cython)) {
jpayne@68 33186 setstate_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_setstate_cython);
jpayne@68 33187 if (likely(setstate_cython)) {
jpayne@68 33188 ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate, setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
jpayne@68 33189 ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
jpayne@68 33190 } else if (!setstate || PyErr_Occurred()) {
jpayne@68 33191 goto __PYX_BAD;
jpayne@68 33192 }
jpayne@68 33193 }
jpayne@68 33194 PyType_Modified((PyTypeObject*)type_obj);
jpayne@68 33195 }
jpayne@68 33196 }
jpayne@68 33197 goto __PYX_GOOD;
jpayne@68 33198 __PYX_BAD:
jpayne@68 33199 if (!PyErr_Occurred()) {
jpayne@68 33200 __Pyx_TypeName type_obj_name =
jpayne@68 33201 __Pyx_PyType_GetName((PyTypeObject*)type_obj);
jpayne@68 33202 PyErr_Format(PyExc_RuntimeError,
jpayne@68 33203 "Unable to initialize pickling for " __Pyx_FMT_TYPENAME, type_obj_name);
jpayne@68 33204 __Pyx_DECREF_TypeName(type_obj_name);
jpayne@68 33205 }
jpayne@68 33206 ret = -1;
jpayne@68 33207 __PYX_GOOD:
jpayne@68 33208 #if !CYTHON_USE_PYTYPE_LOOKUP
jpayne@68 33209 Py_XDECREF(object_reduce);
jpayne@68 33210 Py_XDECREF(object_reduce_ex);
jpayne@68 33211 Py_XDECREF(object_getstate);
jpayne@68 33212 Py_XDECREF(getstate);
jpayne@68 33213 #endif
jpayne@68 33214 Py_XDECREF(reduce);
jpayne@68 33215 Py_XDECREF(reduce_ex);
jpayne@68 33216 Py_XDECREF(reduce_cython);
jpayne@68 33217 Py_XDECREF(setstate);
jpayne@68 33218 Py_XDECREF(setstate_cython);
jpayne@68 33219 return ret;
jpayne@68 33220 }
jpayne@68 33221 #endif
jpayne@68 33222
jpayne@68 33223 /* TypeImport */
jpayne@68 33224 #ifndef __PYX_HAVE_RT_ImportType_3_0_11
jpayne@68 33225 #define __PYX_HAVE_RT_ImportType_3_0_11
jpayne@68 33226 static PyTypeObject *__Pyx_ImportType_3_0_11(PyObject *module, const char *module_name, const char *class_name,
jpayne@68 33227 size_t size, size_t alignment, enum __Pyx_ImportType_CheckSize_3_0_11 check_size)
jpayne@68 33228 {
jpayne@68 33229 PyObject *result = 0;
jpayne@68 33230 char warning[200];
jpayne@68 33231 Py_ssize_t basicsize;
jpayne@68 33232 Py_ssize_t itemsize;
jpayne@68 33233 #if CYTHON_COMPILING_IN_LIMITED_API
jpayne@68 33234 PyObject *py_basicsize;
jpayne@68 33235 PyObject *py_itemsize;
jpayne@68 33236 #endif
jpayne@68 33237 result = PyObject_GetAttrString(module, class_name);
jpayne@68 33238 if (!result)
jpayne@68 33239 goto bad;
jpayne@68 33240 if (!PyType_Check(result)) {
jpayne@68 33241 PyErr_Format(PyExc_TypeError,
jpayne@68 33242 "%.200s.%.200s is not a type object",
jpayne@68 33243 module_name, class_name);
jpayne@68 33244 goto bad;
jpayne@68 33245 }
jpayne@68 33246 #if !CYTHON_COMPILING_IN_LIMITED_API
jpayne@68 33247 basicsize = ((PyTypeObject *)result)->tp_basicsize;
jpayne@68 33248 itemsize = ((PyTypeObject *)result)->tp_itemsize;
jpayne@68 33249 #else
jpayne@68 33250 py_basicsize = PyObject_GetAttrString(result, "__basicsize__");
jpayne@68 33251 if (!py_basicsize)
jpayne@68 33252 goto bad;
jpayne@68 33253 basicsize = PyLong_AsSsize_t(py_basicsize);
jpayne@68 33254 Py_DECREF(py_basicsize);
jpayne@68 33255 py_basicsize = 0;
jpayne@68 33256 if (basicsize == (Py_ssize_t)-1 && PyErr_Occurred())
jpayne@68 33257 goto bad;
jpayne@68 33258 py_itemsize = PyObject_GetAttrString(result, "__itemsize__");
jpayne@68 33259 if (!py_itemsize)
jpayne@68 33260 goto bad;
jpayne@68 33261 itemsize = PyLong_AsSsize_t(py_itemsize);
jpayne@68 33262 Py_DECREF(py_itemsize);
jpayne@68 33263 py_itemsize = 0;
jpayne@68 33264 if (itemsize == (Py_ssize_t)-1 && PyErr_Occurred())
jpayne@68 33265 goto bad;
jpayne@68 33266 #endif
jpayne@68 33267 if (itemsize) {
jpayne@68 33268 if (size % alignment) {
jpayne@68 33269 alignment = size % alignment;
jpayne@68 33270 }
jpayne@68 33271 if (itemsize < (Py_ssize_t)alignment)
jpayne@68 33272 itemsize = (Py_ssize_t)alignment;
jpayne@68 33273 }
jpayne@68 33274 if ((size_t)(basicsize + itemsize) < size) {
jpayne@68 33275 PyErr_Format(PyExc_ValueError,
jpayne@68 33276 "%.200s.%.200s size changed, may indicate binary incompatibility. "
jpayne@68 33277 "Expected %zd from C header, got %zd from PyObject",
jpayne@68 33278 module_name, class_name, size, basicsize+itemsize);
jpayne@68 33279 goto bad;
jpayne@68 33280 }
jpayne@68 33281 if (check_size == __Pyx_ImportType_CheckSize_Error_3_0_11 &&
jpayne@68 33282 ((size_t)basicsize > size || (size_t)(basicsize + itemsize) < size)) {
jpayne@68 33283 PyErr_Format(PyExc_ValueError,
jpayne@68 33284 "%.200s.%.200s size changed, may indicate binary incompatibility. "
jpayne@68 33285 "Expected %zd from C header, got %zd-%zd from PyObject",
jpayne@68 33286 module_name, class_name, size, basicsize, basicsize+itemsize);
jpayne@68 33287 goto bad;
jpayne@68 33288 }
jpayne@68 33289 else if (check_size == __Pyx_ImportType_CheckSize_Warn_3_0_11 && (size_t)basicsize > size) {
jpayne@68 33290 PyOS_snprintf(warning, sizeof(warning),
jpayne@68 33291 "%s.%s size changed, may indicate binary incompatibility. "
jpayne@68 33292 "Expected %zd from C header, got %zd from PyObject",
jpayne@68 33293 module_name, class_name, size, basicsize);
jpayne@68 33294 if (PyErr_WarnEx(NULL, warning, 0) < 0) goto bad;
jpayne@68 33295 }
jpayne@68 33296 return (PyTypeObject *)result;
jpayne@68 33297 bad:
jpayne@68 33298 Py_XDECREF(result);
jpayne@68 33299 return NULL;
jpayne@68 33300 }
jpayne@68 33301 #endif
jpayne@68 33302
jpayne@68 33303 /* ImportDottedModule */
jpayne@68 33304 #if PY_MAJOR_VERSION >= 3
jpayne@68 33305 static PyObject *__Pyx__ImportDottedModule_Error(PyObject *name, PyObject *parts_tuple, Py_ssize_t count) {
jpayne@68 33306 PyObject *partial_name = NULL, *slice = NULL, *sep = NULL;
jpayne@68 33307 if (unlikely(PyErr_Occurred())) {
jpayne@68 33308 PyErr_Clear();
jpayne@68 33309 }
jpayne@68 33310 if (likely(PyTuple_GET_SIZE(parts_tuple) == count)) {
jpayne@68 33311 partial_name = name;
jpayne@68 33312 } else {
jpayne@68 33313 slice = PySequence_GetSlice(parts_tuple, 0, count);
jpayne@68 33314 if (unlikely(!slice))
jpayne@68 33315 goto bad;
jpayne@68 33316 sep = PyUnicode_FromStringAndSize(".", 1);
jpayne@68 33317 if (unlikely(!sep))
jpayne@68 33318 goto bad;
jpayne@68 33319 partial_name = PyUnicode_Join(sep, slice);
jpayne@68 33320 }
jpayne@68 33321 PyErr_Format(
jpayne@68 33322 #if PY_MAJOR_VERSION < 3
jpayne@68 33323 PyExc_ImportError,
jpayne@68 33324 "No module named '%s'", PyString_AS_STRING(partial_name));
jpayne@68 33325 #else
jpayne@68 33326 #if PY_VERSION_HEX >= 0x030600B1
jpayne@68 33327 PyExc_ModuleNotFoundError,
jpayne@68 33328 #else
jpayne@68 33329 PyExc_ImportError,
jpayne@68 33330 #endif
jpayne@68 33331 "No module named '%U'", partial_name);
jpayne@68 33332 #endif
jpayne@68 33333 bad:
jpayne@68 33334 Py_XDECREF(sep);
jpayne@68 33335 Py_XDECREF(slice);
jpayne@68 33336 Py_XDECREF(partial_name);
jpayne@68 33337 return NULL;
jpayne@68 33338 }
jpayne@68 33339 #endif
jpayne@68 33340 #if PY_MAJOR_VERSION >= 3
jpayne@68 33341 static PyObject *__Pyx__ImportDottedModule_Lookup(PyObject *name) {
jpayne@68 33342 PyObject *imported_module;
jpayne@68 33343 #if PY_VERSION_HEX < 0x030700A1 || (CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM < 0x07030400)
jpayne@68 33344 PyObject *modules = PyImport_GetModuleDict();
jpayne@68 33345 if (unlikely(!modules))
jpayne@68 33346 return NULL;
jpayne@68 33347 imported_module = __Pyx_PyDict_GetItemStr(modules, name);
jpayne@68 33348 Py_XINCREF(imported_module);
jpayne@68 33349 #else
jpayne@68 33350 imported_module = PyImport_GetModule(name);
jpayne@68 33351 #endif
jpayne@68 33352 return imported_module;
jpayne@68 33353 }
jpayne@68 33354 #endif
jpayne@68 33355 #if PY_MAJOR_VERSION >= 3
jpayne@68 33356 static PyObject *__Pyx_ImportDottedModule_WalkParts(PyObject *module, PyObject *name, PyObject *parts_tuple) {
jpayne@68 33357 Py_ssize_t i, nparts;
jpayne@68 33358 nparts = PyTuple_GET_SIZE(parts_tuple);
jpayne@68 33359 for (i=1; i < nparts && module; i++) {
jpayne@68 33360 PyObject *part, *submodule;
jpayne@68 33361 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
jpayne@68 33362 part = PyTuple_GET_ITEM(parts_tuple, i);
jpayne@68 33363 #else
jpayne@68 33364 part = PySequence_ITEM(parts_tuple, i);
jpayne@68 33365 #endif
jpayne@68 33366 submodule = __Pyx_PyObject_GetAttrStrNoError(module, part);
jpayne@68 33367 #if !(CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS)
jpayne@68 33368 Py_DECREF(part);
jpayne@68 33369 #endif
jpayne@68 33370 Py_DECREF(module);
jpayne@68 33371 module = submodule;
jpayne@68 33372 }
jpayne@68 33373 if (unlikely(!module)) {
jpayne@68 33374 return __Pyx__ImportDottedModule_Error(name, parts_tuple, i);
jpayne@68 33375 }
jpayne@68 33376 return module;
jpayne@68 33377 }
jpayne@68 33378 #endif
jpayne@68 33379 static PyObject *__Pyx__ImportDottedModule(PyObject *name, PyObject *parts_tuple) {
jpayne@68 33380 #if PY_MAJOR_VERSION < 3
jpayne@68 33381 PyObject *module, *from_list, *star = __pyx_n_s__62;
jpayne@68 33382 CYTHON_UNUSED_VAR(parts_tuple);
jpayne@68 33383 from_list = PyList_New(1);
jpayne@68 33384 if (unlikely(!from_list))
jpayne@68 33385 return NULL;
jpayne@68 33386 Py_INCREF(star);
jpayne@68 33387 PyList_SET_ITEM(from_list, 0, star);
jpayne@68 33388 module = __Pyx_Import(name, from_list, 0);
jpayne@68 33389 Py_DECREF(from_list);
jpayne@68 33390 return module;
jpayne@68 33391 #else
jpayne@68 33392 PyObject *imported_module;
jpayne@68 33393 PyObject *module = __Pyx_Import(name, NULL, 0);
jpayne@68 33394 if (!parts_tuple || unlikely(!module))
jpayne@68 33395 return module;
jpayne@68 33396 imported_module = __Pyx__ImportDottedModule_Lookup(name);
jpayne@68 33397 if (likely(imported_module)) {
jpayne@68 33398 Py_DECREF(module);
jpayne@68 33399 return imported_module;
jpayne@68 33400 }
jpayne@68 33401 PyErr_Clear();
jpayne@68 33402 return __Pyx_ImportDottedModule_WalkParts(module, name, parts_tuple);
jpayne@68 33403 #endif
jpayne@68 33404 }
jpayne@68 33405 static PyObject *__Pyx_ImportDottedModule(PyObject *name, PyObject *parts_tuple) {
jpayne@68 33406 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030400B1
jpayne@68 33407 PyObject *module = __Pyx__ImportDottedModule_Lookup(name);
jpayne@68 33408 if (likely(module)) {
jpayne@68 33409 PyObject *spec = __Pyx_PyObject_GetAttrStrNoError(module, __pyx_n_s_spec);
jpayne@68 33410 if (likely(spec)) {
jpayne@68 33411 PyObject *unsafe = __Pyx_PyObject_GetAttrStrNoError(spec, __pyx_n_s_initializing);
jpayne@68 33412 if (likely(!unsafe || !__Pyx_PyObject_IsTrue(unsafe))) {
jpayne@68 33413 Py_DECREF(spec);
jpayne@68 33414 spec = NULL;
jpayne@68 33415 }
jpayne@68 33416 Py_XDECREF(unsafe);
jpayne@68 33417 }
jpayne@68 33418 if (likely(!spec)) {
jpayne@68 33419 PyErr_Clear();
jpayne@68 33420 return module;
jpayne@68 33421 }
jpayne@68 33422 Py_DECREF(spec);
jpayne@68 33423 Py_DECREF(module);
jpayne@68 33424 } else if (PyErr_Occurred()) {
jpayne@68 33425 PyErr_Clear();
jpayne@68 33426 }
jpayne@68 33427 #endif
jpayne@68 33428 return __Pyx__ImportDottedModule(name, parts_tuple);
jpayne@68 33429 }
jpayne@68 33430
jpayne@68 33431 /* FetchSharedCythonModule */
jpayne@68 33432 static PyObject *__Pyx_FetchSharedCythonABIModule(void) {
jpayne@68 33433 return __Pyx_PyImport_AddModuleRef((char*) __PYX_ABI_MODULE_NAME);
jpayne@68 33434 }
jpayne@68 33435
jpayne@68 33436 /* FetchCommonType */
jpayne@68 33437 static int __Pyx_VerifyCachedType(PyObject *cached_type,
jpayne@68 33438 const char *name,
jpayne@68 33439 Py_ssize_t basicsize,
jpayne@68 33440 Py_ssize_t expected_basicsize) {
jpayne@68 33441 if (!PyType_Check(cached_type)) {
jpayne@68 33442 PyErr_Format(PyExc_TypeError,
jpayne@68 33443 "Shared Cython type %.200s is not a type object", name);
jpayne@68 33444 return -1;
jpayne@68 33445 }
jpayne@68 33446 if (basicsize != expected_basicsize) {
jpayne@68 33447 PyErr_Format(PyExc_TypeError,
jpayne@68 33448 "Shared Cython type %.200s has the wrong size, try recompiling",
jpayne@68 33449 name);
jpayne@68 33450 return -1;
jpayne@68 33451 }
jpayne@68 33452 return 0;
jpayne@68 33453 }
jpayne@68 33454 #if !CYTHON_USE_TYPE_SPECS
jpayne@68 33455 static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type) {
jpayne@68 33456 PyObject* abi_module;
jpayne@68 33457 const char* object_name;
jpayne@68 33458 PyTypeObject *cached_type = NULL;
jpayne@68 33459 abi_module = __Pyx_FetchSharedCythonABIModule();
jpayne@68 33460 if (!abi_module) return NULL;
jpayne@68 33461 object_name = strrchr(type->tp_name, '.');
jpayne@68 33462 object_name = object_name ? object_name+1 : type->tp_name;
jpayne@68 33463 cached_type = (PyTypeObject*) PyObject_GetAttrString(abi_module, object_name);
jpayne@68 33464 if (cached_type) {
jpayne@68 33465 if (__Pyx_VerifyCachedType(
jpayne@68 33466 (PyObject *)cached_type,
jpayne@68 33467 object_name,
jpayne@68 33468 cached_type->tp_basicsize,
jpayne@68 33469 type->tp_basicsize) < 0) {
jpayne@68 33470 goto bad;
jpayne@68 33471 }
jpayne@68 33472 goto done;
jpayne@68 33473 }
jpayne@68 33474 if (!PyErr_ExceptionMatches(PyExc_AttributeError)) goto bad;
jpayne@68 33475 PyErr_Clear();
jpayne@68 33476 if (PyType_Ready(type) < 0) goto bad;
jpayne@68 33477 if (PyObject_SetAttrString(abi_module, object_name, (PyObject *)type) < 0)
jpayne@68 33478 goto bad;
jpayne@68 33479 Py_INCREF(type);
jpayne@68 33480 cached_type = type;
jpayne@68 33481 done:
jpayne@68 33482 Py_DECREF(abi_module);
jpayne@68 33483 return cached_type;
jpayne@68 33484 bad:
jpayne@68 33485 Py_XDECREF(cached_type);
jpayne@68 33486 cached_type = NULL;
jpayne@68 33487 goto done;
jpayne@68 33488 }
jpayne@68 33489 #else
jpayne@68 33490 static PyTypeObject *__Pyx_FetchCommonTypeFromSpec(PyObject *module, PyType_Spec *spec, PyObject *bases) {
jpayne@68 33491 PyObject *abi_module, *cached_type = NULL;
jpayne@68 33492 const char* object_name = strrchr(spec->name, '.');
jpayne@68 33493 object_name = object_name ? object_name+1 : spec->name;
jpayne@68 33494 abi_module = __Pyx_FetchSharedCythonABIModule();
jpayne@68 33495 if (!abi_module) return NULL;
jpayne@68 33496 cached_type = PyObject_GetAttrString(abi_module, object_name);
jpayne@68 33497 if (cached_type) {
jpayne@68 33498 Py_ssize_t basicsize;
jpayne@68 33499 #if CYTHON_COMPILING_IN_LIMITED_API
jpayne@68 33500 PyObject *py_basicsize;
jpayne@68 33501 py_basicsize = PyObject_GetAttrString(cached_type, "__basicsize__");
jpayne@68 33502 if (unlikely(!py_basicsize)) goto bad;
jpayne@68 33503 basicsize = PyLong_AsSsize_t(py_basicsize);
jpayne@68 33504 Py_DECREF(py_basicsize);
jpayne@68 33505 py_basicsize = 0;
jpayne@68 33506 if (unlikely(basicsize == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad;
jpayne@68 33507 #else
jpayne@68 33508 basicsize = likely(PyType_Check(cached_type)) ? ((PyTypeObject*) cached_type)->tp_basicsize : -1;
jpayne@68 33509 #endif
jpayne@68 33510 if (__Pyx_VerifyCachedType(
jpayne@68 33511 cached_type,
jpayne@68 33512 object_name,
jpayne@68 33513 basicsize,
jpayne@68 33514 spec->basicsize) < 0) {
jpayne@68 33515 goto bad;
jpayne@68 33516 }
jpayne@68 33517 goto done;
jpayne@68 33518 }
jpayne@68 33519 if (!PyErr_ExceptionMatches(PyExc_AttributeError)) goto bad;
jpayne@68 33520 PyErr_Clear();
jpayne@68 33521 CYTHON_UNUSED_VAR(module);
jpayne@68 33522 cached_type = __Pyx_PyType_FromModuleAndSpec(abi_module, spec, bases);
jpayne@68 33523 if (unlikely(!cached_type)) goto bad;
jpayne@68 33524 if (unlikely(__Pyx_fix_up_extension_type_from_spec(spec, (PyTypeObject *) cached_type) < 0)) goto bad;
jpayne@68 33525 if (PyObject_SetAttrString(abi_module, object_name, cached_type) < 0) goto bad;
jpayne@68 33526 done:
jpayne@68 33527 Py_DECREF(abi_module);
jpayne@68 33528 assert(cached_type == NULL || PyType_Check(cached_type));
jpayne@68 33529 return (PyTypeObject *) cached_type;
jpayne@68 33530 bad:
jpayne@68 33531 Py_XDECREF(cached_type);
jpayne@68 33532 cached_type = NULL;
jpayne@68 33533 goto done;
jpayne@68 33534 }
jpayne@68 33535 #endif
jpayne@68 33536
jpayne@68 33537 /* PyVectorcallFastCallDict */
jpayne@68 33538 #if CYTHON_METH_FASTCALL
jpayne@68 33539 static PyObject *__Pyx_PyVectorcall_FastCallDict_kw(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw)
jpayne@68 33540 {
jpayne@68 33541 PyObject *res = NULL;
jpayne@68 33542 PyObject *kwnames;
jpayne@68 33543 PyObject **newargs;
jpayne@68 33544 PyObject **kwvalues;
jpayne@68 33545 Py_ssize_t i, pos;
jpayne@68 33546 size_t j;
jpayne@68 33547 PyObject *key, *value;
jpayne@68 33548 unsigned long keys_are_strings;
jpayne@68 33549 Py_ssize_t nkw = PyDict_GET_SIZE(kw);
jpayne@68 33550 newargs = (PyObject **)PyMem_Malloc((nargs + (size_t)nkw) * sizeof(args[0]));
jpayne@68 33551 if (unlikely(newargs == NULL)) {
jpayne@68 33552 PyErr_NoMemory();
jpayne@68 33553 return NULL;
jpayne@68 33554 }
jpayne@68 33555 for (j = 0; j < nargs; j++) newargs[j] = args[j];
jpayne@68 33556 kwnames = PyTuple_New(nkw);
jpayne@68 33557 if (unlikely(kwnames == NULL)) {
jpayne@68 33558 PyMem_Free(newargs);
jpayne@68 33559 return NULL;
jpayne@68 33560 }
jpayne@68 33561 kwvalues = newargs + nargs;
jpayne@68 33562 pos = i = 0;
jpayne@68 33563 keys_are_strings = Py_TPFLAGS_UNICODE_SUBCLASS;
jpayne@68 33564 while (PyDict_Next(kw, &pos, &key, &value)) {
jpayne@68 33565 keys_are_strings &= Py_TYPE(key)->tp_flags;
jpayne@68 33566 Py_INCREF(key);
jpayne@68 33567 Py_INCREF(value);
jpayne@68 33568 PyTuple_SET_ITEM(kwnames, i, key);
jpayne@68 33569 kwvalues[i] = value;
jpayne@68 33570 i++;
jpayne@68 33571 }
jpayne@68 33572 if (unlikely(!keys_are_strings)) {
jpayne@68 33573 PyErr_SetString(PyExc_TypeError, "keywords must be strings");
jpayne@68 33574 goto cleanup;
jpayne@68 33575 }
jpayne@68 33576 res = vc(func, newargs, nargs, kwnames);
jpayne@68 33577 cleanup:
jpayne@68 33578 Py_DECREF(kwnames);
jpayne@68 33579 for (i = 0; i < nkw; i++)
jpayne@68 33580 Py_DECREF(kwvalues[i]);
jpayne@68 33581 PyMem_Free(newargs);
jpayne@68 33582 return res;
jpayne@68 33583 }
jpayne@68 33584 static CYTHON_INLINE PyObject *__Pyx_PyVectorcall_FastCallDict(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw)
jpayne@68 33585 {
jpayne@68 33586 if (likely(kw == NULL) || PyDict_GET_SIZE(kw) == 0) {
jpayne@68 33587 return vc(func, args, nargs, NULL);
jpayne@68 33588 }
jpayne@68 33589 return __Pyx_PyVectorcall_FastCallDict_kw(func, vc, args, nargs, kw);
jpayne@68 33590 }
jpayne@68 33591 #endif
jpayne@68 33592
jpayne@68 33593 /* CythonFunctionShared */
jpayne@68 33594 #if CYTHON_COMPILING_IN_LIMITED_API
jpayne@68 33595 static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void *cfunc) {
jpayne@68 33596 if (__Pyx_CyFunction_Check(func)) {
jpayne@68 33597 return PyCFunction_GetFunction(((__pyx_CyFunctionObject*)func)->func) == (PyCFunction) cfunc;
jpayne@68 33598 } else if (PyCFunction_Check(func)) {
jpayne@68 33599 return PyCFunction_GetFunction(func) == (PyCFunction) cfunc;
jpayne@68 33600 }
jpayne@68 33601 return 0;
jpayne@68 33602 }
jpayne@68 33603 #else
jpayne@68 33604 static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void *cfunc) {
jpayne@68 33605 return __Pyx_CyOrPyCFunction_Check(func) && __Pyx_CyOrPyCFunction_GET_FUNCTION(func) == (PyCFunction) cfunc;
jpayne@68 33606 }
jpayne@68 33607 #endif
jpayne@68 33608 static CYTHON_INLINE void __Pyx__CyFunction_SetClassObj(__pyx_CyFunctionObject* f, PyObject* classobj) {
jpayne@68 33609 #if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API
jpayne@68 33610 __Pyx_Py_XDECREF_SET(
jpayne@68 33611 __Pyx_CyFunction_GetClassObj(f),
jpayne@68 33612 ((classobj) ? __Pyx_NewRef(classobj) : NULL));
jpayne@68 33613 #else
jpayne@68 33614 __Pyx_Py_XDECREF_SET(
jpayne@68 33615 ((PyCMethodObject *) (f))->mm_class,
jpayne@68 33616 (PyTypeObject*)((classobj) ? __Pyx_NewRef(classobj) : NULL));
jpayne@68 33617 #endif
jpayne@68 33618 }
jpayne@68 33619 static PyObject *
jpayne@68 33620 __Pyx_CyFunction_get_doc(__pyx_CyFunctionObject *op, void *closure)
jpayne@68 33621 {
jpayne@68 33622 CYTHON_UNUSED_VAR(closure);
jpayne@68 33623 if (unlikely(op->func_doc == NULL)) {
jpayne@68 33624 #if CYTHON_COMPILING_IN_LIMITED_API
jpayne@68 33625 op->func_doc = PyObject_GetAttrString(op->func, "__doc__");
jpayne@68 33626 if (unlikely(!op->func_doc)) return NULL;
jpayne@68 33627 #else
jpayne@68 33628 if (((PyCFunctionObject*)op)->m_ml->ml_doc) {
jpayne@68 33629 #if PY_MAJOR_VERSION >= 3
jpayne@68 33630 op->func_doc = PyUnicode_FromString(((PyCFunctionObject*)op)->m_ml->ml_doc);
jpayne@68 33631 #else
jpayne@68 33632 op->func_doc = PyString_FromString(((PyCFunctionObject*)op)->m_ml->ml_doc);
jpayne@68 33633 #endif
jpayne@68 33634 if (unlikely(op->func_doc == NULL))
jpayne@68 33635 return NULL;
jpayne@68 33636 } else {
jpayne@68 33637 Py_INCREF(Py_None);
jpayne@68 33638 return Py_None;
jpayne@68 33639 }
jpayne@68 33640 #endif
jpayne@68 33641 }
jpayne@68 33642 Py_INCREF(op->func_doc);
jpayne@68 33643 return op->func_doc;
jpayne@68 33644 }
jpayne@68 33645 static int
jpayne@68 33646 __Pyx_CyFunction_set_doc(__pyx_CyFunctionObject *op, PyObject *value, void *context)
jpayne@68 33647 {
jpayne@68 33648 CYTHON_UNUSED_VAR(context);
jpayne@68 33649 if (value == NULL) {
jpayne@68 33650 value = Py_None;
jpayne@68 33651 }
jpayne@68 33652 Py_INCREF(value);
jpayne@68 33653 __Pyx_Py_XDECREF_SET(op->func_doc, value);
jpayne@68 33654 return 0;
jpayne@68 33655 }
jpayne@68 33656 static PyObject *
jpayne@68 33657 __Pyx_CyFunction_get_name(__pyx_CyFunctionObject *op, void *context)
jpayne@68 33658 {
jpayne@68 33659 CYTHON_UNUSED_VAR(context);
jpayne@68 33660 if (unlikely(op->func_name == NULL)) {
jpayne@68 33661 #if CYTHON_COMPILING_IN_LIMITED_API
jpayne@68 33662 op->func_name = PyObject_GetAttrString(op->func, "__name__");
jpayne@68 33663 #elif PY_MAJOR_VERSION >= 3
jpayne@68 33664 op->func_name = PyUnicode_InternFromString(((PyCFunctionObject*)op)->m_ml->ml_name);
jpayne@68 33665 #else
jpayne@68 33666 op->func_name = PyString_InternFromString(((PyCFunctionObject*)op)->m_ml->ml_name);
jpayne@68 33667 #endif
jpayne@68 33668 if (unlikely(op->func_name == NULL))
jpayne@68 33669 return NULL;
jpayne@68 33670 }
jpayne@68 33671 Py_INCREF(op->func_name);
jpayne@68 33672 return op->func_name;
jpayne@68 33673 }
jpayne@68 33674 static int
jpayne@68 33675 __Pyx_CyFunction_set_name(__pyx_CyFunctionObject *op, PyObject *value, void *context)
jpayne@68 33676 {
jpayne@68 33677 CYTHON_UNUSED_VAR(context);
jpayne@68 33678 #if PY_MAJOR_VERSION >= 3
jpayne@68 33679 if (unlikely(value == NULL || !PyUnicode_Check(value)))
jpayne@68 33680 #else
jpayne@68 33681 if (unlikely(value == NULL || !PyString_Check(value)))
jpayne@68 33682 #endif
jpayne@68 33683 {
jpayne@68 33684 PyErr_SetString(PyExc_TypeError,
jpayne@68 33685 "__name__ must be set to a string object");
jpayne@68 33686 return -1;
jpayne@68 33687 }
jpayne@68 33688 Py_INCREF(value);
jpayne@68 33689 __Pyx_Py_XDECREF_SET(op->func_name, value);
jpayne@68 33690 return 0;
jpayne@68 33691 }
jpayne@68 33692 static PyObject *
jpayne@68 33693 __Pyx_CyFunction_get_qualname(__pyx_CyFunctionObject *op, void *context)
jpayne@68 33694 {
jpayne@68 33695 CYTHON_UNUSED_VAR(context);
jpayne@68 33696 Py_INCREF(op->func_qualname);
jpayne@68 33697 return op->func_qualname;
jpayne@68 33698 }
jpayne@68 33699 static int
jpayne@68 33700 __Pyx_CyFunction_set_qualname(__pyx_CyFunctionObject *op, PyObject *value, void *context)
jpayne@68 33701 {
jpayne@68 33702 CYTHON_UNUSED_VAR(context);
jpayne@68 33703 #if PY_MAJOR_VERSION >= 3
jpayne@68 33704 if (unlikely(value == NULL || !PyUnicode_Check(value)))
jpayne@68 33705 #else
jpayne@68 33706 if (unlikely(value == NULL || !PyString_Check(value)))
jpayne@68 33707 #endif
jpayne@68 33708 {
jpayne@68 33709 PyErr_SetString(PyExc_TypeError,
jpayne@68 33710 "__qualname__ must be set to a string object");
jpayne@68 33711 return -1;
jpayne@68 33712 }
jpayne@68 33713 Py_INCREF(value);
jpayne@68 33714 __Pyx_Py_XDECREF_SET(op->func_qualname, value);
jpayne@68 33715 return 0;
jpayne@68 33716 }
jpayne@68 33717 static PyObject *
jpayne@68 33718 __Pyx_CyFunction_get_dict(__pyx_CyFunctionObject *op, void *context)
jpayne@68 33719 {
jpayne@68 33720 CYTHON_UNUSED_VAR(context);
jpayne@68 33721 if (unlikely(op->func_dict == NULL)) {
jpayne@68 33722 op->func_dict = PyDict_New();
jpayne@68 33723 if (unlikely(op->func_dict == NULL))
jpayne@68 33724 return NULL;
jpayne@68 33725 }
jpayne@68 33726 Py_INCREF(op->func_dict);
jpayne@68 33727 return op->func_dict;
jpayne@68 33728 }
jpayne@68 33729 static int
jpayne@68 33730 __Pyx_CyFunction_set_dict(__pyx_CyFunctionObject *op, PyObject *value, void *context)
jpayne@68 33731 {
jpayne@68 33732 CYTHON_UNUSED_VAR(context);
jpayne@68 33733 if (unlikely(value == NULL)) {
jpayne@68 33734 PyErr_SetString(PyExc_TypeError,
jpayne@68 33735 "function's dictionary may not be deleted");
jpayne@68 33736 return -1;
jpayne@68 33737 }
jpayne@68 33738 if (unlikely(!PyDict_Check(value))) {
jpayne@68 33739 PyErr_SetString(PyExc_TypeError,
jpayne@68 33740 "setting function's dictionary to a non-dict");
jpayne@68 33741 return -1;
jpayne@68 33742 }
jpayne@68 33743 Py_INCREF(value);
jpayne@68 33744 __Pyx_Py_XDECREF_SET(op->func_dict, value);
jpayne@68 33745 return 0;
jpayne@68 33746 }
jpayne@68 33747 static PyObject *
jpayne@68 33748 __Pyx_CyFunction_get_globals(__pyx_CyFunctionObject *op, void *context)
jpayne@68 33749 {
jpayne@68 33750 CYTHON_UNUSED_VAR(context);
jpayne@68 33751 Py_INCREF(op->func_globals);
jpayne@68 33752 return op->func_globals;
jpayne@68 33753 }
jpayne@68 33754 static PyObject *
jpayne@68 33755 __Pyx_CyFunction_get_closure(__pyx_CyFunctionObject *op, void *context)
jpayne@68 33756 {
jpayne@68 33757 CYTHON_UNUSED_VAR(op);
jpayne@68 33758 CYTHON_UNUSED_VAR(context);
jpayne@68 33759 Py_INCREF(Py_None);
jpayne@68 33760 return Py_None;
jpayne@68 33761 }
jpayne@68 33762 static PyObject *
jpayne@68 33763 __Pyx_CyFunction_get_code(__pyx_CyFunctionObject *op, void *context)
jpayne@68 33764 {
jpayne@68 33765 PyObject* result = (op->func_code) ? op->func_code : Py_None;
jpayne@68 33766 CYTHON_UNUSED_VAR(context);
jpayne@68 33767 Py_INCREF(result);
jpayne@68 33768 return result;
jpayne@68 33769 }
jpayne@68 33770 static int
jpayne@68 33771 __Pyx_CyFunction_init_defaults(__pyx_CyFunctionObject *op) {
jpayne@68 33772 int result = 0;
jpayne@68 33773 PyObject *res = op->defaults_getter((PyObject *) op);
jpayne@68 33774 if (unlikely(!res))
jpayne@68 33775 return -1;
jpayne@68 33776 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
jpayne@68 33777 op->defaults_tuple = PyTuple_GET_ITEM(res, 0);
jpayne@68 33778 Py_INCREF(op->defaults_tuple);
jpayne@68 33779 op->defaults_kwdict = PyTuple_GET_ITEM(res, 1);
jpayne@68 33780 Py_INCREF(op->defaults_kwdict);
jpayne@68 33781 #else
jpayne@68 33782 op->defaults_tuple = __Pyx_PySequence_ITEM(res, 0);
jpayne@68 33783 if (unlikely(!op->defaults_tuple)) result = -1;
jpayne@68 33784 else {
jpayne@68 33785 op->defaults_kwdict = __Pyx_PySequence_ITEM(res, 1);
jpayne@68 33786 if (unlikely(!op->defaults_kwdict)) result = -1;
jpayne@68 33787 }
jpayne@68 33788 #endif
jpayne@68 33789 Py_DECREF(res);
jpayne@68 33790 return result;
jpayne@68 33791 }
jpayne@68 33792 static int
jpayne@68 33793 __Pyx_CyFunction_set_defaults(__pyx_CyFunctionObject *op, PyObject* value, void *context) {
jpayne@68 33794 CYTHON_UNUSED_VAR(context);
jpayne@68 33795 if (!value) {
jpayne@68 33796 value = Py_None;
jpayne@68 33797 } else if (unlikely(value != Py_None && !PyTuple_Check(value))) {
jpayne@68 33798 PyErr_SetString(PyExc_TypeError,
jpayne@68 33799 "__defaults__ must be set to a tuple object");
jpayne@68 33800 return -1;
jpayne@68 33801 }
jpayne@68 33802 PyErr_WarnEx(PyExc_RuntimeWarning, "changes to cyfunction.__defaults__ will not "
jpayne@68 33803 "currently affect the values used in function calls", 1);
jpayne@68 33804 Py_INCREF(value);
jpayne@68 33805 __Pyx_Py_XDECREF_SET(op->defaults_tuple, value);
jpayne@68 33806 return 0;
jpayne@68 33807 }
jpayne@68 33808 static PyObject *
jpayne@68 33809 __Pyx_CyFunction_get_defaults(__pyx_CyFunctionObject *op, void *context) {
jpayne@68 33810 PyObject* result = op->defaults_tuple;
jpayne@68 33811 CYTHON_UNUSED_VAR(context);
jpayne@68 33812 if (unlikely(!result)) {
jpayne@68 33813 if (op->defaults_getter) {
jpayne@68 33814 if (unlikely(__Pyx_CyFunction_init_defaults(op) < 0)) return NULL;
jpayne@68 33815 result = op->defaults_tuple;
jpayne@68 33816 } else {
jpayne@68 33817 result = Py_None;
jpayne@68 33818 }
jpayne@68 33819 }
jpayne@68 33820 Py_INCREF(result);
jpayne@68 33821 return result;
jpayne@68 33822 }
jpayne@68 33823 static int
jpayne@68 33824 __Pyx_CyFunction_set_kwdefaults(__pyx_CyFunctionObject *op, PyObject* value, void *context) {
jpayne@68 33825 CYTHON_UNUSED_VAR(context);
jpayne@68 33826 if (!value) {
jpayne@68 33827 value = Py_None;
jpayne@68 33828 } else if (unlikely(value != Py_None && !PyDict_Check(value))) {
jpayne@68 33829 PyErr_SetString(PyExc_TypeError,
jpayne@68 33830 "__kwdefaults__ must be set to a dict object");
jpayne@68 33831 return -1;
jpayne@68 33832 }
jpayne@68 33833 PyErr_WarnEx(PyExc_RuntimeWarning, "changes to cyfunction.__kwdefaults__ will not "
jpayne@68 33834 "currently affect the values used in function calls", 1);
jpayne@68 33835 Py_INCREF(value);
jpayne@68 33836 __Pyx_Py_XDECREF_SET(op->defaults_kwdict, value);
jpayne@68 33837 return 0;
jpayne@68 33838 }
jpayne@68 33839 static PyObject *
jpayne@68 33840 __Pyx_CyFunction_get_kwdefaults(__pyx_CyFunctionObject *op, void *context) {
jpayne@68 33841 PyObject* result = op->defaults_kwdict;
jpayne@68 33842 CYTHON_UNUSED_VAR(context);
jpayne@68 33843 if (unlikely(!result)) {
jpayne@68 33844 if (op->defaults_getter) {
jpayne@68 33845 if (unlikely(__Pyx_CyFunction_init_defaults(op) < 0)) return NULL;
jpayne@68 33846 result = op->defaults_kwdict;
jpayne@68 33847 } else {
jpayne@68 33848 result = Py_None;
jpayne@68 33849 }
jpayne@68 33850 }
jpayne@68 33851 Py_INCREF(result);
jpayne@68 33852 return result;
jpayne@68 33853 }
jpayne@68 33854 static int
jpayne@68 33855 __Pyx_CyFunction_set_annotations(__pyx_CyFunctionObject *op, PyObject* value, void *context) {
jpayne@68 33856 CYTHON_UNUSED_VAR(context);
jpayne@68 33857 if (!value || value == Py_None) {
jpayne@68 33858 value = NULL;
jpayne@68 33859 } else if (unlikely(!PyDict_Check(value))) {
jpayne@68 33860 PyErr_SetString(PyExc_TypeError,
jpayne@68 33861 "__annotations__ must be set to a dict object");
jpayne@68 33862 return -1;
jpayne@68 33863 }
jpayne@68 33864 Py_XINCREF(value);
jpayne@68 33865 __Pyx_Py_XDECREF_SET(op->func_annotations, value);
jpayne@68 33866 return 0;
jpayne@68 33867 }
jpayne@68 33868 static PyObject *
jpayne@68 33869 __Pyx_CyFunction_get_annotations(__pyx_CyFunctionObject *op, void *context) {
jpayne@68 33870 PyObject* result = op->func_annotations;
jpayne@68 33871 CYTHON_UNUSED_VAR(context);
jpayne@68 33872 if (unlikely(!result)) {
jpayne@68 33873 result = PyDict_New();
jpayne@68 33874 if (unlikely(!result)) return NULL;
jpayne@68 33875 op->func_annotations = result;
jpayne@68 33876 }
jpayne@68 33877 Py_INCREF(result);
jpayne@68 33878 return result;
jpayne@68 33879 }
jpayne@68 33880 static PyObject *
jpayne@68 33881 __Pyx_CyFunction_get_is_coroutine(__pyx_CyFunctionObject *op, void *context) {
jpayne@68 33882 int is_coroutine;
jpayne@68 33883 CYTHON_UNUSED_VAR(context);
jpayne@68 33884 if (op->func_is_coroutine) {
jpayne@68 33885 return __Pyx_NewRef(op->func_is_coroutine);
jpayne@68 33886 }
jpayne@68 33887 is_coroutine = op->flags & __Pyx_CYFUNCTION_COROUTINE;
jpayne@68 33888 #if PY_VERSION_HEX >= 0x03050000
jpayne@68 33889 if (is_coroutine) {
jpayne@68 33890 PyObject *module, *fromlist, *marker = __pyx_n_s_is_coroutine;
jpayne@68 33891 fromlist = PyList_New(1);
jpayne@68 33892 if (unlikely(!fromlist)) return NULL;
jpayne@68 33893 Py_INCREF(marker);
jpayne@68 33894 #if CYTHON_ASSUME_SAFE_MACROS
jpayne@68 33895 PyList_SET_ITEM(fromlist, 0, marker);
jpayne@68 33896 #else
jpayne@68 33897 if (unlikely(PyList_SetItem(fromlist, 0, marker) < 0)) {
jpayne@68 33898 Py_DECREF(marker);
jpayne@68 33899 Py_DECREF(fromlist);
jpayne@68 33900 return NULL;
jpayne@68 33901 }
jpayne@68 33902 #endif
jpayne@68 33903 module = PyImport_ImportModuleLevelObject(__pyx_n_s_asyncio_coroutines, NULL, NULL, fromlist, 0);
jpayne@68 33904 Py_DECREF(fromlist);
jpayne@68 33905 if (unlikely(!module)) goto ignore;
jpayne@68 33906 op->func_is_coroutine = __Pyx_PyObject_GetAttrStr(module, marker);
jpayne@68 33907 Py_DECREF(module);
jpayne@68 33908 if (likely(op->func_is_coroutine)) {
jpayne@68 33909 return __Pyx_NewRef(op->func_is_coroutine);
jpayne@68 33910 }
jpayne@68 33911 ignore:
jpayne@68 33912 PyErr_Clear();
jpayne@68 33913 }
jpayne@68 33914 #endif
jpayne@68 33915 op->func_is_coroutine = __Pyx_PyBool_FromLong(is_coroutine);
jpayne@68 33916 return __Pyx_NewRef(op->func_is_coroutine);
jpayne@68 33917 }
jpayne@68 33918 #if CYTHON_COMPILING_IN_LIMITED_API
jpayne@68 33919 static PyObject *
jpayne@68 33920 __Pyx_CyFunction_get_module(__pyx_CyFunctionObject *op, void *context) {
jpayne@68 33921 CYTHON_UNUSED_VAR(context);
jpayne@68 33922 return PyObject_GetAttrString(op->func, "__module__");
jpayne@68 33923 }
jpayne@68 33924 static int
jpayne@68 33925 __Pyx_CyFunction_set_module(__pyx_CyFunctionObject *op, PyObject* value, void *context) {
jpayne@68 33926 CYTHON_UNUSED_VAR(context);
jpayne@68 33927 return PyObject_SetAttrString(op->func, "__module__", value);
jpayne@68 33928 }
jpayne@68 33929 #endif
jpayne@68 33930 static PyGetSetDef __pyx_CyFunction_getsets[] = {
jpayne@68 33931 {(char *) "func_doc", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
jpayne@68 33932 {(char *) "__doc__", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
jpayne@68 33933 {(char *) "func_name", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0},
jpayne@68 33934 {(char *) "__name__", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0},
jpayne@68 33935 {(char *) "__qualname__", (getter)__Pyx_CyFunction_get_qualname, (setter)__Pyx_CyFunction_set_qualname, 0, 0},
jpayne@68 33936 {(char *) "func_dict", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0},
jpayne@68 33937 {(char *) "__dict__", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0},
jpayne@68 33938 {(char *) "func_globals", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0},
jpayne@68 33939 {(char *) "__globals__", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0},
jpayne@68 33940 {(char *) "func_closure", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0},
jpayne@68 33941 {(char *) "__closure__", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0},
jpayne@68 33942 {(char *) "func_code", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
jpayne@68 33943 {(char *) "__code__", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
jpayne@68 33944 {(char *) "func_defaults", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0},
jpayne@68 33945 {(char *) "__defaults__", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0},
jpayne@68 33946 {(char *) "__kwdefaults__", (getter)__Pyx_CyFunction_get_kwdefaults, (setter)__Pyx_CyFunction_set_kwdefaults, 0, 0},
jpayne@68 33947 {(char *) "__annotations__", (getter)__Pyx_CyFunction_get_annotations, (setter)__Pyx_CyFunction_set_annotations, 0, 0},
jpayne@68 33948 {(char *) "_is_coroutine", (getter)__Pyx_CyFunction_get_is_coroutine, 0, 0, 0},
jpayne@68 33949 #if CYTHON_COMPILING_IN_LIMITED_API
jpayne@68 33950 {"__module__", (getter)__Pyx_CyFunction_get_module, (setter)__Pyx_CyFunction_set_module, 0, 0},
jpayne@68 33951 #endif
jpayne@68 33952 {0, 0, 0, 0, 0}
jpayne@68 33953 };
jpayne@68 33954 static PyMemberDef __pyx_CyFunction_members[] = {
jpayne@68 33955 #if !CYTHON_COMPILING_IN_LIMITED_API
jpayne@68 33956 {(char *) "__module__", T_OBJECT, offsetof(PyCFunctionObject, m_module), 0, 0},
jpayne@68 33957 #endif
jpayne@68 33958 #if CYTHON_USE_TYPE_SPECS
jpayne@68 33959 {(char *) "__dictoffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_dict), READONLY, 0},
jpayne@68 33960 #if CYTHON_METH_FASTCALL
jpayne@68 33961 #if CYTHON_BACKPORT_VECTORCALL
jpayne@68 33962 {(char *) "__vectorcalloffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_vectorcall), READONLY, 0},
jpayne@68 33963 #else
jpayne@68 33964 #if !CYTHON_COMPILING_IN_LIMITED_API
jpayne@68 33965 {(char *) "__vectorcalloffset__", T_PYSSIZET, offsetof(PyCFunctionObject, vectorcall), READONLY, 0},
jpayne@68 33966 #endif
jpayne@68 33967 #endif
jpayne@68 33968 #endif
jpayne@68 33969 #if PY_VERSION_HEX < 0x030500A0 || CYTHON_COMPILING_IN_LIMITED_API
jpayne@68 33970 {(char *) "__weaklistoffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_weakreflist), READONLY, 0},
jpayne@68 33971 #else
jpayne@68 33972 {(char *) "__weaklistoffset__", T_PYSSIZET, offsetof(PyCFunctionObject, m_weakreflist), READONLY, 0},
jpayne@68 33973 #endif
jpayne@68 33974 #endif
jpayne@68 33975 {0, 0, 0, 0, 0}
jpayne@68 33976 };
jpayne@68 33977 static PyObject *
jpayne@68 33978 __Pyx_CyFunction_reduce(__pyx_CyFunctionObject *m, PyObject *args)
jpayne@68 33979 {
jpayne@68 33980 CYTHON_UNUSED_VAR(args);
jpayne@68 33981 #if PY_MAJOR_VERSION >= 3
jpayne@68 33982 Py_INCREF(m->func_qualname);
jpayne@68 33983 return m->func_qualname;
jpayne@68 33984 #else
jpayne@68 33985 return PyString_FromString(((PyCFunctionObject*)m)->m_ml->ml_name);
jpayne@68 33986 #endif
jpayne@68 33987 }
jpayne@68 33988 static PyMethodDef __pyx_CyFunction_methods[] = {
jpayne@68 33989 {"__reduce__", (PyCFunction)__Pyx_CyFunction_reduce, METH_VARARGS, 0},
jpayne@68 33990 {0, 0, 0, 0}
jpayne@68 33991 };
jpayne@68 33992 #if PY_VERSION_HEX < 0x030500A0 || CYTHON_COMPILING_IN_LIMITED_API
jpayne@68 33993 #define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func_weakreflist)
jpayne@68 33994 #else
jpayne@68 33995 #define __Pyx_CyFunction_weakreflist(cyfunc) (((PyCFunctionObject*)cyfunc)->m_weakreflist)
jpayne@68 33996 #endif
jpayne@68 33997 static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject *op, PyMethodDef *ml, int flags, PyObject* qualname,
jpayne@68 33998 PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) {
jpayne@68 33999 #if !CYTHON_COMPILING_IN_LIMITED_API
jpayne@68 34000 PyCFunctionObject *cf = (PyCFunctionObject*) op;
jpayne@68 34001 #endif
jpayne@68 34002 if (unlikely(op == NULL))
jpayne@68 34003 return NULL;
jpayne@68 34004 #if CYTHON_COMPILING_IN_LIMITED_API
jpayne@68 34005 op->func = PyCFunction_NewEx(ml, (PyObject*)op, module);
jpayne@68 34006 if (unlikely(!op->func)) return NULL;
jpayne@68 34007 #endif
jpayne@68 34008 op->flags = flags;
jpayne@68 34009 __Pyx_CyFunction_weakreflist(op) = NULL;
jpayne@68 34010 #if !CYTHON_COMPILING_IN_LIMITED_API
jpayne@68 34011 cf->m_ml = ml;
jpayne@68 34012 cf->m_self = (PyObject *) op;
jpayne@68 34013 #endif
jpayne@68 34014 Py_XINCREF(closure);
jpayne@68 34015 op->func_closure = closure;
jpayne@68 34016 #if !CYTHON_COMPILING_IN_LIMITED_API
jpayne@68 34017 Py_XINCREF(module);
jpayne@68 34018 cf->m_module = module;
jpayne@68 34019 #endif
jpayne@68 34020 op->func_dict = NULL;
jpayne@68 34021 op->func_name = NULL;
jpayne@68 34022 Py_INCREF(qualname);
jpayne@68 34023 op->func_qualname = qualname;
jpayne@68 34024 op->func_doc = NULL;
jpayne@68 34025 #if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API
jpayne@68 34026 op->func_classobj = NULL;
jpayne@68 34027 #else
jpayne@68 34028 ((PyCMethodObject*)op)->mm_class = NULL;
jpayne@68 34029 #endif
jpayne@68 34030 op->func_globals = globals;
jpayne@68 34031 Py_INCREF(op->func_globals);
jpayne@68 34032 Py_XINCREF(code);
jpayne@68 34033 op->func_code = code;
jpayne@68 34034 op->defaults_pyobjects = 0;
jpayne@68 34035 op->defaults_size = 0;
jpayne@68 34036 op->defaults = NULL;
jpayne@68 34037 op->defaults_tuple = NULL;
jpayne@68 34038 op->defaults_kwdict = NULL;
jpayne@68 34039 op->defaults_getter = NULL;
jpayne@68 34040 op->func_annotations = NULL;
jpayne@68 34041 op->func_is_coroutine = NULL;
jpayne@68 34042 #if CYTHON_METH_FASTCALL
jpayne@68 34043 switch (ml->ml_flags & (METH_VARARGS | METH_FASTCALL | METH_NOARGS | METH_O | METH_KEYWORDS | METH_METHOD)) {
jpayne@68 34044 case METH_NOARGS:
jpayne@68 34045 __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_NOARGS;
jpayne@68 34046 break;
jpayne@68 34047 case METH_O:
jpayne@68 34048 __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_O;
jpayne@68 34049 break;
jpayne@68 34050 case METH_METHOD | METH_FASTCALL | METH_KEYWORDS:
jpayne@68 34051 __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD;
jpayne@68 34052 break;
jpayne@68 34053 case METH_FASTCALL | METH_KEYWORDS:
jpayne@68 34054 __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS;
jpayne@68 34055 break;
jpayne@68 34056 case METH_VARARGS | METH_KEYWORDS:
jpayne@68 34057 __Pyx_CyFunction_func_vectorcall(op) = NULL;
jpayne@68 34058 break;
jpayne@68 34059 default:
jpayne@68 34060 PyErr_SetString(PyExc_SystemError, "Bad call flags for CyFunction");
jpayne@68 34061 Py_DECREF(op);
jpayne@68 34062 return NULL;
jpayne@68 34063 }
jpayne@68 34064 #endif
jpayne@68 34065 return (PyObject *) op;
jpayne@68 34066 }
jpayne@68 34067 static int
jpayne@68 34068 __Pyx_CyFunction_clear(__pyx_CyFunctionObject *m)
jpayne@68 34069 {
jpayne@68 34070 Py_CLEAR(m->func_closure);
jpayne@68 34071 #if CYTHON_COMPILING_IN_LIMITED_API
jpayne@68 34072 Py_CLEAR(m->func);
jpayne@68 34073 #else
jpayne@68 34074 Py_CLEAR(((PyCFunctionObject*)m)->m_module);
jpayne@68 34075 #endif
jpayne@68 34076 Py_CLEAR(m->func_dict);
jpayne@68 34077 Py_CLEAR(m->func_name);
jpayne@68 34078 Py_CLEAR(m->func_qualname);
jpayne@68 34079 Py_CLEAR(m->func_doc);
jpayne@68 34080 Py_CLEAR(m->func_globals);
jpayne@68 34081 Py_CLEAR(m->func_code);
jpayne@68 34082 #if !CYTHON_COMPILING_IN_LIMITED_API
jpayne@68 34083 #if PY_VERSION_HEX < 0x030900B1
jpayne@68 34084 Py_CLEAR(__Pyx_CyFunction_GetClassObj(m));
jpayne@68 34085 #else
jpayne@68 34086 {
jpayne@68 34087 PyObject *cls = (PyObject*) ((PyCMethodObject *) (m))->mm_class;
jpayne@68 34088 ((PyCMethodObject *) (m))->mm_class = NULL;
jpayne@68 34089 Py_XDECREF(cls);
jpayne@68 34090 }
jpayne@68 34091 #endif
jpayne@68 34092 #endif
jpayne@68 34093 Py_CLEAR(m->defaults_tuple);
jpayne@68 34094 Py_CLEAR(m->defaults_kwdict);
jpayne@68 34095 Py_CLEAR(m->func_annotations);
jpayne@68 34096 Py_CLEAR(m->func_is_coroutine);
jpayne@68 34097 if (m->defaults) {
jpayne@68 34098 PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m);
jpayne@68 34099 int i;
jpayne@68 34100 for (i = 0; i < m->defaults_pyobjects; i++)
jpayne@68 34101 Py_XDECREF(pydefaults[i]);
jpayne@68 34102 PyObject_Free(m->defaults);
jpayne@68 34103 m->defaults = NULL;
jpayne@68 34104 }
jpayne@68 34105 return 0;
jpayne@68 34106 }
jpayne@68 34107 static void __Pyx__CyFunction_dealloc(__pyx_CyFunctionObject *m)
jpayne@68 34108 {
jpayne@68 34109 if (__Pyx_CyFunction_weakreflist(m) != NULL)
jpayne@68 34110 PyObject_ClearWeakRefs((PyObject *) m);
jpayne@68 34111 __Pyx_CyFunction_clear(m);
jpayne@68 34112 __Pyx_PyHeapTypeObject_GC_Del(m);
jpayne@68 34113 }
jpayne@68 34114 static void __Pyx_CyFunction_dealloc(__pyx_CyFunctionObject *m)
jpayne@68 34115 {
jpayne@68 34116 PyObject_GC_UnTrack(m);
jpayne@68 34117 __Pyx__CyFunction_dealloc(m);
jpayne@68 34118 }
jpayne@68 34119 static int __Pyx_CyFunction_traverse(__pyx_CyFunctionObject *m, visitproc visit, void *arg)
jpayne@68 34120 {
jpayne@68 34121 Py_VISIT(m->func_closure);
jpayne@68 34122 #if CYTHON_COMPILING_IN_LIMITED_API
jpayne@68 34123 Py_VISIT(m->func);
jpayne@68 34124 #else
jpayne@68 34125 Py_VISIT(((PyCFunctionObject*)m)->m_module);
jpayne@68 34126 #endif
jpayne@68 34127 Py_VISIT(m->func_dict);
jpayne@68 34128 Py_VISIT(m->func_name);
jpayne@68 34129 Py_VISIT(m->func_qualname);
jpayne@68 34130 Py_VISIT(m->func_doc);
jpayne@68 34131 Py_VISIT(m->func_globals);
jpayne@68 34132 Py_VISIT(m->func_code);
jpayne@68 34133 #if !CYTHON_COMPILING_IN_LIMITED_API
jpayne@68 34134 Py_VISIT(__Pyx_CyFunction_GetClassObj(m));
jpayne@68 34135 #endif
jpayne@68 34136 Py_VISIT(m->defaults_tuple);
jpayne@68 34137 Py_VISIT(m->defaults_kwdict);
jpayne@68 34138 Py_VISIT(m->func_is_coroutine);
jpayne@68 34139 if (m->defaults) {
jpayne@68 34140 PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m);
jpayne@68 34141 int i;
jpayne@68 34142 for (i = 0; i < m->defaults_pyobjects; i++)
jpayne@68 34143 Py_VISIT(pydefaults[i]);
jpayne@68 34144 }
jpayne@68 34145 return 0;
jpayne@68 34146 }
jpayne@68 34147 static PyObject*
jpayne@68 34148 __Pyx_CyFunction_repr(__pyx_CyFunctionObject *op)
jpayne@68 34149 {
jpayne@68 34150 #if PY_MAJOR_VERSION >= 3
jpayne@68 34151 return PyUnicode_FromFormat("<cyfunction %U at %p>",
jpayne@68 34152 op->func_qualname, (void *)op);
jpayne@68 34153 #else
jpayne@68 34154 return PyString_FromFormat("<cyfunction %s at %p>",
jpayne@68 34155 PyString_AsString(op->func_qualname), (void *)op);
jpayne@68 34156 #endif
jpayne@68 34157 }
jpayne@68 34158 static PyObject * __Pyx_CyFunction_CallMethod(PyObject *func, PyObject *self, PyObject *arg, PyObject *kw) {
jpayne@68 34159 #if CYTHON_COMPILING_IN_LIMITED_API
jpayne@68 34160 PyObject *f = ((__pyx_CyFunctionObject*)func)->func;
jpayne@68 34161 PyObject *py_name = NULL;
jpayne@68 34162 PyCFunction meth;
jpayne@68 34163 int flags;
jpayne@68 34164 meth = PyCFunction_GetFunction(f);
jpayne@68 34165 if (unlikely(!meth)) return NULL;
jpayne@68 34166 flags = PyCFunction_GetFlags(f);
jpayne@68 34167 if (unlikely(flags < 0)) return NULL;
jpayne@68 34168 #else
jpayne@68 34169 PyCFunctionObject* f = (PyCFunctionObject*)func;
jpayne@68 34170 PyCFunction meth = f->m_ml->ml_meth;
jpayne@68 34171 int flags = f->m_ml->ml_flags;
jpayne@68 34172 #endif
jpayne@68 34173 Py_ssize_t size;
jpayne@68 34174 switch (flags & (METH_VARARGS | METH_KEYWORDS | METH_NOARGS | METH_O)) {
jpayne@68 34175 case METH_VARARGS:
jpayne@68 34176 if (likely(kw == NULL || PyDict_Size(kw) == 0))
jpayne@68 34177 return (*meth)(self, arg);
jpayne@68 34178 break;
jpayne@68 34179 case METH_VARARGS | METH_KEYWORDS:
jpayne@68 34180 return (*(PyCFunctionWithKeywords)(void*)meth)(self, arg, kw);
jpayne@68 34181 case METH_NOARGS:
jpayne@68 34182 if (likely(kw == NULL || PyDict_Size(kw) == 0)) {
jpayne@68 34183 #if CYTHON_ASSUME_SAFE_MACROS
jpayne@68 34184 size = PyTuple_GET_SIZE(arg);
jpayne@68 34185 #else
jpayne@68 34186 size = PyTuple_Size(arg);
jpayne@68 34187 if (unlikely(size < 0)) return NULL;
jpayne@68 34188 #endif
jpayne@68 34189 if (likely(size == 0))
jpayne@68 34190 return (*meth)(self, NULL);
jpayne@68 34191 #if CYTHON_COMPILING_IN_LIMITED_API
jpayne@68 34192 py_name = __Pyx_CyFunction_get_name((__pyx_CyFunctionObject*)func, NULL);
jpayne@68 34193 if (!py_name) return NULL;
jpayne@68 34194 PyErr_Format(PyExc_TypeError,
jpayne@68 34195 "%.200S() takes no arguments (%" CYTHON_FORMAT_SSIZE_T "d given)",
jpayne@68 34196 py_name, size);
jpayne@68 34197 Py_DECREF(py_name);
jpayne@68 34198 #else
jpayne@68 34199 PyErr_Format(PyExc_TypeError,
jpayne@68 34200 "%.200s() takes no arguments (%" CYTHON_FORMAT_SSIZE_T "d given)",
jpayne@68 34201 f->m_ml->ml_name, size);
jpayne@68 34202 #endif
jpayne@68 34203 return NULL;
jpayne@68 34204 }
jpayne@68 34205 break;
jpayne@68 34206 case METH_O:
jpayne@68 34207 if (likely(kw == NULL || PyDict_Size(kw) == 0)) {
jpayne@68 34208 #if CYTHON_ASSUME_SAFE_MACROS
jpayne@68 34209 size = PyTuple_GET_SIZE(arg);
jpayne@68 34210 #else
jpayne@68 34211 size = PyTuple_Size(arg);
jpayne@68 34212 if (unlikely(size < 0)) return NULL;
jpayne@68 34213 #endif
jpayne@68 34214 if (likely(size == 1)) {
jpayne@68 34215 PyObject *result, *arg0;
jpayne@68 34216 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
jpayne@68 34217 arg0 = PyTuple_GET_ITEM(arg, 0);
jpayne@68 34218 #else
jpayne@68 34219 arg0 = __Pyx_PySequence_ITEM(arg, 0); if (unlikely(!arg0)) return NULL;
jpayne@68 34220 #endif
jpayne@68 34221 result = (*meth)(self, arg0);
jpayne@68 34222 #if !(CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS)
jpayne@68 34223 Py_DECREF(arg0);
jpayne@68 34224 #endif
jpayne@68 34225 return result;
jpayne@68 34226 }
jpayne@68 34227 #if CYTHON_COMPILING_IN_LIMITED_API
jpayne@68 34228 py_name = __Pyx_CyFunction_get_name((__pyx_CyFunctionObject*)func, NULL);
jpayne@68 34229 if (!py_name) return NULL;
jpayne@68 34230 PyErr_Format(PyExc_TypeError,
jpayne@68 34231 "%.200S() takes exactly one argument (%" CYTHON_FORMAT_SSIZE_T "d given)",
jpayne@68 34232 py_name, size);
jpayne@68 34233 Py_DECREF(py_name);
jpayne@68 34234 #else
jpayne@68 34235 PyErr_Format(PyExc_TypeError,
jpayne@68 34236 "%.200s() takes exactly one argument (%" CYTHON_FORMAT_SSIZE_T "d given)",
jpayne@68 34237 f->m_ml->ml_name, size);
jpayne@68 34238 #endif
jpayne@68 34239 return NULL;
jpayne@68 34240 }
jpayne@68 34241 break;
jpayne@68 34242 default:
jpayne@68 34243 PyErr_SetString(PyExc_SystemError, "Bad call flags for CyFunction");
jpayne@68 34244 return NULL;
jpayne@68 34245 }
jpayne@68 34246 #if CYTHON_COMPILING_IN_LIMITED_API
jpayne@68 34247 py_name = __Pyx_CyFunction_get_name((__pyx_CyFunctionObject*)func, NULL);
jpayne@68 34248 if (!py_name) return NULL;
jpayne@68 34249 PyErr_Format(PyExc_TypeError, "%.200S() takes no keyword arguments",
jpayne@68 34250 py_name);
jpayne@68 34251 Py_DECREF(py_name);
jpayne@68 34252 #else
jpayne@68 34253 PyErr_Format(PyExc_TypeError, "%.200s() takes no keyword arguments",
jpayne@68 34254 f->m_ml->ml_name);
jpayne@68 34255 #endif
jpayne@68 34256 return NULL;
jpayne@68 34257 }
jpayne@68 34258 static CYTHON_INLINE PyObject *__Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) {
jpayne@68 34259 PyObject *self, *result;
jpayne@68 34260 #if CYTHON_COMPILING_IN_LIMITED_API
jpayne@68 34261 self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)func)->func);
jpayne@68 34262 if (unlikely(!self) && PyErr_Occurred()) return NULL;
jpayne@68 34263 #else
jpayne@68 34264 self = ((PyCFunctionObject*)func)->m_self;
jpayne@68 34265 #endif
jpayne@68 34266 result = __Pyx_CyFunction_CallMethod(func, self, arg, kw);
jpayne@68 34267 return result;
jpayne@68 34268 }
jpayne@68 34269 static PyObject *__Pyx_CyFunction_CallAsMethod(PyObject *func, PyObject *args, PyObject *kw) {
jpayne@68 34270 PyObject *result;
jpayne@68 34271 __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *) func;
jpayne@68 34272 #if CYTHON_METH_FASTCALL
jpayne@68 34273 __pyx_vectorcallfunc vc = __Pyx_CyFunction_func_vectorcall(cyfunc);
jpayne@68 34274 if (vc) {
jpayne@68 34275 #if CYTHON_ASSUME_SAFE_MACROS
jpayne@68 34276 return __Pyx_PyVectorcall_FastCallDict(func, vc, &PyTuple_GET_ITEM(args, 0), (size_t)PyTuple_GET_SIZE(args), kw);
jpayne@68 34277 #else
jpayne@68 34278 (void) &__Pyx_PyVectorcall_FastCallDict;
jpayne@68 34279 return PyVectorcall_Call(func, args, kw);
jpayne@68 34280 #endif
jpayne@68 34281 }
jpayne@68 34282 #endif
jpayne@68 34283 if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) {
jpayne@68 34284 Py_ssize_t argc;
jpayne@68 34285 PyObject *new_args;
jpayne@68 34286 PyObject *self;
jpayne@68 34287 #if CYTHON_ASSUME_SAFE_MACROS
jpayne@68 34288 argc = PyTuple_GET_SIZE(args);
jpayne@68 34289 #else
jpayne@68 34290 argc = PyTuple_Size(args);
jpayne@68 34291 if (unlikely(!argc) < 0) return NULL;
jpayne@68 34292 #endif
jpayne@68 34293 new_args = PyTuple_GetSlice(args, 1, argc);
jpayne@68 34294 if (unlikely(!new_args))
jpayne@68 34295 return NULL;
jpayne@68 34296 self = PyTuple_GetItem(args, 0);
jpayne@68 34297 if (unlikely(!self)) {
jpayne@68 34298 Py_DECREF(new_args);
jpayne@68 34299 #if PY_MAJOR_VERSION > 2
jpayne@68 34300 PyErr_Format(PyExc_TypeError,
jpayne@68 34301 "unbound method %.200S() needs an argument",
jpayne@68 34302 cyfunc->func_qualname);
jpayne@68 34303 #else
jpayne@68 34304 PyErr_SetString(PyExc_TypeError,
jpayne@68 34305 "unbound method needs an argument");
jpayne@68 34306 #endif
jpayne@68 34307 return NULL;
jpayne@68 34308 }
jpayne@68 34309 result = __Pyx_CyFunction_CallMethod(func, self, new_args, kw);
jpayne@68 34310 Py_DECREF(new_args);
jpayne@68 34311 } else {
jpayne@68 34312 result = __Pyx_CyFunction_Call(func, args, kw);
jpayne@68 34313 }
jpayne@68 34314 return result;
jpayne@68 34315 }
jpayne@68 34316 #if CYTHON_METH_FASTCALL
jpayne@68 34317 static CYTHON_INLINE int __Pyx_CyFunction_Vectorcall_CheckArgs(__pyx_CyFunctionObject *cyfunc, Py_ssize_t nargs, PyObject *kwnames)
jpayne@68 34318 {
jpayne@68 34319 int ret = 0;
jpayne@68 34320 if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) {
jpayne@68 34321 if (unlikely(nargs < 1)) {
jpayne@68 34322 PyErr_Format(PyExc_TypeError, "%.200s() needs an argument",
jpayne@68 34323 ((PyCFunctionObject*)cyfunc)->m_ml->ml_name);
jpayne@68 34324 return -1;
jpayne@68 34325 }
jpayne@68 34326 ret = 1;
jpayne@68 34327 }
jpayne@68 34328 if (unlikely(kwnames) && unlikely(PyTuple_GET_SIZE(kwnames))) {
jpayne@68 34329 PyErr_Format(PyExc_TypeError,
jpayne@68 34330 "%.200s() takes no keyword arguments", ((PyCFunctionObject*)cyfunc)->m_ml->ml_name);
jpayne@68 34331 return -1;
jpayne@68 34332 }
jpayne@68 34333 return ret;
jpayne@68 34334 }
jpayne@68 34335 static PyObject * __Pyx_CyFunction_Vectorcall_NOARGS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames)
jpayne@68 34336 {
jpayne@68 34337 __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func;
jpayne@68 34338 PyMethodDef* def = ((PyCFunctionObject*)cyfunc)->m_ml;
jpayne@68 34339 #if CYTHON_BACKPORT_VECTORCALL
jpayne@68 34340 Py_ssize_t nargs = (Py_ssize_t)nargsf;
jpayne@68 34341 #else
jpayne@68 34342 Py_ssize_t nargs = PyVectorcall_NARGS(nargsf);
jpayne@68 34343 #endif
jpayne@68 34344 PyObject *self;
jpayne@68 34345 switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, kwnames)) {
jpayne@68 34346 case 1:
jpayne@68 34347 self = args[0];
jpayne@68 34348 args += 1;
jpayne@68 34349 nargs -= 1;
jpayne@68 34350 break;
jpayne@68 34351 case 0:
jpayne@68 34352 self = ((PyCFunctionObject*)cyfunc)->m_self;
jpayne@68 34353 break;
jpayne@68 34354 default:
jpayne@68 34355 return NULL;
jpayne@68 34356 }
jpayne@68 34357 if (unlikely(nargs != 0)) {
jpayne@68 34358 PyErr_Format(PyExc_TypeError,
jpayne@68 34359 "%.200s() takes no arguments (%" CYTHON_FORMAT_SSIZE_T "d given)",
jpayne@68 34360 def->ml_name, nargs);
jpayne@68 34361 return NULL;
jpayne@68 34362 }
jpayne@68 34363 return def->ml_meth(self, NULL);
jpayne@68 34364 }
jpayne@68 34365 static PyObject * __Pyx_CyFunction_Vectorcall_O(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames)
jpayne@68 34366 {
jpayne@68 34367 __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func;
jpayne@68 34368 PyMethodDef* def = ((PyCFunctionObject*)cyfunc)->m_ml;
jpayne@68 34369 #if CYTHON_BACKPORT_VECTORCALL
jpayne@68 34370 Py_ssize_t nargs = (Py_ssize_t)nargsf;
jpayne@68 34371 #else
jpayne@68 34372 Py_ssize_t nargs = PyVectorcall_NARGS(nargsf);
jpayne@68 34373 #endif
jpayne@68 34374 PyObject *self;
jpayne@68 34375 switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, kwnames)) {
jpayne@68 34376 case 1:
jpayne@68 34377 self = args[0];
jpayne@68 34378 args += 1;
jpayne@68 34379 nargs -= 1;
jpayne@68 34380 break;
jpayne@68 34381 case 0:
jpayne@68 34382 self = ((PyCFunctionObject*)cyfunc)->m_self;
jpayne@68 34383 break;
jpayne@68 34384 default:
jpayne@68 34385 return NULL;
jpayne@68 34386 }
jpayne@68 34387 if (unlikely(nargs != 1)) {
jpayne@68 34388 PyErr_Format(PyExc_TypeError,
jpayne@68 34389 "%.200s() takes exactly one argument (%" CYTHON_FORMAT_SSIZE_T "d given)",
jpayne@68 34390 def->ml_name, nargs);
jpayne@68 34391 return NULL;
jpayne@68 34392 }
jpayne@68 34393 return def->ml_meth(self, args[0]);
jpayne@68 34394 }
jpayne@68 34395 static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames)
jpayne@68 34396 {
jpayne@68 34397 __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func;
jpayne@68 34398 PyMethodDef* def = ((PyCFunctionObject*)cyfunc)->m_ml;
jpayne@68 34399 #if CYTHON_BACKPORT_VECTORCALL
jpayne@68 34400 Py_ssize_t nargs = (Py_ssize_t)nargsf;
jpayne@68 34401 #else
jpayne@68 34402 Py_ssize_t nargs = PyVectorcall_NARGS(nargsf);
jpayne@68 34403 #endif
jpayne@68 34404 PyObject *self;
jpayne@68 34405 switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, NULL)) {
jpayne@68 34406 case 1:
jpayne@68 34407 self = args[0];
jpayne@68 34408 args += 1;
jpayne@68 34409 nargs -= 1;
jpayne@68 34410 break;
jpayne@68 34411 case 0:
jpayne@68 34412 self = ((PyCFunctionObject*)cyfunc)->m_self;
jpayne@68 34413 break;
jpayne@68 34414 default:
jpayne@68 34415 return NULL;
jpayne@68 34416 }
jpayne@68 34417 return ((__Pyx_PyCFunctionFastWithKeywords)(void(*)(void))def->ml_meth)(self, args, nargs, kwnames);
jpayne@68 34418 }
jpayne@68 34419 static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames)
jpayne@68 34420 {
jpayne@68 34421 __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func;
jpayne@68 34422 PyMethodDef* def = ((PyCFunctionObject*)cyfunc)->m_ml;
jpayne@68 34423 PyTypeObject *cls = (PyTypeObject *) __Pyx_CyFunction_GetClassObj(cyfunc);
jpayne@68 34424 #if CYTHON_BACKPORT_VECTORCALL
jpayne@68 34425 Py_ssize_t nargs = (Py_ssize_t)nargsf;
jpayne@68 34426 #else
jpayne@68 34427 Py_ssize_t nargs = PyVectorcall_NARGS(nargsf);
jpayne@68 34428 #endif
jpayne@68 34429 PyObject *self;
jpayne@68 34430 switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, NULL)) {
jpayne@68 34431 case 1:
jpayne@68 34432 self = args[0];
jpayne@68 34433 args += 1;
jpayne@68 34434 nargs -= 1;
jpayne@68 34435 break;
jpayne@68 34436 case 0:
jpayne@68 34437 self = ((PyCFunctionObject*)cyfunc)->m_self;
jpayne@68 34438 break;
jpayne@68 34439 default:
jpayne@68 34440 return NULL;
jpayne@68 34441 }
jpayne@68 34442 return ((__Pyx_PyCMethod)(void(*)(void))def->ml_meth)(self, cls, args, (size_t)nargs, kwnames);
jpayne@68 34443 }
jpayne@68 34444 #endif
jpayne@68 34445 #if CYTHON_USE_TYPE_SPECS
jpayne@68 34446 static PyType_Slot __pyx_CyFunctionType_slots[] = {
jpayne@68 34447 {Py_tp_dealloc, (void *)__Pyx_CyFunction_dealloc},
jpayne@68 34448 {Py_tp_repr, (void *)__Pyx_CyFunction_repr},
jpayne@68 34449 {Py_tp_call, (void *)__Pyx_CyFunction_CallAsMethod},
jpayne@68 34450 {Py_tp_traverse, (void *)__Pyx_CyFunction_traverse},
jpayne@68 34451 {Py_tp_clear, (void *)__Pyx_CyFunction_clear},
jpayne@68 34452 {Py_tp_methods, (void *)__pyx_CyFunction_methods},
jpayne@68 34453 {Py_tp_members, (void *)__pyx_CyFunction_members},
jpayne@68 34454 {Py_tp_getset, (void *)__pyx_CyFunction_getsets},
jpayne@68 34455 {Py_tp_descr_get, (void *)__Pyx_PyMethod_New},
jpayne@68 34456 {0, 0},
jpayne@68 34457 };
jpayne@68 34458 static PyType_Spec __pyx_CyFunctionType_spec = {
jpayne@68 34459 __PYX_TYPE_MODULE_PREFIX "cython_function_or_method",
jpayne@68 34460 sizeof(__pyx_CyFunctionObject),
jpayne@68 34461 0,
jpayne@68 34462 #ifdef Py_TPFLAGS_METHOD_DESCRIPTOR
jpayne@68 34463 Py_TPFLAGS_METHOD_DESCRIPTOR |
jpayne@68 34464 #endif
jpayne@68 34465 #if (defined(_Py_TPFLAGS_HAVE_VECTORCALL) && CYTHON_METH_FASTCALL)
jpayne@68 34466 _Py_TPFLAGS_HAVE_VECTORCALL |
jpayne@68 34467 #endif
jpayne@68 34468 Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_BASETYPE,
jpayne@68 34469 __pyx_CyFunctionType_slots
jpayne@68 34470 };
jpayne@68 34471 #else
jpayne@68 34472 static PyTypeObject __pyx_CyFunctionType_type = {
jpayne@68 34473 PyVarObject_HEAD_INIT(0, 0)
jpayne@68 34474 __PYX_TYPE_MODULE_PREFIX "cython_function_or_method",
jpayne@68 34475 sizeof(__pyx_CyFunctionObject),
jpayne@68 34476 0,
jpayne@68 34477 (destructor) __Pyx_CyFunction_dealloc,
jpayne@68 34478 #if !CYTHON_METH_FASTCALL
jpayne@68 34479 0,
jpayne@68 34480 #elif CYTHON_BACKPORT_VECTORCALL
jpayne@68 34481 (printfunc)offsetof(__pyx_CyFunctionObject, func_vectorcall),
jpayne@68 34482 #else
jpayne@68 34483 offsetof(PyCFunctionObject, vectorcall),
jpayne@68 34484 #endif
jpayne@68 34485 0,
jpayne@68 34486 0,
jpayne@68 34487 #if PY_MAJOR_VERSION < 3
jpayne@68 34488 0,
jpayne@68 34489 #else
jpayne@68 34490 0,
jpayne@68 34491 #endif
jpayne@68 34492 (reprfunc) __Pyx_CyFunction_repr,
jpayne@68 34493 0,
jpayne@68 34494 0,
jpayne@68 34495 0,
jpayne@68 34496 0,
jpayne@68 34497 __Pyx_CyFunction_CallAsMethod,
jpayne@68 34498 0,
jpayne@68 34499 0,
jpayne@68 34500 0,
jpayne@68 34501 0,
jpayne@68 34502 #ifdef Py_TPFLAGS_METHOD_DESCRIPTOR
jpayne@68 34503 Py_TPFLAGS_METHOD_DESCRIPTOR |
jpayne@68 34504 #endif
jpayne@68 34505 #if defined(_Py_TPFLAGS_HAVE_VECTORCALL) && CYTHON_METH_FASTCALL
jpayne@68 34506 _Py_TPFLAGS_HAVE_VECTORCALL |
jpayne@68 34507 #endif
jpayne@68 34508 Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_BASETYPE,
jpayne@68 34509 0,
jpayne@68 34510 (traverseproc) __Pyx_CyFunction_traverse,
jpayne@68 34511 (inquiry) __Pyx_CyFunction_clear,
jpayne@68 34512 0,
jpayne@68 34513 #if PY_VERSION_HEX < 0x030500A0
jpayne@68 34514 offsetof(__pyx_CyFunctionObject, func_weakreflist),
jpayne@68 34515 #else
jpayne@68 34516 offsetof(PyCFunctionObject, m_weakreflist),
jpayne@68 34517 #endif
jpayne@68 34518 0,
jpayne@68 34519 0,
jpayne@68 34520 __pyx_CyFunction_methods,
jpayne@68 34521 __pyx_CyFunction_members,
jpayne@68 34522 __pyx_CyFunction_getsets,
jpayne@68 34523 0,
jpayne@68 34524 0,
jpayne@68 34525 __Pyx_PyMethod_New,
jpayne@68 34526 0,
jpayne@68 34527 offsetof(__pyx_CyFunctionObject, func_dict),
jpayne@68 34528 0,
jpayne@68 34529 0,
jpayne@68 34530 0,
jpayne@68 34531 0,
jpayne@68 34532 0,
jpayne@68 34533 0,
jpayne@68 34534 0,
jpayne@68 34535 0,
jpayne@68 34536 0,
jpayne@68 34537 0,
jpayne@68 34538 0,
jpayne@68 34539 0,
jpayne@68 34540 #if PY_VERSION_HEX >= 0x030400a1
jpayne@68 34541 0,
jpayne@68 34542 #endif
jpayne@68 34543 #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
jpayne@68 34544 0,
jpayne@68 34545 #endif
jpayne@68 34546 #if __PYX_NEED_TP_PRINT_SLOT
jpayne@68 34547 0,
jpayne@68 34548 #endif
jpayne@68 34549 #if PY_VERSION_HEX >= 0x030C0000
jpayne@68 34550 0,
jpayne@68 34551 #endif
jpayne@68 34552 #if PY_VERSION_HEX >= 0x030d00A4
jpayne@68 34553 0,
jpayne@68 34554 #endif
jpayne@68 34555 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
jpayne@68 34556 0,
jpayne@68 34557 #endif
jpayne@68 34558 };
jpayne@68 34559 #endif
jpayne@68 34560 static int __pyx_CyFunction_init(PyObject *module) {
jpayne@68 34561 #if CYTHON_USE_TYPE_SPECS
jpayne@68 34562 __pyx_CyFunctionType = __Pyx_FetchCommonTypeFromSpec(module, &__pyx_CyFunctionType_spec, NULL);
jpayne@68 34563 #else
jpayne@68 34564 CYTHON_UNUSED_VAR(module);
jpayne@68 34565 __pyx_CyFunctionType = __Pyx_FetchCommonType(&__pyx_CyFunctionType_type);
jpayne@68 34566 #endif
jpayne@68 34567 if (unlikely(__pyx_CyFunctionType == NULL)) {
jpayne@68 34568 return -1;
jpayne@68 34569 }
jpayne@68 34570 return 0;
jpayne@68 34571 }
jpayne@68 34572 static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *func, size_t size, int pyobjects) {
jpayne@68 34573 __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
jpayne@68 34574 m->defaults = PyObject_Malloc(size);
jpayne@68 34575 if (unlikely(!m->defaults))
jpayne@68 34576 return PyErr_NoMemory();
jpayne@68 34577 memset(m->defaults, 0, size);
jpayne@68 34578 m->defaults_pyobjects = pyobjects;
jpayne@68 34579 m->defaults_size = size;
jpayne@68 34580 return m->defaults;
jpayne@68 34581 }
jpayne@68 34582 static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *func, PyObject *tuple) {
jpayne@68 34583 __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
jpayne@68 34584 m->defaults_tuple = tuple;
jpayne@68 34585 Py_INCREF(tuple);
jpayne@68 34586 }
jpayne@68 34587 static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *func, PyObject *dict) {
jpayne@68 34588 __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
jpayne@68 34589 m->defaults_kwdict = dict;
jpayne@68 34590 Py_INCREF(dict);
jpayne@68 34591 }
jpayne@68 34592 static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *func, PyObject *dict) {
jpayne@68 34593 __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
jpayne@68 34594 m->func_annotations = dict;
jpayne@68 34595 Py_INCREF(dict);
jpayne@68 34596 }
jpayne@68 34597
jpayne@68 34598 /* CythonFunction */
jpayne@68 34599 static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml, int flags, PyObject* qualname,
jpayne@68 34600 PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) {
jpayne@68 34601 PyObject *op = __Pyx_CyFunction_Init(
jpayne@68 34602 PyObject_GC_New(__pyx_CyFunctionObject, __pyx_CyFunctionType),
jpayne@68 34603 ml, flags, qualname, closure, module, globals, code
jpayne@68 34604 );
jpayne@68 34605 if (likely(op)) {
jpayne@68 34606 PyObject_GC_Track(op);
jpayne@68 34607 }
jpayne@68 34608 return op;
jpayne@68 34609 }
jpayne@68 34610
jpayne@68 34611 /* CalculateMetaclass */
jpayne@68 34612 static PyObject *__Pyx_CalculateMetaclass(PyTypeObject *metaclass, PyObject *bases) {
jpayne@68 34613 Py_ssize_t i, nbases;
jpayne@68 34614 #if CYTHON_ASSUME_SAFE_MACROS
jpayne@68 34615 nbases = PyTuple_GET_SIZE(bases);
jpayne@68 34616 #else
jpayne@68 34617 nbases = PyTuple_Size(bases);
jpayne@68 34618 if (nbases < 0) return NULL;
jpayne@68 34619 #endif
jpayne@68 34620 for (i=0; i < nbases; i++) {
jpayne@68 34621 PyTypeObject *tmptype;
jpayne@68 34622 #if CYTHON_ASSUME_SAFE_MACROS
jpayne@68 34623 PyObject *tmp = PyTuple_GET_ITEM(bases, i);
jpayne@68 34624 #else
jpayne@68 34625 PyObject *tmp = PyTuple_GetItem(bases, i);
jpayne@68 34626 if (!tmp) return NULL;
jpayne@68 34627 #endif
jpayne@68 34628 tmptype = Py_TYPE(tmp);
jpayne@68 34629 #if PY_MAJOR_VERSION < 3
jpayne@68 34630 if (tmptype == &PyClass_Type)
jpayne@68 34631 continue;
jpayne@68 34632 #endif
jpayne@68 34633 if (!metaclass) {
jpayne@68 34634 metaclass = tmptype;
jpayne@68 34635 continue;
jpayne@68 34636 }
jpayne@68 34637 if (PyType_IsSubtype(metaclass, tmptype))
jpayne@68 34638 continue;
jpayne@68 34639 if (PyType_IsSubtype(tmptype, metaclass)) {
jpayne@68 34640 metaclass = tmptype;
jpayne@68 34641 continue;
jpayne@68 34642 }
jpayne@68 34643 PyErr_SetString(PyExc_TypeError,
jpayne@68 34644 "metaclass conflict: "
jpayne@68 34645 "the metaclass of a derived class "
jpayne@68 34646 "must be a (non-strict) subclass "
jpayne@68 34647 "of the metaclasses of all its bases");
jpayne@68 34648 return NULL;
jpayne@68 34649 }
jpayne@68 34650 if (!metaclass) {
jpayne@68 34651 #if PY_MAJOR_VERSION < 3
jpayne@68 34652 metaclass = &PyClass_Type;
jpayne@68 34653 #else
jpayne@68 34654 metaclass = &PyType_Type;
jpayne@68 34655 #endif
jpayne@68 34656 }
jpayne@68 34657 Py_INCREF((PyObject*) metaclass);
jpayne@68 34658 return (PyObject*) metaclass;
jpayne@68 34659 }
jpayne@68 34660
jpayne@68 34661 /* PyObjectCall2Args */
jpayne@68 34662 static CYTHON_INLINE PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2) {
jpayne@68 34663 PyObject *args[3] = {NULL, arg1, arg2};
jpayne@68 34664 return __Pyx_PyObject_FastCall(function, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET);
jpayne@68 34665 }
jpayne@68 34666
jpayne@68 34667 /* PyObjectLookupSpecial */
jpayne@68 34668 #if CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
jpayne@68 34669 static CYTHON_INLINE PyObject* __Pyx__PyObject_LookupSpecial(PyObject* obj, PyObject* attr_name, int with_error) {
jpayne@68 34670 PyObject *res;
jpayne@68 34671 PyTypeObject *tp = Py_TYPE(obj);
jpayne@68 34672 #if PY_MAJOR_VERSION < 3
jpayne@68 34673 if (unlikely(PyInstance_Check(obj)))
jpayne@68 34674 return with_error ? __Pyx_PyObject_GetAttrStr(obj, attr_name) : __Pyx_PyObject_GetAttrStrNoError(obj, attr_name);
jpayne@68 34675 #endif
jpayne@68 34676 res = _PyType_Lookup(tp, attr_name);
jpayne@68 34677 if (likely(res)) {
jpayne@68 34678 descrgetfunc f = Py_TYPE(res)->tp_descr_get;
jpayne@68 34679 if (!f) {
jpayne@68 34680 Py_INCREF(res);
jpayne@68 34681 } else {
jpayne@68 34682 res = f(res, obj, (PyObject *)tp);
jpayne@68 34683 }
jpayne@68 34684 } else if (with_error) {
jpayne@68 34685 PyErr_SetObject(PyExc_AttributeError, attr_name);
jpayne@68 34686 }
jpayne@68 34687 return res;
jpayne@68 34688 }
jpayne@68 34689 #endif
jpayne@68 34690
jpayne@68 34691 /* Py3ClassCreate */
jpayne@68 34692 static PyObject *__Pyx_Py3MetaclassPrepare(PyObject *metaclass, PyObject *bases, PyObject *name,
jpayne@68 34693 PyObject *qualname, PyObject *mkw, PyObject *modname, PyObject *doc) {
jpayne@68 34694 PyObject *ns;
jpayne@68 34695 if (metaclass) {
jpayne@68 34696 PyObject *prep = __Pyx_PyObject_GetAttrStrNoError(metaclass, __pyx_n_s_prepare);
jpayne@68 34697 if (prep) {
jpayne@68 34698 PyObject *pargs[3] = {NULL, name, bases};
jpayne@68 34699 ns = __Pyx_PyObject_FastCallDict(prep, pargs+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET, mkw);
jpayne@68 34700 Py_DECREF(prep);
jpayne@68 34701 } else {
jpayne@68 34702 if (unlikely(PyErr_Occurred()))
jpayne@68 34703 return NULL;
jpayne@68 34704 ns = PyDict_New();
jpayne@68 34705 }
jpayne@68 34706 } else {
jpayne@68 34707 ns = PyDict_New();
jpayne@68 34708 }
jpayne@68 34709 if (unlikely(!ns))
jpayne@68 34710 return NULL;
jpayne@68 34711 if (unlikely(PyObject_SetItem(ns, __pyx_n_s_module, modname) < 0)) goto bad;
jpayne@68 34712 #if PY_VERSION_HEX >= 0x03030000
jpayne@68 34713 if (unlikely(PyObject_SetItem(ns, __pyx_n_s_qualname, qualname) < 0)) goto bad;
jpayne@68 34714 #else
jpayne@68 34715 CYTHON_MAYBE_UNUSED_VAR(qualname);
jpayne@68 34716 #endif
jpayne@68 34717 if (unlikely(doc && PyObject_SetItem(ns, __pyx_n_s_doc, doc) < 0)) goto bad;
jpayne@68 34718 return ns;
jpayne@68 34719 bad:
jpayne@68 34720 Py_DECREF(ns);
jpayne@68 34721 return NULL;
jpayne@68 34722 }
jpayne@68 34723 #if PY_VERSION_HEX < 0x030600A4 && CYTHON_PEP487_INIT_SUBCLASS
jpayne@68 34724 static int __Pyx_SetNamesPEP487(PyObject *type_obj) {
jpayne@68 34725 PyTypeObject *type = (PyTypeObject*) type_obj;
jpayne@68 34726 PyObject *names_to_set, *key, *value, *set_name, *tmp;
jpayne@68 34727 Py_ssize_t i = 0;
jpayne@68 34728 #if CYTHON_USE_TYPE_SLOTS
jpayne@68 34729 names_to_set = PyDict_Copy(type->tp_dict);
jpayne@68 34730 #else
jpayne@68 34731 {
jpayne@68 34732 PyObject *d = PyObject_GetAttr(type_obj, __pyx_n_s_dict);
jpayne@68 34733 names_to_set = NULL;
jpayne@68 34734 if (likely(d)) {
jpayne@68 34735 PyObject *names_to_set = PyDict_New();
jpayne@68 34736 int ret = likely(names_to_set) ? PyDict_Update(names_to_set, d) : -1;
jpayne@68 34737 Py_DECREF(d);
jpayne@68 34738 if (unlikely(ret < 0))
jpayne@68 34739 Py_CLEAR(names_to_set);
jpayne@68 34740 }
jpayne@68 34741 }
jpayne@68 34742 #endif
jpayne@68 34743 if (unlikely(names_to_set == NULL))
jpayne@68 34744 goto bad;
jpayne@68 34745 while (PyDict_Next(names_to_set, &i, &key, &value)) {
jpayne@68 34746 set_name = __Pyx_PyObject_LookupSpecialNoError(value, __pyx_n_s_set_name);
jpayne@68 34747 if (unlikely(set_name != NULL)) {
jpayne@68 34748 tmp = __Pyx_PyObject_Call2Args(set_name, type_obj, key);
jpayne@68 34749 Py_DECREF(set_name);
jpayne@68 34750 if (unlikely(tmp == NULL)) {
jpayne@68 34751 __Pyx_TypeName value_type_name =
jpayne@68 34752 __Pyx_PyType_GetName(Py_TYPE(value));
jpayne@68 34753 __Pyx_TypeName type_name = __Pyx_PyType_GetName(type);
jpayne@68 34754 PyErr_Format(PyExc_RuntimeError,
jpayne@68 34755 #if PY_MAJOR_VERSION >= 3
jpayne@68 34756 "Error calling __set_name__ on '" __Pyx_FMT_TYPENAME "' instance %R " "in '" __Pyx_FMT_TYPENAME "'",
jpayne@68 34757 value_type_name, key, type_name);
jpayne@68 34758 #else
jpayne@68 34759 "Error calling __set_name__ on '" __Pyx_FMT_TYPENAME "' instance %.100s in '" __Pyx_FMT_TYPENAME "'",
jpayne@68 34760 value_type_name,
jpayne@68 34761 PyString_Check(key) ? PyString_AS_STRING(key) : "?",
jpayne@68 34762 type_name);
jpayne@68 34763 #endif
jpayne@68 34764 goto bad;
jpayne@68 34765 } else {
jpayne@68 34766 Py_DECREF(tmp);
jpayne@68 34767 }
jpayne@68 34768 }
jpayne@68 34769 else if (unlikely(PyErr_Occurred())) {
jpayne@68 34770 goto bad;
jpayne@68 34771 }
jpayne@68 34772 }
jpayne@68 34773 Py_DECREF(names_to_set);
jpayne@68 34774 return 0;
jpayne@68 34775 bad:
jpayne@68 34776 Py_XDECREF(names_to_set);
jpayne@68 34777 return -1;
jpayne@68 34778 }
jpayne@68 34779 static PyObject *__Pyx_InitSubclassPEP487(PyObject *type_obj, PyObject *mkw) {
jpayne@68 34780 #if CYTHON_USE_TYPE_SLOTS && CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
jpayne@68 34781 PyTypeObject *type = (PyTypeObject*) type_obj;
jpayne@68 34782 PyObject *mro = type->tp_mro;
jpayne@68 34783 Py_ssize_t i, nbases;
jpayne@68 34784 if (unlikely(!mro)) goto done;
jpayne@68 34785 (void) &__Pyx_GetBuiltinName;
jpayne@68 34786 Py_INCREF(mro);
jpayne@68 34787 nbases = PyTuple_GET_SIZE(mro);
jpayne@68 34788 assert(PyTuple_GET_ITEM(mro, 0) == type_obj);
jpayne@68 34789 for (i = 1; i < nbases-1; i++) {
jpayne@68 34790 PyObject *base, *dict, *meth;
jpayne@68 34791 base = PyTuple_GET_ITEM(mro, i);
jpayne@68 34792 dict = ((PyTypeObject *)base)->tp_dict;
jpayne@68 34793 meth = __Pyx_PyDict_GetItemStrWithError(dict, __pyx_n_s_init_subclass);
jpayne@68 34794 if (unlikely(meth)) {
jpayne@68 34795 descrgetfunc f = Py_TYPE(meth)->tp_descr_get;
jpayne@68 34796 PyObject *res;
jpayne@68 34797 Py_INCREF(meth);
jpayne@68 34798 if (likely(f)) {
jpayne@68 34799 res = f(meth, NULL, type_obj);
jpayne@68 34800 Py_DECREF(meth);
jpayne@68 34801 if (unlikely(!res)) goto bad;
jpayne@68 34802 meth = res;
jpayne@68 34803 }
jpayne@68 34804 res = __Pyx_PyObject_FastCallDict(meth, NULL, 0, mkw);
jpayne@68 34805 Py_DECREF(meth);
jpayne@68 34806 if (unlikely(!res)) goto bad;
jpayne@68 34807 Py_DECREF(res);
jpayne@68 34808 goto done;
jpayne@68 34809 } else if (unlikely(PyErr_Occurred())) {
jpayne@68 34810 goto bad;
jpayne@68 34811 }
jpayne@68 34812 }
jpayne@68 34813 done:
jpayne@68 34814 Py_XDECREF(mro);
jpayne@68 34815 return type_obj;
jpayne@68 34816 bad:
jpayne@68 34817 Py_XDECREF(mro);
jpayne@68 34818 Py_DECREF(type_obj);
jpayne@68 34819 return NULL;
jpayne@68 34820 #else
jpayne@68 34821 PyObject *super_type, *super, *func, *res;
jpayne@68 34822 #if CYTHON_COMPILING_IN_PYPY && !defined(PySuper_Type)
jpayne@68 34823 super_type = __Pyx_GetBuiltinName(__pyx_n_s_super);
jpayne@68 34824 #else
jpayne@68 34825 super_type = (PyObject*) &PySuper_Type;
jpayne@68 34826 (void) &__Pyx_GetBuiltinName;
jpayne@68 34827 #endif
jpayne@68 34828 super = likely(super_type) ? __Pyx_PyObject_Call2Args(super_type, type_obj, type_obj) : NULL;
jpayne@68 34829 #if CYTHON_COMPILING_IN_PYPY && !defined(PySuper_Type)
jpayne@68 34830 Py_XDECREF(super_type);
jpayne@68 34831 #endif
jpayne@68 34832 if (unlikely(!super)) {
jpayne@68 34833 Py_CLEAR(type_obj);
jpayne@68 34834 goto done;
jpayne@68 34835 }
jpayne@68 34836 func = __Pyx_PyObject_GetAttrStrNoError(super, __pyx_n_s_init_subclass);
jpayne@68 34837 Py_DECREF(super);
jpayne@68 34838 if (likely(!func)) {
jpayne@68 34839 if (unlikely(PyErr_Occurred()))
jpayne@68 34840 Py_CLEAR(type_obj);
jpayne@68 34841 goto done;
jpayne@68 34842 }
jpayne@68 34843 res = __Pyx_PyObject_FastCallDict(func, NULL, 0, mkw);
jpayne@68 34844 Py_DECREF(func);
jpayne@68 34845 if (unlikely(!res))
jpayne@68 34846 Py_CLEAR(type_obj);
jpayne@68 34847 Py_XDECREF(res);
jpayne@68 34848 done:
jpayne@68 34849 return type_obj;
jpayne@68 34850 #endif
jpayne@68 34851 }
jpayne@68 34852 #endif
jpayne@68 34853 static PyObject *__Pyx_Py3ClassCreate(PyObject *metaclass, PyObject *name, PyObject *bases,
jpayne@68 34854 PyObject *dict, PyObject *mkw,
jpayne@68 34855 int calculate_metaclass, int allow_py2_metaclass) {
jpayne@68 34856 PyObject *result;
jpayne@68 34857 PyObject *owned_metaclass = NULL;
jpayne@68 34858 PyObject *margs[4] = {NULL, name, bases, dict};
jpayne@68 34859 if (allow_py2_metaclass) {
jpayne@68 34860 owned_metaclass = PyObject_GetItem(dict, __pyx_n_s_metaclass);
jpayne@68 34861 if (owned_metaclass) {
jpayne@68 34862 metaclass = owned_metaclass;
jpayne@68 34863 } else if (likely(PyErr_ExceptionMatches(PyExc_KeyError))) {
jpayne@68 34864 PyErr_Clear();
jpayne@68 34865 } else {
jpayne@68 34866 return NULL;
jpayne@68 34867 }
jpayne@68 34868 }
jpayne@68 34869 if (calculate_metaclass && (!metaclass || PyType_Check(metaclass))) {
jpayne@68 34870 metaclass = __Pyx_CalculateMetaclass((PyTypeObject*) metaclass, bases);
jpayne@68 34871 Py_XDECREF(owned_metaclass);
jpayne@68 34872 if (unlikely(!metaclass))
jpayne@68 34873 return NULL;
jpayne@68 34874 owned_metaclass = metaclass;
jpayne@68 34875 }
jpayne@68 34876 result = __Pyx_PyObject_FastCallDict(metaclass, margs+1, 3 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET,
jpayne@68 34877 #if PY_VERSION_HEX < 0x030600A4
jpayne@68 34878 (metaclass == (PyObject*)&PyType_Type) ? NULL : mkw
jpayne@68 34879 #else
jpayne@68 34880 mkw
jpayne@68 34881 #endif
jpayne@68 34882 );
jpayne@68 34883 Py_XDECREF(owned_metaclass);
jpayne@68 34884 #if PY_VERSION_HEX < 0x030600A4 && CYTHON_PEP487_INIT_SUBCLASS
jpayne@68 34885 if (likely(result) && likely(PyType_Check(result))) {
jpayne@68 34886 if (unlikely(__Pyx_SetNamesPEP487(result) < 0)) {
jpayne@68 34887 Py_CLEAR(result);
jpayne@68 34888 } else {
jpayne@68 34889 result = __Pyx_InitSubclassPEP487(result, mkw);
jpayne@68 34890 }
jpayne@68 34891 }
jpayne@68 34892 #else
jpayne@68 34893 (void) &__Pyx_GetBuiltinName;
jpayne@68 34894 #endif
jpayne@68 34895 return result;
jpayne@68 34896 }
jpayne@68 34897
jpayne@68 34898 /* CLineInTraceback */
jpayne@68 34899 #ifndef CYTHON_CLINE_IN_TRACEBACK
jpayne@68 34900 static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line) {
jpayne@68 34901 PyObject *use_cline;
jpayne@68 34902 PyObject *ptype, *pvalue, *ptraceback;
jpayne@68 34903 #if CYTHON_COMPILING_IN_CPYTHON
jpayne@68 34904 PyObject **cython_runtime_dict;
jpayne@68 34905 #endif
jpayne@68 34906 CYTHON_MAYBE_UNUSED_VAR(tstate);
jpayne@68 34907 if (unlikely(!__pyx_cython_runtime)) {
jpayne@68 34908 return c_line;
jpayne@68 34909 }
jpayne@68 34910 __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback);
jpayne@68 34911 #if CYTHON_COMPILING_IN_CPYTHON
jpayne@68 34912 cython_runtime_dict = _PyObject_GetDictPtr(__pyx_cython_runtime);
jpayne@68 34913 if (likely(cython_runtime_dict)) {
jpayne@68 34914 __PYX_PY_DICT_LOOKUP_IF_MODIFIED(
jpayne@68 34915 use_cline, *cython_runtime_dict,
jpayne@68 34916 __Pyx_PyDict_GetItemStr(*cython_runtime_dict, __pyx_n_s_cline_in_traceback))
jpayne@68 34917 } else
jpayne@68 34918 #endif
jpayne@68 34919 {
jpayne@68 34920 PyObject *use_cline_obj = __Pyx_PyObject_GetAttrStrNoError(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback);
jpayne@68 34921 if (use_cline_obj) {
jpayne@68 34922 use_cline = PyObject_Not(use_cline_obj) ? Py_False : Py_True;
jpayne@68 34923 Py_DECREF(use_cline_obj);
jpayne@68 34924 } else {
jpayne@68 34925 PyErr_Clear();
jpayne@68 34926 use_cline = NULL;
jpayne@68 34927 }
jpayne@68 34928 }
jpayne@68 34929 if (!use_cline) {
jpayne@68 34930 c_line = 0;
jpayne@68 34931 (void) PyObject_SetAttr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback, Py_False);
jpayne@68 34932 }
jpayne@68 34933 else if (use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) {
jpayne@68 34934 c_line = 0;
jpayne@68 34935 }
jpayne@68 34936 __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback);
jpayne@68 34937 return c_line;
jpayne@68 34938 }
jpayne@68 34939 #endif
jpayne@68 34940
jpayne@68 34941 /* CodeObjectCache */
jpayne@68 34942 #if !CYTHON_COMPILING_IN_LIMITED_API
jpayne@68 34943 static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) {
jpayne@68 34944 int start = 0, mid = 0, end = count - 1;
jpayne@68 34945 if (end >= 0 && code_line > entries[end].code_line) {
jpayne@68 34946 return count;
jpayne@68 34947 }
jpayne@68 34948 while (start < end) {
jpayne@68 34949 mid = start + (end - start) / 2;
jpayne@68 34950 if (code_line < entries[mid].code_line) {
jpayne@68 34951 end = mid;
jpayne@68 34952 } else if (code_line > entries[mid].code_line) {
jpayne@68 34953 start = mid + 1;
jpayne@68 34954 } else {
jpayne@68 34955 return mid;
jpayne@68 34956 }
jpayne@68 34957 }
jpayne@68 34958 if (code_line <= entries[mid].code_line) {
jpayne@68 34959 return mid;
jpayne@68 34960 } else {
jpayne@68 34961 return mid + 1;
jpayne@68 34962 }
jpayne@68 34963 }
jpayne@68 34964 static PyCodeObject *__pyx_find_code_object(int code_line) {
jpayne@68 34965 PyCodeObject* code_object;
jpayne@68 34966 int pos;
jpayne@68 34967 if (unlikely(!code_line) || unlikely(!__pyx_code_cache.entries)) {
jpayne@68 34968 return NULL;
jpayne@68 34969 }
jpayne@68 34970 pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
jpayne@68 34971 if (unlikely(pos >= __pyx_code_cache.count) || unlikely(__pyx_code_cache.entries[pos].code_line != code_line)) {
jpayne@68 34972 return NULL;
jpayne@68 34973 }
jpayne@68 34974 code_object = __pyx_code_cache.entries[pos].code_object;
jpayne@68 34975 Py_INCREF(code_object);
jpayne@68 34976 return code_object;
jpayne@68 34977 }
jpayne@68 34978 static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) {
jpayne@68 34979 int pos, i;
jpayne@68 34980 __Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries;
jpayne@68 34981 if (unlikely(!code_line)) {
jpayne@68 34982 return;
jpayne@68 34983 }
jpayne@68 34984 if (unlikely(!entries)) {
jpayne@68 34985 entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry));
jpayne@68 34986 if (likely(entries)) {
jpayne@68 34987 __pyx_code_cache.entries = entries;
jpayne@68 34988 __pyx_code_cache.max_count = 64;
jpayne@68 34989 __pyx_code_cache.count = 1;
jpayne@68 34990 entries[0].code_line = code_line;
jpayne@68 34991 entries[0].code_object = code_object;
jpayne@68 34992 Py_INCREF(code_object);
jpayne@68 34993 }
jpayne@68 34994 return;
jpayne@68 34995 }
jpayne@68 34996 pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
jpayne@68 34997 if ((pos < __pyx_code_cache.count) && unlikely(__pyx_code_cache.entries[pos].code_line == code_line)) {
jpayne@68 34998 PyCodeObject* tmp = entries[pos].code_object;
jpayne@68 34999 entries[pos].code_object = code_object;
jpayne@68 35000 Py_DECREF(tmp);
jpayne@68 35001 return;
jpayne@68 35002 }
jpayne@68 35003 if (__pyx_code_cache.count == __pyx_code_cache.max_count) {
jpayne@68 35004 int new_max = __pyx_code_cache.max_count + 64;
jpayne@68 35005 entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc(
jpayne@68 35006 __pyx_code_cache.entries, ((size_t)new_max) * sizeof(__Pyx_CodeObjectCacheEntry));
jpayne@68 35007 if (unlikely(!entries)) {
jpayne@68 35008 return;
jpayne@68 35009 }
jpayne@68 35010 __pyx_code_cache.entries = entries;
jpayne@68 35011 __pyx_code_cache.max_count = new_max;
jpayne@68 35012 }
jpayne@68 35013 for (i=__pyx_code_cache.count; i>pos; i--) {
jpayne@68 35014 entries[i] = entries[i-1];
jpayne@68 35015 }
jpayne@68 35016 entries[pos].code_line = code_line;
jpayne@68 35017 entries[pos].code_object = code_object;
jpayne@68 35018 __pyx_code_cache.count++;
jpayne@68 35019 Py_INCREF(code_object);
jpayne@68 35020 }
jpayne@68 35021 #endif
jpayne@68 35022
jpayne@68 35023 /* AddTraceback */
jpayne@68 35024 #include "compile.h"
jpayne@68 35025 #include "frameobject.h"
jpayne@68 35026 #include "traceback.h"
jpayne@68 35027 #if PY_VERSION_HEX >= 0x030b00a6 && !CYTHON_COMPILING_IN_LIMITED_API
jpayne@68 35028 #ifndef Py_BUILD_CORE
jpayne@68 35029 #define Py_BUILD_CORE 1
jpayne@68 35030 #endif
jpayne@68 35031 #include "internal/pycore_frame.h"
jpayne@68 35032 #endif
jpayne@68 35033 #if CYTHON_COMPILING_IN_LIMITED_API
jpayne@68 35034 static PyObject *__Pyx_PyCode_Replace_For_AddTraceback(PyObject *code, PyObject *scratch_dict,
jpayne@68 35035 PyObject *firstlineno, PyObject *name) {
jpayne@68 35036 PyObject *replace = NULL;
jpayne@68 35037 if (unlikely(PyDict_SetItemString(scratch_dict, "co_firstlineno", firstlineno))) return NULL;
jpayne@68 35038 if (unlikely(PyDict_SetItemString(scratch_dict, "co_name", name))) return NULL;
jpayne@68 35039 replace = PyObject_GetAttrString(code, "replace");
jpayne@68 35040 if (likely(replace)) {
jpayne@68 35041 PyObject *result;
jpayne@68 35042 result = PyObject_Call(replace, __pyx_empty_tuple, scratch_dict);
jpayne@68 35043 Py_DECREF(replace);
jpayne@68 35044 return result;
jpayne@68 35045 }
jpayne@68 35046 PyErr_Clear();
jpayne@68 35047 #if __PYX_LIMITED_VERSION_HEX < 0x030780000
jpayne@68 35048 {
jpayne@68 35049 PyObject *compiled = NULL, *result = NULL;
jpayne@68 35050 if (unlikely(PyDict_SetItemString(scratch_dict, "code", code))) return NULL;
jpayne@68 35051 if (unlikely(PyDict_SetItemString(scratch_dict, "type", (PyObject*)(&PyType_Type)))) return NULL;
jpayne@68 35052 compiled = Py_CompileString(
jpayne@68 35053 "out = type(code)(\n"
jpayne@68 35054 " code.co_argcount, code.co_kwonlyargcount, code.co_nlocals, code.co_stacksize,\n"
jpayne@68 35055 " code.co_flags, code.co_code, code.co_consts, code.co_names,\n"
jpayne@68 35056 " code.co_varnames, code.co_filename, co_name, co_firstlineno,\n"
jpayne@68 35057 " code.co_lnotab)\n", "<dummy>", Py_file_input);
jpayne@68 35058 if (!compiled) return NULL;
jpayne@68 35059 result = PyEval_EvalCode(compiled, scratch_dict, scratch_dict);
jpayne@68 35060 Py_DECREF(compiled);
jpayne@68 35061 if (!result) PyErr_Print();
jpayne@68 35062 Py_DECREF(result);
jpayne@68 35063 result = PyDict_GetItemString(scratch_dict, "out");
jpayne@68 35064 if (result) Py_INCREF(result);
jpayne@68 35065 return result;
jpayne@68 35066 }
jpayne@68 35067 #else
jpayne@68 35068 return NULL;
jpayne@68 35069 #endif
jpayne@68 35070 }
jpayne@68 35071 static void __Pyx_AddTraceback(const char *funcname, int c_line,
jpayne@68 35072 int py_line, const char *filename) {
jpayne@68 35073 PyObject *code_object = NULL, *py_py_line = NULL, *py_funcname = NULL, *dict = NULL;
jpayne@68 35074 PyObject *replace = NULL, *getframe = NULL, *frame = NULL;
jpayne@68 35075 PyObject *exc_type, *exc_value, *exc_traceback;
jpayne@68 35076 int success = 0;
jpayne@68 35077 if (c_line) {
jpayne@68 35078 (void) __pyx_cfilenm;
jpayne@68 35079 (void) __Pyx_CLineForTraceback(__Pyx_PyThreadState_Current, c_line);
jpayne@68 35080 }
jpayne@68 35081 PyErr_Fetch(&exc_type, &exc_value, &exc_traceback);
jpayne@68 35082 code_object = Py_CompileString("_getframe()", filename, Py_eval_input);
jpayne@68 35083 if (unlikely(!code_object)) goto bad;
jpayne@68 35084 py_py_line = PyLong_FromLong(py_line);
jpayne@68 35085 if (unlikely(!py_py_line)) goto bad;
jpayne@68 35086 py_funcname = PyUnicode_FromString(funcname);
jpayne@68 35087 if (unlikely(!py_funcname)) goto bad;
jpayne@68 35088 dict = PyDict_New();
jpayne@68 35089 if (unlikely(!dict)) goto bad;
jpayne@68 35090 {
jpayne@68 35091 PyObject *old_code_object = code_object;
jpayne@68 35092 code_object = __Pyx_PyCode_Replace_For_AddTraceback(code_object, dict, py_py_line, py_funcname);
jpayne@68 35093 Py_DECREF(old_code_object);
jpayne@68 35094 }
jpayne@68 35095 if (unlikely(!code_object)) goto bad;
jpayne@68 35096 getframe = PySys_GetObject("_getframe");
jpayne@68 35097 if (unlikely(!getframe)) goto bad;
jpayne@68 35098 if (unlikely(PyDict_SetItemString(dict, "_getframe", getframe))) goto bad;
jpayne@68 35099 frame = PyEval_EvalCode(code_object, dict, dict);
jpayne@68 35100 if (unlikely(!frame) || frame == Py_None) goto bad;
jpayne@68 35101 success = 1;
jpayne@68 35102 bad:
jpayne@68 35103 PyErr_Restore(exc_type, exc_value, exc_traceback);
jpayne@68 35104 Py_XDECREF(code_object);
jpayne@68 35105 Py_XDECREF(py_py_line);
jpayne@68 35106 Py_XDECREF(py_funcname);
jpayne@68 35107 Py_XDECREF(dict);
jpayne@68 35108 Py_XDECREF(replace);
jpayne@68 35109 if (success) {
jpayne@68 35110 PyTraceBack_Here(
jpayne@68 35111 (struct _frame*)frame);
jpayne@68 35112 }
jpayne@68 35113 Py_XDECREF(frame);
jpayne@68 35114 }
jpayne@68 35115 #else
jpayne@68 35116 static PyCodeObject* __Pyx_CreateCodeObjectForTraceback(
jpayne@68 35117 const char *funcname, int c_line,
jpayne@68 35118 int py_line, const char *filename) {
jpayne@68 35119 PyCodeObject *py_code = NULL;
jpayne@68 35120 PyObject *py_funcname = NULL;
jpayne@68 35121 #if PY_MAJOR_VERSION < 3
jpayne@68 35122 PyObject *py_srcfile = NULL;
jpayne@68 35123 py_srcfile = PyString_FromString(filename);
jpayne@68 35124 if (!py_srcfile) goto bad;
jpayne@68 35125 #endif
jpayne@68 35126 if (c_line) {
jpayne@68 35127 #if PY_MAJOR_VERSION < 3
jpayne@68 35128 py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
jpayne@68 35129 if (!py_funcname) goto bad;
jpayne@68 35130 #else
jpayne@68 35131 py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
jpayne@68 35132 if (!py_funcname) goto bad;
jpayne@68 35133 funcname = PyUnicode_AsUTF8(py_funcname);
jpayne@68 35134 if (!funcname) goto bad;
jpayne@68 35135 #endif
jpayne@68 35136 }
jpayne@68 35137 else {
jpayne@68 35138 #if PY_MAJOR_VERSION < 3
jpayne@68 35139 py_funcname = PyString_FromString(funcname);
jpayne@68 35140 if (!py_funcname) goto bad;
jpayne@68 35141 #endif
jpayne@68 35142 }
jpayne@68 35143 #if PY_MAJOR_VERSION < 3
jpayne@68 35144 py_code = __Pyx_PyCode_New(
jpayne@68 35145 0,
jpayne@68 35146 0,
jpayne@68 35147 0,
jpayne@68 35148 0,
jpayne@68 35149 0,
jpayne@68 35150 0,
jpayne@68 35151 __pyx_empty_bytes, /*PyObject *code,*/
jpayne@68 35152 __pyx_empty_tuple, /*PyObject *consts,*/
jpayne@68 35153 __pyx_empty_tuple, /*PyObject *names,*/
jpayne@68 35154 __pyx_empty_tuple, /*PyObject *varnames,*/
jpayne@68 35155 __pyx_empty_tuple, /*PyObject *freevars,*/
jpayne@68 35156 __pyx_empty_tuple, /*PyObject *cellvars,*/
jpayne@68 35157 py_srcfile, /*PyObject *filename,*/
jpayne@68 35158 py_funcname, /*PyObject *name,*/
jpayne@68 35159 py_line,
jpayne@68 35160 __pyx_empty_bytes /*PyObject *lnotab*/
jpayne@68 35161 );
jpayne@68 35162 Py_DECREF(py_srcfile);
jpayne@68 35163 #else
jpayne@68 35164 py_code = PyCode_NewEmpty(filename, funcname, py_line);
jpayne@68 35165 #endif
jpayne@68 35166 Py_XDECREF(py_funcname);
jpayne@68 35167 return py_code;
jpayne@68 35168 bad:
jpayne@68 35169 Py_XDECREF(py_funcname);
jpayne@68 35170 #if PY_MAJOR_VERSION < 3
jpayne@68 35171 Py_XDECREF(py_srcfile);
jpayne@68 35172 #endif
jpayne@68 35173 return NULL;
jpayne@68 35174 }
jpayne@68 35175 static void __Pyx_AddTraceback(const char *funcname, int c_line,
jpayne@68 35176 int py_line, const char *filename) {
jpayne@68 35177 PyCodeObject *py_code = 0;
jpayne@68 35178 PyFrameObject *py_frame = 0;
jpayne@68 35179 PyThreadState *tstate = __Pyx_PyThreadState_Current;
jpayne@68 35180 PyObject *ptype, *pvalue, *ptraceback;
jpayne@68 35181 if (c_line) {
jpayne@68 35182 c_line = __Pyx_CLineForTraceback(tstate, c_line);
jpayne@68 35183 }
jpayne@68 35184 py_code = __pyx_find_code_object(c_line ? -c_line : py_line);
jpayne@68 35185 if (!py_code) {
jpayne@68 35186 __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback);
jpayne@68 35187 py_code = __Pyx_CreateCodeObjectForTraceback(
jpayne@68 35188 funcname, c_line, py_line, filename);
jpayne@68 35189 if (!py_code) {
jpayne@68 35190 /* If the code object creation fails, then we should clear the
jpayne@68 35191 fetched exception references and propagate the new exception */
jpayne@68 35192 Py_XDECREF(ptype);
jpayne@68 35193 Py_XDECREF(pvalue);
jpayne@68 35194 Py_XDECREF(ptraceback);
jpayne@68 35195 goto bad;
jpayne@68 35196 }
jpayne@68 35197 __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback);
jpayne@68 35198 __pyx_insert_code_object(c_line ? -c_line : py_line, py_code);
jpayne@68 35199 }
jpayne@68 35200 py_frame = PyFrame_New(
jpayne@68 35201 tstate, /*PyThreadState *tstate,*/
jpayne@68 35202 py_code, /*PyCodeObject *code,*/
jpayne@68 35203 __pyx_d, /*PyObject *globals,*/
jpayne@68 35204 0 /*PyObject *locals*/
jpayne@68 35205 );
jpayne@68 35206 if (!py_frame) goto bad;
jpayne@68 35207 __Pyx_PyFrame_SetLineNumber(py_frame, py_line);
jpayne@68 35208 PyTraceBack_Here(py_frame);
jpayne@68 35209 bad:
jpayne@68 35210 Py_XDECREF(py_code);
jpayne@68 35211 Py_XDECREF(py_frame);
jpayne@68 35212 }
jpayne@68 35213 #endif
jpayne@68 35214
jpayne@68 35215 /* CIntFromPyVerify */
jpayne@68 35216 #define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\
jpayne@68 35217 __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0)
jpayne@68 35218 #define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\
jpayne@68 35219 __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1)
jpayne@68 35220 #define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\
jpayne@68 35221 {\
jpayne@68 35222 func_type value = func_value;\
jpayne@68 35223 if (sizeof(target_type) < sizeof(func_type)) {\
jpayne@68 35224 if (unlikely(value != (func_type) (target_type) value)) {\
jpayne@68 35225 func_type zero = 0;\
jpayne@68 35226 if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\
jpayne@68 35227 return (target_type) -1;\
jpayne@68 35228 if (is_unsigned && unlikely(value < zero))\
jpayne@68 35229 goto raise_neg_overflow;\
jpayne@68 35230 else\
jpayne@68 35231 goto raise_overflow;\
jpayne@68 35232 }\
jpayne@68 35233 }\
jpayne@68 35234 return (target_type) value;\
jpayne@68 35235 }
jpayne@68 35236
jpayne@68 35237 /* CIntFromPy */
jpayne@68 35238 static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) {
jpayne@68 35239 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
jpayne@68 35240 #pragma GCC diagnostic push
jpayne@68 35241 #pragma GCC diagnostic ignored "-Wconversion"
jpayne@68 35242 #endif
jpayne@68 35243 const int neg_one = (int) -1, const_zero = (int) 0;
jpayne@68 35244 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
jpayne@68 35245 #pragma GCC diagnostic pop
jpayne@68 35246 #endif
jpayne@68 35247 const int is_unsigned = neg_one > const_zero;
jpayne@68 35248 #if PY_MAJOR_VERSION < 3
jpayne@68 35249 if (likely(PyInt_Check(x))) {
jpayne@68 35250 if ((sizeof(int) < sizeof(long))) {
jpayne@68 35251 __PYX_VERIFY_RETURN_INT(int, long, PyInt_AS_LONG(x))
jpayne@68 35252 } else {
jpayne@68 35253 long val = PyInt_AS_LONG(x);
jpayne@68 35254 if (is_unsigned && unlikely(val < 0)) {
jpayne@68 35255 goto raise_neg_overflow;
jpayne@68 35256 }
jpayne@68 35257 return (int) val;
jpayne@68 35258 }
jpayne@68 35259 }
jpayne@68 35260 #endif
jpayne@68 35261 if (unlikely(!PyLong_Check(x))) {
jpayne@68 35262 int val;
jpayne@68 35263 PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
jpayne@68 35264 if (!tmp) return (int) -1;
jpayne@68 35265 val = __Pyx_PyInt_As_int(tmp);
jpayne@68 35266 Py_DECREF(tmp);
jpayne@68 35267 return val;
jpayne@68 35268 }
jpayne@68 35269 if (is_unsigned) {
jpayne@68 35270 #if CYTHON_USE_PYLONG_INTERNALS
jpayne@68 35271 if (unlikely(__Pyx_PyLong_IsNeg(x))) {
jpayne@68 35272 goto raise_neg_overflow;
jpayne@68 35273 } else if (__Pyx_PyLong_IsCompact(x)) {
jpayne@68 35274 __PYX_VERIFY_RETURN_INT(int, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x))
jpayne@68 35275 } else {
jpayne@68 35276 const digit* digits = __Pyx_PyLong_Digits(x);
jpayne@68 35277 assert(__Pyx_PyLong_DigitCount(x) > 1);
jpayne@68 35278 switch (__Pyx_PyLong_DigitCount(x)) {
jpayne@68 35279 case 2:
jpayne@68 35280 if ((8 * sizeof(int) > 1 * PyLong_SHIFT)) {
jpayne@68 35281 if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
jpayne@68 35282 __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
jpayne@68 35283 } else if ((8 * sizeof(int) >= 2 * PyLong_SHIFT)) {
jpayne@68 35284 return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
jpayne@68 35285 }
jpayne@68 35286 }
jpayne@68 35287 break;
jpayne@68 35288 case 3:
jpayne@68 35289 if ((8 * sizeof(int) > 2 * PyLong_SHIFT)) {
jpayne@68 35290 if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
jpayne@68 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@68 35292 } else if ((8 * sizeof(int) >= 3 * PyLong_SHIFT)) {
jpayne@68 35293 return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
jpayne@68 35294 }
jpayne@68 35295 }
jpayne@68 35296 break;
jpayne@68 35297 case 4:
jpayne@68 35298 if ((8 * sizeof(int) > 3 * PyLong_SHIFT)) {
jpayne@68 35299 if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
jpayne@68 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@68 35301 } else if ((8 * sizeof(int) >= 4 * PyLong_SHIFT)) {
jpayne@68 35302 return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
jpayne@68 35303 }
jpayne@68 35304 }
jpayne@68 35305 break;
jpayne@68 35306 }
jpayne@68 35307 }
jpayne@68 35308 #endif
jpayne@68 35309 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7
jpayne@68 35310 if (unlikely(Py_SIZE(x) < 0)) {
jpayne@68 35311 goto raise_neg_overflow;
jpayne@68 35312 }
jpayne@68 35313 #else
jpayne@68 35314 {
jpayne@68 35315 int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
jpayne@68 35316 if (unlikely(result < 0))
jpayne@68 35317 return (int) -1;
jpayne@68 35318 if (unlikely(result == 1))
jpayne@68 35319 goto raise_neg_overflow;
jpayne@68 35320 }
jpayne@68 35321 #endif
jpayne@68 35322 if ((sizeof(int) <= sizeof(unsigned long))) {
jpayne@68 35323 __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x))
jpayne@68 35324 #ifdef HAVE_LONG_LONG
jpayne@68 35325 } else if ((sizeof(int) <= sizeof(unsigned PY_LONG_LONG))) {
jpayne@68 35326 __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
jpayne@68 35327 #endif
jpayne@68 35328 }
jpayne@68 35329 } else {
jpayne@68 35330 #if CYTHON_USE_PYLONG_INTERNALS
jpayne@68 35331 if (__Pyx_PyLong_IsCompact(x)) {
jpayne@68 35332 __PYX_VERIFY_RETURN_INT(int, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x))
jpayne@68 35333 } else {
jpayne@68 35334 const digit* digits = __Pyx_PyLong_Digits(x);
jpayne@68 35335 assert(__Pyx_PyLong_DigitCount(x) > 1);
jpayne@68 35336 switch (__Pyx_PyLong_SignedDigitCount(x)) {
jpayne@68 35337 case -2:
jpayne@68 35338 if ((8 * sizeof(int) - 1 > 1 * PyLong_SHIFT)) {
jpayne@68 35339 if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
jpayne@68 35340 __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
jpayne@68 35341 } else if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) {
jpayne@68 35342 return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
jpayne@68 35343 }
jpayne@68 35344 }
jpayne@68 35345 break;
jpayne@68 35346 case 2:
jpayne@68 35347 if ((8 * sizeof(int) > 1 * PyLong_SHIFT)) {
jpayne@68 35348 if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
jpayne@68 35349 __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
jpayne@68 35350 } else if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) {
jpayne@68 35351 return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
jpayne@68 35352 }
jpayne@68 35353 }
jpayne@68 35354 break;
jpayne@68 35355 case -3:
jpayne@68 35356 if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) {
jpayne@68 35357 if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
jpayne@68 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@68 35359 } else if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) {
jpayne@68 35360 return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
jpayne@68 35361 }
jpayne@68 35362 }
jpayne@68 35363 break;
jpayne@68 35364 case 3:
jpayne@68 35365 if ((8 * sizeof(int) > 2 * PyLong_SHIFT)) {
jpayne@68 35366 if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
jpayne@68 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@68 35368 } else if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) {
jpayne@68 35369 return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
jpayne@68 35370 }
jpayne@68 35371 }
jpayne@68 35372 break;
jpayne@68 35373 case -4:
jpayne@68 35374 if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) {
jpayne@68 35375 if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
jpayne@68 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@68 35377 } else if ((8 * sizeof(int) - 1 > 4 * PyLong_SHIFT)) {
jpayne@68 35378 return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
jpayne@68 35379 }
jpayne@68 35380 }
jpayne@68 35381 break;
jpayne@68 35382 case 4:
jpayne@68 35383 if ((8 * sizeof(int) > 3 * PyLong_SHIFT)) {
jpayne@68 35384 if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
jpayne@68 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@68 35386 } else if ((8 * sizeof(int) - 1 > 4 * PyLong_SHIFT)) {
jpayne@68 35387 return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
jpayne@68 35388 }
jpayne@68 35389 }
jpayne@68 35390 break;
jpayne@68 35391 }
jpayne@68 35392 }
jpayne@68 35393 #endif
jpayne@68 35394 if ((sizeof(int) <= sizeof(long))) {
jpayne@68 35395 __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x))
jpayne@68 35396 #ifdef HAVE_LONG_LONG
jpayne@68 35397 } else if ((sizeof(int) <= sizeof(PY_LONG_LONG))) {
jpayne@68 35398 __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x))
jpayne@68 35399 #endif
jpayne@68 35400 }
jpayne@68 35401 }
jpayne@68 35402 {
jpayne@68 35403 int val;
jpayne@68 35404 int ret = -1;
jpayne@68 35405 #if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API
jpayne@68 35406 Py_ssize_t bytes_copied = PyLong_AsNativeBytes(
jpayne@68 35407 x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0));
jpayne@68 35408 if (unlikely(bytes_copied == -1)) {
jpayne@68 35409 } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) {
jpayne@68 35410 goto raise_overflow;
jpayne@68 35411 } else {
jpayne@68 35412 ret = 0;
jpayne@68 35413 }
jpayne@68 35414 #elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray)
jpayne@68 35415 int one = 1; int is_little = (int)*(unsigned char *)&one;
jpayne@68 35416 unsigned char *bytes = (unsigned char *)&val;
jpayne@68 35417 ret = _PyLong_AsByteArray((PyLongObject *)x,
jpayne@68 35418 bytes, sizeof(val),
jpayne@68 35419 is_little, !is_unsigned);
jpayne@68 35420 #else
jpayne@68 35421 PyObject *v;
jpayne@68 35422 PyObject *stepval = NULL, *mask = NULL, *shift = NULL;
jpayne@68 35423 int bits, remaining_bits, is_negative = 0;
jpayne@68 35424 int chunk_size = (sizeof(long) < 8) ? 30 : 62;
jpayne@68 35425 if (likely(PyLong_CheckExact(x))) {
jpayne@68 35426 v = __Pyx_NewRef(x);
jpayne@68 35427 } else {
jpayne@68 35428 v = PyNumber_Long(x);
jpayne@68 35429 if (unlikely(!v)) return (int) -1;
jpayne@68 35430 assert(PyLong_CheckExact(v));
jpayne@68 35431 }
jpayne@68 35432 {
jpayne@68 35433 int result = PyObject_RichCompareBool(v, Py_False, Py_LT);
jpayne@68 35434 if (unlikely(result < 0)) {
jpayne@68 35435 Py_DECREF(v);
jpayne@68 35436 return (int) -1;
jpayne@68 35437 }
jpayne@68 35438 is_negative = result == 1;
jpayne@68 35439 }
jpayne@68 35440 if (is_unsigned && unlikely(is_negative)) {
jpayne@68 35441 Py_DECREF(v);
jpayne@68 35442 goto raise_neg_overflow;
jpayne@68 35443 } else if (is_negative) {
jpayne@68 35444 stepval = PyNumber_Invert(v);
jpayne@68 35445 Py_DECREF(v);
jpayne@68 35446 if (unlikely(!stepval))
jpayne@68 35447 return (int) -1;
jpayne@68 35448 } else {
jpayne@68 35449 stepval = v;
jpayne@68 35450 }
jpayne@68 35451 v = NULL;
jpayne@68 35452 val = (int) 0;
jpayne@68 35453 mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done;
jpayne@68 35454 shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done;
jpayne@68 35455 for (bits = 0; bits < (int) sizeof(int) * 8 - chunk_size; bits += chunk_size) {
jpayne@68 35456 PyObject *tmp, *digit;
jpayne@68 35457 long idigit;
jpayne@68 35458 digit = PyNumber_And(stepval, mask);
jpayne@68 35459 if (unlikely(!digit)) goto done;
jpayne@68 35460 idigit = PyLong_AsLong(digit);
jpayne@68 35461 Py_DECREF(digit);
jpayne@68 35462 if (unlikely(idigit < 0)) goto done;
jpayne@68 35463 val |= ((int) idigit) << bits;
jpayne@68 35464 tmp = PyNumber_Rshift(stepval, shift);
jpayne@68 35465 if (unlikely(!tmp)) goto done;
jpayne@68 35466 Py_DECREF(stepval); stepval = tmp;
jpayne@68 35467 }
jpayne@68 35468 Py_DECREF(shift); shift = NULL;
jpayne@68 35469 Py_DECREF(mask); mask = NULL;
jpayne@68 35470 {
jpayne@68 35471 long idigit = PyLong_AsLong(stepval);
jpayne@68 35472 if (unlikely(idigit < 0)) goto done;
jpayne@68 35473 remaining_bits = ((int) sizeof(int) * 8) - bits - (is_unsigned ? 0 : 1);
jpayne@68 35474 if (unlikely(idigit >= (1L << remaining_bits)))
jpayne@68 35475 goto raise_overflow;
jpayne@68 35476 val |= ((int) idigit) << bits;
jpayne@68 35477 }
jpayne@68 35478 if (!is_unsigned) {
jpayne@68 35479 if (unlikely(val & (((int) 1) << (sizeof(int) * 8 - 1))))
jpayne@68 35480 goto raise_overflow;
jpayne@68 35481 if (is_negative)
jpayne@68 35482 val = ~val;
jpayne@68 35483 }
jpayne@68 35484 ret = 0;
jpayne@68 35485 done:
jpayne@68 35486 Py_XDECREF(shift);
jpayne@68 35487 Py_XDECREF(mask);
jpayne@68 35488 Py_XDECREF(stepval);
jpayne@68 35489 #endif
jpayne@68 35490 if (unlikely(ret))
jpayne@68 35491 return (int) -1;
jpayne@68 35492 return val;
jpayne@68 35493 }
jpayne@68 35494 raise_overflow:
jpayne@68 35495 PyErr_SetString(PyExc_OverflowError,
jpayne@68 35496 "value too large to convert to int");
jpayne@68 35497 return (int) -1;
jpayne@68 35498 raise_neg_overflow:
jpayne@68 35499 PyErr_SetString(PyExc_OverflowError,
jpayne@68 35500 "can't convert negative value to int");
jpayne@68 35501 return (int) -1;
jpayne@68 35502 }
jpayne@68 35503
jpayne@68 35504 /* CIntToPy */
jpayne@68 35505 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) {
jpayne@68 35506 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
jpayne@68 35507 #pragma GCC diagnostic push
jpayne@68 35508 #pragma GCC diagnostic ignored "-Wconversion"
jpayne@68 35509 #endif
jpayne@68 35510 const int neg_one = (int) -1, const_zero = (int) 0;
jpayne@68 35511 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
jpayne@68 35512 #pragma GCC diagnostic pop
jpayne@68 35513 #endif
jpayne@68 35514 const int is_unsigned = neg_one > const_zero;
jpayne@68 35515 if (is_unsigned) {
jpayne@68 35516 if (sizeof(int) < sizeof(long)) {
jpayne@68 35517 return PyInt_FromLong((long) value);
jpayne@68 35518 } else if (sizeof(int) <= sizeof(unsigned long)) {
jpayne@68 35519 return PyLong_FromUnsignedLong((unsigned long) value);
jpayne@68 35520 #ifdef HAVE_LONG_LONG
jpayne@68 35521 } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {
jpayne@68 35522 return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
jpayne@68 35523 #endif
jpayne@68 35524 }
jpayne@68 35525 } else {
jpayne@68 35526 if (sizeof(int) <= sizeof(long)) {
jpayne@68 35527 return PyInt_FromLong((long) value);
jpayne@68 35528 #ifdef HAVE_LONG_LONG
jpayne@68 35529 } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {
jpayne@68 35530 return PyLong_FromLongLong((PY_LONG_LONG) value);
jpayne@68 35531 #endif
jpayne@68 35532 }
jpayne@68 35533 }
jpayne@68 35534 {
jpayne@68 35535 unsigned char *bytes = (unsigned char *)&value;
jpayne@68 35536 #if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
jpayne@68 35537 if (is_unsigned) {
jpayne@68 35538 return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1);
jpayne@68 35539 } else {
jpayne@68 35540 return PyLong_FromNativeBytes(bytes, sizeof(value), -1);
jpayne@68 35541 }
jpayne@68 35542 #elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
jpayne@68 35543 int one = 1; int little = (int)*(unsigned char *)&one;
jpayne@68 35544 return _PyLong_FromByteArray(bytes, sizeof(int),
jpayne@68 35545 little, !is_unsigned);
jpayne@68 35546 #else
jpayne@68 35547 int one = 1; int little = (int)*(unsigned char *)&one;
jpayne@68 35548 PyObject *from_bytes, *result = NULL;
jpayne@68 35549 PyObject *py_bytes = NULL, *arg_tuple = NULL, *kwds = NULL, *order_str = NULL;
jpayne@68 35550 from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
jpayne@68 35551 if (!from_bytes) return NULL;
jpayne@68 35552 py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(int));
jpayne@68 35553 if (!py_bytes) goto limited_bad;
jpayne@68 35554 order_str = PyUnicode_FromString(little ? "little" : "big");
jpayne@68 35555 if (!order_str) goto limited_bad;
jpayne@68 35556 arg_tuple = PyTuple_Pack(2, py_bytes, order_str);
jpayne@68 35557 if (!arg_tuple) goto limited_bad;
jpayne@68 35558 if (!is_unsigned) {
jpayne@68 35559 kwds = PyDict_New();
jpayne@68 35560 if (!kwds) goto limited_bad;
jpayne@68 35561 if (PyDict_SetItemString(kwds, "signed", __Pyx_NewRef(Py_True))) goto limited_bad;
jpayne@68 35562 }
jpayne@68 35563 result = PyObject_Call(from_bytes, arg_tuple, kwds);
jpayne@68 35564 limited_bad:
jpayne@68 35565 Py_XDECREF(kwds);
jpayne@68 35566 Py_XDECREF(arg_tuple);
jpayne@68 35567 Py_XDECREF(order_str);
jpayne@68 35568 Py_XDECREF(py_bytes);
jpayne@68 35569 Py_XDECREF(from_bytes);
jpayne@68 35570 return result;
jpayne@68 35571 #endif
jpayne@68 35572 }
jpayne@68 35573 }
jpayne@68 35574
jpayne@68 35575 /* CIntFromPy */
jpayne@68 35576 static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) {
jpayne@68 35577 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
jpayne@68 35578 #pragma GCC diagnostic push
jpayne@68 35579 #pragma GCC diagnostic ignored "-Wconversion"
jpayne@68 35580 #endif
jpayne@68 35581 const long neg_one = (long) -1, const_zero = (long) 0;
jpayne@68 35582 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
jpayne@68 35583 #pragma GCC diagnostic pop
jpayne@68 35584 #endif
jpayne@68 35585 const int is_unsigned = neg_one > const_zero;
jpayne@68 35586 #if PY_MAJOR_VERSION < 3
jpayne@68 35587 if (likely(PyInt_Check(x))) {
jpayne@68 35588 if ((sizeof(long) < sizeof(long))) {
jpayne@68 35589 __PYX_VERIFY_RETURN_INT(long, long, PyInt_AS_LONG(x))
jpayne@68 35590 } else {
jpayne@68 35591 long val = PyInt_AS_LONG(x);
jpayne@68 35592 if (is_unsigned && unlikely(val < 0)) {
jpayne@68 35593 goto raise_neg_overflow;
jpayne@68 35594 }
jpayne@68 35595 return (long) val;
jpayne@68 35596 }
jpayne@68 35597 }
jpayne@68 35598 #endif
jpayne@68 35599 if (unlikely(!PyLong_Check(x))) {
jpayne@68 35600 long val;
jpayne@68 35601 PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
jpayne@68 35602 if (!tmp) return (long) -1;
jpayne@68 35603 val = __Pyx_PyInt_As_long(tmp);
jpayne@68 35604 Py_DECREF(tmp);
jpayne@68 35605 return val;
jpayne@68 35606 }
jpayne@68 35607 if (is_unsigned) {
jpayne@68 35608 #if CYTHON_USE_PYLONG_INTERNALS
jpayne@68 35609 if (unlikely(__Pyx_PyLong_IsNeg(x))) {
jpayne@68 35610 goto raise_neg_overflow;
jpayne@68 35611 } else if (__Pyx_PyLong_IsCompact(x)) {
jpayne@68 35612 __PYX_VERIFY_RETURN_INT(long, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x))
jpayne@68 35613 } else {
jpayne@68 35614 const digit* digits = __Pyx_PyLong_Digits(x);
jpayne@68 35615 assert(__Pyx_PyLong_DigitCount(x) > 1);
jpayne@68 35616 switch (__Pyx_PyLong_DigitCount(x)) {
jpayne@68 35617 case 2:
jpayne@68 35618 if ((8 * sizeof(long) > 1 * PyLong_SHIFT)) {
jpayne@68 35619 if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
jpayne@68 35620 __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
jpayne@68 35621 } else if ((8 * sizeof(long) >= 2 * PyLong_SHIFT)) {
jpayne@68 35622 return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
jpayne@68 35623 }
jpayne@68 35624 }
jpayne@68 35625 break;
jpayne@68 35626 case 3:
jpayne@68 35627 if ((8 * sizeof(long) > 2 * PyLong_SHIFT)) {
jpayne@68 35628 if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
jpayne@68 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@68 35630 } else if ((8 * sizeof(long) >= 3 * PyLong_SHIFT)) {
jpayne@68 35631 return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
jpayne@68 35632 }
jpayne@68 35633 }
jpayne@68 35634 break;
jpayne@68 35635 case 4:
jpayne@68 35636 if ((8 * sizeof(long) > 3 * PyLong_SHIFT)) {
jpayne@68 35637 if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
jpayne@68 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@68 35639 } else if ((8 * sizeof(long) >= 4 * PyLong_SHIFT)) {
jpayne@68 35640 return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
jpayne@68 35641 }
jpayne@68 35642 }
jpayne@68 35643 break;
jpayne@68 35644 }
jpayne@68 35645 }
jpayne@68 35646 #endif
jpayne@68 35647 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7
jpayne@68 35648 if (unlikely(Py_SIZE(x) < 0)) {
jpayne@68 35649 goto raise_neg_overflow;
jpayne@68 35650 }
jpayne@68 35651 #else
jpayne@68 35652 {
jpayne@68 35653 int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
jpayne@68 35654 if (unlikely(result < 0))
jpayne@68 35655 return (long) -1;
jpayne@68 35656 if (unlikely(result == 1))
jpayne@68 35657 goto raise_neg_overflow;
jpayne@68 35658 }
jpayne@68 35659 #endif
jpayne@68 35660 if ((sizeof(long) <= sizeof(unsigned long))) {
jpayne@68 35661 __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x))
jpayne@68 35662 #ifdef HAVE_LONG_LONG
jpayne@68 35663 } else if ((sizeof(long) <= sizeof(unsigned PY_LONG_LONG))) {
jpayne@68 35664 __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
jpayne@68 35665 #endif
jpayne@68 35666 }
jpayne@68 35667 } else {
jpayne@68 35668 #if CYTHON_USE_PYLONG_INTERNALS
jpayne@68 35669 if (__Pyx_PyLong_IsCompact(x)) {
jpayne@68 35670 __PYX_VERIFY_RETURN_INT(long, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x))
jpayne@68 35671 } else {
jpayne@68 35672 const digit* digits = __Pyx_PyLong_Digits(x);
jpayne@68 35673 assert(__Pyx_PyLong_DigitCount(x) > 1);
jpayne@68 35674 switch (__Pyx_PyLong_SignedDigitCount(x)) {
jpayne@68 35675 case -2:
jpayne@68 35676 if ((8 * sizeof(long) - 1 > 1 * PyLong_SHIFT)) {
jpayne@68 35677 if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
jpayne@68 35678 __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
jpayne@68 35679 } else if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) {
jpayne@68 35680 return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
jpayne@68 35681 }
jpayne@68 35682 }
jpayne@68 35683 break;
jpayne@68 35684 case 2:
jpayne@68 35685 if ((8 * sizeof(long) > 1 * PyLong_SHIFT)) {
jpayne@68 35686 if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
jpayne@68 35687 __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
jpayne@68 35688 } else if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) {
jpayne@68 35689 return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
jpayne@68 35690 }
jpayne@68 35691 }
jpayne@68 35692 break;
jpayne@68 35693 case -3:
jpayne@68 35694 if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) {
jpayne@68 35695 if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
jpayne@68 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@68 35697 } else if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) {
jpayne@68 35698 return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
jpayne@68 35699 }
jpayne@68 35700 }
jpayne@68 35701 break;
jpayne@68 35702 case 3:
jpayne@68 35703 if ((8 * sizeof(long) > 2 * PyLong_SHIFT)) {
jpayne@68 35704 if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
jpayne@68 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@68 35706 } else if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) {
jpayne@68 35707 return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
jpayne@68 35708 }
jpayne@68 35709 }
jpayne@68 35710 break;
jpayne@68 35711 case -4:
jpayne@68 35712 if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) {
jpayne@68 35713 if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
jpayne@68 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@68 35715 } else if ((8 * sizeof(long) - 1 > 4 * PyLong_SHIFT)) {
jpayne@68 35716 return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
jpayne@68 35717 }
jpayne@68 35718 }
jpayne@68 35719 break;
jpayne@68 35720 case 4:
jpayne@68 35721 if ((8 * sizeof(long) > 3 * PyLong_SHIFT)) {
jpayne@68 35722 if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
jpayne@68 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@68 35724 } else if ((8 * sizeof(long) - 1 > 4 * PyLong_SHIFT)) {
jpayne@68 35725 return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
jpayne@68 35726 }
jpayne@68 35727 }
jpayne@68 35728 break;
jpayne@68 35729 }
jpayne@68 35730 }
jpayne@68 35731 #endif
jpayne@68 35732 if ((sizeof(long) <= sizeof(long))) {
jpayne@68 35733 __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x))
jpayne@68 35734 #ifdef HAVE_LONG_LONG
jpayne@68 35735 } else if ((sizeof(long) <= sizeof(PY_LONG_LONG))) {
jpayne@68 35736 __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x))
jpayne@68 35737 #endif
jpayne@68 35738 }
jpayne@68 35739 }
jpayne@68 35740 {
jpayne@68 35741 long val;
jpayne@68 35742 int ret = -1;
jpayne@68 35743 #if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API
jpayne@68 35744 Py_ssize_t bytes_copied = PyLong_AsNativeBytes(
jpayne@68 35745 x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0));
jpayne@68 35746 if (unlikely(bytes_copied == -1)) {
jpayne@68 35747 } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) {
jpayne@68 35748 goto raise_overflow;
jpayne@68 35749 } else {
jpayne@68 35750 ret = 0;
jpayne@68 35751 }
jpayne@68 35752 #elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray)
jpayne@68 35753 int one = 1; int is_little = (int)*(unsigned char *)&one;
jpayne@68 35754 unsigned char *bytes = (unsigned char *)&val;
jpayne@68 35755 ret = _PyLong_AsByteArray((PyLongObject *)x,
jpayne@68 35756 bytes, sizeof(val),
jpayne@68 35757 is_little, !is_unsigned);
jpayne@68 35758 #else
jpayne@68 35759 PyObject *v;
jpayne@68 35760 PyObject *stepval = NULL, *mask = NULL, *shift = NULL;
jpayne@68 35761 int bits, remaining_bits, is_negative = 0;
jpayne@68 35762 int chunk_size = (sizeof(long) < 8) ? 30 : 62;
jpayne@68 35763 if (likely(PyLong_CheckExact(x))) {
jpayne@68 35764 v = __Pyx_NewRef(x);
jpayne@68 35765 } else {
jpayne@68 35766 v = PyNumber_Long(x);
jpayne@68 35767 if (unlikely(!v)) return (long) -1;
jpayne@68 35768 assert(PyLong_CheckExact(v));
jpayne@68 35769 }
jpayne@68 35770 {
jpayne@68 35771 int result = PyObject_RichCompareBool(v, Py_False, Py_LT);
jpayne@68 35772 if (unlikely(result < 0)) {
jpayne@68 35773 Py_DECREF(v);
jpayne@68 35774 return (long) -1;
jpayne@68 35775 }
jpayne@68 35776 is_negative = result == 1;
jpayne@68 35777 }
jpayne@68 35778 if (is_unsigned && unlikely(is_negative)) {
jpayne@68 35779 Py_DECREF(v);
jpayne@68 35780 goto raise_neg_overflow;
jpayne@68 35781 } else if (is_negative) {
jpayne@68 35782 stepval = PyNumber_Invert(v);
jpayne@68 35783 Py_DECREF(v);
jpayne@68 35784 if (unlikely(!stepval))
jpayne@68 35785 return (long) -1;
jpayne@68 35786 } else {
jpayne@68 35787 stepval = v;
jpayne@68 35788 }
jpayne@68 35789 v = NULL;
jpayne@68 35790 val = (long) 0;
jpayne@68 35791 mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done;
jpayne@68 35792 shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done;
jpayne@68 35793 for (bits = 0; bits < (int) sizeof(long) * 8 - chunk_size; bits += chunk_size) {
jpayne@68 35794 PyObject *tmp, *digit;
jpayne@68 35795 long idigit;
jpayne@68 35796 digit = PyNumber_And(stepval, mask);
jpayne@68 35797 if (unlikely(!digit)) goto done;
jpayne@68 35798 idigit = PyLong_AsLong(digit);
jpayne@68 35799 Py_DECREF(digit);
jpayne@68 35800 if (unlikely(idigit < 0)) goto done;
jpayne@68 35801 val |= ((long) idigit) << bits;
jpayne@68 35802 tmp = PyNumber_Rshift(stepval, shift);
jpayne@68 35803 if (unlikely(!tmp)) goto done;
jpayne@68 35804 Py_DECREF(stepval); stepval = tmp;
jpayne@68 35805 }
jpayne@68 35806 Py_DECREF(shift); shift = NULL;
jpayne@68 35807 Py_DECREF(mask); mask = NULL;
jpayne@68 35808 {
jpayne@68 35809 long idigit = PyLong_AsLong(stepval);
jpayne@68 35810 if (unlikely(idigit < 0)) goto done;
jpayne@68 35811 remaining_bits = ((int) sizeof(long) * 8) - bits - (is_unsigned ? 0 : 1);
jpayne@68 35812 if (unlikely(idigit >= (1L << remaining_bits)))
jpayne@68 35813 goto raise_overflow;
jpayne@68 35814 val |= ((long) idigit) << bits;
jpayne@68 35815 }
jpayne@68 35816 if (!is_unsigned) {
jpayne@68 35817 if (unlikely(val & (((long) 1) << (sizeof(long) * 8 - 1))))
jpayne@68 35818 goto raise_overflow;
jpayne@68 35819 if (is_negative)
jpayne@68 35820 val = ~val;
jpayne@68 35821 }
jpayne@68 35822 ret = 0;
jpayne@68 35823 done:
jpayne@68 35824 Py_XDECREF(shift);
jpayne@68 35825 Py_XDECREF(mask);
jpayne@68 35826 Py_XDECREF(stepval);
jpayne@68 35827 #endif
jpayne@68 35828 if (unlikely(ret))
jpayne@68 35829 return (long) -1;
jpayne@68 35830 return val;
jpayne@68 35831 }
jpayne@68 35832 raise_overflow:
jpayne@68 35833 PyErr_SetString(PyExc_OverflowError,
jpayne@68 35834 "value too large to convert to long");
jpayne@68 35835 return (long) -1;
jpayne@68 35836 raise_neg_overflow:
jpayne@68 35837 PyErr_SetString(PyExc_OverflowError,
jpayne@68 35838 "can't convert negative value to long");
jpayne@68 35839 return (long) -1;
jpayne@68 35840 }
jpayne@68 35841
jpayne@68 35842 /* CIntFromPy */
jpayne@68 35843 static CYTHON_INLINE int64_t __Pyx_PyInt_As_int64_t(PyObject *x) {
jpayne@68 35844 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
jpayne@68 35845 #pragma GCC diagnostic push
jpayne@68 35846 #pragma GCC diagnostic ignored "-Wconversion"
jpayne@68 35847 #endif
jpayne@68 35848 const int64_t neg_one = (int64_t) -1, const_zero = (int64_t) 0;
jpayne@68 35849 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
jpayne@68 35850 #pragma GCC diagnostic pop
jpayne@68 35851 #endif
jpayne@68 35852 const int is_unsigned = neg_one > const_zero;
jpayne@68 35853 #if PY_MAJOR_VERSION < 3
jpayne@68 35854 if (likely(PyInt_Check(x))) {
jpayne@68 35855 if ((sizeof(int64_t) < sizeof(long))) {
jpayne@68 35856 __PYX_VERIFY_RETURN_INT(int64_t, long, PyInt_AS_LONG(x))
jpayne@68 35857 } else {
jpayne@68 35858 long val = PyInt_AS_LONG(x);
jpayne@68 35859 if (is_unsigned && unlikely(val < 0)) {
jpayne@68 35860 goto raise_neg_overflow;
jpayne@68 35861 }
jpayne@68 35862 return (int64_t) val;
jpayne@68 35863 }
jpayne@68 35864 }
jpayne@68 35865 #endif
jpayne@68 35866 if (unlikely(!PyLong_Check(x))) {
jpayne@68 35867 int64_t val;
jpayne@68 35868 PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
jpayne@68 35869 if (!tmp) return (int64_t) -1;
jpayne@68 35870 val = __Pyx_PyInt_As_int64_t(tmp);
jpayne@68 35871 Py_DECREF(tmp);
jpayne@68 35872 return val;
jpayne@68 35873 }
jpayne@68 35874 if (is_unsigned) {
jpayne@68 35875 #if CYTHON_USE_PYLONG_INTERNALS
jpayne@68 35876 if (unlikely(__Pyx_PyLong_IsNeg(x))) {
jpayne@68 35877 goto raise_neg_overflow;
jpayne@68 35878 } else if (__Pyx_PyLong_IsCompact(x)) {
jpayne@68 35879 __PYX_VERIFY_RETURN_INT(int64_t, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x))
jpayne@68 35880 } else {
jpayne@68 35881 const digit* digits = __Pyx_PyLong_Digits(x);
jpayne@68 35882 assert(__Pyx_PyLong_DigitCount(x) > 1);
jpayne@68 35883 switch (__Pyx_PyLong_DigitCount(x)) {
jpayne@68 35884 case 2:
jpayne@68 35885 if ((8 * sizeof(int64_t) > 1 * PyLong_SHIFT)) {
jpayne@68 35886 if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
jpayne@68 35887 __PYX_VERIFY_RETURN_INT(int64_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
jpayne@68 35888 } else if ((8 * sizeof(int64_t) >= 2 * PyLong_SHIFT)) {
jpayne@68 35889 return (int64_t) (((((int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0]));
jpayne@68 35890 }
jpayne@68 35891 }
jpayne@68 35892 break;
jpayne@68 35893 case 3:
jpayne@68 35894 if ((8 * sizeof(int64_t) > 2 * PyLong_SHIFT)) {
jpayne@68 35895 if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
jpayne@68 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@68 35897 } else if ((8 * sizeof(int64_t) >= 3 * PyLong_SHIFT)) {
jpayne@68 35898 return (int64_t) (((((((int64_t)digits[2]) << PyLong_SHIFT) | (int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0]));
jpayne@68 35899 }
jpayne@68 35900 }
jpayne@68 35901 break;
jpayne@68 35902 case 4:
jpayne@68 35903 if ((8 * sizeof(int64_t) > 3 * PyLong_SHIFT)) {
jpayne@68 35904 if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
jpayne@68 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@68 35906 } else if ((8 * sizeof(int64_t) >= 4 * PyLong_SHIFT)) {
jpayne@68 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@68 35908 }
jpayne@68 35909 }
jpayne@68 35910 break;
jpayne@68 35911 }
jpayne@68 35912 }
jpayne@68 35913 #endif
jpayne@68 35914 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7
jpayne@68 35915 if (unlikely(Py_SIZE(x) < 0)) {
jpayne@68 35916 goto raise_neg_overflow;
jpayne@68 35917 }
jpayne@68 35918 #else
jpayne@68 35919 {
jpayne@68 35920 int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
jpayne@68 35921 if (unlikely(result < 0))
jpayne@68 35922 return (int64_t) -1;
jpayne@68 35923 if (unlikely(result == 1))
jpayne@68 35924 goto raise_neg_overflow;
jpayne@68 35925 }
jpayne@68 35926 #endif
jpayne@68 35927 if ((sizeof(int64_t) <= sizeof(unsigned long))) {
jpayne@68 35928 __PYX_VERIFY_RETURN_INT_EXC(int64_t, unsigned long, PyLong_AsUnsignedLong(x))
jpayne@68 35929 #ifdef HAVE_LONG_LONG
jpayne@68 35930 } else if ((sizeof(int64_t) <= sizeof(unsigned PY_LONG_LONG))) {
jpayne@68 35931 __PYX_VERIFY_RETURN_INT_EXC(int64_t, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
jpayne@68 35932 #endif
jpayne@68 35933 }
jpayne@68 35934 } else {
jpayne@68 35935 #if CYTHON_USE_PYLONG_INTERNALS
jpayne@68 35936 if (__Pyx_PyLong_IsCompact(x)) {
jpayne@68 35937 __PYX_VERIFY_RETURN_INT(int64_t, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x))
jpayne@68 35938 } else {
jpayne@68 35939 const digit* digits = __Pyx_PyLong_Digits(x);
jpayne@68 35940 assert(__Pyx_PyLong_DigitCount(x) > 1);
jpayne@68 35941 switch (__Pyx_PyLong_SignedDigitCount(x)) {
jpayne@68 35942 case -2:
jpayne@68 35943 if ((8 * sizeof(int64_t) - 1 > 1 * PyLong_SHIFT)) {
jpayne@68 35944 if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
jpayne@68 35945 __PYX_VERIFY_RETURN_INT(int64_t, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
jpayne@68 35946 } else if ((8 * sizeof(int64_t) - 1 > 2 * PyLong_SHIFT)) {
jpayne@68 35947 return (int64_t) (((int64_t)-1)*(((((int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0])));
jpayne@68 35948 }
jpayne@68 35949 }
jpayne@68 35950 break;
jpayne@68 35951 case 2:
jpayne@68 35952 if ((8 * sizeof(int64_t) > 1 * PyLong_SHIFT)) {
jpayne@68 35953 if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
jpayne@68 35954 __PYX_VERIFY_RETURN_INT(int64_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
jpayne@68 35955 } else if ((8 * sizeof(int64_t) - 1 > 2 * PyLong_SHIFT)) {
jpayne@68 35956 return (int64_t) ((((((int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0])));
jpayne@68 35957 }
jpayne@68 35958 }
jpayne@68 35959 break;
jpayne@68 35960 case -3:
jpayne@68 35961 if ((8 * sizeof(int64_t) - 1 > 2 * PyLong_SHIFT)) {
jpayne@68 35962 if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
jpayne@68 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@68 35964 } else if ((8 * sizeof(int64_t) - 1 > 3 * PyLong_SHIFT)) {
jpayne@68 35965 return (int64_t) (((int64_t)-1)*(((((((int64_t)digits[2]) << PyLong_SHIFT) | (int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0])));
jpayne@68 35966 }
jpayne@68 35967 }
jpayne@68 35968 break;
jpayne@68 35969 case 3:
jpayne@68 35970 if ((8 * sizeof(int64_t) > 2 * PyLong_SHIFT)) {
jpayne@68 35971 if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
jpayne@68 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@68 35973 } else if ((8 * sizeof(int64_t) - 1 > 3 * PyLong_SHIFT)) {
jpayne@68 35974 return (int64_t) ((((((((int64_t)digits[2]) << PyLong_SHIFT) | (int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0])));
jpayne@68 35975 }
jpayne@68 35976 }
jpayne@68 35977 break;
jpayne@68 35978 case -4:
jpayne@68 35979 if ((8 * sizeof(int64_t) - 1 > 3 * PyLong_SHIFT)) {
jpayne@68 35980 if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
jpayne@68 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@68 35982 } else if ((8 * sizeof(int64_t) - 1 > 4 * PyLong_SHIFT)) {
jpayne@68 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@68 35984 }
jpayne@68 35985 }
jpayne@68 35986 break;
jpayne@68 35987 case 4:
jpayne@68 35988 if ((8 * sizeof(int64_t) > 3 * PyLong_SHIFT)) {
jpayne@68 35989 if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
jpayne@68 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@68 35991 } else if ((8 * sizeof(int64_t) - 1 > 4 * PyLong_SHIFT)) {
jpayne@68 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@68 35993 }
jpayne@68 35994 }
jpayne@68 35995 break;
jpayne@68 35996 }
jpayne@68 35997 }
jpayne@68 35998 #endif
jpayne@68 35999 if ((sizeof(int64_t) <= sizeof(long))) {
jpayne@68 36000 __PYX_VERIFY_RETURN_INT_EXC(int64_t, long, PyLong_AsLong(x))
jpayne@68 36001 #ifdef HAVE_LONG_LONG
jpayne@68 36002 } else if ((sizeof(int64_t) <= sizeof(PY_LONG_LONG))) {
jpayne@68 36003 __PYX_VERIFY_RETURN_INT_EXC(int64_t, PY_LONG_LONG, PyLong_AsLongLong(x))
jpayne@68 36004 #endif
jpayne@68 36005 }
jpayne@68 36006 }
jpayne@68 36007 {
jpayne@68 36008 int64_t val;
jpayne@68 36009 int ret = -1;
jpayne@68 36010 #if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API
jpayne@68 36011 Py_ssize_t bytes_copied = PyLong_AsNativeBytes(
jpayne@68 36012 x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0));
jpayne@68 36013 if (unlikely(bytes_copied == -1)) {
jpayne@68 36014 } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) {
jpayne@68 36015 goto raise_overflow;
jpayne@68 36016 } else {
jpayne@68 36017 ret = 0;
jpayne@68 36018 }
jpayne@68 36019 #elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray)
jpayne@68 36020 int one = 1; int is_little = (int)*(unsigned char *)&one;
jpayne@68 36021 unsigned char *bytes = (unsigned char *)&val;
jpayne@68 36022 ret = _PyLong_AsByteArray((PyLongObject *)x,
jpayne@68 36023 bytes, sizeof(val),
jpayne@68 36024 is_little, !is_unsigned);
jpayne@68 36025 #else
jpayne@68 36026 PyObject *v;
jpayne@68 36027 PyObject *stepval = NULL, *mask = NULL, *shift = NULL;
jpayne@68 36028 int bits, remaining_bits, is_negative = 0;
jpayne@68 36029 int chunk_size = (sizeof(long) < 8) ? 30 : 62;
jpayne@68 36030 if (likely(PyLong_CheckExact(x))) {
jpayne@68 36031 v = __Pyx_NewRef(x);
jpayne@68 36032 } else {
jpayne@68 36033 v = PyNumber_Long(x);
jpayne@68 36034 if (unlikely(!v)) return (int64_t) -1;
jpayne@68 36035 assert(PyLong_CheckExact(v));
jpayne@68 36036 }
jpayne@68 36037 {
jpayne@68 36038 int result = PyObject_RichCompareBool(v, Py_False, Py_LT);
jpayne@68 36039 if (unlikely(result < 0)) {
jpayne@68 36040 Py_DECREF(v);
jpayne@68 36041 return (int64_t) -1;
jpayne@68 36042 }
jpayne@68 36043 is_negative = result == 1;
jpayne@68 36044 }
jpayne@68 36045 if (is_unsigned && unlikely(is_negative)) {
jpayne@68 36046 Py_DECREF(v);
jpayne@68 36047 goto raise_neg_overflow;
jpayne@68 36048 } else if (is_negative) {
jpayne@68 36049 stepval = PyNumber_Invert(v);
jpayne@68 36050 Py_DECREF(v);
jpayne@68 36051 if (unlikely(!stepval))
jpayne@68 36052 return (int64_t) -1;
jpayne@68 36053 } else {
jpayne@68 36054 stepval = v;
jpayne@68 36055 }
jpayne@68 36056 v = NULL;
jpayne@68 36057 val = (int64_t) 0;
jpayne@68 36058 mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done;
jpayne@68 36059 shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done;
jpayne@68 36060 for (bits = 0; bits < (int) sizeof(int64_t) * 8 - chunk_size; bits += chunk_size) {
jpayne@68 36061 PyObject *tmp, *digit;
jpayne@68 36062 long idigit;
jpayne@68 36063 digit = PyNumber_And(stepval, mask);
jpayne@68 36064 if (unlikely(!digit)) goto done;
jpayne@68 36065 idigit = PyLong_AsLong(digit);
jpayne@68 36066 Py_DECREF(digit);
jpayne@68 36067 if (unlikely(idigit < 0)) goto done;
jpayne@68 36068 val |= ((int64_t) idigit) << bits;
jpayne@68 36069 tmp = PyNumber_Rshift(stepval, shift);
jpayne@68 36070 if (unlikely(!tmp)) goto done;
jpayne@68 36071 Py_DECREF(stepval); stepval = tmp;
jpayne@68 36072 }
jpayne@68 36073 Py_DECREF(shift); shift = NULL;
jpayne@68 36074 Py_DECREF(mask); mask = NULL;
jpayne@68 36075 {
jpayne@68 36076 long idigit = PyLong_AsLong(stepval);
jpayne@68 36077 if (unlikely(idigit < 0)) goto done;
jpayne@68 36078 remaining_bits = ((int) sizeof(int64_t) * 8) - bits - (is_unsigned ? 0 : 1);
jpayne@68 36079 if (unlikely(idigit >= (1L << remaining_bits)))
jpayne@68 36080 goto raise_overflow;
jpayne@68 36081 val |= ((int64_t) idigit) << bits;
jpayne@68 36082 }
jpayne@68 36083 if (!is_unsigned) {
jpayne@68 36084 if (unlikely(val & (((int64_t) 1) << (sizeof(int64_t) * 8 - 1))))
jpayne@68 36085 goto raise_overflow;
jpayne@68 36086 if (is_negative)
jpayne@68 36087 val = ~val;
jpayne@68 36088 }
jpayne@68 36089 ret = 0;
jpayne@68 36090 done:
jpayne@68 36091 Py_XDECREF(shift);
jpayne@68 36092 Py_XDECREF(mask);
jpayne@68 36093 Py_XDECREF(stepval);
jpayne@68 36094 #endif
jpayne@68 36095 if (unlikely(ret))
jpayne@68 36096 return (int64_t) -1;
jpayne@68 36097 return val;
jpayne@68 36098 }
jpayne@68 36099 raise_overflow:
jpayne@68 36100 PyErr_SetString(PyExc_OverflowError,
jpayne@68 36101 "value too large to convert to int64_t");
jpayne@68 36102 return (int64_t) -1;
jpayne@68 36103 raise_neg_overflow:
jpayne@68 36104 PyErr_SetString(PyExc_OverflowError,
jpayne@68 36105 "can't convert negative value to int64_t");
jpayne@68 36106 return (int64_t) -1;
jpayne@68 36107 }
jpayne@68 36108
jpayne@68 36109 /* CIntToPy */
jpayne@68 36110 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int32_t(int32_t value) {
jpayne@68 36111 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
jpayne@68 36112 #pragma GCC diagnostic push
jpayne@68 36113 #pragma GCC diagnostic ignored "-Wconversion"
jpayne@68 36114 #endif
jpayne@68 36115 const int32_t neg_one = (int32_t) -1, const_zero = (int32_t) 0;
jpayne@68 36116 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
jpayne@68 36117 #pragma GCC diagnostic pop
jpayne@68 36118 #endif
jpayne@68 36119 const int is_unsigned = neg_one > const_zero;
jpayne@68 36120 if (is_unsigned) {
jpayne@68 36121 if (sizeof(int32_t) < sizeof(long)) {
jpayne@68 36122 return PyInt_FromLong((long) value);
jpayne@68 36123 } else if (sizeof(int32_t) <= sizeof(unsigned long)) {
jpayne@68 36124 return PyLong_FromUnsignedLong((unsigned long) value);
jpayne@68 36125 #ifdef HAVE_LONG_LONG
jpayne@68 36126 } else if (sizeof(int32_t) <= sizeof(unsigned PY_LONG_LONG)) {
jpayne@68 36127 return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
jpayne@68 36128 #endif
jpayne@68 36129 }
jpayne@68 36130 } else {
jpayne@68 36131 if (sizeof(int32_t) <= sizeof(long)) {
jpayne@68 36132 return PyInt_FromLong((long) value);
jpayne@68 36133 #ifdef HAVE_LONG_LONG
jpayne@68 36134 } else if (sizeof(int32_t) <= sizeof(PY_LONG_LONG)) {
jpayne@68 36135 return PyLong_FromLongLong((PY_LONG_LONG) value);
jpayne@68 36136 #endif
jpayne@68 36137 }
jpayne@68 36138 }
jpayne@68 36139 {
jpayne@68 36140 unsigned char *bytes = (unsigned char *)&value;
jpayne@68 36141 #if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
jpayne@68 36142 if (is_unsigned) {
jpayne@68 36143 return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1);
jpayne@68 36144 } else {
jpayne@68 36145 return PyLong_FromNativeBytes(bytes, sizeof(value), -1);
jpayne@68 36146 }
jpayne@68 36147 #elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
jpayne@68 36148 int one = 1; int little = (int)*(unsigned char *)&one;
jpayne@68 36149 return _PyLong_FromByteArray(bytes, sizeof(int32_t),
jpayne@68 36150 little, !is_unsigned);
jpayne@68 36151 #else
jpayne@68 36152 int one = 1; int little = (int)*(unsigned char *)&one;
jpayne@68 36153 PyObject *from_bytes, *result = NULL;
jpayne@68 36154 PyObject *py_bytes = NULL, *arg_tuple = NULL, *kwds = NULL, *order_str = NULL;
jpayne@68 36155 from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
jpayne@68 36156 if (!from_bytes) return NULL;
jpayne@68 36157 py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(int32_t));
jpayne@68 36158 if (!py_bytes) goto limited_bad;
jpayne@68 36159 order_str = PyUnicode_FromString(little ? "little" : "big");
jpayne@68 36160 if (!order_str) goto limited_bad;
jpayne@68 36161 arg_tuple = PyTuple_Pack(2, py_bytes, order_str);
jpayne@68 36162 if (!arg_tuple) goto limited_bad;
jpayne@68 36163 if (!is_unsigned) {
jpayne@68 36164 kwds = PyDict_New();
jpayne@68 36165 if (!kwds) goto limited_bad;
jpayne@68 36166 if (PyDict_SetItemString(kwds, "signed", __Pyx_NewRef(Py_True))) goto limited_bad;
jpayne@68 36167 }
jpayne@68 36168 result = PyObject_Call(from_bytes, arg_tuple, kwds);
jpayne@68 36169 limited_bad:
jpayne@68 36170 Py_XDECREF(kwds);
jpayne@68 36171 Py_XDECREF(arg_tuple);
jpayne@68 36172 Py_XDECREF(order_str);
jpayne@68 36173 Py_XDECREF(py_bytes);
jpayne@68 36174 Py_XDECREF(from_bytes);
jpayne@68 36175 return result;
jpayne@68 36176 #endif
jpayne@68 36177 }
jpayne@68 36178 }
jpayne@68 36179
jpayne@68 36180 /* CIntToPy */
jpayne@68 36181 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) {
jpayne@68 36182 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
jpayne@68 36183 #pragma GCC diagnostic push
jpayne@68 36184 #pragma GCC diagnostic ignored "-Wconversion"
jpayne@68 36185 #endif
jpayne@68 36186 const long neg_one = (long) -1, const_zero = (long) 0;
jpayne@68 36187 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
jpayne@68 36188 #pragma GCC diagnostic pop
jpayne@68 36189 #endif
jpayne@68 36190 const int is_unsigned = neg_one > const_zero;
jpayne@68 36191 if (is_unsigned) {
jpayne@68 36192 if (sizeof(long) < sizeof(long)) {
jpayne@68 36193 return PyInt_FromLong((long) value);
jpayne@68 36194 } else if (sizeof(long) <= sizeof(unsigned long)) {
jpayne@68 36195 return PyLong_FromUnsignedLong((unsigned long) value);
jpayne@68 36196 #ifdef HAVE_LONG_LONG
jpayne@68 36197 } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
jpayne@68 36198 return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
jpayne@68 36199 #endif
jpayne@68 36200 }
jpayne@68 36201 } else {
jpayne@68 36202 if (sizeof(long) <= sizeof(long)) {
jpayne@68 36203 return PyInt_FromLong((long) value);
jpayne@68 36204 #ifdef HAVE_LONG_LONG
jpayne@68 36205 } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
jpayne@68 36206 return PyLong_FromLongLong((PY_LONG_LONG) value);
jpayne@68 36207 #endif
jpayne@68 36208 }
jpayne@68 36209 }
jpayne@68 36210 {
jpayne@68 36211 unsigned char *bytes = (unsigned char *)&value;
jpayne@68 36212 #if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
jpayne@68 36213 if (is_unsigned) {
jpayne@68 36214 return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1);
jpayne@68 36215 } else {
jpayne@68 36216 return PyLong_FromNativeBytes(bytes, sizeof(value), -1);
jpayne@68 36217 }
jpayne@68 36218 #elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
jpayne@68 36219 int one = 1; int little = (int)*(unsigned char *)&one;
jpayne@68 36220 return _PyLong_FromByteArray(bytes, sizeof(long),
jpayne@68 36221 little, !is_unsigned);
jpayne@68 36222 #else
jpayne@68 36223 int one = 1; int little = (int)*(unsigned char *)&one;
jpayne@68 36224 PyObject *from_bytes, *result = NULL;
jpayne@68 36225 PyObject *py_bytes = NULL, *arg_tuple = NULL, *kwds = NULL, *order_str = NULL;
jpayne@68 36226 from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
jpayne@68 36227 if (!from_bytes) return NULL;
jpayne@68 36228 py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(long));
jpayne@68 36229 if (!py_bytes) goto limited_bad;
jpayne@68 36230 order_str = PyUnicode_FromString(little ? "little" : "big");
jpayne@68 36231 if (!order_str) goto limited_bad;
jpayne@68 36232 arg_tuple = PyTuple_Pack(2, py_bytes, order_str);
jpayne@68 36233 if (!arg_tuple) goto limited_bad;
jpayne@68 36234 if (!is_unsigned) {
jpayne@68 36235 kwds = PyDict_New();
jpayne@68 36236 if (!kwds) goto limited_bad;
jpayne@68 36237 if (PyDict_SetItemString(kwds, "signed", __Pyx_NewRef(Py_True))) goto limited_bad;
jpayne@68 36238 }
jpayne@68 36239 result = PyObject_Call(from_bytes, arg_tuple, kwds);
jpayne@68 36240 limited_bad:
jpayne@68 36241 Py_XDECREF(kwds);
jpayne@68 36242 Py_XDECREF(arg_tuple);
jpayne@68 36243 Py_XDECREF(order_str);
jpayne@68 36244 Py_XDECREF(py_bytes);
jpayne@68 36245 Py_XDECREF(from_bytes);
jpayne@68 36246 return result;
jpayne@68 36247 #endif
jpayne@68 36248 }
jpayne@68 36249 }
jpayne@68 36250
jpayne@68 36251 /* CIntFromPy */
jpayne@68 36252 static CYTHON_INLINE int32_t __Pyx_PyInt_As_int32_t(PyObject *x) {
jpayne@68 36253 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
jpayne@68 36254 #pragma GCC diagnostic push
jpayne@68 36255 #pragma GCC diagnostic ignored "-Wconversion"
jpayne@68 36256 #endif
jpayne@68 36257 const int32_t neg_one = (int32_t) -1, const_zero = (int32_t) 0;
jpayne@68 36258 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
jpayne@68 36259 #pragma GCC diagnostic pop
jpayne@68 36260 #endif
jpayne@68 36261 const int is_unsigned = neg_one > const_zero;
jpayne@68 36262 #if PY_MAJOR_VERSION < 3
jpayne@68 36263 if (likely(PyInt_Check(x))) {
jpayne@68 36264 if ((sizeof(int32_t) < sizeof(long))) {
jpayne@68 36265 __PYX_VERIFY_RETURN_INT(int32_t, long, PyInt_AS_LONG(x))
jpayne@68 36266 } else {
jpayne@68 36267 long val = PyInt_AS_LONG(x);
jpayne@68 36268 if (is_unsigned && unlikely(val < 0)) {
jpayne@68 36269 goto raise_neg_overflow;
jpayne@68 36270 }
jpayne@68 36271 return (int32_t) val;
jpayne@68 36272 }
jpayne@68 36273 }
jpayne@68 36274 #endif
jpayne@68 36275 if (unlikely(!PyLong_Check(x))) {
jpayne@68 36276 int32_t val;
jpayne@68 36277 PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
jpayne@68 36278 if (!tmp) return (int32_t) -1;
jpayne@68 36279 val = __Pyx_PyInt_As_int32_t(tmp);
jpayne@68 36280 Py_DECREF(tmp);
jpayne@68 36281 return val;
jpayne@68 36282 }
jpayne@68 36283 if (is_unsigned) {
jpayne@68 36284 #if CYTHON_USE_PYLONG_INTERNALS
jpayne@68 36285 if (unlikely(__Pyx_PyLong_IsNeg(x))) {
jpayne@68 36286 goto raise_neg_overflow;
jpayne@68 36287 } else if (__Pyx_PyLong_IsCompact(x)) {
jpayne@68 36288 __PYX_VERIFY_RETURN_INT(int32_t, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x))
jpayne@68 36289 } else {
jpayne@68 36290 const digit* digits = __Pyx_PyLong_Digits(x);
jpayne@68 36291 assert(__Pyx_PyLong_DigitCount(x) > 1);
jpayne@68 36292 switch (__Pyx_PyLong_DigitCount(x)) {
jpayne@68 36293 case 2:
jpayne@68 36294 if ((8 * sizeof(int32_t) > 1 * PyLong_SHIFT)) {
jpayne@68 36295 if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
jpayne@68 36296 __PYX_VERIFY_RETURN_INT(int32_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
jpayne@68 36297 } else if ((8 * sizeof(int32_t) >= 2 * PyLong_SHIFT)) {
jpayne@68 36298 return (int32_t) (((((int32_t)digits[1]) << PyLong_SHIFT) | (int32_t)digits[0]));
jpayne@68 36299 }
jpayne@68 36300 }
jpayne@68 36301 break;
jpayne@68 36302 case 3:
jpayne@68 36303 if ((8 * sizeof(int32_t) > 2 * PyLong_SHIFT)) {
jpayne@68 36304 if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
jpayne@68 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@68 36306 } else if ((8 * sizeof(int32_t) >= 3 * PyLong_SHIFT)) {
jpayne@68 36307 return (int32_t) (((((((int32_t)digits[2]) << PyLong_SHIFT) | (int32_t)digits[1]) << PyLong_SHIFT) | (int32_t)digits[0]));
jpayne@68 36308 }
jpayne@68 36309 }
jpayne@68 36310 break;
jpayne@68 36311 case 4:
jpayne@68 36312 if ((8 * sizeof(int32_t) > 3 * PyLong_SHIFT)) {
jpayne@68 36313 if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
jpayne@68 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@68 36315 } else if ((8 * sizeof(int32_t) >= 4 * PyLong_SHIFT)) {
jpayne@68 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@68 36317 }
jpayne@68 36318 }
jpayne@68 36319 break;
jpayne@68 36320 }
jpayne@68 36321 }
jpayne@68 36322 #endif
jpayne@68 36323 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7
jpayne@68 36324 if (unlikely(Py_SIZE(x) < 0)) {
jpayne@68 36325 goto raise_neg_overflow;
jpayne@68 36326 }
jpayne@68 36327 #else
jpayne@68 36328 {
jpayne@68 36329 int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
jpayne@68 36330 if (unlikely(result < 0))
jpayne@68 36331 return (int32_t) -1;
jpayne@68 36332 if (unlikely(result == 1))
jpayne@68 36333 goto raise_neg_overflow;
jpayne@68 36334 }
jpayne@68 36335 #endif
jpayne@68 36336 if ((sizeof(int32_t) <= sizeof(unsigned long))) {
jpayne@68 36337 __PYX_VERIFY_RETURN_INT_EXC(int32_t, unsigned long, PyLong_AsUnsignedLong(x))
jpayne@68 36338 #ifdef HAVE_LONG_LONG
jpayne@68 36339 } else if ((sizeof(int32_t) <= sizeof(unsigned PY_LONG_LONG))) {
jpayne@68 36340 __PYX_VERIFY_RETURN_INT_EXC(int32_t, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
jpayne@68 36341 #endif
jpayne@68 36342 }
jpayne@68 36343 } else {
jpayne@68 36344 #if CYTHON_USE_PYLONG_INTERNALS
jpayne@68 36345 if (__Pyx_PyLong_IsCompact(x)) {
jpayne@68 36346 __PYX_VERIFY_RETURN_INT(int32_t, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x))
jpayne@68 36347 } else {
jpayne@68 36348 const digit* digits = __Pyx_PyLong_Digits(x);
jpayne@68 36349 assert(__Pyx_PyLong_DigitCount(x) > 1);
jpayne@68 36350 switch (__Pyx_PyLong_SignedDigitCount(x)) {
jpayne@68 36351 case -2:
jpayne@68 36352 if ((8 * sizeof(int32_t) - 1 > 1 * PyLong_SHIFT)) {
jpayne@68 36353 if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
jpayne@68 36354 __PYX_VERIFY_RETURN_INT(int32_t, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
jpayne@68 36355 } else if ((8 * sizeof(int32_t) - 1 > 2 * PyLong_SHIFT)) {
jpayne@68 36356 return (int32_t) (((int32_t)-1)*(((((int32_t)digits[1]) << PyLong_SHIFT) | (int32_t)digits[0])));
jpayne@68 36357 }
jpayne@68 36358 }
jpayne@68 36359 break;
jpayne@68 36360 case 2:
jpayne@68 36361 if ((8 * sizeof(int32_t) > 1 * PyLong_SHIFT)) {
jpayne@68 36362 if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
jpayne@68 36363 __PYX_VERIFY_RETURN_INT(int32_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
jpayne@68 36364 } else if ((8 * sizeof(int32_t) - 1 > 2 * PyLong_SHIFT)) {
jpayne@68 36365 return (int32_t) ((((((int32_t)digits[1]) << PyLong_SHIFT) | (int32_t)digits[0])));
jpayne@68 36366 }
jpayne@68 36367 }
jpayne@68 36368 break;
jpayne@68 36369 case -3:
jpayne@68 36370 if ((8 * sizeof(int32_t) - 1 > 2 * PyLong_SHIFT)) {
jpayne@68 36371 if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
jpayne@68 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@68 36373 } else if ((8 * sizeof(int32_t) - 1 > 3 * PyLong_SHIFT)) {
jpayne@68 36374 return (int32_t) (((int32_t)-1)*(((((((int32_t)digits[2]) << PyLong_SHIFT) | (int32_t)digits[1]) << PyLong_SHIFT) | (int32_t)digits[0])));
jpayne@68 36375 }
jpayne@68 36376 }
jpayne@68 36377 break;
jpayne@68 36378 case 3:
jpayne@68 36379 if ((8 * sizeof(int32_t) > 2 * PyLong_SHIFT)) {
jpayne@68 36380 if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
jpayne@68 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@68 36382 } else if ((8 * sizeof(int32_t) - 1 > 3 * PyLong_SHIFT)) {
jpayne@68 36383 return (int32_t) ((((((((int32_t)digits[2]) << PyLong_SHIFT) | (int32_t)digits[1]) << PyLong_SHIFT) | (int32_t)digits[0])));
jpayne@68 36384 }
jpayne@68 36385 }
jpayne@68 36386 break;
jpayne@68 36387 case -4:
jpayne@68 36388 if ((8 * sizeof(int32_t) - 1 > 3 * PyLong_SHIFT)) {
jpayne@68 36389 if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
jpayne@68 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@68 36391 } else if ((8 * sizeof(int32_t) - 1 > 4 * PyLong_SHIFT)) {
jpayne@68 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@68 36393 }
jpayne@68 36394 }
jpayne@68 36395 break;
jpayne@68 36396 case 4:
jpayne@68 36397 if ((8 * sizeof(int32_t) > 3 * PyLong_SHIFT)) {
jpayne@68 36398 if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
jpayne@68 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@68 36400 } else if ((8 * sizeof(int32_t) - 1 > 4 * PyLong_SHIFT)) {
jpayne@68 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@68 36402 }
jpayne@68 36403 }
jpayne@68 36404 break;
jpayne@68 36405 }
jpayne@68 36406 }
jpayne@68 36407 #endif
jpayne@68 36408 if ((sizeof(int32_t) <= sizeof(long))) {
jpayne@68 36409 __PYX_VERIFY_RETURN_INT_EXC(int32_t, long, PyLong_AsLong(x))
jpayne@68 36410 #ifdef HAVE_LONG_LONG
jpayne@68 36411 } else if ((sizeof(int32_t) <= sizeof(PY_LONG_LONG))) {
jpayne@68 36412 __PYX_VERIFY_RETURN_INT_EXC(int32_t, PY_LONG_LONG, PyLong_AsLongLong(x))
jpayne@68 36413 #endif
jpayne@68 36414 }
jpayne@68 36415 }
jpayne@68 36416 {
jpayne@68 36417 int32_t val;
jpayne@68 36418 int ret = -1;
jpayne@68 36419 #if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API
jpayne@68 36420 Py_ssize_t bytes_copied = PyLong_AsNativeBytes(
jpayne@68 36421 x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0));
jpayne@68 36422 if (unlikely(bytes_copied == -1)) {
jpayne@68 36423 } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) {
jpayne@68 36424 goto raise_overflow;
jpayne@68 36425 } else {
jpayne@68 36426 ret = 0;
jpayne@68 36427 }
jpayne@68 36428 #elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray)
jpayne@68 36429 int one = 1; int is_little = (int)*(unsigned char *)&one;
jpayne@68 36430 unsigned char *bytes = (unsigned char *)&val;
jpayne@68 36431 ret = _PyLong_AsByteArray((PyLongObject *)x,
jpayne@68 36432 bytes, sizeof(val),
jpayne@68 36433 is_little, !is_unsigned);
jpayne@68 36434 #else
jpayne@68 36435 PyObject *v;
jpayne@68 36436 PyObject *stepval = NULL, *mask = NULL, *shift = NULL;
jpayne@68 36437 int bits, remaining_bits, is_negative = 0;
jpayne@68 36438 int chunk_size = (sizeof(long) < 8) ? 30 : 62;
jpayne@68 36439 if (likely(PyLong_CheckExact(x))) {
jpayne@68 36440 v = __Pyx_NewRef(x);
jpayne@68 36441 } else {
jpayne@68 36442 v = PyNumber_Long(x);
jpayne@68 36443 if (unlikely(!v)) return (int32_t) -1;
jpayne@68 36444 assert(PyLong_CheckExact(v));
jpayne@68 36445 }
jpayne@68 36446 {
jpayne@68 36447 int result = PyObject_RichCompareBool(v, Py_False, Py_LT);
jpayne@68 36448 if (unlikely(result < 0)) {
jpayne@68 36449 Py_DECREF(v);
jpayne@68 36450 return (int32_t) -1;
jpayne@68 36451 }
jpayne@68 36452 is_negative = result == 1;
jpayne@68 36453 }
jpayne@68 36454 if (is_unsigned && unlikely(is_negative)) {
jpayne@68 36455 Py_DECREF(v);
jpayne@68 36456 goto raise_neg_overflow;
jpayne@68 36457 } else if (is_negative) {
jpayne@68 36458 stepval = PyNumber_Invert(v);
jpayne@68 36459 Py_DECREF(v);
jpayne@68 36460 if (unlikely(!stepval))
jpayne@68 36461 return (int32_t) -1;
jpayne@68 36462 } else {
jpayne@68 36463 stepval = v;
jpayne@68 36464 }
jpayne@68 36465 v = NULL;
jpayne@68 36466 val = (int32_t) 0;
jpayne@68 36467 mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done;
jpayne@68 36468 shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done;
jpayne@68 36469 for (bits = 0; bits < (int) sizeof(int32_t) * 8 - chunk_size; bits += chunk_size) {
jpayne@68 36470 PyObject *tmp, *digit;
jpayne@68 36471 long idigit;
jpayne@68 36472 digit = PyNumber_And(stepval, mask);
jpayne@68 36473 if (unlikely(!digit)) goto done;
jpayne@68 36474 idigit = PyLong_AsLong(digit);
jpayne@68 36475 Py_DECREF(digit);
jpayne@68 36476 if (unlikely(idigit < 0)) goto done;
jpayne@68 36477 val |= ((int32_t) idigit) << bits;
jpayne@68 36478 tmp = PyNumber_Rshift(stepval, shift);
jpayne@68 36479 if (unlikely(!tmp)) goto done;
jpayne@68 36480 Py_DECREF(stepval); stepval = tmp;
jpayne@68 36481 }
jpayne@68 36482 Py_DECREF(shift); shift = NULL;
jpayne@68 36483 Py_DECREF(mask); mask = NULL;
jpayne@68 36484 {
jpayne@68 36485 long idigit = PyLong_AsLong(stepval);
jpayne@68 36486 if (unlikely(idigit < 0)) goto done;
jpayne@68 36487 remaining_bits = ((int) sizeof(int32_t) * 8) - bits - (is_unsigned ? 0 : 1);
jpayne@68 36488 if (unlikely(idigit >= (1L << remaining_bits)))
jpayne@68 36489 goto raise_overflow;
jpayne@68 36490 val |= ((int32_t) idigit) << bits;
jpayne@68 36491 }
jpayne@68 36492 if (!is_unsigned) {
jpayne@68 36493 if (unlikely(val & (((int32_t) 1) << (sizeof(int32_t) * 8 - 1))))
jpayne@68 36494 goto raise_overflow;
jpayne@68 36495 if (is_negative)
jpayne@68 36496 val = ~val;
jpayne@68 36497 }
jpayne@68 36498 ret = 0;
jpayne@68 36499 done:
jpayne@68 36500 Py_XDECREF(shift);
jpayne@68 36501 Py_XDECREF(mask);
jpayne@68 36502 Py_XDECREF(stepval);
jpayne@68 36503 #endif
jpayne@68 36504 if (unlikely(ret))
jpayne@68 36505 return (int32_t) -1;
jpayne@68 36506 return val;
jpayne@68 36507 }
jpayne@68 36508 raise_overflow:
jpayne@68 36509 PyErr_SetString(PyExc_OverflowError,
jpayne@68 36510 "value too large to convert to int32_t");
jpayne@68 36511 return (int32_t) -1;
jpayne@68 36512 raise_neg_overflow:
jpayne@68 36513 PyErr_SetString(PyExc_OverflowError,
jpayne@68 36514 "can't convert negative value to int32_t");
jpayne@68 36515 return (int32_t) -1;
jpayne@68 36516 }
jpayne@68 36517
jpayne@68 36518 /* FormatTypeName */
jpayne@68 36519 #if CYTHON_COMPILING_IN_LIMITED_API
jpayne@68 36520 static __Pyx_TypeName
jpayne@68 36521 __Pyx_PyType_GetName(PyTypeObject* tp)
jpayne@68 36522 {
jpayne@68 36523 PyObject *name = __Pyx_PyObject_GetAttrStr((PyObject *)tp,
jpayne@68 36524 __pyx_n_s_name);
jpayne@68 36525 if (unlikely(name == NULL) || unlikely(!PyUnicode_Check(name))) {
jpayne@68 36526 PyErr_Clear();
jpayne@68 36527 Py_XDECREF(name);
jpayne@68 36528 name = __Pyx_NewRef(__pyx_n_s__78);
jpayne@68 36529 }
jpayne@68 36530 return name;
jpayne@68 36531 }
jpayne@68 36532 #endif
jpayne@68 36533
jpayne@68 36534 /* FastTypeChecks */
jpayne@68 36535 #if CYTHON_COMPILING_IN_CPYTHON
jpayne@68 36536 static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) {
jpayne@68 36537 while (a) {
jpayne@68 36538 a = __Pyx_PyType_GetSlot(a, tp_base, PyTypeObject*);
jpayne@68 36539 if (a == b)
jpayne@68 36540 return 1;
jpayne@68 36541 }
jpayne@68 36542 return b == &PyBaseObject_Type;
jpayne@68 36543 }
jpayne@68 36544 static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b) {
jpayne@68 36545 PyObject *mro;
jpayne@68 36546 if (a == b) return 1;
jpayne@68 36547 mro = a->tp_mro;
jpayne@68 36548 if (likely(mro)) {
jpayne@68 36549 Py_ssize_t i, n;
jpayne@68 36550 n = PyTuple_GET_SIZE(mro);
jpayne@68 36551 for (i = 0; i < n; i++) {
jpayne@68 36552 if (PyTuple_GET_ITEM(mro, i) == (PyObject *)b)
jpayne@68 36553 return 1;
jpayne@68 36554 }
jpayne@68 36555 return 0;
jpayne@68 36556 }
jpayne@68 36557 return __Pyx_InBases(a, b);
jpayne@68 36558 }
jpayne@68 36559 static CYTHON_INLINE int __Pyx_IsAnySubtype2(PyTypeObject *cls, PyTypeObject *a, PyTypeObject *b) {
jpayne@68 36560 PyObject *mro;
jpayne@68 36561 if (cls == a || cls == b) return 1;
jpayne@68 36562 mro = cls->tp_mro;
jpayne@68 36563 if (likely(mro)) {
jpayne@68 36564 Py_ssize_t i, n;
jpayne@68 36565 n = PyTuple_GET_SIZE(mro);
jpayne@68 36566 for (i = 0; i < n; i++) {
jpayne@68 36567 PyObject *base = PyTuple_GET_ITEM(mro, i);
jpayne@68 36568 if (base == (PyObject *)a || base == (PyObject *)b)
jpayne@68 36569 return 1;
jpayne@68 36570 }
jpayne@68 36571 return 0;
jpayne@68 36572 }
jpayne@68 36573 return __Pyx_InBases(cls, a) || __Pyx_InBases(cls, b);
jpayne@68 36574 }
jpayne@68 36575 #if PY_MAJOR_VERSION == 2
jpayne@68 36576 static int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject* exc_type2) {
jpayne@68 36577 PyObject *exception, *value, *tb;
jpayne@68 36578 int res;
jpayne@68 36579 __Pyx_PyThreadState_declare
jpayne@68 36580 __Pyx_PyThreadState_assign
jpayne@68 36581 __Pyx_ErrFetch(&exception, &value, &tb);
jpayne@68 36582 res = exc_type1 ? PyObject_IsSubclass(err, exc_type1) : 0;
jpayne@68 36583 if (unlikely(res == -1)) {
jpayne@68 36584 PyErr_WriteUnraisable(err);
jpayne@68 36585 res = 0;
jpayne@68 36586 }
jpayne@68 36587 if (!res) {
jpayne@68 36588 res = PyObject_IsSubclass(err, exc_type2);
jpayne@68 36589 if (unlikely(res == -1)) {
jpayne@68 36590 PyErr_WriteUnraisable(err);
jpayne@68 36591 res = 0;
jpayne@68 36592 }
jpayne@68 36593 }
jpayne@68 36594 __Pyx_ErrRestore(exception, value, tb);
jpayne@68 36595 return res;
jpayne@68 36596 }
jpayne@68 36597 #else
jpayne@68 36598 static CYTHON_INLINE int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject *exc_type2) {
jpayne@68 36599 if (exc_type1) {
jpayne@68 36600 return __Pyx_IsAnySubtype2((PyTypeObject*)err, (PyTypeObject*)exc_type1, (PyTypeObject*)exc_type2);
jpayne@68 36601 } else {
jpayne@68 36602 return __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type2);
jpayne@68 36603 }
jpayne@68 36604 }
jpayne@68 36605 #endif
jpayne@68 36606 static int __Pyx_PyErr_GivenExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
jpayne@68 36607 Py_ssize_t i, n;
jpayne@68 36608 assert(PyExceptionClass_Check(exc_type));
jpayne@68 36609 n = PyTuple_GET_SIZE(tuple);
jpayne@68 36610 #if PY_MAJOR_VERSION >= 3
jpayne@68 36611 for (i=0; i<n; i++) {
jpayne@68 36612 if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
jpayne@68 36613 }
jpayne@68 36614 #endif
jpayne@68 36615 for (i=0; i<n; i++) {
jpayne@68 36616 PyObject *t = PyTuple_GET_ITEM(tuple, i);
jpayne@68 36617 #if PY_MAJOR_VERSION < 3
jpayne@68 36618 if (likely(exc_type == t)) return 1;
jpayne@68 36619 #endif
jpayne@68 36620 if (likely(PyExceptionClass_Check(t))) {
jpayne@68 36621 if (__Pyx_inner_PyErr_GivenExceptionMatches2(exc_type, NULL, t)) return 1;
jpayne@68 36622 } else {
jpayne@68 36623 }
jpayne@68 36624 }
jpayne@68 36625 return 0;
jpayne@68 36626 }
jpayne@68 36627 static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject* exc_type) {
jpayne@68 36628 if (likely(err == exc_type)) return 1;
jpayne@68 36629 if (likely(PyExceptionClass_Check(err))) {
jpayne@68 36630 if (likely(PyExceptionClass_Check(exc_type))) {
jpayne@68 36631 return __Pyx_inner_PyErr_GivenExceptionMatches2(err, NULL, exc_type);
jpayne@68 36632 } else if (likely(PyTuple_Check(exc_type))) {
jpayne@68 36633 return __Pyx_PyErr_GivenExceptionMatchesTuple(err, exc_type);
jpayne@68 36634 } else {
jpayne@68 36635 }
jpayne@68 36636 }
jpayne@68 36637 return PyErr_GivenExceptionMatches(err, exc_type);
jpayne@68 36638 }
jpayne@68 36639 static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *exc_type1, PyObject *exc_type2) {
jpayne@68 36640 assert(PyExceptionClass_Check(exc_type1));
jpayne@68 36641 assert(PyExceptionClass_Check(exc_type2));
jpayne@68 36642 if (likely(err == exc_type1 || err == exc_type2)) return 1;
jpayne@68 36643 if (likely(PyExceptionClass_Check(err))) {
jpayne@68 36644 return __Pyx_inner_PyErr_GivenExceptionMatches2(err, exc_type1, exc_type2);
jpayne@68 36645 }
jpayne@68 36646 return (PyErr_GivenExceptionMatches(err, exc_type1) || PyErr_GivenExceptionMatches(err, exc_type2));
jpayne@68 36647 }
jpayne@68 36648 #endif
jpayne@68 36649
jpayne@68 36650 /* CheckBinaryVersion */
jpayne@68 36651 static unsigned long __Pyx_get_runtime_version(void) {
jpayne@68 36652 #if __PYX_LIMITED_VERSION_HEX >= 0x030B00A4
jpayne@68 36653 return Py_Version & ~0xFFUL;
jpayne@68 36654 #else
jpayne@68 36655 const char* rt_version = Py_GetVersion();
jpayne@68 36656 unsigned long version = 0;
jpayne@68 36657 unsigned long factor = 0x01000000UL;
jpayne@68 36658 unsigned int digit = 0;
jpayne@68 36659 int i = 0;
jpayne@68 36660 while (factor) {
jpayne@68 36661 while ('0' <= rt_version[i] && rt_version[i] <= '9') {
jpayne@68 36662 digit = digit * 10 + (unsigned int) (rt_version[i] - '0');
jpayne@68 36663 ++i;
jpayne@68 36664 }
jpayne@68 36665 version += factor * digit;
jpayne@68 36666 if (rt_version[i] != '.')
jpayne@68 36667 break;
jpayne@68 36668 digit = 0;
jpayne@68 36669 factor >>= 8;
jpayne@68 36670 ++i;
jpayne@68 36671 }
jpayne@68 36672 return version;
jpayne@68 36673 #endif
jpayne@68 36674 }
jpayne@68 36675 static int __Pyx_check_binary_version(unsigned long ct_version, unsigned long rt_version, int allow_newer) {
jpayne@68 36676 const unsigned long MAJOR_MINOR = 0xFFFF0000UL;
jpayne@68 36677 if ((rt_version & MAJOR_MINOR) == (ct_version & MAJOR_MINOR))
jpayne@68 36678 return 0;
jpayne@68 36679 if (likely(allow_newer && (rt_version & MAJOR_MINOR) > (ct_version & MAJOR_MINOR)))
jpayne@68 36680 return 1;
jpayne@68 36681 {
jpayne@68 36682 char message[200];
jpayne@68 36683 PyOS_snprintf(message, sizeof(message),
jpayne@68 36684 "compile time Python version %d.%d "
jpayne@68 36685 "of module '%.100s' "
jpayne@68 36686 "%s "
jpayne@68 36687 "runtime version %d.%d",
jpayne@68 36688 (int) (ct_version >> 24), (int) ((ct_version >> 16) & 0xFF),
jpayne@68 36689 __Pyx_MODULE_NAME,
jpayne@68 36690 (allow_newer) ? "was newer than" : "does not match",
jpayne@68 36691 (int) (rt_version >> 24), (int) ((rt_version >> 16) & 0xFF)
jpayne@68 36692 );
jpayne@68 36693 return PyErr_WarnEx(NULL, message, 1);
jpayne@68 36694 }
jpayne@68 36695 }
jpayne@68 36696
jpayne@68 36697 /* FunctionImport */
jpayne@68 36698 #ifndef __PYX_HAVE_RT_ImportFunction_3_0_11
jpayne@68 36699 #define __PYX_HAVE_RT_ImportFunction_3_0_11
jpayne@68 36700 static int __Pyx_ImportFunction_3_0_11(PyObject *module, const char *funcname, void (**f)(void), const char *sig) {
jpayne@68 36701 PyObject *d = 0;
jpayne@68 36702 PyObject *cobj = 0;
jpayne@68 36703 union {
jpayne@68 36704 void (*fp)(void);
jpayne@68 36705 void *p;
jpayne@68 36706 } tmp;
jpayne@68 36707 d = PyObject_GetAttrString(module, (char *)"__pyx_capi__");
jpayne@68 36708 if (!d)
jpayne@68 36709 goto bad;
jpayne@68 36710 cobj = PyDict_GetItemString(d, funcname);
jpayne@68 36711 if (!cobj) {
jpayne@68 36712 PyErr_Format(PyExc_ImportError,
jpayne@68 36713 "%.200s does not export expected C function %.200s",
jpayne@68 36714 PyModule_GetName(module), funcname);
jpayne@68 36715 goto bad;
jpayne@68 36716 }
jpayne@68 36717 if (!PyCapsule_IsValid(cobj, sig)) {
jpayne@68 36718 PyErr_Format(PyExc_TypeError,
jpayne@68 36719 "C function %.200s.%.200s has wrong signature (expected %.500s, got %.500s)",
jpayne@68 36720 PyModule_GetName(module), funcname, sig, PyCapsule_GetName(cobj));
jpayne@68 36721 goto bad;
jpayne@68 36722 }
jpayne@68 36723 tmp.p = PyCapsule_GetPointer(cobj, sig);
jpayne@68 36724 *f = tmp.fp;
jpayne@68 36725 if (!(*f))
jpayne@68 36726 goto bad;
jpayne@68 36727 Py_DECREF(d);
jpayne@68 36728 return 0;
jpayne@68 36729 bad:
jpayne@68 36730 Py_XDECREF(d);
jpayne@68 36731 return -1;
jpayne@68 36732 }
jpayne@68 36733 #endif
jpayne@68 36734
jpayne@68 36735 /* InitStrings */
jpayne@68 36736 #if PY_MAJOR_VERSION >= 3
jpayne@68 36737 static int __Pyx_InitString(__Pyx_StringTabEntry t, PyObject **str) {
jpayne@68 36738 if (t.is_unicode | t.is_str) {
jpayne@68 36739 if (t.intern) {
jpayne@68 36740 *str = PyUnicode_InternFromString(t.s);
jpayne@68 36741 } else if (t.encoding) {
jpayne@68 36742 *str = PyUnicode_Decode(t.s, t.n - 1, t.encoding, NULL);
jpayne@68 36743 } else {
jpayne@68 36744 *str = PyUnicode_FromStringAndSize(t.s, t.n - 1);
jpayne@68 36745 }
jpayne@68 36746 } else {
jpayne@68 36747 *str = PyBytes_FromStringAndSize(t.s, t.n - 1);
jpayne@68 36748 }
jpayne@68 36749 if (!*str)
jpayne@68 36750 return -1;
jpayne@68 36751 if (PyObject_Hash(*str) == -1)
jpayne@68 36752 return -1;
jpayne@68 36753 return 0;
jpayne@68 36754 }
jpayne@68 36755 #endif
jpayne@68 36756 static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) {
jpayne@68 36757 while (t->p) {
jpayne@68 36758 #if PY_MAJOR_VERSION >= 3
jpayne@68 36759 __Pyx_InitString(*t, t->p);
jpayne@68 36760 #else
jpayne@68 36761 if (t->is_unicode) {
jpayne@68 36762 *t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL);
jpayne@68 36763 } else if (t->intern) {
jpayne@68 36764 *t->p = PyString_InternFromString(t->s);
jpayne@68 36765 } else {
jpayne@68 36766 *t->p = PyString_FromStringAndSize(t->s, t->n - 1);
jpayne@68 36767 }
jpayne@68 36768 if (!*t->p)
jpayne@68 36769 return -1;
jpayne@68 36770 if (PyObject_Hash(*t->p) == -1)
jpayne@68 36771 return -1;
jpayne@68 36772 #endif
jpayne@68 36773 ++t;
jpayne@68 36774 }
jpayne@68 36775 return 0;
jpayne@68 36776 }
jpayne@68 36777
jpayne@68 36778 #include <string.h>
jpayne@68 36779 static CYTHON_INLINE Py_ssize_t __Pyx_ssize_strlen(const char *s) {
jpayne@68 36780 size_t len = strlen(s);
jpayne@68 36781 if (unlikely(len > (size_t) PY_SSIZE_T_MAX)) {
jpayne@68 36782 PyErr_SetString(PyExc_OverflowError, "byte string is too long");
jpayne@68 36783 return -1;
jpayne@68 36784 }
jpayne@68 36785 return (Py_ssize_t) len;
jpayne@68 36786 }
jpayne@68 36787 static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) {
jpayne@68 36788 Py_ssize_t len = __Pyx_ssize_strlen(c_str);
jpayne@68 36789 if (unlikely(len < 0)) return NULL;
jpayne@68 36790 return __Pyx_PyUnicode_FromStringAndSize(c_str, len);
jpayne@68 36791 }
jpayne@68 36792 static CYTHON_INLINE PyObject* __Pyx_PyByteArray_FromString(const char* c_str) {
jpayne@68 36793 Py_ssize_t len = __Pyx_ssize_strlen(c_str);
jpayne@68 36794 if (unlikely(len < 0)) return NULL;
jpayne@68 36795 return PyByteArray_FromStringAndSize(c_str, len);
jpayne@68 36796 }
jpayne@68 36797 static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject* o) {
jpayne@68 36798 Py_ssize_t ignore;
jpayne@68 36799 return __Pyx_PyObject_AsStringAndSize(o, &ignore);
jpayne@68 36800 }
jpayne@68 36801 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
jpayne@68 36802 #if !CYTHON_PEP393_ENABLED
jpayne@68 36803 static const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
jpayne@68 36804 char* defenc_c;
jpayne@68 36805 PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL);
jpayne@68 36806 if (!defenc) return NULL;
jpayne@68 36807 defenc_c = PyBytes_AS_STRING(defenc);
jpayne@68 36808 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
jpayne@68 36809 {
jpayne@68 36810 char* end = defenc_c + PyBytes_GET_SIZE(defenc);
jpayne@68 36811 char* c;
jpayne@68 36812 for (c = defenc_c; c < end; c++) {
jpayne@68 36813 if ((unsigned char) (*c) >= 128) {
jpayne@68 36814 PyUnicode_AsASCIIString(o);
jpayne@68 36815 return NULL;
jpayne@68 36816 }
jpayne@68 36817 }
jpayne@68 36818 }
jpayne@68 36819 #endif
jpayne@68 36820 *length = PyBytes_GET_SIZE(defenc);
jpayne@68 36821 return defenc_c;
jpayne@68 36822 }
jpayne@68 36823 #else
jpayne@68 36824 static CYTHON_INLINE const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
jpayne@68 36825 if (unlikely(__Pyx_PyUnicode_READY(o) == -1)) return NULL;
jpayne@68 36826 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
jpayne@68 36827 if (likely(PyUnicode_IS_ASCII(o))) {
jpayne@68 36828 *length = PyUnicode_GET_LENGTH(o);
jpayne@68 36829 return PyUnicode_AsUTF8(o);
jpayne@68 36830 } else {
jpayne@68 36831 PyUnicode_AsASCIIString(o);
jpayne@68 36832 return NULL;
jpayne@68 36833 }
jpayne@68 36834 #else
jpayne@68 36835 return PyUnicode_AsUTF8AndSize(o, length);
jpayne@68 36836 #endif
jpayne@68 36837 }
jpayne@68 36838 #endif
jpayne@68 36839 #endif
jpayne@68 36840 static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
jpayne@68 36841 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
jpayne@68 36842 if (
jpayne@68 36843 #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
jpayne@68 36844 __Pyx_sys_getdefaultencoding_not_ascii &&
jpayne@68 36845 #endif
jpayne@68 36846 PyUnicode_Check(o)) {
jpayne@68 36847 return __Pyx_PyUnicode_AsStringAndSize(o, length);
jpayne@68 36848 } else
jpayne@68 36849 #endif
jpayne@68 36850 #if (!CYTHON_COMPILING_IN_PYPY && !CYTHON_COMPILING_IN_LIMITED_API) || (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE))
jpayne@68 36851 if (PyByteArray_Check(o)) {
jpayne@68 36852 *length = PyByteArray_GET_SIZE(o);
jpayne@68 36853 return PyByteArray_AS_STRING(o);
jpayne@68 36854 } else
jpayne@68 36855 #endif
jpayne@68 36856 {
jpayne@68 36857 char* result;
jpayne@68 36858 int r = PyBytes_AsStringAndSize(o, &result, length);
jpayne@68 36859 if (unlikely(r < 0)) {
jpayne@68 36860 return NULL;
jpayne@68 36861 } else {
jpayne@68 36862 return result;
jpayne@68 36863 }
jpayne@68 36864 }
jpayne@68 36865 }
jpayne@68 36866 static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) {
jpayne@68 36867 int is_true = x == Py_True;
jpayne@68 36868 if (is_true | (x == Py_False) | (x == Py_None)) return is_true;
jpayne@68 36869 else return PyObject_IsTrue(x);
jpayne@68 36870 }
jpayne@68 36871 static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject* x) {
jpayne@68 36872 int retval;
jpayne@68 36873 if (unlikely(!x)) return -1;
jpayne@68 36874 retval = __Pyx_PyObject_IsTrue(x);
jpayne@68 36875 Py_DECREF(x);
jpayne@68 36876 return retval;
jpayne@68 36877 }
jpayne@68 36878 static PyObject* __Pyx_PyNumber_IntOrLongWrongResultType(PyObject* result, const char* type_name) {
jpayne@68 36879 __Pyx_TypeName result_type_name = __Pyx_PyType_GetName(Py_TYPE(result));
jpayne@68 36880 #if PY_MAJOR_VERSION >= 3
jpayne@68 36881 if (PyLong_Check(result)) {
jpayne@68 36882 if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1,
jpayne@68 36883 "__int__ returned non-int (type " __Pyx_FMT_TYPENAME "). "
jpayne@68 36884 "The ability to return an instance of a strict subclass of int is deprecated, "
jpayne@68 36885 "and may be removed in a future version of Python.",
jpayne@68 36886 result_type_name)) {
jpayne@68 36887 __Pyx_DECREF_TypeName(result_type_name);
jpayne@68 36888 Py_DECREF(result);
jpayne@68 36889 return NULL;
jpayne@68 36890 }
jpayne@68 36891 __Pyx_DECREF_TypeName(result_type_name);
jpayne@68 36892 return result;
jpayne@68 36893 }
jpayne@68 36894 #endif
jpayne@68 36895 PyErr_Format(PyExc_TypeError,
jpayne@68 36896 "__%.4s__ returned non-%.4s (type " __Pyx_FMT_TYPENAME ")",
jpayne@68 36897 type_name, type_name, result_type_name);
jpayne@68 36898 __Pyx_DECREF_TypeName(result_type_name);
jpayne@68 36899 Py_DECREF(result);
jpayne@68 36900 return NULL;
jpayne@68 36901 }
jpayne@68 36902 static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x) {
jpayne@68 36903 #if CYTHON_USE_TYPE_SLOTS
jpayne@68 36904 PyNumberMethods *m;
jpayne@68 36905 #endif
jpayne@68 36906 const char *name = NULL;
jpayne@68 36907 PyObject *res = NULL;
jpayne@68 36908 #if PY_MAJOR_VERSION < 3
jpayne@68 36909 if (likely(PyInt_Check(x) || PyLong_Check(x)))
jpayne@68 36910 #else
jpayne@68 36911 if (likely(PyLong_Check(x)))
jpayne@68 36912 #endif
jpayne@68 36913 return __Pyx_NewRef(x);
jpayne@68 36914 #if CYTHON_USE_TYPE_SLOTS
jpayne@68 36915 m = Py_TYPE(x)->tp_as_number;
jpayne@68 36916 #if PY_MAJOR_VERSION < 3
jpayne@68 36917 if (m && m->nb_int) {
jpayne@68 36918 name = "int";
jpayne@68 36919 res = m->nb_int(x);
jpayne@68 36920 }
jpayne@68 36921 else if (m && m->nb_long) {
jpayne@68 36922 name = "long";
jpayne@68 36923 res = m->nb_long(x);
jpayne@68 36924 }
jpayne@68 36925 #else
jpayne@68 36926 if (likely(m && m->nb_int)) {
jpayne@68 36927 name = "int";
jpayne@68 36928 res = m->nb_int(x);
jpayne@68 36929 }
jpayne@68 36930 #endif
jpayne@68 36931 #else
jpayne@68 36932 if (!PyBytes_CheckExact(x) && !PyUnicode_CheckExact(x)) {
jpayne@68 36933 res = PyNumber_Int(x);
jpayne@68 36934 }
jpayne@68 36935 #endif
jpayne@68 36936 if (likely(res)) {
jpayne@68 36937 #if PY_MAJOR_VERSION < 3
jpayne@68 36938 if (unlikely(!PyInt_Check(res) && !PyLong_Check(res))) {
jpayne@68 36939 #else
jpayne@68 36940 if (unlikely(!PyLong_CheckExact(res))) {
jpayne@68 36941 #endif
jpayne@68 36942 return __Pyx_PyNumber_IntOrLongWrongResultType(res, name);
jpayne@68 36943 }
jpayne@68 36944 }
jpayne@68 36945 else if (!PyErr_Occurred()) {
jpayne@68 36946 PyErr_SetString(PyExc_TypeError,
jpayne@68 36947 "an integer is required");
jpayne@68 36948 }
jpayne@68 36949 return res;
jpayne@68 36950 }
jpayne@68 36951 static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) {
jpayne@68 36952 Py_ssize_t ival;
jpayne@68 36953 PyObject *x;
jpayne@68 36954 #if PY_MAJOR_VERSION < 3
jpayne@68 36955 if (likely(PyInt_CheckExact(b))) {
jpayne@68 36956 if (sizeof(Py_ssize_t) >= sizeof(long))
jpayne@68 36957 return PyInt_AS_LONG(b);
jpayne@68 36958 else
jpayne@68 36959 return PyInt_AsSsize_t(b);
jpayne@68 36960 }
jpayne@68 36961 #endif
jpayne@68 36962 if (likely(PyLong_CheckExact(b))) {
jpayne@68 36963 #if CYTHON_USE_PYLONG_INTERNALS
jpayne@68 36964 if (likely(__Pyx_PyLong_IsCompact(b))) {
jpayne@68 36965 return __Pyx_PyLong_CompactValue(b);
jpayne@68 36966 } else {
jpayne@68 36967 const digit* digits = __Pyx_PyLong_Digits(b);
jpayne@68 36968 const Py_ssize_t size = __Pyx_PyLong_SignedDigitCount(b);
jpayne@68 36969 switch (size) {
jpayne@68 36970 case 2:
jpayne@68 36971 if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
jpayne@68 36972 return (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
jpayne@68 36973 }
jpayne@68 36974 break;
jpayne@68 36975 case -2:
jpayne@68 36976 if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
jpayne@68 36977 return -(Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
jpayne@68 36978 }
jpayne@68 36979 break;
jpayne@68 36980 case 3:
jpayne@68 36981 if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
jpayne@68 36982 return (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
jpayne@68 36983 }
jpayne@68 36984 break;
jpayne@68 36985 case -3:
jpayne@68 36986 if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
jpayne@68 36987 return -(Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
jpayne@68 36988 }
jpayne@68 36989 break;
jpayne@68 36990 case 4:
jpayne@68 36991 if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
jpayne@68 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@68 36993 }
jpayne@68 36994 break;
jpayne@68 36995 case -4:
jpayne@68 36996 if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
jpayne@68 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@68 36998 }
jpayne@68 36999 break;
jpayne@68 37000 }
jpayne@68 37001 }
jpayne@68 37002 #endif
jpayne@68 37003 return PyLong_AsSsize_t(b);
jpayne@68 37004 }
jpayne@68 37005 x = PyNumber_Index(b);
jpayne@68 37006 if (!x) return -1;
jpayne@68 37007 ival = PyInt_AsSsize_t(x);
jpayne@68 37008 Py_DECREF(x);
jpayne@68 37009 return ival;
jpayne@68 37010 }
jpayne@68 37011 static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject* o) {
jpayne@68 37012 if (sizeof(Py_hash_t) == sizeof(Py_ssize_t)) {
jpayne@68 37013 return (Py_hash_t) __Pyx_PyIndex_AsSsize_t(o);
jpayne@68 37014 #if PY_MAJOR_VERSION < 3
jpayne@68 37015 } else if (likely(PyInt_CheckExact(o))) {
jpayne@68 37016 return PyInt_AS_LONG(o);
jpayne@68 37017 #endif
jpayne@68 37018 } else {
jpayne@68 37019 Py_ssize_t ival;
jpayne@68 37020 PyObject *x;
jpayne@68 37021 x = PyNumber_Index(o);
jpayne@68 37022 if (!x) return -1;
jpayne@68 37023 ival = PyInt_AsLong(x);
jpayne@68 37024 Py_DECREF(x);
jpayne@68 37025 return ival;
jpayne@68 37026 }
jpayne@68 37027 }
jpayne@68 37028 static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b) {
jpayne@68 37029 return b ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False);
jpayne@68 37030 }
jpayne@68 37031 static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) {
jpayne@68 37032 return PyInt_FromSize_t(ival);
jpayne@68 37033 }
jpayne@68 37034
jpayne@68 37035
jpayne@68 37036 /* #### Code section: utility_code_pragmas_end ### */
jpayne@68 37037 #ifdef _MSC_VER
jpayne@68 37038 #pragma warning( pop )
jpayne@68 37039 #endif
jpayne@68 37040
jpayne@68 37041
jpayne@68 37042
jpayne@68 37043 /* #### Code section: end ### */
jpayne@68 37044 #endif /* Py_PYTHON_H */