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

planemo upload commit 2e9511a184a1ca667c7be0c6321a36dc4e3d116d
author jpayne
date Tue, 18 Mar 2025 17:55:14 -0400
parents
children
rev   line source
jpayne@69 1 /* Generated by Cython 3.0.11 */
jpayne@69 2
jpayne@69 3 /* BEGIN: Cython Metadata
jpayne@69 4 {
jpayne@69 5 "distutils": {
jpayne@69 6 "define_macros": [
jpayne@69 7 [
jpayne@69 8 "BUILDING_WHEEL",
jpayne@69 9 null
jpayne@69 10 ]
jpayne@69 11 ],
jpayne@69 12 "depends": [
jpayne@69 13 "/project/htslib/htslib/bgzf.h",
jpayne@69 14 "/project/htslib/htslib/cram.h",
jpayne@69 15 "/project/htslib/htslib/faidx.h",
jpayne@69 16 "/project/htslib/htslib/hfile.h",
jpayne@69 17 "/project/htslib/htslib/hts.h",
jpayne@69 18 "/project/htslib/htslib/kstring.h",
jpayne@69 19 "/project/htslib/htslib/sam.h",
jpayne@69 20 "/project/htslib/htslib/tbx.h",
jpayne@69 21 "/project/htslib/htslib/vcf.h",
jpayne@69 22 "/project/htslib/htslib/vcfutils.h",
jpayne@69 23 "/project/pysam/htslib_util.h",
jpayne@69 24 "/project/pysam/pysam_stream.h"
jpayne@69 25 ],
jpayne@69 26 "extra_compile_args": [
jpayne@69 27 "-Wno-unused",
jpayne@69 28 "-Wno-strict-prototypes",
jpayne@69 29 "-Wno-sign-compare",
jpayne@69 30 "-Wno-error=declaration-after-statement"
jpayne@69 31 ],
jpayne@69 32 "extra_link_args": [
jpayne@69 33 "-Wl,-rpath,$ORIGIN"
jpayne@69 34 ],
jpayne@69 35 "include_dirs": [
jpayne@69 36 "pysam",
jpayne@69 37 "/project/pysam",
jpayne@69 38 "/project/htslib",
jpayne@69 39 "/project/samtools",
jpayne@69 40 "/project/samtools/lz4",
jpayne@69 41 "/project/bcftools",
jpayne@69 42 "/project"
jpayne@69 43 ],
jpayne@69 44 "language": "c",
jpayne@69 45 "libraries": [
jpayne@69 46 "z",
jpayne@69 47 "lzma",
jpayne@69 48 "bz2",
jpayne@69 49 "z",
jpayne@69 50 "m",
jpayne@69 51 "curl",
jpayne@69 52 "crypto",
jpayne@69 53 "chtslib.cpython-37m-x86_64-linux-gnu",
jpayne@69 54 "cutils.cpython-37m-x86_64-linux-gnu"
jpayne@69 55 ],
jpayne@69 56 "library_dirs": [
jpayne@69 57 "/project/pysam",
jpayne@69 58 "/project",
jpayne@69 59 "build/lib.linux-x86_64-cpython-37/pysam",
jpayne@69 60 "build/lib.linux-x86_64-cpython-37/pysam",
jpayne@69 61 "build/lib.linux-x86_64-cpython-37/pysam",
jpayne@69 62 "build/lib.linux-x86_64-cpython-37/pysam",
jpayne@69 63 "build/lib.linux-x86_64-cpython-37/pysam",
jpayne@69 64 "build/lib.linux-x86_64-cpython-37/pysam",
jpayne@69 65 "build/lib.linux-x86_64-cpython-37/pysam",
jpayne@69 66 "build/lib.linux-x86_64-cpython-37/pysam",
jpayne@69 67 "build/lib.linux-x86_64-cpython-37/pysam"
jpayne@69 68 ],
jpayne@69 69 "name": "pysam.libcfaidx",
jpayne@69 70 "sources": [
jpayne@69 71 "pysam/libcfaidx.pyx"
jpayne@69 72 ]
jpayne@69 73 },
jpayne@69 74 "module_name": "pysam.libcfaidx"
jpayne@69 75 }
jpayne@69 76 END: Cython Metadata */
jpayne@69 77
jpayne@69 78 #ifndef PY_SSIZE_T_CLEAN
jpayne@69 79 #define PY_SSIZE_T_CLEAN
jpayne@69 80 #endif /* PY_SSIZE_T_CLEAN */
jpayne@69 81 #if defined(CYTHON_LIMITED_API) && 0
jpayne@69 82 #ifndef Py_LIMITED_API
jpayne@69 83 #if CYTHON_LIMITED_API+0 > 0x03030000
jpayne@69 84 #define Py_LIMITED_API CYTHON_LIMITED_API
jpayne@69 85 #else
jpayne@69 86 #define Py_LIMITED_API 0x03030000
jpayne@69 87 #endif
jpayne@69 88 #endif
jpayne@69 89 #endif
jpayne@69 90
jpayne@69 91 #include "Python.h"
jpayne@69 92
jpayne@69 93 #if PY_MAJOR_VERSION >= 3
jpayne@69 94 #define __Pyx_PyFloat_FromString(obj) PyFloat_FromString(obj)
jpayne@69 95 #else
jpayne@69 96 #define __Pyx_PyFloat_FromString(obj) PyFloat_FromString(obj, NULL)
jpayne@69 97 #endif
jpayne@69 98
jpayne@69 99
jpayne@69 100 #if PY_MAJOR_VERSION <= 2
jpayne@69 101 #define PyDict_GetItemWithError _PyDict_GetItemWithError
jpayne@69 102 #endif
jpayne@69 103
jpayne@69 104
jpayne@69 105 #if (PY_VERSION_HEX < 0x030700b1 || (CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM < 0x07030600)) && !defined(PyContextVar_Get)
jpayne@69 106 #define PyContextVar_Get(var, d, v) ((d) ? ((void)(var), Py_INCREF(d), (v)[0] = (d), 0) : ((v)[0] = NULL, 0) )
jpayne@69 107 #endif
jpayne@69 108
jpayne@69 109 #ifndef Py_PYTHON_H
jpayne@69 110 #error Python headers needed to compile C extensions, please install development version of Python.
jpayne@69 111 #elif PY_VERSION_HEX < 0x02070000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03030000)
jpayne@69 112 #error Cython requires Python 2.7+ or Python 3.3+.
jpayne@69 113 #else
jpayne@69 114 #if defined(CYTHON_LIMITED_API) && CYTHON_LIMITED_API
jpayne@69 115 #define __PYX_EXTRA_ABI_MODULE_NAME "limited"
jpayne@69 116 #else
jpayne@69 117 #define __PYX_EXTRA_ABI_MODULE_NAME ""
jpayne@69 118 #endif
jpayne@69 119 #define CYTHON_ABI "3_0_11" __PYX_EXTRA_ABI_MODULE_NAME
jpayne@69 120 #define __PYX_ABI_MODULE_NAME "_cython_" CYTHON_ABI
jpayne@69 121 #define __PYX_TYPE_MODULE_PREFIX __PYX_ABI_MODULE_NAME "."
jpayne@69 122 #define CYTHON_HEX_VERSION 0x03000BF0
jpayne@69 123 #define CYTHON_FUTURE_DIVISION 1
jpayne@69 124 #include <stddef.h>
jpayne@69 125 #ifndef offsetof
jpayne@69 126 #define offsetof(type, member) ( (size_t) & ((type*)0) -> member )
jpayne@69 127 #endif
jpayne@69 128 #if !defined(_WIN32) && !defined(WIN32) && !defined(MS_WINDOWS)
jpayne@69 129 #ifndef __stdcall
jpayne@69 130 #define __stdcall
jpayne@69 131 #endif
jpayne@69 132 #ifndef __cdecl
jpayne@69 133 #define __cdecl
jpayne@69 134 #endif
jpayne@69 135 #ifndef __fastcall
jpayne@69 136 #define __fastcall
jpayne@69 137 #endif
jpayne@69 138 #endif
jpayne@69 139 #ifndef DL_IMPORT
jpayne@69 140 #define DL_IMPORT(t) t
jpayne@69 141 #endif
jpayne@69 142 #ifndef DL_EXPORT
jpayne@69 143 #define DL_EXPORT(t) t
jpayne@69 144 #endif
jpayne@69 145 #define __PYX_COMMA ,
jpayne@69 146 #ifndef HAVE_LONG_LONG
jpayne@69 147 #define HAVE_LONG_LONG
jpayne@69 148 #endif
jpayne@69 149 #ifndef PY_LONG_LONG
jpayne@69 150 #define PY_LONG_LONG LONG_LONG
jpayne@69 151 #endif
jpayne@69 152 #ifndef Py_HUGE_VAL
jpayne@69 153 #define Py_HUGE_VAL HUGE_VAL
jpayne@69 154 #endif
jpayne@69 155 #define __PYX_LIMITED_VERSION_HEX PY_VERSION_HEX
jpayne@69 156 #if defined(GRAALVM_PYTHON)
jpayne@69 157 /* For very preliminary testing purposes. Most variables are set the same as PyPy.
jpayne@69 158 The existence of this section does not imply that anything works or is even tested */
jpayne@69 159 #define CYTHON_COMPILING_IN_PYPY 0
jpayne@69 160 #define CYTHON_COMPILING_IN_CPYTHON 0
jpayne@69 161 #define CYTHON_COMPILING_IN_LIMITED_API 0
jpayne@69 162 #define CYTHON_COMPILING_IN_GRAAL 1
jpayne@69 163 #define CYTHON_COMPILING_IN_NOGIL 0
jpayne@69 164 #undef CYTHON_USE_TYPE_SLOTS
jpayne@69 165 #define CYTHON_USE_TYPE_SLOTS 0
jpayne@69 166 #undef CYTHON_USE_TYPE_SPECS
jpayne@69 167 #define CYTHON_USE_TYPE_SPECS 0
jpayne@69 168 #undef CYTHON_USE_PYTYPE_LOOKUP
jpayne@69 169 #define CYTHON_USE_PYTYPE_LOOKUP 0
jpayne@69 170 #if PY_VERSION_HEX < 0x03050000
jpayne@69 171 #undef CYTHON_USE_ASYNC_SLOTS
jpayne@69 172 #define CYTHON_USE_ASYNC_SLOTS 0
jpayne@69 173 #elif !defined(CYTHON_USE_ASYNC_SLOTS)
jpayne@69 174 #define CYTHON_USE_ASYNC_SLOTS 1
jpayne@69 175 #endif
jpayne@69 176 #undef CYTHON_USE_PYLIST_INTERNALS
jpayne@69 177 #define CYTHON_USE_PYLIST_INTERNALS 0
jpayne@69 178 #undef CYTHON_USE_UNICODE_INTERNALS
jpayne@69 179 #define CYTHON_USE_UNICODE_INTERNALS 0
jpayne@69 180 #undef CYTHON_USE_UNICODE_WRITER
jpayne@69 181 #define CYTHON_USE_UNICODE_WRITER 0
jpayne@69 182 #undef CYTHON_USE_PYLONG_INTERNALS
jpayne@69 183 #define CYTHON_USE_PYLONG_INTERNALS 0
jpayne@69 184 #undef CYTHON_AVOID_BORROWED_REFS
jpayne@69 185 #define CYTHON_AVOID_BORROWED_REFS 1
jpayne@69 186 #undef CYTHON_ASSUME_SAFE_MACROS
jpayne@69 187 #define CYTHON_ASSUME_SAFE_MACROS 0
jpayne@69 188 #undef CYTHON_UNPACK_METHODS
jpayne@69 189 #define CYTHON_UNPACK_METHODS 0
jpayne@69 190 #undef CYTHON_FAST_THREAD_STATE
jpayne@69 191 #define CYTHON_FAST_THREAD_STATE 0
jpayne@69 192 #undef CYTHON_FAST_GIL
jpayne@69 193 #define CYTHON_FAST_GIL 0
jpayne@69 194 #undef CYTHON_METH_FASTCALL
jpayne@69 195 #define CYTHON_METH_FASTCALL 0
jpayne@69 196 #undef CYTHON_FAST_PYCALL
jpayne@69 197 #define CYTHON_FAST_PYCALL 0
jpayne@69 198 #ifndef CYTHON_PEP487_INIT_SUBCLASS
jpayne@69 199 #define CYTHON_PEP487_INIT_SUBCLASS (PY_MAJOR_VERSION >= 3)
jpayne@69 200 #endif
jpayne@69 201 #undef CYTHON_PEP489_MULTI_PHASE_INIT
jpayne@69 202 #define CYTHON_PEP489_MULTI_PHASE_INIT 1
jpayne@69 203 #undef CYTHON_USE_MODULE_STATE
jpayne@69 204 #define CYTHON_USE_MODULE_STATE 0
jpayne@69 205 #undef CYTHON_USE_TP_FINALIZE
jpayne@69 206 #define CYTHON_USE_TP_FINALIZE 0
jpayne@69 207 #undef CYTHON_USE_DICT_VERSIONS
jpayne@69 208 #define CYTHON_USE_DICT_VERSIONS 0
jpayne@69 209 #undef CYTHON_USE_EXC_INFO_STACK
jpayne@69 210 #define CYTHON_USE_EXC_INFO_STACK 0
jpayne@69 211 #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
jpayne@69 212 #define CYTHON_UPDATE_DESCRIPTOR_DOC 0
jpayne@69 213 #endif
jpayne@69 214 #undef CYTHON_USE_FREELISTS
jpayne@69 215 #define CYTHON_USE_FREELISTS 0
jpayne@69 216 #elif defined(PYPY_VERSION)
jpayne@69 217 #define CYTHON_COMPILING_IN_PYPY 1
jpayne@69 218 #define CYTHON_COMPILING_IN_CPYTHON 0
jpayne@69 219 #define CYTHON_COMPILING_IN_LIMITED_API 0
jpayne@69 220 #define CYTHON_COMPILING_IN_GRAAL 0
jpayne@69 221 #define CYTHON_COMPILING_IN_NOGIL 0
jpayne@69 222 #undef CYTHON_USE_TYPE_SLOTS
jpayne@69 223 #define CYTHON_USE_TYPE_SLOTS 0
jpayne@69 224 #ifndef CYTHON_USE_TYPE_SPECS
jpayne@69 225 #define CYTHON_USE_TYPE_SPECS 0
jpayne@69 226 #endif
jpayne@69 227 #undef CYTHON_USE_PYTYPE_LOOKUP
jpayne@69 228 #define CYTHON_USE_PYTYPE_LOOKUP 0
jpayne@69 229 #if PY_VERSION_HEX < 0x03050000
jpayne@69 230 #undef CYTHON_USE_ASYNC_SLOTS
jpayne@69 231 #define CYTHON_USE_ASYNC_SLOTS 0
jpayne@69 232 #elif !defined(CYTHON_USE_ASYNC_SLOTS)
jpayne@69 233 #define CYTHON_USE_ASYNC_SLOTS 1
jpayne@69 234 #endif
jpayne@69 235 #undef CYTHON_USE_PYLIST_INTERNALS
jpayne@69 236 #define CYTHON_USE_PYLIST_INTERNALS 0
jpayne@69 237 #undef CYTHON_USE_UNICODE_INTERNALS
jpayne@69 238 #define CYTHON_USE_UNICODE_INTERNALS 0
jpayne@69 239 #undef CYTHON_USE_UNICODE_WRITER
jpayne@69 240 #define CYTHON_USE_UNICODE_WRITER 0
jpayne@69 241 #undef CYTHON_USE_PYLONG_INTERNALS
jpayne@69 242 #define CYTHON_USE_PYLONG_INTERNALS 0
jpayne@69 243 #undef CYTHON_AVOID_BORROWED_REFS
jpayne@69 244 #define CYTHON_AVOID_BORROWED_REFS 1
jpayne@69 245 #undef CYTHON_ASSUME_SAFE_MACROS
jpayne@69 246 #define CYTHON_ASSUME_SAFE_MACROS 0
jpayne@69 247 #undef CYTHON_UNPACK_METHODS
jpayne@69 248 #define CYTHON_UNPACK_METHODS 0
jpayne@69 249 #undef CYTHON_FAST_THREAD_STATE
jpayne@69 250 #define CYTHON_FAST_THREAD_STATE 0
jpayne@69 251 #undef CYTHON_FAST_GIL
jpayne@69 252 #define CYTHON_FAST_GIL 0
jpayne@69 253 #undef CYTHON_METH_FASTCALL
jpayne@69 254 #define CYTHON_METH_FASTCALL 0
jpayne@69 255 #undef CYTHON_FAST_PYCALL
jpayne@69 256 #define CYTHON_FAST_PYCALL 0
jpayne@69 257 #ifndef CYTHON_PEP487_INIT_SUBCLASS
jpayne@69 258 #define CYTHON_PEP487_INIT_SUBCLASS (PY_MAJOR_VERSION >= 3)
jpayne@69 259 #endif
jpayne@69 260 #if PY_VERSION_HEX < 0x03090000
jpayne@69 261 #undef CYTHON_PEP489_MULTI_PHASE_INIT
jpayne@69 262 #define CYTHON_PEP489_MULTI_PHASE_INIT 0
jpayne@69 263 #elif !defined(CYTHON_PEP489_MULTI_PHASE_INIT)
jpayne@69 264 #define CYTHON_PEP489_MULTI_PHASE_INIT 1
jpayne@69 265 #endif
jpayne@69 266 #undef CYTHON_USE_MODULE_STATE
jpayne@69 267 #define CYTHON_USE_MODULE_STATE 0
jpayne@69 268 #undef CYTHON_USE_TP_FINALIZE
jpayne@69 269 #define CYTHON_USE_TP_FINALIZE (PY_VERSION_HEX >= 0x030400a1 && PYPY_VERSION_NUM >= 0x07030C00)
jpayne@69 270 #undef CYTHON_USE_DICT_VERSIONS
jpayne@69 271 #define CYTHON_USE_DICT_VERSIONS 0
jpayne@69 272 #undef CYTHON_USE_EXC_INFO_STACK
jpayne@69 273 #define CYTHON_USE_EXC_INFO_STACK 0
jpayne@69 274 #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
jpayne@69 275 #define CYTHON_UPDATE_DESCRIPTOR_DOC 0
jpayne@69 276 #endif
jpayne@69 277 #undef CYTHON_USE_FREELISTS
jpayne@69 278 #define CYTHON_USE_FREELISTS 0
jpayne@69 279 #elif defined(CYTHON_LIMITED_API)
jpayne@69 280 #ifdef Py_LIMITED_API
jpayne@69 281 #undef __PYX_LIMITED_VERSION_HEX
jpayne@69 282 #define __PYX_LIMITED_VERSION_HEX Py_LIMITED_API
jpayne@69 283 #endif
jpayne@69 284 #define CYTHON_COMPILING_IN_PYPY 0
jpayne@69 285 #define CYTHON_COMPILING_IN_CPYTHON 0
jpayne@69 286 #define CYTHON_COMPILING_IN_LIMITED_API 1
jpayne@69 287 #define CYTHON_COMPILING_IN_GRAAL 0
jpayne@69 288 #define CYTHON_COMPILING_IN_NOGIL 0
jpayne@69 289 #undef CYTHON_CLINE_IN_TRACEBACK
jpayne@69 290 #define CYTHON_CLINE_IN_TRACEBACK 0
jpayne@69 291 #undef CYTHON_USE_TYPE_SLOTS
jpayne@69 292 #define CYTHON_USE_TYPE_SLOTS 0
jpayne@69 293 #undef CYTHON_USE_TYPE_SPECS
jpayne@69 294 #define CYTHON_USE_TYPE_SPECS 1
jpayne@69 295 #undef CYTHON_USE_PYTYPE_LOOKUP
jpayne@69 296 #define CYTHON_USE_PYTYPE_LOOKUP 0
jpayne@69 297 #undef CYTHON_USE_ASYNC_SLOTS
jpayne@69 298 #define CYTHON_USE_ASYNC_SLOTS 0
jpayne@69 299 #undef CYTHON_USE_PYLIST_INTERNALS
jpayne@69 300 #define CYTHON_USE_PYLIST_INTERNALS 0
jpayne@69 301 #undef CYTHON_USE_UNICODE_INTERNALS
jpayne@69 302 #define CYTHON_USE_UNICODE_INTERNALS 0
jpayne@69 303 #ifndef CYTHON_USE_UNICODE_WRITER
jpayne@69 304 #define CYTHON_USE_UNICODE_WRITER 0
jpayne@69 305 #endif
jpayne@69 306 #undef CYTHON_USE_PYLONG_INTERNALS
jpayne@69 307 #define CYTHON_USE_PYLONG_INTERNALS 0
jpayne@69 308 #ifndef CYTHON_AVOID_BORROWED_REFS
jpayne@69 309 #define CYTHON_AVOID_BORROWED_REFS 0
jpayne@69 310 #endif
jpayne@69 311 #undef CYTHON_ASSUME_SAFE_MACROS
jpayne@69 312 #define CYTHON_ASSUME_SAFE_MACROS 0
jpayne@69 313 #undef CYTHON_UNPACK_METHODS
jpayne@69 314 #define CYTHON_UNPACK_METHODS 0
jpayne@69 315 #undef CYTHON_FAST_THREAD_STATE
jpayne@69 316 #define CYTHON_FAST_THREAD_STATE 0
jpayne@69 317 #undef CYTHON_FAST_GIL
jpayne@69 318 #define CYTHON_FAST_GIL 0
jpayne@69 319 #undef CYTHON_METH_FASTCALL
jpayne@69 320 #define CYTHON_METH_FASTCALL 0
jpayne@69 321 #undef CYTHON_FAST_PYCALL
jpayne@69 322 #define CYTHON_FAST_PYCALL 0
jpayne@69 323 #ifndef CYTHON_PEP487_INIT_SUBCLASS
jpayne@69 324 #define CYTHON_PEP487_INIT_SUBCLASS 1
jpayne@69 325 #endif
jpayne@69 326 #undef CYTHON_PEP489_MULTI_PHASE_INIT
jpayne@69 327 #define CYTHON_PEP489_MULTI_PHASE_INIT 0
jpayne@69 328 #undef CYTHON_USE_MODULE_STATE
jpayne@69 329 #define CYTHON_USE_MODULE_STATE 1
jpayne@69 330 #ifndef CYTHON_USE_TP_FINALIZE
jpayne@69 331 #define CYTHON_USE_TP_FINALIZE 0
jpayne@69 332 #endif
jpayne@69 333 #undef CYTHON_USE_DICT_VERSIONS
jpayne@69 334 #define CYTHON_USE_DICT_VERSIONS 0
jpayne@69 335 #undef CYTHON_USE_EXC_INFO_STACK
jpayne@69 336 #define CYTHON_USE_EXC_INFO_STACK 0
jpayne@69 337 #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
jpayne@69 338 #define CYTHON_UPDATE_DESCRIPTOR_DOC 0
jpayne@69 339 #endif
jpayne@69 340 #undef CYTHON_USE_FREELISTS
jpayne@69 341 #define CYTHON_USE_FREELISTS 0
jpayne@69 342 #elif defined(Py_GIL_DISABLED) || defined(Py_NOGIL)
jpayne@69 343 #define CYTHON_COMPILING_IN_PYPY 0
jpayne@69 344 #define CYTHON_COMPILING_IN_CPYTHON 0
jpayne@69 345 #define CYTHON_COMPILING_IN_LIMITED_API 0
jpayne@69 346 #define CYTHON_COMPILING_IN_GRAAL 0
jpayne@69 347 #define CYTHON_COMPILING_IN_NOGIL 1
jpayne@69 348 #ifndef CYTHON_USE_TYPE_SLOTS
jpayne@69 349 #define CYTHON_USE_TYPE_SLOTS 1
jpayne@69 350 #endif
jpayne@69 351 #ifndef CYTHON_USE_TYPE_SPECS
jpayne@69 352 #define CYTHON_USE_TYPE_SPECS 0
jpayne@69 353 #endif
jpayne@69 354 #undef CYTHON_USE_PYTYPE_LOOKUP
jpayne@69 355 #define CYTHON_USE_PYTYPE_LOOKUP 0
jpayne@69 356 #ifndef CYTHON_USE_ASYNC_SLOTS
jpayne@69 357 #define CYTHON_USE_ASYNC_SLOTS 1
jpayne@69 358 #endif
jpayne@69 359 #ifndef CYTHON_USE_PYLONG_INTERNALS
jpayne@69 360 #define CYTHON_USE_PYLONG_INTERNALS 0
jpayne@69 361 #endif
jpayne@69 362 #undef CYTHON_USE_PYLIST_INTERNALS
jpayne@69 363 #define CYTHON_USE_PYLIST_INTERNALS 0
jpayne@69 364 #ifndef CYTHON_USE_UNICODE_INTERNALS
jpayne@69 365 #define CYTHON_USE_UNICODE_INTERNALS 1
jpayne@69 366 #endif
jpayne@69 367 #undef CYTHON_USE_UNICODE_WRITER
jpayne@69 368 #define CYTHON_USE_UNICODE_WRITER 0
jpayne@69 369 #ifndef CYTHON_AVOID_BORROWED_REFS
jpayne@69 370 #define CYTHON_AVOID_BORROWED_REFS 0
jpayne@69 371 #endif
jpayne@69 372 #ifndef CYTHON_ASSUME_SAFE_MACROS
jpayne@69 373 #define CYTHON_ASSUME_SAFE_MACROS 1
jpayne@69 374 #endif
jpayne@69 375 #ifndef CYTHON_UNPACK_METHODS
jpayne@69 376 #define CYTHON_UNPACK_METHODS 1
jpayne@69 377 #endif
jpayne@69 378 #undef CYTHON_FAST_THREAD_STATE
jpayne@69 379 #define CYTHON_FAST_THREAD_STATE 0
jpayne@69 380 #undef CYTHON_FAST_GIL
jpayne@69 381 #define CYTHON_FAST_GIL 0
jpayne@69 382 #ifndef CYTHON_METH_FASTCALL
jpayne@69 383 #define CYTHON_METH_FASTCALL 1
jpayne@69 384 #endif
jpayne@69 385 #undef CYTHON_FAST_PYCALL
jpayne@69 386 #define CYTHON_FAST_PYCALL 0
jpayne@69 387 #ifndef CYTHON_PEP487_INIT_SUBCLASS
jpayne@69 388 #define CYTHON_PEP487_INIT_SUBCLASS 1
jpayne@69 389 #endif
jpayne@69 390 #ifndef CYTHON_PEP489_MULTI_PHASE_INIT
jpayne@69 391 #define CYTHON_PEP489_MULTI_PHASE_INIT 1
jpayne@69 392 #endif
jpayne@69 393 #ifndef CYTHON_USE_MODULE_STATE
jpayne@69 394 #define CYTHON_USE_MODULE_STATE 0
jpayne@69 395 #endif
jpayne@69 396 #ifndef CYTHON_USE_TP_FINALIZE
jpayne@69 397 #define CYTHON_USE_TP_FINALIZE 1
jpayne@69 398 #endif
jpayne@69 399 #undef CYTHON_USE_DICT_VERSIONS
jpayne@69 400 #define CYTHON_USE_DICT_VERSIONS 0
jpayne@69 401 #undef CYTHON_USE_EXC_INFO_STACK
jpayne@69 402 #define CYTHON_USE_EXC_INFO_STACK 0
jpayne@69 403 #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
jpayne@69 404 #define CYTHON_UPDATE_DESCRIPTOR_DOC 1
jpayne@69 405 #endif
jpayne@69 406 #ifndef CYTHON_USE_FREELISTS
jpayne@69 407 #define CYTHON_USE_FREELISTS 0
jpayne@69 408 #endif
jpayne@69 409 #else
jpayne@69 410 #define CYTHON_COMPILING_IN_PYPY 0
jpayne@69 411 #define CYTHON_COMPILING_IN_CPYTHON 1
jpayne@69 412 #define CYTHON_COMPILING_IN_LIMITED_API 0
jpayne@69 413 #define CYTHON_COMPILING_IN_GRAAL 0
jpayne@69 414 #define CYTHON_COMPILING_IN_NOGIL 0
jpayne@69 415 #ifndef CYTHON_USE_TYPE_SLOTS
jpayne@69 416 #define CYTHON_USE_TYPE_SLOTS 1
jpayne@69 417 #endif
jpayne@69 418 #ifndef CYTHON_USE_TYPE_SPECS
jpayne@69 419 #define CYTHON_USE_TYPE_SPECS 0
jpayne@69 420 #endif
jpayne@69 421 #ifndef CYTHON_USE_PYTYPE_LOOKUP
jpayne@69 422 #define CYTHON_USE_PYTYPE_LOOKUP 1
jpayne@69 423 #endif
jpayne@69 424 #if PY_MAJOR_VERSION < 3
jpayne@69 425 #undef CYTHON_USE_ASYNC_SLOTS
jpayne@69 426 #define CYTHON_USE_ASYNC_SLOTS 0
jpayne@69 427 #elif !defined(CYTHON_USE_ASYNC_SLOTS)
jpayne@69 428 #define CYTHON_USE_ASYNC_SLOTS 1
jpayne@69 429 #endif
jpayne@69 430 #ifndef CYTHON_USE_PYLONG_INTERNALS
jpayne@69 431 #define CYTHON_USE_PYLONG_INTERNALS 1
jpayne@69 432 #endif
jpayne@69 433 #ifndef CYTHON_USE_PYLIST_INTERNALS
jpayne@69 434 #define CYTHON_USE_PYLIST_INTERNALS 1
jpayne@69 435 #endif
jpayne@69 436 #ifndef CYTHON_USE_UNICODE_INTERNALS
jpayne@69 437 #define CYTHON_USE_UNICODE_INTERNALS 1
jpayne@69 438 #endif
jpayne@69 439 #if PY_VERSION_HEX < 0x030300F0 || PY_VERSION_HEX >= 0x030B00A2
jpayne@69 440 #undef CYTHON_USE_UNICODE_WRITER
jpayne@69 441 #define CYTHON_USE_UNICODE_WRITER 0
jpayne@69 442 #elif !defined(CYTHON_USE_UNICODE_WRITER)
jpayne@69 443 #define CYTHON_USE_UNICODE_WRITER 1
jpayne@69 444 #endif
jpayne@69 445 #ifndef CYTHON_AVOID_BORROWED_REFS
jpayne@69 446 #define CYTHON_AVOID_BORROWED_REFS 0
jpayne@69 447 #endif
jpayne@69 448 #ifndef CYTHON_ASSUME_SAFE_MACROS
jpayne@69 449 #define CYTHON_ASSUME_SAFE_MACROS 1
jpayne@69 450 #endif
jpayne@69 451 #ifndef CYTHON_UNPACK_METHODS
jpayne@69 452 #define CYTHON_UNPACK_METHODS 1
jpayne@69 453 #endif
jpayne@69 454 #ifndef CYTHON_FAST_THREAD_STATE
jpayne@69 455 #define CYTHON_FAST_THREAD_STATE 1
jpayne@69 456 #endif
jpayne@69 457 #ifndef CYTHON_FAST_GIL
jpayne@69 458 #define CYTHON_FAST_GIL (PY_MAJOR_VERSION < 3 || PY_VERSION_HEX >= 0x03060000 && PY_VERSION_HEX < 0x030C00A6)
jpayne@69 459 #endif
jpayne@69 460 #ifndef CYTHON_METH_FASTCALL
jpayne@69 461 #define CYTHON_METH_FASTCALL (PY_VERSION_HEX >= 0x030700A1)
jpayne@69 462 #endif
jpayne@69 463 #ifndef CYTHON_FAST_PYCALL
jpayne@69 464 #define CYTHON_FAST_PYCALL 1
jpayne@69 465 #endif
jpayne@69 466 #ifndef CYTHON_PEP487_INIT_SUBCLASS
jpayne@69 467 #define CYTHON_PEP487_INIT_SUBCLASS 1
jpayne@69 468 #endif
jpayne@69 469 #if PY_VERSION_HEX < 0x03050000
jpayne@69 470 #undef CYTHON_PEP489_MULTI_PHASE_INIT
jpayne@69 471 #define CYTHON_PEP489_MULTI_PHASE_INIT 0
jpayne@69 472 #elif !defined(CYTHON_PEP489_MULTI_PHASE_INIT)
jpayne@69 473 #define CYTHON_PEP489_MULTI_PHASE_INIT 1
jpayne@69 474 #endif
jpayne@69 475 #ifndef CYTHON_USE_MODULE_STATE
jpayne@69 476 #define CYTHON_USE_MODULE_STATE 0
jpayne@69 477 #endif
jpayne@69 478 #if PY_VERSION_HEX < 0x030400a1
jpayne@69 479 #undef CYTHON_USE_TP_FINALIZE
jpayne@69 480 #define CYTHON_USE_TP_FINALIZE 0
jpayne@69 481 #elif !defined(CYTHON_USE_TP_FINALIZE)
jpayne@69 482 #define CYTHON_USE_TP_FINALIZE 1
jpayne@69 483 #endif
jpayne@69 484 #if PY_VERSION_HEX < 0x030600B1
jpayne@69 485 #undef CYTHON_USE_DICT_VERSIONS
jpayne@69 486 #define CYTHON_USE_DICT_VERSIONS 0
jpayne@69 487 #elif !defined(CYTHON_USE_DICT_VERSIONS)
jpayne@69 488 #define CYTHON_USE_DICT_VERSIONS (PY_VERSION_HEX < 0x030C00A5)
jpayne@69 489 #endif
jpayne@69 490 #if PY_VERSION_HEX < 0x030700A3
jpayne@69 491 #undef CYTHON_USE_EXC_INFO_STACK
jpayne@69 492 #define CYTHON_USE_EXC_INFO_STACK 0
jpayne@69 493 #elif !defined(CYTHON_USE_EXC_INFO_STACK)
jpayne@69 494 #define CYTHON_USE_EXC_INFO_STACK 1
jpayne@69 495 #endif
jpayne@69 496 #ifndef CYTHON_UPDATE_DESCRIPTOR_DOC
jpayne@69 497 #define CYTHON_UPDATE_DESCRIPTOR_DOC 1
jpayne@69 498 #endif
jpayne@69 499 #ifndef CYTHON_USE_FREELISTS
jpayne@69 500 #define CYTHON_USE_FREELISTS 1
jpayne@69 501 #endif
jpayne@69 502 #endif
jpayne@69 503 #if !defined(CYTHON_FAST_PYCCALL)
jpayne@69 504 #define CYTHON_FAST_PYCCALL (CYTHON_FAST_PYCALL && PY_VERSION_HEX >= 0x030600B1)
jpayne@69 505 #endif
jpayne@69 506 #if !defined(CYTHON_VECTORCALL)
jpayne@69 507 #define CYTHON_VECTORCALL (CYTHON_FAST_PYCCALL && PY_VERSION_HEX >= 0x030800B1)
jpayne@69 508 #endif
jpayne@69 509 #define CYTHON_BACKPORT_VECTORCALL (CYTHON_METH_FASTCALL && PY_VERSION_HEX < 0x030800B1)
jpayne@69 510 #if CYTHON_USE_PYLONG_INTERNALS
jpayne@69 511 #if PY_MAJOR_VERSION < 3
jpayne@69 512 #include "longintrepr.h"
jpayne@69 513 #endif
jpayne@69 514 #undef SHIFT
jpayne@69 515 #undef BASE
jpayne@69 516 #undef MASK
jpayne@69 517 #ifdef SIZEOF_VOID_P
jpayne@69 518 enum { __pyx_check_sizeof_voidp = 1 / (int)(SIZEOF_VOID_P == sizeof(void*)) };
jpayne@69 519 #endif
jpayne@69 520 #endif
jpayne@69 521 #ifndef __has_attribute
jpayne@69 522 #define __has_attribute(x) 0
jpayne@69 523 #endif
jpayne@69 524 #ifndef __has_cpp_attribute
jpayne@69 525 #define __has_cpp_attribute(x) 0
jpayne@69 526 #endif
jpayne@69 527 #ifndef CYTHON_RESTRICT
jpayne@69 528 #if defined(__GNUC__)
jpayne@69 529 #define CYTHON_RESTRICT __restrict__
jpayne@69 530 #elif defined(_MSC_VER) && _MSC_VER >= 1400
jpayne@69 531 #define CYTHON_RESTRICT __restrict
jpayne@69 532 #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
jpayne@69 533 #define CYTHON_RESTRICT restrict
jpayne@69 534 #else
jpayne@69 535 #define CYTHON_RESTRICT
jpayne@69 536 #endif
jpayne@69 537 #endif
jpayne@69 538 #ifndef CYTHON_UNUSED
jpayne@69 539 #if defined(__cplusplus)
jpayne@69 540 /* for clang __has_cpp_attribute(maybe_unused) is true even before C++17
jpayne@69 541 * but leads to warnings with -pedantic, since it is a C++17 feature */
jpayne@69 542 #if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || __cplusplus >= 201703L)
jpayne@69 543 #if __has_cpp_attribute(maybe_unused)
jpayne@69 544 #define CYTHON_UNUSED [[maybe_unused]]
jpayne@69 545 #endif
jpayne@69 546 #endif
jpayne@69 547 #endif
jpayne@69 548 #endif
jpayne@69 549 #ifndef CYTHON_UNUSED
jpayne@69 550 # if defined(__GNUC__)
jpayne@69 551 # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
jpayne@69 552 # define CYTHON_UNUSED __attribute__ ((__unused__))
jpayne@69 553 # else
jpayne@69 554 # define CYTHON_UNUSED
jpayne@69 555 # endif
jpayne@69 556 # elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER))
jpayne@69 557 # define CYTHON_UNUSED __attribute__ ((__unused__))
jpayne@69 558 # else
jpayne@69 559 # define CYTHON_UNUSED
jpayne@69 560 # endif
jpayne@69 561 #endif
jpayne@69 562 #ifndef CYTHON_UNUSED_VAR
jpayne@69 563 # if defined(__cplusplus)
jpayne@69 564 template<class T> void CYTHON_UNUSED_VAR( const T& ) { }
jpayne@69 565 # else
jpayne@69 566 # define CYTHON_UNUSED_VAR(x) (void)(x)
jpayne@69 567 # endif
jpayne@69 568 #endif
jpayne@69 569 #ifndef CYTHON_MAYBE_UNUSED_VAR
jpayne@69 570 #define CYTHON_MAYBE_UNUSED_VAR(x) CYTHON_UNUSED_VAR(x)
jpayne@69 571 #endif
jpayne@69 572 #ifndef CYTHON_NCP_UNUSED
jpayne@69 573 # if CYTHON_COMPILING_IN_CPYTHON
jpayne@69 574 # define CYTHON_NCP_UNUSED
jpayne@69 575 # else
jpayne@69 576 # define CYTHON_NCP_UNUSED CYTHON_UNUSED
jpayne@69 577 # endif
jpayne@69 578 #endif
jpayne@69 579 #ifndef CYTHON_USE_CPP_STD_MOVE
jpayne@69 580 #if defined(__cplusplus) && (\
jpayne@69 581 __cplusplus >= 201103L || (defined(_MSC_VER) && _MSC_VER >= 1600))
jpayne@69 582 #define CYTHON_USE_CPP_STD_MOVE 1
jpayne@69 583 #else
jpayne@69 584 #define CYTHON_USE_CPP_STD_MOVE 0
jpayne@69 585 #endif
jpayne@69 586 #endif
jpayne@69 587 #define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None)
jpayne@69 588 #ifdef _MSC_VER
jpayne@69 589 #ifndef _MSC_STDINT_H_
jpayne@69 590 #if _MSC_VER < 1300
jpayne@69 591 typedef unsigned char uint8_t;
jpayne@69 592 typedef unsigned short uint16_t;
jpayne@69 593 typedef unsigned int uint32_t;
jpayne@69 594 #else
jpayne@69 595 typedef unsigned __int8 uint8_t;
jpayne@69 596 typedef unsigned __int16 uint16_t;
jpayne@69 597 typedef unsigned __int32 uint32_t;
jpayne@69 598 #endif
jpayne@69 599 #endif
jpayne@69 600 #if _MSC_VER < 1300
jpayne@69 601 #ifdef _WIN64
jpayne@69 602 typedef unsigned long long __pyx_uintptr_t;
jpayne@69 603 #else
jpayne@69 604 typedef unsigned int __pyx_uintptr_t;
jpayne@69 605 #endif
jpayne@69 606 #else
jpayne@69 607 #ifdef _WIN64
jpayne@69 608 typedef unsigned __int64 __pyx_uintptr_t;
jpayne@69 609 #else
jpayne@69 610 typedef unsigned __int32 __pyx_uintptr_t;
jpayne@69 611 #endif
jpayne@69 612 #endif
jpayne@69 613 #else
jpayne@69 614 #include <stdint.h>
jpayne@69 615 typedef uintptr_t __pyx_uintptr_t;
jpayne@69 616 #endif
jpayne@69 617 #ifndef CYTHON_FALLTHROUGH
jpayne@69 618 #if defined(__cplusplus)
jpayne@69 619 /* for clang __has_cpp_attribute(fallthrough) is true even before C++17
jpayne@69 620 * but leads to warnings with -pedantic, since it is a C++17 feature */
jpayne@69 621 #if ((defined(_MSVC_LANG) && _MSVC_LANG >= 201703L) || __cplusplus >= 201703L)
jpayne@69 622 #if __has_cpp_attribute(fallthrough)
jpayne@69 623 #define CYTHON_FALLTHROUGH [[fallthrough]]
jpayne@69 624 #endif
jpayne@69 625 #endif
jpayne@69 626 #ifndef CYTHON_FALLTHROUGH
jpayne@69 627 #if __has_cpp_attribute(clang::fallthrough)
jpayne@69 628 #define CYTHON_FALLTHROUGH [[clang::fallthrough]]
jpayne@69 629 #elif __has_cpp_attribute(gnu::fallthrough)
jpayne@69 630 #define CYTHON_FALLTHROUGH [[gnu::fallthrough]]
jpayne@69 631 #endif
jpayne@69 632 #endif
jpayne@69 633 #endif
jpayne@69 634 #ifndef CYTHON_FALLTHROUGH
jpayne@69 635 #if __has_attribute(fallthrough)
jpayne@69 636 #define CYTHON_FALLTHROUGH __attribute__((fallthrough))
jpayne@69 637 #else
jpayne@69 638 #define CYTHON_FALLTHROUGH
jpayne@69 639 #endif
jpayne@69 640 #endif
jpayne@69 641 #if defined(__clang__) && defined(__apple_build_version__)
jpayne@69 642 #if __apple_build_version__ < 7000000
jpayne@69 643 #undef CYTHON_FALLTHROUGH
jpayne@69 644 #define CYTHON_FALLTHROUGH
jpayne@69 645 #endif
jpayne@69 646 #endif
jpayne@69 647 #endif
jpayne@69 648 #ifdef __cplusplus
jpayne@69 649 template <typename T>
jpayne@69 650 struct __PYX_IS_UNSIGNED_IMPL {static const bool value = T(0) < T(-1);};
jpayne@69 651 #define __PYX_IS_UNSIGNED(type) (__PYX_IS_UNSIGNED_IMPL<type>::value)
jpayne@69 652 #else
jpayne@69 653 #define __PYX_IS_UNSIGNED(type) (((type)-1) > 0)
jpayne@69 654 #endif
jpayne@69 655 #if CYTHON_COMPILING_IN_PYPY == 1
jpayne@69 656 #define __PYX_NEED_TP_PRINT_SLOT (PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x030A0000)
jpayne@69 657 #else
jpayne@69 658 #define __PYX_NEED_TP_PRINT_SLOT (PY_VERSION_HEX >= 0x030800b4 && PY_VERSION_HEX < 0x03090000)
jpayne@69 659 #endif
jpayne@69 660 #define __PYX_REINTERPRET_FUNCION(func_pointer, other_pointer) ((func_pointer)(void(*)(void))(other_pointer))
jpayne@69 661
jpayne@69 662 #ifndef CYTHON_INLINE
jpayne@69 663 #if defined(__clang__)
jpayne@69 664 #define CYTHON_INLINE __inline__ __attribute__ ((__unused__))
jpayne@69 665 #elif defined(__GNUC__)
jpayne@69 666 #define CYTHON_INLINE __inline__
jpayne@69 667 #elif defined(_MSC_VER)
jpayne@69 668 #define CYTHON_INLINE __inline
jpayne@69 669 #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
jpayne@69 670 #define CYTHON_INLINE inline
jpayne@69 671 #else
jpayne@69 672 #define CYTHON_INLINE
jpayne@69 673 #endif
jpayne@69 674 #endif
jpayne@69 675
jpayne@69 676 #define __PYX_BUILD_PY_SSIZE_T "n"
jpayne@69 677 #define CYTHON_FORMAT_SSIZE_T "z"
jpayne@69 678 #if PY_MAJOR_VERSION < 3
jpayne@69 679 #define __Pyx_BUILTIN_MODULE_NAME "__builtin__"
jpayne@69 680 #define __Pyx_DefaultClassType PyClass_Type
jpayne@69 681 #define __Pyx_PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
jpayne@69 682 PyCode_New(a+k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
jpayne@69 683 #else
jpayne@69 684 #define __Pyx_BUILTIN_MODULE_NAME "builtins"
jpayne@69 685 #define __Pyx_DefaultClassType PyType_Type
jpayne@69 686 #if CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 687 static CYTHON_INLINE PyObject* __Pyx_PyCode_New(int a, int p, int k, int l, int s, int f,
jpayne@69 688 PyObject *code, PyObject *c, PyObject* n, PyObject *v,
jpayne@69 689 PyObject *fv, PyObject *cell, PyObject* fn,
jpayne@69 690 PyObject *name, int fline, PyObject *lnos) {
jpayne@69 691 PyObject *exception_table = NULL;
jpayne@69 692 PyObject *types_module=NULL, *code_type=NULL, *result=NULL;
jpayne@69 693 #if __PYX_LIMITED_VERSION_HEX < 0x030B0000
jpayne@69 694 PyObject *version_info;
jpayne@69 695 PyObject *py_minor_version = NULL;
jpayne@69 696 #endif
jpayne@69 697 long minor_version = 0;
jpayne@69 698 PyObject *type, *value, *traceback;
jpayne@69 699 PyErr_Fetch(&type, &value, &traceback);
jpayne@69 700 #if __PYX_LIMITED_VERSION_HEX >= 0x030B0000
jpayne@69 701 minor_version = 11;
jpayne@69 702 #else
jpayne@69 703 if (!(version_info = PySys_GetObject("version_info"))) goto end;
jpayne@69 704 if (!(py_minor_version = PySequence_GetItem(version_info, 1))) goto end;
jpayne@69 705 minor_version = PyLong_AsLong(py_minor_version);
jpayne@69 706 Py_DECREF(py_minor_version);
jpayne@69 707 if (minor_version == -1 && PyErr_Occurred()) goto end;
jpayne@69 708 #endif
jpayne@69 709 if (!(types_module = PyImport_ImportModule("types"))) goto end;
jpayne@69 710 if (!(code_type = PyObject_GetAttrString(types_module, "CodeType"))) goto end;
jpayne@69 711 if (minor_version <= 7) {
jpayne@69 712 (void)p;
jpayne@69 713 result = PyObject_CallFunction(code_type, "iiiiiOOOOOOiOO", a, k, l, s, f, code,
jpayne@69 714 c, n, v, fn, name, fline, lnos, fv, cell);
jpayne@69 715 } else if (minor_version <= 10) {
jpayne@69 716 result = PyObject_CallFunction(code_type, "iiiiiiOOOOOOiOO", a,p, k, l, s, f, code,
jpayne@69 717 c, n, v, fn, name, fline, lnos, fv, cell);
jpayne@69 718 } else {
jpayne@69 719 if (!(exception_table = PyBytes_FromStringAndSize(NULL, 0))) goto end;
jpayne@69 720 result = PyObject_CallFunction(code_type, "iiiiiiOOOOOOOiOO", a,p, k, l, s, f, code,
jpayne@69 721 c, n, v, fn, name, name, fline, lnos, exception_table, fv, cell);
jpayne@69 722 }
jpayne@69 723 end:
jpayne@69 724 Py_XDECREF(code_type);
jpayne@69 725 Py_XDECREF(exception_table);
jpayne@69 726 Py_XDECREF(types_module);
jpayne@69 727 if (type) {
jpayne@69 728 PyErr_Restore(type, value, traceback);
jpayne@69 729 }
jpayne@69 730 return result;
jpayne@69 731 }
jpayne@69 732 #ifndef CO_OPTIMIZED
jpayne@69 733 #define CO_OPTIMIZED 0x0001
jpayne@69 734 #endif
jpayne@69 735 #ifndef CO_NEWLOCALS
jpayne@69 736 #define CO_NEWLOCALS 0x0002
jpayne@69 737 #endif
jpayne@69 738 #ifndef CO_VARARGS
jpayne@69 739 #define CO_VARARGS 0x0004
jpayne@69 740 #endif
jpayne@69 741 #ifndef CO_VARKEYWORDS
jpayne@69 742 #define CO_VARKEYWORDS 0x0008
jpayne@69 743 #endif
jpayne@69 744 #ifndef CO_ASYNC_GENERATOR
jpayne@69 745 #define CO_ASYNC_GENERATOR 0x0200
jpayne@69 746 #endif
jpayne@69 747 #ifndef CO_GENERATOR
jpayne@69 748 #define CO_GENERATOR 0x0020
jpayne@69 749 #endif
jpayne@69 750 #ifndef CO_COROUTINE
jpayne@69 751 #define CO_COROUTINE 0x0080
jpayne@69 752 #endif
jpayne@69 753 #elif PY_VERSION_HEX >= 0x030B0000
jpayne@69 754 static CYTHON_INLINE PyCodeObject* __Pyx_PyCode_New(int a, int p, int k, int l, int s, int f,
jpayne@69 755 PyObject *code, PyObject *c, PyObject* n, PyObject *v,
jpayne@69 756 PyObject *fv, PyObject *cell, PyObject* fn,
jpayne@69 757 PyObject *name, int fline, PyObject *lnos) {
jpayne@69 758 PyCodeObject *result;
jpayne@69 759 PyObject *empty_bytes = PyBytes_FromStringAndSize("", 0);
jpayne@69 760 if (!empty_bytes) return NULL;
jpayne@69 761 result =
jpayne@69 762 #if PY_VERSION_HEX >= 0x030C0000
jpayne@69 763 PyUnstable_Code_NewWithPosOnlyArgs
jpayne@69 764 #else
jpayne@69 765 PyCode_NewWithPosOnlyArgs
jpayne@69 766 #endif
jpayne@69 767 (a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, name, fline, lnos, empty_bytes);
jpayne@69 768 Py_DECREF(empty_bytes);
jpayne@69 769 return result;
jpayne@69 770 }
jpayne@69 771 #elif PY_VERSION_HEX >= 0x030800B2 && !CYTHON_COMPILING_IN_PYPY
jpayne@69 772 #define __Pyx_PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
jpayne@69 773 PyCode_NewWithPosOnlyArgs(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
jpayne@69 774 #else
jpayne@69 775 #define __Pyx_PyCode_New(a, p, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
jpayne@69 776 PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
jpayne@69 777 #endif
jpayne@69 778 #endif
jpayne@69 779 #if PY_VERSION_HEX >= 0x030900A4 || defined(Py_IS_TYPE)
jpayne@69 780 #define __Pyx_IS_TYPE(ob, type) Py_IS_TYPE(ob, type)
jpayne@69 781 #else
jpayne@69 782 #define __Pyx_IS_TYPE(ob, type) (((const PyObject*)ob)->ob_type == (type))
jpayne@69 783 #endif
jpayne@69 784 #if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_Is)
jpayne@69 785 #define __Pyx_Py_Is(x, y) Py_Is(x, y)
jpayne@69 786 #else
jpayne@69 787 #define __Pyx_Py_Is(x, y) ((x) == (y))
jpayne@69 788 #endif
jpayne@69 789 #if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsNone)
jpayne@69 790 #define __Pyx_Py_IsNone(ob) Py_IsNone(ob)
jpayne@69 791 #else
jpayne@69 792 #define __Pyx_Py_IsNone(ob) __Pyx_Py_Is((ob), Py_None)
jpayne@69 793 #endif
jpayne@69 794 #if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsTrue)
jpayne@69 795 #define __Pyx_Py_IsTrue(ob) Py_IsTrue(ob)
jpayne@69 796 #else
jpayne@69 797 #define __Pyx_Py_IsTrue(ob) __Pyx_Py_Is((ob), Py_True)
jpayne@69 798 #endif
jpayne@69 799 #if PY_VERSION_HEX >= 0x030A00B1 || defined(Py_IsFalse)
jpayne@69 800 #define __Pyx_Py_IsFalse(ob) Py_IsFalse(ob)
jpayne@69 801 #else
jpayne@69 802 #define __Pyx_Py_IsFalse(ob) __Pyx_Py_Is((ob), Py_False)
jpayne@69 803 #endif
jpayne@69 804 #define __Pyx_NoneAsNull(obj) (__Pyx_Py_IsNone(obj) ? NULL : (obj))
jpayne@69 805 #if PY_VERSION_HEX >= 0x030900F0 && !CYTHON_COMPILING_IN_PYPY
jpayne@69 806 #define __Pyx_PyObject_GC_IsFinalized(o) PyObject_GC_IsFinalized(o)
jpayne@69 807 #else
jpayne@69 808 #define __Pyx_PyObject_GC_IsFinalized(o) _PyGC_FINALIZED(o)
jpayne@69 809 #endif
jpayne@69 810 #ifndef CO_COROUTINE
jpayne@69 811 #define CO_COROUTINE 0x80
jpayne@69 812 #endif
jpayne@69 813 #ifndef CO_ASYNC_GENERATOR
jpayne@69 814 #define CO_ASYNC_GENERATOR 0x200
jpayne@69 815 #endif
jpayne@69 816 #ifndef Py_TPFLAGS_CHECKTYPES
jpayne@69 817 #define Py_TPFLAGS_CHECKTYPES 0
jpayne@69 818 #endif
jpayne@69 819 #ifndef Py_TPFLAGS_HAVE_INDEX
jpayne@69 820 #define Py_TPFLAGS_HAVE_INDEX 0
jpayne@69 821 #endif
jpayne@69 822 #ifndef Py_TPFLAGS_HAVE_NEWBUFFER
jpayne@69 823 #define Py_TPFLAGS_HAVE_NEWBUFFER 0
jpayne@69 824 #endif
jpayne@69 825 #ifndef Py_TPFLAGS_HAVE_FINALIZE
jpayne@69 826 #define Py_TPFLAGS_HAVE_FINALIZE 0
jpayne@69 827 #endif
jpayne@69 828 #ifndef Py_TPFLAGS_SEQUENCE
jpayne@69 829 #define Py_TPFLAGS_SEQUENCE 0
jpayne@69 830 #endif
jpayne@69 831 #ifndef Py_TPFLAGS_MAPPING
jpayne@69 832 #define Py_TPFLAGS_MAPPING 0
jpayne@69 833 #endif
jpayne@69 834 #ifndef METH_STACKLESS
jpayne@69 835 #define METH_STACKLESS 0
jpayne@69 836 #endif
jpayne@69 837 #if PY_VERSION_HEX <= 0x030700A3 || !defined(METH_FASTCALL)
jpayne@69 838 #ifndef METH_FASTCALL
jpayne@69 839 #define METH_FASTCALL 0x80
jpayne@69 840 #endif
jpayne@69 841 typedef PyObject *(*__Pyx_PyCFunctionFast) (PyObject *self, PyObject *const *args, Py_ssize_t nargs);
jpayne@69 842 typedef PyObject *(*__Pyx_PyCFunctionFastWithKeywords) (PyObject *self, PyObject *const *args,
jpayne@69 843 Py_ssize_t nargs, PyObject *kwnames);
jpayne@69 844 #else
jpayne@69 845 #if PY_VERSION_HEX >= 0x030d00A4
jpayne@69 846 # define __Pyx_PyCFunctionFast PyCFunctionFast
jpayne@69 847 # define __Pyx_PyCFunctionFastWithKeywords PyCFunctionFastWithKeywords
jpayne@69 848 #else
jpayne@69 849 # define __Pyx_PyCFunctionFast _PyCFunctionFast
jpayne@69 850 # define __Pyx_PyCFunctionFastWithKeywords _PyCFunctionFastWithKeywords
jpayne@69 851 #endif
jpayne@69 852 #endif
jpayne@69 853 #if CYTHON_METH_FASTCALL
jpayne@69 854 #define __Pyx_METH_FASTCALL METH_FASTCALL
jpayne@69 855 #define __Pyx_PyCFunction_FastCall __Pyx_PyCFunctionFast
jpayne@69 856 #define __Pyx_PyCFunction_FastCallWithKeywords __Pyx_PyCFunctionFastWithKeywords
jpayne@69 857 #else
jpayne@69 858 #define __Pyx_METH_FASTCALL METH_VARARGS
jpayne@69 859 #define __Pyx_PyCFunction_FastCall PyCFunction
jpayne@69 860 #define __Pyx_PyCFunction_FastCallWithKeywords PyCFunctionWithKeywords
jpayne@69 861 #endif
jpayne@69 862 #if CYTHON_VECTORCALL
jpayne@69 863 #define __pyx_vectorcallfunc vectorcallfunc
jpayne@69 864 #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET PY_VECTORCALL_ARGUMENTS_OFFSET
jpayne@69 865 #define __Pyx_PyVectorcall_NARGS(n) PyVectorcall_NARGS((size_t)(n))
jpayne@69 866 #elif CYTHON_BACKPORT_VECTORCALL
jpayne@69 867 typedef PyObject *(*__pyx_vectorcallfunc)(PyObject *callable, PyObject *const *args,
jpayne@69 868 size_t nargsf, PyObject *kwnames);
jpayne@69 869 #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET ((size_t)1 << (8 * sizeof(size_t) - 1))
jpayne@69 870 #define __Pyx_PyVectorcall_NARGS(n) ((Py_ssize_t)(((size_t)(n)) & ~__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET))
jpayne@69 871 #else
jpayne@69 872 #define __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET 0
jpayne@69 873 #define __Pyx_PyVectorcall_NARGS(n) ((Py_ssize_t)(n))
jpayne@69 874 #endif
jpayne@69 875 #if PY_MAJOR_VERSION >= 0x030900B1
jpayne@69 876 #define __Pyx_PyCFunction_CheckExact(func) PyCFunction_CheckExact(func)
jpayne@69 877 #else
jpayne@69 878 #define __Pyx_PyCFunction_CheckExact(func) PyCFunction_Check(func)
jpayne@69 879 #endif
jpayne@69 880 #define __Pyx_CyOrPyCFunction_Check(func) PyCFunction_Check(func)
jpayne@69 881 #if CYTHON_COMPILING_IN_CPYTHON
jpayne@69 882 #define __Pyx_CyOrPyCFunction_GET_FUNCTION(func) (((PyCFunctionObject*)(func))->m_ml->ml_meth)
jpayne@69 883 #elif !CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 884 #define __Pyx_CyOrPyCFunction_GET_FUNCTION(func) PyCFunction_GET_FUNCTION(func)
jpayne@69 885 #endif
jpayne@69 886 #if CYTHON_COMPILING_IN_CPYTHON
jpayne@69 887 #define __Pyx_CyOrPyCFunction_GET_FLAGS(func) (((PyCFunctionObject*)(func))->m_ml->ml_flags)
jpayne@69 888 static CYTHON_INLINE PyObject* __Pyx_CyOrPyCFunction_GET_SELF(PyObject *func) {
jpayne@69 889 return (__Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_STATIC) ? NULL : ((PyCFunctionObject*)func)->m_self;
jpayne@69 890 }
jpayne@69 891 #endif
jpayne@69 892 static CYTHON_INLINE int __Pyx__IsSameCFunction(PyObject *func, void *cfunc) {
jpayne@69 893 #if CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 894 return PyCFunction_Check(func) && PyCFunction_GetFunction(func) == (PyCFunction) cfunc;
jpayne@69 895 #else
jpayne@69 896 return PyCFunction_Check(func) && PyCFunction_GET_FUNCTION(func) == (PyCFunction) cfunc;
jpayne@69 897 #endif
jpayne@69 898 }
jpayne@69 899 #define __Pyx_IsSameCFunction(func, cfunc) __Pyx__IsSameCFunction(func, cfunc)
jpayne@69 900 #if __PYX_LIMITED_VERSION_HEX < 0x030900B1
jpayne@69 901 #define __Pyx_PyType_FromModuleAndSpec(m, s, b) ((void)m, PyType_FromSpecWithBases(s, b))
jpayne@69 902 typedef PyObject *(*__Pyx_PyCMethod)(PyObject *, PyTypeObject *, PyObject *const *, size_t, PyObject *);
jpayne@69 903 #else
jpayne@69 904 #define __Pyx_PyType_FromModuleAndSpec(m, s, b) PyType_FromModuleAndSpec(m, s, b)
jpayne@69 905 #define __Pyx_PyCMethod PyCMethod
jpayne@69 906 #endif
jpayne@69 907 #ifndef METH_METHOD
jpayne@69 908 #define METH_METHOD 0x200
jpayne@69 909 #endif
jpayne@69 910 #if CYTHON_COMPILING_IN_PYPY && !defined(PyObject_Malloc)
jpayne@69 911 #define PyObject_Malloc(s) PyMem_Malloc(s)
jpayne@69 912 #define PyObject_Free(p) PyMem_Free(p)
jpayne@69 913 #define PyObject_Realloc(p) PyMem_Realloc(p)
jpayne@69 914 #endif
jpayne@69 915 #if CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 916 #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0)
jpayne@69 917 #define __Pyx_PyFrame_SetLineNumber(frame, lineno)
jpayne@69 918 #else
jpayne@69 919 #define __Pyx_PyCode_HasFreeVars(co) (PyCode_GetNumFree(co) > 0)
jpayne@69 920 #define __Pyx_PyFrame_SetLineNumber(frame, lineno) (frame)->f_lineno = (lineno)
jpayne@69 921 #endif
jpayne@69 922 #if CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 923 #define __Pyx_PyThreadState_Current PyThreadState_Get()
jpayne@69 924 #elif !CYTHON_FAST_THREAD_STATE
jpayne@69 925 #define __Pyx_PyThreadState_Current PyThreadState_GET()
jpayne@69 926 #elif PY_VERSION_HEX >= 0x030d00A1
jpayne@69 927 #define __Pyx_PyThreadState_Current PyThreadState_GetUnchecked()
jpayne@69 928 #elif PY_VERSION_HEX >= 0x03060000
jpayne@69 929 #define __Pyx_PyThreadState_Current _PyThreadState_UncheckedGet()
jpayne@69 930 #elif PY_VERSION_HEX >= 0x03000000
jpayne@69 931 #define __Pyx_PyThreadState_Current PyThreadState_GET()
jpayne@69 932 #else
jpayne@69 933 #define __Pyx_PyThreadState_Current _PyThreadState_Current
jpayne@69 934 #endif
jpayne@69 935 #if CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 936 static CYTHON_INLINE void *__Pyx_PyModule_GetState(PyObject *op)
jpayne@69 937 {
jpayne@69 938 void *result;
jpayne@69 939 result = PyModule_GetState(op);
jpayne@69 940 if (!result)
jpayne@69 941 Py_FatalError("Couldn't find the module state");
jpayne@69 942 return result;
jpayne@69 943 }
jpayne@69 944 #endif
jpayne@69 945 #define __Pyx_PyObject_GetSlot(obj, name, func_ctype) __Pyx_PyType_GetSlot(Py_TYPE(obj), name, func_ctype)
jpayne@69 946 #if CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 947 #define __Pyx_PyType_GetSlot(type, name, func_ctype) ((func_ctype) PyType_GetSlot((type), Py_##name))
jpayne@69 948 #else
jpayne@69 949 #define __Pyx_PyType_GetSlot(type, name, func_ctype) ((type)->name)
jpayne@69 950 #endif
jpayne@69 951 #if PY_VERSION_HEX < 0x030700A2 && !defined(PyThread_tss_create) && !defined(Py_tss_NEEDS_INIT)
jpayne@69 952 #include "pythread.h"
jpayne@69 953 #define Py_tss_NEEDS_INIT 0
jpayne@69 954 typedef int Py_tss_t;
jpayne@69 955 static CYTHON_INLINE int PyThread_tss_create(Py_tss_t *key) {
jpayne@69 956 *key = PyThread_create_key();
jpayne@69 957 return 0;
jpayne@69 958 }
jpayne@69 959 static CYTHON_INLINE Py_tss_t * PyThread_tss_alloc(void) {
jpayne@69 960 Py_tss_t *key = (Py_tss_t *)PyObject_Malloc(sizeof(Py_tss_t));
jpayne@69 961 *key = Py_tss_NEEDS_INIT;
jpayne@69 962 return key;
jpayne@69 963 }
jpayne@69 964 static CYTHON_INLINE void PyThread_tss_free(Py_tss_t *key) {
jpayne@69 965 PyObject_Free(key);
jpayne@69 966 }
jpayne@69 967 static CYTHON_INLINE int PyThread_tss_is_created(Py_tss_t *key) {
jpayne@69 968 return *key != Py_tss_NEEDS_INIT;
jpayne@69 969 }
jpayne@69 970 static CYTHON_INLINE void PyThread_tss_delete(Py_tss_t *key) {
jpayne@69 971 PyThread_delete_key(*key);
jpayne@69 972 *key = Py_tss_NEEDS_INIT;
jpayne@69 973 }
jpayne@69 974 static CYTHON_INLINE int PyThread_tss_set(Py_tss_t *key, void *value) {
jpayne@69 975 return PyThread_set_key_value(*key, value);
jpayne@69 976 }
jpayne@69 977 static CYTHON_INLINE void * PyThread_tss_get(Py_tss_t *key) {
jpayne@69 978 return PyThread_get_key_value(*key);
jpayne@69 979 }
jpayne@69 980 #endif
jpayne@69 981 #if PY_MAJOR_VERSION < 3
jpayne@69 982 #if CYTHON_COMPILING_IN_PYPY
jpayne@69 983 #if PYPY_VERSION_NUM < 0x07030600
jpayne@69 984 #if defined(__cplusplus) && __cplusplus >= 201402L
jpayne@69 985 [[deprecated("`with nogil:` inside a nogil function will not release the GIL in PyPy2 < 7.3.6")]]
jpayne@69 986 #elif defined(__GNUC__) || defined(__clang__)
jpayne@69 987 __attribute__ ((__deprecated__("`with nogil:` inside a nogil function will not release the GIL in PyPy2 < 7.3.6")))
jpayne@69 988 #elif defined(_MSC_VER)
jpayne@69 989 __declspec(deprecated("`with nogil:` inside a nogil function will not release the GIL in PyPy2 < 7.3.6"))
jpayne@69 990 #endif
jpayne@69 991 static CYTHON_INLINE int PyGILState_Check(void) {
jpayne@69 992 return 0;
jpayne@69 993 }
jpayne@69 994 #else // PYPY_VERSION_NUM < 0x07030600
jpayne@69 995 #endif // PYPY_VERSION_NUM < 0x07030600
jpayne@69 996 #else
jpayne@69 997 static CYTHON_INLINE int PyGILState_Check(void) {
jpayne@69 998 PyThreadState * tstate = _PyThreadState_Current;
jpayne@69 999 return tstate && (tstate == PyGILState_GetThisThreadState());
jpayne@69 1000 }
jpayne@69 1001 #endif
jpayne@69 1002 #endif
jpayne@69 1003 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030d0000 || defined(_PyDict_NewPresized)
jpayne@69 1004 #define __Pyx_PyDict_NewPresized(n) ((n <= 8) ? PyDict_New() : _PyDict_NewPresized(n))
jpayne@69 1005 #else
jpayne@69 1006 #define __Pyx_PyDict_NewPresized(n) PyDict_New()
jpayne@69 1007 #endif
jpayne@69 1008 #if PY_MAJOR_VERSION >= 3 || CYTHON_FUTURE_DIVISION
jpayne@69 1009 #define __Pyx_PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y)
jpayne@69 1010 #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceTrueDivide(x,y)
jpayne@69 1011 #else
jpayne@69 1012 #define __Pyx_PyNumber_Divide(x,y) PyNumber_Divide(x,y)
jpayne@69 1013 #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceDivide(x,y)
jpayne@69 1014 #endif
jpayne@69 1015 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX > 0x030600B4 && PY_VERSION_HEX < 0x030d0000 && CYTHON_USE_UNICODE_INTERNALS
jpayne@69 1016 #define __Pyx_PyDict_GetItemStrWithError(dict, name) _PyDict_GetItem_KnownHash(dict, name, ((PyASCIIObject *) name)->hash)
jpayne@69 1017 static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStr(PyObject *dict, PyObject *name) {
jpayne@69 1018 PyObject *res = __Pyx_PyDict_GetItemStrWithError(dict, name);
jpayne@69 1019 if (res == NULL) PyErr_Clear();
jpayne@69 1020 return res;
jpayne@69 1021 }
jpayne@69 1022 #elif PY_MAJOR_VERSION >= 3 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07020000)
jpayne@69 1023 #define __Pyx_PyDict_GetItemStrWithError PyDict_GetItemWithError
jpayne@69 1024 #define __Pyx_PyDict_GetItemStr PyDict_GetItem
jpayne@69 1025 #else
jpayne@69 1026 static CYTHON_INLINE PyObject * __Pyx_PyDict_GetItemStrWithError(PyObject *dict, PyObject *name) {
jpayne@69 1027 #if CYTHON_COMPILING_IN_PYPY
jpayne@69 1028 return PyDict_GetItem(dict, name);
jpayne@69 1029 #else
jpayne@69 1030 PyDictEntry *ep;
jpayne@69 1031 PyDictObject *mp = (PyDictObject*) dict;
jpayne@69 1032 long hash = ((PyStringObject *) name)->ob_shash;
jpayne@69 1033 assert(hash != -1);
jpayne@69 1034 ep = (mp->ma_lookup)(mp, name, hash);
jpayne@69 1035 if (ep == NULL) {
jpayne@69 1036 return NULL;
jpayne@69 1037 }
jpayne@69 1038 return ep->me_value;
jpayne@69 1039 #endif
jpayne@69 1040 }
jpayne@69 1041 #define __Pyx_PyDict_GetItemStr PyDict_GetItem
jpayne@69 1042 #endif
jpayne@69 1043 #if CYTHON_USE_TYPE_SLOTS
jpayne@69 1044 #define __Pyx_PyType_GetFlags(tp) (((PyTypeObject *)tp)->tp_flags)
jpayne@69 1045 #define __Pyx_PyType_HasFeature(type, feature) ((__Pyx_PyType_GetFlags(type) & (feature)) != 0)
jpayne@69 1046 #define __Pyx_PyObject_GetIterNextFunc(obj) (Py_TYPE(obj)->tp_iternext)
jpayne@69 1047 #else
jpayne@69 1048 #define __Pyx_PyType_GetFlags(tp) (PyType_GetFlags((PyTypeObject *)tp))
jpayne@69 1049 #define __Pyx_PyType_HasFeature(type, feature) PyType_HasFeature(type, feature)
jpayne@69 1050 #define __Pyx_PyObject_GetIterNextFunc(obj) PyIter_Next
jpayne@69 1051 #endif
jpayne@69 1052 #if CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 1053 #define __Pyx_SetItemOnTypeDict(tp, k, v) PyObject_GenericSetAttr((PyObject*)tp, k, v)
jpayne@69 1054 #else
jpayne@69 1055 #define __Pyx_SetItemOnTypeDict(tp, k, v) PyDict_SetItem(tp->tp_dict, k, v)
jpayne@69 1056 #endif
jpayne@69 1057 #if CYTHON_USE_TYPE_SPECS && PY_VERSION_HEX >= 0x03080000
jpayne@69 1058 #define __Pyx_PyHeapTypeObject_GC_Del(obj) {\
jpayne@69 1059 PyTypeObject *type = Py_TYPE((PyObject*)obj);\
jpayne@69 1060 assert(__Pyx_PyType_HasFeature(type, Py_TPFLAGS_HEAPTYPE));\
jpayne@69 1061 PyObject_GC_Del(obj);\
jpayne@69 1062 Py_DECREF(type);\
jpayne@69 1063 }
jpayne@69 1064 #else
jpayne@69 1065 #define __Pyx_PyHeapTypeObject_GC_Del(obj) PyObject_GC_Del(obj)
jpayne@69 1066 #endif
jpayne@69 1067 #if CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 1068 #define CYTHON_PEP393_ENABLED 1
jpayne@69 1069 #define __Pyx_PyUnicode_READY(op) (0)
jpayne@69 1070 #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GetLength(u)
jpayne@69 1071 #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_ReadChar(u, i)
jpayne@69 1072 #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) ((void)u, 1114111U)
jpayne@69 1073 #define __Pyx_PyUnicode_KIND(u) ((void)u, (0))
jpayne@69 1074 #define __Pyx_PyUnicode_DATA(u) ((void*)u)
jpayne@69 1075 #define __Pyx_PyUnicode_READ(k, d, i) ((void)k, PyUnicode_ReadChar((PyObject*)(d), i))
jpayne@69 1076 #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GetLength(u))
jpayne@69 1077 #elif PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND)
jpayne@69 1078 #define CYTHON_PEP393_ENABLED 1
jpayne@69 1079 #if PY_VERSION_HEX >= 0x030C0000
jpayne@69 1080 #define __Pyx_PyUnicode_READY(op) (0)
jpayne@69 1081 #else
jpayne@69 1082 #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ?\
jpayne@69 1083 0 : _PyUnicode_Ready((PyObject *)(op)))
jpayne@69 1084 #endif
jpayne@69 1085 #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_LENGTH(u)
jpayne@69 1086 #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i)
jpayne@69 1087 #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) PyUnicode_MAX_CHAR_VALUE(u)
jpayne@69 1088 #define __Pyx_PyUnicode_KIND(u) ((int)PyUnicode_KIND(u))
jpayne@69 1089 #define __Pyx_PyUnicode_DATA(u) PyUnicode_DATA(u)
jpayne@69 1090 #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i)
jpayne@69 1091 #define __Pyx_PyUnicode_WRITE(k, d, i, ch) PyUnicode_WRITE(k, d, i, (Py_UCS4) ch)
jpayne@69 1092 #if PY_VERSION_HEX >= 0x030C0000
jpayne@69 1093 #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_LENGTH(u))
jpayne@69 1094 #else
jpayne@69 1095 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x03090000
jpayne@69 1096 #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : ((PyCompactUnicodeObject *)(u))->wstr_length))
jpayne@69 1097 #else
jpayne@69 1098 #define __Pyx_PyUnicode_IS_TRUE(u) (0 != (likely(PyUnicode_IS_READY(u)) ? PyUnicode_GET_LENGTH(u) : PyUnicode_GET_SIZE(u)))
jpayne@69 1099 #endif
jpayne@69 1100 #endif
jpayne@69 1101 #else
jpayne@69 1102 #define CYTHON_PEP393_ENABLED 0
jpayne@69 1103 #define PyUnicode_1BYTE_KIND 1
jpayne@69 1104 #define PyUnicode_2BYTE_KIND 2
jpayne@69 1105 #define PyUnicode_4BYTE_KIND 4
jpayne@69 1106 #define __Pyx_PyUnicode_READY(op) (0)
jpayne@69 1107 #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_SIZE(u)
jpayne@69 1108 #define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i]))
jpayne@69 1109 #define __Pyx_PyUnicode_MAX_CHAR_VALUE(u) ((sizeof(Py_UNICODE) == 2) ? 65535U : 1114111U)
jpayne@69 1110 #define __Pyx_PyUnicode_KIND(u) ((int)sizeof(Py_UNICODE))
jpayne@69 1111 #define __Pyx_PyUnicode_DATA(u) ((void*)PyUnicode_AS_UNICODE(u))
jpayne@69 1112 #define __Pyx_PyUnicode_READ(k, d, i) ((void)(k), (Py_UCS4)(((Py_UNICODE*)d)[i]))
jpayne@69 1113 #define __Pyx_PyUnicode_WRITE(k, d, i, ch) (((void)(k)), ((Py_UNICODE*)d)[i] = (Py_UNICODE) ch)
jpayne@69 1114 #define __Pyx_PyUnicode_IS_TRUE(u) (0 != PyUnicode_GET_SIZE(u))
jpayne@69 1115 #endif
jpayne@69 1116 #if CYTHON_COMPILING_IN_PYPY
jpayne@69 1117 #define __Pyx_PyUnicode_Concat(a, b) PyNumber_Add(a, b)
jpayne@69 1118 #define __Pyx_PyUnicode_ConcatSafe(a, b) PyNumber_Add(a, b)
jpayne@69 1119 #else
jpayne@69 1120 #define __Pyx_PyUnicode_Concat(a, b) PyUnicode_Concat(a, b)
jpayne@69 1121 #define __Pyx_PyUnicode_ConcatSafe(a, b) ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ?\
jpayne@69 1122 PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b))
jpayne@69 1123 #endif
jpayne@69 1124 #if CYTHON_COMPILING_IN_PYPY
jpayne@69 1125 #if !defined(PyUnicode_DecodeUnicodeEscape)
jpayne@69 1126 #define PyUnicode_DecodeUnicodeEscape(s, size, errors) PyUnicode_Decode(s, size, "unicode_escape", errors)
jpayne@69 1127 #endif
jpayne@69 1128 #if !defined(PyUnicode_Contains) || (PY_MAJOR_VERSION == 2 && PYPY_VERSION_NUM < 0x07030500)
jpayne@69 1129 #undef PyUnicode_Contains
jpayne@69 1130 #define PyUnicode_Contains(u, s) PySequence_Contains(u, s)
jpayne@69 1131 #endif
jpayne@69 1132 #if !defined(PyByteArray_Check)
jpayne@69 1133 #define PyByteArray_Check(obj) PyObject_TypeCheck(obj, &PyByteArray_Type)
jpayne@69 1134 #endif
jpayne@69 1135 #if !defined(PyObject_Format)
jpayne@69 1136 #define PyObject_Format(obj, fmt) PyObject_CallMethod(obj, "__format__", "O", fmt)
jpayne@69 1137 #endif
jpayne@69 1138 #endif
jpayne@69 1139 #define __Pyx_PyString_FormatSafe(a, b) ((unlikely((a) == Py_None || (PyString_Check(b) && !PyString_CheckExact(b)))) ? PyNumber_Remainder(a, b) : __Pyx_PyString_Format(a, b))
jpayne@69 1140 #define __Pyx_PyUnicode_FormatSafe(a, b) ((unlikely((a) == Py_None || (PyUnicode_Check(b) && !PyUnicode_CheckExact(b)))) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b))
jpayne@69 1141 #if PY_MAJOR_VERSION >= 3
jpayne@69 1142 #define __Pyx_PyString_Format(a, b) PyUnicode_Format(a, b)
jpayne@69 1143 #else
jpayne@69 1144 #define __Pyx_PyString_Format(a, b) PyString_Format(a, b)
jpayne@69 1145 #endif
jpayne@69 1146 #if PY_MAJOR_VERSION < 3 && !defined(PyObject_ASCII)
jpayne@69 1147 #define PyObject_ASCII(o) PyObject_Repr(o)
jpayne@69 1148 #endif
jpayne@69 1149 #if PY_MAJOR_VERSION >= 3
jpayne@69 1150 #define PyBaseString_Type PyUnicode_Type
jpayne@69 1151 #define PyStringObject PyUnicodeObject
jpayne@69 1152 #define PyString_Type PyUnicode_Type
jpayne@69 1153 #define PyString_Check PyUnicode_Check
jpayne@69 1154 #define PyString_CheckExact PyUnicode_CheckExact
jpayne@69 1155 #ifndef PyObject_Unicode
jpayne@69 1156 #define PyObject_Unicode PyObject_Str
jpayne@69 1157 #endif
jpayne@69 1158 #endif
jpayne@69 1159 #if PY_MAJOR_VERSION >= 3
jpayne@69 1160 #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj)
jpayne@69 1161 #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj)
jpayne@69 1162 #else
jpayne@69 1163 #define __Pyx_PyBaseString_Check(obj) (PyString_Check(obj) || PyUnicode_Check(obj))
jpayne@69 1164 #define __Pyx_PyBaseString_CheckExact(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj))
jpayne@69 1165 #endif
jpayne@69 1166 #if CYTHON_COMPILING_IN_CPYTHON
jpayne@69 1167 #define __Pyx_PySequence_ListKeepNew(obj)\
jpayne@69 1168 (likely(PyList_CheckExact(obj) && Py_REFCNT(obj) == 1) ? __Pyx_NewRef(obj) : PySequence_List(obj))
jpayne@69 1169 #else
jpayne@69 1170 #define __Pyx_PySequence_ListKeepNew(obj) PySequence_List(obj)
jpayne@69 1171 #endif
jpayne@69 1172 #ifndef PySet_CheckExact
jpayne@69 1173 #define PySet_CheckExact(obj) __Pyx_IS_TYPE(obj, &PySet_Type)
jpayne@69 1174 #endif
jpayne@69 1175 #if PY_VERSION_HEX >= 0x030900A4
jpayne@69 1176 #define __Pyx_SET_REFCNT(obj, refcnt) Py_SET_REFCNT(obj, refcnt)
jpayne@69 1177 #define __Pyx_SET_SIZE(obj, size) Py_SET_SIZE(obj, size)
jpayne@69 1178 #else
jpayne@69 1179 #define __Pyx_SET_REFCNT(obj, refcnt) Py_REFCNT(obj) = (refcnt)
jpayne@69 1180 #define __Pyx_SET_SIZE(obj, size) Py_SIZE(obj) = (size)
jpayne@69 1181 #endif
jpayne@69 1182 #if CYTHON_ASSUME_SAFE_MACROS
jpayne@69 1183 #define __Pyx_PySequence_ITEM(o, i) PySequence_ITEM(o, i)
jpayne@69 1184 #define __Pyx_PySequence_SIZE(seq) Py_SIZE(seq)
jpayne@69 1185 #define __Pyx_PyTuple_SET_ITEM(o, i, v) (PyTuple_SET_ITEM(o, i, v), (0))
jpayne@69 1186 #define __Pyx_PyList_SET_ITEM(o, i, v) (PyList_SET_ITEM(o, i, v), (0))
jpayne@69 1187 #define __Pyx_PyTuple_GET_SIZE(o) PyTuple_GET_SIZE(o)
jpayne@69 1188 #define __Pyx_PyList_GET_SIZE(o) PyList_GET_SIZE(o)
jpayne@69 1189 #define __Pyx_PySet_GET_SIZE(o) PySet_GET_SIZE(o)
jpayne@69 1190 #define __Pyx_PyBytes_GET_SIZE(o) PyBytes_GET_SIZE(o)
jpayne@69 1191 #define __Pyx_PyByteArray_GET_SIZE(o) PyByteArray_GET_SIZE(o)
jpayne@69 1192 #else
jpayne@69 1193 #define __Pyx_PySequence_ITEM(o, i) PySequence_GetItem(o, i)
jpayne@69 1194 #define __Pyx_PySequence_SIZE(seq) PySequence_Size(seq)
jpayne@69 1195 #define __Pyx_PyTuple_SET_ITEM(o, i, v) PyTuple_SetItem(o, i, v)
jpayne@69 1196 #define __Pyx_PyList_SET_ITEM(o, i, v) PyList_SetItem(o, i, v)
jpayne@69 1197 #define __Pyx_PyTuple_GET_SIZE(o) PyTuple_Size(o)
jpayne@69 1198 #define __Pyx_PyList_GET_SIZE(o) PyList_Size(o)
jpayne@69 1199 #define __Pyx_PySet_GET_SIZE(o) PySet_Size(o)
jpayne@69 1200 #define __Pyx_PyBytes_GET_SIZE(o) PyBytes_Size(o)
jpayne@69 1201 #define __Pyx_PyByteArray_GET_SIZE(o) PyByteArray_Size(o)
jpayne@69 1202 #endif
jpayne@69 1203 #if __PYX_LIMITED_VERSION_HEX >= 0x030d00A1
jpayne@69 1204 #define __Pyx_PyImport_AddModuleRef(name) PyImport_AddModuleRef(name)
jpayne@69 1205 #else
jpayne@69 1206 static CYTHON_INLINE PyObject *__Pyx_PyImport_AddModuleRef(const char *name) {
jpayne@69 1207 PyObject *module = PyImport_AddModule(name);
jpayne@69 1208 Py_XINCREF(module);
jpayne@69 1209 return module;
jpayne@69 1210 }
jpayne@69 1211 #endif
jpayne@69 1212 #if PY_MAJOR_VERSION >= 3
jpayne@69 1213 #define PyIntObject PyLongObject
jpayne@69 1214 #define PyInt_Type PyLong_Type
jpayne@69 1215 #define PyInt_Check(op) PyLong_Check(op)
jpayne@69 1216 #define PyInt_CheckExact(op) PyLong_CheckExact(op)
jpayne@69 1217 #define __Pyx_Py3Int_Check(op) PyLong_Check(op)
jpayne@69 1218 #define __Pyx_Py3Int_CheckExact(op) PyLong_CheckExact(op)
jpayne@69 1219 #define PyInt_FromString PyLong_FromString
jpayne@69 1220 #define PyInt_FromUnicode PyLong_FromUnicode
jpayne@69 1221 #define PyInt_FromLong PyLong_FromLong
jpayne@69 1222 #define PyInt_FromSize_t PyLong_FromSize_t
jpayne@69 1223 #define PyInt_FromSsize_t PyLong_FromSsize_t
jpayne@69 1224 #define PyInt_AsLong PyLong_AsLong
jpayne@69 1225 #define PyInt_AS_LONG PyLong_AS_LONG
jpayne@69 1226 #define PyInt_AsSsize_t PyLong_AsSsize_t
jpayne@69 1227 #define PyInt_AsUnsignedLongMask PyLong_AsUnsignedLongMask
jpayne@69 1228 #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask
jpayne@69 1229 #define PyNumber_Int PyNumber_Long
jpayne@69 1230 #else
jpayne@69 1231 #define __Pyx_Py3Int_Check(op) (PyLong_Check(op) || PyInt_Check(op))
jpayne@69 1232 #define __Pyx_Py3Int_CheckExact(op) (PyLong_CheckExact(op) || PyInt_CheckExact(op))
jpayne@69 1233 #endif
jpayne@69 1234 #if PY_MAJOR_VERSION >= 3
jpayne@69 1235 #define PyBoolObject PyLongObject
jpayne@69 1236 #endif
jpayne@69 1237 #if PY_MAJOR_VERSION >= 3 && CYTHON_COMPILING_IN_PYPY
jpayne@69 1238 #ifndef PyUnicode_InternFromString
jpayne@69 1239 #define PyUnicode_InternFromString(s) PyUnicode_FromString(s)
jpayne@69 1240 #endif
jpayne@69 1241 #endif
jpayne@69 1242 #if PY_VERSION_HEX < 0x030200A4
jpayne@69 1243 typedef long Py_hash_t;
jpayne@69 1244 #define __Pyx_PyInt_FromHash_t PyInt_FromLong
jpayne@69 1245 #define __Pyx_PyInt_AsHash_t __Pyx_PyIndex_AsHash_t
jpayne@69 1246 #else
jpayne@69 1247 #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t
jpayne@69 1248 #define __Pyx_PyInt_AsHash_t __Pyx_PyIndex_AsSsize_t
jpayne@69 1249 #endif
jpayne@69 1250 #if CYTHON_USE_ASYNC_SLOTS
jpayne@69 1251 #if PY_VERSION_HEX >= 0x030500B1
jpayne@69 1252 #define __Pyx_PyAsyncMethodsStruct PyAsyncMethods
jpayne@69 1253 #define __Pyx_PyType_AsAsync(obj) (Py_TYPE(obj)->tp_as_async)
jpayne@69 1254 #else
jpayne@69 1255 #define __Pyx_PyType_AsAsync(obj) ((__Pyx_PyAsyncMethodsStruct*) (Py_TYPE(obj)->tp_reserved))
jpayne@69 1256 #endif
jpayne@69 1257 #else
jpayne@69 1258 #define __Pyx_PyType_AsAsync(obj) NULL
jpayne@69 1259 #endif
jpayne@69 1260 #ifndef __Pyx_PyAsyncMethodsStruct
jpayne@69 1261 typedef struct {
jpayne@69 1262 unaryfunc am_await;
jpayne@69 1263 unaryfunc am_aiter;
jpayne@69 1264 unaryfunc am_anext;
jpayne@69 1265 } __Pyx_PyAsyncMethodsStruct;
jpayne@69 1266 #endif
jpayne@69 1267
jpayne@69 1268 #if defined(_WIN32) || defined(WIN32) || defined(MS_WINDOWS)
jpayne@69 1269 #if !defined(_USE_MATH_DEFINES)
jpayne@69 1270 #define _USE_MATH_DEFINES
jpayne@69 1271 #endif
jpayne@69 1272 #endif
jpayne@69 1273 #include <math.h>
jpayne@69 1274 #ifdef NAN
jpayne@69 1275 #define __PYX_NAN() ((float) NAN)
jpayne@69 1276 #else
jpayne@69 1277 static CYTHON_INLINE float __PYX_NAN() {
jpayne@69 1278 float value;
jpayne@69 1279 memset(&value, 0xFF, sizeof(value));
jpayne@69 1280 return value;
jpayne@69 1281 }
jpayne@69 1282 #endif
jpayne@69 1283 #if defined(__CYGWIN__) && defined(_LDBL_EQ_DBL)
jpayne@69 1284 #define __Pyx_truncl trunc
jpayne@69 1285 #else
jpayne@69 1286 #define __Pyx_truncl truncl
jpayne@69 1287 #endif
jpayne@69 1288
jpayne@69 1289 #define __PYX_MARK_ERR_POS(f_index, lineno) \
jpayne@69 1290 { __pyx_filename = __pyx_f[f_index]; (void)__pyx_filename; __pyx_lineno = lineno; (void)__pyx_lineno; __pyx_clineno = __LINE__; (void)__pyx_clineno; }
jpayne@69 1291 #define __PYX_ERR(f_index, lineno, Ln_error) \
jpayne@69 1292 { __PYX_MARK_ERR_POS(f_index, lineno) goto Ln_error; }
jpayne@69 1293
jpayne@69 1294 #ifdef CYTHON_EXTERN_C
jpayne@69 1295 #undef __PYX_EXTERN_C
jpayne@69 1296 #define __PYX_EXTERN_C CYTHON_EXTERN_C
jpayne@69 1297 #elif defined(__PYX_EXTERN_C)
jpayne@69 1298 #ifdef _MSC_VER
jpayne@69 1299 #pragma message ("Please do not define the '__PYX_EXTERN_C' macro externally. Use 'CYTHON_EXTERN_C' instead.")
jpayne@69 1300 #else
jpayne@69 1301 #warning Please do not define the '__PYX_EXTERN_C' macro externally. Use 'CYTHON_EXTERN_C' instead.
jpayne@69 1302 #endif
jpayne@69 1303 #else
jpayne@69 1304 #ifdef __cplusplus
jpayne@69 1305 #define __PYX_EXTERN_C extern "C"
jpayne@69 1306 #else
jpayne@69 1307 #define __PYX_EXTERN_C extern
jpayne@69 1308 #endif
jpayne@69 1309 #endif
jpayne@69 1310
jpayne@69 1311 #define __PYX_HAVE__pysam__libcfaidx
jpayne@69 1312 #define __PYX_HAVE_API__pysam__libcfaidx
jpayne@69 1313 /* Early includes */
jpayne@69 1314 #include <stdint.h>
jpayne@69 1315 #include <string.h>
jpayne@69 1316 #include <stdlib.h>
jpayne@69 1317 #include <stdio.h>
jpayne@69 1318 #include <stddef.h>
jpayne@69 1319 #include "pythread.h"
jpayne@69 1320
jpayne@69 1321 #if CYTHON_COMPILING_IN_PYPY
jpayne@69 1322 #ifdef _MSC_VER
jpayne@69 1323 #pragma message ("This module uses CPython specific internals of 'array.array', which are not available in PyPy.")
jpayne@69 1324 #else
jpayne@69 1325 #warning This module uses CPython specific internals of 'array.array', which are not available in PyPy.
jpayne@69 1326 #endif
jpayne@69 1327 #endif
jpayne@69 1328
jpayne@69 1329 #include <sys/types.h>
jpayne@69 1330 #include "stdarg.h"
jpayne@69 1331 #include "htslib/kstring.h"
jpayne@69 1332 #include "htslib_util.h"
jpayne@69 1333 #include "htslib/hfile.h"
jpayne@69 1334 #include "htslib/bgzf.h"
jpayne@69 1335 #include "htslib/hts.h"
jpayne@69 1336 #include "htslib/sam.h"
jpayne@69 1337 #include "htslib/faidx.h"
jpayne@69 1338 #include "htslib/tbx.h"
jpayne@69 1339 #include "htslib/vcf.h"
jpayne@69 1340 #include "htslib/vcfutils.h"
jpayne@69 1341 #include "htslib/cram.h"
jpayne@69 1342 #include "pysam_stream.h"
jpayne@69 1343 #include <errno.h>
jpayne@69 1344 #ifdef _OPENMP
jpayne@69 1345 #include <omp.h>
jpayne@69 1346 #endif /* _OPENMP */
jpayne@69 1347
jpayne@69 1348 #if defined(PYREX_WITHOUT_ASSERTIONS) && !defined(CYTHON_WITHOUT_ASSERTIONS)
jpayne@69 1349 #define CYTHON_WITHOUT_ASSERTIONS
jpayne@69 1350 #endif
jpayne@69 1351
jpayne@69 1352 typedef struct {PyObject **p; const char *s; const Py_ssize_t n; const char* encoding;
jpayne@69 1353 const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry;
jpayne@69 1354
jpayne@69 1355 #define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0
jpayne@69 1356 #define __PYX_DEFAULT_STRING_ENCODING_IS_UTF8 0
jpayne@69 1357 #define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT (PY_MAJOR_VERSION >= 3 && __PYX_DEFAULT_STRING_ENCODING_IS_UTF8)
jpayne@69 1358 #define __PYX_DEFAULT_STRING_ENCODING ""
jpayne@69 1359 #define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString
jpayne@69 1360 #define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
jpayne@69 1361 #define __Pyx_uchar_cast(c) ((unsigned char)c)
jpayne@69 1362 #define __Pyx_long_cast(x) ((long)x)
jpayne@69 1363 #define __Pyx_fits_Py_ssize_t(v, type, is_signed) (\
jpayne@69 1364 (sizeof(type) < sizeof(Py_ssize_t)) ||\
jpayne@69 1365 (sizeof(type) > sizeof(Py_ssize_t) &&\
jpayne@69 1366 likely(v < (type)PY_SSIZE_T_MAX ||\
jpayne@69 1367 v == (type)PY_SSIZE_T_MAX) &&\
jpayne@69 1368 (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\
jpayne@69 1369 v == (type)PY_SSIZE_T_MIN))) ||\
jpayne@69 1370 (sizeof(type) == sizeof(Py_ssize_t) &&\
jpayne@69 1371 (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\
jpayne@69 1372 v == (type)PY_SSIZE_T_MAX))) )
jpayne@69 1373 static CYTHON_INLINE int __Pyx_is_valid_index(Py_ssize_t i, Py_ssize_t limit) {
jpayne@69 1374 return (size_t) i < (size_t) limit;
jpayne@69 1375 }
jpayne@69 1376 #if defined (__cplusplus) && __cplusplus >= 201103L
jpayne@69 1377 #include <cstdlib>
jpayne@69 1378 #define __Pyx_sst_abs(value) std::abs(value)
jpayne@69 1379 #elif SIZEOF_INT >= SIZEOF_SIZE_T
jpayne@69 1380 #define __Pyx_sst_abs(value) abs(value)
jpayne@69 1381 #elif SIZEOF_LONG >= SIZEOF_SIZE_T
jpayne@69 1382 #define __Pyx_sst_abs(value) labs(value)
jpayne@69 1383 #elif defined (_MSC_VER)
jpayne@69 1384 #define __Pyx_sst_abs(value) ((Py_ssize_t)_abs64(value))
jpayne@69 1385 #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
jpayne@69 1386 #define __Pyx_sst_abs(value) llabs(value)
jpayne@69 1387 #elif defined (__GNUC__)
jpayne@69 1388 #define __Pyx_sst_abs(value) __builtin_llabs(value)
jpayne@69 1389 #else
jpayne@69 1390 #define __Pyx_sst_abs(value) ((value<0) ? -value : value)
jpayne@69 1391 #endif
jpayne@69 1392 static CYTHON_INLINE Py_ssize_t __Pyx_ssize_strlen(const char *s);
jpayne@69 1393 static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject*);
jpayne@69 1394 static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length);
jpayne@69 1395 static CYTHON_INLINE PyObject* __Pyx_PyByteArray_FromString(const char*);
jpayne@69 1396 #define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l)
jpayne@69 1397 #define __Pyx_PyBytes_FromString PyBytes_FromString
jpayne@69 1398 #define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize
jpayne@69 1399 static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*);
jpayne@69 1400 #if PY_MAJOR_VERSION < 3
jpayne@69 1401 #define __Pyx_PyStr_FromString __Pyx_PyBytes_FromString
jpayne@69 1402 #define __Pyx_PyStr_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
jpayne@69 1403 #else
jpayne@69 1404 #define __Pyx_PyStr_FromString __Pyx_PyUnicode_FromString
jpayne@69 1405 #define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize
jpayne@69 1406 #endif
jpayne@69 1407 #define __Pyx_PyBytes_AsWritableString(s) ((char*) PyBytes_AS_STRING(s))
jpayne@69 1408 #define __Pyx_PyBytes_AsWritableSString(s) ((signed char*) PyBytes_AS_STRING(s))
jpayne@69 1409 #define __Pyx_PyBytes_AsWritableUString(s) ((unsigned char*) PyBytes_AS_STRING(s))
jpayne@69 1410 #define __Pyx_PyBytes_AsString(s) ((const char*) PyBytes_AS_STRING(s))
jpayne@69 1411 #define __Pyx_PyBytes_AsSString(s) ((const signed char*) PyBytes_AS_STRING(s))
jpayne@69 1412 #define __Pyx_PyBytes_AsUString(s) ((const unsigned char*) PyBytes_AS_STRING(s))
jpayne@69 1413 #define __Pyx_PyObject_AsWritableString(s) ((char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s))
jpayne@69 1414 #define __Pyx_PyObject_AsWritableSString(s) ((signed char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s))
jpayne@69 1415 #define __Pyx_PyObject_AsWritableUString(s) ((unsigned char*)(__pyx_uintptr_t) __Pyx_PyObject_AsString(s))
jpayne@69 1416 #define __Pyx_PyObject_AsSString(s) ((const signed char*) __Pyx_PyObject_AsString(s))
jpayne@69 1417 #define __Pyx_PyObject_AsUString(s) ((const unsigned char*) __Pyx_PyObject_AsString(s))
jpayne@69 1418 #define __Pyx_PyObject_FromCString(s) __Pyx_PyObject_FromString((const char*)s)
jpayne@69 1419 #define __Pyx_PyBytes_FromCString(s) __Pyx_PyBytes_FromString((const char*)s)
jpayne@69 1420 #define __Pyx_PyByteArray_FromCString(s) __Pyx_PyByteArray_FromString((const char*)s)
jpayne@69 1421 #define __Pyx_PyStr_FromCString(s) __Pyx_PyStr_FromString((const char*)s)
jpayne@69 1422 #define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s)
jpayne@69 1423 #define __Pyx_PyUnicode_FromOrdinal(o) PyUnicode_FromOrdinal((int)o)
jpayne@69 1424 #define __Pyx_PyUnicode_AsUnicode PyUnicode_AsUnicode
jpayne@69 1425 #define __Pyx_NewRef(obj) (Py_INCREF(obj), obj)
jpayne@69 1426 #define __Pyx_Owned_Py_None(b) __Pyx_NewRef(Py_None)
jpayne@69 1427 static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b);
jpayne@69 1428 static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*);
jpayne@69 1429 static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject*);
jpayne@69 1430 static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x);
jpayne@69 1431 #define __Pyx_PySequence_Tuple(obj)\
jpayne@69 1432 (likely(PyTuple_CheckExact(obj)) ? __Pyx_NewRef(obj) : PySequence_Tuple(obj))
jpayne@69 1433 static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*);
jpayne@69 1434 static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t);
jpayne@69 1435 static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject*);
jpayne@69 1436 #if CYTHON_ASSUME_SAFE_MACROS
jpayne@69 1437 #define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x))
jpayne@69 1438 #else
jpayne@69 1439 #define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x)
jpayne@69 1440 #endif
jpayne@69 1441 #define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x))
jpayne@69 1442 #if PY_MAJOR_VERSION >= 3
jpayne@69 1443 #define __Pyx_PyNumber_Int(x) (PyLong_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Long(x))
jpayne@69 1444 #else
jpayne@69 1445 #define __Pyx_PyNumber_Int(x) (PyInt_CheckExact(x) ? __Pyx_NewRef(x) : PyNumber_Int(x))
jpayne@69 1446 #endif
jpayne@69 1447 #if CYTHON_USE_PYLONG_INTERNALS
jpayne@69 1448 #if PY_VERSION_HEX >= 0x030C00A7
jpayne@69 1449 #ifndef _PyLong_SIGN_MASK
jpayne@69 1450 #define _PyLong_SIGN_MASK 3
jpayne@69 1451 #endif
jpayne@69 1452 #ifndef _PyLong_NON_SIZE_BITS
jpayne@69 1453 #define _PyLong_NON_SIZE_BITS 3
jpayne@69 1454 #endif
jpayne@69 1455 #define __Pyx_PyLong_Sign(x) (((PyLongObject*)x)->long_value.lv_tag & _PyLong_SIGN_MASK)
jpayne@69 1456 #define __Pyx_PyLong_IsNeg(x) ((__Pyx_PyLong_Sign(x) & 2) != 0)
jpayne@69 1457 #define __Pyx_PyLong_IsNonNeg(x) (!__Pyx_PyLong_IsNeg(x))
jpayne@69 1458 #define __Pyx_PyLong_IsZero(x) (__Pyx_PyLong_Sign(x) & 1)
jpayne@69 1459 #define __Pyx_PyLong_IsPos(x) (__Pyx_PyLong_Sign(x) == 0)
jpayne@69 1460 #define __Pyx_PyLong_CompactValueUnsigned(x) (__Pyx_PyLong_Digits(x)[0])
jpayne@69 1461 #define __Pyx_PyLong_DigitCount(x) ((Py_ssize_t) (((PyLongObject*)x)->long_value.lv_tag >> _PyLong_NON_SIZE_BITS))
jpayne@69 1462 #define __Pyx_PyLong_SignedDigitCount(x)\
jpayne@69 1463 ((1 - (Py_ssize_t) __Pyx_PyLong_Sign(x)) * __Pyx_PyLong_DigitCount(x))
jpayne@69 1464 #if defined(PyUnstable_Long_IsCompact) && defined(PyUnstable_Long_CompactValue)
jpayne@69 1465 #define __Pyx_PyLong_IsCompact(x) PyUnstable_Long_IsCompact((PyLongObject*) x)
jpayne@69 1466 #define __Pyx_PyLong_CompactValue(x) PyUnstable_Long_CompactValue((PyLongObject*) x)
jpayne@69 1467 #else
jpayne@69 1468 #define __Pyx_PyLong_IsCompact(x) (((PyLongObject*)x)->long_value.lv_tag < (2 << _PyLong_NON_SIZE_BITS))
jpayne@69 1469 #define __Pyx_PyLong_CompactValue(x) ((1 - (Py_ssize_t) __Pyx_PyLong_Sign(x)) * (Py_ssize_t) __Pyx_PyLong_Digits(x)[0])
jpayne@69 1470 #endif
jpayne@69 1471 typedef Py_ssize_t __Pyx_compact_pylong;
jpayne@69 1472 typedef size_t __Pyx_compact_upylong;
jpayne@69 1473 #else
jpayne@69 1474 #define __Pyx_PyLong_IsNeg(x) (Py_SIZE(x) < 0)
jpayne@69 1475 #define __Pyx_PyLong_IsNonNeg(x) (Py_SIZE(x) >= 0)
jpayne@69 1476 #define __Pyx_PyLong_IsZero(x) (Py_SIZE(x) == 0)
jpayne@69 1477 #define __Pyx_PyLong_IsPos(x) (Py_SIZE(x) > 0)
jpayne@69 1478 #define __Pyx_PyLong_CompactValueUnsigned(x) ((Py_SIZE(x) == 0) ? 0 : __Pyx_PyLong_Digits(x)[0])
jpayne@69 1479 #define __Pyx_PyLong_DigitCount(x) __Pyx_sst_abs(Py_SIZE(x))
jpayne@69 1480 #define __Pyx_PyLong_SignedDigitCount(x) Py_SIZE(x)
jpayne@69 1481 #define __Pyx_PyLong_IsCompact(x) (Py_SIZE(x) == 0 || Py_SIZE(x) == 1 || Py_SIZE(x) == -1)
jpayne@69 1482 #define __Pyx_PyLong_CompactValue(x)\
jpayne@69 1483 ((Py_SIZE(x) == 0) ? (sdigit) 0 : ((Py_SIZE(x) < 0) ? -(sdigit)__Pyx_PyLong_Digits(x)[0] : (sdigit)__Pyx_PyLong_Digits(x)[0]))
jpayne@69 1484 typedef sdigit __Pyx_compact_pylong;
jpayne@69 1485 typedef digit __Pyx_compact_upylong;
jpayne@69 1486 #endif
jpayne@69 1487 #if PY_VERSION_HEX >= 0x030C00A5
jpayne@69 1488 #define __Pyx_PyLong_Digits(x) (((PyLongObject*)x)->long_value.ob_digit)
jpayne@69 1489 #else
jpayne@69 1490 #define __Pyx_PyLong_Digits(x) (((PyLongObject*)x)->ob_digit)
jpayne@69 1491 #endif
jpayne@69 1492 #endif
jpayne@69 1493 #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
jpayne@69 1494 #include <string.h>
jpayne@69 1495 static int __Pyx_sys_getdefaultencoding_not_ascii;
jpayne@69 1496 static int __Pyx_init_sys_getdefaultencoding_params(void) {
jpayne@69 1497 PyObject* sys;
jpayne@69 1498 PyObject* default_encoding = NULL;
jpayne@69 1499 PyObject* ascii_chars_u = NULL;
jpayne@69 1500 PyObject* ascii_chars_b = NULL;
jpayne@69 1501 const char* default_encoding_c;
jpayne@69 1502 sys = PyImport_ImportModule("sys");
jpayne@69 1503 if (!sys) goto bad;
jpayne@69 1504 default_encoding = PyObject_CallMethod(sys, (char*) "getdefaultencoding", NULL);
jpayne@69 1505 Py_DECREF(sys);
jpayne@69 1506 if (!default_encoding) goto bad;
jpayne@69 1507 default_encoding_c = PyBytes_AsString(default_encoding);
jpayne@69 1508 if (!default_encoding_c) goto bad;
jpayne@69 1509 if (strcmp(default_encoding_c, "ascii") == 0) {
jpayne@69 1510 __Pyx_sys_getdefaultencoding_not_ascii = 0;
jpayne@69 1511 } else {
jpayne@69 1512 char ascii_chars[128];
jpayne@69 1513 int c;
jpayne@69 1514 for (c = 0; c < 128; c++) {
jpayne@69 1515 ascii_chars[c] = (char) c;
jpayne@69 1516 }
jpayne@69 1517 __Pyx_sys_getdefaultencoding_not_ascii = 1;
jpayne@69 1518 ascii_chars_u = PyUnicode_DecodeASCII(ascii_chars, 128, NULL);
jpayne@69 1519 if (!ascii_chars_u) goto bad;
jpayne@69 1520 ascii_chars_b = PyUnicode_AsEncodedString(ascii_chars_u, default_encoding_c, NULL);
jpayne@69 1521 if (!ascii_chars_b || !PyBytes_Check(ascii_chars_b) || memcmp(ascii_chars, PyBytes_AS_STRING(ascii_chars_b), 128) != 0) {
jpayne@69 1522 PyErr_Format(
jpayne@69 1523 PyExc_ValueError,
jpayne@69 1524 "This module compiled with c_string_encoding=ascii, but default encoding '%.200s' is not a superset of ascii.",
jpayne@69 1525 default_encoding_c);
jpayne@69 1526 goto bad;
jpayne@69 1527 }
jpayne@69 1528 Py_DECREF(ascii_chars_u);
jpayne@69 1529 Py_DECREF(ascii_chars_b);
jpayne@69 1530 }
jpayne@69 1531 Py_DECREF(default_encoding);
jpayne@69 1532 return 0;
jpayne@69 1533 bad:
jpayne@69 1534 Py_XDECREF(default_encoding);
jpayne@69 1535 Py_XDECREF(ascii_chars_u);
jpayne@69 1536 Py_XDECREF(ascii_chars_b);
jpayne@69 1537 return -1;
jpayne@69 1538 }
jpayne@69 1539 #endif
jpayne@69 1540 #if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT && PY_MAJOR_VERSION >= 3
jpayne@69 1541 #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL)
jpayne@69 1542 #else
jpayne@69 1543 #define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL)
jpayne@69 1544 #if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
jpayne@69 1545 #include <string.h>
jpayne@69 1546 static char* __PYX_DEFAULT_STRING_ENCODING;
jpayne@69 1547 static int __Pyx_init_sys_getdefaultencoding_params(void) {
jpayne@69 1548 PyObject* sys;
jpayne@69 1549 PyObject* default_encoding = NULL;
jpayne@69 1550 char* default_encoding_c;
jpayne@69 1551 sys = PyImport_ImportModule("sys");
jpayne@69 1552 if (!sys) goto bad;
jpayne@69 1553 default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL);
jpayne@69 1554 Py_DECREF(sys);
jpayne@69 1555 if (!default_encoding) goto bad;
jpayne@69 1556 default_encoding_c = PyBytes_AsString(default_encoding);
jpayne@69 1557 if (!default_encoding_c) goto bad;
jpayne@69 1558 __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c) + 1);
jpayne@69 1559 if (!__PYX_DEFAULT_STRING_ENCODING) goto bad;
jpayne@69 1560 strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c);
jpayne@69 1561 Py_DECREF(default_encoding);
jpayne@69 1562 return 0;
jpayne@69 1563 bad:
jpayne@69 1564 Py_XDECREF(default_encoding);
jpayne@69 1565 return -1;
jpayne@69 1566 }
jpayne@69 1567 #endif
jpayne@69 1568 #endif
jpayne@69 1569
jpayne@69 1570
jpayne@69 1571 /* Test for GCC > 2.95 */
jpayne@69 1572 #if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)))
jpayne@69 1573 #define likely(x) __builtin_expect(!!(x), 1)
jpayne@69 1574 #define unlikely(x) __builtin_expect(!!(x), 0)
jpayne@69 1575 #else /* !__GNUC__ or GCC < 2.95 */
jpayne@69 1576 #define likely(x) (x)
jpayne@69 1577 #define unlikely(x) (x)
jpayne@69 1578 #endif /* __GNUC__ */
jpayne@69 1579 static CYTHON_INLINE void __Pyx_pretend_to_initialize(void* ptr) { (void)ptr; }
jpayne@69 1580
jpayne@69 1581 #if !CYTHON_USE_MODULE_STATE
jpayne@69 1582 static PyObject *__pyx_m = NULL;
jpayne@69 1583 #endif
jpayne@69 1584 static int __pyx_lineno;
jpayne@69 1585 static int __pyx_clineno = 0;
jpayne@69 1586 static const char * __pyx_cfilenm = __FILE__;
jpayne@69 1587 static const char *__pyx_filename;
jpayne@69 1588
jpayne@69 1589 /* #### Code section: filename_table ### */
jpayne@69 1590
jpayne@69 1591 static const char *__pyx_f[] = {
jpayne@69 1592 "pysam/libcfaidx.pyx",
jpayne@69 1593 "<stringsource>",
jpayne@69 1594 "contextvars.pxd",
jpayne@69 1595 "array.pxd",
jpayne@69 1596 "pysam/libcfaidx.pxd",
jpayne@69 1597 "type.pxd",
jpayne@69 1598 "bool.pxd",
jpayne@69 1599 "complex.pxd",
jpayne@69 1600 "pysam/libchtslib.pxd",
jpayne@69 1601 };
jpayne@69 1602 /* #### Code section: utility_code_proto_before_types ### */
jpayne@69 1603 /* ForceInitThreads.proto */
jpayne@69 1604 #ifndef __PYX_FORCE_INIT_THREADS
jpayne@69 1605 #define __PYX_FORCE_INIT_THREADS 0
jpayne@69 1606 #endif
jpayne@69 1607
jpayne@69 1608 /* NoFastGil.proto */
jpayne@69 1609 #define __Pyx_PyGILState_Ensure PyGILState_Ensure
jpayne@69 1610 #define __Pyx_PyGILState_Release PyGILState_Release
jpayne@69 1611 #define __Pyx_FastGIL_Remember()
jpayne@69 1612 #define __Pyx_FastGIL_Forget()
jpayne@69 1613 #define __Pyx_FastGilFuncInit()
jpayne@69 1614
jpayne@69 1615 /* #### Code section: numeric_typedefs ### */
jpayne@69 1616 /* #### Code section: complex_type_declarations ### */
jpayne@69 1617 /* #### Code section: type_declarations ### */
jpayne@69 1618
jpayne@69 1619 /*--- Type declarations ---*/
jpayne@69 1620 #ifndef _ARRAYARRAY_H
jpayne@69 1621 struct arrayobject;
jpayne@69 1622 typedef struct arrayobject arrayobject;
jpayne@69 1623 #endif
jpayne@69 1624 struct __pyx_obj_5pysam_10libchtslib_HTSFile;
jpayne@69 1625 struct __pyx_obj_5pysam_9libcfaidx_FastaFile;
jpayne@69 1626 struct __pyx_obj_5pysam_9libcfaidx_FastqProxy;
jpayne@69 1627 struct __pyx_obj_5pysam_9libcfaidx_FastxRecord;
jpayne@69 1628 struct __pyx_obj_5pysam_9libcfaidx_FastxFile;
jpayne@69 1629 struct __pyx_obj_5pysam_9libcfaidx_FastqFile;
jpayne@69 1630 struct __pyx_obj_5pysam_9libcfaidx_Fastafile;
jpayne@69 1631 struct __pyx_opt_args_7cpython_11contextvars_get_value;
jpayne@69 1632 struct __pyx_opt_args_7cpython_11contextvars_get_value_no_default;
jpayne@69 1633
jpayne@69 1634 /* "cpython/contextvars.pxd":112
jpayne@69 1635 *
jpayne@69 1636 *
jpayne@69 1637 * cdef inline object get_value(var, default_value=None): # <<<<<<<<<<<<<<
jpayne@69 1638 * """Return a new reference to the value of the context variable,
jpayne@69 1639 * or the default value of the context variable,
jpayne@69 1640 */
jpayne@69 1641 struct __pyx_opt_args_7cpython_11contextvars_get_value {
jpayne@69 1642 int __pyx_n;
jpayne@69 1643 PyObject *default_value;
jpayne@69 1644 };
jpayne@69 1645
jpayne@69 1646 /* "cpython/contextvars.pxd":129
jpayne@69 1647 *
jpayne@69 1648 *
jpayne@69 1649 * cdef inline object get_value_no_default(var, default_value=None): # <<<<<<<<<<<<<<
jpayne@69 1650 * """Return a new reference to the value of the context variable,
jpayne@69 1651 * or the provided default value if no such value was found.
jpayne@69 1652 */
jpayne@69 1653 struct __pyx_opt_args_7cpython_11contextvars_get_value_no_default {
jpayne@69 1654 int __pyx_n;
jpayne@69 1655 PyObject *default_value;
jpayne@69 1656 };
jpayne@69 1657 struct __pyx_opt_args_5pysam_9libcutils_parse_region;
jpayne@69 1658 struct __pyx_opt_args_5pysam_9libcutils_qualitystring_to_array;
jpayne@69 1659 struct __pyx_opt_args_5pysam_9libcutils_array_to_qualitystring;
jpayne@69 1660 struct __pyx_opt_args_5pysam_9libcutils_qualities_to_qualitystring;
jpayne@69 1661 struct __pyx_opt_args_5pysam_9libcutils_charptr_to_str;
jpayne@69 1662 struct __pyx_opt_args_5pysam_9libcutils_charptr_to_bytes;
jpayne@69 1663 struct __pyx_opt_args_5pysam_9libcutils_charptr_to_str_w_len;
jpayne@69 1664 struct __pyx_opt_args_5pysam_9libcutils_force_str;
jpayne@69 1665 struct __pyx_opt_args_5pysam_9libcutils_force_bytes;
jpayne@69 1666 struct __pyx_opt_args_5pysam_9libcutils_decode_bytes;
jpayne@69 1667
jpayne@69 1668 /* "pysam/libcutils.pxd":8
jpayne@69 1669 * from cpython cimport array as c_array
jpayne@69 1670 *
jpayne@69 1671 * cpdef parse_region(contig=*, start=*, stop=*, region=*, reference=*, end=*) # <<<<<<<<<<<<<<
jpayne@69 1672 *
jpayne@69 1673 * cdef int libc_whence_from_io(int whence)
jpayne@69 1674 */
jpayne@69 1675 struct __pyx_opt_args_5pysam_9libcutils_parse_region {
jpayne@69 1676 int __pyx_n;
jpayne@69 1677 PyObject *contig;
jpayne@69 1678 PyObject *start;
jpayne@69 1679 PyObject *stop;
jpayne@69 1680 PyObject *region;
jpayne@69 1681 PyObject *reference;
jpayne@69 1682 PyObject *end;
jpayne@69 1683 };
jpayne@69 1684
jpayne@69 1685 /* "pysam/libcutils.pxd":15
jpayne@69 1686 * # Utility functions for quality string conversions
jpayne@69 1687 *
jpayne@69 1688 * cpdef c_array.array qualitystring_to_array(input_str, int offset=*) # <<<<<<<<<<<<<<
jpayne@69 1689 * cpdef array_to_qualitystring(c_array.array arr, int offset=*)
jpayne@69 1690 * cpdef qualities_to_qualitystring(qualities, int offset=*)
jpayne@69 1691 */
jpayne@69 1692 struct __pyx_opt_args_5pysam_9libcutils_qualitystring_to_array {
jpayne@69 1693 int __pyx_n;
jpayne@69 1694 int offset;
jpayne@69 1695 };
jpayne@69 1696
jpayne@69 1697 /* "pysam/libcutils.pxd":16
jpayne@69 1698 *
jpayne@69 1699 * cpdef c_array.array qualitystring_to_array(input_str, int offset=*)
jpayne@69 1700 * cpdef array_to_qualitystring(c_array.array arr, int offset=*) # <<<<<<<<<<<<<<
jpayne@69 1701 * cpdef qualities_to_qualitystring(qualities, int offset=*)
jpayne@69 1702 *
jpayne@69 1703 */
jpayne@69 1704 struct __pyx_opt_args_5pysam_9libcutils_array_to_qualitystring {
jpayne@69 1705 int __pyx_n;
jpayne@69 1706 int offset;
jpayne@69 1707 };
jpayne@69 1708
jpayne@69 1709 /* "pysam/libcutils.pxd":17
jpayne@69 1710 * cpdef c_array.array qualitystring_to_array(input_str, int offset=*)
jpayne@69 1711 * cpdef array_to_qualitystring(c_array.array arr, int offset=*)
jpayne@69 1712 * cpdef qualities_to_qualitystring(qualities, int offset=*) # <<<<<<<<<<<<<<
jpayne@69 1713 *
jpayne@69 1714 * ########################################################################
jpayne@69 1715 */
jpayne@69 1716 struct __pyx_opt_args_5pysam_9libcutils_qualities_to_qualitystring {
jpayne@69 1717 int __pyx_n;
jpayne@69 1718 int offset;
jpayne@69 1719 };
jpayne@69 1720
jpayne@69 1721 /* "pysam/libcutils.pxd":29
jpayne@69 1722 * ## Python 3 compatibility functions
jpayne@69 1723 * ########################################################################
jpayne@69 1724 * cdef charptr_to_str(const char *s, encoding=*, errors=*) # <<<<<<<<<<<<<<
jpayne@69 1725 * cdef bytes charptr_to_bytes(const char *s, encoding=*, errors=*)
jpayne@69 1726 * cdef charptr_to_str_w_len(const char* s, size_t n, encoding=*, errors=*)
jpayne@69 1727 */
jpayne@69 1728 struct __pyx_opt_args_5pysam_9libcutils_charptr_to_str {
jpayne@69 1729 int __pyx_n;
jpayne@69 1730 PyObject *encoding;
jpayne@69 1731 PyObject *errors;
jpayne@69 1732 };
jpayne@69 1733
jpayne@69 1734 /* "pysam/libcutils.pxd":30
jpayne@69 1735 * ########################################################################
jpayne@69 1736 * cdef charptr_to_str(const char *s, encoding=*, errors=*)
jpayne@69 1737 * cdef bytes charptr_to_bytes(const char *s, encoding=*, errors=*) # <<<<<<<<<<<<<<
jpayne@69 1738 * cdef charptr_to_str_w_len(const char* s, size_t n, encoding=*, errors=*)
jpayne@69 1739 * cdef force_str(object s, encoding=*, errors=*)
jpayne@69 1740 */
jpayne@69 1741 struct __pyx_opt_args_5pysam_9libcutils_charptr_to_bytes {
jpayne@69 1742 int __pyx_n;
jpayne@69 1743 PyObject *encoding;
jpayne@69 1744 PyObject *errors;
jpayne@69 1745 };
jpayne@69 1746
jpayne@69 1747 /* "pysam/libcutils.pxd":31
jpayne@69 1748 * cdef charptr_to_str(const char *s, encoding=*, errors=*)
jpayne@69 1749 * cdef bytes charptr_to_bytes(const char *s, encoding=*, errors=*)
jpayne@69 1750 * cdef charptr_to_str_w_len(const char* s, size_t n, encoding=*, errors=*) # <<<<<<<<<<<<<<
jpayne@69 1751 * cdef force_str(object s, encoding=*, errors=*)
jpayne@69 1752 * cdef bytes force_bytes(object s, encoding=*, errors=*)
jpayne@69 1753 */
jpayne@69 1754 struct __pyx_opt_args_5pysam_9libcutils_charptr_to_str_w_len {
jpayne@69 1755 int __pyx_n;
jpayne@69 1756 PyObject *encoding;
jpayne@69 1757 PyObject *errors;
jpayne@69 1758 };
jpayne@69 1759
jpayne@69 1760 /* "pysam/libcutils.pxd":32
jpayne@69 1761 * cdef bytes charptr_to_bytes(const char *s, encoding=*, errors=*)
jpayne@69 1762 * cdef charptr_to_str_w_len(const char* s, size_t n, encoding=*, errors=*)
jpayne@69 1763 * cdef force_str(object s, encoding=*, errors=*) # <<<<<<<<<<<<<<
jpayne@69 1764 * cdef bytes force_bytes(object s, encoding=*, errors=*)
jpayne@69 1765 * cdef decode_bytes(bytes s, encoding=*, errors=*)
jpayne@69 1766 */
jpayne@69 1767 struct __pyx_opt_args_5pysam_9libcutils_force_str {
jpayne@69 1768 int __pyx_n;
jpayne@69 1769 PyObject *encoding;
jpayne@69 1770 PyObject *errors;
jpayne@69 1771 };
jpayne@69 1772
jpayne@69 1773 /* "pysam/libcutils.pxd":33
jpayne@69 1774 * cdef charptr_to_str_w_len(const char* s, size_t n, encoding=*, errors=*)
jpayne@69 1775 * cdef force_str(object s, encoding=*, errors=*)
jpayne@69 1776 * cdef bytes force_bytes(object s, encoding=*, errors=*) # <<<<<<<<<<<<<<
jpayne@69 1777 * cdef decode_bytes(bytes s, encoding=*, errors=*)
jpayne@69 1778 * cdef bytes encode_filename(object filename)
jpayne@69 1779 */
jpayne@69 1780 struct __pyx_opt_args_5pysam_9libcutils_force_bytes {
jpayne@69 1781 int __pyx_n;
jpayne@69 1782 PyObject *encoding;
jpayne@69 1783 PyObject *errors;
jpayne@69 1784 };
jpayne@69 1785
jpayne@69 1786 /* "pysam/libcutils.pxd":34
jpayne@69 1787 * cdef force_str(object s, encoding=*, errors=*)
jpayne@69 1788 * cdef bytes force_bytes(object s, encoding=*, errors=*)
jpayne@69 1789 * cdef decode_bytes(bytes s, encoding=*, errors=*) # <<<<<<<<<<<<<<
jpayne@69 1790 * cdef bytes encode_filename(object filename)
jpayne@69 1791 * cdef from_string_and_size(const char *s, size_t length)
jpayne@69 1792 */
jpayne@69 1793 struct __pyx_opt_args_5pysam_9libcutils_decode_bytes {
jpayne@69 1794 int __pyx_n;
jpayne@69 1795 PyObject *encoding;
jpayne@69 1796 PyObject *errors;
jpayne@69 1797 };
jpayne@69 1798 struct __pyx_opt_args_5pysam_9libcfaidx_10FastqProxy_get_quality_array;
jpayne@69 1799 struct __pyx_opt_args_5pysam_9libcfaidx_11FastxRecord_get_quality_array;
jpayne@69 1800
jpayne@69 1801 /* "pysam/libcfaidx.pxd":50
jpayne@69 1802 * cdef cython.str to_string(self)
jpayne@69 1803 * cdef cython.str tostring(self)
jpayne@69 1804 * cpdef array.array get_quality_array(self, int offset=*) # <<<<<<<<<<<<<<
jpayne@69 1805 *
jpayne@69 1806 *
jpayne@69 1807 */
jpayne@69 1808 struct __pyx_opt_args_5pysam_9libcfaidx_10FastqProxy_get_quality_array {
jpayne@69 1809 int __pyx_n;
jpayne@69 1810 int offset;
jpayne@69 1811 };
jpayne@69 1812
jpayne@69 1813 /* "pysam/libcfaidx.pxd":60
jpayne@69 1814 * cdef cython.str to_string(self)
jpayne@69 1815 * cdef cython.str tostring(self)
jpayne@69 1816 * cpdef array.array get_quality_array(self, int offset=*) # <<<<<<<<<<<<<<
jpayne@69 1817 *
jpayne@69 1818 * cdef class FastxFile:
jpayne@69 1819 */
jpayne@69 1820 struct __pyx_opt_args_5pysam_9libcfaidx_11FastxRecord_get_quality_array {
jpayne@69 1821 int __pyx_n;
jpayne@69 1822 int offset;
jpayne@69 1823 };
jpayne@69 1824
jpayne@69 1825 /* "pysam/libchtslib.pxd":2706
jpayne@69 1826 *
jpayne@69 1827 *
jpayne@69 1828 * cdef class HTSFile(object): # <<<<<<<<<<<<<<
jpayne@69 1829 * cdef htsFile *htsfile # pointer to htsFile structure
jpayne@69 1830 * cdef int64_t start_offset # BGZF offset of first record
jpayne@69 1831 */
jpayne@69 1832 struct __pyx_obj_5pysam_10libchtslib_HTSFile {
jpayne@69 1833 PyObject_HEAD
jpayne@69 1834 struct __pyx_vtabstruct_5pysam_10libchtslib_HTSFile *__pyx_vtab;
jpayne@69 1835 htsFile *htsfile;
jpayne@69 1836 int64_t start_offset;
jpayne@69 1837 PyObject *filename;
jpayne@69 1838 PyObject *mode;
jpayne@69 1839 PyObject *threads;
jpayne@69 1840 PyObject *index_filename;
jpayne@69 1841 int is_stream;
jpayne@69 1842 int is_remote;
jpayne@69 1843 int duplicate_filehandle;
jpayne@69 1844 };
jpayne@69 1845
jpayne@69 1846
jpayne@69 1847 /* "pysam/libcfaidx.pxd":38
jpayne@69 1848 * int * dret)
jpayne@69 1849 *
jpayne@69 1850 * cdef class FastaFile: # <<<<<<<<<<<<<<
jpayne@69 1851 * cdef bint is_remote
jpayne@69 1852 * cdef object _filename, _references, _lengths, reference2length
jpayne@69 1853 */
jpayne@69 1854 struct __pyx_obj_5pysam_9libcfaidx_FastaFile {
jpayne@69 1855 PyObject_HEAD
jpayne@69 1856 struct __pyx_vtabstruct_5pysam_9libcfaidx_FastaFile *__pyx_vtab;
jpayne@69 1857 int is_remote;
jpayne@69 1858 PyObject *_filename;
jpayne@69 1859 PyObject *_references;
jpayne@69 1860 PyObject *_lengths;
jpayne@69 1861 PyObject *reference2length;
jpayne@69 1862 faidx_t *fastafile;
jpayne@69 1863 };
jpayne@69 1864
jpayne@69 1865
jpayne@69 1866 /* "pysam/libcfaidx.pxd":46
jpayne@69 1867 *
jpayne@69 1868 *
jpayne@69 1869 * cdef class FastqProxy: # <<<<<<<<<<<<<<
jpayne@69 1870 * cdef kseq_t * _delegate
jpayne@69 1871 * cdef cython.str to_string(self)
jpayne@69 1872 */
jpayne@69 1873 struct __pyx_obj_5pysam_9libcfaidx_FastqProxy {
jpayne@69 1874 PyObject_HEAD
jpayne@69 1875 struct __pyx_vtabstruct_5pysam_9libcfaidx_FastqProxy *__pyx_vtab;
jpayne@69 1876 kseq_t *_delegate;
jpayne@69 1877 };
jpayne@69 1878
jpayne@69 1879
jpayne@69 1880 /* "pysam/libcfaidx.pxd":53
jpayne@69 1881 *
jpayne@69 1882 *
jpayne@69 1883 * cdef class FastxRecord: # <<<<<<<<<<<<<<
jpayne@69 1884 * """
jpayne@69 1885 * Python container for pysam.libcfaidx.FastqProxy with persistence.
jpayne@69 1886 */
jpayne@69 1887 struct __pyx_obj_5pysam_9libcfaidx_FastxRecord {
jpayne@69 1888 PyObject_HEAD
jpayne@69 1889 struct __pyx_vtabstruct_5pysam_9libcfaidx_FastxRecord *__pyx_vtab;
jpayne@69 1890 PyObject *comment;
jpayne@69 1891 PyObject *quality;
jpayne@69 1892 PyObject *sequence;
jpayne@69 1893 PyObject *name;
jpayne@69 1894 };
jpayne@69 1895
jpayne@69 1896
jpayne@69 1897 /* "pysam/libcfaidx.pxd":62
jpayne@69 1898 * cpdef array.array get_quality_array(self, int offset=*)
jpayne@69 1899 *
jpayne@69 1900 * cdef class FastxFile: # <<<<<<<<<<<<<<
jpayne@69 1901 * cdef object _filename
jpayne@69 1902 * cdef BGZF * fastqfile
jpayne@69 1903 */
jpayne@69 1904 struct __pyx_obj_5pysam_9libcfaidx_FastxFile {
jpayne@69 1905 PyObject_HEAD
jpayne@69 1906 struct __pyx_vtabstruct_5pysam_9libcfaidx_FastxFile *__pyx_vtab;
jpayne@69 1907 PyObject *_filename;
jpayne@69 1908 BGZF *fastqfile;
jpayne@69 1909 kseq_t *entry;
jpayne@69 1910 int persist;
jpayne@69 1911 int is_remote;
jpayne@69 1912 };
jpayne@69 1913
jpayne@69 1914
jpayne@69 1915 /* "pysam/libcfaidx.pxd":74
jpayne@69 1916 *
jpayne@69 1917 * # Compatibility Layer for pysam 0.8.1
jpayne@69 1918 * cdef class FastqFile(FastxFile): # <<<<<<<<<<<<<<
jpayne@69 1919 * pass
jpayne@69 1920 *
jpayne@69 1921 */
jpayne@69 1922 struct __pyx_obj_5pysam_9libcfaidx_FastqFile {
jpayne@69 1923 struct __pyx_obj_5pysam_9libcfaidx_FastxFile __pyx_base;
jpayne@69 1924 };
jpayne@69 1925
jpayne@69 1926
jpayne@69 1927 /* "pysam/libcfaidx.pxd":79
jpayne@69 1928 *
jpayne@69 1929 * # Compatibility Layer for pysam < 0.8
jpayne@69 1930 * cdef class Fastafile(FastaFile): # <<<<<<<<<<<<<<
jpayne@69 1931 * pass
jpayne@69 1932 *
jpayne@69 1933 */
jpayne@69 1934 struct __pyx_obj_5pysam_9libcfaidx_Fastafile {
jpayne@69 1935 struct __pyx_obj_5pysam_9libcfaidx_FastaFile __pyx_base;
jpayne@69 1936 };
jpayne@69 1937
jpayne@69 1938
jpayne@69 1939
jpayne@69 1940 /* "pysam/libchtslib.pxd":2706
jpayne@69 1941 *
jpayne@69 1942 *
jpayne@69 1943 * cdef class HTSFile(object): # <<<<<<<<<<<<<<
jpayne@69 1944 * cdef htsFile *htsfile # pointer to htsFile structure
jpayne@69 1945 * cdef int64_t start_offset # BGZF offset of first record
jpayne@69 1946 */
jpayne@69 1947
jpayne@69 1948 struct __pyx_vtabstruct_5pysam_10libchtslib_HTSFile {
jpayne@69 1949 htsFile *(*_open_htsfile)(struct __pyx_obj_5pysam_10libchtslib_HTSFile *);
jpayne@69 1950 };
jpayne@69 1951 static struct __pyx_vtabstruct_5pysam_10libchtslib_HTSFile *__pyx_vtabptr_5pysam_10libchtslib_HTSFile;
jpayne@69 1952
jpayne@69 1953
jpayne@69 1954 /* "pysam/libcfaidx.pyx":83
jpayne@69 1955 * ## add automatic indexing.
jpayne@69 1956 * ## add function to get sequence names.
jpayne@69 1957 * cdef class FastaFile: # <<<<<<<<<<<<<<
jpayne@69 1958 * """Random access to fasta formatted files that
jpayne@69 1959 * have been indexed by :term:`faidx`.
jpayne@69 1960 */
jpayne@69 1961
jpayne@69 1962 struct __pyx_vtabstruct_5pysam_9libcfaidx_FastaFile {
jpayne@69 1963 char *(*_fetch)(struct __pyx_obj_5pysam_9libcfaidx_FastaFile *, char *, int, int, int *);
jpayne@69 1964 };
jpayne@69 1965 static struct __pyx_vtabstruct_5pysam_9libcfaidx_FastaFile *__pyx_vtabptr_5pysam_9libcfaidx_FastaFile;
jpayne@69 1966
jpayne@69 1967
jpayne@69 1968 /* "pysam/libcfaidx.pyx":355
jpayne@69 1969 *
jpayne@69 1970 *
jpayne@69 1971 * cdef class FastqProxy: # <<<<<<<<<<<<<<
jpayne@69 1972 * """A single entry in a fastq file."""
jpayne@69 1973 * def __init__(self):
jpayne@69 1974 */
jpayne@69 1975
jpayne@69 1976 struct __pyx_vtabstruct_5pysam_9libcfaidx_FastqProxy {
jpayne@69 1977 PyObject *(*to_string)(struct __pyx_obj_5pysam_9libcfaidx_FastqProxy *);
jpayne@69 1978 PyObject *(*tostring)(struct __pyx_obj_5pysam_9libcfaidx_FastqProxy *);
jpayne@69 1979 arrayobject *(*get_quality_array)(struct __pyx_obj_5pysam_9libcfaidx_FastqProxy *, int __pyx_skip_dispatch, struct __pyx_opt_args_5pysam_9libcfaidx_10FastqProxy_get_quality_array *__pyx_optional_args);
jpayne@69 1980 };
jpayne@69 1981 static struct __pyx_vtabstruct_5pysam_9libcfaidx_FastqProxy *__pyx_vtabptr_5pysam_9libcfaidx_FastqProxy;
jpayne@69 1982
jpayne@69 1983
jpayne@69 1984 /* "pysam/libcfaidx.pyx":411
jpayne@69 1985 * offset=offset)
jpayne@69 1986 *
jpayne@69 1987 * cdef class FastxRecord: # <<<<<<<<<<<<<<
jpayne@69 1988 * """A fasta/fastq record.
jpayne@69 1989 *
jpayne@69 1990 */
jpayne@69 1991
jpayne@69 1992 struct __pyx_vtabstruct_5pysam_9libcfaidx_FastxRecord {
jpayne@69 1993 PyObject *(*to_string)(struct __pyx_obj_5pysam_9libcfaidx_FastxRecord *);
jpayne@69 1994 PyObject *(*tostring)(struct __pyx_obj_5pysam_9libcfaidx_FastxRecord *);
jpayne@69 1995 arrayobject *(*get_quality_array)(struct __pyx_obj_5pysam_9libcfaidx_FastxRecord *, int __pyx_skip_dispatch, struct __pyx_opt_args_5pysam_9libcfaidx_11FastxRecord_get_quality_array *__pyx_optional_args);
jpayne@69 1996 };
jpayne@69 1997 static struct __pyx_vtabstruct_5pysam_9libcfaidx_FastxRecord *__pyx_vtabptr_5pysam_9libcfaidx_FastxRecord;
jpayne@69 1998
jpayne@69 1999
jpayne@69 2000 /* "pysam/libcfaidx.pyx":496
jpayne@69 2001 *
jpayne@69 2002 *
jpayne@69 2003 * cdef class FastxFile: # <<<<<<<<<<<<<<
jpayne@69 2004 * r"""Stream access to :term:`fasta` or :term:`fastq` formatted files.
jpayne@69 2005 *
jpayne@69 2006 */
jpayne@69 2007
jpayne@69 2008 struct __pyx_vtabstruct_5pysam_9libcfaidx_FastxFile {
jpayne@69 2009 kseq_t *(*getCurrent)(struct __pyx_obj_5pysam_9libcfaidx_FastxFile *);
jpayne@69 2010 int (*cnext)(struct __pyx_obj_5pysam_9libcfaidx_FastxFile *);
jpayne@69 2011 };
jpayne@69 2012 static struct __pyx_vtabstruct_5pysam_9libcfaidx_FastxFile *__pyx_vtabptr_5pysam_9libcfaidx_FastxFile;
jpayne@69 2013
jpayne@69 2014
jpayne@69 2015 /* "pysam/libcfaidx.pyx":658
jpayne@69 2016 *
jpayne@69 2017 * # Compatibility Layer for pysam 0.8.1
jpayne@69 2018 * cdef class FastqFile(FastxFile): # <<<<<<<<<<<<<<
jpayne@69 2019 * """FastqFile is deprecated: use FastxFile instead"""
jpayne@69 2020 * pass
jpayne@69 2021 */
jpayne@69 2022
jpayne@69 2023 struct __pyx_vtabstruct_5pysam_9libcfaidx_FastqFile {
jpayne@69 2024 struct __pyx_vtabstruct_5pysam_9libcfaidx_FastxFile __pyx_base;
jpayne@69 2025 };
jpayne@69 2026 static struct __pyx_vtabstruct_5pysam_9libcfaidx_FastqFile *__pyx_vtabptr_5pysam_9libcfaidx_FastqFile;
jpayne@69 2027
jpayne@69 2028
jpayne@69 2029 /* "pysam/libcfaidx.pyx":663
jpayne@69 2030 *
jpayne@69 2031 * # Compatibility Layer for pysam < 0.8
jpayne@69 2032 * cdef class Fastafile(FastaFile): # <<<<<<<<<<<<<<
jpayne@69 2033 * """Fastafile is deprecated: use FastaFile instead"""
jpayne@69 2034 * pass
jpayne@69 2035 */
jpayne@69 2036
jpayne@69 2037 struct __pyx_vtabstruct_5pysam_9libcfaidx_Fastafile {
jpayne@69 2038 struct __pyx_vtabstruct_5pysam_9libcfaidx_FastaFile __pyx_base;
jpayne@69 2039 };
jpayne@69 2040 static struct __pyx_vtabstruct_5pysam_9libcfaidx_Fastafile *__pyx_vtabptr_5pysam_9libcfaidx_Fastafile;
jpayne@69 2041 /* #### Code section: utility_code_proto ### */
jpayne@69 2042
jpayne@69 2043 /* --- Runtime support code (head) --- */
jpayne@69 2044 /* Refnanny.proto */
jpayne@69 2045 #ifndef CYTHON_REFNANNY
jpayne@69 2046 #define CYTHON_REFNANNY 0
jpayne@69 2047 #endif
jpayne@69 2048 #if CYTHON_REFNANNY
jpayne@69 2049 typedef struct {
jpayne@69 2050 void (*INCREF)(void*, PyObject*, Py_ssize_t);
jpayne@69 2051 void (*DECREF)(void*, PyObject*, Py_ssize_t);
jpayne@69 2052 void (*GOTREF)(void*, PyObject*, Py_ssize_t);
jpayne@69 2053 void (*GIVEREF)(void*, PyObject*, Py_ssize_t);
jpayne@69 2054 void* (*SetupContext)(const char*, Py_ssize_t, const char*);
jpayne@69 2055 void (*FinishContext)(void**);
jpayne@69 2056 } __Pyx_RefNannyAPIStruct;
jpayne@69 2057 static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL;
jpayne@69 2058 static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname);
jpayne@69 2059 #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL;
jpayne@69 2060 #ifdef WITH_THREAD
jpayne@69 2061 #define __Pyx_RefNannySetupContext(name, acquire_gil)\
jpayne@69 2062 if (acquire_gil) {\
jpayne@69 2063 PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\
jpayne@69 2064 __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), (__LINE__), (__FILE__));\
jpayne@69 2065 PyGILState_Release(__pyx_gilstate_save);\
jpayne@69 2066 } else {\
jpayne@69 2067 __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), (__LINE__), (__FILE__));\
jpayne@69 2068 }
jpayne@69 2069 #define __Pyx_RefNannyFinishContextNogil() {\
jpayne@69 2070 PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\
jpayne@69 2071 __Pyx_RefNannyFinishContext();\
jpayne@69 2072 PyGILState_Release(__pyx_gilstate_save);\
jpayne@69 2073 }
jpayne@69 2074 #else
jpayne@69 2075 #define __Pyx_RefNannySetupContext(name, acquire_gil)\
jpayne@69 2076 __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), (__LINE__), (__FILE__))
jpayne@69 2077 #define __Pyx_RefNannyFinishContextNogil() __Pyx_RefNannyFinishContext()
jpayne@69 2078 #endif
jpayne@69 2079 #define __Pyx_RefNannyFinishContextNogil() {\
jpayne@69 2080 PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\
jpayne@69 2081 __Pyx_RefNannyFinishContext();\
jpayne@69 2082 PyGILState_Release(__pyx_gilstate_save);\
jpayne@69 2083 }
jpayne@69 2084 #define __Pyx_RefNannyFinishContext()\
jpayne@69 2085 __Pyx_RefNanny->FinishContext(&__pyx_refnanny)
jpayne@69 2086 #define __Pyx_INCREF(r) __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), (__LINE__))
jpayne@69 2087 #define __Pyx_DECREF(r) __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), (__LINE__))
jpayne@69 2088 #define __Pyx_GOTREF(r) __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), (__LINE__))
jpayne@69 2089 #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), (__LINE__))
jpayne@69 2090 #define __Pyx_XINCREF(r) do { if((r) == NULL); else {__Pyx_INCREF(r); }} while(0)
jpayne@69 2091 #define __Pyx_XDECREF(r) do { if((r) == NULL); else {__Pyx_DECREF(r); }} while(0)
jpayne@69 2092 #define __Pyx_XGOTREF(r) do { if((r) == NULL); else {__Pyx_GOTREF(r); }} while(0)
jpayne@69 2093 #define __Pyx_XGIVEREF(r) do { if((r) == NULL); else {__Pyx_GIVEREF(r);}} while(0)
jpayne@69 2094 #else
jpayne@69 2095 #define __Pyx_RefNannyDeclarations
jpayne@69 2096 #define __Pyx_RefNannySetupContext(name, acquire_gil)
jpayne@69 2097 #define __Pyx_RefNannyFinishContextNogil()
jpayne@69 2098 #define __Pyx_RefNannyFinishContext()
jpayne@69 2099 #define __Pyx_INCREF(r) Py_INCREF(r)
jpayne@69 2100 #define __Pyx_DECREF(r) Py_DECREF(r)
jpayne@69 2101 #define __Pyx_GOTREF(r)
jpayne@69 2102 #define __Pyx_GIVEREF(r)
jpayne@69 2103 #define __Pyx_XINCREF(r) Py_XINCREF(r)
jpayne@69 2104 #define __Pyx_XDECREF(r) Py_XDECREF(r)
jpayne@69 2105 #define __Pyx_XGOTREF(r)
jpayne@69 2106 #define __Pyx_XGIVEREF(r)
jpayne@69 2107 #endif
jpayne@69 2108 #define __Pyx_Py_XDECREF_SET(r, v) do {\
jpayne@69 2109 PyObject *tmp = (PyObject *) r;\
jpayne@69 2110 r = v; Py_XDECREF(tmp);\
jpayne@69 2111 } while (0)
jpayne@69 2112 #define __Pyx_XDECREF_SET(r, v) do {\
jpayne@69 2113 PyObject *tmp = (PyObject *) r;\
jpayne@69 2114 r = v; __Pyx_XDECREF(tmp);\
jpayne@69 2115 } while (0)
jpayne@69 2116 #define __Pyx_DECREF_SET(r, v) do {\
jpayne@69 2117 PyObject *tmp = (PyObject *) r;\
jpayne@69 2118 r = v; __Pyx_DECREF(tmp);\
jpayne@69 2119 } while (0)
jpayne@69 2120 #define __Pyx_CLEAR(r) do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0)
jpayne@69 2121 #define __Pyx_XCLEAR(r) do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0)
jpayne@69 2122
jpayne@69 2123 /* PyErrExceptionMatches.proto */
jpayne@69 2124 #if CYTHON_FAST_THREAD_STATE
jpayne@69 2125 #define __Pyx_PyErr_ExceptionMatches(err) __Pyx_PyErr_ExceptionMatchesInState(__pyx_tstate, err)
jpayne@69 2126 static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err);
jpayne@69 2127 #else
jpayne@69 2128 #define __Pyx_PyErr_ExceptionMatches(err) PyErr_ExceptionMatches(err)
jpayne@69 2129 #endif
jpayne@69 2130
jpayne@69 2131 /* PyThreadStateGet.proto */
jpayne@69 2132 #if CYTHON_FAST_THREAD_STATE
jpayne@69 2133 #define __Pyx_PyThreadState_declare PyThreadState *__pyx_tstate;
jpayne@69 2134 #define __Pyx_PyThreadState_assign __pyx_tstate = __Pyx_PyThreadState_Current;
jpayne@69 2135 #if PY_VERSION_HEX >= 0x030C00A6
jpayne@69 2136 #define __Pyx_PyErr_Occurred() (__pyx_tstate->current_exception != NULL)
jpayne@69 2137 #define __Pyx_PyErr_CurrentExceptionType() (__pyx_tstate->current_exception ? (PyObject*) Py_TYPE(__pyx_tstate->current_exception) : (PyObject*) NULL)
jpayne@69 2138 #else
jpayne@69 2139 #define __Pyx_PyErr_Occurred() (__pyx_tstate->curexc_type != NULL)
jpayne@69 2140 #define __Pyx_PyErr_CurrentExceptionType() (__pyx_tstate->curexc_type)
jpayne@69 2141 #endif
jpayne@69 2142 #else
jpayne@69 2143 #define __Pyx_PyThreadState_declare
jpayne@69 2144 #define __Pyx_PyThreadState_assign
jpayne@69 2145 #define __Pyx_PyErr_Occurred() (PyErr_Occurred() != NULL)
jpayne@69 2146 #define __Pyx_PyErr_CurrentExceptionType() PyErr_Occurred()
jpayne@69 2147 #endif
jpayne@69 2148
jpayne@69 2149 /* PyErrFetchRestore.proto */
jpayne@69 2150 #if CYTHON_FAST_THREAD_STATE
jpayne@69 2151 #define __Pyx_PyErr_Clear() __Pyx_ErrRestore(NULL, NULL, NULL)
jpayne@69 2152 #define __Pyx_ErrRestoreWithState(type, value, tb) __Pyx_ErrRestoreInState(PyThreadState_GET(), type, value, tb)
jpayne@69 2153 #define __Pyx_ErrFetchWithState(type, value, tb) __Pyx_ErrFetchInState(PyThreadState_GET(), type, value, tb)
jpayne@69 2154 #define __Pyx_ErrRestore(type, value, tb) __Pyx_ErrRestoreInState(__pyx_tstate, type, value, tb)
jpayne@69 2155 #define __Pyx_ErrFetch(type, value, tb) __Pyx_ErrFetchInState(__pyx_tstate, type, value, tb)
jpayne@69 2156 static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
jpayne@69 2157 static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
jpayne@69 2158 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A6
jpayne@69 2159 #define __Pyx_PyErr_SetNone(exc) (Py_INCREF(exc), __Pyx_ErrRestore((exc), NULL, NULL))
jpayne@69 2160 #else
jpayne@69 2161 #define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
jpayne@69 2162 #endif
jpayne@69 2163 #else
jpayne@69 2164 #define __Pyx_PyErr_Clear() PyErr_Clear()
jpayne@69 2165 #define __Pyx_PyErr_SetNone(exc) PyErr_SetNone(exc)
jpayne@69 2166 #define __Pyx_ErrRestoreWithState(type, value, tb) PyErr_Restore(type, value, tb)
jpayne@69 2167 #define __Pyx_ErrFetchWithState(type, value, tb) PyErr_Fetch(type, value, tb)
jpayne@69 2168 #define __Pyx_ErrRestoreInState(tstate, type, value, tb) PyErr_Restore(type, value, tb)
jpayne@69 2169 #define __Pyx_ErrFetchInState(tstate, type, value, tb) PyErr_Fetch(type, value, tb)
jpayne@69 2170 #define __Pyx_ErrRestore(type, value, tb) PyErr_Restore(type, value, tb)
jpayne@69 2171 #define __Pyx_ErrFetch(type, value, tb) PyErr_Fetch(type, value, tb)
jpayne@69 2172 #endif
jpayne@69 2173
jpayne@69 2174 /* PyObjectGetAttrStr.proto */
jpayne@69 2175 #if CYTHON_USE_TYPE_SLOTS
jpayne@69 2176 static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name);
jpayne@69 2177 #else
jpayne@69 2178 #define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n)
jpayne@69 2179 #endif
jpayne@69 2180
jpayne@69 2181 /* PyObjectGetAttrStrNoError.proto */
jpayne@69 2182 static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name);
jpayne@69 2183
jpayne@69 2184 /* GetBuiltinName.proto */
jpayne@69 2185 static PyObject *__Pyx_GetBuiltinName(PyObject *name);
jpayne@69 2186
jpayne@69 2187 /* TupleAndListFromArray.proto */
jpayne@69 2188 #if CYTHON_COMPILING_IN_CPYTHON
jpayne@69 2189 static CYTHON_INLINE PyObject* __Pyx_PyList_FromArray(PyObject *const *src, Py_ssize_t n);
jpayne@69 2190 static CYTHON_INLINE PyObject* __Pyx_PyTuple_FromArray(PyObject *const *src, Py_ssize_t n);
jpayne@69 2191 #endif
jpayne@69 2192
jpayne@69 2193 /* IncludeStringH.proto */
jpayne@69 2194 #include <string.h>
jpayne@69 2195
jpayne@69 2196 /* BytesEquals.proto */
jpayne@69 2197 static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals);
jpayne@69 2198
jpayne@69 2199 /* UnicodeEquals.proto */
jpayne@69 2200 static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals);
jpayne@69 2201
jpayne@69 2202 /* fastcall.proto */
jpayne@69 2203 #if CYTHON_AVOID_BORROWED_REFS
jpayne@69 2204 #define __Pyx_Arg_VARARGS(args, i) PySequence_GetItem(args, i)
jpayne@69 2205 #elif CYTHON_ASSUME_SAFE_MACROS
jpayne@69 2206 #define __Pyx_Arg_VARARGS(args, i) PyTuple_GET_ITEM(args, i)
jpayne@69 2207 #else
jpayne@69 2208 #define __Pyx_Arg_VARARGS(args, i) PyTuple_GetItem(args, i)
jpayne@69 2209 #endif
jpayne@69 2210 #if CYTHON_AVOID_BORROWED_REFS
jpayne@69 2211 #define __Pyx_Arg_NewRef_VARARGS(arg) __Pyx_NewRef(arg)
jpayne@69 2212 #define __Pyx_Arg_XDECREF_VARARGS(arg) Py_XDECREF(arg)
jpayne@69 2213 #else
jpayne@69 2214 #define __Pyx_Arg_NewRef_VARARGS(arg) arg
jpayne@69 2215 #define __Pyx_Arg_XDECREF_VARARGS(arg)
jpayne@69 2216 #endif
jpayne@69 2217 #define __Pyx_NumKwargs_VARARGS(kwds) PyDict_Size(kwds)
jpayne@69 2218 #define __Pyx_KwValues_VARARGS(args, nargs) NULL
jpayne@69 2219 #define __Pyx_GetKwValue_VARARGS(kw, kwvalues, s) __Pyx_PyDict_GetItemStrWithError(kw, s)
jpayne@69 2220 #define __Pyx_KwargsAsDict_VARARGS(kw, kwvalues) PyDict_Copy(kw)
jpayne@69 2221 #if CYTHON_METH_FASTCALL
jpayne@69 2222 #define __Pyx_Arg_FASTCALL(args, i) args[i]
jpayne@69 2223 #define __Pyx_NumKwargs_FASTCALL(kwds) PyTuple_GET_SIZE(kwds)
jpayne@69 2224 #define __Pyx_KwValues_FASTCALL(args, nargs) ((args) + (nargs))
jpayne@69 2225 static CYTHON_INLINE PyObject * __Pyx_GetKwValue_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues, PyObject *s);
jpayne@69 2226 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000
jpayne@69 2227 CYTHON_UNUSED static PyObject *__Pyx_KwargsAsDict_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues);
jpayne@69 2228 #else
jpayne@69 2229 #define __Pyx_KwargsAsDict_FASTCALL(kw, kwvalues) _PyStack_AsDict(kwvalues, kw)
jpayne@69 2230 #endif
jpayne@69 2231 #define __Pyx_Arg_NewRef_FASTCALL(arg) arg /* no-op, __Pyx_Arg_FASTCALL is direct and this needs
jpayne@69 2232 to have the same reference counting */
jpayne@69 2233 #define __Pyx_Arg_XDECREF_FASTCALL(arg)
jpayne@69 2234 #else
jpayne@69 2235 #define __Pyx_Arg_FASTCALL __Pyx_Arg_VARARGS
jpayne@69 2236 #define __Pyx_NumKwargs_FASTCALL __Pyx_NumKwargs_VARARGS
jpayne@69 2237 #define __Pyx_KwValues_FASTCALL __Pyx_KwValues_VARARGS
jpayne@69 2238 #define __Pyx_GetKwValue_FASTCALL __Pyx_GetKwValue_VARARGS
jpayne@69 2239 #define __Pyx_KwargsAsDict_FASTCALL __Pyx_KwargsAsDict_VARARGS
jpayne@69 2240 #define __Pyx_Arg_NewRef_FASTCALL(arg) __Pyx_Arg_NewRef_VARARGS(arg)
jpayne@69 2241 #define __Pyx_Arg_XDECREF_FASTCALL(arg) __Pyx_Arg_XDECREF_VARARGS(arg)
jpayne@69 2242 #endif
jpayne@69 2243 #if CYTHON_COMPILING_IN_CPYTHON && CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
jpayne@69 2244 #define __Pyx_ArgsSlice_VARARGS(args, start, stop) __Pyx_PyTuple_FromArray(&__Pyx_Arg_VARARGS(args, start), stop - start)
jpayne@69 2245 #define __Pyx_ArgsSlice_FASTCALL(args, start, stop) __Pyx_PyTuple_FromArray(&__Pyx_Arg_FASTCALL(args, start), stop - start)
jpayne@69 2246 #else
jpayne@69 2247 #define __Pyx_ArgsSlice_VARARGS(args, start, stop) PyTuple_GetSlice(args, start, stop)
jpayne@69 2248 #define __Pyx_ArgsSlice_FASTCALL(args, start, stop) PyTuple_GetSlice(args, start, stop)
jpayne@69 2249 #endif
jpayne@69 2250
jpayne@69 2251 /* Profile.proto */
jpayne@69 2252 #ifndef CYTHON_PROFILE
jpayne@69 2253 #if CYTHON_COMPILING_IN_LIMITED_API || CYTHON_COMPILING_IN_PYPY
jpayne@69 2254 #define CYTHON_PROFILE 0
jpayne@69 2255 #else
jpayne@69 2256 #define CYTHON_PROFILE 1
jpayne@69 2257 #endif
jpayne@69 2258 #endif
jpayne@69 2259 #ifndef CYTHON_TRACE_NOGIL
jpayne@69 2260 #define CYTHON_TRACE_NOGIL 0
jpayne@69 2261 #else
jpayne@69 2262 #if CYTHON_TRACE_NOGIL && !defined(CYTHON_TRACE)
jpayne@69 2263 #define CYTHON_TRACE 1
jpayne@69 2264 #endif
jpayne@69 2265 #endif
jpayne@69 2266 #ifndef CYTHON_TRACE
jpayne@69 2267 #define CYTHON_TRACE 0
jpayne@69 2268 #endif
jpayne@69 2269 #if CYTHON_TRACE
jpayne@69 2270 #undef CYTHON_PROFILE_REUSE_FRAME
jpayne@69 2271 #endif
jpayne@69 2272 #ifndef CYTHON_PROFILE_REUSE_FRAME
jpayne@69 2273 #define CYTHON_PROFILE_REUSE_FRAME 0
jpayne@69 2274 #endif
jpayne@69 2275 #if CYTHON_PROFILE || CYTHON_TRACE
jpayne@69 2276 #include "compile.h"
jpayne@69 2277 #include "frameobject.h"
jpayne@69 2278 #include "traceback.h"
jpayne@69 2279 #if PY_VERSION_HEX >= 0x030b00a6
jpayne@69 2280 #ifndef Py_BUILD_CORE
jpayne@69 2281 #define Py_BUILD_CORE 1
jpayne@69 2282 #endif
jpayne@69 2283 #include "internal/pycore_frame.h"
jpayne@69 2284 #endif
jpayne@69 2285 #if CYTHON_PROFILE_REUSE_FRAME
jpayne@69 2286 #define CYTHON_FRAME_MODIFIER static
jpayne@69 2287 #define CYTHON_FRAME_DEL(frame)
jpayne@69 2288 #else
jpayne@69 2289 #define CYTHON_FRAME_MODIFIER
jpayne@69 2290 #define CYTHON_FRAME_DEL(frame) Py_CLEAR(frame)
jpayne@69 2291 #endif
jpayne@69 2292 #define __Pyx_TraceDeclarations\
jpayne@69 2293 static PyCodeObject *__pyx_frame_code = NULL;\
jpayne@69 2294 CYTHON_FRAME_MODIFIER PyFrameObject *__pyx_frame = NULL;\
jpayne@69 2295 int __Pyx_use_tracing = 0;
jpayne@69 2296 #define __Pyx_TraceFrameInit(codeobj)\
jpayne@69 2297 if (codeobj) __pyx_frame_code = (PyCodeObject*) codeobj;
jpayne@69 2298 #if PY_VERSION_HEX >= 0x030b00a2
jpayne@69 2299 #if PY_VERSION_HEX >= 0x030C00b1
jpayne@69 2300 #define __Pyx_IsTracing(tstate, check_tracing, check_funcs)\
jpayne@69 2301 ((!(check_tracing) || !(tstate)->tracing) &&\
jpayne@69 2302 (!(check_funcs) || (tstate)->c_profilefunc || (CYTHON_TRACE && (tstate)->c_tracefunc)))
jpayne@69 2303 #else
jpayne@69 2304 #define __Pyx_IsTracing(tstate, check_tracing, check_funcs)\
jpayne@69 2305 (unlikely((tstate)->cframe->use_tracing) &&\
jpayne@69 2306 (!(check_tracing) || !(tstate)->tracing) &&\
jpayne@69 2307 (!(check_funcs) || (tstate)->c_profilefunc || (CYTHON_TRACE && (tstate)->c_tracefunc)))
jpayne@69 2308 #endif
jpayne@69 2309 #define __Pyx_EnterTracing(tstate) PyThreadState_EnterTracing(tstate)
jpayne@69 2310 #define __Pyx_LeaveTracing(tstate) PyThreadState_LeaveTracing(tstate)
jpayne@69 2311 #elif PY_VERSION_HEX >= 0x030a00b1
jpayne@69 2312 #define __Pyx_IsTracing(tstate, check_tracing, check_funcs)\
jpayne@69 2313 (unlikely((tstate)->cframe->use_tracing) &&\
jpayne@69 2314 (!(check_tracing) || !(tstate)->tracing) &&\
jpayne@69 2315 (!(check_funcs) || (tstate)->c_profilefunc || (CYTHON_TRACE && (tstate)->c_tracefunc)))
jpayne@69 2316 #define __Pyx_EnterTracing(tstate)\
jpayne@69 2317 do { tstate->tracing++; tstate->cframe->use_tracing = 0; } while (0)
jpayne@69 2318 #define __Pyx_LeaveTracing(tstate)\
jpayne@69 2319 do {\
jpayne@69 2320 tstate->tracing--;\
jpayne@69 2321 tstate->cframe->use_tracing = ((CYTHON_TRACE && tstate->c_tracefunc != NULL)\
jpayne@69 2322 || tstate->c_profilefunc != NULL);\
jpayne@69 2323 } while (0)
jpayne@69 2324 #else
jpayne@69 2325 #define __Pyx_IsTracing(tstate, check_tracing, check_funcs)\
jpayne@69 2326 (unlikely((tstate)->use_tracing) &&\
jpayne@69 2327 (!(check_tracing) || !(tstate)->tracing) &&\
jpayne@69 2328 (!(check_funcs) || (tstate)->c_profilefunc || (CYTHON_TRACE && (tstate)->c_tracefunc)))
jpayne@69 2329 #define __Pyx_EnterTracing(tstate)\
jpayne@69 2330 do { tstate->tracing++; tstate->use_tracing = 0; } while (0)
jpayne@69 2331 #define __Pyx_LeaveTracing(tstate)\
jpayne@69 2332 do {\
jpayne@69 2333 tstate->tracing--;\
jpayne@69 2334 tstate->use_tracing = ((CYTHON_TRACE && tstate->c_tracefunc != NULL)\
jpayne@69 2335 || tstate->c_profilefunc != NULL);\
jpayne@69 2336 } while (0)
jpayne@69 2337 #endif
jpayne@69 2338 #ifdef WITH_THREAD
jpayne@69 2339 #define __Pyx_TraceCall(funcname, srcfile, firstlineno, nogil, goto_error)\
jpayne@69 2340 if (nogil) {\
jpayne@69 2341 if (CYTHON_TRACE_NOGIL) {\
jpayne@69 2342 PyThreadState *tstate;\
jpayne@69 2343 PyGILState_STATE state = PyGILState_Ensure();\
jpayne@69 2344 tstate = __Pyx_PyThreadState_Current;\
jpayne@69 2345 if (__Pyx_IsTracing(tstate, 1, 1)) {\
jpayne@69 2346 __Pyx_use_tracing = __Pyx_TraceSetupAndCall(&__pyx_frame_code, &__pyx_frame, tstate, funcname, srcfile, firstlineno);\
jpayne@69 2347 }\
jpayne@69 2348 PyGILState_Release(state);\
jpayne@69 2349 if (unlikely(__Pyx_use_tracing < 0)) goto_error;\
jpayne@69 2350 }\
jpayne@69 2351 } else {\
jpayne@69 2352 PyThreadState* tstate = PyThreadState_GET();\
jpayne@69 2353 if (__Pyx_IsTracing(tstate, 1, 1)) {\
jpayne@69 2354 __Pyx_use_tracing = __Pyx_TraceSetupAndCall(&__pyx_frame_code, &__pyx_frame, tstate, funcname, srcfile, firstlineno);\
jpayne@69 2355 if (unlikely(__Pyx_use_tracing < 0)) goto_error;\
jpayne@69 2356 }\
jpayne@69 2357 }
jpayne@69 2358 #else
jpayne@69 2359 #define __Pyx_TraceCall(funcname, srcfile, firstlineno, nogil, goto_error)\
jpayne@69 2360 { PyThreadState* tstate = PyThreadState_GET();\
jpayne@69 2361 if (__Pyx_IsTracing(tstate, 1, 1)) {\
jpayne@69 2362 __Pyx_use_tracing = __Pyx_TraceSetupAndCall(&__pyx_frame_code, &__pyx_frame, tstate, funcname, srcfile, firstlineno);\
jpayne@69 2363 if (unlikely(__Pyx_use_tracing < 0)) goto_error;\
jpayne@69 2364 }\
jpayne@69 2365 }
jpayne@69 2366 #endif
jpayne@69 2367 #define __Pyx_TraceException()\
jpayne@69 2368 if (likely(!__Pyx_use_tracing)); else {\
jpayne@69 2369 PyThreadState* tstate = __Pyx_PyThreadState_Current;\
jpayne@69 2370 if (__Pyx_IsTracing(tstate, 0, 1)) {\
jpayne@69 2371 __Pyx_EnterTracing(tstate);\
jpayne@69 2372 PyObject *exc_info = __Pyx_GetExceptionTuple(tstate);\
jpayne@69 2373 if (exc_info) {\
jpayne@69 2374 if (CYTHON_TRACE && tstate->c_tracefunc)\
jpayne@69 2375 tstate->c_tracefunc(\
jpayne@69 2376 tstate->c_traceobj, __pyx_frame, PyTrace_EXCEPTION, exc_info);\
jpayne@69 2377 tstate->c_profilefunc(\
jpayne@69 2378 tstate->c_profileobj, __pyx_frame, PyTrace_EXCEPTION, exc_info);\
jpayne@69 2379 Py_DECREF(exc_info);\
jpayne@69 2380 }\
jpayne@69 2381 __Pyx_LeaveTracing(tstate);\
jpayne@69 2382 }\
jpayne@69 2383 }
jpayne@69 2384 static void __Pyx_call_return_trace_func(PyThreadState *tstate, PyFrameObject *frame, PyObject *result) {
jpayne@69 2385 PyObject *type, *value, *traceback;
jpayne@69 2386 __Pyx_ErrFetchInState(tstate, &type, &value, &traceback);
jpayne@69 2387 __Pyx_EnterTracing(tstate);
jpayne@69 2388 if (CYTHON_TRACE && tstate->c_tracefunc)
jpayne@69 2389 tstate->c_tracefunc(tstate->c_traceobj, frame, PyTrace_RETURN, result);
jpayne@69 2390 if (tstate->c_profilefunc)
jpayne@69 2391 tstate->c_profilefunc(tstate->c_profileobj, frame, PyTrace_RETURN, result);
jpayne@69 2392 CYTHON_FRAME_DEL(frame);
jpayne@69 2393 __Pyx_LeaveTracing(tstate);
jpayne@69 2394 __Pyx_ErrRestoreInState(tstate, type, value, traceback);
jpayne@69 2395 }
jpayne@69 2396 #ifdef WITH_THREAD
jpayne@69 2397 #define __Pyx_TraceReturn(result, nogil)\
jpayne@69 2398 if (likely(!__Pyx_use_tracing)); else {\
jpayne@69 2399 if (nogil) {\
jpayne@69 2400 if (CYTHON_TRACE_NOGIL) {\
jpayne@69 2401 PyThreadState *tstate;\
jpayne@69 2402 PyGILState_STATE state = PyGILState_Ensure();\
jpayne@69 2403 tstate = __Pyx_PyThreadState_Current;\
jpayne@69 2404 if (__Pyx_IsTracing(tstate, 0, 0)) {\
jpayne@69 2405 __Pyx_call_return_trace_func(tstate, __pyx_frame, (PyObject*)result);\
jpayne@69 2406 }\
jpayne@69 2407 PyGILState_Release(state);\
jpayne@69 2408 }\
jpayne@69 2409 } else {\
jpayne@69 2410 PyThreadState* tstate = __Pyx_PyThreadState_Current;\
jpayne@69 2411 if (__Pyx_IsTracing(tstate, 0, 0)) {\
jpayne@69 2412 __Pyx_call_return_trace_func(tstate, __pyx_frame, (PyObject*)result);\
jpayne@69 2413 }\
jpayne@69 2414 }\
jpayne@69 2415 }
jpayne@69 2416 #else
jpayne@69 2417 #define __Pyx_TraceReturn(result, nogil)\
jpayne@69 2418 if (likely(!__Pyx_use_tracing)); else {\
jpayne@69 2419 PyThreadState* tstate = __Pyx_PyThreadState_Current;\
jpayne@69 2420 if (__Pyx_IsTracing(tstate, 0, 0)) {\
jpayne@69 2421 __Pyx_call_return_trace_func(tstate, __pyx_frame, (PyObject*)result);\
jpayne@69 2422 }\
jpayne@69 2423 }
jpayne@69 2424 #endif
jpayne@69 2425 static PyCodeObject *__Pyx_createFrameCodeObject(const char *funcname, const char *srcfile, int firstlineno);
jpayne@69 2426 static int __Pyx_TraceSetupAndCall(PyCodeObject** code, PyFrameObject** frame, PyThreadState* tstate, const char *funcname, const char *srcfile, int firstlineno);
jpayne@69 2427 #else
jpayne@69 2428 #define __Pyx_TraceDeclarations
jpayne@69 2429 #define __Pyx_TraceFrameInit(codeobj)
jpayne@69 2430 #define __Pyx_TraceCall(funcname, srcfile, firstlineno, nogil, goto_error) if ((1)); else goto_error;
jpayne@69 2431 #define __Pyx_TraceException()
jpayne@69 2432 #define __Pyx_TraceReturn(result, nogil)
jpayne@69 2433 #endif
jpayne@69 2434 #if CYTHON_TRACE
jpayne@69 2435 static int __Pyx_call_line_trace_func(PyThreadState *tstate, PyFrameObject *frame, int lineno) {
jpayne@69 2436 int ret;
jpayne@69 2437 PyObject *type, *value, *traceback;
jpayne@69 2438 __Pyx_ErrFetchInState(tstate, &type, &value, &traceback);
jpayne@69 2439 __Pyx_PyFrame_SetLineNumber(frame, lineno);
jpayne@69 2440 __Pyx_EnterTracing(tstate);
jpayne@69 2441 ret = tstate->c_tracefunc(tstate->c_traceobj, frame, PyTrace_LINE, NULL);
jpayne@69 2442 __Pyx_LeaveTracing(tstate);
jpayne@69 2443 if (likely(!ret)) {
jpayne@69 2444 __Pyx_ErrRestoreInState(tstate, type, value, traceback);
jpayne@69 2445 } else {
jpayne@69 2446 Py_XDECREF(type);
jpayne@69 2447 Py_XDECREF(value);
jpayne@69 2448 Py_XDECREF(traceback);
jpayne@69 2449 }
jpayne@69 2450 return ret;
jpayne@69 2451 }
jpayne@69 2452 #ifdef WITH_THREAD
jpayne@69 2453 #define __Pyx_TraceLine(lineno, nogil, goto_error)\
jpayne@69 2454 if (likely(!__Pyx_use_tracing)); else {\
jpayne@69 2455 if (nogil) {\
jpayne@69 2456 if (CYTHON_TRACE_NOGIL) {\
jpayne@69 2457 int ret = 0;\
jpayne@69 2458 PyThreadState *tstate;\
jpayne@69 2459 PyGILState_STATE state = __Pyx_PyGILState_Ensure();\
jpayne@69 2460 tstate = __Pyx_PyThreadState_Current;\
jpayne@69 2461 if (__Pyx_IsTracing(tstate, 0, 0) && tstate->c_tracefunc && __pyx_frame->f_trace) {\
jpayne@69 2462 ret = __Pyx_call_line_trace_func(tstate, __pyx_frame, lineno);\
jpayne@69 2463 }\
jpayne@69 2464 __Pyx_PyGILState_Release(state);\
jpayne@69 2465 if (unlikely(ret)) goto_error;\
jpayne@69 2466 }\
jpayne@69 2467 } else {\
jpayne@69 2468 PyThreadState* tstate = __Pyx_PyThreadState_Current;\
jpayne@69 2469 if (__Pyx_IsTracing(tstate, 0, 0) && tstate->c_tracefunc && __pyx_frame->f_trace) {\
jpayne@69 2470 int ret = __Pyx_call_line_trace_func(tstate, __pyx_frame, lineno);\
jpayne@69 2471 if (unlikely(ret)) goto_error;\
jpayne@69 2472 }\
jpayne@69 2473 }\
jpayne@69 2474 }
jpayne@69 2475 #else
jpayne@69 2476 #define __Pyx_TraceLine(lineno, nogil, goto_error)\
jpayne@69 2477 if (likely(!__Pyx_use_tracing)); else {\
jpayne@69 2478 PyThreadState* tstate = __Pyx_PyThreadState_Current;\
jpayne@69 2479 if (__Pyx_IsTracing(tstate, 0, 0) && tstate->c_tracefunc && __pyx_frame->f_trace) {\
jpayne@69 2480 int ret = __Pyx_call_line_trace_func(tstate, __pyx_frame, lineno);\
jpayne@69 2481 if (unlikely(ret)) goto_error;\
jpayne@69 2482 }\
jpayne@69 2483 }
jpayne@69 2484 #endif
jpayne@69 2485 #else
jpayne@69 2486 #define __Pyx_TraceLine(lineno, nogil, goto_error) if ((1)); else goto_error;
jpayne@69 2487 #endif
jpayne@69 2488
jpayne@69 2489 /* KeywordStringCheck.proto */
jpayne@69 2490 static int __Pyx_CheckKeywordStrings(PyObject *kw, const char* function_name, int kw_allowed);
jpayne@69 2491
jpayne@69 2492 /* PyObjectCall.proto */
jpayne@69 2493 #if CYTHON_COMPILING_IN_CPYTHON
jpayne@69 2494 static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw);
jpayne@69 2495 #else
jpayne@69 2496 #define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw)
jpayne@69 2497 #endif
jpayne@69 2498
jpayne@69 2499 /* RaiseArgTupleInvalid.proto */
jpayne@69 2500 static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact,
jpayne@69 2501 Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found);
jpayne@69 2502
jpayne@69 2503 /* RaiseException.proto */
jpayne@69 2504 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause);
jpayne@69 2505
jpayne@69 2506 /* RaiseDoubleKeywords.proto */
jpayne@69 2507 static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name);
jpayne@69 2508
jpayne@69 2509 /* ParseKeywords.proto */
jpayne@69 2510 static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject *const *kwvalues,
jpayne@69 2511 PyObject **argnames[],
jpayne@69 2512 PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args,
jpayne@69 2513 const char* function_name);
jpayne@69 2514
jpayne@69 2515 /* PyFunctionFastCall.proto */
jpayne@69 2516 #if CYTHON_FAST_PYCALL
jpayne@69 2517 #if !CYTHON_VECTORCALL
jpayne@69 2518 #define __Pyx_PyFunction_FastCall(func, args, nargs)\
jpayne@69 2519 __Pyx_PyFunction_FastCallDict((func), (args), (nargs), NULL)
jpayne@69 2520 static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs);
jpayne@69 2521 #endif
jpayne@69 2522 #define __Pyx_BUILD_ASSERT_EXPR(cond)\
jpayne@69 2523 (sizeof(char [1 - 2*!(cond)]) - 1)
jpayne@69 2524 #ifndef Py_MEMBER_SIZE
jpayne@69 2525 #define Py_MEMBER_SIZE(type, member) sizeof(((type *)0)->member)
jpayne@69 2526 #endif
jpayne@69 2527 #if !CYTHON_VECTORCALL
jpayne@69 2528 #if PY_VERSION_HEX >= 0x03080000
jpayne@69 2529 #include "frameobject.h"
jpayne@69 2530 #if PY_VERSION_HEX >= 0x030b00a6 && !CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 2531 #ifndef Py_BUILD_CORE
jpayne@69 2532 #define Py_BUILD_CORE 1
jpayne@69 2533 #endif
jpayne@69 2534 #include "internal/pycore_frame.h"
jpayne@69 2535 #endif
jpayne@69 2536 #define __Pxy_PyFrame_Initialize_Offsets()
jpayne@69 2537 #define __Pyx_PyFrame_GetLocalsplus(frame) ((frame)->f_localsplus)
jpayne@69 2538 #else
jpayne@69 2539 static size_t __pyx_pyframe_localsplus_offset = 0;
jpayne@69 2540 #include "frameobject.h"
jpayne@69 2541 #define __Pxy_PyFrame_Initialize_Offsets()\
jpayne@69 2542 ((void)__Pyx_BUILD_ASSERT_EXPR(sizeof(PyFrameObject) == offsetof(PyFrameObject, f_localsplus) + Py_MEMBER_SIZE(PyFrameObject, f_localsplus)),\
jpayne@69 2543 (void)(__pyx_pyframe_localsplus_offset = ((size_t)PyFrame_Type.tp_basicsize) - Py_MEMBER_SIZE(PyFrameObject, f_localsplus)))
jpayne@69 2544 #define __Pyx_PyFrame_GetLocalsplus(frame)\
jpayne@69 2545 (assert(__pyx_pyframe_localsplus_offset), (PyObject **)(((char *)(frame)) + __pyx_pyframe_localsplus_offset))
jpayne@69 2546 #endif
jpayne@69 2547 #endif
jpayne@69 2548 #endif
jpayne@69 2549
jpayne@69 2550 /* PyObjectCallMethO.proto */
jpayne@69 2551 #if CYTHON_COMPILING_IN_CPYTHON
jpayne@69 2552 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg);
jpayne@69 2553 #endif
jpayne@69 2554
jpayne@69 2555 /* PyObjectFastCall.proto */
jpayne@69 2556 #define __Pyx_PyObject_FastCall(func, args, nargs) __Pyx_PyObject_FastCallDict(func, args, (size_t)(nargs), NULL)
jpayne@69 2557 static CYTHON_INLINE PyObject* __Pyx_PyObject_FastCallDict(PyObject *func, PyObject **args, size_t nargs, PyObject *kwargs);
jpayne@69 2558
jpayne@69 2559 /* PyDictVersioning.proto */
jpayne@69 2560 #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS
jpayne@69 2561 #define __PYX_DICT_VERSION_INIT ((PY_UINT64_T) -1)
jpayne@69 2562 #define __PYX_GET_DICT_VERSION(dict) (((PyDictObject*)(dict))->ma_version_tag)
jpayne@69 2563 #define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)\
jpayne@69 2564 (version_var) = __PYX_GET_DICT_VERSION(dict);\
jpayne@69 2565 (cache_var) = (value);
jpayne@69 2566 #define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) {\
jpayne@69 2567 static PY_UINT64_T __pyx_dict_version = 0;\
jpayne@69 2568 static PyObject *__pyx_dict_cached_value = NULL;\
jpayne@69 2569 if (likely(__PYX_GET_DICT_VERSION(DICT) == __pyx_dict_version)) {\
jpayne@69 2570 (VAR) = __pyx_dict_cached_value;\
jpayne@69 2571 } else {\
jpayne@69 2572 (VAR) = __pyx_dict_cached_value = (LOOKUP);\
jpayne@69 2573 __pyx_dict_version = __PYX_GET_DICT_VERSION(DICT);\
jpayne@69 2574 }\
jpayne@69 2575 }
jpayne@69 2576 static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj);
jpayne@69 2577 static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj);
jpayne@69 2578 static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version);
jpayne@69 2579 #else
jpayne@69 2580 #define __PYX_GET_DICT_VERSION(dict) (0)
jpayne@69 2581 #define __PYX_UPDATE_DICT_CACHE(dict, value, cache_var, version_var)
jpayne@69 2582 #define __PYX_PY_DICT_LOOKUP_IF_MODIFIED(VAR, DICT, LOOKUP) (VAR) = (LOOKUP);
jpayne@69 2583 #endif
jpayne@69 2584
jpayne@69 2585 /* GetModuleGlobalName.proto */
jpayne@69 2586 #if CYTHON_USE_DICT_VERSIONS
jpayne@69 2587 #define __Pyx_GetModuleGlobalName(var, name) do {\
jpayne@69 2588 static PY_UINT64_T __pyx_dict_version = 0;\
jpayne@69 2589 static PyObject *__pyx_dict_cached_value = NULL;\
jpayne@69 2590 (var) = (likely(__pyx_dict_version == __PYX_GET_DICT_VERSION(__pyx_d))) ?\
jpayne@69 2591 (likely(__pyx_dict_cached_value) ? __Pyx_NewRef(__pyx_dict_cached_value) : __Pyx_GetBuiltinName(name)) :\
jpayne@69 2592 __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\
jpayne@69 2593 } while(0)
jpayne@69 2594 #define __Pyx_GetModuleGlobalNameUncached(var, name) do {\
jpayne@69 2595 PY_UINT64_T __pyx_dict_version;\
jpayne@69 2596 PyObject *__pyx_dict_cached_value;\
jpayne@69 2597 (var) = __Pyx__GetModuleGlobalName(name, &__pyx_dict_version, &__pyx_dict_cached_value);\
jpayne@69 2598 } while(0)
jpayne@69 2599 static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value);
jpayne@69 2600 #else
jpayne@69 2601 #define __Pyx_GetModuleGlobalName(var, name) (var) = __Pyx__GetModuleGlobalName(name)
jpayne@69 2602 #define __Pyx_GetModuleGlobalNameUncached(var, name) (var) = __Pyx__GetModuleGlobalName(name)
jpayne@69 2603 static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name);
jpayne@69 2604 #endif
jpayne@69 2605
jpayne@69 2606 /* PyObjectCallOneArg.proto */
jpayne@69 2607 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg);
jpayne@69 2608
jpayne@69 2609 /* ListAppend.proto */
jpayne@69 2610 #if CYTHON_USE_PYLIST_INTERNALS && CYTHON_ASSUME_SAFE_MACROS
jpayne@69 2611 static CYTHON_INLINE int __Pyx_PyList_Append(PyObject* list, PyObject* x) {
jpayne@69 2612 PyListObject* L = (PyListObject*) list;
jpayne@69 2613 Py_ssize_t len = Py_SIZE(list);
jpayne@69 2614 if (likely(L->allocated > len) & likely(len > (L->allocated >> 1))) {
jpayne@69 2615 Py_INCREF(x);
jpayne@69 2616 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000
jpayne@69 2617 L->ob_item[len] = x;
jpayne@69 2618 #else
jpayne@69 2619 PyList_SET_ITEM(list, len, x);
jpayne@69 2620 #endif
jpayne@69 2621 __Pyx_SET_SIZE(list, len + 1);
jpayne@69 2622 return 0;
jpayne@69 2623 }
jpayne@69 2624 return PyList_Append(list, x);
jpayne@69 2625 }
jpayne@69 2626 #else
jpayne@69 2627 #define __Pyx_PyList_Append(L,x) PyList_Append(L,x)
jpayne@69 2628 #endif
jpayne@69 2629
jpayne@69 2630 /* PyObjectCall2Args.proto */
jpayne@69 2631 static CYTHON_INLINE PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2);
jpayne@69 2632
jpayne@69 2633 /* PyObjectGetMethod.proto */
jpayne@69 2634 static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method);
jpayne@69 2635
jpayne@69 2636 /* PyObjectCallMethod1.proto */
jpayne@69 2637 static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg);
jpayne@69 2638
jpayne@69 2639 /* append.proto */
jpayne@69 2640 static CYTHON_INLINE int __Pyx_PyObject_Append(PyObject* L, PyObject* x);
jpayne@69 2641
jpayne@69 2642 /* WriteUnraisableException.proto */
jpayne@69 2643 static void __Pyx_WriteUnraisable(const char *name, int clineno,
jpayne@69 2644 int lineno, const char *filename,
jpayne@69 2645 int full_traceback, int nogil);
jpayne@69 2646
jpayne@69 2647 /* RaiseTooManyValuesToUnpack.proto */
jpayne@69 2648 static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected);
jpayne@69 2649
jpayne@69 2650 /* RaiseNeedMoreValuesToUnpack.proto */
jpayne@69 2651 static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index);
jpayne@69 2652
jpayne@69 2653 /* IterFinish.proto */
jpayne@69 2654 static CYTHON_INLINE int __Pyx_IterFinish(void);
jpayne@69 2655
jpayne@69 2656 /* UnpackItemEndCheck.proto */
jpayne@69 2657 static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected);
jpayne@69 2658
jpayne@69 2659 /* GetException.proto */
jpayne@69 2660 #if CYTHON_FAST_THREAD_STATE
jpayne@69 2661 #define __Pyx_GetException(type, value, tb) __Pyx__GetException(__pyx_tstate, type, value, tb)
jpayne@69 2662 static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
jpayne@69 2663 #else
jpayne@69 2664 static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb);
jpayne@69 2665 #endif
jpayne@69 2666
jpayne@69 2667 /* SwapException.proto */
jpayne@69 2668 #if CYTHON_FAST_THREAD_STATE
jpayne@69 2669 #define __Pyx_ExceptionSwap(type, value, tb) __Pyx__ExceptionSwap(__pyx_tstate, type, value, tb)
jpayne@69 2670 static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
jpayne@69 2671 #else
jpayne@69 2672 static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb);
jpayne@69 2673 #endif
jpayne@69 2674
jpayne@69 2675 /* GetTopmostException.proto */
jpayne@69 2676 #if CYTHON_USE_EXC_INFO_STACK && CYTHON_FAST_THREAD_STATE
jpayne@69 2677 static _PyErr_StackItem * __Pyx_PyErr_GetTopmostException(PyThreadState *tstate);
jpayne@69 2678 #endif
jpayne@69 2679
jpayne@69 2680 /* SaveResetException.proto */
jpayne@69 2681 #if CYTHON_FAST_THREAD_STATE
jpayne@69 2682 #define __Pyx_ExceptionSave(type, value, tb) __Pyx__ExceptionSave(__pyx_tstate, type, value, tb)
jpayne@69 2683 static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb);
jpayne@69 2684 #define __Pyx_ExceptionReset(type, value, tb) __Pyx__ExceptionReset(__pyx_tstate, type, value, tb)
jpayne@69 2685 static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb);
jpayne@69 2686 #else
jpayne@69 2687 #define __Pyx_ExceptionSave(type, value, tb) PyErr_GetExcInfo(type, value, tb)
jpayne@69 2688 #define __Pyx_ExceptionReset(type, value, tb) PyErr_SetExcInfo(type, value, tb)
jpayne@69 2689 #endif
jpayne@69 2690
jpayne@69 2691 /* GetItemInt.proto */
jpayne@69 2692 #define __Pyx_GetItemInt(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
jpayne@69 2693 (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
jpayne@69 2694 __Pyx_GetItemInt_Fast(o, (Py_ssize_t)i, is_list, wraparound, boundscheck) :\
jpayne@69 2695 (is_list ? (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL) :\
jpayne@69 2696 __Pyx_GetItemInt_Generic(o, to_py_func(i))))
jpayne@69 2697 #define __Pyx_GetItemInt_List(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
jpayne@69 2698 (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
jpayne@69 2699 __Pyx_GetItemInt_List_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\
jpayne@69 2700 (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL))
jpayne@69 2701 static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
jpayne@69 2702 int wraparound, int boundscheck);
jpayne@69 2703 #define __Pyx_GetItemInt_Tuple(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
jpayne@69 2704 (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
jpayne@69 2705 __Pyx_GetItemInt_Tuple_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\
jpayne@69 2706 (PyErr_SetString(PyExc_IndexError, "tuple index out of range"), (PyObject*)NULL))
jpayne@69 2707 static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
jpayne@69 2708 int wraparound, int boundscheck);
jpayne@69 2709 static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j);
jpayne@69 2710 static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i,
jpayne@69 2711 int is_list, int wraparound, int boundscheck);
jpayne@69 2712
jpayne@69 2713 /* ObjectGetItem.proto */
jpayne@69 2714 #if CYTHON_USE_TYPE_SLOTS
jpayne@69 2715 static CYTHON_INLINE PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject *key);
jpayne@69 2716 #else
jpayne@69 2717 #define __Pyx_PyObject_GetItem(obj, key) PyObject_GetItem(obj, key)
jpayne@69 2718 #endif
jpayne@69 2719
jpayne@69 2720 /* PySequenceContains.proto */
jpayne@69 2721 static CYTHON_INLINE int __Pyx_PySequence_ContainsTF(PyObject* item, PyObject* seq, int eq) {
jpayne@69 2722 int result = PySequence_Contains(seq, item);
jpayne@69 2723 return unlikely(result < 0) ? result : (result == (eq == Py_EQ));
jpayne@69 2724 }
jpayne@69 2725
jpayne@69 2726 /* PyObjectFormatAndDecref.proto */
jpayne@69 2727 static CYTHON_INLINE PyObject* __Pyx_PyObject_FormatSimpleAndDecref(PyObject* s, PyObject* f);
jpayne@69 2728 static CYTHON_INLINE PyObject* __Pyx_PyObject_FormatAndDecref(PyObject* s, PyObject* f);
jpayne@69 2729
jpayne@69 2730 /* JoinPyUnicode.proto */
jpayne@69 2731 static PyObject* __Pyx_PyUnicode_Join(PyObject* value_tuple, Py_ssize_t value_count, Py_ssize_t result_ulength,
jpayne@69 2732 Py_UCS4 max_char);
jpayne@69 2733
jpayne@69 2734 /* ExtTypeTest.proto */
jpayne@69 2735 static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type);
jpayne@69 2736
jpayne@69 2737 /* ArgTypeTest.proto */
jpayne@69 2738 #define __Pyx_ArgTypeTest(obj, type, none_allowed, name, exact)\
jpayne@69 2739 ((likely(__Pyx_IS_TYPE(obj, type) | (none_allowed && (obj == Py_None)))) ? 1 :\
jpayne@69 2740 __Pyx__ArgTypeTest(obj, type, name, exact))
jpayne@69 2741 static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact);
jpayne@69 2742
jpayne@69 2743 /* RaiseUnexpectedTypeError.proto */
jpayne@69 2744 static int __Pyx_RaiseUnexpectedTypeError(const char *expected, PyObject *obj);
jpayne@69 2745
jpayne@69 2746 /* PyUnicode_Unicode.proto */
jpayne@69 2747 static CYTHON_INLINE PyObject* __Pyx_PyUnicode_Unicode(PyObject *obj);
jpayne@69 2748
jpayne@69 2749 /* GetAttr3.proto */
jpayne@69 2750 static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *, PyObject *, PyObject *);
jpayne@69 2751
jpayne@69 2752 /* Import.proto */
jpayne@69 2753 static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level);
jpayne@69 2754
jpayne@69 2755 /* ImportFrom.proto */
jpayne@69 2756 static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name);
jpayne@69 2757
jpayne@69 2758 /* GetAttr.proto */
jpayne@69 2759 static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *, PyObject *);
jpayne@69 2760
jpayne@69 2761 /* HasAttr.proto */
jpayne@69 2762 static CYTHON_INLINE int __Pyx_HasAttr(PyObject *, PyObject *);
jpayne@69 2763
jpayne@69 2764 /* IncludeStructmemberH.proto */
jpayne@69 2765 #include <structmember.h>
jpayne@69 2766
jpayne@69 2767 /* FixUpExtensionType.proto */
jpayne@69 2768 #if CYTHON_USE_TYPE_SPECS
jpayne@69 2769 static int __Pyx_fix_up_extension_type_from_spec(PyType_Spec *spec, PyTypeObject *type);
jpayne@69 2770 #endif
jpayne@69 2771
jpayne@69 2772 /* PyObjectCallNoArg.proto */
jpayne@69 2773 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func);
jpayne@69 2774
jpayne@69 2775 /* PyObjectCallMethod0.proto */
jpayne@69 2776 static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name);
jpayne@69 2777
jpayne@69 2778 /* ValidateBasesTuple.proto */
jpayne@69 2779 #if CYTHON_COMPILING_IN_CPYTHON || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_USE_TYPE_SPECS
jpayne@69 2780 static int __Pyx_validate_bases_tuple(const char *type_name, Py_ssize_t dictoffset, PyObject *bases);
jpayne@69 2781 #endif
jpayne@69 2782
jpayne@69 2783 /* PyType_Ready.proto */
jpayne@69 2784 CYTHON_UNUSED static int __Pyx_PyType_Ready(PyTypeObject *t);
jpayne@69 2785
jpayne@69 2786 /* PyObject_GenericGetAttrNoDict.proto */
jpayne@69 2787 #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
jpayne@69 2788 static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name);
jpayne@69 2789 #else
jpayne@69 2790 #define __Pyx_PyObject_GenericGetAttrNoDict PyObject_GenericGetAttr
jpayne@69 2791 #endif
jpayne@69 2792
jpayne@69 2793 /* PyObject_GenericGetAttr.proto */
jpayne@69 2794 #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
jpayne@69 2795 static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_name);
jpayne@69 2796 #else
jpayne@69 2797 #define __Pyx_PyObject_GenericGetAttr PyObject_GenericGetAttr
jpayne@69 2798 #endif
jpayne@69 2799
jpayne@69 2800 /* SetVTable.proto */
jpayne@69 2801 static int __Pyx_SetVtable(PyTypeObject* typeptr , void* vtable);
jpayne@69 2802
jpayne@69 2803 /* GetVTable.proto */
jpayne@69 2804 static void* __Pyx_GetVtable(PyTypeObject *type);
jpayne@69 2805
jpayne@69 2806 /* MergeVTables.proto */
jpayne@69 2807 #if !CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 2808 static int __Pyx_MergeVtables(PyTypeObject *type);
jpayne@69 2809 #endif
jpayne@69 2810
jpayne@69 2811 /* SetupReduce.proto */
jpayne@69 2812 #if !CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 2813 static int __Pyx_setup_reduce(PyObject* type_obj);
jpayne@69 2814 #endif
jpayne@69 2815
jpayne@69 2816 /* TypeImport.proto */
jpayne@69 2817 #ifndef __PYX_HAVE_RT_ImportType_proto_3_0_11
jpayne@69 2818 #define __PYX_HAVE_RT_ImportType_proto_3_0_11
jpayne@69 2819 #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 201112L
jpayne@69 2820 #include <stdalign.h>
jpayne@69 2821 #endif
jpayne@69 2822 #if (defined (__STDC_VERSION__) && __STDC_VERSION__ >= 201112L) || __cplusplus >= 201103L
jpayne@69 2823 #define __PYX_GET_STRUCT_ALIGNMENT_3_0_11(s) alignof(s)
jpayne@69 2824 #else
jpayne@69 2825 #define __PYX_GET_STRUCT_ALIGNMENT_3_0_11(s) sizeof(void*)
jpayne@69 2826 #endif
jpayne@69 2827 enum __Pyx_ImportType_CheckSize_3_0_11 {
jpayne@69 2828 __Pyx_ImportType_CheckSize_Error_3_0_11 = 0,
jpayne@69 2829 __Pyx_ImportType_CheckSize_Warn_3_0_11 = 1,
jpayne@69 2830 __Pyx_ImportType_CheckSize_Ignore_3_0_11 = 2
jpayne@69 2831 };
jpayne@69 2832 static PyTypeObject *__Pyx_ImportType_3_0_11(PyObject* module, const char *module_name, const char *class_name, size_t size, size_t alignment, enum __Pyx_ImportType_CheckSize_3_0_11 check_size);
jpayne@69 2833 #endif
jpayne@69 2834
jpayne@69 2835 /* ImportDottedModule.proto */
jpayne@69 2836 static PyObject *__Pyx_ImportDottedModule(PyObject *name, PyObject *parts_tuple);
jpayne@69 2837 #if PY_MAJOR_VERSION >= 3
jpayne@69 2838 static PyObject *__Pyx_ImportDottedModule_WalkParts(PyObject *module, PyObject *name, PyObject *parts_tuple);
jpayne@69 2839 #endif
jpayne@69 2840
jpayne@69 2841 /* FetchSharedCythonModule.proto */
jpayne@69 2842 static PyObject *__Pyx_FetchSharedCythonABIModule(void);
jpayne@69 2843
jpayne@69 2844 /* FetchCommonType.proto */
jpayne@69 2845 #if !CYTHON_USE_TYPE_SPECS
jpayne@69 2846 static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type);
jpayne@69 2847 #else
jpayne@69 2848 static PyTypeObject* __Pyx_FetchCommonTypeFromSpec(PyObject *module, PyType_Spec *spec, PyObject *bases);
jpayne@69 2849 #endif
jpayne@69 2850
jpayne@69 2851 /* PyMethodNew.proto */
jpayne@69 2852 #if CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 2853 static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ) {
jpayne@69 2854 PyObject *typesModule=NULL, *methodType=NULL, *result=NULL;
jpayne@69 2855 CYTHON_UNUSED_VAR(typ);
jpayne@69 2856 if (!self)
jpayne@69 2857 return __Pyx_NewRef(func);
jpayne@69 2858 typesModule = PyImport_ImportModule("types");
jpayne@69 2859 if (!typesModule) return NULL;
jpayne@69 2860 methodType = PyObject_GetAttrString(typesModule, "MethodType");
jpayne@69 2861 Py_DECREF(typesModule);
jpayne@69 2862 if (!methodType) return NULL;
jpayne@69 2863 result = PyObject_CallFunctionObjArgs(methodType, func, self, NULL);
jpayne@69 2864 Py_DECREF(methodType);
jpayne@69 2865 return result;
jpayne@69 2866 }
jpayne@69 2867 #elif PY_MAJOR_VERSION >= 3
jpayne@69 2868 static PyObject *__Pyx_PyMethod_New(PyObject *func, PyObject *self, PyObject *typ) {
jpayne@69 2869 CYTHON_UNUSED_VAR(typ);
jpayne@69 2870 if (!self)
jpayne@69 2871 return __Pyx_NewRef(func);
jpayne@69 2872 return PyMethod_New(func, self);
jpayne@69 2873 }
jpayne@69 2874 #else
jpayne@69 2875 #define __Pyx_PyMethod_New PyMethod_New
jpayne@69 2876 #endif
jpayne@69 2877
jpayne@69 2878 /* PyVectorcallFastCallDict.proto */
jpayne@69 2879 #if CYTHON_METH_FASTCALL
jpayne@69 2880 static CYTHON_INLINE PyObject *__Pyx_PyVectorcall_FastCallDict(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw);
jpayne@69 2881 #endif
jpayne@69 2882
jpayne@69 2883 /* CythonFunctionShared.proto */
jpayne@69 2884 #define __Pyx_CyFunction_USED
jpayne@69 2885 #define __Pyx_CYFUNCTION_STATICMETHOD 0x01
jpayne@69 2886 #define __Pyx_CYFUNCTION_CLASSMETHOD 0x02
jpayne@69 2887 #define __Pyx_CYFUNCTION_CCLASS 0x04
jpayne@69 2888 #define __Pyx_CYFUNCTION_COROUTINE 0x08
jpayne@69 2889 #define __Pyx_CyFunction_GetClosure(f)\
jpayne@69 2890 (((__pyx_CyFunctionObject *) (f))->func_closure)
jpayne@69 2891 #if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 2892 #define __Pyx_CyFunction_GetClassObj(f)\
jpayne@69 2893 (((__pyx_CyFunctionObject *) (f))->func_classobj)
jpayne@69 2894 #else
jpayne@69 2895 #define __Pyx_CyFunction_GetClassObj(f)\
jpayne@69 2896 ((PyObject*) ((PyCMethodObject *) (f))->mm_class)
jpayne@69 2897 #endif
jpayne@69 2898 #define __Pyx_CyFunction_SetClassObj(f, classobj)\
jpayne@69 2899 __Pyx__CyFunction_SetClassObj((__pyx_CyFunctionObject *) (f), (classobj))
jpayne@69 2900 #define __Pyx_CyFunction_Defaults(type, f)\
jpayne@69 2901 ((type *)(((__pyx_CyFunctionObject *) (f))->defaults))
jpayne@69 2902 #define __Pyx_CyFunction_SetDefaultsGetter(f, g)\
jpayne@69 2903 ((__pyx_CyFunctionObject *) (f))->defaults_getter = (g)
jpayne@69 2904 typedef struct {
jpayne@69 2905 #if CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 2906 PyObject_HEAD
jpayne@69 2907 PyObject *func;
jpayne@69 2908 #elif PY_VERSION_HEX < 0x030900B1
jpayne@69 2909 PyCFunctionObject func;
jpayne@69 2910 #else
jpayne@69 2911 PyCMethodObject func;
jpayne@69 2912 #endif
jpayne@69 2913 #if CYTHON_BACKPORT_VECTORCALL
jpayne@69 2914 __pyx_vectorcallfunc func_vectorcall;
jpayne@69 2915 #endif
jpayne@69 2916 #if PY_VERSION_HEX < 0x030500A0 || CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 2917 PyObject *func_weakreflist;
jpayne@69 2918 #endif
jpayne@69 2919 PyObject *func_dict;
jpayne@69 2920 PyObject *func_name;
jpayne@69 2921 PyObject *func_qualname;
jpayne@69 2922 PyObject *func_doc;
jpayne@69 2923 PyObject *func_globals;
jpayne@69 2924 PyObject *func_code;
jpayne@69 2925 PyObject *func_closure;
jpayne@69 2926 #if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 2927 PyObject *func_classobj;
jpayne@69 2928 #endif
jpayne@69 2929 void *defaults;
jpayne@69 2930 int defaults_pyobjects;
jpayne@69 2931 size_t defaults_size;
jpayne@69 2932 int flags;
jpayne@69 2933 PyObject *defaults_tuple;
jpayne@69 2934 PyObject *defaults_kwdict;
jpayne@69 2935 PyObject *(*defaults_getter)(PyObject *);
jpayne@69 2936 PyObject *func_annotations;
jpayne@69 2937 PyObject *func_is_coroutine;
jpayne@69 2938 } __pyx_CyFunctionObject;
jpayne@69 2939 #undef __Pyx_CyOrPyCFunction_Check
jpayne@69 2940 #define __Pyx_CyFunction_Check(obj) __Pyx_TypeCheck(obj, __pyx_CyFunctionType)
jpayne@69 2941 #define __Pyx_CyOrPyCFunction_Check(obj) __Pyx_TypeCheck2(obj, __pyx_CyFunctionType, &PyCFunction_Type)
jpayne@69 2942 #define __Pyx_CyFunction_CheckExact(obj) __Pyx_IS_TYPE(obj, __pyx_CyFunctionType)
jpayne@69 2943 static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void *cfunc);
jpayne@69 2944 #undef __Pyx_IsSameCFunction
jpayne@69 2945 #define __Pyx_IsSameCFunction(func, cfunc) __Pyx__IsSameCyOrCFunction(func, cfunc)
jpayne@69 2946 static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject* op, PyMethodDef *ml,
jpayne@69 2947 int flags, PyObject* qualname,
jpayne@69 2948 PyObject *closure,
jpayne@69 2949 PyObject *module, PyObject *globals,
jpayne@69 2950 PyObject* code);
jpayne@69 2951 static CYTHON_INLINE void __Pyx__CyFunction_SetClassObj(__pyx_CyFunctionObject* f, PyObject* classobj);
jpayne@69 2952 static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *m,
jpayne@69 2953 size_t size,
jpayne@69 2954 int pyobjects);
jpayne@69 2955 static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *m,
jpayne@69 2956 PyObject *tuple);
jpayne@69 2957 static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *m,
jpayne@69 2958 PyObject *dict);
jpayne@69 2959 static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *m,
jpayne@69 2960 PyObject *dict);
jpayne@69 2961 static int __pyx_CyFunction_init(PyObject *module);
jpayne@69 2962 #if CYTHON_METH_FASTCALL
jpayne@69 2963 static PyObject * __Pyx_CyFunction_Vectorcall_NOARGS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames);
jpayne@69 2964 static PyObject * __Pyx_CyFunction_Vectorcall_O(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames);
jpayne@69 2965 static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames);
jpayne@69 2966 static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames);
jpayne@69 2967 #if CYTHON_BACKPORT_VECTORCALL
jpayne@69 2968 #define __Pyx_CyFunction_func_vectorcall(f) (((__pyx_CyFunctionObject*)f)->func_vectorcall)
jpayne@69 2969 #else
jpayne@69 2970 #define __Pyx_CyFunction_func_vectorcall(f) (((PyCFunctionObject*)f)->vectorcall)
jpayne@69 2971 #endif
jpayne@69 2972 #endif
jpayne@69 2973
jpayne@69 2974 /* CythonFunction.proto */
jpayne@69 2975 static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml,
jpayne@69 2976 int flags, PyObject* qualname,
jpayne@69 2977 PyObject *closure,
jpayne@69 2978 PyObject *module, PyObject *globals,
jpayne@69 2979 PyObject* code);
jpayne@69 2980
jpayne@69 2981 /* CLineInTraceback.proto */
jpayne@69 2982 #ifdef CYTHON_CLINE_IN_TRACEBACK
jpayne@69 2983 #define __Pyx_CLineForTraceback(tstate, c_line) (((CYTHON_CLINE_IN_TRACEBACK)) ? c_line : 0)
jpayne@69 2984 #else
jpayne@69 2985 static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line);
jpayne@69 2986 #endif
jpayne@69 2987
jpayne@69 2988 /* CodeObjectCache.proto */
jpayne@69 2989 #if !CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 2990 typedef struct {
jpayne@69 2991 PyCodeObject* code_object;
jpayne@69 2992 int code_line;
jpayne@69 2993 } __Pyx_CodeObjectCacheEntry;
jpayne@69 2994 struct __Pyx_CodeObjectCache {
jpayne@69 2995 int count;
jpayne@69 2996 int max_count;
jpayne@69 2997 __Pyx_CodeObjectCacheEntry* entries;
jpayne@69 2998 };
jpayne@69 2999 static struct __Pyx_CodeObjectCache __pyx_code_cache = {0,0,NULL};
jpayne@69 3000 static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line);
jpayne@69 3001 static PyCodeObject *__pyx_find_code_object(int code_line);
jpayne@69 3002 static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object);
jpayne@69 3003 #endif
jpayne@69 3004
jpayne@69 3005 /* AddTraceback.proto */
jpayne@69 3006 static void __Pyx_AddTraceback(const char *funcname, int c_line,
jpayne@69 3007 int py_line, const char *filename);
jpayne@69 3008
jpayne@69 3009 /* ArrayAPI.proto */
jpayne@69 3010 #ifndef _ARRAYARRAY_H
jpayne@69 3011 #define _ARRAYARRAY_H
jpayne@69 3012 typedef struct arraydescr {
jpayne@69 3013 int typecode;
jpayne@69 3014 int itemsize;
jpayne@69 3015 PyObject * (*getitem)(struct arrayobject *, Py_ssize_t);
jpayne@69 3016 int (*setitem)(struct arrayobject *, Py_ssize_t, PyObject *);
jpayne@69 3017 #if PY_MAJOR_VERSION >= 3
jpayne@69 3018 char *formats;
jpayne@69 3019 #endif
jpayne@69 3020 } arraydescr;
jpayne@69 3021 struct arrayobject {
jpayne@69 3022 PyObject_HEAD
jpayne@69 3023 Py_ssize_t ob_size;
jpayne@69 3024 union {
jpayne@69 3025 char *ob_item;
jpayne@69 3026 float *as_floats;
jpayne@69 3027 double *as_doubles;
jpayne@69 3028 int *as_ints;
jpayne@69 3029 unsigned int *as_uints;
jpayne@69 3030 unsigned char *as_uchars;
jpayne@69 3031 signed char *as_schars;
jpayne@69 3032 char *as_chars;
jpayne@69 3033 unsigned long *as_ulongs;
jpayne@69 3034 long *as_longs;
jpayne@69 3035 #if PY_MAJOR_VERSION >= 3
jpayne@69 3036 unsigned long long *as_ulonglongs;
jpayne@69 3037 long long *as_longlongs;
jpayne@69 3038 #endif
jpayne@69 3039 short *as_shorts;
jpayne@69 3040 unsigned short *as_ushorts;
jpayne@69 3041 Py_UNICODE *as_pyunicodes;
jpayne@69 3042 void *as_voidptr;
jpayne@69 3043 } data;
jpayne@69 3044 Py_ssize_t allocated;
jpayne@69 3045 struct arraydescr *ob_descr;
jpayne@69 3046 PyObject *weakreflist;
jpayne@69 3047 #if PY_MAJOR_VERSION >= 3
jpayne@69 3048 int ob_exports;
jpayne@69 3049 #endif
jpayne@69 3050 };
jpayne@69 3051 #ifndef NO_NEWARRAY_INLINE
jpayne@69 3052 static CYTHON_INLINE PyObject * newarrayobject(PyTypeObject *type, Py_ssize_t size,
jpayne@69 3053 struct arraydescr *descr) {
jpayne@69 3054 arrayobject *op;
jpayne@69 3055 size_t nbytes;
jpayne@69 3056 if (size < 0) {
jpayne@69 3057 PyErr_BadInternalCall();
jpayne@69 3058 return NULL;
jpayne@69 3059 }
jpayne@69 3060 nbytes = size * descr->itemsize;
jpayne@69 3061 if (nbytes / descr->itemsize != (size_t)size) {
jpayne@69 3062 return PyErr_NoMemory();
jpayne@69 3063 }
jpayne@69 3064 op = (arrayobject *) type->tp_alloc(type, 0);
jpayne@69 3065 if (op == NULL) {
jpayne@69 3066 return NULL;
jpayne@69 3067 }
jpayne@69 3068 op->ob_descr = descr;
jpayne@69 3069 op->allocated = size;
jpayne@69 3070 op->weakreflist = NULL;
jpayne@69 3071 __Pyx_SET_SIZE(op, size);
jpayne@69 3072 if (size <= 0) {
jpayne@69 3073 op->data.ob_item = NULL;
jpayne@69 3074 }
jpayne@69 3075 else {
jpayne@69 3076 op->data.ob_item = PyMem_NEW(char, nbytes);
jpayne@69 3077 if (op->data.ob_item == NULL) {
jpayne@69 3078 Py_DECREF(op);
jpayne@69 3079 return PyErr_NoMemory();
jpayne@69 3080 }
jpayne@69 3081 }
jpayne@69 3082 return (PyObject *) op;
jpayne@69 3083 }
jpayne@69 3084 #else
jpayne@69 3085 PyObject* newarrayobject(PyTypeObject *type, Py_ssize_t size,
jpayne@69 3086 struct arraydescr *descr);
jpayne@69 3087 #endif
jpayne@69 3088 static CYTHON_INLINE int resize(arrayobject *self, Py_ssize_t n) {
jpayne@69 3089 void *items = (void*) self->data.ob_item;
jpayne@69 3090 PyMem_Resize(items, char, (size_t)(n * self->ob_descr->itemsize));
jpayne@69 3091 if (items == NULL) {
jpayne@69 3092 PyErr_NoMemory();
jpayne@69 3093 return -1;
jpayne@69 3094 }
jpayne@69 3095 self->data.ob_item = (char*) items;
jpayne@69 3096 __Pyx_SET_SIZE(self, n);
jpayne@69 3097 self->allocated = n;
jpayne@69 3098 return 0;
jpayne@69 3099 }
jpayne@69 3100 static CYTHON_INLINE int resize_smart(arrayobject *self, Py_ssize_t n) {
jpayne@69 3101 void *items = (void*) self->data.ob_item;
jpayne@69 3102 Py_ssize_t newsize;
jpayne@69 3103 if (n < self->allocated && n*4 > self->allocated) {
jpayne@69 3104 __Pyx_SET_SIZE(self, n);
jpayne@69 3105 return 0;
jpayne@69 3106 }
jpayne@69 3107 newsize = n + (n / 2) + 1;
jpayne@69 3108 if (newsize <= n) {
jpayne@69 3109 PyErr_NoMemory();
jpayne@69 3110 return -1;
jpayne@69 3111 }
jpayne@69 3112 PyMem_Resize(items, char, (size_t)(newsize * self->ob_descr->itemsize));
jpayne@69 3113 if (items == NULL) {
jpayne@69 3114 PyErr_NoMemory();
jpayne@69 3115 return -1;
jpayne@69 3116 }
jpayne@69 3117 self->data.ob_item = (char*) items;
jpayne@69 3118 __Pyx_SET_SIZE(self, n);
jpayne@69 3119 self->allocated = newsize;
jpayne@69 3120 return 0;
jpayne@69 3121 }
jpayne@69 3122 #endif
jpayne@69 3123
jpayne@69 3124 /* GCCDiagnostics.proto */
jpayne@69 3125 #if !defined(__INTEL_COMPILER) && defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6))
jpayne@69 3126 #define __Pyx_HAS_GCC_DIAGNOSTIC
jpayne@69 3127 #endif
jpayne@69 3128
jpayne@69 3129 /* CIntFromPy.proto */
jpayne@69 3130 static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *);
jpayne@69 3131
jpayne@69 3132 /* CIntFromPy.proto */
jpayne@69 3133 static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *);
jpayne@69 3134
jpayne@69 3135 /* CIntToPy.proto */
jpayne@69 3136 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value);
jpayne@69 3137
jpayne@69 3138 /* CIntToPy.proto */
jpayne@69 3139 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value);
jpayne@69 3140
jpayne@69 3141 /* FormatTypeName.proto */
jpayne@69 3142 #if CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 3143 typedef PyObject *__Pyx_TypeName;
jpayne@69 3144 #define __Pyx_FMT_TYPENAME "%U"
jpayne@69 3145 static __Pyx_TypeName __Pyx_PyType_GetName(PyTypeObject* tp);
jpayne@69 3146 #define __Pyx_DECREF_TypeName(obj) Py_XDECREF(obj)
jpayne@69 3147 #else
jpayne@69 3148 typedef const char *__Pyx_TypeName;
jpayne@69 3149 #define __Pyx_FMT_TYPENAME "%.200s"
jpayne@69 3150 #define __Pyx_PyType_GetName(tp) ((tp)->tp_name)
jpayne@69 3151 #define __Pyx_DECREF_TypeName(obj)
jpayne@69 3152 #endif
jpayne@69 3153
jpayne@69 3154 /* FastTypeChecks.proto */
jpayne@69 3155 #if CYTHON_COMPILING_IN_CPYTHON
jpayne@69 3156 #define __Pyx_TypeCheck(obj, type) __Pyx_IsSubtype(Py_TYPE(obj), (PyTypeObject *)type)
jpayne@69 3157 #define __Pyx_TypeCheck2(obj, type1, type2) __Pyx_IsAnySubtype2(Py_TYPE(obj), (PyTypeObject *)type1, (PyTypeObject *)type2)
jpayne@69 3158 static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b);
jpayne@69 3159 static CYTHON_INLINE int __Pyx_IsAnySubtype2(PyTypeObject *cls, PyTypeObject *a, PyTypeObject *b);
jpayne@69 3160 static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject *type);
jpayne@69 3161 static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *type1, PyObject *type2);
jpayne@69 3162 #else
jpayne@69 3163 #define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type)
jpayne@69 3164 #define __Pyx_TypeCheck2(obj, type1, type2) (PyObject_TypeCheck(obj, (PyTypeObject *)type1) || PyObject_TypeCheck(obj, (PyTypeObject *)type2))
jpayne@69 3165 #define __Pyx_PyErr_GivenExceptionMatches(err, type) PyErr_GivenExceptionMatches(err, type)
jpayne@69 3166 #define __Pyx_PyErr_GivenExceptionMatches2(err, type1, type2) (PyErr_GivenExceptionMatches(err, type1) || PyErr_GivenExceptionMatches(err, type2))
jpayne@69 3167 #endif
jpayne@69 3168 #define __Pyx_PyErr_ExceptionMatches2(err1, err2) __Pyx_PyErr_GivenExceptionMatches2(__Pyx_PyErr_CurrentExceptionType(), err1, err2)
jpayne@69 3169 #define __Pyx_PyException_Check(obj) __Pyx_TypeCheck(obj, PyExc_Exception)
jpayne@69 3170
jpayne@69 3171 /* CheckBinaryVersion.proto */
jpayne@69 3172 static unsigned long __Pyx_get_runtime_version(void);
jpayne@69 3173 static int __Pyx_check_binary_version(unsigned long ct_version, unsigned long rt_version, int allow_newer);
jpayne@69 3174
jpayne@69 3175 /* FunctionImport.proto */
jpayne@69 3176 static int __Pyx_ImportFunction_3_0_11(PyObject *module, const char *funcname, void (**f)(void), const char *sig);
jpayne@69 3177
jpayne@69 3178 /* InitStrings.proto */
jpayne@69 3179 static int __Pyx_InitStrings(__Pyx_StringTabEntry *t);
jpayne@69 3180
jpayne@69 3181 /* #### Code section: module_declarations ### */
jpayne@69 3182 static CYTHON_INLINE double __pyx_f_7cpython_7complex_7complex_4real_real(PyComplexObject *__pyx_v_self); /* proto*/
jpayne@69 3183 static CYTHON_INLINE double __pyx_f_7cpython_7complex_7complex_4imag_imag(PyComplexObject *__pyx_v_self); /* proto*/
jpayne@69 3184 static char *__pyx_f_5pysam_9libcfaidx_9FastaFile__fetch(struct __pyx_obj_5pysam_9libcfaidx_FastaFile *__pyx_v_self, char *__pyx_v_reference, int __pyx_v_start, int __pyx_v_end, int *__pyx_v_length); /* proto*/
jpayne@69 3185 static PyObject *__pyx_f_5pysam_9libcfaidx_10FastqProxy_to_string(struct __pyx_obj_5pysam_9libcfaidx_FastqProxy *__pyx_v_self); /* proto*/
jpayne@69 3186 static PyObject *__pyx_f_5pysam_9libcfaidx_10FastqProxy_tostring(struct __pyx_obj_5pysam_9libcfaidx_FastqProxy *__pyx_v_self); /* proto*/
jpayne@69 3187 static arrayobject *__pyx_f_5pysam_9libcfaidx_10FastqProxy_get_quality_array(struct __pyx_obj_5pysam_9libcfaidx_FastqProxy *__pyx_v_self, int __pyx_skip_dispatch, struct __pyx_opt_args_5pysam_9libcfaidx_10FastqProxy_get_quality_array *__pyx_optional_args); /* proto*/
jpayne@69 3188 static PyObject *__pyx_f_5pysam_9libcfaidx_11FastxRecord_to_string(struct __pyx_obj_5pysam_9libcfaidx_FastxRecord *__pyx_v_self); /* proto*/
jpayne@69 3189 static PyObject *__pyx_f_5pysam_9libcfaidx_11FastxRecord_tostring(struct __pyx_obj_5pysam_9libcfaidx_FastxRecord *__pyx_v_self); /* proto*/
jpayne@69 3190 static arrayobject *__pyx_f_5pysam_9libcfaidx_11FastxRecord_get_quality_array(struct __pyx_obj_5pysam_9libcfaidx_FastxRecord *__pyx_v_self, int __pyx_skip_dispatch, struct __pyx_opt_args_5pysam_9libcfaidx_11FastxRecord_get_quality_array *__pyx_optional_args); /* proto*/
jpayne@69 3191 static kseq_t *__pyx_f_5pysam_9libcfaidx_9FastxFile_getCurrent(struct __pyx_obj_5pysam_9libcfaidx_FastxFile *__pyx_v_self); /* proto*/
jpayne@69 3192 static int __pyx_f_5pysam_9libcfaidx_9FastxFile_cnext(struct __pyx_obj_5pysam_9libcfaidx_FastxFile *__pyx_v_self); /* proto*/
jpayne@69 3193
jpayne@69 3194 /* Module declarations from "libc.stdint" */
jpayne@69 3195
jpayne@69 3196 /* Module declarations from "libc.string" */
jpayne@69 3197
jpayne@69 3198 /* Module declarations from "libc.stdlib" */
jpayne@69 3199
jpayne@69 3200 /* Module declarations from "libc.stdio" */
jpayne@69 3201
jpayne@69 3202 /* Module declarations from "cython" */
jpayne@69 3203
jpayne@69 3204 /* Module declarations from "cpython.version" */
jpayne@69 3205
jpayne@69 3206 /* Module declarations from "__builtin__" */
jpayne@69 3207
jpayne@69 3208 /* Module declarations from "cpython.type" */
jpayne@69 3209
jpayne@69 3210 /* Module declarations from "cpython.object" */
jpayne@69 3211
jpayne@69 3212 /* Module declarations from "cpython.ref" */
jpayne@69 3213
jpayne@69 3214 /* Module declarations from "cpython.exc" */
jpayne@69 3215
jpayne@69 3216 /* Module declarations from "cpython.module" */
jpayne@69 3217
jpayne@69 3218 /* Module declarations from "cpython.mem" */
jpayne@69 3219
jpayne@69 3220 /* Module declarations from "cpython.tuple" */
jpayne@69 3221
jpayne@69 3222 /* Module declarations from "cpython.list" */
jpayne@69 3223
jpayne@69 3224 /* Module declarations from "cpython.sequence" */
jpayne@69 3225
jpayne@69 3226 /* Module declarations from "cpython.mapping" */
jpayne@69 3227
jpayne@69 3228 /* Module declarations from "cpython.iterator" */
jpayne@69 3229
jpayne@69 3230 /* Module declarations from "cpython.number" */
jpayne@69 3231
jpayne@69 3232 /* Module declarations from "cpython.int" */
jpayne@69 3233
jpayne@69 3234 /* Module declarations from "__builtin__" */
jpayne@69 3235
jpayne@69 3236 /* Module declarations from "cpython.bool" */
jpayne@69 3237
jpayne@69 3238 /* Module declarations from "cpython.long" */
jpayne@69 3239
jpayne@69 3240 /* Module declarations from "cpython.float" */
jpayne@69 3241
jpayne@69 3242 /* Module declarations from "__builtin__" */
jpayne@69 3243
jpayne@69 3244 /* Module declarations from "cpython.complex" */
jpayne@69 3245
jpayne@69 3246 /* Module declarations from "cpython.string" */
jpayne@69 3247
jpayne@69 3248 /* Module declarations from "libc.stddef" */
jpayne@69 3249
jpayne@69 3250 /* Module declarations from "cpython.unicode" */
jpayne@69 3251
jpayne@69 3252 /* Module declarations from "cpython.pyport" */
jpayne@69 3253
jpayne@69 3254 /* Module declarations from "cpython.dict" */
jpayne@69 3255
jpayne@69 3256 /* Module declarations from "cpython.instance" */
jpayne@69 3257
jpayne@69 3258 /* Module declarations from "cpython.function" */
jpayne@69 3259
jpayne@69 3260 /* Module declarations from "cpython.method" */
jpayne@69 3261
jpayne@69 3262 /* Module declarations from "cpython.weakref" */
jpayne@69 3263
jpayne@69 3264 /* Module declarations from "cpython.getargs" */
jpayne@69 3265
jpayne@69 3266 /* Module declarations from "cpython.pythread" */
jpayne@69 3267
jpayne@69 3268 /* Module declarations from "cpython.pystate" */
jpayne@69 3269
jpayne@69 3270 /* Module declarations from "cpython.cobject" */
jpayne@69 3271
jpayne@69 3272 /* Module declarations from "cpython.oldbuffer" */
jpayne@69 3273
jpayne@69 3274 /* Module declarations from "cpython.set" */
jpayne@69 3275
jpayne@69 3276 /* Module declarations from "cpython.buffer" */
jpayne@69 3277
jpayne@69 3278 /* Module declarations from "cpython.bytes" */
jpayne@69 3279
jpayne@69 3280 /* Module declarations from "cpython.pycapsule" */
jpayne@69 3281
jpayne@69 3282 /* Module declarations from "cpython.contextvars" */
jpayne@69 3283
jpayne@69 3284 /* Module declarations from "cpython" */
jpayne@69 3285
jpayne@69 3286 /* Module declarations from "array" */
jpayne@69 3287
jpayne@69 3288 /* Module declarations from "cpython.array" */
jpayne@69 3289 static CYTHON_INLINE int __pyx_f_7cpython_5array_extend_buffer(arrayobject *, char *, Py_ssize_t); /*proto*/
jpayne@69 3290
jpayne@69 3291 /* Module declarations from "posix.types" */
jpayne@69 3292
jpayne@69 3293 /* Module declarations from "pysam.libchtslib" */
jpayne@69 3294
jpayne@69 3295 /* Module declarations from "libc.errno" */
jpayne@69 3296
jpayne@69 3297 /* Module declarations from "pysam.libcutils" */
jpayne@69 3298 static PyObject *(*__pyx_f_5pysam_9libcutils_parse_region)(int __pyx_skip_dispatch, struct __pyx_opt_args_5pysam_9libcutils_parse_region *__pyx_optional_args); /*proto*/
jpayne@69 3299 static arrayobject *(*__pyx_f_5pysam_9libcutils_qualitystring_to_array)(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_5pysam_9libcutils_qualitystring_to_array *__pyx_optional_args); /*proto*/
jpayne@69 3300 static PyObject *(*__pyx_f_5pysam_9libcutils_charptr_to_str)(char const *, struct __pyx_opt_args_5pysam_9libcutils_charptr_to_str *__pyx_optional_args); /*proto*/
jpayne@69 3301 static PyObject *(*__pyx_f_5pysam_9libcutils_force_str)(PyObject *, struct __pyx_opt_args_5pysam_9libcutils_force_str *__pyx_optional_args); /*proto*/
jpayne@69 3302 static PyObject *(*__pyx_f_5pysam_9libcutils_force_bytes)(PyObject *, struct __pyx_opt_args_5pysam_9libcutils_force_bytes *__pyx_optional_args); /*proto*/
jpayne@69 3303 static PyObject *(*__pyx_f_5pysam_9libcutils_encode_filename)(PyObject *); /*proto*/
jpayne@69 3304 static PyObject *(*__pyx_f_5pysam_9libcutils_from_string_and_size)(char const *, size_t); /*proto*/
jpayne@69 3305
jpayne@69 3306 /* Module declarations from "pysam.libcfaidx" */
jpayne@69 3307 static PyObject *__pyx_f_5pysam_9libcfaidx_makeFastqProxy(kseq_t *); /*proto*/
jpayne@69 3308 static PyObject *__pyx_f_5pysam_9libcfaidx___pyx_unpickle_FastxRecord__set_state(struct __pyx_obj_5pysam_9libcfaidx_FastxRecord *, PyObject *); /*proto*/
jpayne@69 3309 /* #### Code section: typeinfo ### */
jpayne@69 3310 /* #### Code section: before_global_var ### */
jpayne@69 3311 #define __Pyx_MODULE_NAME "pysam.libcfaidx"
jpayne@69 3312 extern int __pyx_module_is_main_pysam__libcfaidx;
jpayne@69 3313 int __pyx_module_is_main_pysam__libcfaidx = 0;
jpayne@69 3314
jpayne@69 3315 /* Implementation of "pysam.libcfaidx" */
jpayne@69 3316 /* #### Code section: global_var ### */
jpayne@69 3317 static PyObject *__pyx_builtin_ValueError;
jpayne@69 3318 static PyObject *__pyx_builtin_IOError;
jpayne@69 3319 static PyObject *__pyx_builtin_zip;
jpayne@69 3320 static PyObject *__pyx_builtin_KeyError;
jpayne@69 3321 static PyObject *__pyx_builtin_TypeError;
jpayne@69 3322 static PyObject *__pyx_builtin_StopIteration;
jpayne@69 3323 static PyObject *__pyx_builtin_MemoryError;
jpayne@69 3324 /* #### Code section: string_decls ### */
jpayne@69 3325 static const char __pyx_k_s[] = " %s";
jpayne@69 3326 static const char __pyx_k_x[] = "x";
jpayne@69 3327 static const char __pyx_k__4[] = "-";
jpayne@69 3328 static const char __pyx_k_gc[] = "gc";
jpayne@69 3329 static const char __pyx_k_os[] = "os";
jpayne@69 3330 static const char __pyx_k_re[] = "re";
jpayne@69 3331 static const char __pyx_k_ss[] = "ss";
jpayne@69 3332 static const char __pyx_k__11[] = "";
jpayne@69 3333 static const char __pyx_k__16[] = ">";
jpayne@69 3334 static const char __pyx_k__17[] = "\n";
jpayne@69 3335 static const char __pyx_k__18[] = "@";
jpayne@69 3336 static const char __pyx_k__19[] = "\n+\n";
jpayne@69 3337 static const char __pyx_k__47[] = ".";
jpayne@69 3338 static const char __pyx_k__48[] = "*";
jpayne@69 3339 static const char __pyx_k__68[] = "?";
jpayne@69 3340 static const char __pyx_k_all[] = "__all__";
jpayne@69 3341 static const char __pyx_k_end[] = "end";
jpayne@69 3342 static const char __pyx_k_new[] = "__new__";
jpayne@69 3343 static const char __pyx_k_ref[] = "ref";
jpayne@69 3344 static const char __pyx_k_s_2[] = "s";
jpayne@69 3345 static const char __pyx_k_seq[] = "seq";
jpayne@69 3346 static const char __pyx_k_sys[] = "sys";
jpayne@69 3347 static const char __pyx_k_zip[] = "zip";
jpayne@69 3348 static const char __pyx_k_None[] = "None";
jpayne@69 3349 static const char __pyx_k_copy[] = "__copy__";
jpayne@69 3350 static const char __pyx_k_dict[] = "__dict__";
jpayne@69 3351 static const char __pyx_k_exit[] = "__exit__";
jpayne@69 3352 static const char __pyx_k_main[] = "__main__";
jpayne@69 3353 static const char __pyx_k_memo[] = "memo";
jpayne@69 3354 static const char __pyx_k_name[] = "name";
jpayne@69 3355 static const char __pyx_k_open[] = "_open";
jpayne@69 3356 static const char __pyx_k_path[] = "path";
jpayne@69 3357 static const char __pyx_k_rend[] = "rend";
jpayne@69 3358 static const char __pyx_k_self[] = "self";
jpayne@69 3359 static const char __pyx_k_spec[] = "__spec__";
jpayne@69 3360 static const char __pyx_k_test[] = "__test__";
jpayne@69 3361 static const char __pyx_k_close[] = "close";
jpayne@69 3362 static const char __pyx_k_enter[] = "__enter__";
jpayne@69 3363 static const char __pyx_k_fetch[] = "fetch";
jpayne@69 3364 static const char __pyx_k_proxy[] = "proxy";
jpayne@69 3365 static const char __pyx_k_start[] = "start";
jpayne@69 3366 static const char __pyx_k_state[] = "state";
jpayne@69 3367 static const char __pyx_k_append[] = "append";
jpayne@69 3368 static const char __pyx_k_contig[] = "contig";
jpayne@69 3369 static const char __pyx_k_dict_2[] = "_dict";
jpayne@69 3370 static const char __pyx_k_enable[] = "enable";
jpayne@69 3371 static const char __pyx_k_exists[] = "exists";
jpayne@69 3372 static const char __pyx_k_format[] = "format";
jpayne@69 3373 static const char __pyx_k_import[] = "__import__";
jpayne@69 3374 static const char __pyx_k_length[] = "length";
jpayne@69 3375 static const char __pyx_k_name_2[] = "__name__";
jpayne@69 3376 static const char __pyx_k_offset[] = "offset";
jpayne@69 3377 static const char __pyx_k_pickle[] = "pickle";
jpayne@69 3378 static const char __pyx_k_reduce[] = "__reduce__";
jpayne@69 3379 static const char __pyx_k_region[] = "region";
jpayne@69 3380 static const char __pyx_k_rstart[] = "rstart";
jpayne@69 3381 static const char __pyx_k_update[] = "update";
jpayne@69 3382 static const char __pyx_k_IOError[] = "IOError";
jpayne@69 3383 static const char __pyx_k_comment[] = "comment";
jpayne@69 3384 static const char __pyx_k_disable[] = "disable";
jpayne@69 3385 static const char __pyx_k_is_open[] = "is_open";
jpayne@69 3386 static const char __pyx_k_persist[] = "persist";
jpayne@69 3387 static const char __pyx_k_quality[] = "quality";
jpayne@69 3388 static const char __pyx_k_KeyError[] = "KeyError";
jpayne@69 3389 static const char __pyx_k_contig_b[] = "contig_b";
jpayne@69 3390 static const char __pyx_k_deepcopy[] = "__deepcopy__";
jpayne@69 3391 static const char __pyx_k_exc_type[] = "exc_type";
jpayne@69 3392 static const char __pyx_k_filename[] = "filename";
jpayne@69 3393 static const char __pyx_k_getstate[] = "__getstate__";
jpayne@69 3394 static const char __pyx_k_pyx_type[] = "__pyx_type";
jpayne@69 3395 static const char __pyx_k_sequence[] = "sequence";
jpayne@69 3396 static const char __pyx_k_set_name[] = "set_name";
jpayne@69 3397 static const char __pyx_k_setstate[] = "__setstate__";
jpayne@69 3398 static const char __pyx_k_FastaFile[] = "FastaFile";
jpayne@69 3399 static const char __pyx_k_Fastafile[] = "Fastafile";
jpayne@69 3400 static const char __pyx_k_FastqFile[] = "FastqFile";
jpayne@69 3401 static const char __pyx_k_FastxFile[] = "FastxFile";
jpayne@69 3402 static const char __pyx_k_TypeError[] = "TypeError";
jpayne@69 3403 static const char __pyx_k_cfilename[] = "cfilename";
jpayne@69 3404 static const char __pyx_k_exc_value[] = "exc_value";
jpayne@69 3405 static const char __pyx_k_isenabled[] = "isenabled";
jpayne@69 3406 static const char __pyx_k_pyx_state[] = "__pyx_state";
jpayne@69 3407 static const char __pyx_k_reduce_ex[] = "__reduce_ex__";
jpayne@69 3408 static const char __pyx_k_reference[] = "reference";
jpayne@69 3409 static const char __pyx_k_traceback[] = "traceback";
jpayne@69 3410 static const char __pyx_k_FastqProxy[] = "FastqProxy";
jpayne@69 3411 static const char __pyx_k_ValueError[] = "ValueError";
jpayne@69 3412 static const char __pyx_k_cindexname[] = "cindexname";
jpayne@69 3413 static const char __pyx_k_pyx_result[] = "__pyx_result";
jpayne@69 3414 static const char __pyx_k_pyx_vtable[] = "__pyx_vtable__";
jpayne@69 3415 static const char __pyx_k_references[] = "references";
jpayne@69 3416 static const char __pyx_k_FastxRecord[] = "FastxRecord";
jpayne@69 3417 static const char __pyx_k_MemoryError[] = "MemoryError";
jpayne@69 3418 static const char __pyx_k_PickleError[] = "PickleError";
jpayne@69 3419 static const char __pyx_k_nreferences[] = "nreferences";
jpayne@69 3420 static const char __pyx_k_set_comment[] = "set_comment";
jpayne@69 3421 static const char __pyx_k_initializing[] = "_initializing";
jpayne@69 3422 static const char __pyx_k_is_coroutine[] = "_is_coroutine";
jpayne@69 3423 static const char __pyx_k_pyx_checksum[] = "__pyx_checksum";
jpayne@69 3424 static const char __pyx_k_set_sequence[] = "set_sequence";
jpayne@69 3425 static const char __pyx_k_stringsource[] = "<stringsource>";
jpayne@69 3426 static const char __pyx_k_use_setstate[] = "use_setstate";
jpayne@69 3427 static const char __pyx_k_StopIteration[] = "StopIteration";
jpayne@69 3428 static const char __pyx_k_class_getitem[] = "__class_getitem__";
jpayne@69 3429 static const char __pyx_k_reduce_cython[] = "__reduce_cython__";
jpayne@69 3430 static const char __pyx_k_filepath_index[] = "filepath_index";
jpayne@69 3431 static const char __pyx_k_FastaFile__open[] = "FastaFile._open";
jpayne@69 3432 static const char __pyx_k_FastaFile_close[] = "FastaFile.close";
jpayne@69 3433 static const char __pyx_k_FastaFile_fetch[] = "FastaFile.fetch";
jpayne@69 3434 static const char __pyx_k_FastxFile__open[] = "FastxFile._open";
jpayne@69 3435 static const char __pyx_k_FastxFile_close[] = "FastxFile.close";
jpayne@69 3436 static const char __pyx_k_bindex_filename[] = "bindex_filename";
jpayne@69 3437 static const char __pyx_k_pysam_libcfaidx[] = "pysam.libcfaidx";
jpayne@69 3438 static const char __pyx_k_pyx_PickleError[] = "__pyx_PickleError";
jpayne@69 3439 static const char __pyx_k_setstate_cython[] = "__setstate_cython__";
jpayne@69 3440 static const char __pyx_k_FastaFile___exit[] = "FastaFile.__exit__";
jpayne@69 3441 static const char __pyx_k_FastxFile___exit[] = "FastxFile.__exit__";
jpayne@69 3442 static const char __pyx_k_file_s_not_found[] = "file `%s` not found";
jpayne@69 3443 static const char __pyx_k_FastaFile___enter[] = "FastaFile.__enter__";
jpayne@69 3444 static const char __pyx_k_FastaFile_is_open[] = "FastaFile.is_open";
jpayne@69 3445 static const char __pyx_k_FastxFile___enter[] = "FastxFile.__enter__";
jpayne@69 3446 static const char __pyx_k_FastxFile_is_open[] = "FastxFile.is_open";
jpayne@69 3447 static const char __pyx_k_get_quality_array[] = "get_quality_array";
jpayne@69 3448 static const char __pyx_k_FastxRecord___copy[] = "FastxRecord.__copy__";
jpayne@69 3449 static const char __pyx_k_asyncio_coroutines[] = "asyncio.coroutines";
jpayne@69 3450 static const char __pyx_k_cline_in_traceback[] = "cline_in_traceback";
jpayne@69 3451 static const char __pyx_k_pysam_libcfaidx_pyx[] = "pysam/libcfaidx.pyx";
jpayne@69 3452 static const char __pyx_k_FastxRecord_set_name[] = "FastxRecord.set_name";
jpayne@69 3453 static const char __pyx_k_get_reference_length[] = "get_reference_length";
jpayne@69 3454 static const char __pyx_k_cindexname_compressed[] = "cindexname_compressed";
jpayne@69 3455 static const char __pyx_k_FastxRecord___deepcopy[] = "FastxRecord.__deepcopy__";
jpayne@69 3456 static const char __pyx_k_sequence_s_not_present[] = "sequence '%s' not present";
jpayne@69 3457 static const char __pyx_k_FastxRecord_set_comment[] = "FastxRecord.set_comment";
jpayne@69 3458 static const char __pyx_k_filename_does_not_exist[] = "filename {} does not exist";
jpayne@69 3459 static const char __pyx_k_FastxRecord_set_sequence[] = "FastxRecord.set_sequence";
jpayne@69 3460 static const char __pyx_k_pyx_unpickle_FastxRecord[] = "__pyx_unpickle_FastxRecord";
jpayne@69 3461 static const char __pyx_k_FastaFile___reduce_cython[] = "FastaFile.__reduce_cython__";
jpayne@69 3462 static const char __pyx_k_Fastafile___reduce_cython[] = "Fastafile.__reduce_cython__";
jpayne@69 3463 static const char __pyx_k_FastqFile___reduce_cython[] = "FastqFile.__reduce_cython__";
jpayne@69 3464 static const char __pyx_k_FastxFile___reduce_cython[] = "FastxFile.__reduce_cython__";
jpayne@69 3465 static const char __pyx_k_error_when_opening_file_s[] = "error when opening file `%s`";
jpayne@69 3466 static const char __pyx_k_filepath_index_compressed[] = "filepath_index_compressed";
jpayne@69 3467 static const char __pyx_k_unknown_problem_parsing_0[] = "unknown problem parsing {0}";
jpayne@69 3468 static const char __pyx_k_FastqProxy___reduce_cython[] = "FastqProxy.__reduce_cython__";
jpayne@69 3469 static const char __pyx_k_bindex_filename_compressed[] = "bindex_filename_compressed";
jpayne@69 3470 static const char __pyx_k_calling_len_on_closed_file[] = "calling len() on closed file";
jpayne@69 3471 static const char __pyx_k_FastaFile___setstate_cython[] = "FastaFile.__setstate_cython__";
jpayne@69 3472 static const char __pyx_k_Fastafile___setstate_cython[] = "Fastafile.__setstate_cython__";
jpayne@69 3473 static const char __pyx_k_FastqFile___setstate_cython[] = "FastqFile.__setstate_cython__";
jpayne@69 3474 static const char __pyx_k_FastxFile___setstate_cython[] = "FastxFile.__setstate_cython__";
jpayne@69 3475 static const char __pyx_k_FastxRecord___reduce_cython[] = "FastxRecord.__reduce_cython__";
jpayne@69 3476 static const char __pyx_k_no_sequence_region_supplied[] = "no sequence/region supplied.";
jpayne@69 3477 static const char __pyx_k_FastqProxy___setstate_cython[] = "FastqProxy.__setstate_cython__";
jpayne@69 3478 static const char __pyx_k_FastqProxy_get_quality_array[] = "FastqProxy.get_quality_array";
jpayne@69 3479 static const char __pyx_k_I_O_operation_on_closed_file[] = "I/O operation on closed file";
jpayne@69 3480 static const char __pyx_k_FastxRecord___setstate_cython[] = "FastxRecord.__setstate_cython__";
jpayne@69 3481 static const char __pyx_k_FastxRecord_get_quality_array[] = "FastxRecord.get_quality_array";
jpayne@69 3482 static const char __pyx_k_truncated_quality_string_in_0[] = "truncated quality string in {0}";
jpayne@69 3483 static const char __pyx_k_FastaFile_get_reference_length[] = "FastaFile.get_reference_length";
jpayne@69 3484 static const char __pyx_k_FastxRecord_must_have_a_name_and[] = "FastxRecord must have a name and not None";
jpayne@69 3485 static const char __pyx_k_Incompatible_checksums_0x_x_vs_0[] = "Incompatible checksums (0x%x vs (0x1bdb611, 0xb688a86, 0x43fd151) = (comment, name, quality, sequence))";
jpayne@69 3486 static const char __pyx_k_can_not_write_record_without_a_s[] = "can not write record without a sequence";
jpayne@69 3487 static const char __pyx_k_can_not_write_record_without_nam[] = "can not write record without name";
jpayne@69 3488 static const char __pyx_k_do_not_instantiate_FastqProxy_di[] = "do not instantiate FastqProxy directly";
jpayne@69 3489 static const char __pyx_k_failure_when_retrieving_sequence[] = "failure when retrieving sequence on '%s'";
jpayne@69 3490 static const char __pyx_k_no_default___reduce___due_to_non[] = "no default __reduce__ due to non-trivial __cinit__";
jpayne@69 3491 static const char __pyx_k_self__delegate_cannot_be_convert[] = "self._delegate cannot be converted to a Python object for pickling";
jpayne@69 3492 static const char __pyx_k_sequence_and_quality_length_do_n[] = "sequence and quality length do not match: {} vs {}";
jpayne@69 3493 /* #### Code section: decls ### */
jpayne@69 3494 static int __pyx_pf_7cpython_5array_5array___getbuffer__(arrayobject *__pyx_v_self, Py_buffer *__pyx_v_info, CYTHON_UNUSED int __pyx_v_flags); /* proto */
jpayne@69 3495 static void __pyx_pf_7cpython_5array_5array_2__releasebuffer__(CYTHON_UNUSED arrayobject *__pyx_v_self, Py_buffer *__pyx_v_info); /* proto */
jpayne@69 3496 static int __pyx_pf_5pysam_9libcfaidx_9FastaFile___cinit__(struct __pyx_obj_5pysam_9libcfaidx_FastaFile *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); /* proto */
jpayne@69 3497 static PyObject *__pyx_pf_5pysam_9libcfaidx_9FastaFile_2is_open(struct __pyx_obj_5pysam_9libcfaidx_FastaFile *__pyx_v_self); /* proto */
jpayne@69 3498 static Py_ssize_t __pyx_pf_5pysam_9libcfaidx_9FastaFile_4__len__(struct __pyx_obj_5pysam_9libcfaidx_FastaFile *__pyx_v_self); /* proto */
jpayne@69 3499 static PyObject *__pyx_pf_5pysam_9libcfaidx_9FastaFile_6_open(struct __pyx_obj_5pysam_9libcfaidx_FastaFile *__pyx_v_self, PyObject *__pyx_v_filename, PyObject *__pyx_v_filepath_index, PyObject *__pyx_v_filepath_index_compressed); /* proto */
jpayne@69 3500 static PyObject *__pyx_pf_5pysam_9libcfaidx_9FastaFile_8close(struct __pyx_obj_5pysam_9libcfaidx_FastaFile *__pyx_v_self); /* proto */
jpayne@69 3501 static void __pyx_pf_5pysam_9libcfaidx_9FastaFile_10__dealloc__(struct __pyx_obj_5pysam_9libcfaidx_FastaFile *__pyx_v_self); /* proto */
jpayne@69 3502 static PyObject *__pyx_pf_5pysam_9libcfaidx_9FastaFile_12__enter__(struct __pyx_obj_5pysam_9libcfaidx_FastaFile *__pyx_v_self); /* proto */
jpayne@69 3503 static PyObject *__pyx_pf_5pysam_9libcfaidx_9FastaFile_14__exit__(struct __pyx_obj_5pysam_9libcfaidx_FastaFile *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_exc_type, CYTHON_UNUSED PyObject *__pyx_v_exc_value, CYTHON_UNUSED PyObject *__pyx_v_traceback); /* proto */
jpayne@69 3504 static PyObject *__pyx_pf_5pysam_9libcfaidx_9FastaFile_6closed___get__(struct __pyx_obj_5pysam_9libcfaidx_FastaFile *__pyx_v_self); /* proto */
jpayne@69 3505 static PyObject *__pyx_pf_5pysam_9libcfaidx_9FastaFile_8filename___get__(struct __pyx_obj_5pysam_9libcfaidx_FastaFile *__pyx_v_self); /* proto */
jpayne@69 3506 static PyObject *__pyx_pf_5pysam_9libcfaidx_9FastaFile_10references___get__(struct __pyx_obj_5pysam_9libcfaidx_FastaFile *__pyx_v_self); /* proto */
jpayne@69 3507 static PyObject *__pyx_pf_5pysam_9libcfaidx_9FastaFile_11nreferences___get__(struct __pyx_obj_5pysam_9libcfaidx_FastaFile *__pyx_v_self); /* proto */
jpayne@69 3508 static PyObject *__pyx_pf_5pysam_9libcfaidx_9FastaFile_7lengths___get__(struct __pyx_obj_5pysam_9libcfaidx_FastaFile *__pyx_v_self); /* proto */
jpayne@69 3509 static PyObject *__pyx_pf_5pysam_9libcfaidx_9FastaFile_16fetch(struct __pyx_obj_5pysam_9libcfaidx_FastaFile *__pyx_v_self, PyObject *__pyx_v_reference, PyObject *__pyx_v_start, PyObject *__pyx_v_end, PyObject *__pyx_v_region); /* proto */
jpayne@69 3510 static PyObject *__pyx_pf_5pysam_9libcfaidx_9FastaFile_18get_reference_length(struct __pyx_obj_5pysam_9libcfaidx_FastaFile *__pyx_v_self, PyObject *__pyx_v_reference); /* proto */
jpayne@69 3511 static PyObject *__pyx_pf_5pysam_9libcfaidx_9FastaFile_20__getitem__(struct __pyx_obj_5pysam_9libcfaidx_FastaFile *__pyx_v_self, PyObject *__pyx_v_reference); /* proto */
jpayne@69 3512 static int __pyx_pf_5pysam_9libcfaidx_9FastaFile_22__contains__(struct __pyx_obj_5pysam_9libcfaidx_FastaFile *__pyx_v_self, PyObject *__pyx_v_reference); /* proto */
jpayne@69 3513 static PyObject *__pyx_pf_5pysam_9libcfaidx_9FastaFile_24__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5pysam_9libcfaidx_FastaFile *__pyx_v_self); /* proto */
jpayne@69 3514 static PyObject *__pyx_pf_5pysam_9libcfaidx_9FastaFile_26__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_5pysam_9libcfaidx_FastaFile *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
jpayne@69 3515 static int __pyx_pf_5pysam_9libcfaidx_10FastqProxy___init__(CYTHON_UNUSED struct __pyx_obj_5pysam_9libcfaidx_FastqProxy *__pyx_v_self); /* proto */
jpayne@69 3516 static PyObject *__pyx_pf_5pysam_9libcfaidx_10FastqProxy_4name___get__(struct __pyx_obj_5pysam_9libcfaidx_FastqProxy *__pyx_v_self); /* proto */
jpayne@69 3517 static PyObject *__pyx_pf_5pysam_9libcfaidx_10FastqProxy_8sequence___get__(struct __pyx_obj_5pysam_9libcfaidx_FastqProxy *__pyx_v_self); /* proto */
jpayne@69 3518 static PyObject *__pyx_pf_5pysam_9libcfaidx_10FastqProxy_7comment___get__(struct __pyx_obj_5pysam_9libcfaidx_FastqProxy *__pyx_v_self); /* proto */
jpayne@69 3519 static PyObject *__pyx_pf_5pysam_9libcfaidx_10FastqProxy_7quality___get__(struct __pyx_obj_5pysam_9libcfaidx_FastqProxy *__pyx_v_self); /* proto */
jpayne@69 3520 static PyObject *__pyx_pf_5pysam_9libcfaidx_10FastqProxy_2__str__(struct __pyx_obj_5pysam_9libcfaidx_FastqProxy *__pyx_v_self); /* proto */
jpayne@69 3521 static PyObject *__pyx_pf_5pysam_9libcfaidx_10FastqProxy_4get_quality_array(struct __pyx_obj_5pysam_9libcfaidx_FastqProxy *__pyx_v_self, int __pyx_v_offset); /* proto */
jpayne@69 3522 static PyObject *__pyx_pf_5pysam_9libcfaidx_10FastqProxy_6__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5pysam_9libcfaidx_FastqProxy *__pyx_v_self); /* proto */
jpayne@69 3523 static PyObject *__pyx_pf_5pysam_9libcfaidx_10FastqProxy_8__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_5pysam_9libcfaidx_FastqProxy *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
jpayne@69 3524 static int __pyx_pf_5pysam_9libcfaidx_11FastxRecord___init__(struct __pyx_obj_5pysam_9libcfaidx_FastxRecord *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_comment, PyObject *__pyx_v_sequence, PyObject *__pyx_v_quality, struct __pyx_obj_5pysam_9libcfaidx_FastqProxy *__pyx_v_proxy); /* proto */
jpayne@69 3525 static PyObject *__pyx_pf_5pysam_9libcfaidx_11FastxRecord_2__copy__(struct __pyx_obj_5pysam_9libcfaidx_FastxRecord *__pyx_v_self); /* proto */
jpayne@69 3526 static PyObject *__pyx_pf_5pysam_9libcfaidx_11FastxRecord_4__deepcopy__(struct __pyx_obj_5pysam_9libcfaidx_FastxRecord *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_memo); /* proto */
jpayne@69 3527 static PyObject *__pyx_pf_5pysam_9libcfaidx_11FastxRecord_6set_name(struct __pyx_obj_5pysam_9libcfaidx_FastxRecord *__pyx_v_self, PyObject *__pyx_v_name); /* proto */
jpayne@69 3528 static PyObject *__pyx_pf_5pysam_9libcfaidx_11FastxRecord_8set_comment(struct __pyx_obj_5pysam_9libcfaidx_FastxRecord *__pyx_v_self, PyObject *__pyx_v_comment); /* proto */
jpayne@69 3529 static PyObject *__pyx_pf_5pysam_9libcfaidx_11FastxRecord_10set_sequence(struct __pyx_obj_5pysam_9libcfaidx_FastxRecord *__pyx_v_self, PyObject *__pyx_v_sequence, PyObject *__pyx_v_quality); /* proto */
jpayne@69 3530 static PyObject *__pyx_pf_5pysam_9libcfaidx_11FastxRecord_12__str__(struct __pyx_obj_5pysam_9libcfaidx_FastxRecord *__pyx_v_self); /* proto */
jpayne@69 3531 static PyObject *__pyx_pf_5pysam_9libcfaidx_11FastxRecord_14get_quality_array(struct __pyx_obj_5pysam_9libcfaidx_FastxRecord *__pyx_v_self, int __pyx_v_offset); /* proto */
jpayne@69 3532 static PyObject *__pyx_pf_5pysam_9libcfaidx_11FastxRecord_7comment___get__(struct __pyx_obj_5pysam_9libcfaidx_FastxRecord *__pyx_v_self); /* proto */
jpayne@69 3533 static int __pyx_pf_5pysam_9libcfaidx_11FastxRecord_7comment_2__set__(struct __pyx_obj_5pysam_9libcfaidx_FastxRecord *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
jpayne@69 3534 static int __pyx_pf_5pysam_9libcfaidx_11FastxRecord_7comment_4__del__(struct __pyx_obj_5pysam_9libcfaidx_FastxRecord *__pyx_v_self); /* proto */
jpayne@69 3535 static PyObject *__pyx_pf_5pysam_9libcfaidx_11FastxRecord_7quality___get__(struct __pyx_obj_5pysam_9libcfaidx_FastxRecord *__pyx_v_self); /* proto */
jpayne@69 3536 static int __pyx_pf_5pysam_9libcfaidx_11FastxRecord_7quality_2__set__(struct __pyx_obj_5pysam_9libcfaidx_FastxRecord *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
jpayne@69 3537 static int __pyx_pf_5pysam_9libcfaidx_11FastxRecord_7quality_4__del__(struct __pyx_obj_5pysam_9libcfaidx_FastxRecord *__pyx_v_self); /* proto */
jpayne@69 3538 static PyObject *__pyx_pf_5pysam_9libcfaidx_11FastxRecord_8sequence___get__(struct __pyx_obj_5pysam_9libcfaidx_FastxRecord *__pyx_v_self); /* proto */
jpayne@69 3539 static int __pyx_pf_5pysam_9libcfaidx_11FastxRecord_8sequence_2__set__(struct __pyx_obj_5pysam_9libcfaidx_FastxRecord *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
jpayne@69 3540 static int __pyx_pf_5pysam_9libcfaidx_11FastxRecord_8sequence_4__del__(struct __pyx_obj_5pysam_9libcfaidx_FastxRecord *__pyx_v_self); /* proto */
jpayne@69 3541 static PyObject *__pyx_pf_5pysam_9libcfaidx_11FastxRecord_4name___get__(struct __pyx_obj_5pysam_9libcfaidx_FastxRecord *__pyx_v_self); /* proto */
jpayne@69 3542 static int __pyx_pf_5pysam_9libcfaidx_11FastxRecord_4name_2__set__(struct __pyx_obj_5pysam_9libcfaidx_FastxRecord *__pyx_v_self, PyObject *__pyx_v_value); /* proto */
jpayne@69 3543 static int __pyx_pf_5pysam_9libcfaidx_11FastxRecord_4name_4__del__(struct __pyx_obj_5pysam_9libcfaidx_FastxRecord *__pyx_v_self); /* proto */
jpayne@69 3544 static PyObject *__pyx_pf_5pysam_9libcfaidx_11FastxRecord_16__reduce_cython__(struct __pyx_obj_5pysam_9libcfaidx_FastxRecord *__pyx_v_self); /* proto */
jpayne@69 3545 static PyObject *__pyx_pf_5pysam_9libcfaidx_11FastxRecord_18__setstate_cython__(struct __pyx_obj_5pysam_9libcfaidx_FastxRecord *__pyx_v_self, PyObject *__pyx_v___pyx_state); /* proto */
jpayne@69 3546 static int __pyx_pf_5pysam_9libcfaidx_9FastxFile___cinit__(struct __pyx_obj_5pysam_9libcfaidx_FastxFile *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs); /* proto */
jpayne@69 3547 static PyObject *__pyx_pf_5pysam_9libcfaidx_9FastxFile_2is_open(struct __pyx_obj_5pysam_9libcfaidx_FastxFile *__pyx_v_self); /* proto */
jpayne@69 3548 static PyObject *__pyx_pf_5pysam_9libcfaidx_9FastxFile_4_open(struct __pyx_obj_5pysam_9libcfaidx_FastxFile *__pyx_v_self, PyObject *__pyx_v_filename, PyObject *__pyx_v_persist); /* proto */
jpayne@69 3549 static PyObject *__pyx_pf_5pysam_9libcfaidx_9FastxFile_6close(struct __pyx_obj_5pysam_9libcfaidx_FastxFile *__pyx_v_self); /* proto */
jpayne@69 3550 static void __pyx_pf_5pysam_9libcfaidx_9FastxFile_8__dealloc__(struct __pyx_obj_5pysam_9libcfaidx_FastxFile *__pyx_v_self); /* proto */
jpayne@69 3551 static PyObject *__pyx_pf_5pysam_9libcfaidx_9FastxFile_10__enter__(struct __pyx_obj_5pysam_9libcfaidx_FastxFile *__pyx_v_self); /* proto */
jpayne@69 3552 static PyObject *__pyx_pf_5pysam_9libcfaidx_9FastxFile_12__exit__(struct __pyx_obj_5pysam_9libcfaidx_FastxFile *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_exc_type, CYTHON_UNUSED PyObject *__pyx_v_exc_value, CYTHON_UNUSED PyObject *__pyx_v_traceback); /* proto */
jpayne@69 3553 static PyObject *__pyx_pf_5pysam_9libcfaidx_9FastxFile_6closed___get__(struct __pyx_obj_5pysam_9libcfaidx_FastxFile *__pyx_v_self); /* proto */
jpayne@69 3554 static PyObject *__pyx_pf_5pysam_9libcfaidx_9FastxFile_8filename___get__(struct __pyx_obj_5pysam_9libcfaidx_FastxFile *__pyx_v_self); /* proto */
jpayne@69 3555 static PyObject *__pyx_pf_5pysam_9libcfaidx_9FastxFile_14__iter__(struct __pyx_obj_5pysam_9libcfaidx_FastxFile *__pyx_v_self); /* proto */
jpayne@69 3556 static PyObject *__pyx_pf_5pysam_9libcfaidx_9FastxFile_16__next__(struct __pyx_obj_5pysam_9libcfaidx_FastxFile *__pyx_v_self); /* proto */
jpayne@69 3557 static PyObject *__pyx_pf_5pysam_9libcfaidx_9FastxFile_18__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5pysam_9libcfaidx_FastxFile *__pyx_v_self); /* proto */
jpayne@69 3558 static PyObject *__pyx_pf_5pysam_9libcfaidx_9FastxFile_20__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_5pysam_9libcfaidx_FastxFile *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
jpayne@69 3559 static PyObject *__pyx_pf_5pysam_9libcfaidx_9FastqFile___reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5pysam_9libcfaidx_FastqFile *__pyx_v_self); /* proto */
jpayne@69 3560 static PyObject *__pyx_pf_5pysam_9libcfaidx_9FastqFile_2__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_5pysam_9libcfaidx_FastqFile *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
jpayne@69 3561 static PyObject *__pyx_pf_5pysam_9libcfaidx_9Fastafile___reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5pysam_9libcfaidx_Fastafile *__pyx_v_self); /* proto */
jpayne@69 3562 static PyObject *__pyx_pf_5pysam_9libcfaidx_9Fastafile_2__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_5pysam_9libcfaidx_Fastafile *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state); /* proto */
jpayne@69 3563 static PyObject *__pyx_pf_5pysam_9libcfaidx___pyx_unpickle_FastxRecord(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state); /* proto */
jpayne@69 3564 static PyObject *__pyx_tp_new_5pysam_9libcfaidx_FastaFile(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
jpayne@69 3565 static PyObject *__pyx_tp_new_5pysam_9libcfaidx_FastqProxy(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
jpayne@69 3566 static PyObject *__pyx_tp_new_5pysam_9libcfaidx_FastxRecord(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
jpayne@69 3567 static PyObject *__pyx_tp_new_5pysam_9libcfaidx_FastxFile(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
jpayne@69 3568 static PyObject *__pyx_tp_new_5pysam_9libcfaidx_FastqFile(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
jpayne@69 3569 static PyObject *__pyx_tp_new_5pysam_9libcfaidx_Fastafile(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
jpayne@69 3570 /* #### Code section: late_includes ### */
jpayne@69 3571 /* #### Code section: module_state ### */
jpayne@69 3572 typedef struct {
jpayne@69 3573 PyObject *__pyx_d;
jpayne@69 3574 PyObject *__pyx_b;
jpayne@69 3575 PyObject *__pyx_cython_runtime;
jpayne@69 3576 PyObject *__pyx_empty_tuple;
jpayne@69 3577 PyObject *__pyx_empty_bytes;
jpayne@69 3578 PyObject *__pyx_empty_unicode;
jpayne@69 3579 #ifdef __Pyx_CyFunction_USED
jpayne@69 3580 PyTypeObject *__pyx_CyFunctionType;
jpayne@69 3581 #endif
jpayne@69 3582 #ifdef __Pyx_FusedFunction_USED
jpayne@69 3583 PyTypeObject *__pyx_FusedFunctionType;
jpayne@69 3584 #endif
jpayne@69 3585 #ifdef __Pyx_Generator_USED
jpayne@69 3586 PyTypeObject *__pyx_GeneratorType;
jpayne@69 3587 #endif
jpayne@69 3588 #ifdef __Pyx_IterableCoroutine_USED
jpayne@69 3589 PyTypeObject *__pyx_IterableCoroutineType;
jpayne@69 3590 #endif
jpayne@69 3591 #ifdef __Pyx_Coroutine_USED
jpayne@69 3592 PyTypeObject *__pyx_CoroutineAwaitType;
jpayne@69 3593 #endif
jpayne@69 3594 #ifdef __Pyx_Coroutine_USED
jpayne@69 3595 PyTypeObject *__pyx_CoroutineType;
jpayne@69 3596 #endif
jpayne@69 3597 #if CYTHON_USE_MODULE_STATE
jpayne@69 3598 #endif
jpayne@69 3599 #if CYTHON_USE_MODULE_STATE
jpayne@69 3600 #endif
jpayne@69 3601 #if CYTHON_USE_MODULE_STATE
jpayne@69 3602 #endif
jpayne@69 3603 #if CYTHON_USE_MODULE_STATE
jpayne@69 3604 #endif
jpayne@69 3605 #if CYTHON_USE_MODULE_STATE
jpayne@69 3606 #endif
jpayne@69 3607 #if CYTHON_USE_MODULE_STATE
jpayne@69 3608 #endif
jpayne@69 3609 #if CYTHON_USE_MODULE_STATE
jpayne@69 3610 #endif
jpayne@69 3611 #if CYTHON_USE_MODULE_STATE
jpayne@69 3612 #endif
jpayne@69 3613 PyTypeObject *__pyx_ptype_7cpython_4type_type;
jpayne@69 3614 #if CYTHON_USE_MODULE_STATE
jpayne@69 3615 #endif
jpayne@69 3616 #if CYTHON_USE_MODULE_STATE
jpayne@69 3617 #endif
jpayne@69 3618 #if CYTHON_USE_MODULE_STATE
jpayne@69 3619 #endif
jpayne@69 3620 #if CYTHON_USE_MODULE_STATE
jpayne@69 3621 #endif
jpayne@69 3622 #if CYTHON_USE_MODULE_STATE
jpayne@69 3623 #endif
jpayne@69 3624 #if CYTHON_USE_MODULE_STATE
jpayne@69 3625 #endif
jpayne@69 3626 #if CYTHON_USE_MODULE_STATE
jpayne@69 3627 #endif
jpayne@69 3628 #if CYTHON_USE_MODULE_STATE
jpayne@69 3629 #endif
jpayne@69 3630 #if CYTHON_USE_MODULE_STATE
jpayne@69 3631 #endif
jpayne@69 3632 #if CYTHON_USE_MODULE_STATE
jpayne@69 3633 #endif
jpayne@69 3634 #if CYTHON_USE_MODULE_STATE
jpayne@69 3635 #endif
jpayne@69 3636 #if CYTHON_USE_MODULE_STATE
jpayne@69 3637 #endif
jpayne@69 3638 #if CYTHON_USE_MODULE_STATE
jpayne@69 3639 #endif
jpayne@69 3640 #if CYTHON_USE_MODULE_STATE
jpayne@69 3641 #endif
jpayne@69 3642 PyTypeObject *__pyx_ptype_7cpython_4bool_bool;
jpayne@69 3643 #if CYTHON_USE_MODULE_STATE
jpayne@69 3644 #endif
jpayne@69 3645 #if CYTHON_USE_MODULE_STATE
jpayne@69 3646 #endif
jpayne@69 3647 #if CYTHON_USE_MODULE_STATE
jpayne@69 3648 #endif
jpayne@69 3649 #if CYTHON_USE_MODULE_STATE
jpayne@69 3650 #endif
jpayne@69 3651 PyTypeObject *__pyx_ptype_7cpython_7complex_complex;
jpayne@69 3652 #if CYTHON_USE_MODULE_STATE
jpayne@69 3653 #endif
jpayne@69 3654 #if CYTHON_USE_MODULE_STATE
jpayne@69 3655 #endif
jpayne@69 3656 #if CYTHON_USE_MODULE_STATE
jpayne@69 3657 #endif
jpayne@69 3658 #if CYTHON_USE_MODULE_STATE
jpayne@69 3659 #endif
jpayne@69 3660 #if CYTHON_USE_MODULE_STATE
jpayne@69 3661 #endif
jpayne@69 3662 #if CYTHON_USE_MODULE_STATE
jpayne@69 3663 #endif
jpayne@69 3664 #if CYTHON_USE_MODULE_STATE
jpayne@69 3665 #endif
jpayne@69 3666 #if CYTHON_USE_MODULE_STATE
jpayne@69 3667 #endif
jpayne@69 3668 #if CYTHON_USE_MODULE_STATE
jpayne@69 3669 #endif
jpayne@69 3670 #if CYTHON_USE_MODULE_STATE
jpayne@69 3671 #endif
jpayne@69 3672 #if CYTHON_USE_MODULE_STATE
jpayne@69 3673 #endif
jpayne@69 3674 #if CYTHON_USE_MODULE_STATE
jpayne@69 3675 #endif
jpayne@69 3676 #if CYTHON_USE_MODULE_STATE
jpayne@69 3677 #endif
jpayne@69 3678 #if CYTHON_USE_MODULE_STATE
jpayne@69 3679 #endif
jpayne@69 3680 #if CYTHON_USE_MODULE_STATE
jpayne@69 3681 #endif
jpayne@69 3682 #if CYTHON_USE_MODULE_STATE
jpayne@69 3683 #endif
jpayne@69 3684 #if CYTHON_USE_MODULE_STATE
jpayne@69 3685 #endif
jpayne@69 3686 #if CYTHON_USE_MODULE_STATE
jpayne@69 3687 #endif
jpayne@69 3688 #if CYTHON_USE_MODULE_STATE
jpayne@69 3689 #endif
jpayne@69 3690 #if CYTHON_USE_MODULE_STATE
jpayne@69 3691 #endif
jpayne@69 3692 #if CYTHON_USE_MODULE_STATE
jpayne@69 3693 #endif
jpayne@69 3694 #if CYTHON_USE_MODULE_STATE
jpayne@69 3695 #endif
jpayne@69 3696 PyTypeObject *__pyx_ptype_7cpython_5array_array;
jpayne@69 3697 #if CYTHON_USE_MODULE_STATE
jpayne@69 3698 #endif
jpayne@69 3699 #if CYTHON_USE_MODULE_STATE
jpayne@69 3700 #endif
jpayne@69 3701 PyTypeObject *__pyx_ptype_5pysam_10libchtslib_HTSFile;
jpayne@69 3702 #if CYTHON_USE_MODULE_STATE
jpayne@69 3703 #endif
jpayne@69 3704 #if CYTHON_USE_MODULE_STATE
jpayne@69 3705 #endif
jpayne@69 3706 #if CYTHON_USE_MODULE_STATE
jpayne@69 3707 PyObject *__pyx_type_5pysam_9libcfaidx_FastaFile;
jpayne@69 3708 PyObject *__pyx_type_5pysam_9libcfaidx_FastqProxy;
jpayne@69 3709 PyObject *__pyx_type_5pysam_9libcfaidx_FastxRecord;
jpayne@69 3710 PyObject *__pyx_type_5pysam_9libcfaidx_FastxFile;
jpayne@69 3711 PyObject *__pyx_type_5pysam_9libcfaidx_FastqFile;
jpayne@69 3712 PyObject *__pyx_type_5pysam_9libcfaidx_Fastafile;
jpayne@69 3713 #endif
jpayne@69 3714 PyTypeObject *__pyx_ptype_5pysam_9libcfaidx_FastaFile;
jpayne@69 3715 PyTypeObject *__pyx_ptype_5pysam_9libcfaidx_FastqProxy;
jpayne@69 3716 PyTypeObject *__pyx_ptype_5pysam_9libcfaidx_FastxRecord;
jpayne@69 3717 PyTypeObject *__pyx_ptype_5pysam_9libcfaidx_FastxFile;
jpayne@69 3718 PyTypeObject *__pyx_ptype_5pysam_9libcfaidx_FastqFile;
jpayne@69 3719 PyTypeObject *__pyx_ptype_5pysam_9libcfaidx_Fastafile;
jpayne@69 3720 PyObject *__pyx_n_s_FastaFile;
jpayne@69 3721 PyObject *__pyx_n_u_FastaFile;
jpayne@69 3722 PyObject *__pyx_n_s_FastaFile___enter;
jpayne@69 3723 PyObject *__pyx_n_s_FastaFile___exit;
jpayne@69 3724 PyObject *__pyx_n_s_FastaFile___reduce_cython;
jpayne@69 3725 PyObject *__pyx_n_s_FastaFile___setstate_cython;
jpayne@69 3726 PyObject *__pyx_n_s_FastaFile__open;
jpayne@69 3727 PyObject *__pyx_n_s_FastaFile_close;
jpayne@69 3728 PyObject *__pyx_n_s_FastaFile_fetch;
jpayne@69 3729 PyObject *__pyx_n_s_FastaFile_get_reference_length;
jpayne@69 3730 PyObject *__pyx_n_s_FastaFile_is_open;
jpayne@69 3731 PyObject *__pyx_n_s_Fastafile;
jpayne@69 3732 PyObject *__pyx_n_u_Fastafile;
jpayne@69 3733 PyObject *__pyx_n_s_Fastafile___reduce_cython;
jpayne@69 3734 PyObject *__pyx_n_s_Fastafile___setstate_cython;
jpayne@69 3735 PyObject *__pyx_n_s_FastqFile;
jpayne@69 3736 PyObject *__pyx_n_u_FastqFile;
jpayne@69 3737 PyObject *__pyx_n_s_FastqFile___reduce_cython;
jpayne@69 3738 PyObject *__pyx_n_s_FastqFile___setstate_cython;
jpayne@69 3739 PyObject *__pyx_n_s_FastqProxy;
jpayne@69 3740 PyObject *__pyx_n_u_FastqProxy;
jpayne@69 3741 PyObject *__pyx_n_s_FastqProxy___reduce_cython;
jpayne@69 3742 PyObject *__pyx_n_s_FastqProxy___setstate_cython;
jpayne@69 3743 PyObject *__pyx_n_s_FastqProxy_get_quality_array;
jpayne@69 3744 PyObject *__pyx_n_s_FastxFile;
jpayne@69 3745 PyObject *__pyx_n_u_FastxFile;
jpayne@69 3746 PyObject *__pyx_n_s_FastxFile___enter;
jpayne@69 3747 PyObject *__pyx_n_s_FastxFile___exit;
jpayne@69 3748 PyObject *__pyx_n_s_FastxFile___reduce_cython;
jpayne@69 3749 PyObject *__pyx_n_s_FastxFile___setstate_cython;
jpayne@69 3750 PyObject *__pyx_n_s_FastxFile__open;
jpayne@69 3751 PyObject *__pyx_n_s_FastxFile_close;
jpayne@69 3752 PyObject *__pyx_n_s_FastxFile_is_open;
jpayne@69 3753 PyObject *__pyx_n_s_FastxRecord;
jpayne@69 3754 PyObject *__pyx_n_u_FastxRecord;
jpayne@69 3755 PyObject *__pyx_n_s_FastxRecord___copy;
jpayne@69 3756 PyObject *__pyx_n_s_FastxRecord___deepcopy;
jpayne@69 3757 PyObject *__pyx_n_s_FastxRecord___reduce_cython;
jpayne@69 3758 PyObject *__pyx_n_s_FastxRecord___setstate_cython;
jpayne@69 3759 PyObject *__pyx_n_s_FastxRecord_get_quality_array;
jpayne@69 3760 PyObject *__pyx_kp_u_FastxRecord_must_have_a_name_and;
jpayne@69 3761 PyObject *__pyx_n_s_FastxRecord_set_comment;
jpayne@69 3762 PyObject *__pyx_n_s_FastxRecord_set_name;
jpayne@69 3763 PyObject *__pyx_n_s_FastxRecord_set_sequence;
jpayne@69 3764 PyObject *__pyx_n_s_IOError;
jpayne@69 3765 PyObject *__pyx_kp_u_I_O_operation_on_closed_file;
jpayne@69 3766 PyObject *__pyx_kp_s_Incompatible_checksums_0x_x_vs_0;
jpayne@69 3767 PyObject *__pyx_n_s_KeyError;
jpayne@69 3768 PyObject *__pyx_n_s_MemoryError;
jpayne@69 3769 PyObject *__pyx_kp_u_None;
jpayne@69 3770 PyObject *__pyx_n_s_PickleError;
jpayne@69 3771 PyObject *__pyx_n_s_StopIteration;
jpayne@69 3772 PyObject *__pyx_n_s_TypeError;
jpayne@69 3773 PyObject *__pyx_n_s_ValueError;
jpayne@69 3774 PyObject *__pyx_kp_u__11;
jpayne@69 3775 PyObject *__pyx_kp_u__16;
jpayne@69 3776 PyObject *__pyx_kp_u__17;
jpayne@69 3777 PyObject *__pyx_kp_u__18;
jpayne@69 3778 PyObject *__pyx_kp_u__19;
jpayne@69 3779 PyObject *__pyx_kp_b__4;
jpayne@69 3780 PyObject *__pyx_kp_u__47;
jpayne@69 3781 PyObject *__pyx_n_s__48;
jpayne@69 3782 PyObject *__pyx_n_s__68;
jpayne@69 3783 PyObject *__pyx_n_s_all;
jpayne@69 3784 PyObject *__pyx_n_s_append;
jpayne@69 3785 PyObject *__pyx_n_s_asyncio_coroutines;
jpayne@69 3786 PyObject *__pyx_n_s_bindex_filename;
jpayne@69 3787 PyObject *__pyx_n_s_bindex_filename_compressed;
jpayne@69 3788 PyObject *__pyx_kp_u_calling_len_on_closed_file;
jpayne@69 3789 PyObject *__pyx_kp_u_can_not_write_record_without_a_s;
jpayne@69 3790 PyObject *__pyx_kp_u_can_not_write_record_without_nam;
jpayne@69 3791 PyObject *__pyx_n_s_cfilename;
jpayne@69 3792 PyObject *__pyx_n_s_cindexname;
jpayne@69 3793 PyObject *__pyx_n_s_cindexname_compressed;
jpayne@69 3794 PyObject *__pyx_n_s_class_getitem;
jpayne@69 3795 PyObject *__pyx_n_s_cline_in_traceback;
jpayne@69 3796 PyObject *__pyx_n_s_close;
jpayne@69 3797 PyObject *__pyx_n_s_comment;
jpayne@69 3798 PyObject *__pyx_n_s_contig;
jpayne@69 3799 PyObject *__pyx_n_s_contig_b;
jpayne@69 3800 PyObject *__pyx_n_s_copy;
jpayne@69 3801 PyObject *__pyx_n_s_deepcopy;
jpayne@69 3802 PyObject *__pyx_n_s_dict;
jpayne@69 3803 PyObject *__pyx_n_s_dict_2;
jpayne@69 3804 PyObject *__pyx_kp_u_disable;
jpayne@69 3805 PyObject *__pyx_kp_u_do_not_instantiate_FastqProxy_di;
jpayne@69 3806 PyObject *__pyx_kp_u_enable;
jpayne@69 3807 PyObject *__pyx_n_s_end;
jpayne@69 3808 PyObject *__pyx_n_s_enter;
jpayne@69 3809 PyObject *__pyx_kp_u_error_when_opening_file_s;
jpayne@69 3810 PyObject *__pyx_n_s_exc_type;
jpayne@69 3811 PyObject *__pyx_n_s_exc_value;
jpayne@69 3812 PyObject *__pyx_n_s_exists;
jpayne@69 3813 PyObject *__pyx_n_s_exit;
jpayne@69 3814 PyObject *__pyx_kp_u_failure_when_retrieving_sequence;
jpayne@69 3815 PyObject *__pyx_n_s_fetch;
jpayne@69 3816 PyObject *__pyx_kp_u_file_s_not_found;
jpayne@69 3817 PyObject *__pyx_n_s_filename;
jpayne@69 3818 PyObject *__pyx_kp_u_filename_does_not_exist;
jpayne@69 3819 PyObject *__pyx_n_s_filepath_index;
jpayne@69 3820 PyObject *__pyx_n_s_filepath_index_compressed;
jpayne@69 3821 PyObject *__pyx_n_s_format;
jpayne@69 3822 PyObject *__pyx_kp_u_gc;
jpayne@69 3823 PyObject *__pyx_n_s_get_quality_array;
jpayne@69 3824 PyObject *__pyx_n_s_get_reference_length;
jpayne@69 3825 PyObject *__pyx_n_s_getstate;
jpayne@69 3826 PyObject *__pyx_n_s_import;
jpayne@69 3827 PyObject *__pyx_n_s_initializing;
jpayne@69 3828 PyObject *__pyx_n_s_is_coroutine;
jpayne@69 3829 PyObject *__pyx_n_s_is_open;
jpayne@69 3830 PyObject *__pyx_kp_u_isenabled;
jpayne@69 3831 PyObject *__pyx_n_s_length;
jpayne@69 3832 PyObject *__pyx_n_s_main;
jpayne@69 3833 PyObject *__pyx_n_s_memo;
jpayne@69 3834 PyObject *__pyx_n_s_name;
jpayne@69 3835 PyObject *__pyx_n_s_name_2;
jpayne@69 3836 PyObject *__pyx_n_s_new;
jpayne@69 3837 PyObject *__pyx_kp_s_no_default___reduce___due_to_non;
jpayne@69 3838 PyObject *__pyx_kp_u_no_sequence_region_supplied;
jpayne@69 3839 PyObject *__pyx_n_s_nreferences;
jpayne@69 3840 PyObject *__pyx_n_s_offset;
jpayne@69 3841 PyObject *__pyx_n_s_open;
jpayne@69 3842 PyObject *__pyx_n_s_os;
jpayne@69 3843 PyObject *__pyx_n_s_path;
jpayne@69 3844 PyObject *__pyx_n_s_persist;
jpayne@69 3845 PyObject *__pyx_n_s_pickle;
jpayne@69 3846 PyObject *__pyx_n_s_proxy;
jpayne@69 3847 PyObject *__pyx_n_s_pysam_libcfaidx;
jpayne@69 3848 PyObject *__pyx_kp_s_pysam_libcfaidx_pyx;
jpayne@69 3849 PyObject *__pyx_n_s_pyx_PickleError;
jpayne@69 3850 PyObject *__pyx_n_s_pyx_checksum;
jpayne@69 3851 PyObject *__pyx_n_s_pyx_result;
jpayne@69 3852 PyObject *__pyx_n_s_pyx_state;
jpayne@69 3853 PyObject *__pyx_n_s_pyx_type;
jpayne@69 3854 PyObject *__pyx_n_s_pyx_unpickle_FastxRecord;
jpayne@69 3855 PyObject *__pyx_n_s_pyx_vtable;
jpayne@69 3856 PyObject *__pyx_n_s_quality;
jpayne@69 3857 PyObject *__pyx_n_s_re;
jpayne@69 3858 PyObject *__pyx_n_s_reduce;
jpayne@69 3859 PyObject *__pyx_n_s_reduce_cython;
jpayne@69 3860 PyObject *__pyx_n_s_reduce_ex;
jpayne@69 3861 PyObject *__pyx_n_s_ref;
jpayne@69 3862 PyObject *__pyx_n_s_reference;
jpayne@69 3863 PyObject *__pyx_n_s_references;
jpayne@69 3864 PyObject *__pyx_n_s_region;
jpayne@69 3865 PyObject *__pyx_n_s_rend;
jpayne@69 3866 PyObject *__pyx_n_s_rstart;
jpayne@69 3867 PyObject *__pyx_kp_u_s;
jpayne@69 3868 PyObject *__pyx_n_s_s_2;
jpayne@69 3869 PyObject *__pyx_n_s_self;
jpayne@69 3870 PyObject *__pyx_kp_s_self__delegate_cannot_be_convert;
jpayne@69 3871 PyObject *__pyx_n_s_seq;
jpayne@69 3872 PyObject *__pyx_n_s_sequence;
jpayne@69 3873 PyObject *__pyx_kp_u_sequence_and_quality_length_do_n;
jpayne@69 3874 PyObject *__pyx_kp_u_sequence_s_not_present;
jpayne@69 3875 PyObject *__pyx_n_s_set_comment;
jpayne@69 3876 PyObject *__pyx_n_s_set_name;
jpayne@69 3877 PyObject *__pyx_n_s_set_sequence;
jpayne@69 3878 PyObject *__pyx_n_s_setstate;
jpayne@69 3879 PyObject *__pyx_n_s_setstate_cython;
jpayne@69 3880 PyObject *__pyx_n_s_spec;
jpayne@69 3881 PyObject *__pyx_n_s_ss;
jpayne@69 3882 PyObject *__pyx_n_s_start;
jpayne@69 3883 PyObject *__pyx_n_s_state;
jpayne@69 3884 PyObject *__pyx_kp_s_stringsource;
jpayne@69 3885 PyObject *__pyx_n_s_sys;
jpayne@69 3886 PyObject *__pyx_n_s_test;
jpayne@69 3887 PyObject *__pyx_n_s_traceback;
jpayne@69 3888 PyObject *__pyx_kp_u_truncated_quality_string_in_0;
jpayne@69 3889 PyObject *__pyx_kp_u_unknown_problem_parsing_0;
jpayne@69 3890 PyObject *__pyx_n_s_update;
jpayne@69 3891 PyObject *__pyx_n_s_use_setstate;
jpayne@69 3892 PyObject *__pyx_n_s_x;
jpayne@69 3893 PyObject *__pyx_n_s_zip;
jpayne@69 3894 PyObject *__pyx_int_33;
jpayne@69 3895 PyObject *__pyx_int_29210129;
jpayne@69 3896 PyObject *__pyx_int_71291217;
jpayne@69 3897 PyObject *__pyx_int_191400582;
jpayne@69 3898 PyObject *__pyx_codeobj_;
jpayne@69 3899 PyObject *__pyx_tuple__2;
jpayne@69 3900 PyObject *__pyx_tuple__9;
jpayne@69 3901 PyObject *__pyx_tuple__10;
jpayne@69 3902 PyObject *__pyx_tuple__15;
jpayne@69 3903 PyObject *__pyx_tuple__25;
jpayne@69 3904 PyObject *__pyx_tuple__26;
jpayne@69 3905 PyObject *__pyx_tuple__28;
jpayne@69 3906 PyObject *__pyx_tuple__46;
jpayne@69 3907 PyObject *__pyx_tuple__49;
jpayne@69 3908 PyObject *__pyx_tuple__50;
jpayne@69 3909 PyObject *__pyx_tuple__51;
jpayne@69 3910 PyObject *__pyx_tuple__52;
jpayne@69 3911 PyObject *__pyx_tuple__53;
jpayne@69 3912 PyObject *__pyx_tuple__54;
jpayne@69 3913 PyObject *__pyx_tuple__55;
jpayne@69 3914 PyObject *__pyx_tuple__56;
jpayne@69 3915 PyObject *__pyx_tuple__57;
jpayne@69 3916 PyObject *__pyx_tuple__58;
jpayne@69 3917 PyObject *__pyx_tuple__59;
jpayne@69 3918 PyObject *__pyx_tuple__60;
jpayne@69 3919 PyObject *__pyx_tuple__61;
jpayne@69 3920 PyObject *__pyx_tuple__62;
jpayne@69 3921 PyObject *__pyx_tuple__63;
jpayne@69 3922 PyObject *__pyx_tuple__64;
jpayne@69 3923 PyObject *__pyx_tuple__65;
jpayne@69 3924 PyObject *__pyx_tuple__66;
jpayne@69 3925 PyObject *__pyx_tuple__67;
jpayne@69 3926 PyObject *__pyx_codeobj__3;
jpayne@69 3927 PyObject *__pyx_codeobj__5;
jpayne@69 3928 PyObject *__pyx_codeobj__6;
jpayne@69 3929 PyObject *__pyx_codeobj__7;
jpayne@69 3930 PyObject *__pyx_codeobj__8;
jpayne@69 3931 PyObject *__pyx_codeobj__12;
jpayne@69 3932 PyObject *__pyx_codeobj__13;
jpayne@69 3933 PyObject *__pyx_codeobj__14;
jpayne@69 3934 PyObject *__pyx_codeobj__20;
jpayne@69 3935 PyObject *__pyx_codeobj__21;
jpayne@69 3936 PyObject *__pyx_codeobj__22;
jpayne@69 3937 PyObject *__pyx_codeobj__23;
jpayne@69 3938 PyObject *__pyx_codeobj__24;
jpayne@69 3939 PyObject *__pyx_codeobj__27;
jpayne@69 3940 PyObject *__pyx_codeobj__29;
jpayne@69 3941 PyObject *__pyx_codeobj__30;
jpayne@69 3942 PyObject *__pyx_codeobj__31;
jpayne@69 3943 PyObject *__pyx_codeobj__32;
jpayne@69 3944 PyObject *__pyx_codeobj__33;
jpayne@69 3945 PyObject *__pyx_codeobj__34;
jpayne@69 3946 PyObject *__pyx_codeobj__35;
jpayne@69 3947 PyObject *__pyx_codeobj__36;
jpayne@69 3948 PyObject *__pyx_codeobj__37;
jpayne@69 3949 PyObject *__pyx_codeobj__38;
jpayne@69 3950 PyObject *__pyx_codeobj__39;
jpayne@69 3951 PyObject *__pyx_codeobj__40;
jpayne@69 3952 PyObject *__pyx_codeobj__41;
jpayne@69 3953 PyObject *__pyx_codeobj__42;
jpayne@69 3954 PyObject *__pyx_codeobj__43;
jpayne@69 3955 PyObject *__pyx_codeobj__44;
jpayne@69 3956 PyObject *__pyx_codeobj__45;
jpayne@69 3957 } __pyx_mstate;
jpayne@69 3958
jpayne@69 3959 #if CYTHON_USE_MODULE_STATE
jpayne@69 3960 #ifdef __cplusplus
jpayne@69 3961 namespace {
jpayne@69 3962 extern struct PyModuleDef __pyx_moduledef;
jpayne@69 3963 } /* anonymous namespace */
jpayne@69 3964 #else
jpayne@69 3965 static struct PyModuleDef __pyx_moduledef;
jpayne@69 3966 #endif
jpayne@69 3967
jpayne@69 3968 #define __pyx_mstate(o) ((__pyx_mstate *)__Pyx_PyModule_GetState(o))
jpayne@69 3969
jpayne@69 3970 #define __pyx_mstate_global (__pyx_mstate(PyState_FindModule(&__pyx_moduledef)))
jpayne@69 3971
jpayne@69 3972 #define __pyx_m (PyState_FindModule(&__pyx_moduledef))
jpayne@69 3973 #else
jpayne@69 3974 static __pyx_mstate __pyx_mstate_global_static =
jpayne@69 3975 #ifdef __cplusplus
jpayne@69 3976 {};
jpayne@69 3977 #else
jpayne@69 3978 {0};
jpayne@69 3979 #endif
jpayne@69 3980 static __pyx_mstate *__pyx_mstate_global = &__pyx_mstate_global_static;
jpayne@69 3981 #endif
jpayne@69 3982 /* #### Code section: module_state_clear ### */
jpayne@69 3983 #if CYTHON_USE_MODULE_STATE
jpayne@69 3984 static int __pyx_m_clear(PyObject *m) {
jpayne@69 3985 __pyx_mstate *clear_module_state = __pyx_mstate(m);
jpayne@69 3986 if (!clear_module_state) return 0;
jpayne@69 3987 Py_CLEAR(clear_module_state->__pyx_d);
jpayne@69 3988 Py_CLEAR(clear_module_state->__pyx_b);
jpayne@69 3989 Py_CLEAR(clear_module_state->__pyx_cython_runtime);
jpayne@69 3990 Py_CLEAR(clear_module_state->__pyx_empty_tuple);
jpayne@69 3991 Py_CLEAR(clear_module_state->__pyx_empty_bytes);
jpayne@69 3992 Py_CLEAR(clear_module_state->__pyx_empty_unicode);
jpayne@69 3993 #ifdef __Pyx_CyFunction_USED
jpayne@69 3994 Py_CLEAR(clear_module_state->__pyx_CyFunctionType);
jpayne@69 3995 #endif
jpayne@69 3996 #ifdef __Pyx_FusedFunction_USED
jpayne@69 3997 Py_CLEAR(clear_module_state->__pyx_FusedFunctionType);
jpayne@69 3998 #endif
jpayne@69 3999 Py_CLEAR(clear_module_state->__pyx_ptype_7cpython_4type_type);
jpayne@69 4000 Py_CLEAR(clear_module_state->__pyx_ptype_7cpython_4bool_bool);
jpayne@69 4001 Py_CLEAR(clear_module_state->__pyx_ptype_7cpython_7complex_complex);
jpayne@69 4002 Py_CLEAR(clear_module_state->__pyx_ptype_7cpython_5array_array);
jpayne@69 4003 Py_CLEAR(clear_module_state->__pyx_ptype_5pysam_10libchtslib_HTSFile);
jpayne@69 4004 Py_CLEAR(clear_module_state->__pyx_ptype_5pysam_9libcfaidx_FastaFile);
jpayne@69 4005 Py_CLEAR(clear_module_state->__pyx_type_5pysam_9libcfaidx_FastaFile);
jpayne@69 4006 Py_CLEAR(clear_module_state->__pyx_ptype_5pysam_9libcfaidx_FastqProxy);
jpayne@69 4007 Py_CLEAR(clear_module_state->__pyx_type_5pysam_9libcfaidx_FastqProxy);
jpayne@69 4008 Py_CLEAR(clear_module_state->__pyx_ptype_5pysam_9libcfaidx_FastxRecord);
jpayne@69 4009 Py_CLEAR(clear_module_state->__pyx_type_5pysam_9libcfaidx_FastxRecord);
jpayne@69 4010 Py_CLEAR(clear_module_state->__pyx_ptype_5pysam_9libcfaidx_FastxFile);
jpayne@69 4011 Py_CLEAR(clear_module_state->__pyx_type_5pysam_9libcfaidx_FastxFile);
jpayne@69 4012 Py_CLEAR(clear_module_state->__pyx_ptype_5pysam_9libcfaidx_FastqFile);
jpayne@69 4013 Py_CLEAR(clear_module_state->__pyx_type_5pysam_9libcfaidx_FastqFile);
jpayne@69 4014 Py_CLEAR(clear_module_state->__pyx_ptype_5pysam_9libcfaidx_Fastafile);
jpayne@69 4015 Py_CLEAR(clear_module_state->__pyx_type_5pysam_9libcfaidx_Fastafile);
jpayne@69 4016 Py_CLEAR(clear_module_state->__pyx_n_s_FastaFile);
jpayne@69 4017 Py_CLEAR(clear_module_state->__pyx_n_u_FastaFile);
jpayne@69 4018 Py_CLEAR(clear_module_state->__pyx_n_s_FastaFile___enter);
jpayne@69 4019 Py_CLEAR(clear_module_state->__pyx_n_s_FastaFile___exit);
jpayne@69 4020 Py_CLEAR(clear_module_state->__pyx_n_s_FastaFile___reduce_cython);
jpayne@69 4021 Py_CLEAR(clear_module_state->__pyx_n_s_FastaFile___setstate_cython);
jpayne@69 4022 Py_CLEAR(clear_module_state->__pyx_n_s_FastaFile__open);
jpayne@69 4023 Py_CLEAR(clear_module_state->__pyx_n_s_FastaFile_close);
jpayne@69 4024 Py_CLEAR(clear_module_state->__pyx_n_s_FastaFile_fetch);
jpayne@69 4025 Py_CLEAR(clear_module_state->__pyx_n_s_FastaFile_get_reference_length);
jpayne@69 4026 Py_CLEAR(clear_module_state->__pyx_n_s_FastaFile_is_open);
jpayne@69 4027 Py_CLEAR(clear_module_state->__pyx_n_s_Fastafile);
jpayne@69 4028 Py_CLEAR(clear_module_state->__pyx_n_u_Fastafile);
jpayne@69 4029 Py_CLEAR(clear_module_state->__pyx_n_s_Fastafile___reduce_cython);
jpayne@69 4030 Py_CLEAR(clear_module_state->__pyx_n_s_Fastafile___setstate_cython);
jpayne@69 4031 Py_CLEAR(clear_module_state->__pyx_n_s_FastqFile);
jpayne@69 4032 Py_CLEAR(clear_module_state->__pyx_n_u_FastqFile);
jpayne@69 4033 Py_CLEAR(clear_module_state->__pyx_n_s_FastqFile___reduce_cython);
jpayne@69 4034 Py_CLEAR(clear_module_state->__pyx_n_s_FastqFile___setstate_cython);
jpayne@69 4035 Py_CLEAR(clear_module_state->__pyx_n_s_FastqProxy);
jpayne@69 4036 Py_CLEAR(clear_module_state->__pyx_n_u_FastqProxy);
jpayne@69 4037 Py_CLEAR(clear_module_state->__pyx_n_s_FastqProxy___reduce_cython);
jpayne@69 4038 Py_CLEAR(clear_module_state->__pyx_n_s_FastqProxy___setstate_cython);
jpayne@69 4039 Py_CLEAR(clear_module_state->__pyx_n_s_FastqProxy_get_quality_array);
jpayne@69 4040 Py_CLEAR(clear_module_state->__pyx_n_s_FastxFile);
jpayne@69 4041 Py_CLEAR(clear_module_state->__pyx_n_u_FastxFile);
jpayne@69 4042 Py_CLEAR(clear_module_state->__pyx_n_s_FastxFile___enter);
jpayne@69 4043 Py_CLEAR(clear_module_state->__pyx_n_s_FastxFile___exit);
jpayne@69 4044 Py_CLEAR(clear_module_state->__pyx_n_s_FastxFile___reduce_cython);
jpayne@69 4045 Py_CLEAR(clear_module_state->__pyx_n_s_FastxFile___setstate_cython);
jpayne@69 4046 Py_CLEAR(clear_module_state->__pyx_n_s_FastxFile__open);
jpayne@69 4047 Py_CLEAR(clear_module_state->__pyx_n_s_FastxFile_close);
jpayne@69 4048 Py_CLEAR(clear_module_state->__pyx_n_s_FastxFile_is_open);
jpayne@69 4049 Py_CLEAR(clear_module_state->__pyx_n_s_FastxRecord);
jpayne@69 4050 Py_CLEAR(clear_module_state->__pyx_n_u_FastxRecord);
jpayne@69 4051 Py_CLEAR(clear_module_state->__pyx_n_s_FastxRecord___copy);
jpayne@69 4052 Py_CLEAR(clear_module_state->__pyx_n_s_FastxRecord___deepcopy);
jpayne@69 4053 Py_CLEAR(clear_module_state->__pyx_n_s_FastxRecord___reduce_cython);
jpayne@69 4054 Py_CLEAR(clear_module_state->__pyx_n_s_FastxRecord___setstate_cython);
jpayne@69 4055 Py_CLEAR(clear_module_state->__pyx_n_s_FastxRecord_get_quality_array);
jpayne@69 4056 Py_CLEAR(clear_module_state->__pyx_kp_u_FastxRecord_must_have_a_name_and);
jpayne@69 4057 Py_CLEAR(clear_module_state->__pyx_n_s_FastxRecord_set_comment);
jpayne@69 4058 Py_CLEAR(clear_module_state->__pyx_n_s_FastxRecord_set_name);
jpayne@69 4059 Py_CLEAR(clear_module_state->__pyx_n_s_FastxRecord_set_sequence);
jpayne@69 4060 Py_CLEAR(clear_module_state->__pyx_n_s_IOError);
jpayne@69 4061 Py_CLEAR(clear_module_state->__pyx_kp_u_I_O_operation_on_closed_file);
jpayne@69 4062 Py_CLEAR(clear_module_state->__pyx_kp_s_Incompatible_checksums_0x_x_vs_0);
jpayne@69 4063 Py_CLEAR(clear_module_state->__pyx_n_s_KeyError);
jpayne@69 4064 Py_CLEAR(clear_module_state->__pyx_n_s_MemoryError);
jpayne@69 4065 Py_CLEAR(clear_module_state->__pyx_kp_u_None);
jpayne@69 4066 Py_CLEAR(clear_module_state->__pyx_n_s_PickleError);
jpayne@69 4067 Py_CLEAR(clear_module_state->__pyx_n_s_StopIteration);
jpayne@69 4068 Py_CLEAR(clear_module_state->__pyx_n_s_TypeError);
jpayne@69 4069 Py_CLEAR(clear_module_state->__pyx_n_s_ValueError);
jpayne@69 4070 Py_CLEAR(clear_module_state->__pyx_kp_u__11);
jpayne@69 4071 Py_CLEAR(clear_module_state->__pyx_kp_u__16);
jpayne@69 4072 Py_CLEAR(clear_module_state->__pyx_kp_u__17);
jpayne@69 4073 Py_CLEAR(clear_module_state->__pyx_kp_u__18);
jpayne@69 4074 Py_CLEAR(clear_module_state->__pyx_kp_u__19);
jpayne@69 4075 Py_CLEAR(clear_module_state->__pyx_kp_b__4);
jpayne@69 4076 Py_CLEAR(clear_module_state->__pyx_kp_u__47);
jpayne@69 4077 Py_CLEAR(clear_module_state->__pyx_n_s__48);
jpayne@69 4078 Py_CLEAR(clear_module_state->__pyx_n_s__68);
jpayne@69 4079 Py_CLEAR(clear_module_state->__pyx_n_s_all);
jpayne@69 4080 Py_CLEAR(clear_module_state->__pyx_n_s_append);
jpayne@69 4081 Py_CLEAR(clear_module_state->__pyx_n_s_asyncio_coroutines);
jpayne@69 4082 Py_CLEAR(clear_module_state->__pyx_n_s_bindex_filename);
jpayne@69 4083 Py_CLEAR(clear_module_state->__pyx_n_s_bindex_filename_compressed);
jpayne@69 4084 Py_CLEAR(clear_module_state->__pyx_kp_u_calling_len_on_closed_file);
jpayne@69 4085 Py_CLEAR(clear_module_state->__pyx_kp_u_can_not_write_record_without_a_s);
jpayne@69 4086 Py_CLEAR(clear_module_state->__pyx_kp_u_can_not_write_record_without_nam);
jpayne@69 4087 Py_CLEAR(clear_module_state->__pyx_n_s_cfilename);
jpayne@69 4088 Py_CLEAR(clear_module_state->__pyx_n_s_cindexname);
jpayne@69 4089 Py_CLEAR(clear_module_state->__pyx_n_s_cindexname_compressed);
jpayne@69 4090 Py_CLEAR(clear_module_state->__pyx_n_s_class_getitem);
jpayne@69 4091 Py_CLEAR(clear_module_state->__pyx_n_s_cline_in_traceback);
jpayne@69 4092 Py_CLEAR(clear_module_state->__pyx_n_s_close);
jpayne@69 4093 Py_CLEAR(clear_module_state->__pyx_n_s_comment);
jpayne@69 4094 Py_CLEAR(clear_module_state->__pyx_n_s_contig);
jpayne@69 4095 Py_CLEAR(clear_module_state->__pyx_n_s_contig_b);
jpayne@69 4096 Py_CLEAR(clear_module_state->__pyx_n_s_copy);
jpayne@69 4097 Py_CLEAR(clear_module_state->__pyx_n_s_deepcopy);
jpayne@69 4098 Py_CLEAR(clear_module_state->__pyx_n_s_dict);
jpayne@69 4099 Py_CLEAR(clear_module_state->__pyx_n_s_dict_2);
jpayne@69 4100 Py_CLEAR(clear_module_state->__pyx_kp_u_disable);
jpayne@69 4101 Py_CLEAR(clear_module_state->__pyx_kp_u_do_not_instantiate_FastqProxy_di);
jpayne@69 4102 Py_CLEAR(clear_module_state->__pyx_kp_u_enable);
jpayne@69 4103 Py_CLEAR(clear_module_state->__pyx_n_s_end);
jpayne@69 4104 Py_CLEAR(clear_module_state->__pyx_n_s_enter);
jpayne@69 4105 Py_CLEAR(clear_module_state->__pyx_kp_u_error_when_opening_file_s);
jpayne@69 4106 Py_CLEAR(clear_module_state->__pyx_n_s_exc_type);
jpayne@69 4107 Py_CLEAR(clear_module_state->__pyx_n_s_exc_value);
jpayne@69 4108 Py_CLEAR(clear_module_state->__pyx_n_s_exists);
jpayne@69 4109 Py_CLEAR(clear_module_state->__pyx_n_s_exit);
jpayne@69 4110 Py_CLEAR(clear_module_state->__pyx_kp_u_failure_when_retrieving_sequence);
jpayne@69 4111 Py_CLEAR(clear_module_state->__pyx_n_s_fetch);
jpayne@69 4112 Py_CLEAR(clear_module_state->__pyx_kp_u_file_s_not_found);
jpayne@69 4113 Py_CLEAR(clear_module_state->__pyx_n_s_filename);
jpayne@69 4114 Py_CLEAR(clear_module_state->__pyx_kp_u_filename_does_not_exist);
jpayne@69 4115 Py_CLEAR(clear_module_state->__pyx_n_s_filepath_index);
jpayne@69 4116 Py_CLEAR(clear_module_state->__pyx_n_s_filepath_index_compressed);
jpayne@69 4117 Py_CLEAR(clear_module_state->__pyx_n_s_format);
jpayne@69 4118 Py_CLEAR(clear_module_state->__pyx_kp_u_gc);
jpayne@69 4119 Py_CLEAR(clear_module_state->__pyx_n_s_get_quality_array);
jpayne@69 4120 Py_CLEAR(clear_module_state->__pyx_n_s_get_reference_length);
jpayne@69 4121 Py_CLEAR(clear_module_state->__pyx_n_s_getstate);
jpayne@69 4122 Py_CLEAR(clear_module_state->__pyx_n_s_import);
jpayne@69 4123 Py_CLEAR(clear_module_state->__pyx_n_s_initializing);
jpayne@69 4124 Py_CLEAR(clear_module_state->__pyx_n_s_is_coroutine);
jpayne@69 4125 Py_CLEAR(clear_module_state->__pyx_n_s_is_open);
jpayne@69 4126 Py_CLEAR(clear_module_state->__pyx_kp_u_isenabled);
jpayne@69 4127 Py_CLEAR(clear_module_state->__pyx_n_s_length);
jpayne@69 4128 Py_CLEAR(clear_module_state->__pyx_n_s_main);
jpayne@69 4129 Py_CLEAR(clear_module_state->__pyx_n_s_memo);
jpayne@69 4130 Py_CLEAR(clear_module_state->__pyx_n_s_name);
jpayne@69 4131 Py_CLEAR(clear_module_state->__pyx_n_s_name_2);
jpayne@69 4132 Py_CLEAR(clear_module_state->__pyx_n_s_new);
jpayne@69 4133 Py_CLEAR(clear_module_state->__pyx_kp_s_no_default___reduce___due_to_non);
jpayne@69 4134 Py_CLEAR(clear_module_state->__pyx_kp_u_no_sequence_region_supplied);
jpayne@69 4135 Py_CLEAR(clear_module_state->__pyx_n_s_nreferences);
jpayne@69 4136 Py_CLEAR(clear_module_state->__pyx_n_s_offset);
jpayne@69 4137 Py_CLEAR(clear_module_state->__pyx_n_s_open);
jpayne@69 4138 Py_CLEAR(clear_module_state->__pyx_n_s_os);
jpayne@69 4139 Py_CLEAR(clear_module_state->__pyx_n_s_path);
jpayne@69 4140 Py_CLEAR(clear_module_state->__pyx_n_s_persist);
jpayne@69 4141 Py_CLEAR(clear_module_state->__pyx_n_s_pickle);
jpayne@69 4142 Py_CLEAR(clear_module_state->__pyx_n_s_proxy);
jpayne@69 4143 Py_CLEAR(clear_module_state->__pyx_n_s_pysam_libcfaidx);
jpayne@69 4144 Py_CLEAR(clear_module_state->__pyx_kp_s_pysam_libcfaidx_pyx);
jpayne@69 4145 Py_CLEAR(clear_module_state->__pyx_n_s_pyx_PickleError);
jpayne@69 4146 Py_CLEAR(clear_module_state->__pyx_n_s_pyx_checksum);
jpayne@69 4147 Py_CLEAR(clear_module_state->__pyx_n_s_pyx_result);
jpayne@69 4148 Py_CLEAR(clear_module_state->__pyx_n_s_pyx_state);
jpayne@69 4149 Py_CLEAR(clear_module_state->__pyx_n_s_pyx_type);
jpayne@69 4150 Py_CLEAR(clear_module_state->__pyx_n_s_pyx_unpickle_FastxRecord);
jpayne@69 4151 Py_CLEAR(clear_module_state->__pyx_n_s_pyx_vtable);
jpayne@69 4152 Py_CLEAR(clear_module_state->__pyx_n_s_quality);
jpayne@69 4153 Py_CLEAR(clear_module_state->__pyx_n_s_re);
jpayne@69 4154 Py_CLEAR(clear_module_state->__pyx_n_s_reduce);
jpayne@69 4155 Py_CLEAR(clear_module_state->__pyx_n_s_reduce_cython);
jpayne@69 4156 Py_CLEAR(clear_module_state->__pyx_n_s_reduce_ex);
jpayne@69 4157 Py_CLEAR(clear_module_state->__pyx_n_s_ref);
jpayne@69 4158 Py_CLEAR(clear_module_state->__pyx_n_s_reference);
jpayne@69 4159 Py_CLEAR(clear_module_state->__pyx_n_s_references);
jpayne@69 4160 Py_CLEAR(clear_module_state->__pyx_n_s_region);
jpayne@69 4161 Py_CLEAR(clear_module_state->__pyx_n_s_rend);
jpayne@69 4162 Py_CLEAR(clear_module_state->__pyx_n_s_rstart);
jpayne@69 4163 Py_CLEAR(clear_module_state->__pyx_kp_u_s);
jpayne@69 4164 Py_CLEAR(clear_module_state->__pyx_n_s_s_2);
jpayne@69 4165 Py_CLEAR(clear_module_state->__pyx_n_s_self);
jpayne@69 4166 Py_CLEAR(clear_module_state->__pyx_kp_s_self__delegate_cannot_be_convert);
jpayne@69 4167 Py_CLEAR(clear_module_state->__pyx_n_s_seq);
jpayne@69 4168 Py_CLEAR(clear_module_state->__pyx_n_s_sequence);
jpayne@69 4169 Py_CLEAR(clear_module_state->__pyx_kp_u_sequence_and_quality_length_do_n);
jpayne@69 4170 Py_CLEAR(clear_module_state->__pyx_kp_u_sequence_s_not_present);
jpayne@69 4171 Py_CLEAR(clear_module_state->__pyx_n_s_set_comment);
jpayne@69 4172 Py_CLEAR(clear_module_state->__pyx_n_s_set_name);
jpayne@69 4173 Py_CLEAR(clear_module_state->__pyx_n_s_set_sequence);
jpayne@69 4174 Py_CLEAR(clear_module_state->__pyx_n_s_setstate);
jpayne@69 4175 Py_CLEAR(clear_module_state->__pyx_n_s_setstate_cython);
jpayne@69 4176 Py_CLEAR(clear_module_state->__pyx_n_s_spec);
jpayne@69 4177 Py_CLEAR(clear_module_state->__pyx_n_s_ss);
jpayne@69 4178 Py_CLEAR(clear_module_state->__pyx_n_s_start);
jpayne@69 4179 Py_CLEAR(clear_module_state->__pyx_n_s_state);
jpayne@69 4180 Py_CLEAR(clear_module_state->__pyx_kp_s_stringsource);
jpayne@69 4181 Py_CLEAR(clear_module_state->__pyx_n_s_sys);
jpayne@69 4182 Py_CLEAR(clear_module_state->__pyx_n_s_test);
jpayne@69 4183 Py_CLEAR(clear_module_state->__pyx_n_s_traceback);
jpayne@69 4184 Py_CLEAR(clear_module_state->__pyx_kp_u_truncated_quality_string_in_0);
jpayne@69 4185 Py_CLEAR(clear_module_state->__pyx_kp_u_unknown_problem_parsing_0);
jpayne@69 4186 Py_CLEAR(clear_module_state->__pyx_n_s_update);
jpayne@69 4187 Py_CLEAR(clear_module_state->__pyx_n_s_use_setstate);
jpayne@69 4188 Py_CLEAR(clear_module_state->__pyx_n_s_x);
jpayne@69 4189 Py_CLEAR(clear_module_state->__pyx_n_s_zip);
jpayne@69 4190 Py_CLEAR(clear_module_state->__pyx_int_33);
jpayne@69 4191 Py_CLEAR(clear_module_state->__pyx_int_29210129);
jpayne@69 4192 Py_CLEAR(clear_module_state->__pyx_int_71291217);
jpayne@69 4193 Py_CLEAR(clear_module_state->__pyx_int_191400582);
jpayne@69 4194 Py_CLEAR(clear_module_state->__pyx_codeobj_);
jpayne@69 4195 Py_CLEAR(clear_module_state->__pyx_tuple__2);
jpayne@69 4196 Py_CLEAR(clear_module_state->__pyx_tuple__9);
jpayne@69 4197 Py_CLEAR(clear_module_state->__pyx_tuple__10);
jpayne@69 4198 Py_CLEAR(clear_module_state->__pyx_tuple__15);
jpayne@69 4199 Py_CLEAR(clear_module_state->__pyx_tuple__25);
jpayne@69 4200 Py_CLEAR(clear_module_state->__pyx_tuple__26);
jpayne@69 4201 Py_CLEAR(clear_module_state->__pyx_tuple__28);
jpayne@69 4202 Py_CLEAR(clear_module_state->__pyx_tuple__46);
jpayne@69 4203 Py_CLEAR(clear_module_state->__pyx_tuple__49);
jpayne@69 4204 Py_CLEAR(clear_module_state->__pyx_tuple__50);
jpayne@69 4205 Py_CLEAR(clear_module_state->__pyx_tuple__51);
jpayne@69 4206 Py_CLEAR(clear_module_state->__pyx_tuple__52);
jpayne@69 4207 Py_CLEAR(clear_module_state->__pyx_tuple__53);
jpayne@69 4208 Py_CLEAR(clear_module_state->__pyx_tuple__54);
jpayne@69 4209 Py_CLEAR(clear_module_state->__pyx_tuple__55);
jpayne@69 4210 Py_CLEAR(clear_module_state->__pyx_tuple__56);
jpayne@69 4211 Py_CLEAR(clear_module_state->__pyx_tuple__57);
jpayne@69 4212 Py_CLEAR(clear_module_state->__pyx_tuple__58);
jpayne@69 4213 Py_CLEAR(clear_module_state->__pyx_tuple__59);
jpayne@69 4214 Py_CLEAR(clear_module_state->__pyx_tuple__60);
jpayne@69 4215 Py_CLEAR(clear_module_state->__pyx_tuple__61);
jpayne@69 4216 Py_CLEAR(clear_module_state->__pyx_tuple__62);
jpayne@69 4217 Py_CLEAR(clear_module_state->__pyx_tuple__63);
jpayne@69 4218 Py_CLEAR(clear_module_state->__pyx_tuple__64);
jpayne@69 4219 Py_CLEAR(clear_module_state->__pyx_tuple__65);
jpayne@69 4220 Py_CLEAR(clear_module_state->__pyx_tuple__66);
jpayne@69 4221 Py_CLEAR(clear_module_state->__pyx_tuple__67);
jpayne@69 4222 Py_CLEAR(clear_module_state->__pyx_codeobj__3);
jpayne@69 4223 Py_CLEAR(clear_module_state->__pyx_codeobj__5);
jpayne@69 4224 Py_CLEAR(clear_module_state->__pyx_codeobj__6);
jpayne@69 4225 Py_CLEAR(clear_module_state->__pyx_codeobj__7);
jpayne@69 4226 Py_CLEAR(clear_module_state->__pyx_codeobj__8);
jpayne@69 4227 Py_CLEAR(clear_module_state->__pyx_codeobj__12);
jpayne@69 4228 Py_CLEAR(clear_module_state->__pyx_codeobj__13);
jpayne@69 4229 Py_CLEAR(clear_module_state->__pyx_codeobj__14);
jpayne@69 4230 Py_CLEAR(clear_module_state->__pyx_codeobj__20);
jpayne@69 4231 Py_CLEAR(clear_module_state->__pyx_codeobj__21);
jpayne@69 4232 Py_CLEAR(clear_module_state->__pyx_codeobj__22);
jpayne@69 4233 Py_CLEAR(clear_module_state->__pyx_codeobj__23);
jpayne@69 4234 Py_CLEAR(clear_module_state->__pyx_codeobj__24);
jpayne@69 4235 Py_CLEAR(clear_module_state->__pyx_codeobj__27);
jpayne@69 4236 Py_CLEAR(clear_module_state->__pyx_codeobj__29);
jpayne@69 4237 Py_CLEAR(clear_module_state->__pyx_codeobj__30);
jpayne@69 4238 Py_CLEAR(clear_module_state->__pyx_codeobj__31);
jpayne@69 4239 Py_CLEAR(clear_module_state->__pyx_codeobj__32);
jpayne@69 4240 Py_CLEAR(clear_module_state->__pyx_codeobj__33);
jpayne@69 4241 Py_CLEAR(clear_module_state->__pyx_codeobj__34);
jpayne@69 4242 Py_CLEAR(clear_module_state->__pyx_codeobj__35);
jpayne@69 4243 Py_CLEAR(clear_module_state->__pyx_codeobj__36);
jpayne@69 4244 Py_CLEAR(clear_module_state->__pyx_codeobj__37);
jpayne@69 4245 Py_CLEAR(clear_module_state->__pyx_codeobj__38);
jpayne@69 4246 Py_CLEAR(clear_module_state->__pyx_codeobj__39);
jpayne@69 4247 Py_CLEAR(clear_module_state->__pyx_codeobj__40);
jpayne@69 4248 Py_CLEAR(clear_module_state->__pyx_codeobj__41);
jpayne@69 4249 Py_CLEAR(clear_module_state->__pyx_codeobj__42);
jpayne@69 4250 Py_CLEAR(clear_module_state->__pyx_codeobj__43);
jpayne@69 4251 Py_CLEAR(clear_module_state->__pyx_codeobj__44);
jpayne@69 4252 Py_CLEAR(clear_module_state->__pyx_codeobj__45);
jpayne@69 4253 return 0;
jpayne@69 4254 }
jpayne@69 4255 #endif
jpayne@69 4256 /* #### Code section: module_state_traverse ### */
jpayne@69 4257 #if CYTHON_USE_MODULE_STATE
jpayne@69 4258 static int __pyx_m_traverse(PyObject *m, visitproc visit, void *arg) {
jpayne@69 4259 __pyx_mstate *traverse_module_state = __pyx_mstate(m);
jpayne@69 4260 if (!traverse_module_state) return 0;
jpayne@69 4261 Py_VISIT(traverse_module_state->__pyx_d);
jpayne@69 4262 Py_VISIT(traverse_module_state->__pyx_b);
jpayne@69 4263 Py_VISIT(traverse_module_state->__pyx_cython_runtime);
jpayne@69 4264 Py_VISIT(traverse_module_state->__pyx_empty_tuple);
jpayne@69 4265 Py_VISIT(traverse_module_state->__pyx_empty_bytes);
jpayne@69 4266 Py_VISIT(traverse_module_state->__pyx_empty_unicode);
jpayne@69 4267 #ifdef __Pyx_CyFunction_USED
jpayne@69 4268 Py_VISIT(traverse_module_state->__pyx_CyFunctionType);
jpayne@69 4269 #endif
jpayne@69 4270 #ifdef __Pyx_FusedFunction_USED
jpayne@69 4271 Py_VISIT(traverse_module_state->__pyx_FusedFunctionType);
jpayne@69 4272 #endif
jpayne@69 4273 Py_VISIT(traverse_module_state->__pyx_ptype_7cpython_4type_type);
jpayne@69 4274 Py_VISIT(traverse_module_state->__pyx_ptype_7cpython_4bool_bool);
jpayne@69 4275 Py_VISIT(traverse_module_state->__pyx_ptype_7cpython_7complex_complex);
jpayne@69 4276 Py_VISIT(traverse_module_state->__pyx_ptype_7cpython_5array_array);
jpayne@69 4277 Py_VISIT(traverse_module_state->__pyx_ptype_5pysam_10libchtslib_HTSFile);
jpayne@69 4278 Py_VISIT(traverse_module_state->__pyx_ptype_5pysam_9libcfaidx_FastaFile);
jpayne@69 4279 Py_VISIT(traverse_module_state->__pyx_type_5pysam_9libcfaidx_FastaFile);
jpayne@69 4280 Py_VISIT(traverse_module_state->__pyx_ptype_5pysam_9libcfaidx_FastqProxy);
jpayne@69 4281 Py_VISIT(traverse_module_state->__pyx_type_5pysam_9libcfaidx_FastqProxy);
jpayne@69 4282 Py_VISIT(traverse_module_state->__pyx_ptype_5pysam_9libcfaidx_FastxRecord);
jpayne@69 4283 Py_VISIT(traverse_module_state->__pyx_type_5pysam_9libcfaidx_FastxRecord);
jpayne@69 4284 Py_VISIT(traverse_module_state->__pyx_ptype_5pysam_9libcfaidx_FastxFile);
jpayne@69 4285 Py_VISIT(traverse_module_state->__pyx_type_5pysam_9libcfaidx_FastxFile);
jpayne@69 4286 Py_VISIT(traverse_module_state->__pyx_ptype_5pysam_9libcfaidx_FastqFile);
jpayne@69 4287 Py_VISIT(traverse_module_state->__pyx_type_5pysam_9libcfaidx_FastqFile);
jpayne@69 4288 Py_VISIT(traverse_module_state->__pyx_ptype_5pysam_9libcfaidx_Fastafile);
jpayne@69 4289 Py_VISIT(traverse_module_state->__pyx_type_5pysam_9libcfaidx_Fastafile);
jpayne@69 4290 Py_VISIT(traverse_module_state->__pyx_n_s_FastaFile);
jpayne@69 4291 Py_VISIT(traverse_module_state->__pyx_n_u_FastaFile);
jpayne@69 4292 Py_VISIT(traverse_module_state->__pyx_n_s_FastaFile___enter);
jpayne@69 4293 Py_VISIT(traverse_module_state->__pyx_n_s_FastaFile___exit);
jpayne@69 4294 Py_VISIT(traverse_module_state->__pyx_n_s_FastaFile___reduce_cython);
jpayne@69 4295 Py_VISIT(traverse_module_state->__pyx_n_s_FastaFile___setstate_cython);
jpayne@69 4296 Py_VISIT(traverse_module_state->__pyx_n_s_FastaFile__open);
jpayne@69 4297 Py_VISIT(traverse_module_state->__pyx_n_s_FastaFile_close);
jpayne@69 4298 Py_VISIT(traverse_module_state->__pyx_n_s_FastaFile_fetch);
jpayne@69 4299 Py_VISIT(traverse_module_state->__pyx_n_s_FastaFile_get_reference_length);
jpayne@69 4300 Py_VISIT(traverse_module_state->__pyx_n_s_FastaFile_is_open);
jpayne@69 4301 Py_VISIT(traverse_module_state->__pyx_n_s_Fastafile);
jpayne@69 4302 Py_VISIT(traverse_module_state->__pyx_n_u_Fastafile);
jpayne@69 4303 Py_VISIT(traverse_module_state->__pyx_n_s_Fastafile___reduce_cython);
jpayne@69 4304 Py_VISIT(traverse_module_state->__pyx_n_s_Fastafile___setstate_cython);
jpayne@69 4305 Py_VISIT(traverse_module_state->__pyx_n_s_FastqFile);
jpayne@69 4306 Py_VISIT(traverse_module_state->__pyx_n_u_FastqFile);
jpayne@69 4307 Py_VISIT(traverse_module_state->__pyx_n_s_FastqFile___reduce_cython);
jpayne@69 4308 Py_VISIT(traverse_module_state->__pyx_n_s_FastqFile___setstate_cython);
jpayne@69 4309 Py_VISIT(traverse_module_state->__pyx_n_s_FastqProxy);
jpayne@69 4310 Py_VISIT(traverse_module_state->__pyx_n_u_FastqProxy);
jpayne@69 4311 Py_VISIT(traverse_module_state->__pyx_n_s_FastqProxy___reduce_cython);
jpayne@69 4312 Py_VISIT(traverse_module_state->__pyx_n_s_FastqProxy___setstate_cython);
jpayne@69 4313 Py_VISIT(traverse_module_state->__pyx_n_s_FastqProxy_get_quality_array);
jpayne@69 4314 Py_VISIT(traverse_module_state->__pyx_n_s_FastxFile);
jpayne@69 4315 Py_VISIT(traverse_module_state->__pyx_n_u_FastxFile);
jpayne@69 4316 Py_VISIT(traverse_module_state->__pyx_n_s_FastxFile___enter);
jpayne@69 4317 Py_VISIT(traverse_module_state->__pyx_n_s_FastxFile___exit);
jpayne@69 4318 Py_VISIT(traverse_module_state->__pyx_n_s_FastxFile___reduce_cython);
jpayne@69 4319 Py_VISIT(traverse_module_state->__pyx_n_s_FastxFile___setstate_cython);
jpayne@69 4320 Py_VISIT(traverse_module_state->__pyx_n_s_FastxFile__open);
jpayne@69 4321 Py_VISIT(traverse_module_state->__pyx_n_s_FastxFile_close);
jpayne@69 4322 Py_VISIT(traverse_module_state->__pyx_n_s_FastxFile_is_open);
jpayne@69 4323 Py_VISIT(traverse_module_state->__pyx_n_s_FastxRecord);
jpayne@69 4324 Py_VISIT(traverse_module_state->__pyx_n_u_FastxRecord);
jpayne@69 4325 Py_VISIT(traverse_module_state->__pyx_n_s_FastxRecord___copy);
jpayne@69 4326 Py_VISIT(traverse_module_state->__pyx_n_s_FastxRecord___deepcopy);
jpayne@69 4327 Py_VISIT(traverse_module_state->__pyx_n_s_FastxRecord___reduce_cython);
jpayne@69 4328 Py_VISIT(traverse_module_state->__pyx_n_s_FastxRecord___setstate_cython);
jpayne@69 4329 Py_VISIT(traverse_module_state->__pyx_n_s_FastxRecord_get_quality_array);
jpayne@69 4330 Py_VISIT(traverse_module_state->__pyx_kp_u_FastxRecord_must_have_a_name_and);
jpayne@69 4331 Py_VISIT(traverse_module_state->__pyx_n_s_FastxRecord_set_comment);
jpayne@69 4332 Py_VISIT(traverse_module_state->__pyx_n_s_FastxRecord_set_name);
jpayne@69 4333 Py_VISIT(traverse_module_state->__pyx_n_s_FastxRecord_set_sequence);
jpayne@69 4334 Py_VISIT(traverse_module_state->__pyx_n_s_IOError);
jpayne@69 4335 Py_VISIT(traverse_module_state->__pyx_kp_u_I_O_operation_on_closed_file);
jpayne@69 4336 Py_VISIT(traverse_module_state->__pyx_kp_s_Incompatible_checksums_0x_x_vs_0);
jpayne@69 4337 Py_VISIT(traverse_module_state->__pyx_n_s_KeyError);
jpayne@69 4338 Py_VISIT(traverse_module_state->__pyx_n_s_MemoryError);
jpayne@69 4339 Py_VISIT(traverse_module_state->__pyx_kp_u_None);
jpayne@69 4340 Py_VISIT(traverse_module_state->__pyx_n_s_PickleError);
jpayne@69 4341 Py_VISIT(traverse_module_state->__pyx_n_s_StopIteration);
jpayne@69 4342 Py_VISIT(traverse_module_state->__pyx_n_s_TypeError);
jpayne@69 4343 Py_VISIT(traverse_module_state->__pyx_n_s_ValueError);
jpayne@69 4344 Py_VISIT(traverse_module_state->__pyx_kp_u__11);
jpayne@69 4345 Py_VISIT(traverse_module_state->__pyx_kp_u__16);
jpayne@69 4346 Py_VISIT(traverse_module_state->__pyx_kp_u__17);
jpayne@69 4347 Py_VISIT(traverse_module_state->__pyx_kp_u__18);
jpayne@69 4348 Py_VISIT(traverse_module_state->__pyx_kp_u__19);
jpayne@69 4349 Py_VISIT(traverse_module_state->__pyx_kp_b__4);
jpayne@69 4350 Py_VISIT(traverse_module_state->__pyx_kp_u__47);
jpayne@69 4351 Py_VISIT(traverse_module_state->__pyx_n_s__48);
jpayne@69 4352 Py_VISIT(traverse_module_state->__pyx_n_s__68);
jpayne@69 4353 Py_VISIT(traverse_module_state->__pyx_n_s_all);
jpayne@69 4354 Py_VISIT(traverse_module_state->__pyx_n_s_append);
jpayne@69 4355 Py_VISIT(traverse_module_state->__pyx_n_s_asyncio_coroutines);
jpayne@69 4356 Py_VISIT(traverse_module_state->__pyx_n_s_bindex_filename);
jpayne@69 4357 Py_VISIT(traverse_module_state->__pyx_n_s_bindex_filename_compressed);
jpayne@69 4358 Py_VISIT(traverse_module_state->__pyx_kp_u_calling_len_on_closed_file);
jpayne@69 4359 Py_VISIT(traverse_module_state->__pyx_kp_u_can_not_write_record_without_a_s);
jpayne@69 4360 Py_VISIT(traverse_module_state->__pyx_kp_u_can_not_write_record_without_nam);
jpayne@69 4361 Py_VISIT(traverse_module_state->__pyx_n_s_cfilename);
jpayne@69 4362 Py_VISIT(traverse_module_state->__pyx_n_s_cindexname);
jpayne@69 4363 Py_VISIT(traverse_module_state->__pyx_n_s_cindexname_compressed);
jpayne@69 4364 Py_VISIT(traverse_module_state->__pyx_n_s_class_getitem);
jpayne@69 4365 Py_VISIT(traverse_module_state->__pyx_n_s_cline_in_traceback);
jpayne@69 4366 Py_VISIT(traverse_module_state->__pyx_n_s_close);
jpayne@69 4367 Py_VISIT(traverse_module_state->__pyx_n_s_comment);
jpayne@69 4368 Py_VISIT(traverse_module_state->__pyx_n_s_contig);
jpayne@69 4369 Py_VISIT(traverse_module_state->__pyx_n_s_contig_b);
jpayne@69 4370 Py_VISIT(traverse_module_state->__pyx_n_s_copy);
jpayne@69 4371 Py_VISIT(traverse_module_state->__pyx_n_s_deepcopy);
jpayne@69 4372 Py_VISIT(traverse_module_state->__pyx_n_s_dict);
jpayne@69 4373 Py_VISIT(traverse_module_state->__pyx_n_s_dict_2);
jpayne@69 4374 Py_VISIT(traverse_module_state->__pyx_kp_u_disable);
jpayne@69 4375 Py_VISIT(traverse_module_state->__pyx_kp_u_do_not_instantiate_FastqProxy_di);
jpayne@69 4376 Py_VISIT(traverse_module_state->__pyx_kp_u_enable);
jpayne@69 4377 Py_VISIT(traverse_module_state->__pyx_n_s_end);
jpayne@69 4378 Py_VISIT(traverse_module_state->__pyx_n_s_enter);
jpayne@69 4379 Py_VISIT(traverse_module_state->__pyx_kp_u_error_when_opening_file_s);
jpayne@69 4380 Py_VISIT(traverse_module_state->__pyx_n_s_exc_type);
jpayne@69 4381 Py_VISIT(traverse_module_state->__pyx_n_s_exc_value);
jpayne@69 4382 Py_VISIT(traverse_module_state->__pyx_n_s_exists);
jpayne@69 4383 Py_VISIT(traverse_module_state->__pyx_n_s_exit);
jpayne@69 4384 Py_VISIT(traverse_module_state->__pyx_kp_u_failure_when_retrieving_sequence);
jpayne@69 4385 Py_VISIT(traverse_module_state->__pyx_n_s_fetch);
jpayne@69 4386 Py_VISIT(traverse_module_state->__pyx_kp_u_file_s_not_found);
jpayne@69 4387 Py_VISIT(traverse_module_state->__pyx_n_s_filename);
jpayne@69 4388 Py_VISIT(traverse_module_state->__pyx_kp_u_filename_does_not_exist);
jpayne@69 4389 Py_VISIT(traverse_module_state->__pyx_n_s_filepath_index);
jpayne@69 4390 Py_VISIT(traverse_module_state->__pyx_n_s_filepath_index_compressed);
jpayne@69 4391 Py_VISIT(traverse_module_state->__pyx_n_s_format);
jpayne@69 4392 Py_VISIT(traverse_module_state->__pyx_kp_u_gc);
jpayne@69 4393 Py_VISIT(traverse_module_state->__pyx_n_s_get_quality_array);
jpayne@69 4394 Py_VISIT(traverse_module_state->__pyx_n_s_get_reference_length);
jpayne@69 4395 Py_VISIT(traverse_module_state->__pyx_n_s_getstate);
jpayne@69 4396 Py_VISIT(traverse_module_state->__pyx_n_s_import);
jpayne@69 4397 Py_VISIT(traverse_module_state->__pyx_n_s_initializing);
jpayne@69 4398 Py_VISIT(traverse_module_state->__pyx_n_s_is_coroutine);
jpayne@69 4399 Py_VISIT(traverse_module_state->__pyx_n_s_is_open);
jpayne@69 4400 Py_VISIT(traverse_module_state->__pyx_kp_u_isenabled);
jpayne@69 4401 Py_VISIT(traverse_module_state->__pyx_n_s_length);
jpayne@69 4402 Py_VISIT(traverse_module_state->__pyx_n_s_main);
jpayne@69 4403 Py_VISIT(traverse_module_state->__pyx_n_s_memo);
jpayne@69 4404 Py_VISIT(traverse_module_state->__pyx_n_s_name);
jpayne@69 4405 Py_VISIT(traverse_module_state->__pyx_n_s_name_2);
jpayne@69 4406 Py_VISIT(traverse_module_state->__pyx_n_s_new);
jpayne@69 4407 Py_VISIT(traverse_module_state->__pyx_kp_s_no_default___reduce___due_to_non);
jpayne@69 4408 Py_VISIT(traverse_module_state->__pyx_kp_u_no_sequence_region_supplied);
jpayne@69 4409 Py_VISIT(traverse_module_state->__pyx_n_s_nreferences);
jpayne@69 4410 Py_VISIT(traverse_module_state->__pyx_n_s_offset);
jpayne@69 4411 Py_VISIT(traverse_module_state->__pyx_n_s_open);
jpayne@69 4412 Py_VISIT(traverse_module_state->__pyx_n_s_os);
jpayne@69 4413 Py_VISIT(traverse_module_state->__pyx_n_s_path);
jpayne@69 4414 Py_VISIT(traverse_module_state->__pyx_n_s_persist);
jpayne@69 4415 Py_VISIT(traverse_module_state->__pyx_n_s_pickle);
jpayne@69 4416 Py_VISIT(traverse_module_state->__pyx_n_s_proxy);
jpayne@69 4417 Py_VISIT(traverse_module_state->__pyx_n_s_pysam_libcfaidx);
jpayne@69 4418 Py_VISIT(traverse_module_state->__pyx_kp_s_pysam_libcfaidx_pyx);
jpayne@69 4419 Py_VISIT(traverse_module_state->__pyx_n_s_pyx_PickleError);
jpayne@69 4420 Py_VISIT(traverse_module_state->__pyx_n_s_pyx_checksum);
jpayne@69 4421 Py_VISIT(traverse_module_state->__pyx_n_s_pyx_result);
jpayne@69 4422 Py_VISIT(traverse_module_state->__pyx_n_s_pyx_state);
jpayne@69 4423 Py_VISIT(traverse_module_state->__pyx_n_s_pyx_type);
jpayne@69 4424 Py_VISIT(traverse_module_state->__pyx_n_s_pyx_unpickle_FastxRecord);
jpayne@69 4425 Py_VISIT(traverse_module_state->__pyx_n_s_pyx_vtable);
jpayne@69 4426 Py_VISIT(traverse_module_state->__pyx_n_s_quality);
jpayne@69 4427 Py_VISIT(traverse_module_state->__pyx_n_s_re);
jpayne@69 4428 Py_VISIT(traverse_module_state->__pyx_n_s_reduce);
jpayne@69 4429 Py_VISIT(traverse_module_state->__pyx_n_s_reduce_cython);
jpayne@69 4430 Py_VISIT(traverse_module_state->__pyx_n_s_reduce_ex);
jpayne@69 4431 Py_VISIT(traverse_module_state->__pyx_n_s_ref);
jpayne@69 4432 Py_VISIT(traverse_module_state->__pyx_n_s_reference);
jpayne@69 4433 Py_VISIT(traverse_module_state->__pyx_n_s_references);
jpayne@69 4434 Py_VISIT(traverse_module_state->__pyx_n_s_region);
jpayne@69 4435 Py_VISIT(traverse_module_state->__pyx_n_s_rend);
jpayne@69 4436 Py_VISIT(traverse_module_state->__pyx_n_s_rstart);
jpayne@69 4437 Py_VISIT(traverse_module_state->__pyx_kp_u_s);
jpayne@69 4438 Py_VISIT(traverse_module_state->__pyx_n_s_s_2);
jpayne@69 4439 Py_VISIT(traverse_module_state->__pyx_n_s_self);
jpayne@69 4440 Py_VISIT(traverse_module_state->__pyx_kp_s_self__delegate_cannot_be_convert);
jpayne@69 4441 Py_VISIT(traverse_module_state->__pyx_n_s_seq);
jpayne@69 4442 Py_VISIT(traverse_module_state->__pyx_n_s_sequence);
jpayne@69 4443 Py_VISIT(traverse_module_state->__pyx_kp_u_sequence_and_quality_length_do_n);
jpayne@69 4444 Py_VISIT(traverse_module_state->__pyx_kp_u_sequence_s_not_present);
jpayne@69 4445 Py_VISIT(traverse_module_state->__pyx_n_s_set_comment);
jpayne@69 4446 Py_VISIT(traverse_module_state->__pyx_n_s_set_name);
jpayne@69 4447 Py_VISIT(traverse_module_state->__pyx_n_s_set_sequence);
jpayne@69 4448 Py_VISIT(traverse_module_state->__pyx_n_s_setstate);
jpayne@69 4449 Py_VISIT(traverse_module_state->__pyx_n_s_setstate_cython);
jpayne@69 4450 Py_VISIT(traverse_module_state->__pyx_n_s_spec);
jpayne@69 4451 Py_VISIT(traverse_module_state->__pyx_n_s_ss);
jpayne@69 4452 Py_VISIT(traverse_module_state->__pyx_n_s_start);
jpayne@69 4453 Py_VISIT(traverse_module_state->__pyx_n_s_state);
jpayne@69 4454 Py_VISIT(traverse_module_state->__pyx_kp_s_stringsource);
jpayne@69 4455 Py_VISIT(traverse_module_state->__pyx_n_s_sys);
jpayne@69 4456 Py_VISIT(traverse_module_state->__pyx_n_s_test);
jpayne@69 4457 Py_VISIT(traverse_module_state->__pyx_n_s_traceback);
jpayne@69 4458 Py_VISIT(traverse_module_state->__pyx_kp_u_truncated_quality_string_in_0);
jpayne@69 4459 Py_VISIT(traverse_module_state->__pyx_kp_u_unknown_problem_parsing_0);
jpayne@69 4460 Py_VISIT(traverse_module_state->__pyx_n_s_update);
jpayne@69 4461 Py_VISIT(traverse_module_state->__pyx_n_s_use_setstate);
jpayne@69 4462 Py_VISIT(traverse_module_state->__pyx_n_s_x);
jpayne@69 4463 Py_VISIT(traverse_module_state->__pyx_n_s_zip);
jpayne@69 4464 Py_VISIT(traverse_module_state->__pyx_int_33);
jpayne@69 4465 Py_VISIT(traverse_module_state->__pyx_int_29210129);
jpayne@69 4466 Py_VISIT(traverse_module_state->__pyx_int_71291217);
jpayne@69 4467 Py_VISIT(traverse_module_state->__pyx_int_191400582);
jpayne@69 4468 Py_VISIT(traverse_module_state->__pyx_codeobj_);
jpayne@69 4469 Py_VISIT(traverse_module_state->__pyx_tuple__2);
jpayne@69 4470 Py_VISIT(traverse_module_state->__pyx_tuple__9);
jpayne@69 4471 Py_VISIT(traverse_module_state->__pyx_tuple__10);
jpayne@69 4472 Py_VISIT(traverse_module_state->__pyx_tuple__15);
jpayne@69 4473 Py_VISIT(traverse_module_state->__pyx_tuple__25);
jpayne@69 4474 Py_VISIT(traverse_module_state->__pyx_tuple__26);
jpayne@69 4475 Py_VISIT(traverse_module_state->__pyx_tuple__28);
jpayne@69 4476 Py_VISIT(traverse_module_state->__pyx_tuple__46);
jpayne@69 4477 Py_VISIT(traverse_module_state->__pyx_tuple__49);
jpayne@69 4478 Py_VISIT(traverse_module_state->__pyx_tuple__50);
jpayne@69 4479 Py_VISIT(traverse_module_state->__pyx_tuple__51);
jpayne@69 4480 Py_VISIT(traverse_module_state->__pyx_tuple__52);
jpayne@69 4481 Py_VISIT(traverse_module_state->__pyx_tuple__53);
jpayne@69 4482 Py_VISIT(traverse_module_state->__pyx_tuple__54);
jpayne@69 4483 Py_VISIT(traverse_module_state->__pyx_tuple__55);
jpayne@69 4484 Py_VISIT(traverse_module_state->__pyx_tuple__56);
jpayne@69 4485 Py_VISIT(traverse_module_state->__pyx_tuple__57);
jpayne@69 4486 Py_VISIT(traverse_module_state->__pyx_tuple__58);
jpayne@69 4487 Py_VISIT(traverse_module_state->__pyx_tuple__59);
jpayne@69 4488 Py_VISIT(traverse_module_state->__pyx_tuple__60);
jpayne@69 4489 Py_VISIT(traverse_module_state->__pyx_tuple__61);
jpayne@69 4490 Py_VISIT(traverse_module_state->__pyx_tuple__62);
jpayne@69 4491 Py_VISIT(traverse_module_state->__pyx_tuple__63);
jpayne@69 4492 Py_VISIT(traverse_module_state->__pyx_tuple__64);
jpayne@69 4493 Py_VISIT(traverse_module_state->__pyx_tuple__65);
jpayne@69 4494 Py_VISIT(traverse_module_state->__pyx_tuple__66);
jpayne@69 4495 Py_VISIT(traverse_module_state->__pyx_tuple__67);
jpayne@69 4496 Py_VISIT(traverse_module_state->__pyx_codeobj__3);
jpayne@69 4497 Py_VISIT(traverse_module_state->__pyx_codeobj__5);
jpayne@69 4498 Py_VISIT(traverse_module_state->__pyx_codeobj__6);
jpayne@69 4499 Py_VISIT(traverse_module_state->__pyx_codeobj__7);
jpayne@69 4500 Py_VISIT(traverse_module_state->__pyx_codeobj__8);
jpayne@69 4501 Py_VISIT(traverse_module_state->__pyx_codeobj__12);
jpayne@69 4502 Py_VISIT(traverse_module_state->__pyx_codeobj__13);
jpayne@69 4503 Py_VISIT(traverse_module_state->__pyx_codeobj__14);
jpayne@69 4504 Py_VISIT(traverse_module_state->__pyx_codeobj__20);
jpayne@69 4505 Py_VISIT(traverse_module_state->__pyx_codeobj__21);
jpayne@69 4506 Py_VISIT(traverse_module_state->__pyx_codeobj__22);
jpayne@69 4507 Py_VISIT(traverse_module_state->__pyx_codeobj__23);
jpayne@69 4508 Py_VISIT(traverse_module_state->__pyx_codeobj__24);
jpayne@69 4509 Py_VISIT(traverse_module_state->__pyx_codeobj__27);
jpayne@69 4510 Py_VISIT(traverse_module_state->__pyx_codeobj__29);
jpayne@69 4511 Py_VISIT(traverse_module_state->__pyx_codeobj__30);
jpayne@69 4512 Py_VISIT(traverse_module_state->__pyx_codeobj__31);
jpayne@69 4513 Py_VISIT(traverse_module_state->__pyx_codeobj__32);
jpayne@69 4514 Py_VISIT(traverse_module_state->__pyx_codeobj__33);
jpayne@69 4515 Py_VISIT(traverse_module_state->__pyx_codeobj__34);
jpayne@69 4516 Py_VISIT(traverse_module_state->__pyx_codeobj__35);
jpayne@69 4517 Py_VISIT(traverse_module_state->__pyx_codeobj__36);
jpayne@69 4518 Py_VISIT(traverse_module_state->__pyx_codeobj__37);
jpayne@69 4519 Py_VISIT(traverse_module_state->__pyx_codeobj__38);
jpayne@69 4520 Py_VISIT(traverse_module_state->__pyx_codeobj__39);
jpayne@69 4521 Py_VISIT(traverse_module_state->__pyx_codeobj__40);
jpayne@69 4522 Py_VISIT(traverse_module_state->__pyx_codeobj__41);
jpayne@69 4523 Py_VISIT(traverse_module_state->__pyx_codeobj__42);
jpayne@69 4524 Py_VISIT(traverse_module_state->__pyx_codeobj__43);
jpayne@69 4525 Py_VISIT(traverse_module_state->__pyx_codeobj__44);
jpayne@69 4526 Py_VISIT(traverse_module_state->__pyx_codeobj__45);
jpayne@69 4527 return 0;
jpayne@69 4528 }
jpayne@69 4529 #endif
jpayne@69 4530 /* #### Code section: module_state_defines ### */
jpayne@69 4531 #define __pyx_d __pyx_mstate_global->__pyx_d
jpayne@69 4532 #define __pyx_b __pyx_mstate_global->__pyx_b
jpayne@69 4533 #define __pyx_cython_runtime __pyx_mstate_global->__pyx_cython_runtime
jpayne@69 4534 #define __pyx_empty_tuple __pyx_mstate_global->__pyx_empty_tuple
jpayne@69 4535 #define __pyx_empty_bytes __pyx_mstate_global->__pyx_empty_bytes
jpayne@69 4536 #define __pyx_empty_unicode __pyx_mstate_global->__pyx_empty_unicode
jpayne@69 4537 #ifdef __Pyx_CyFunction_USED
jpayne@69 4538 #define __pyx_CyFunctionType __pyx_mstate_global->__pyx_CyFunctionType
jpayne@69 4539 #endif
jpayne@69 4540 #ifdef __Pyx_FusedFunction_USED
jpayne@69 4541 #define __pyx_FusedFunctionType __pyx_mstate_global->__pyx_FusedFunctionType
jpayne@69 4542 #endif
jpayne@69 4543 #ifdef __Pyx_Generator_USED
jpayne@69 4544 #define __pyx_GeneratorType __pyx_mstate_global->__pyx_GeneratorType
jpayne@69 4545 #endif
jpayne@69 4546 #ifdef __Pyx_IterableCoroutine_USED
jpayne@69 4547 #define __pyx_IterableCoroutineType __pyx_mstate_global->__pyx_IterableCoroutineType
jpayne@69 4548 #endif
jpayne@69 4549 #ifdef __Pyx_Coroutine_USED
jpayne@69 4550 #define __pyx_CoroutineAwaitType __pyx_mstate_global->__pyx_CoroutineAwaitType
jpayne@69 4551 #endif
jpayne@69 4552 #ifdef __Pyx_Coroutine_USED
jpayne@69 4553 #define __pyx_CoroutineType __pyx_mstate_global->__pyx_CoroutineType
jpayne@69 4554 #endif
jpayne@69 4555 #if CYTHON_USE_MODULE_STATE
jpayne@69 4556 #endif
jpayne@69 4557 #if CYTHON_USE_MODULE_STATE
jpayne@69 4558 #endif
jpayne@69 4559 #if CYTHON_USE_MODULE_STATE
jpayne@69 4560 #endif
jpayne@69 4561 #if CYTHON_USE_MODULE_STATE
jpayne@69 4562 #endif
jpayne@69 4563 #if CYTHON_USE_MODULE_STATE
jpayne@69 4564 #endif
jpayne@69 4565 #if CYTHON_USE_MODULE_STATE
jpayne@69 4566 #endif
jpayne@69 4567 #if CYTHON_USE_MODULE_STATE
jpayne@69 4568 #endif
jpayne@69 4569 #if CYTHON_USE_MODULE_STATE
jpayne@69 4570 #endif
jpayne@69 4571 #define __pyx_ptype_7cpython_4type_type __pyx_mstate_global->__pyx_ptype_7cpython_4type_type
jpayne@69 4572 #if CYTHON_USE_MODULE_STATE
jpayne@69 4573 #endif
jpayne@69 4574 #if CYTHON_USE_MODULE_STATE
jpayne@69 4575 #endif
jpayne@69 4576 #if CYTHON_USE_MODULE_STATE
jpayne@69 4577 #endif
jpayne@69 4578 #if CYTHON_USE_MODULE_STATE
jpayne@69 4579 #endif
jpayne@69 4580 #if CYTHON_USE_MODULE_STATE
jpayne@69 4581 #endif
jpayne@69 4582 #if CYTHON_USE_MODULE_STATE
jpayne@69 4583 #endif
jpayne@69 4584 #if CYTHON_USE_MODULE_STATE
jpayne@69 4585 #endif
jpayne@69 4586 #if CYTHON_USE_MODULE_STATE
jpayne@69 4587 #endif
jpayne@69 4588 #if CYTHON_USE_MODULE_STATE
jpayne@69 4589 #endif
jpayne@69 4590 #if CYTHON_USE_MODULE_STATE
jpayne@69 4591 #endif
jpayne@69 4592 #if CYTHON_USE_MODULE_STATE
jpayne@69 4593 #endif
jpayne@69 4594 #if CYTHON_USE_MODULE_STATE
jpayne@69 4595 #endif
jpayne@69 4596 #if CYTHON_USE_MODULE_STATE
jpayne@69 4597 #endif
jpayne@69 4598 #if CYTHON_USE_MODULE_STATE
jpayne@69 4599 #endif
jpayne@69 4600 #define __pyx_ptype_7cpython_4bool_bool __pyx_mstate_global->__pyx_ptype_7cpython_4bool_bool
jpayne@69 4601 #if CYTHON_USE_MODULE_STATE
jpayne@69 4602 #endif
jpayne@69 4603 #if CYTHON_USE_MODULE_STATE
jpayne@69 4604 #endif
jpayne@69 4605 #if CYTHON_USE_MODULE_STATE
jpayne@69 4606 #endif
jpayne@69 4607 #if CYTHON_USE_MODULE_STATE
jpayne@69 4608 #endif
jpayne@69 4609 #define __pyx_ptype_7cpython_7complex_complex __pyx_mstate_global->__pyx_ptype_7cpython_7complex_complex
jpayne@69 4610 #if CYTHON_USE_MODULE_STATE
jpayne@69 4611 #endif
jpayne@69 4612 #if CYTHON_USE_MODULE_STATE
jpayne@69 4613 #endif
jpayne@69 4614 #if CYTHON_USE_MODULE_STATE
jpayne@69 4615 #endif
jpayne@69 4616 #if CYTHON_USE_MODULE_STATE
jpayne@69 4617 #endif
jpayne@69 4618 #if CYTHON_USE_MODULE_STATE
jpayne@69 4619 #endif
jpayne@69 4620 #if CYTHON_USE_MODULE_STATE
jpayne@69 4621 #endif
jpayne@69 4622 #if CYTHON_USE_MODULE_STATE
jpayne@69 4623 #endif
jpayne@69 4624 #if CYTHON_USE_MODULE_STATE
jpayne@69 4625 #endif
jpayne@69 4626 #if CYTHON_USE_MODULE_STATE
jpayne@69 4627 #endif
jpayne@69 4628 #if CYTHON_USE_MODULE_STATE
jpayne@69 4629 #endif
jpayne@69 4630 #if CYTHON_USE_MODULE_STATE
jpayne@69 4631 #endif
jpayne@69 4632 #if CYTHON_USE_MODULE_STATE
jpayne@69 4633 #endif
jpayne@69 4634 #if CYTHON_USE_MODULE_STATE
jpayne@69 4635 #endif
jpayne@69 4636 #if CYTHON_USE_MODULE_STATE
jpayne@69 4637 #endif
jpayne@69 4638 #if CYTHON_USE_MODULE_STATE
jpayne@69 4639 #endif
jpayne@69 4640 #if CYTHON_USE_MODULE_STATE
jpayne@69 4641 #endif
jpayne@69 4642 #if CYTHON_USE_MODULE_STATE
jpayne@69 4643 #endif
jpayne@69 4644 #if CYTHON_USE_MODULE_STATE
jpayne@69 4645 #endif
jpayne@69 4646 #if CYTHON_USE_MODULE_STATE
jpayne@69 4647 #endif
jpayne@69 4648 #if CYTHON_USE_MODULE_STATE
jpayne@69 4649 #endif
jpayne@69 4650 #if CYTHON_USE_MODULE_STATE
jpayne@69 4651 #endif
jpayne@69 4652 #if CYTHON_USE_MODULE_STATE
jpayne@69 4653 #endif
jpayne@69 4654 #define __pyx_ptype_7cpython_5array_array __pyx_mstate_global->__pyx_ptype_7cpython_5array_array
jpayne@69 4655 #if CYTHON_USE_MODULE_STATE
jpayne@69 4656 #endif
jpayne@69 4657 #if CYTHON_USE_MODULE_STATE
jpayne@69 4658 #endif
jpayne@69 4659 #define __pyx_ptype_5pysam_10libchtslib_HTSFile __pyx_mstate_global->__pyx_ptype_5pysam_10libchtslib_HTSFile
jpayne@69 4660 #if CYTHON_USE_MODULE_STATE
jpayne@69 4661 #endif
jpayne@69 4662 #if CYTHON_USE_MODULE_STATE
jpayne@69 4663 #endif
jpayne@69 4664 #if CYTHON_USE_MODULE_STATE
jpayne@69 4665 #define __pyx_type_5pysam_9libcfaidx_FastaFile __pyx_mstate_global->__pyx_type_5pysam_9libcfaidx_FastaFile
jpayne@69 4666 #define __pyx_type_5pysam_9libcfaidx_FastqProxy __pyx_mstate_global->__pyx_type_5pysam_9libcfaidx_FastqProxy
jpayne@69 4667 #define __pyx_type_5pysam_9libcfaidx_FastxRecord __pyx_mstate_global->__pyx_type_5pysam_9libcfaidx_FastxRecord
jpayne@69 4668 #define __pyx_type_5pysam_9libcfaidx_FastxFile __pyx_mstate_global->__pyx_type_5pysam_9libcfaidx_FastxFile
jpayne@69 4669 #define __pyx_type_5pysam_9libcfaidx_FastqFile __pyx_mstate_global->__pyx_type_5pysam_9libcfaidx_FastqFile
jpayne@69 4670 #define __pyx_type_5pysam_9libcfaidx_Fastafile __pyx_mstate_global->__pyx_type_5pysam_9libcfaidx_Fastafile
jpayne@69 4671 #endif
jpayne@69 4672 #define __pyx_ptype_5pysam_9libcfaidx_FastaFile __pyx_mstate_global->__pyx_ptype_5pysam_9libcfaidx_FastaFile
jpayne@69 4673 #define __pyx_ptype_5pysam_9libcfaidx_FastqProxy __pyx_mstate_global->__pyx_ptype_5pysam_9libcfaidx_FastqProxy
jpayne@69 4674 #define __pyx_ptype_5pysam_9libcfaidx_FastxRecord __pyx_mstate_global->__pyx_ptype_5pysam_9libcfaidx_FastxRecord
jpayne@69 4675 #define __pyx_ptype_5pysam_9libcfaidx_FastxFile __pyx_mstate_global->__pyx_ptype_5pysam_9libcfaidx_FastxFile
jpayne@69 4676 #define __pyx_ptype_5pysam_9libcfaidx_FastqFile __pyx_mstate_global->__pyx_ptype_5pysam_9libcfaidx_FastqFile
jpayne@69 4677 #define __pyx_ptype_5pysam_9libcfaidx_Fastafile __pyx_mstate_global->__pyx_ptype_5pysam_9libcfaidx_Fastafile
jpayne@69 4678 #define __pyx_n_s_FastaFile __pyx_mstate_global->__pyx_n_s_FastaFile
jpayne@69 4679 #define __pyx_n_u_FastaFile __pyx_mstate_global->__pyx_n_u_FastaFile
jpayne@69 4680 #define __pyx_n_s_FastaFile___enter __pyx_mstate_global->__pyx_n_s_FastaFile___enter
jpayne@69 4681 #define __pyx_n_s_FastaFile___exit __pyx_mstate_global->__pyx_n_s_FastaFile___exit
jpayne@69 4682 #define __pyx_n_s_FastaFile___reduce_cython __pyx_mstate_global->__pyx_n_s_FastaFile___reduce_cython
jpayne@69 4683 #define __pyx_n_s_FastaFile___setstate_cython __pyx_mstate_global->__pyx_n_s_FastaFile___setstate_cython
jpayne@69 4684 #define __pyx_n_s_FastaFile__open __pyx_mstate_global->__pyx_n_s_FastaFile__open
jpayne@69 4685 #define __pyx_n_s_FastaFile_close __pyx_mstate_global->__pyx_n_s_FastaFile_close
jpayne@69 4686 #define __pyx_n_s_FastaFile_fetch __pyx_mstate_global->__pyx_n_s_FastaFile_fetch
jpayne@69 4687 #define __pyx_n_s_FastaFile_get_reference_length __pyx_mstate_global->__pyx_n_s_FastaFile_get_reference_length
jpayne@69 4688 #define __pyx_n_s_FastaFile_is_open __pyx_mstate_global->__pyx_n_s_FastaFile_is_open
jpayne@69 4689 #define __pyx_n_s_Fastafile __pyx_mstate_global->__pyx_n_s_Fastafile
jpayne@69 4690 #define __pyx_n_u_Fastafile __pyx_mstate_global->__pyx_n_u_Fastafile
jpayne@69 4691 #define __pyx_n_s_Fastafile___reduce_cython __pyx_mstate_global->__pyx_n_s_Fastafile___reduce_cython
jpayne@69 4692 #define __pyx_n_s_Fastafile___setstate_cython __pyx_mstate_global->__pyx_n_s_Fastafile___setstate_cython
jpayne@69 4693 #define __pyx_n_s_FastqFile __pyx_mstate_global->__pyx_n_s_FastqFile
jpayne@69 4694 #define __pyx_n_u_FastqFile __pyx_mstate_global->__pyx_n_u_FastqFile
jpayne@69 4695 #define __pyx_n_s_FastqFile___reduce_cython __pyx_mstate_global->__pyx_n_s_FastqFile___reduce_cython
jpayne@69 4696 #define __pyx_n_s_FastqFile___setstate_cython __pyx_mstate_global->__pyx_n_s_FastqFile___setstate_cython
jpayne@69 4697 #define __pyx_n_s_FastqProxy __pyx_mstate_global->__pyx_n_s_FastqProxy
jpayne@69 4698 #define __pyx_n_u_FastqProxy __pyx_mstate_global->__pyx_n_u_FastqProxy
jpayne@69 4699 #define __pyx_n_s_FastqProxy___reduce_cython __pyx_mstate_global->__pyx_n_s_FastqProxy___reduce_cython
jpayne@69 4700 #define __pyx_n_s_FastqProxy___setstate_cython __pyx_mstate_global->__pyx_n_s_FastqProxy___setstate_cython
jpayne@69 4701 #define __pyx_n_s_FastqProxy_get_quality_array __pyx_mstate_global->__pyx_n_s_FastqProxy_get_quality_array
jpayne@69 4702 #define __pyx_n_s_FastxFile __pyx_mstate_global->__pyx_n_s_FastxFile
jpayne@69 4703 #define __pyx_n_u_FastxFile __pyx_mstate_global->__pyx_n_u_FastxFile
jpayne@69 4704 #define __pyx_n_s_FastxFile___enter __pyx_mstate_global->__pyx_n_s_FastxFile___enter
jpayne@69 4705 #define __pyx_n_s_FastxFile___exit __pyx_mstate_global->__pyx_n_s_FastxFile___exit
jpayne@69 4706 #define __pyx_n_s_FastxFile___reduce_cython __pyx_mstate_global->__pyx_n_s_FastxFile___reduce_cython
jpayne@69 4707 #define __pyx_n_s_FastxFile___setstate_cython __pyx_mstate_global->__pyx_n_s_FastxFile___setstate_cython
jpayne@69 4708 #define __pyx_n_s_FastxFile__open __pyx_mstate_global->__pyx_n_s_FastxFile__open
jpayne@69 4709 #define __pyx_n_s_FastxFile_close __pyx_mstate_global->__pyx_n_s_FastxFile_close
jpayne@69 4710 #define __pyx_n_s_FastxFile_is_open __pyx_mstate_global->__pyx_n_s_FastxFile_is_open
jpayne@69 4711 #define __pyx_n_s_FastxRecord __pyx_mstate_global->__pyx_n_s_FastxRecord
jpayne@69 4712 #define __pyx_n_u_FastxRecord __pyx_mstate_global->__pyx_n_u_FastxRecord
jpayne@69 4713 #define __pyx_n_s_FastxRecord___copy __pyx_mstate_global->__pyx_n_s_FastxRecord___copy
jpayne@69 4714 #define __pyx_n_s_FastxRecord___deepcopy __pyx_mstate_global->__pyx_n_s_FastxRecord___deepcopy
jpayne@69 4715 #define __pyx_n_s_FastxRecord___reduce_cython __pyx_mstate_global->__pyx_n_s_FastxRecord___reduce_cython
jpayne@69 4716 #define __pyx_n_s_FastxRecord___setstate_cython __pyx_mstate_global->__pyx_n_s_FastxRecord___setstate_cython
jpayne@69 4717 #define __pyx_n_s_FastxRecord_get_quality_array __pyx_mstate_global->__pyx_n_s_FastxRecord_get_quality_array
jpayne@69 4718 #define __pyx_kp_u_FastxRecord_must_have_a_name_and __pyx_mstate_global->__pyx_kp_u_FastxRecord_must_have_a_name_and
jpayne@69 4719 #define __pyx_n_s_FastxRecord_set_comment __pyx_mstate_global->__pyx_n_s_FastxRecord_set_comment
jpayne@69 4720 #define __pyx_n_s_FastxRecord_set_name __pyx_mstate_global->__pyx_n_s_FastxRecord_set_name
jpayne@69 4721 #define __pyx_n_s_FastxRecord_set_sequence __pyx_mstate_global->__pyx_n_s_FastxRecord_set_sequence
jpayne@69 4722 #define __pyx_n_s_IOError __pyx_mstate_global->__pyx_n_s_IOError
jpayne@69 4723 #define __pyx_kp_u_I_O_operation_on_closed_file __pyx_mstate_global->__pyx_kp_u_I_O_operation_on_closed_file
jpayne@69 4724 #define __pyx_kp_s_Incompatible_checksums_0x_x_vs_0 __pyx_mstate_global->__pyx_kp_s_Incompatible_checksums_0x_x_vs_0
jpayne@69 4725 #define __pyx_n_s_KeyError __pyx_mstate_global->__pyx_n_s_KeyError
jpayne@69 4726 #define __pyx_n_s_MemoryError __pyx_mstate_global->__pyx_n_s_MemoryError
jpayne@69 4727 #define __pyx_kp_u_None __pyx_mstate_global->__pyx_kp_u_None
jpayne@69 4728 #define __pyx_n_s_PickleError __pyx_mstate_global->__pyx_n_s_PickleError
jpayne@69 4729 #define __pyx_n_s_StopIteration __pyx_mstate_global->__pyx_n_s_StopIteration
jpayne@69 4730 #define __pyx_n_s_TypeError __pyx_mstate_global->__pyx_n_s_TypeError
jpayne@69 4731 #define __pyx_n_s_ValueError __pyx_mstate_global->__pyx_n_s_ValueError
jpayne@69 4732 #define __pyx_kp_u__11 __pyx_mstate_global->__pyx_kp_u__11
jpayne@69 4733 #define __pyx_kp_u__16 __pyx_mstate_global->__pyx_kp_u__16
jpayne@69 4734 #define __pyx_kp_u__17 __pyx_mstate_global->__pyx_kp_u__17
jpayne@69 4735 #define __pyx_kp_u__18 __pyx_mstate_global->__pyx_kp_u__18
jpayne@69 4736 #define __pyx_kp_u__19 __pyx_mstate_global->__pyx_kp_u__19
jpayne@69 4737 #define __pyx_kp_b__4 __pyx_mstate_global->__pyx_kp_b__4
jpayne@69 4738 #define __pyx_kp_u__47 __pyx_mstate_global->__pyx_kp_u__47
jpayne@69 4739 #define __pyx_n_s__48 __pyx_mstate_global->__pyx_n_s__48
jpayne@69 4740 #define __pyx_n_s__68 __pyx_mstate_global->__pyx_n_s__68
jpayne@69 4741 #define __pyx_n_s_all __pyx_mstate_global->__pyx_n_s_all
jpayne@69 4742 #define __pyx_n_s_append __pyx_mstate_global->__pyx_n_s_append
jpayne@69 4743 #define __pyx_n_s_asyncio_coroutines __pyx_mstate_global->__pyx_n_s_asyncio_coroutines
jpayne@69 4744 #define __pyx_n_s_bindex_filename __pyx_mstate_global->__pyx_n_s_bindex_filename
jpayne@69 4745 #define __pyx_n_s_bindex_filename_compressed __pyx_mstate_global->__pyx_n_s_bindex_filename_compressed
jpayne@69 4746 #define __pyx_kp_u_calling_len_on_closed_file __pyx_mstate_global->__pyx_kp_u_calling_len_on_closed_file
jpayne@69 4747 #define __pyx_kp_u_can_not_write_record_without_a_s __pyx_mstate_global->__pyx_kp_u_can_not_write_record_without_a_s
jpayne@69 4748 #define __pyx_kp_u_can_not_write_record_without_nam __pyx_mstate_global->__pyx_kp_u_can_not_write_record_without_nam
jpayne@69 4749 #define __pyx_n_s_cfilename __pyx_mstate_global->__pyx_n_s_cfilename
jpayne@69 4750 #define __pyx_n_s_cindexname __pyx_mstate_global->__pyx_n_s_cindexname
jpayne@69 4751 #define __pyx_n_s_cindexname_compressed __pyx_mstate_global->__pyx_n_s_cindexname_compressed
jpayne@69 4752 #define __pyx_n_s_class_getitem __pyx_mstate_global->__pyx_n_s_class_getitem
jpayne@69 4753 #define __pyx_n_s_cline_in_traceback __pyx_mstate_global->__pyx_n_s_cline_in_traceback
jpayne@69 4754 #define __pyx_n_s_close __pyx_mstate_global->__pyx_n_s_close
jpayne@69 4755 #define __pyx_n_s_comment __pyx_mstate_global->__pyx_n_s_comment
jpayne@69 4756 #define __pyx_n_s_contig __pyx_mstate_global->__pyx_n_s_contig
jpayne@69 4757 #define __pyx_n_s_contig_b __pyx_mstate_global->__pyx_n_s_contig_b
jpayne@69 4758 #define __pyx_n_s_copy __pyx_mstate_global->__pyx_n_s_copy
jpayne@69 4759 #define __pyx_n_s_deepcopy __pyx_mstate_global->__pyx_n_s_deepcopy
jpayne@69 4760 #define __pyx_n_s_dict __pyx_mstate_global->__pyx_n_s_dict
jpayne@69 4761 #define __pyx_n_s_dict_2 __pyx_mstate_global->__pyx_n_s_dict_2
jpayne@69 4762 #define __pyx_kp_u_disable __pyx_mstate_global->__pyx_kp_u_disable
jpayne@69 4763 #define __pyx_kp_u_do_not_instantiate_FastqProxy_di __pyx_mstate_global->__pyx_kp_u_do_not_instantiate_FastqProxy_di
jpayne@69 4764 #define __pyx_kp_u_enable __pyx_mstate_global->__pyx_kp_u_enable
jpayne@69 4765 #define __pyx_n_s_end __pyx_mstate_global->__pyx_n_s_end
jpayne@69 4766 #define __pyx_n_s_enter __pyx_mstate_global->__pyx_n_s_enter
jpayne@69 4767 #define __pyx_kp_u_error_when_opening_file_s __pyx_mstate_global->__pyx_kp_u_error_when_opening_file_s
jpayne@69 4768 #define __pyx_n_s_exc_type __pyx_mstate_global->__pyx_n_s_exc_type
jpayne@69 4769 #define __pyx_n_s_exc_value __pyx_mstate_global->__pyx_n_s_exc_value
jpayne@69 4770 #define __pyx_n_s_exists __pyx_mstate_global->__pyx_n_s_exists
jpayne@69 4771 #define __pyx_n_s_exit __pyx_mstate_global->__pyx_n_s_exit
jpayne@69 4772 #define __pyx_kp_u_failure_when_retrieving_sequence __pyx_mstate_global->__pyx_kp_u_failure_when_retrieving_sequence
jpayne@69 4773 #define __pyx_n_s_fetch __pyx_mstate_global->__pyx_n_s_fetch
jpayne@69 4774 #define __pyx_kp_u_file_s_not_found __pyx_mstate_global->__pyx_kp_u_file_s_not_found
jpayne@69 4775 #define __pyx_n_s_filename __pyx_mstate_global->__pyx_n_s_filename
jpayne@69 4776 #define __pyx_kp_u_filename_does_not_exist __pyx_mstate_global->__pyx_kp_u_filename_does_not_exist
jpayne@69 4777 #define __pyx_n_s_filepath_index __pyx_mstate_global->__pyx_n_s_filepath_index
jpayne@69 4778 #define __pyx_n_s_filepath_index_compressed __pyx_mstate_global->__pyx_n_s_filepath_index_compressed
jpayne@69 4779 #define __pyx_n_s_format __pyx_mstate_global->__pyx_n_s_format
jpayne@69 4780 #define __pyx_kp_u_gc __pyx_mstate_global->__pyx_kp_u_gc
jpayne@69 4781 #define __pyx_n_s_get_quality_array __pyx_mstate_global->__pyx_n_s_get_quality_array
jpayne@69 4782 #define __pyx_n_s_get_reference_length __pyx_mstate_global->__pyx_n_s_get_reference_length
jpayne@69 4783 #define __pyx_n_s_getstate __pyx_mstate_global->__pyx_n_s_getstate
jpayne@69 4784 #define __pyx_n_s_import __pyx_mstate_global->__pyx_n_s_import
jpayne@69 4785 #define __pyx_n_s_initializing __pyx_mstate_global->__pyx_n_s_initializing
jpayne@69 4786 #define __pyx_n_s_is_coroutine __pyx_mstate_global->__pyx_n_s_is_coroutine
jpayne@69 4787 #define __pyx_n_s_is_open __pyx_mstate_global->__pyx_n_s_is_open
jpayne@69 4788 #define __pyx_kp_u_isenabled __pyx_mstate_global->__pyx_kp_u_isenabled
jpayne@69 4789 #define __pyx_n_s_length __pyx_mstate_global->__pyx_n_s_length
jpayne@69 4790 #define __pyx_n_s_main __pyx_mstate_global->__pyx_n_s_main
jpayne@69 4791 #define __pyx_n_s_memo __pyx_mstate_global->__pyx_n_s_memo
jpayne@69 4792 #define __pyx_n_s_name __pyx_mstate_global->__pyx_n_s_name
jpayne@69 4793 #define __pyx_n_s_name_2 __pyx_mstate_global->__pyx_n_s_name_2
jpayne@69 4794 #define __pyx_n_s_new __pyx_mstate_global->__pyx_n_s_new
jpayne@69 4795 #define __pyx_kp_s_no_default___reduce___due_to_non __pyx_mstate_global->__pyx_kp_s_no_default___reduce___due_to_non
jpayne@69 4796 #define __pyx_kp_u_no_sequence_region_supplied __pyx_mstate_global->__pyx_kp_u_no_sequence_region_supplied
jpayne@69 4797 #define __pyx_n_s_nreferences __pyx_mstate_global->__pyx_n_s_nreferences
jpayne@69 4798 #define __pyx_n_s_offset __pyx_mstate_global->__pyx_n_s_offset
jpayne@69 4799 #define __pyx_n_s_open __pyx_mstate_global->__pyx_n_s_open
jpayne@69 4800 #define __pyx_n_s_os __pyx_mstate_global->__pyx_n_s_os
jpayne@69 4801 #define __pyx_n_s_path __pyx_mstate_global->__pyx_n_s_path
jpayne@69 4802 #define __pyx_n_s_persist __pyx_mstate_global->__pyx_n_s_persist
jpayne@69 4803 #define __pyx_n_s_pickle __pyx_mstate_global->__pyx_n_s_pickle
jpayne@69 4804 #define __pyx_n_s_proxy __pyx_mstate_global->__pyx_n_s_proxy
jpayne@69 4805 #define __pyx_n_s_pysam_libcfaidx __pyx_mstate_global->__pyx_n_s_pysam_libcfaidx
jpayne@69 4806 #define __pyx_kp_s_pysam_libcfaidx_pyx __pyx_mstate_global->__pyx_kp_s_pysam_libcfaidx_pyx
jpayne@69 4807 #define __pyx_n_s_pyx_PickleError __pyx_mstate_global->__pyx_n_s_pyx_PickleError
jpayne@69 4808 #define __pyx_n_s_pyx_checksum __pyx_mstate_global->__pyx_n_s_pyx_checksum
jpayne@69 4809 #define __pyx_n_s_pyx_result __pyx_mstate_global->__pyx_n_s_pyx_result
jpayne@69 4810 #define __pyx_n_s_pyx_state __pyx_mstate_global->__pyx_n_s_pyx_state
jpayne@69 4811 #define __pyx_n_s_pyx_type __pyx_mstate_global->__pyx_n_s_pyx_type
jpayne@69 4812 #define __pyx_n_s_pyx_unpickle_FastxRecord __pyx_mstate_global->__pyx_n_s_pyx_unpickle_FastxRecord
jpayne@69 4813 #define __pyx_n_s_pyx_vtable __pyx_mstate_global->__pyx_n_s_pyx_vtable
jpayne@69 4814 #define __pyx_n_s_quality __pyx_mstate_global->__pyx_n_s_quality
jpayne@69 4815 #define __pyx_n_s_re __pyx_mstate_global->__pyx_n_s_re
jpayne@69 4816 #define __pyx_n_s_reduce __pyx_mstate_global->__pyx_n_s_reduce
jpayne@69 4817 #define __pyx_n_s_reduce_cython __pyx_mstate_global->__pyx_n_s_reduce_cython
jpayne@69 4818 #define __pyx_n_s_reduce_ex __pyx_mstate_global->__pyx_n_s_reduce_ex
jpayne@69 4819 #define __pyx_n_s_ref __pyx_mstate_global->__pyx_n_s_ref
jpayne@69 4820 #define __pyx_n_s_reference __pyx_mstate_global->__pyx_n_s_reference
jpayne@69 4821 #define __pyx_n_s_references __pyx_mstate_global->__pyx_n_s_references
jpayne@69 4822 #define __pyx_n_s_region __pyx_mstate_global->__pyx_n_s_region
jpayne@69 4823 #define __pyx_n_s_rend __pyx_mstate_global->__pyx_n_s_rend
jpayne@69 4824 #define __pyx_n_s_rstart __pyx_mstate_global->__pyx_n_s_rstart
jpayne@69 4825 #define __pyx_kp_u_s __pyx_mstate_global->__pyx_kp_u_s
jpayne@69 4826 #define __pyx_n_s_s_2 __pyx_mstate_global->__pyx_n_s_s_2
jpayne@69 4827 #define __pyx_n_s_self __pyx_mstate_global->__pyx_n_s_self
jpayne@69 4828 #define __pyx_kp_s_self__delegate_cannot_be_convert __pyx_mstate_global->__pyx_kp_s_self__delegate_cannot_be_convert
jpayne@69 4829 #define __pyx_n_s_seq __pyx_mstate_global->__pyx_n_s_seq
jpayne@69 4830 #define __pyx_n_s_sequence __pyx_mstate_global->__pyx_n_s_sequence
jpayne@69 4831 #define __pyx_kp_u_sequence_and_quality_length_do_n __pyx_mstate_global->__pyx_kp_u_sequence_and_quality_length_do_n
jpayne@69 4832 #define __pyx_kp_u_sequence_s_not_present __pyx_mstate_global->__pyx_kp_u_sequence_s_not_present
jpayne@69 4833 #define __pyx_n_s_set_comment __pyx_mstate_global->__pyx_n_s_set_comment
jpayne@69 4834 #define __pyx_n_s_set_name __pyx_mstate_global->__pyx_n_s_set_name
jpayne@69 4835 #define __pyx_n_s_set_sequence __pyx_mstate_global->__pyx_n_s_set_sequence
jpayne@69 4836 #define __pyx_n_s_setstate __pyx_mstate_global->__pyx_n_s_setstate
jpayne@69 4837 #define __pyx_n_s_setstate_cython __pyx_mstate_global->__pyx_n_s_setstate_cython
jpayne@69 4838 #define __pyx_n_s_spec __pyx_mstate_global->__pyx_n_s_spec
jpayne@69 4839 #define __pyx_n_s_ss __pyx_mstate_global->__pyx_n_s_ss
jpayne@69 4840 #define __pyx_n_s_start __pyx_mstate_global->__pyx_n_s_start
jpayne@69 4841 #define __pyx_n_s_state __pyx_mstate_global->__pyx_n_s_state
jpayne@69 4842 #define __pyx_kp_s_stringsource __pyx_mstate_global->__pyx_kp_s_stringsource
jpayne@69 4843 #define __pyx_n_s_sys __pyx_mstate_global->__pyx_n_s_sys
jpayne@69 4844 #define __pyx_n_s_test __pyx_mstate_global->__pyx_n_s_test
jpayne@69 4845 #define __pyx_n_s_traceback __pyx_mstate_global->__pyx_n_s_traceback
jpayne@69 4846 #define __pyx_kp_u_truncated_quality_string_in_0 __pyx_mstate_global->__pyx_kp_u_truncated_quality_string_in_0
jpayne@69 4847 #define __pyx_kp_u_unknown_problem_parsing_0 __pyx_mstate_global->__pyx_kp_u_unknown_problem_parsing_0
jpayne@69 4848 #define __pyx_n_s_update __pyx_mstate_global->__pyx_n_s_update
jpayne@69 4849 #define __pyx_n_s_use_setstate __pyx_mstate_global->__pyx_n_s_use_setstate
jpayne@69 4850 #define __pyx_n_s_x __pyx_mstate_global->__pyx_n_s_x
jpayne@69 4851 #define __pyx_n_s_zip __pyx_mstate_global->__pyx_n_s_zip
jpayne@69 4852 #define __pyx_int_33 __pyx_mstate_global->__pyx_int_33
jpayne@69 4853 #define __pyx_int_29210129 __pyx_mstate_global->__pyx_int_29210129
jpayne@69 4854 #define __pyx_int_71291217 __pyx_mstate_global->__pyx_int_71291217
jpayne@69 4855 #define __pyx_int_191400582 __pyx_mstate_global->__pyx_int_191400582
jpayne@69 4856 #define __pyx_codeobj_ __pyx_mstate_global->__pyx_codeobj_
jpayne@69 4857 #define __pyx_tuple__2 __pyx_mstate_global->__pyx_tuple__2
jpayne@69 4858 #define __pyx_tuple__9 __pyx_mstate_global->__pyx_tuple__9
jpayne@69 4859 #define __pyx_tuple__10 __pyx_mstate_global->__pyx_tuple__10
jpayne@69 4860 #define __pyx_tuple__15 __pyx_mstate_global->__pyx_tuple__15
jpayne@69 4861 #define __pyx_tuple__25 __pyx_mstate_global->__pyx_tuple__25
jpayne@69 4862 #define __pyx_tuple__26 __pyx_mstate_global->__pyx_tuple__26
jpayne@69 4863 #define __pyx_tuple__28 __pyx_mstate_global->__pyx_tuple__28
jpayne@69 4864 #define __pyx_tuple__46 __pyx_mstate_global->__pyx_tuple__46
jpayne@69 4865 #define __pyx_tuple__49 __pyx_mstate_global->__pyx_tuple__49
jpayne@69 4866 #define __pyx_tuple__50 __pyx_mstate_global->__pyx_tuple__50
jpayne@69 4867 #define __pyx_tuple__51 __pyx_mstate_global->__pyx_tuple__51
jpayne@69 4868 #define __pyx_tuple__52 __pyx_mstate_global->__pyx_tuple__52
jpayne@69 4869 #define __pyx_tuple__53 __pyx_mstate_global->__pyx_tuple__53
jpayne@69 4870 #define __pyx_tuple__54 __pyx_mstate_global->__pyx_tuple__54
jpayne@69 4871 #define __pyx_tuple__55 __pyx_mstate_global->__pyx_tuple__55
jpayne@69 4872 #define __pyx_tuple__56 __pyx_mstate_global->__pyx_tuple__56
jpayne@69 4873 #define __pyx_tuple__57 __pyx_mstate_global->__pyx_tuple__57
jpayne@69 4874 #define __pyx_tuple__58 __pyx_mstate_global->__pyx_tuple__58
jpayne@69 4875 #define __pyx_tuple__59 __pyx_mstate_global->__pyx_tuple__59
jpayne@69 4876 #define __pyx_tuple__60 __pyx_mstate_global->__pyx_tuple__60
jpayne@69 4877 #define __pyx_tuple__61 __pyx_mstate_global->__pyx_tuple__61
jpayne@69 4878 #define __pyx_tuple__62 __pyx_mstate_global->__pyx_tuple__62
jpayne@69 4879 #define __pyx_tuple__63 __pyx_mstate_global->__pyx_tuple__63
jpayne@69 4880 #define __pyx_tuple__64 __pyx_mstate_global->__pyx_tuple__64
jpayne@69 4881 #define __pyx_tuple__65 __pyx_mstate_global->__pyx_tuple__65
jpayne@69 4882 #define __pyx_tuple__66 __pyx_mstate_global->__pyx_tuple__66
jpayne@69 4883 #define __pyx_tuple__67 __pyx_mstate_global->__pyx_tuple__67
jpayne@69 4884 #define __pyx_codeobj__3 __pyx_mstate_global->__pyx_codeobj__3
jpayne@69 4885 #define __pyx_codeobj__5 __pyx_mstate_global->__pyx_codeobj__5
jpayne@69 4886 #define __pyx_codeobj__6 __pyx_mstate_global->__pyx_codeobj__6
jpayne@69 4887 #define __pyx_codeobj__7 __pyx_mstate_global->__pyx_codeobj__7
jpayne@69 4888 #define __pyx_codeobj__8 __pyx_mstate_global->__pyx_codeobj__8
jpayne@69 4889 #define __pyx_codeobj__12 __pyx_mstate_global->__pyx_codeobj__12
jpayne@69 4890 #define __pyx_codeobj__13 __pyx_mstate_global->__pyx_codeobj__13
jpayne@69 4891 #define __pyx_codeobj__14 __pyx_mstate_global->__pyx_codeobj__14
jpayne@69 4892 #define __pyx_codeobj__20 __pyx_mstate_global->__pyx_codeobj__20
jpayne@69 4893 #define __pyx_codeobj__21 __pyx_mstate_global->__pyx_codeobj__21
jpayne@69 4894 #define __pyx_codeobj__22 __pyx_mstate_global->__pyx_codeobj__22
jpayne@69 4895 #define __pyx_codeobj__23 __pyx_mstate_global->__pyx_codeobj__23
jpayne@69 4896 #define __pyx_codeobj__24 __pyx_mstate_global->__pyx_codeobj__24
jpayne@69 4897 #define __pyx_codeobj__27 __pyx_mstate_global->__pyx_codeobj__27
jpayne@69 4898 #define __pyx_codeobj__29 __pyx_mstate_global->__pyx_codeobj__29
jpayne@69 4899 #define __pyx_codeobj__30 __pyx_mstate_global->__pyx_codeobj__30
jpayne@69 4900 #define __pyx_codeobj__31 __pyx_mstate_global->__pyx_codeobj__31
jpayne@69 4901 #define __pyx_codeobj__32 __pyx_mstate_global->__pyx_codeobj__32
jpayne@69 4902 #define __pyx_codeobj__33 __pyx_mstate_global->__pyx_codeobj__33
jpayne@69 4903 #define __pyx_codeobj__34 __pyx_mstate_global->__pyx_codeobj__34
jpayne@69 4904 #define __pyx_codeobj__35 __pyx_mstate_global->__pyx_codeobj__35
jpayne@69 4905 #define __pyx_codeobj__36 __pyx_mstate_global->__pyx_codeobj__36
jpayne@69 4906 #define __pyx_codeobj__37 __pyx_mstate_global->__pyx_codeobj__37
jpayne@69 4907 #define __pyx_codeobj__38 __pyx_mstate_global->__pyx_codeobj__38
jpayne@69 4908 #define __pyx_codeobj__39 __pyx_mstate_global->__pyx_codeobj__39
jpayne@69 4909 #define __pyx_codeobj__40 __pyx_mstate_global->__pyx_codeobj__40
jpayne@69 4910 #define __pyx_codeobj__41 __pyx_mstate_global->__pyx_codeobj__41
jpayne@69 4911 #define __pyx_codeobj__42 __pyx_mstate_global->__pyx_codeobj__42
jpayne@69 4912 #define __pyx_codeobj__43 __pyx_mstate_global->__pyx_codeobj__43
jpayne@69 4913 #define __pyx_codeobj__44 __pyx_mstate_global->__pyx_codeobj__44
jpayne@69 4914 #define __pyx_codeobj__45 __pyx_mstate_global->__pyx_codeobj__45
jpayne@69 4915 /* #### Code section: module_code ### */
jpayne@69 4916
jpayne@69 4917 /* "cpython/complex.pxd":19
jpayne@69 4918 *
jpayne@69 4919 * @property
jpayne@69 4920 * cdef inline double real(self) noexcept: # <<<<<<<<<<<<<<
jpayne@69 4921 * return self.cval.real
jpayne@69 4922 *
jpayne@69 4923 */
jpayne@69 4924
jpayne@69 4925 static CYTHON_INLINE double __pyx_f_7cpython_7complex_7complex_4real_real(PyComplexObject *__pyx_v_self) {
jpayne@69 4926 double __pyx_r;
jpayne@69 4927
jpayne@69 4928 /* "cpython/complex.pxd":20
jpayne@69 4929 * @property
jpayne@69 4930 * cdef inline double real(self) noexcept:
jpayne@69 4931 * return self.cval.real # <<<<<<<<<<<<<<
jpayne@69 4932 *
jpayne@69 4933 * @property
jpayne@69 4934 */
jpayne@69 4935 __pyx_r = __pyx_v_self->cval.real;
jpayne@69 4936 goto __pyx_L0;
jpayne@69 4937
jpayne@69 4938 /* "cpython/complex.pxd":19
jpayne@69 4939 *
jpayne@69 4940 * @property
jpayne@69 4941 * cdef inline double real(self) noexcept: # <<<<<<<<<<<<<<
jpayne@69 4942 * return self.cval.real
jpayne@69 4943 *
jpayne@69 4944 */
jpayne@69 4945
jpayne@69 4946 /* function exit code */
jpayne@69 4947 __pyx_L0:;
jpayne@69 4948 return __pyx_r;
jpayne@69 4949 }
jpayne@69 4950
jpayne@69 4951 /* "cpython/complex.pxd":23
jpayne@69 4952 *
jpayne@69 4953 * @property
jpayne@69 4954 * cdef inline double imag(self) noexcept: # <<<<<<<<<<<<<<
jpayne@69 4955 * return self.cval.imag
jpayne@69 4956 *
jpayne@69 4957 */
jpayne@69 4958
jpayne@69 4959 static CYTHON_INLINE double __pyx_f_7cpython_7complex_7complex_4imag_imag(PyComplexObject *__pyx_v_self) {
jpayne@69 4960 double __pyx_r;
jpayne@69 4961
jpayne@69 4962 /* "cpython/complex.pxd":24
jpayne@69 4963 * @property
jpayne@69 4964 * cdef inline double imag(self) noexcept:
jpayne@69 4965 * return self.cval.imag # <<<<<<<<<<<<<<
jpayne@69 4966 *
jpayne@69 4967 * # PyTypeObject PyComplex_Type
jpayne@69 4968 */
jpayne@69 4969 __pyx_r = __pyx_v_self->cval.imag;
jpayne@69 4970 goto __pyx_L0;
jpayne@69 4971
jpayne@69 4972 /* "cpython/complex.pxd":23
jpayne@69 4973 *
jpayne@69 4974 * @property
jpayne@69 4975 * cdef inline double imag(self) noexcept: # <<<<<<<<<<<<<<
jpayne@69 4976 * return self.cval.imag
jpayne@69 4977 *
jpayne@69 4978 */
jpayne@69 4979
jpayne@69 4980 /* function exit code */
jpayne@69 4981 __pyx_L0:;
jpayne@69 4982 return __pyx_r;
jpayne@69 4983 }
jpayne@69 4984
jpayne@69 4985 /* "cpython/contextvars.pxd":112
jpayne@69 4986 *
jpayne@69 4987 *
jpayne@69 4988 * cdef inline object get_value(var, default_value=None): # <<<<<<<<<<<<<<
jpayne@69 4989 * """Return a new reference to the value of the context variable,
jpayne@69 4990 * or the default value of the context variable,
jpayne@69 4991 */
jpayne@69 4992
jpayne@69 4993 static CYTHON_INLINE PyObject *__pyx_f_7cpython_11contextvars_get_value(PyObject *__pyx_v_var, struct __pyx_opt_args_7cpython_11contextvars_get_value *__pyx_optional_args) {
jpayne@69 4994 PyObject *__pyx_v_default_value = ((PyObject *)Py_None);
jpayne@69 4995 PyObject *__pyx_v_value;
jpayne@69 4996 PyObject *__pyx_v_pyvalue = NULL;
jpayne@69 4997 PyObject *__pyx_r = NULL;
jpayne@69 4998 __Pyx_RefNannyDeclarations
jpayne@69 4999 int __pyx_t_1;
jpayne@69 5000 int __pyx_t_2;
jpayne@69 5001 PyObject *__pyx_t_3 = NULL;
jpayne@69 5002 int __pyx_lineno = 0;
jpayne@69 5003 const char *__pyx_filename = NULL;
jpayne@69 5004 int __pyx_clineno = 0;
jpayne@69 5005 __Pyx_RefNannySetupContext("get_value", 1);
jpayne@69 5006 if (__pyx_optional_args) {
jpayne@69 5007 if (__pyx_optional_args->__pyx_n > 0) {
jpayne@69 5008 __pyx_v_default_value = __pyx_optional_args->default_value;
jpayne@69 5009 }
jpayne@69 5010 }
jpayne@69 5011
jpayne@69 5012 /* "cpython/contextvars.pxd":117
jpayne@69 5013 * or None if no such value or default was found.
jpayne@69 5014 * """
jpayne@69 5015 * cdef PyObject *value = NULL # <<<<<<<<<<<<<<
jpayne@69 5016 * PyContextVar_Get(var, NULL, &value)
jpayne@69 5017 * if value is NULL:
jpayne@69 5018 */
jpayne@69 5019 __pyx_v_value = NULL;
jpayne@69 5020
jpayne@69 5021 /* "cpython/contextvars.pxd":118
jpayne@69 5022 * """
jpayne@69 5023 * cdef PyObject *value = NULL
jpayne@69 5024 * PyContextVar_Get(var, NULL, &value) # <<<<<<<<<<<<<<
jpayne@69 5025 * if value is NULL:
jpayne@69 5026 * # context variable does not have a default
jpayne@69 5027 */
jpayne@69 5028 __pyx_t_1 = PyContextVar_Get(__pyx_v_var, NULL, (&__pyx_v_value)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(2, 118, __pyx_L1_error)
jpayne@69 5029
jpayne@69 5030 /* "cpython/contextvars.pxd":119
jpayne@69 5031 * cdef PyObject *value = NULL
jpayne@69 5032 * PyContextVar_Get(var, NULL, &value)
jpayne@69 5033 * if value is NULL: # <<<<<<<<<<<<<<
jpayne@69 5034 * # context variable does not have a default
jpayne@69 5035 * pyvalue = default_value
jpayne@69 5036 */
jpayne@69 5037 __pyx_t_2 = (__pyx_v_value == NULL);
jpayne@69 5038 if (__pyx_t_2) {
jpayne@69 5039
jpayne@69 5040 /* "cpython/contextvars.pxd":121
jpayne@69 5041 * if value is NULL:
jpayne@69 5042 * # context variable does not have a default
jpayne@69 5043 * pyvalue = default_value # <<<<<<<<<<<<<<
jpayne@69 5044 * else:
jpayne@69 5045 * # value or default value of context variable
jpayne@69 5046 */
jpayne@69 5047 __Pyx_INCREF(__pyx_v_default_value);
jpayne@69 5048 __pyx_v_pyvalue = __pyx_v_default_value;
jpayne@69 5049
jpayne@69 5050 /* "cpython/contextvars.pxd":119
jpayne@69 5051 * cdef PyObject *value = NULL
jpayne@69 5052 * PyContextVar_Get(var, NULL, &value)
jpayne@69 5053 * if value is NULL: # <<<<<<<<<<<<<<
jpayne@69 5054 * # context variable does not have a default
jpayne@69 5055 * pyvalue = default_value
jpayne@69 5056 */
jpayne@69 5057 goto __pyx_L3;
jpayne@69 5058 }
jpayne@69 5059
jpayne@69 5060 /* "cpython/contextvars.pxd":124
jpayne@69 5061 * else:
jpayne@69 5062 * # value or default value of context variable
jpayne@69 5063 * pyvalue = <object>value # <<<<<<<<<<<<<<
jpayne@69 5064 * Py_XDECREF(value) # PyContextVar_Get() returned an owned reference as 'PyObject*'
jpayne@69 5065 * return pyvalue
jpayne@69 5066 */
jpayne@69 5067 /*else*/ {
jpayne@69 5068 __pyx_t_3 = ((PyObject *)__pyx_v_value);
jpayne@69 5069 __Pyx_INCREF(__pyx_t_3);
jpayne@69 5070 __pyx_v_pyvalue = __pyx_t_3;
jpayne@69 5071 __pyx_t_3 = 0;
jpayne@69 5072
jpayne@69 5073 /* "cpython/contextvars.pxd":125
jpayne@69 5074 * # value or default value of context variable
jpayne@69 5075 * pyvalue = <object>value
jpayne@69 5076 * Py_XDECREF(value) # PyContextVar_Get() returned an owned reference as 'PyObject*' # <<<<<<<<<<<<<<
jpayne@69 5077 * return pyvalue
jpayne@69 5078 *
jpayne@69 5079 */
jpayne@69 5080 Py_XDECREF(__pyx_v_value);
jpayne@69 5081 }
jpayne@69 5082 __pyx_L3:;
jpayne@69 5083
jpayne@69 5084 /* "cpython/contextvars.pxd":126
jpayne@69 5085 * pyvalue = <object>value
jpayne@69 5086 * Py_XDECREF(value) # PyContextVar_Get() returned an owned reference as 'PyObject*'
jpayne@69 5087 * return pyvalue # <<<<<<<<<<<<<<
jpayne@69 5088 *
jpayne@69 5089 *
jpayne@69 5090 */
jpayne@69 5091 __Pyx_XDECREF(__pyx_r);
jpayne@69 5092 __Pyx_INCREF(__pyx_v_pyvalue);
jpayne@69 5093 __pyx_r = __pyx_v_pyvalue;
jpayne@69 5094 goto __pyx_L0;
jpayne@69 5095
jpayne@69 5096 /* "cpython/contextvars.pxd":112
jpayne@69 5097 *
jpayne@69 5098 *
jpayne@69 5099 * cdef inline object get_value(var, default_value=None): # <<<<<<<<<<<<<<
jpayne@69 5100 * """Return a new reference to the value of the context variable,
jpayne@69 5101 * or the default value of the context variable,
jpayne@69 5102 */
jpayne@69 5103
jpayne@69 5104 /* function exit code */
jpayne@69 5105 __pyx_L1_error:;
jpayne@69 5106 __Pyx_XDECREF(__pyx_t_3);
jpayne@69 5107 __Pyx_AddTraceback("cpython.contextvars.get_value", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 5108 __pyx_r = 0;
jpayne@69 5109 __pyx_L0:;
jpayne@69 5110 __Pyx_XDECREF(__pyx_v_pyvalue);
jpayne@69 5111 __Pyx_XGIVEREF(__pyx_r);
jpayne@69 5112 __Pyx_RefNannyFinishContext();
jpayne@69 5113 return __pyx_r;
jpayne@69 5114 }
jpayne@69 5115
jpayne@69 5116 /* "cpython/contextvars.pxd":129
jpayne@69 5117 *
jpayne@69 5118 *
jpayne@69 5119 * cdef inline object get_value_no_default(var, default_value=None): # <<<<<<<<<<<<<<
jpayne@69 5120 * """Return a new reference to the value of the context variable,
jpayne@69 5121 * or the provided default value if no such value was found.
jpayne@69 5122 */
jpayne@69 5123
jpayne@69 5124 static CYTHON_INLINE PyObject *__pyx_f_7cpython_11contextvars_get_value_no_default(PyObject *__pyx_v_var, struct __pyx_opt_args_7cpython_11contextvars_get_value_no_default *__pyx_optional_args) {
jpayne@69 5125 PyObject *__pyx_v_default_value = ((PyObject *)Py_None);
jpayne@69 5126 PyObject *__pyx_v_value;
jpayne@69 5127 PyObject *__pyx_v_pyvalue = NULL;
jpayne@69 5128 PyObject *__pyx_r = NULL;
jpayne@69 5129 __Pyx_RefNannyDeclarations
jpayne@69 5130 int __pyx_t_1;
jpayne@69 5131 PyObject *__pyx_t_2 = NULL;
jpayne@69 5132 int __pyx_lineno = 0;
jpayne@69 5133 const char *__pyx_filename = NULL;
jpayne@69 5134 int __pyx_clineno = 0;
jpayne@69 5135 __Pyx_RefNannySetupContext("get_value_no_default", 1);
jpayne@69 5136 if (__pyx_optional_args) {
jpayne@69 5137 if (__pyx_optional_args->__pyx_n > 0) {
jpayne@69 5138 __pyx_v_default_value = __pyx_optional_args->default_value;
jpayne@69 5139 }
jpayne@69 5140 }
jpayne@69 5141
jpayne@69 5142 /* "cpython/contextvars.pxd":135
jpayne@69 5143 * Ignores the default value of the context variable, if any.
jpayne@69 5144 * """
jpayne@69 5145 * cdef PyObject *value = NULL # <<<<<<<<<<<<<<
jpayne@69 5146 * PyContextVar_Get(var, <PyObject*>default_value, &value)
jpayne@69 5147 * # value of context variable or 'default_value'
jpayne@69 5148 */
jpayne@69 5149 __pyx_v_value = NULL;
jpayne@69 5150
jpayne@69 5151 /* "cpython/contextvars.pxd":136
jpayne@69 5152 * """
jpayne@69 5153 * cdef PyObject *value = NULL
jpayne@69 5154 * PyContextVar_Get(var, <PyObject*>default_value, &value) # <<<<<<<<<<<<<<
jpayne@69 5155 * # value of context variable or 'default_value'
jpayne@69 5156 * pyvalue = <object>value
jpayne@69 5157 */
jpayne@69 5158 __pyx_t_1 = PyContextVar_Get(__pyx_v_var, ((PyObject *)__pyx_v_default_value), (&__pyx_v_value)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(2, 136, __pyx_L1_error)
jpayne@69 5159
jpayne@69 5160 /* "cpython/contextvars.pxd":138
jpayne@69 5161 * PyContextVar_Get(var, <PyObject*>default_value, &value)
jpayne@69 5162 * # value of context variable or 'default_value'
jpayne@69 5163 * pyvalue = <object>value # <<<<<<<<<<<<<<
jpayne@69 5164 * Py_XDECREF(value) # PyContextVar_Get() returned an owned reference as 'PyObject*'
jpayne@69 5165 * return pyvalue
jpayne@69 5166 */
jpayne@69 5167 __pyx_t_2 = ((PyObject *)__pyx_v_value);
jpayne@69 5168 __Pyx_INCREF(__pyx_t_2);
jpayne@69 5169 __pyx_v_pyvalue = __pyx_t_2;
jpayne@69 5170 __pyx_t_2 = 0;
jpayne@69 5171
jpayne@69 5172 /* "cpython/contextvars.pxd":139
jpayne@69 5173 * # value of context variable or 'default_value'
jpayne@69 5174 * pyvalue = <object>value
jpayne@69 5175 * Py_XDECREF(value) # PyContextVar_Get() returned an owned reference as 'PyObject*' # <<<<<<<<<<<<<<
jpayne@69 5176 * return pyvalue
jpayne@69 5177 */
jpayne@69 5178 Py_XDECREF(__pyx_v_value);
jpayne@69 5179
jpayne@69 5180 /* "cpython/contextvars.pxd":140
jpayne@69 5181 * pyvalue = <object>value
jpayne@69 5182 * Py_XDECREF(value) # PyContextVar_Get() returned an owned reference as 'PyObject*'
jpayne@69 5183 * return pyvalue # <<<<<<<<<<<<<<
jpayne@69 5184 */
jpayne@69 5185 __Pyx_XDECREF(__pyx_r);
jpayne@69 5186 __Pyx_INCREF(__pyx_v_pyvalue);
jpayne@69 5187 __pyx_r = __pyx_v_pyvalue;
jpayne@69 5188 goto __pyx_L0;
jpayne@69 5189
jpayne@69 5190 /* "cpython/contextvars.pxd":129
jpayne@69 5191 *
jpayne@69 5192 *
jpayne@69 5193 * cdef inline object get_value_no_default(var, default_value=None): # <<<<<<<<<<<<<<
jpayne@69 5194 * """Return a new reference to the value of the context variable,
jpayne@69 5195 * or the provided default value if no such value was found.
jpayne@69 5196 */
jpayne@69 5197
jpayne@69 5198 /* function exit code */
jpayne@69 5199 __pyx_L1_error:;
jpayne@69 5200 __Pyx_XDECREF(__pyx_t_2);
jpayne@69 5201 __Pyx_AddTraceback("cpython.contextvars.get_value_no_default", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 5202 __pyx_r = 0;
jpayne@69 5203 __pyx_L0:;
jpayne@69 5204 __Pyx_XDECREF(__pyx_v_pyvalue);
jpayne@69 5205 __Pyx_XGIVEREF(__pyx_r);
jpayne@69 5206 __Pyx_RefNannyFinishContext();
jpayne@69 5207 return __pyx_r;
jpayne@69 5208 }
jpayne@69 5209
jpayne@69 5210 /* "array.pxd":104
jpayne@69 5211 * __data_union data
jpayne@69 5212 *
jpayne@69 5213 * def __getbuffer__(self, Py_buffer* info, int flags): # <<<<<<<<<<<<<<
jpayne@69 5214 * # This implementation of getbuffer is geared towards Cython
jpayne@69 5215 * # requirements, and does not yet fulfill the PEP.
jpayne@69 5216 */
jpayne@69 5217
jpayne@69 5218 /* Python wrapper */
jpayne@69 5219 CYTHON_UNUSED static int __pyx_pw_7cpython_5array_5array_1__getbuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags); /*proto*/
jpayne@69 5220 CYTHON_UNUSED static int __pyx_pw_7cpython_5array_5array_1__getbuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info, int __pyx_v_flags) {
jpayne@69 5221 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@69 5222 int __pyx_r;
jpayne@69 5223 __Pyx_RefNannyDeclarations
jpayne@69 5224 __Pyx_RefNannySetupContext("__getbuffer__ (wrapper)", 0);
jpayne@69 5225 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
jpayne@69 5226 __pyx_r = __pyx_pf_7cpython_5array_5array___getbuffer__(((arrayobject *)__pyx_v_self), ((Py_buffer *)__pyx_v_info), ((int)__pyx_v_flags));
jpayne@69 5227
jpayne@69 5228 /* function exit code */
jpayne@69 5229 __Pyx_RefNannyFinishContext();
jpayne@69 5230 return __pyx_r;
jpayne@69 5231 }
jpayne@69 5232
jpayne@69 5233 static int __pyx_pf_7cpython_5array_5array___getbuffer__(arrayobject *__pyx_v_self, Py_buffer *__pyx_v_info, CYTHON_UNUSED int __pyx_v_flags) {
jpayne@69 5234 PyObject *__pyx_v_item_count = NULL;
jpayne@69 5235 int __pyx_r;
jpayne@69 5236 __Pyx_RefNannyDeclarations
jpayne@69 5237 PyObject *__pyx_t_1 = NULL;
jpayne@69 5238 char *__pyx_t_2;
jpayne@69 5239 int __pyx_t_3;
jpayne@69 5240 PyObject *__pyx_t_4 = NULL;
jpayne@69 5241 Py_ssize_t __pyx_t_5;
jpayne@69 5242 int __pyx_t_6;
jpayne@69 5243 char __pyx_t_7;
jpayne@69 5244 int __pyx_lineno = 0;
jpayne@69 5245 const char *__pyx_filename = NULL;
jpayne@69 5246 int __pyx_clineno = 0;
jpayne@69 5247 if (unlikely(__pyx_v_info == NULL)) {
jpayne@69 5248 PyErr_SetString(PyExc_BufferError, "PyObject_GetBuffer: view==NULL argument is obsolete");
jpayne@69 5249 return -1;
jpayne@69 5250 }
jpayne@69 5251 __Pyx_RefNannySetupContext("__getbuffer__", 0);
jpayne@69 5252 __pyx_v_info->obj = Py_None; __Pyx_INCREF(Py_None);
jpayne@69 5253 __Pyx_GIVEREF(__pyx_v_info->obj);
jpayne@69 5254
jpayne@69 5255 /* "array.pxd":109
jpayne@69 5256 * # In particular strided access is always provided regardless
jpayne@69 5257 * # of flags
jpayne@69 5258 * item_count = Py_SIZE(self) # <<<<<<<<<<<<<<
jpayne@69 5259 *
jpayne@69 5260 * info.suboffsets = NULL
jpayne@69 5261 */
jpayne@69 5262 __pyx_t_1 = PyInt_FromSsize_t(Py_SIZE(((PyObject *)__pyx_v_self))); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 109, __pyx_L1_error)
jpayne@69 5263 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 5264 __pyx_v_item_count = __pyx_t_1;
jpayne@69 5265 __pyx_t_1 = 0;
jpayne@69 5266
jpayne@69 5267 /* "array.pxd":111
jpayne@69 5268 * item_count = Py_SIZE(self)
jpayne@69 5269 *
jpayne@69 5270 * info.suboffsets = NULL # <<<<<<<<<<<<<<
jpayne@69 5271 * info.buf = self.data.as_chars
jpayne@69 5272 * info.readonly = 0
jpayne@69 5273 */
jpayne@69 5274 __pyx_v_info->suboffsets = NULL;
jpayne@69 5275
jpayne@69 5276 /* "array.pxd":112
jpayne@69 5277 *
jpayne@69 5278 * info.suboffsets = NULL
jpayne@69 5279 * info.buf = self.data.as_chars # <<<<<<<<<<<<<<
jpayne@69 5280 * info.readonly = 0
jpayne@69 5281 * info.ndim = 1
jpayne@69 5282 */
jpayne@69 5283 __pyx_t_2 = __pyx_v_self->data.as_chars;
jpayne@69 5284 __pyx_v_info->buf = __pyx_t_2;
jpayne@69 5285
jpayne@69 5286 /* "array.pxd":113
jpayne@69 5287 * info.suboffsets = NULL
jpayne@69 5288 * info.buf = self.data.as_chars
jpayne@69 5289 * info.readonly = 0 # <<<<<<<<<<<<<<
jpayne@69 5290 * info.ndim = 1
jpayne@69 5291 * info.itemsize = self.ob_descr.itemsize # e.g. sizeof(float)
jpayne@69 5292 */
jpayne@69 5293 __pyx_v_info->readonly = 0;
jpayne@69 5294
jpayne@69 5295 /* "array.pxd":114
jpayne@69 5296 * info.buf = self.data.as_chars
jpayne@69 5297 * info.readonly = 0
jpayne@69 5298 * info.ndim = 1 # <<<<<<<<<<<<<<
jpayne@69 5299 * info.itemsize = self.ob_descr.itemsize # e.g. sizeof(float)
jpayne@69 5300 * info.len = info.itemsize * item_count
jpayne@69 5301 */
jpayne@69 5302 __pyx_v_info->ndim = 1;
jpayne@69 5303
jpayne@69 5304 /* "array.pxd":115
jpayne@69 5305 * info.readonly = 0
jpayne@69 5306 * info.ndim = 1
jpayne@69 5307 * info.itemsize = self.ob_descr.itemsize # e.g. sizeof(float) # <<<<<<<<<<<<<<
jpayne@69 5308 * info.len = info.itemsize * item_count
jpayne@69 5309 *
jpayne@69 5310 */
jpayne@69 5311 __pyx_t_3 = __pyx_v_self->ob_descr->itemsize;
jpayne@69 5312 __pyx_v_info->itemsize = __pyx_t_3;
jpayne@69 5313
jpayne@69 5314 /* "array.pxd":116
jpayne@69 5315 * info.ndim = 1
jpayne@69 5316 * info.itemsize = self.ob_descr.itemsize # e.g. sizeof(float)
jpayne@69 5317 * info.len = info.itemsize * item_count # <<<<<<<<<<<<<<
jpayne@69 5318 *
jpayne@69 5319 * info.shape = <Py_ssize_t*> PyObject_Malloc(sizeof(Py_ssize_t) + 2)
jpayne@69 5320 */
jpayne@69 5321 __pyx_t_1 = PyInt_FromSsize_t(__pyx_v_info->itemsize); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 116, __pyx_L1_error)
jpayne@69 5322 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 5323 __pyx_t_4 = PyNumber_Multiply(__pyx_t_1, __pyx_v_item_count); if (unlikely(!__pyx_t_4)) __PYX_ERR(3, 116, __pyx_L1_error)
jpayne@69 5324 __Pyx_GOTREF(__pyx_t_4);
jpayne@69 5325 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@69 5326 __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_t_4); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(3, 116, __pyx_L1_error)
jpayne@69 5327 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
jpayne@69 5328 __pyx_v_info->len = __pyx_t_5;
jpayne@69 5329
jpayne@69 5330 /* "array.pxd":118
jpayne@69 5331 * info.len = info.itemsize * item_count
jpayne@69 5332 *
jpayne@69 5333 * info.shape = <Py_ssize_t*> PyObject_Malloc(sizeof(Py_ssize_t) + 2) # <<<<<<<<<<<<<<
jpayne@69 5334 * if not info.shape:
jpayne@69 5335 * raise MemoryError()
jpayne@69 5336 */
jpayne@69 5337 __pyx_v_info->shape = ((Py_ssize_t *)PyObject_Malloc(((sizeof(Py_ssize_t)) + 2)));
jpayne@69 5338
jpayne@69 5339 /* "array.pxd":119
jpayne@69 5340 *
jpayne@69 5341 * info.shape = <Py_ssize_t*> PyObject_Malloc(sizeof(Py_ssize_t) + 2)
jpayne@69 5342 * if not info.shape: # <<<<<<<<<<<<<<
jpayne@69 5343 * raise MemoryError()
jpayne@69 5344 * info.shape[0] = item_count # constant regardless of resizing
jpayne@69 5345 */
jpayne@69 5346 __pyx_t_6 = (!(__pyx_v_info->shape != 0));
jpayne@69 5347 if (unlikely(__pyx_t_6)) {
jpayne@69 5348
jpayne@69 5349 /* "array.pxd":120
jpayne@69 5350 * info.shape = <Py_ssize_t*> PyObject_Malloc(sizeof(Py_ssize_t) + 2)
jpayne@69 5351 * if not info.shape:
jpayne@69 5352 * raise MemoryError() # <<<<<<<<<<<<<<
jpayne@69 5353 * info.shape[0] = item_count # constant regardless of resizing
jpayne@69 5354 * info.strides = &info.itemsize
jpayne@69 5355 */
jpayne@69 5356 PyErr_NoMemory(); __PYX_ERR(3, 120, __pyx_L1_error)
jpayne@69 5357
jpayne@69 5358 /* "array.pxd":119
jpayne@69 5359 *
jpayne@69 5360 * info.shape = <Py_ssize_t*> PyObject_Malloc(sizeof(Py_ssize_t) + 2)
jpayne@69 5361 * if not info.shape: # <<<<<<<<<<<<<<
jpayne@69 5362 * raise MemoryError()
jpayne@69 5363 * info.shape[0] = item_count # constant regardless of resizing
jpayne@69 5364 */
jpayne@69 5365 }
jpayne@69 5366
jpayne@69 5367 /* "array.pxd":121
jpayne@69 5368 * if not info.shape:
jpayne@69 5369 * raise MemoryError()
jpayne@69 5370 * info.shape[0] = item_count # constant regardless of resizing # <<<<<<<<<<<<<<
jpayne@69 5371 * info.strides = &info.itemsize
jpayne@69 5372 *
jpayne@69 5373 */
jpayne@69 5374 __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_v_item_count); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) && PyErr_Occurred())) __PYX_ERR(3, 121, __pyx_L1_error)
jpayne@69 5375 (__pyx_v_info->shape[0]) = __pyx_t_5;
jpayne@69 5376
jpayne@69 5377 /* "array.pxd":122
jpayne@69 5378 * raise MemoryError()
jpayne@69 5379 * info.shape[0] = item_count # constant regardless of resizing
jpayne@69 5380 * info.strides = &info.itemsize # <<<<<<<<<<<<<<
jpayne@69 5381 *
jpayne@69 5382 * info.format = <char*> (info.shape + 1)
jpayne@69 5383 */
jpayne@69 5384 __pyx_v_info->strides = (&__pyx_v_info->itemsize);
jpayne@69 5385
jpayne@69 5386 /* "array.pxd":124
jpayne@69 5387 * info.strides = &info.itemsize
jpayne@69 5388 *
jpayne@69 5389 * info.format = <char*> (info.shape + 1) # <<<<<<<<<<<<<<
jpayne@69 5390 * info.format[0] = self.ob_descr.typecode
jpayne@69 5391 * info.format[1] = 0
jpayne@69 5392 */
jpayne@69 5393 __pyx_v_info->format = ((char *)(__pyx_v_info->shape + 1));
jpayne@69 5394
jpayne@69 5395 /* "array.pxd":125
jpayne@69 5396 *
jpayne@69 5397 * info.format = <char*> (info.shape + 1)
jpayne@69 5398 * info.format[0] = self.ob_descr.typecode # <<<<<<<<<<<<<<
jpayne@69 5399 * info.format[1] = 0
jpayne@69 5400 * info.obj = self
jpayne@69 5401 */
jpayne@69 5402 __pyx_t_7 = __pyx_v_self->ob_descr->typecode;
jpayne@69 5403 (__pyx_v_info->format[0]) = __pyx_t_7;
jpayne@69 5404
jpayne@69 5405 /* "array.pxd":126
jpayne@69 5406 * info.format = <char*> (info.shape + 1)
jpayne@69 5407 * info.format[0] = self.ob_descr.typecode
jpayne@69 5408 * info.format[1] = 0 # <<<<<<<<<<<<<<
jpayne@69 5409 * info.obj = self
jpayne@69 5410 *
jpayne@69 5411 */
jpayne@69 5412 (__pyx_v_info->format[1]) = 0;
jpayne@69 5413
jpayne@69 5414 /* "array.pxd":127
jpayne@69 5415 * info.format[0] = self.ob_descr.typecode
jpayne@69 5416 * info.format[1] = 0
jpayne@69 5417 * info.obj = self # <<<<<<<<<<<<<<
jpayne@69 5418 *
jpayne@69 5419 * def __releasebuffer__(self, Py_buffer* info):
jpayne@69 5420 */
jpayne@69 5421 __Pyx_INCREF((PyObject *)__pyx_v_self);
jpayne@69 5422 __Pyx_GIVEREF((PyObject *)__pyx_v_self);
jpayne@69 5423 __Pyx_GOTREF(__pyx_v_info->obj);
jpayne@69 5424 __Pyx_DECREF(__pyx_v_info->obj);
jpayne@69 5425 __pyx_v_info->obj = ((PyObject *)__pyx_v_self);
jpayne@69 5426
jpayne@69 5427 /* "array.pxd":104
jpayne@69 5428 * __data_union data
jpayne@69 5429 *
jpayne@69 5430 * def __getbuffer__(self, Py_buffer* info, int flags): # <<<<<<<<<<<<<<
jpayne@69 5431 * # This implementation of getbuffer is geared towards Cython
jpayne@69 5432 * # requirements, and does not yet fulfill the PEP.
jpayne@69 5433 */
jpayne@69 5434
jpayne@69 5435 /* function exit code */
jpayne@69 5436 __pyx_r = 0;
jpayne@69 5437 goto __pyx_L0;
jpayne@69 5438 __pyx_L1_error:;
jpayne@69 5439 __Pyx_XDECREF(__pyx_t_1);
jpayne@69 5440 __Pyx_XDECREF(__pyx_t_4);
jpayne@69 5441 __Pyx_AddTraceback("cpython.array.array.__getbuffer__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 5442 __pyx_r = -1;
jpayne@69 5443 if (__pyx_v_info->obj != NULL) {
jpayne@69 5444 __Pyx_GOTREF(__pyx_v_info->obj);
jpayne@69 5445 __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0;
jpayne@69 5446 }
jpayne@69 5447 goto __pyx_L2;
jpayne@69 5448 __pyx_L0:;
jpayne@69 5449 if (__pyx_v_info->obj == Py_None) {
jpayne@69 5450 __Pyx_GOTREF(__pyx_v_info->obj);
jpayne@69 5451 __Pyx_DECREF(__pyx_v_info->obj); __pyx_v_info->obj = 0;
jpayne@69 5452 }
jpayne@69 5453 __pyx_L2:;
jpayne@69 5454 __Pyx_XDECREF(__pyx_v_item_count);
jpayne@69 5455 __Pyx_RefNannyFinishContext();
jpayne@69 5456 return __pyx_r;
jpayne@69 5457 }
jpayne@69 5458
jpayne@69 5459 /* "array.pxd":129
jpayne@69 5460 * info.obj = self
jpayne@69 5461 *
jpayne@69 5462 * def __releasebuffer__(self, Py_buffer* info): # <<<<<<<<<<<<<<
jpayne@69 5463 * PyObject_Free(info.shape)
jpayne@69 5464 *
jpayne@69 5465 */
jpayne@69 5466
jpayne@69 5467 /* Python wrapper */
jpayne@69 5468 CYTHON_UNUSED static void __pyx_pw_7cpython_5array_5array_3__releasebuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info); /*proto*/
jpayne@69 5469 CYTHON_UNUSED static void __pyx_pw_7cpython_5array_5array_3__releasebuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_info) {
jpayne@69 5470 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@69 5471 __Pyx_RefNannyDeclarations
jpayne@69 5472 __Pyx_RefNannySetupContext("__releasebuffer__ (wrapper)", 0);
jpayne@69 5473 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
jpayne@69 5474 __pyx_pf_7cpython_5array_5array_2__releasebuffer__(((arrayobject *)__pyx_v_self), ((Py_buffer *)__pyx_v_info));
jpayne@69 5475
jpayne@69 5476 /* function exit code */
jpayne@69 5477 __Pyx_RefNannyFinishContext();
jpayne@69 5478 }
jpayne@69 5479
jpayne@69 5480 static void __pyx_pf_7cpython_5array_5array_2__releasebuffer__(CYTHON_UNUSED arrayobject *__pyx_v_self, Py_buffer *__pyx_v_info) {
jpayne@69 5481
jpayne@69 5482 /* "array.pxd":130
jpayne@69 5483 *
jpayne@69 5484 * def __releasebuffer__(self, Py_buffer* info):
jpayne@69 5485 * PyObject_Free(info.shape) # <<<<<<<<<<<<<<
jpayne@69 5486 *
jpayne@69 5487 * array newarrayobject(PyTypeObject* type, Py_ssize_t size, arraydescr *descr)
jpayne@69 5488 */
jpayne@69 5489 PyObject_Free(__pyx_v_info->shape);
jpayne@69 5490
jpayne@69 5491 /* "array.pxd":129
jpayne@69 5492 * info.obj = self
jpayne@69 5493 *
jpayne@69 5494 * def __releasebuffer__(self, Py_buffer* info): # <<<<<<<<<<<<<<
jpayne@69 5495 * PyObject_Free(info.shape)
jpayne@69 5496 *
jpayne@69 5497 */
jpayne@69 5498
jpayne@69 5499 /* function exit code */
jpayne@69 5500 }
jpayne@69 5501
jpayne@69 5502 /* "array.pxd":141
jpayne@69 5503 *
jpayne@69 5504 *
jpayne@69 5505 * cdef inline array clone(array template, Py_ssize_t length, bint zero): # <<<<<<<<<<<<<<
jpayne@69 5506 * """ fast creation of a new array, given a template array.
jpayne@69 5507 * type will be same as template.
jpayne@69 5508 */
jpayne@69 5509
jpayne@69 5510 static CYTHON_INLINE arrayobject *__pyx_f_7cpython_5array_clone(arrayobject *__pyx_v_template, Py_ssize_t __pyx_v_length, int __pyx_v_zero) {
jpayne@69 5511 arrayobject *__pyx_v_op = 0;
jpayne@69 5512 arrayobject *__pyx_r = NULL;
jpayne@69 5513 __Pyx_RefNannyDeclarations
jpayne@69 5514 PyObject *__pyx_t_1 = NULL;
jpayne@69 5515 int __pyx_t_2;
jpayne@69 5516 int __pyx_t_3;
jpayne@69 5517 int __pyx_lineno = 0;
jpayne@69 5518 const char *__pyx_filename = NULL;
jpayne@69 5519 int __pyx_clineno = 0;
jpayne@69 5520 __Pyx_RefNannySetupContext("clone", 1);
jpayne@69 5521
jpayne@69 5522 /* "array.pxd":145
jpayne@69 5523 * type will be same as template.
jpayne@69 5524 * if zero is true, new array will be initialized with zeroes."""
jpayne@69 5525 * cdef array op = newarrayobject(Py_TYPE(template), length, template.ob_descr) # <<<<<<<<<<<<<<
jpayne@69 5526 * if zero and op is not None:
jpayne@69 5527 * memset(op.data.as_chars, 0, length * op.ob_descr.itemsize)
jpayne@69 5528 */
jpayne@69 5529 __pyx_t_1 = ((PyObject *)newarrayobject(Py_TYPE(((PyObject *)__pyx_v_template)), __pyx_v_length, __pyx_v_template->ob_descr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 145, __pyx_L1_error)
jpayne@69 5530 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 5531 __pyx_v_op = ((arrayobject *)__pyx_t_1);
jpayne@69 5532 __pyx_t_1 = 0;
jpayne@69 5533
jpayne@69 5534 /* "array.pxd":146
jpayne@69 5535 * if zero is true, new array will be initialized with zeroes."""
jpayne@69 5536 * cdef array op = newarrayobject(Py_TYPE(template), length, template.ob_descr)
jpayne@69 5537 * if zero and op is not None: # <<<<<<<<<<<<<<
jpayne@69 5538 * memset(op.data.as_chars, 0, length * op.ob_descr.itemsize)
jpayne@69 5539 * return op
jpayne@69 5540 */
jpayne@69 5541 if (__pyx_v_zero) {
jpayne@69 5542 } else {
jpayne@69 5543 __pyx_t_2 = __pyx_v_zero;
jpayne@69 5544 goto __pyx_L4_bool_binop_done;
jpayne@69 5545 }
jpayne@69 5546 __pyx_t_3 = (((PyObject *)__pyx_v_op) != Py_None);
jpayne@69 5547 __pyx_t_2 = __pyx_t_3;
jpayne@69 5548 __pyx_L4_bool_binop_done:;
jpayne@69 5549 if (__pyx_t_2) {
jpayne@69 5550
jpayne@69 5551 /* "array.pxd":147
jpayne@69 5552 * cdef array op = newarrayobject(Py_TYPE(template), length, template.ob_descr)
jpayne@69 5553 * if zero and op is not None:
jpayne@69 5554 * memset(op.data.as_chars, 0, length * op.ob_descr.itemsize) # <<<<<<<<<<<<<<
jpayne@69 5555 * return op
jpayne@69 5556 *
jpayne@69 5557 */
jpayne@69 5558 (void)(memset(__pyx_v_op->data.as_chars, 0, (__pyx_v_length * __pyx_v_op->ob_descr->itemsize)));
jpayne@69 5559
jpayne@69 5560 /* "array.pxd":146
jpayne@69 5561 * if zero is true, new array will be initialized with zeroes."""
jpayne@69 5562 * cdef array op = newarrayobject(Py_TYPE(template), length, template.ob_descr)
jpayne@69 5563 * if zero and op is not None: # <<<<<<<<<<<<<<
jpayne@69 5564 * memset(op.data.as_chars, 0, length * op.ob_descr.itemsize)
jpayne@69 5565 * return op
jpayne@69 5566 */
jpayne@69 5567 }
jpayne@69 5568
jpayne@69 5569 /* "array.pxd":148
jpayne@69 5570 * if zero and op is not None:
jpayne@69 5571 * memset(op.data.as_chars, 0, length * op.ob_descr.itemsize)
jpayne@69 5572 * return op # <<<<<<<<<<<<<<
jpayne@69 5573 *
jpayne@69 5574 * cdef inline array copy(array self):
jpayne@69 5575 */
jpayne@69 5576 __Pyx_XDECREF((PyObject *)__pyx_r);
jpayne@69 5577 __Pyx_INCREF((PyObject *)__pyx_v_op);
jpayne@69 5578 __pyx_r = __pyx_v_op;
jpayne@69 5579 goto __pyx_L0;
jpayne@69 5580
jpayne@69 5581 /* "array.pxd":141
jpayne@69 5582 *
jpayne@69 5583 *
jpayne@69 5584 * cdef inline array clone(array template, Py_ssize_t length, bint zero): # <<<<<<<<<<<<<<
jpayne@69 5585 * """ fast creation of a new array, given a template array.
jpayne@69 5586 * type will be same as template.
jpayne@69 5587 */
jpayne@69 5588
jpayne@69 5589 /* function exit code */
jpayne@69 5590 __pyx_L1_error:;
jpayne@69 5591 __Pyx_XDECREF(__pyx_t_1);
jpayne@69 5592 __Pyx_AddTraceback("cpython.array.clone", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 5593 __pyx_r = 0;
jpayne@69 5594 __pyx_L0:;
jpayne@69 5595 __Pyx_XDECREF((PyObject *)__pyx_v_op);
jpayne@69 5596 __Pyx_XGIVEREF((PyObject *)__pyx_r);
jpayne@69 5597 __Pyx_RefNannyFinishContext();
jpayne@69 5598 return __pyx_r;
jpayne@69 5599 }
jpayne@69 5600
jpayne@69 5601 /* "array.pxd":150
jpayne@69 5602 * return op
jpayne@69 5603 *
jpayne@69 5604 * cdef inline array copy(array self): # <<<<<<<<<<<<<<
jpayne@69 5605 * """ make a copy of an array. """
jpayne@69 5606 * cdef array op = newarrayobject(Py_TYPE(self), Py_SIZE(self), self.ob_descr)
jpayne@69 5607 */
jpayne@69 5608
jpayne@69 5609 static CYTHON_INLINE arrayobject *__pyx_f_7cpython_5array_copy(arrayobject *__pyx_v_self) {
jpayne@69 5610 arrayobject *__pyx_v_op = 0;
jpayne@69 5611 arrayobject *__pyx_r = NULL;
jpayne@69 5612 __Pyx_RefNannyDeclarations
jpayne@69 5613 PyObject *__pyx_t_1 = NULL;
jpayne@69 5614 int __pyx_lineno = 0;
jpayne@69 5615 const char *__pyx_filename = NULL;
jpayne@69 5616 int __pyx_clineno = 0;
jpayne@69 5617 __Pyx_RefNannySetupContext("copy", 1);
jpayne@69 5618
jpayne@69 5619 /* "array.pxd":152
jpayne@69 5620 * cdef inline array copy(array self):
jpayne@69 5621 * """ make a copy of an array. """
jpayne@69 5622 * cdef array op = newarrayobject(Py_TYPE(self), Py_SIZE(self), self.ob_descr) # <<<<<<<<<<<<<<
jpayne@69 5623 * memcpy(op.data.as_chars, self.data.as_chars, Py_SIZE(op) * op.ob_descr.itemsize)
jpayne@69 5624 * return op
jpayne@69 5625 */
jpayne@69 5626 __pyx_t_1 = ((PyObject *)newarrayobject(Py_TYPE(((PyObject *)__pyx_v_self)), Py_SIZE(((PyObject *)__pyx_v_self)), __pyx_v_self->ob_descr)); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 152, __pyx_L1_error)
jpayne@69 5627 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 5628 __pyx_v_op = ((arrayobject *)__pyx_t_1);
jpayne@69 5629 __pyx_t_1 = 0;
jpayne@69 5630
jpayne@69 5631 /* "array.pxd":153
jpayne@69 5632 * """ make a copy of an array. """
jpayne@69 5633 * cdef array op = newarrayobject(Py_TYPE(self), Py_SIZE(self), self.ob_descr)
jpayne@69 5634 * memcpy(op.data.as_chars, self.data.as_chars, Py_SIZE(op) * op.ob_descr.itemsize) # <<<<<<<<<<<<<<
jpayne@69 5635 * return op
jpayne@69 5636 *
jpayne@69 5637 */
jpayne@69 5638 (void)(memcpy(__pyx_v_op->data.as_chars, __pyx_v_self->data.as_chars, (Py_SIZE(((PyObject *)__pyx_v_op)) * __pyx_v_op->ob_descr->itemsize)));
jpayne@69 5639
jpayne@69 5640 /* "array.pxd":154
jpayne@69 5641 * cdef array op = newarrayobject(Py_TYPE(self), Py_SIZE(self), self.ob_descr)
jpayne@69 5642 * memcpy(op.data.as_chars, self.data.as_chars, Py_SIZE(op) * op.ob_descr.itemsize)
jpayne@69 5643 * return op # <<<<<<<<<<<<<<
jpayne@69 5644 *
jpayne@69 5645 * cdef inline int extend_buffer(array self, char* stuff, Py_ssize_t n) except -1:
jpayne@69 5646 */
jpayne@69 5647 __Pyx_XDECREF((PyObject *)__pyx_r);
jpayne@69 5648 __Pyx_INCREF((PyObject *)__pyx_v_op);
jpayne@69 5649 __pyx_r = __pyx_v_op;
jpayne@69 5650 goto __pyx_L0;
jpayne@69 5651
jpayne@69 5652 /* "array.pxd":150
jpayne@69 5653 * return op
jpayne@69 5654 *
jpayne@69 5655 * cdef inline array copy(array self): # <<<<<<<<<<<<<<
jpayne@69 5656 * """ make a copy of an array. """
jpayne@69 5657 * cdef array op = newarrayobject(Py_TYPE(self), Py_SIZE(self), self.ob_descr)
jpayne@69 5658 */
jpayne@69 5659
jpayne@69 5660 /* function exit code */
jpayne@69 5661 __pyx_L1_error:;
jpayne@69 5662 __Pyx_XDECREF(__pyx_t_1);
jpayne@69 5663 __Pyx_AddTraceback("cpython.array.copy", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 5664 __pyx_r = 0;
jpayne@69 5665 __pyx_L0:;
jpayne@69 5666 __Pyx_XDECREF((PyObject *)__pyx_v_op);
jpayne@69 5667 __Pyx_XGIVEREF((PyObject *)__pyx_r);
jpayne@69 5668 __Pyx_RefNannyFinishContext();
jpayne@69 5669 return __pyx_r;
jpayne@69 5670 }
jpayne@69 5671
jpayne@69 5672 /* "array.pxd":156
jpayne@69 5673 * return op
jpayne@69 5674 *
jpayne@69 5675 * cdef inline int extend_buffer(array self, char* stuff, Py_ssize_t n) except -1: # <<<<<<<<<<<<<<
jpayne@69 5676 * """ efficient appending of new stuff of same type
jpayne@69 5677 * (e.g. of same array type)
jpayne@69 5678 */
jpayne@69 5679
jpayne@69 5680 static CYTHON_INLINE int __pyx_f_7cpython_5array_extend_buffer(arrayobject *__pyx_v_self, char *__pyx_v_stuff, Py_ssize_t __pyx_v_n) {
jpayne@69 5681 Py_ssize_t __pyx_v_itemsize;
jpayne@69 5682 Py_ssize_t __pyx_v_origsize;
jpayne@69 5683 int __pyx_r;
jpayne@69 5684 int __pyx_t_1;
jpayne@69 5685 int __pyx_lineno = 0;
jpayne@69 5686 const char *__pyx_filename = NULL;
jpayne@69 5687 int __pyx_clineno = 0;
jpayne@69 5688
jpayne@69 5689 /* "array.pxd":160
jpayne@69 5690 * (e.g. of same array type)
jpayne@69 5691 * n: number of elements (not number of bytes!) """
jpayne@69 5692 * cdef Py_ssize_t itemsize = self.ob_descr.itemsize # <<<<<<<<<<<<<<
jpayne@69 5693 * cdef Py_ssize_t origsize = Py_SIZE(self)
jpayne@69 5694 * resize_smart(self, origsize + n)
jpayne@69 5695 */
jpayne@69 5696 __pyx_t_1 = __pyx_v_self->ob_descr->itemsize;
jpayne@69 5697 __pyx_v_itemsize = __pyx_t_1;
jpayne@69 5698
jpayne@69 5699 /* "array.pxd":161
jpayne@69 5700 * n: number of elements (not number of bytes!) """
jpayne@69 5701 * cdef Py_ssize_t itemsize = self.ob_descr.itemsize
jpayne@69 5702 * cdef Py_ssize_t origsize = Py_SIZE(self) # <<<<<<<<<<<<<<
jpayne@69 5703 * resize_smart(self, origsize + n)
jpayne@69 5704 * memcpy(self.data.as_chars + origsize * itemsize, stuff, n * itemsize)
jpayne@69 5705 */
jpayne@69 5706 __pyx_v_origsize = Py_SIZE(((PyObject *)__pyx_v_self));
jpayne@69 5707
jpayne@69 5708 /* "array.pxd":162
jpayne@69 5709 * cdef Py_ssize_t itemsize = self.ob_descr.itemsize
jpayne@69 5710 * cdef Py_ssize_t origsize = Py_SIZE(self)
jpayne@69 5711 * resize_smart(self, origsize + n) # <<<<<<<<<<<<<<
jpayne@69 5712 * memcpy(self.data.as_chars + origsize * itemsize, stuff, n * itemsize)
jpayne@69 5713 * return 0
jpayne@69 5714 */
jpayne@69 5715 __pyx_t_1 = resize_smart(__pyx_v_self, (__pyx_v_origsize + __pyx_v_n)); if (unlikely(__pyx_t_1 == ((int)-1))) __PYX_ERR(3, 162, __pyx_L1_error)
jpayne@69 5716
jpayne@69 5717 /* "array.pxd":163
jpayne@69 5718 * cdef Py_ssize_t origsize = Py_SIZE(self)
jpayne@69 5719 * resize_smart(self, origsize + n)
jpayne@69 5720 * memcpy(self.data.as_chars + origsize * itemsize, stuff, n * itemsize) # <<<<<<<<<<<<<<
jpayne@69 5721 * return 0
jpayne@69 5722 *
jpayne@69 5723 */
jpayne@69 5724 (void)(memcpy((__pyx_v_self->data.as_chars + (__pyx_v_origsize * __pyx_v_itemsize)), __pyx_v_stuff, (__pyx_v_n * __pyx_v_itemsize)));
jpayne@69 5725
jpayne@69 5726 /* "array.pxd":164
jpayne@69 5727 * resize_smart(self, origsize + n)
jpayne@69 5728 * memcpy(self.data.as_chars + origsize * itemsize, stuff, n * itemsize)
jpayne@69 5729 * return 0 # <<<<<<<<<<<<<<
jpayne@69 5730 *
jpayne@69 5731 * cdef inline int extend(array self, array other) except -1:
jpayne@69 5732 */
jpayne@69 5733 __pyx_r = 0;
jpayne@69 5734 goto __pyx_L0;
jpayne@69 5735
jpayne@69 5736 /* "array.pxd":156
jpayne@69 5737 * return op
jpayne@69 5738 *
jpayne@69 5739 * cdef inline int extend_buffer(array self, char* stuff, Py_ssize_t n) except -1: # <<<<<<<<<<<<<<
jpayne@69 5740 * """ efficient appending of new stuff of same type
jpayne@69 5741 * (e.g. of same array type)
jpayne@69 5742 */
jpayne@69 5743
jpayne@69 5744 /* function exit code */
jpayne@69 5745 __pyx_L1_error:;
jpayne@69 5746 __Pyx_AddTraceback("cpython.array.extend_buffer", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 5747 __pyx_r = -1;
jpayne@69 5748 __pyx_L0:;
jpayne@69 5749 return __pyx_r;
jpayne@69 5750 }
jpayne@69 5751
jpayne@69 5752 /* "array.pxd":166
jpayne@69 5753 * return 0
jpayne@69 5754 *
jpayne@69 5755 * cdef inline int extend(array self, array other) except -1: # <<<<<<<<<<<<<<
jpayne@69 5756 * """ extend array with data from another array; types must match. """
jpayne@69 5757 * if self.ob_descr.typecode != other.ob_descr.typecode:
jpayne@69 5758 */
jpayne@69 5759
jpayne@69 5760 static CYTHON_INLINE int __pyx_f_7cpython_5array_extend(arrayobject *__pyx_v_self, arrayobject *__pyx_v_other) {
jpayne@69 5761 int __pyx_r;
jpayne@69 5762 int __pyx_t_1;
jpayne@69 5763 int __pyx_t_2;
jpayne@69 5764 int __pyx_lineno = 0;
jpayne@69 5765 const char *__pyx_filename = NULL;
jpayne@69 5766 int __pyx_clineno = 0;
jpayne@69 5767
jpayne@69 5768 /* "array.pxd":168
jpayne@69 5769 * cdef inline int extend(array self, array other) except -1:
jpayne@69 5770 * """ extend array with data from another array; types must match. """
jpayne@69 5771 * if self.ob_descr.typecode != other.ob_descr.typecode: # <<<<<<<<<<<<<<
jpayne@69 5772 * PyErr_BadArgument()
jpayne@69 5773 * return extend_buffer(self, other.data.as_chars, Py_SIZE(other))
jpayne@69 5774 */
jpayne@69 5775 __pyx_t_1 = (__pyx_v_self->ob_descr->typecode != __pyx_v_other->ob_descr->typecode);
jpayne@69 5776 if (__pyx_t_1) {
jpayne@69 5777
jpayne@69 5778 /* "array.pxd":169
jpayne@69 5779 * """ extend array with data from another array; types must match. """
jpayne@69 5780 * if self.ob_descr.typecode != other.ob_descr.typecode:
jpayne@69 5781 * PyErr_BadArgument() # <<<<<<<<<<<<<<
jpayne@69 5782 * return extend_buffer(self, other.data.as_chars, Py_SIZE(other))
jpayne@69 5783 *
jpayne@69 5784 */
jpayne@69 5785 __pyx_t_2 = PyErr_BadArgument(); if (unlikely(__pyx_t_2 == ((int)0))) __PYX_ERR(3, 169, __pyx_L1_error)
jpayne@69 5786
jpayne@69 5787 /* "array.pxd":168
jpayne@69 5788 * cdef inline int extend(array self, array other) except -1:
jpayne@69 5789 * """ extend array with data from another array; types must match. """
jpayne@69 5790 * if self.ob_descr.typecode != other.ob_descr.typecode: # <<<<<<<<<<<<<<
jpayne@69 5791 * PyErr_BadArgument()
jpayne@69 5792 * return extend_buffer(self, other.data.as_chars, Py_SIZE(other))
jpayne@69 5793 */
jpayne@69 5794 }
jpayne@69 5795
jpayne@69 5796 /* "array.pxd":170
jpayne@69 5797 * if self.ob_descr.typecode != other.ob_descr.typecode:
jpayne@69 5798 * PyErr_BadArgument()
jpayne@69 5799 * return extend_buffer(self, other.data.as_chars, Py_SIZE(other)) # <<<<<<<<<<<<<<
jpayne@69 5800 *
jpayne@69 5801 * cdef inline void zero(array self) noexcept:
jpayne@69 5802 */
jpayne@69 5803 __pyx_t_2 = __pyx_f_7cpython_5array_extend_buffer(__pyx_v_self, __pyx_v_other->data.as_chars, Py_SIZE(((PyObject *)__pyx_v_other))); if (unlikely(__pyx_t_2 == ((int)-1))) __PYX_ERR(3, 170, __pyx_L1_error)
jpayne@69 5804 __pyx_r = __pyx_t_2;
jpayne@69 5805 goto __pyx_L0;
jpayne@69 5806
jpayne@69 5807 /* "array.pxd":166
jpayne@69 5808 * return 0
jpayne@69 5809 *
jpayne@69 5810 * cdef inline int extend(array self, array other) except -1: # <<<<<<<<<<<<<<
jpayne@69 5811 * """ extend array with data from another array; types must match. """
jpayne@69 5812 * if self.ob_descr.typecode != other.ob_descr.typecode:
jpayne@69 5813 */
jpayne@69 5814
jpayne@69 5815 /* function exit code */
jpayne@69 5816 __pyx_L1_error:;
jpayne@69 5817 __Pyx_AddTraceback("cpython.array.extend", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 5818 __pyx_r = -1;
jpayne@69 5819 __pyx_L0:;
jpayne@69 5820 return __pyx_r;
jpayne@69 5821 }
jpayne@69 5822
jpayne@69 5823 /* "array.pxd":172
jpayne@69 5824 * return extend_buffer(self, other.data.as_chars, Py_SIZE(other))
jpayne@69 5825 *
jpayne@69 5826 * cdef inline void zero(array self) noexcept: # <<<<<<<<<<<<<<
jpayne@69 5827 * """ set all elements of array to zero. """
jpayne@69 5828 * memset(self.data.as_chars, 0, Py_SIZE(self) * self.ob_descr.itemsize)
jpayne@69 5829 */
jpayne@69 5830
jpayne@69 5831 static CYTHON_INLINE void __pyx_f_7cpython_5array_zero(arrayobject *__pyx_v_self) {
jpayne@69 5832
jpayne@69 5833 /* "array.pxd":174
jpayne@69 5834 * cdef inline void zero(array self) noexcept:
jpayne@69 5835 * """ set all elements of array to zero. """
jpayne@69 5836 * memset(self.data.as_chars, 0, Py_SIZE(self) * self.ob_descr.itemsize) # <<<<<<<<<<<<<<
jpayne@69 5837 */
jpayne@69 5838 (void)(memset(__pyx_v_self->data.as_chars, 0, (Py_SIZE(((PyObject *)__pyx_v_self)) * __pyx_v_self->ob_descr->itemsize)));
jpayne@69 5839
jpayne@69 5840 /* "array.pxd":172
jpayne@69 5841 * return extend_buffer(self, other.data.as_chars, Py_SIZE(other))
jpayne@69 5842 *
jpayne@69 5843 * cdef inline void zero(array self) noexcept: # <<<<<<<<<<<<<<
jpayne@69 5844 * """ set all elements of array to zero. """
jpayne@69 5845 * memset(self.data.as_chars, 0, Py_SIZE(self) * self.ob_descr.itemsize)
jpayne@69 5846 */
jpayne@69 5847
jpayne@69 5848 /* function exit code */
jpayne@69 5849 }
jpayne@69 5850
jpayne@69 5851 /* "pysam/libcfaidx.pyx":74
jpayne@69 5852 *
jpayne@69 5853 * cdef class FastqProxy
jpayne@69 5854 * cdef makeFastqProxy(kseq_t * src): # <<<<<<<<<<<<<<
jpayne@69 5855 * '''enter src into AlignedRead.'''
jpayne@69 5856 * cdef FastqProxy dest = FastqProxy.__new__(FastqProxy)
jpayne@69 5857 */
jpayne@69 5858
jpayne@69 5859 static PyObject *__pyx_f_5pysam_9libcfaidx_makeFastqProxy(kseq_t *__pyx_v_src) {
jpayne@69 5860 struct __pyx_obj_5pysam_9libcfaidx_FastqProxy *__pyx_v_dest = 0;
jpayne@69 5861 PyObject *__pyx_r = NULL;
jpayne@69 5862 __Pyx_TraceDeclarations
jpayne@69 5863 __Pyx_RefNannyDeclarations
jpayne@69 5864 PyObject *__pyx_t_1 = NULL;
jpayne@69 5865 int __pyx_lineno = 0;
jpayne@69 5866 const char *__pyx_filename = NULL;
jpayne@69 5867 int __pyx_clineno = 0;
jpayne@69 5868 __Pyx_RefNannySetupContext("makeFastqProxy", 1);
jpayne@69 5869 __Pyx_TraceCall("makeFastqProxy", __pyx_f[0], 74, 0, __PYX_ERR(0, 74, __pyx_L1_error));
jpayne@69 5870
jpayne@69 5871 /* "pysam/libcfaidx.pyx":76
jpayne@69 5872 * cdef makeFastqProxy(kseq_t * src):
jpayne@69 5873 * '''enter src into AlignedRead.'''
jpayne@69 5874 * cdef FastqProxy dest = FastqProxy.__new__(FastqProxy) # <<<<<<<<<<<<<<
jpayne@69 5875 * dest._delegate = src
jpayne@69 5876 * return dest
jpayne@69 5877 */
jpayne@69 5878 __pyx_t_1 = ((PyObject *)__pyx_tp_new_5pysam_9libcfaidx_FastqProxy(((PyTypeObject *)__pyx_ptype_5pysam_9libcfaidx_FastqProxy), __pyx_empty_tuple, NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 76, __pyx_L1_error)
jpayne@69 5879 __Pyx_GOTREF((PyObject *)__pyx_t_1);
jpayne@69 5880 __pyx_v_dest = ((struct __pyx_obj_5pysam_9libcfaidx_FastqProxy *)__pyx_t_1);
jpayne@69 5881 __pyx_t_1 = 0;
jpayne@69 5882
jpayne@69 5883 /* "pysam/libcfaidx.pyx":77
jpayne@69 5884 * '''enter src into AlignedRead.'''
jpayne@69 5885 * cdef FastqProxy dest = FastqProxy.__new__(FastqProxy)
jpayne@69 5886 * dest._delegate = src # <<<<<<<<<<<<<<
jpayne@69 5887 * return dest
jpayne@69 5888 *
jpayne@69 5889 */
jpayne@69 5890 __pyx_v_dest->_delegate = __pyx_v_src;
jpayne@69 5891
jpayne@69 5892 /* "pysam/libcfaidx.pyx":78
jpayne@69 5893 * cdef FastqProxy dest = FastqProxy.__new__(FastqProxy)
jpayne@69 5894 * dest._delegate = src
jpayne@69 5895 * return dest # <<<<<<<<<<<<<<
jpayne@69 5896 *
jpayne@69 5897 * ## TODO:
jpayne@69 5898 */
jpayne@69 5899 __Pyx_XDECREF(__pyx_r);
jpayne@69 5900 __Pyx_INCREF((PyObject *)__pyx_v_dest);
jpayne@69 5901 __pyx_r = ((PyObject *)__pyx_v_dest);
jpayne@69 5902 goto __pyx_L0;
jpayne@69 5903
jpayne@69 5904 /* "pysam/libcfaidx.pyx":74
jpayne@69 5905 *
jpayne@69 5906 * cdef class FastqProxy
jpayne@69 5907 * cdef makeFastqProxy(kseq_t * src): # <<<<<<<<<<<<<<
jpayne@69 5908 * '''enter src into AlignedRead.'''
jpayne@69 5909 * cdef FastqProxy dest = FastqProxy.__new__(FastqProxy)
jpayne@69 5910 */
jpayne@69 5911
jpayne@69 5912 /* function exit code */
jpayne@69 5913 __pyx_L1_error:;
jpayne@69 5914 __Pyx_XDECREF(__pyx_t_1);
jpayne@69 5915 __Pyx_AddTraceback("pysam.libcfaidx.makeFastqProxy", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 5916 __pyx_r = 0;
jpayne@69 5917 __pyx_L0:;
jpayne@69 5918 __Pyx_XDECREF((PyObject *)__pyx_v_dest);
jpayne@69 5919 __Pyx_XGIVEREF(__pyx_r);
jpayne@69 5920 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@69 5921 __Pyx_RefNannyFinishContext();
jpayne@69 5922 return __pyx_r;
jpayne@69 5923 }
jpayne@69 5924
jpayne@69 5925 /* "pysam/libcfaidx.pyx":115
jpayne@69 5926 * """
jpayne@69 5927 *
jpayne@69 5928 * def __cinit__(self, *args, **kwargs): # <<<<<<<<<<<<<<
jpayne@69 5929 * self.fastafile = NULL
jpayne@69 5930 * self._filename = None
jpayne@69 5931 */
jpayne@69 5932
jpayne@69 5933 /* Python wrapper */
jpayne@69 5934 static int __pyx_pw_5pysam_9libcfaidx_9FastaFile_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
jpayne@69 5935 static int __pyx_pw_5pysam_9libcfaidx_9FastaFile_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
jpayne@69 5936 PyObject *__pyx_v_args = 0;
jpayne@69 5937 PyObject *__pyx_v_kwargs = 0;
jpayne@69 5938 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
jpayne@69 5939 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@69 5940 int __pyx_r;
jpayne@69 5941 __Pyx_RefNannyDeclarations
jpayne@69 5942 __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
jpayne@69 5943 #if CYTHON_ASSUME_SAFE_MACROS
jpayne@69 5944 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
jpayne@69 5945 #else
jpayne@69 5946 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
jpayne@69 5947 #endif
jpayne@69 5948 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
jpayne@69 5949 if (unlikely(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 1))) return -1;
jpayne@69 5950 if (unlikely(__pyx_kwds)) {
jpayne@69 5951 __pyx_v_kwargs = __Pyx_KwargsAsDict_VARARGS(__pyx_kwds, __pyx_kwvalues);
jpayne@69 5952 if (unlikely(!__pyx_v_kwargs)) return -1;
jpayne@69 5953 __Pyx_GOTREF(__pyx_v_kwargs);
jpayne@69 5954 } else {
jpayne@69 5955 __pyx_v_kwargs = PyDict_New();
jpayne@69 5956 if (unlikely(!__pyx_v_kwargs)) return -1;
jpayne@69 5957 __Pyx_GOTREF(__pyx_v_kwargs);
jpayne@69 5958 }
jpayne@69 5959 __Pyx_INCREF(__pyx_args);
jpayne@69 5960 __pyx_v_args = __pyx_args;
jpayne@69 5961 __pyx_r = __pyx_pf_5pysam_9libcfaidx_9FastaFile___cinit__(((struct __pyx_obj_5pysam_9libcfaidx_FastaFile *)__pyx_v_self), __pyx_v_args, __pyx_v_kwargs);
jpayne@69 5962
jpayne@69 5963 /* function exit code */
jpayne@69 5964 __Pyx_DECREF(__pyx_v_args);
jpayne@69 5965 __Pyx_DECREF(__pyx_v_kwargs);
jpayne@69 5966 __Pyx_RefNannyFinishContext();
jpayne@69 5967 return __pyx_r;
jpayne@69 5968 }
jpayne@69 5969
jpayne@69 5970 static int __pyx_pf_5pysam_9libcfaidx_9FastaFile___cinit__(struct __pyx_obj_5pysam_9libcfaidx_FastaFile *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) {
jpayne@69 5971 int __pyx_r;
jpayne@69 5972 __Pyx_TraceDeclarations
jpayne@69 5973 __Pyx_RefNannyDeclarations
jpayne@69 5974 PyObject *__pyx_t_1 = NULL;
jpayne@69 5975 PyObject *__pyx_t_2 = NULL;
jpayne@69 5976 PyObject *__pyx_t_3 = NULL;
jpayne@69 5977 int __pyx_lineno = 0;
jpayne@69 5978 const char *__pyx_filename = NULL;
jpayne@69 5979 int __pyx_clineno = 0;
jpayne@69 5980 __Pyx_RefNannySetupContext("__cinit__", 1);
jpayne@69 5981 __Pyx_TraceCall("__cinit__", __pyx_f[0], 115, 0, __PYX_ERR(0, 115, __pyx_L1_error));
jpayne@69 5982
jpayne@69 5983 /* "pysam/libcfaidx.pyx":116
jpayne@69 5984 *
jpayne@69 5985 * def __cinit__(self, *args, **kwargs):
jpayne@69 5986 * self.fastafile = NULL # <<<<<<<<<<<<<<
jpayne@69 5987 * self._filename = None
jpayne@69 5988 * self._references = None
jpayne@69 5989 */
jpayne@69 5990 __pyx_v_self->fastafile = NULL;
jpayne@69 5991
jpayne@69 5992 /* "pysam/libcfaidx.pyx":117
jpayne@69 5993 * def __cinit__(self, *args, **kwargs):
jpayne@69 5994 * self.fastafile = NULL
jpayne@69 5995 * self._filename = None # <<<<<<<<<<<<<<
jpayne@69 5996 * self._references = None
jpayne@69 5997 * self._lengths = None
jpayne@69 5998 */
jpayne@69 5999 __Pyx_INCREF(Py_None);
jpayne@69 6000 __Pyx_GIVEREF(Py_None);
jpayne@69 6001 __Pyx_GOTREF(__pyx_v_self->_filename);
jpayne@69 6002 __Pyx_DECREF(__pyx_v_self->_filename);
jpayne@69 6003 __pyx_v_self->_filename = Py_None;
jpayne@69 6004
jpayne@69 6005 /* "pysam/libcfaidx.pyx":118
jpayne@69 6006 * self.fastafile = NULL
jpayne@69 6007 * self._filename = None
jpayne@69 6008 * self._references = None # <<<<<<<<<<<<<<
jpayne@69 6009 * self._lengths = None
jpayne@69 6010 * self.reference2length = None
jpayne@69 6011 */
jpayne@69 6012 __Pyx_INCREF(Py_None);
jpayne@69 6013 __Pyx_GIVEREF(Py_None);
jpayne@69 6014 __Pyx_GOTREF(__pyx_v_self->_references);
jpayne@69 6015 __Pyx_DECREF(__pyx_v_self->_references);
jpayne@69 6016 __pyx_v_self->_references = Py_None;
jpayne@69 6017
jpayne@69 6018 /* "pysam/libcfaidx.pyx":119
jpayne@69 6019 * self._filename = None
jpayne@69 6020 * self._references = None
jpayne@69 6021 * self._lengths = None # <<<<<<<<<<<<<<
jpayne@69 6022 * self.reference2length = None
jpayne@69 6023 * self._open(*args, **kwargs)
jpayne@69 6024 */
jpayne@69 6025 __Pyx_INCREF(Py_None);
jpayne@69 6026 __Pyx_GIVEREF(Py_None);
jpayne@69 6027 __Pyx_GOTREF(__pyx_v_self->_lengths);
jpayne@69 6028 __Pyx_DECREF(__pyx_v_self->_lengths);
jpayne@69 6029 __pyx_v_self->_lengths = Py_None;
jpayne@69 6030
jpayne@69 6031 /* "pysam/libcfaidx.pyx":120
jpayne@69 6032 * self._references = None
jpayne@69 6033 * self._lengths = None
jpayne@69 6034 * self.reference2length = None # <<<<<<<<<<<<<<
jpayne@69 6035 * self._open(*args, **kwargs)
jpayne@69 6036 *
jpayne@69 6037 */
jpayne@69 6038 __Pyx_INCREF(Py_None);
jpayne@69 6039 __Pyx_GIVEREF(Py_None);
jpayne@69 6040 __Pyx_GOTREF(__pyx_v_self->reference2length);
jpayne@69 6041 __Pyx_DECREF(__pyx_v_self->reference2length);
jpayne@69 6042 __pyx_v_self->reference2length = Py_None;
jpayne@69 6043
jpayne@69 6044 /* "pysam/libcfaidx.pyx":121
jpayne@69 6045 * self._lengths = None
jpayne@69 6046 * self.reference2length = None
jpayne@69 6047 * self._open(*args, **kwargs) # <<<<<<<<<<<<<<
jpayne@69 6048 *
jpayne@69 6049 * def is_open(self):
jpayne@69 6050 */
jpayne@69 6051 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_open); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 121, __pyx_L1_error)
jpayne@69 6052 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 6053 __pyx_t_2 = PyDict_Copy(__pyx_v_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 121, __pyx_L1_error)
jpayne@69 6054 __Pyx_GOTREF(__pyx_t_2);
jpayne@69 6055 __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_v_args, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 121, __pyx_L1_error)
jpayne@69 6056 __Pyx_GOTREF(__pyx_t_3);
jpayne@69 6057 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@69 6058 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@69 6059 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
jpayne@69 6060
jpayne@69 6061 /* "pysam/libcfaidx.pyx":115
jpayne@69 6062 * """
jpayne@69 6063 *
jpayne@69 6064 * def __cinit__(self, *args, **kwargs): # <<<<<<<<<<<<<<
jpayne@69 6065 * self.fastafile = NULL
jpayne@69 6066 * self._filename = None
jpayne@69 6067 */
jpayne@69 6068
jpayne@69 6069 /* function exit code */
jpayne@69 6070 __pyx_r = 0;
jpayne@69 6071 goto __pyx_L0;
jpayne@69 6072 __pyx_L1_error:;
jpayne@69 6073 __Pyx_XDECREF(__pyx_t_1);
jpayne@69 6074 __Pyx_XDECREF(__pyx_t_2);
jpayne@69 6075 __Pyx_XDECREF(__pyx_t_3);
jpayne@69 6076 __Pyx_AddTraceback("pysam.libcfaidx.FastaFile.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 6077 __pyx_r = -1;
jpayne@69 6078 __pyx_L0:;
jpayne@69 6079 __Pyx_TraceReturn(Py_None, 0);
jpayne@69 6080 __Pyx_RefNannyFinishContext();
jpayne@69 6081 return __pyx_r;
jpayne@69 6082 }
jpayne@69 6083
jpayne@69 6084 /* "pysam/libcfaidx.pyx":123
jpayne@69 6085 * self._open(*args, **kwargs)
jpayne@69 6086 *
jpayne@69 6087 * def is_open(self): # <<<<<<<<<<<<<<
jpayne@69 6088 * '''return true if samfile has been opened.'''
jpayne@69 6089 * return self.fastafile != NULL
jpayne@69 6090 */
jpayne@69 6091
jpayne@69 6092 /* Python wrapper */
jpayne@69 6093 static PyObject *__pyx_pw_5pysam_9libcfaidx_9FastaFile_3is_open(PyObject *__pyx_v_self,
jpayne@69 6094 #if CYTHON_METH_FASTCALL
jpayne@69 6095 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@69 6096 #else
jpayne@69 6097 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@69 6098 #endif
jpayne@69 6099 ); /*proto*/
jpayne@69 6100 PyDoc_STRVAR(__pyx_doc_5pysam_9libcfaidx_9FastaFile_2is_open, "FastaFile.is_open(self)\nreturn true if samfile has been opened.");
jpayne@69 6101 static PyMethodDef __pyx_mdef_5pysam_9libcfaidx_9FastaFile_3is_open = {"is_open", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_9libcfaidx_9FastaFile_3is_open, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_9libcfaidx_9FastaFile_2is_open};
jpayne@69 6102 static PyObject *__pyx_pw_5pysam_9libcfaidx_9FastaFile_3is_open(PyObject *__pyx_v_self,
jpayne@69 6103 #if CYTHON_METH_FASTCALL
jpayne@69 6104 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@69 6105 #else
jpayne@69 6106 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@69 6107 #endif
jpayne@69 6108 ) {
jpayne@69 6109 #if !CYTHON_METH_FASTCALL
jpayne@69 6110 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
jpayne@69 6111 #endif
jpayne@69 6112 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@69 6113 PyObject *__pyx_r = 0;
jpayne@69 6114 __Pyx_RefNannyDeclarations
jpayne@69 6115 __Pyx_RefNannySetupContext("is_open (wrapper)", 0);
jpayne@69 6116 #if !CYTHON_METH_FASTCALL
jpayne@69 6117 #if CYTHON_ASSUME_SAFE_MACROS
jpayne@69 6118 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
jpayne@69 6119 #else
jpayne@69 6120 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
jpayne@69 6121 #endif
jpayne@69 6122 #endif
jpayne@69 6123 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
jpayne@69 6124 if (unlikely(__pyx_nargs > 0)) {
jpayne@69 6125 __Pyx_RaiseArgtupleInvalid("is_open", 1, 0, 0, __pyx_nargs); return NULL;}
jpayne@69 6126 if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "is_open", 0))) return NULL;
jpayne@69 6127 __pyx_r = __pyx_pf_5pysam_9libcfaidx_9FastaFile_2is_open(((struct __pyx_obj_5pysam_9libcfaidx_FastaFile *)__pyx_v_self));
jpayne@69 6128
jpayne@69 6129 /* function exit code */
jpayne@69 6130 __Pyx_RefNannyFinishContext();
jpayne@69 6131 return __pyx_r;
jpayne@69 6132 }
jpayne@69 6133
jpayne@69 6134 static PyObject *__pyx_pf_5pysam_9libcfaidx_9FastaFile_2is_open(struct __pyx_obj_5pysam_9libcfaidx_FastaFile *__pyx_v_self) {
jpayne@69 6135 PyObject *__pyx_r = NULL;
jpayne@69 6136 __Pyx_TraceDeclarations
jpayne@69 6137 __Pyx_RefNannyDeclarations
jpayne@69 6138 PyObject *__pyx_t_1 = NULL;
jpayne@69 6139 int __pyx_lineno = 0;
jpayne@69 6140 const char *__pyx_filename = NULL;
jpayne@69 6141 int __pyx_clineno = 0;
jpayne@69 6142 __Pyx_TraceFrameInit(__pyx_codeobj_)
jpayne@69 6143 __Pyx_RefNannySetupContext("is_open", 1);
jpayne@69 6144 __Pyx_TraceCall("is_open", __pyx_f[0], 123, 0, __PYX_ERR(0, 123, __pyx_L1_error));
jpayne@69 6145
jpayne@69 6146 /* "pysam/libcfaidx.pyx":125
jpayne@69 6147 * def is_open(self):
jpayne@69 6148 * '''return true if samfile has been opened.'''
jpayne@69 6149 * return self.fastafile != NULL # <<<<<<<<<<<<<<
jpayne@69 6150 *
jpayne@69 6151 * def __len__(self):
jpayne@69 6152 */
jpayne@69 6153 __Pyx_XDECREF(__pyx_r);
jpayne@69 6154 __pyx_t_1 = __Pyx_PyBool_FromLong((__pyx_v_self->fastafile != NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 125, __pyx_L1_error)
jpayne@69 6155 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 6156 __pyx_r = __pyx_t_1;
jpayne@69 6157 __pyx_t_1 = 0;
jpayne@69 6158 goto __pyx_L0;
jpayne@69 6159
jpayne@69 6160 /* "pysam/libcfaidx.pyx":123
jpayne@69 6161 * self._open(*args, **kwargs)
jpayne@69 6162 *
jpayne@69 6163 * def is_open(self): # <<<<<<<<<<<<<<
jpayne@69 6164 * '''return true if samfile has been opened.'''
jpayne@69 6165 * return self.fastafile != NULL
jpayne@69 6166 */
jpayne@69 6167
jpayne@69 6168 /* function exit code */
jpayne@69 6169 __pyx_L1_error:;
jpayne@69 6170 __Pyx_XDECREF(__pyx_t_1);
jpayne@69 6171 __Pyx_AddTraceback("pysam.libcfaidx.FastaFile.is_open", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 6172 __pyx_r = NULL;
jpayne@69 6173 __pyx_L0:;
jpayne@69 6174 __Pyx_XGIVEREF(__pyx_r);
jpayne@69 6175 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@69 6176 __Pyx_RefNannyFinishContext();
jpayne@69 6177 return __pyx_r;
jpayne@69 6178 }
jpayne@69 6179
jpayne@69 6180 /* "pysam/libcfaidx.pyx":127
jpayne@69 6181 * return self.fastafile != NULL
jpayne@69 6182 *
jpayne@69 6183 * def __len__(self): # <<<<<<<<<<<<<<
jpayne@69 6184 * if self.fastafile == NULL:
jpayne@69 6185 * raise ValueError("calling len() on closed file")
jpayne@69 6186 */
jpayne@69 6187
jpayne@69 6188 /* Python wrapper */
jpayne@69 6189 static Py_ssize_t __pyx_pw_5pysam_9libcfaidx_9FastaFile_5__len__(PyObject *__pyx_v_self); /*proto*/
jpayne@69 6190 static Py_ssize_t __pyx_pw_5pysam_9libcfaidx_9FastaFile_5__len__(PyObject *__pyx_v_self) {
jpayne@69 6191 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@69 6192 Py_ssize_t __pyx_r;
jpayne@69 6193 __Pyx_RefNannyDeclarations
jpayne@69 6194 __Pyx_RefNannySetupContext("__len__ (wrapper)", 0);
jpayne@69 6195 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
jpayne@69 6196 __pyx_r = __pyx_pf_5pysam_9libcfaidx_9FastaFile_4__len__(((struct __pyx_obj_5pysam_9libcfaidx_FastaFile *)__pyx_v_self));
jpayne@69 6197
jpayne@69 6198 /* function exit code */
jpayne@69 6199 __Pyx_RefNannyFinishContext();
jpayne@69 6200 return __pyx_r;
jpayne@69 6201 }
jpayne@69 6202
jpayne@69 6203 static Py_ssize_t __pyx_pf_5pysam_9libcfaidx_9FastaFile_4__len__(struct __pyx_obj_5pysam_9libcfaidx_FastaFile *__pyx_v_self) {
jpayne@69 6204 Py_ssize_t __pyx_r;
jpayne@69 6205 __Pyx_TraceDeclarations
jpayne@69 6206 __Pyx_RefNannyDeclarations
jpayne@69 6207 int __pyx_t_1;
jpayne@69 6208 PyObject *__pyx_t_2 = NULL;
jpayne@69 6209 int __pyx_lineno = 0;
jpayne@69 6210 const char *__pyx_filename = NULL;
jpayne@69 6211 int __pyx_clineno = 0;
jpayne@69 6212 __Pyx_RefNannySetupContext("__len__", 1);
jpayne@69 6213 __Pyx_TraceCall("__len__", __pyx_f[0], 127, 0, __PYX_ERR(0, 127, __pyx_L1_error));
jpayne@69 6214
jpayne@69 6215 /* "pysam/libcfaidx.pyx":128
jpayne@69 6216 *
jpayne@69 6217 * def __len__(self):
jpayne@69 6218 * if self.fastafile == NULL: # <<<<<<<<<<<<<<
jpayne@69 6219 * raise ValueError("calling len() on closed file")
jpayne@69 6220 *
jpayne@69 6221 */
jpayne@69 6222 __pyx_t_1 = (__pyx_v_self->fastafile == NULL);
jpayne@69 6223 if (unlikely(__pyx_t_1)) {
jpayne@69 6224
jpayne@69 6225 /* "pysam/libcfaidx.pyx":129
jpayne@69 6226 * def __len__(self):
jpayne@69 6227 * if self.fastafile == NULL:
jpayne@69 6228 * raise ValueError("calling len() on closed file") # <<<<<<<<<<<<<<
jpayne@69 6229 *
jpayne@69 6230 * return faidx_nseq(self.fastafile)
jpayne@69 6231 */
jpayne@69 6232 __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__2, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 129, __pyx_L1_error)
jpayne@69 6233 __Pyx_GOTREF(__pyx_t_2);
jpayne@69 6234 __Pyx_Raise(__pyx_t_2, 0, 0, 0);
jpayne@69 6235 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@69 6236 __PYX_ERR(0, 129, __pyx_L1_error)
jpayne@69 6237
jpayne@69 6238 /* "pysam/libcfaidx.pyx":128
jpayne@69 6239 *
jpayne@69 6240 * def __len__(self):
jpayne@69 6241 * if self.fastafile == NULL: # <<<<<<<<<<<<<<
jpayne@69 6242 * raise ValueError("calling len() on closed file")
jpayne@69 6243 *
jpayne@69 6244 */
jpayne@69 6245 }
jpayne@69 6246
jpayne@69 6247 /* "pysam/libcfaidx.pyx":131
jpayne@69 6248 * raise ValueError("calling len() on closed file")
jpayne@69 6249 *
jpayne@69 6250 * return faidx_nseq(self.fastafile) # <<<<<<<<<<<<<<
jpayne@69 6251 *
jpayne@69 6252 * def _open(self, filename, filepath_index=None, filepath_index_compressed=None):
jpayne@69 6253 */
jpayne@69 6254 __pyx_r = faidx_nseq(__pyx_v_self->fastafile);
jpayne@69 6255 goto __pyx_L0;
jpayne@69 6256
jpayne@69 6257 /* "pysam/libcfaidx.pyx":127
jpayne@69 6258 * return self.fastafile != NULL
jpayne@69 6259 *
jpayne@69 6260 * def __len__(self): # <<<<<<<<<<<<<<
jpayne@69 6261 * if self.fastafile == NULL:
jpayne@69 6262 * raise ValueError("calling len() on closed file")
jpayne@69 6263 */
jpayne@69 6264
jpayne@69 6265 /* function exit code */
jpayne@69 6266 __pyx_L1_error:;
jpayne@69 6267 __Pyx_XDECREF(__pyx_t_2);
jpayne@69 6268 __Pyx_AddTraceback("pysam.libcfaidx.FastaFile.__len__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 6269 __pyx_r = -1;
jpayne@69 6270 __pyx_L0:;
jpayne@69 6271 __Pyx_TraceReturn(Py_None, 0);
jpayne@69 6272 __Pyx_RefNannyFinishContext();
jpayne@69 6273 return __pyx_r;
jpayne@69 6274 }
jpayne@69 6275
jpayne@69 6276 /* "pysam/libcfaidx.pyx":133
jpayne@69 6277 * return faidx_nseq(self.fastafile)
jpayne@69 6278 *
jpayne@69 6279 * def _open(self, filename, filepath_index=None, filepath_index_compressed=None): # <<<<<<<<<<<<<<
jpayne@69 6280 * '''open an indexed fasta file.
jpayne@69 6281 *
jpayne@69 6282 */
jpayne@69 6283
jpayne@69 6284 /* Python wrapper */
jpayne@69 6285 static PyObject *__pyx_pw_5pysam_9libcfaidx_9FastaFile_7_open(PyObject *__pyx_v_self,
jpayne@69 6286 #if CYTHON_METH_FASTCALL
jpayne@69 6287 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@69 6288 #else
jpayne@69 6289 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@69 6290 #endif
jpayne@69 6291 ); /*proto*/
jpayne@69 6292 PyDoc_STRVAR(__pyx_doc_5pysam_9libcfaidx_9FastaFile_6_open, "FastaFile._open(self, filename, filepath_index=None, filepath_index_compressed=None)\nopen an indexed fasta file.\n\n This method expects an indexed fasta file.\n ");
jpayne@69 6293 static PyMethodDef __pyx_mdef_5pysam_9libcfaidx_9FastaFile_7_open = {"_open", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_9libcfaidx_9FastaFile_7_open, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_9libcfaidx_9FastaFile_6_open};
jpayne@69 6294 static PyObject *__pyx_pw_5pysam_9libcfaidx_9FastaFile_7_open(PyObject *__pyx_v_self,
jpayne@69 6295 #if CYTHON_METH_FASTCALL
jpayne@69 6296 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@69 6297 #else
jpayne@69 6298 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@69 6299 #endif
jpayne@69 6300 ) {
jpayne@69 6301 PyObject *__pyx_v_filename = 0;
jpayne@69 6302 PyObject *__pyx_v_filepath_index = 0;
jpayne@69 6303 PyObject *__pyx_v_filepath_index_compressed = 0;
jpayne@69 6304 #if !CYTHON_METH_FASTCALL
jpayne@69 6305 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
jpayne@69 6306 #endif
jpayne@69 6307 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@69 6308 PyObject* values[3] = {0,0,0};
jpayne@69 6309 int __pyx_lineno = 0;
jpayne@69 6310 const char *__pyx_filename = NULL;
jpayne@69 6311 int __pyx_clineno = 0;
jpayne@69 6312 PyObject *__pyx_r = 0;
jpayne@69 6313 __Pyx_RefNannyDeclarations
jpayne@69 6314 __Pyx_RefNannySetupContext("_open (wrapper)", 0);
jpayne@69 6315 #if !CYTHON_METH_FASTCALL
jpayne@69 6316 #if CYTHON_ASSUME_SAFE_MACROS
jpayne@69 6317 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
jpayne@69 6318 #else
jpayne@69 6319 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
jpayne@69 6320 #endif
jpayne@69 6321 #endif
jpayne@69 6322 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
jpayne@69 6323 {
jpayne@69 6324 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_filename,&__pyx_n_s_filepath_index,&__pyx_n_s_filepath_index_compressed,0};
jpayne@69 6325 values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
jpayne@69 6326 values[2] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
jpayne@69 6327 if (__pyx_kwds) {
jpayne@69 6328 Py_ssize_t kw_args;
jpayne@69 6329 switch (__pyx_nargs) {
jpayne@69 6330 case 3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
jpayne@69 6331 CYTHON_FALLTHROUGH;
jpayne@69 6332 case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
jpayne@69 6333 CYTHON_FALLTHROUGH;
jpayne@69 6334 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
jpayne@69 6335 CYTHON_FALLTHROUGH;
jpayne@69 6336 case 0: break;
jpayne@69 6337 default: goto __pyx_L5_argtuple_error;
jpayne@69 6338 }
jpayne@69 6339 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
jpayne@69 6340 switch (__pyx_nargs) {
jpayne@69 6341 case 0:
jpayne@69 6342 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_filename)) != 0)) {
jpayne@69 6343 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
jpayne@69 6344 kw_args--;
jpayne@69 6345 }
jpayne@69 6346 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 133, __pyx_L3_error)
jpayne@69 6347 else goto __pyx_L5_argtuple_error;
jpayne@69 6348 CYTHON_FALLTHROUGH;
jpayne@69 6349 case 1:
jpayne@69 6350 if (kw_args > 0) {
jpayne@69 6351 PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_filepath_index);
jpayne@69 6352 if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
jpayne@69 6353 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 133, __pyx_L3_error)
jpayne@69 6354 }
jpayne@69 6355 CYTHON_FALLTHROUGH;
jpayne@69 6356 case 2:
jpayne@69 6357 if (kw_args > 0) {
jpayne@69 6358 PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_filepath_index_compressed);
jpayne@69 6359 if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
jpayne@69 6360 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 133, __pyx_L3_error)
jpayne@69 6361 }
jpayne@69 6362 }
jpayne@69 6363 if (unlikely(kw_args > 0)) {
jpayne@69 6364 const Py_ssize_t kwd_pos_args = __pyx_nargs;
jpayne@69 6365 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "_open") < 0)) __PYX_ERR(0, 133, __pyx_L3_error)
jpayne@69 6366 }
jpayne@69 6367 } else {
jpayne@69 6368 switch (__pyx_nargs) {
jpayne@69 6369 case 3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
jpayne@69 6370 CYTHON_FALLTHROUGH;
jpayne@69 6371 case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
jpayne@69 6372 CYTHON_FALLTHROUGH;
jpayne@69 6373 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
jpayne@69 6374 break;
jpayne@69 6375 default: goto __pyx_L5_argtuple_error;
jpayne@69 6376 }
jpayne@69 6377 }
jpayne@69 6378 __pyx_v_filename = values[0];
jpayne@69 6379 __pyx_v_filepath_index = values[1];
jpayne@69 6380 __pyx_v_filepath_index_compressed = values[2];
jpayne@69 6381 }
jpayne@69 6382 goto __pyx_L6_skip;
jpayne@69 6383 __pyx_L5_argtuple_error:;
jpayne@69 6384 __Pyx_RaiseArgtupleInvalid("_open", 0, 1, 3, __pyx_nargs); __PYX_ERR(0, 133, __pyx_L3_error)
jpayne@69 6385 __pyx_L6_skip:;
jpayne@69 6386 goto __pyx_L4_argument_unpacking_done;
jpayne@69 6387 __pyx_L3_error:;
jpayne@69 6388 {
jpayne@69 6389 Py_ssize_t __pyx_temp;
jpayne@69 6390 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
jpayne@69 6391 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
jpayne@69 6392 }
jpayne@69 6393 }
jpayne@69 6394 __Pyx_AddTraceback("pysam.libcfaidx.FastaFile._open", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 6395 __Pyx_RefNannyFinishContext();
jpayne@69 6396 return NULL;
jpayne@69 6397 __pyx_L4_argument_unpacking_done:;
jpayne@69 6398 __pyx_r = __pyx_pf_5pysam_9libcfaidx_9FastaFile_6_open(((struct __pyx_obj_5pysam_9libcfaidx_FastaFile *)__pyx_v_self), __pyx_v_filename, __pyx_v_filepath_index, __pyx_v_filepath_index_compressed);
jpayne@69 6399
jpayne@69 6400 /* function exit code */
jpayne@69 6401 {
jpayne@69 6402 Py_ssize_t __pyx_temp;
jpayne@69 6403 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
jpayne@69 6404 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
jpayne@69 6405 }
jpayne@69 6406 }
jpayne@69 6407 __Pyx_RefNannyFinishContext();
jpayne@69 6408 return __pyx_r;
jpayne@69 6409 }
jpayne@69 6410
jpayne@69 6411 static PyObject *__pyx_pf_5pysam_9libcfaidx_9FastaFile_6_open(struct __pyx_obj_5pysam_9libcfaidx_FastaFile *__pyx_v_self, PyObject *__pyx_v_filename, PyObject *__pyx_v_filepath_index, PyObject *__pyx_v_filepath_index_compressed) {
jpayne@69 6412 char *__pyx_v_cfilename;
jpayne@69 6413 char *__pyx_v_cindexname;
jpayne@69 6414 char *__pyx_v_cindexname_compressed;
jpayne@69 6415 CYTHON_UNUSED PyObject *__pyx_v_bindex_filename = NULL;
jpayne@69 6416 CYTHON_UNUSED PyObject *__pyx_v_bindex_filename_compressed = NULL;
jpayne@69 6417 int __pyx_v_nreferences;
jpayne@69 6418 int __pyx_v_x;
jpayne@69 6419 char const *__pyx_v_s;
jpayne@69 6420 PyObject *__pyx_v_ss = NULL;
jpayne@69 6421 PyObject *__pyx_r = NULL;
jpayne@69 6422 __Pyx_TraceDeclarations
jpayne@69 6423 __Pyx_RefNannyDeclarations
jpayne@69 6424 int __pyx_t_1;
jpayne@69 6425 PyObject *__pyx_t_2 = NULL;
jpayne@69 6426 PyObject *__pyx_t_3 = NULL;
jpayne@69 6427 PyObject *__pyx_t_4 = NULL;
jpayne@69 6428 unsigned int __pyx_t_5;
jpayne@69 6429 char *__pyx_t_6;
jpayne@69 6430 int __pyx_t_7;
jpayne@69 6431 int __pyx_t_8;
jpayne@69 6432 int __pyx_t_9;
jpayne@69 6433 int __pyx_t_10;
jpayne@69 6434 int __pyx_lineno = 0;
jpayne@69 6435 const char *__pyx_filename = NULL;
jpayne@69 6436 int __pyx_clineno = 0;
jpayne@69 6437 __Pyx_TraceFrameInit(__pyx_codeobj__3)
jpayne@69 6438 __Pyx_RefNannySetupContext("_open", 1);
jpayne@69 6439 __Pyx_TraceCall("_open", __pyx_f[0], 133, 0, __PYX_ERR(0, 133, __pyx_L1_error));
jpayne@69 6440
jpayne@69 6441 /* "pysam/libcfaidx.pyx":140
jpayne@69 6442 *
jpayne@69 6443 * # close a previously opened file
jpayne@69 6444 * if self.fastafile != NULL: # <<<<<<<<<<<<<<
jpayne@69 6445 * self.close()
jpayne@69 6446 *
jpayne@69 6447 */
jpayne@69 6448 __pyx_t_1 = (__pyx_v_self->fastafile != NULL);
jpayne@69 6449 if (__pyx_t_1) {
jpayne@69 6450
jpayne@69 6451 /* "pysam/libcfaidx.pyx":141
jpayne@69 6452 * # close a previously opened file
jpayne@69 6453 * if self.fastafile != NULL:
jpayne@69 6454 * self.close() # <<<<<<<<<<<<<<
jpayne@69 6455 *
jpayne@69 6456 * self._filename = encode_filename(filename)
jpayne@69 6457 */
jpayne@69 6458 __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_close); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 141, __pyx_L1_error)
jpayne@69 6459 __Pyx_GOTREF(__pyx_t_3);
jpayne@69 6460 __pyx_t_4 = NULL;
jpayne@69 6461 __pyx_t_5 = 0;
jpayne@69 6462 #if CYTHON_UNPACK_METHODS
jpayne@69 6463 if (likely(PyMethod_Check(__pyx_t_3))) {
jpayne@69 6464 __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
jpayne@69 6465 if (likely(__pyx_t_4)) {
jpayne@69 6466 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
jpayne@69 6467 __Pyx_INCREF(__pyx_t_4);
jpayne@69 6468 __Pyx_INCREF(function);
jpayne@69 6469 __Pyx_DECREF_SET(__pyx_t_3, function);
jpayne@69 6470 __pyx_t_5 = 1;
jpayne@69 6471 }
jpayne@69 6472 }
jpayne@69 6473 #endif
jpayne@69 6474 {
jpayne@69 6475 PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
jpayne@69 6476 __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);
jpayne@69 6477 __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
jpayne@69 6478 if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 141, __pyx_L1_error)
jpayne@69 6479 __Pyx_GOTREF(__pyx_t_2);
jpayne@69 6480 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
jpayne@69 6481 }
jpayne@69 6482 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@69 6483
jpayne@69 6484 /* "pysam/libcfaidx.pyx":140
jpayne@69 6485 *
jpayne@69 6486 * # close a previously opened file
jpayne@69 6487 * if self.fastafile != NULL: # <<<<<<<<<<<<<<
jpayne@69 6488 * self.close()
jpayne@69 6489 *
jpayne@69 6490 */
jpayne@69 6491 }
jpayne@69 6492
jpayne@69 6493 /* "pysam/libcfaidx.pyx":143
jpayne@69 6494 * self.close()
jpayne@69 6495 *
jpayne@69 6496 * self._filename = encode_filename(filename) # <<<<<<<<<<<<<<
jpayne@69 6497 * cdef char *cfilename = self._filename
jpayne@69 6498 * cdef char *cindexname = NULL
jpayne@69 6499 */
jpayne@69 6500 __pyx_t_2 = __pyx_f_5pysam_9libcutils_encode_filename(__pyx_v_filename); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 143, __pyx_L1_error)
jpayne@69 6501 __Pyx_GOTREF(__pyx_t_2);
jpayne@69 6502 __Pyx_GIVEREF(__pyx_t_2);
jpayne@69 6503 __Pyx_GOTREF(__pyx_v_self->_filename);
jpayne@69 6504 __Pyx_DECREF(__pyx_v_self->_filename);
jpayne@69 6505 __pyx_v_self->_filename = __pyx_t_2;
jpayne@69 6506 __pyx_t_2 = 0;
jpayne@69 6507
jpayne@69 6508 /* "pysam/libcfaidx.pyx":144
jpayne@69 6509 *
jpayne@69 6510 * self._filename = encode_filename(filename)
jpayne@69 6511 * cdef char *cfilename = self._filename # <<<<<<<<<<<<<<
jpayne@69 6512 * cdef char *cindexname = NULL
jpayne@69 6513 * cdef char *cindexname_compressed = NULL
jpayne@69 6514 */
jpayne@69 6515 __pyx_t_6 = __Pyx_PyObject_AsWritableString(__pyx_v_self->_filename); if (unlikely((!__pyx_t_6) && PyErr_Occurred())) __PYX_ERR(0, 144, __pyx_L1_error)
jpayne@69 6516 __pyx_v_cfilename = __pyx_t_6;
jpayne@69 6517
jpayne@69 6518 /* "pysam/libcfaidx.pyx":145
jpayne@69 6519 * self._filename = encode_filename(filename)
jpayne@69 6520 * cdef char *cfilename = self._filename
jpayne@69 6521 * cdef char *cindexname = NULL # <<<<<<<<<<<<<<
jpayne@69 6522 * cdef char *cindexname_compressed = NULL
jpayne@69 6523 * self.is_remote = hisremote(cfilename)
jpayne@69 6524 */
jpayne@69 6525 __pyx_v_cindexname = NULL;
jpayne@69 6526
jpayne@69 6527 /* "pysam/libcfaidx.pyx":146
jpayne@69 6528 * cdef char *cfilename = self._filename
jpayne@69 6529 * cdef char *cindexname = NULL
jpayne@69 6530 * cdef char *cindexname_compressed = NULL # <<<<<<<<<<<<<<
jpayne@69 6531 * self.is_remote = hisremote(cfilename)
jpayne@69 6532 *
jpayne@69 6533 */
jpayne@69 6534 __pyx_v_cindexname_compressed = NULL;
jpayne@69 6535
jpayne@69 6536 /* "pysam/libcfaidx.pyx":147
jpayne@69 6537 * cdef char *cindexname = NULL
jpayne@69 6538 * cdef char *cindexname_compressed = NULL
jpayne@69 6539 * self.is_remote = hisremote(cfilename) # <<<<<<<<<<<<<<
jpayne@69 6540 *
jpayne@69 6541 * # open file for reading
jpayne@69 6542 */
jpayne@69 6543 __pyx_v_self->is_remote = hisremote(__pyx_v_cfilename);
jpayne@69 6544
jpayne@69 6545 /* "pysam/libcfaidx.pyx":150
jpayne@69 6546 *
jpayne@69 6547 * # open file for reading
jpayne@69 6548 * if (self._filename != b"-" # <<<<<<<<<<<<<<
jpayne@69 6549 * and not self.is_remote
jpayne@69 6550 * and not os.path.exists(filename)):
jpayne@69 6551 */
jpayne@69 6552 __pyx_t_7 = (__Pyx_PyBytes_Equals(__pyx_v_self->_filename, __pyx_kp_b__4, Py_NE)); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 150, __pyx_L1_error)
jpayne@69 6553 if (__pyx_t_7) {
jpayne@69 6554 } else {
jpayne@69 6555 __pyx_t_1 = __pyx_t_7;
jpayne@69 6556 goto __pyx_L5_bool_binop_done;
jpayne@69 6557 }
jpayne@69 6558
jpayne@69 6559 /* "pysam/libcfaidx.pyx":151
jpayne@69 6560 * # open file for reading
jpayne@69 6561 * if (self._filename != b"-"
jpayne@69 6562 * and not self.is_remote # <<<<<<<<<<<<<<
jpayne@69 6563 * and not os.path.exists(filename)):
jpayne@69 6564 * raise IOError("file `%s` not found" % filename)
jpayne@69 6565 */
jpayne@69 6566 __pyx_t_7 = (!__pyx_v_self->is_remote);
jpayne@69 6567 if (__pyx_t_7) {
jpayne@69 6568 } else {
jpayne@69 6569 __pyx_t_1 = __pyx_t_7;
jpayne@69 6570 goto __pyx_L5_bool_binop_done;
jpayne@69 6571 }
jpayne@69 6572
jpayne@69 6573 /* "pysam/libcfaidx.pyx":152
jpayne@69 6574 * if (self._filename != b"-"
jpayne@69 6575 * and not self.is_remote
jpayne@69 6576 * and not os.path.exists(filename)): # <<<<<<<<<<<<<<
jpayne@69 6577 * raise IOError("file `%s` not found" % filename)
jpayne@69 6578 *
jpayne@69 6579 */
jpayne@69 6580 __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_os); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 152, __pyx_L1_error)
jpayne@69 6581 __Pyx_GOTREF(__pyx_t_3);
jpayne@69 6582 __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_path); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 152, __pyx_L1_error)
jpayne@69 6583 __Pyx_GOTREF(__pyx_t_4);
jpayne@69 6584 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
jpayne@69 6585 __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_exists); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 152, __pyx_L1_error)
jpayne@69 6586 __Pyx_GOTREF(__pyx_t_3);
jpayne@69 6587 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
jpayne@69 6588 __pyx_t_4 = NULL;
jpayne@69 6589 __pyx_t_5 = 0;
jpayne@69 6590 #if CYTHON_UNPACK_METHODS
jpayne@69 6591 if (likely(PyMethod_Check(__pyx_t_3))) {
jpayne@69 6592 __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
jpayne@69 6593 if (likely(__pyx_t_4)) {
jpayne@69 6594 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
jpayne@69 6595 __Pyx_INCREF(__pyx_t_4);
jpayne@69 6596 __Pyx_INCREF(function);
jpayne@69 6597 __Pyx_DECREF_SET(__pyx_t_3, function);
jpayne@69 6598 __pyx_t_5 = 1;
jpayne@69 6599 }
jpayne@69 6600 }
jpayne@69 6601 #endif
jpayne@69 6602 {
jpayne@69 6603 PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_filename};
jpayne@69 6604 __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
jpayne@69 6605 __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
jpayne@69 6606 if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 152, __pyx_L1_error)
jpayne@69 6607 __Pyx_GOTREF(__pyx_t_2);
jpayne@69 6608 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
jpayne@69 6609 }
jpayne@69 6610 __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 152, __pyx_L1_error)
jpayne@69 6611 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@69 6612 __pyx_t_8 = (!__pyx_t_7);
jpayne@69 6613 __pyx_t_1 = __pyx_t_8;
jpayne@69 6614 __pyx_L5_bool_binop_done:;
jpayne@69 6615
jpayne@69 6616 /* "pysam/libcfaidx.pyx":150
jpayne@69 6617 *
jpayne@69 6618 * # open file for reading
jpayne@69 6619 * if (self._filename != b"-" # <<<<<<<<<<<<<<
jpayne@69 6620 * and not self.is_remote
jpayne@69 6621 * and not os.path.exists(filename)):
jpayne@69 6622 */
jpayne@69 6623 if (unlikely(__pyx_t_1)) {
jpayne@69 6624
jpayne@69 6625 /* "pysam/libcfaidx.pyx":153
jpayne@69 6626 * and not self.is_remote
jpayne@69 6627 * and not os.path.exists(filename)):
jpayne@69 6628 * raise IOError("file `%s` not found" % filename) # <<<<<<<<<<<<<<
jpayne@69 6629 *
jpayne@69 6630 * # 3 modes to open:
jpayne@69 6631 */
jpayne@69 6632 __pyx_t_2 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_file_s_not_found, __pyx_v_filename); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 153, __pyx_L1_error)
jpayne@69 6633 __Pyx_GOTREF(__pyx_t_2);
jpayne@69 6634 __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_IOError, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 153, __pyx_L1_error)
jpayne@69 6635 __Pyx_GOTREF(__pyx_t_3);
jpayne@69 6636 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@69 6637 __Pyx_Raise(__pyx_t_3, 0, 0, 0);
jpayne@69 6638 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
jpayne@69 6639 __PYX_ERR(0, 153, __pyx_L1_error)
jpayne@69 6640
jpayne@69 6641 /* "pysam/libcfaidx.pyx":150
jpayne@69 6642 *
jpayne@69 6643 * # open file for reading
jpayne@69 6644 * if (self._filename != b"-" # <<<<<<<<<<<<<<
jpayne@69 6645 * and not self.is_remote
jpayne@69 6646 * and not os.path.exists(filename)):
jpayne@69 6647 */
jpayne@69 6648 }
jpayne@69 6649
jpayne@69 6650 /* "pysam/libcfaidx.pyx":159
jpayne@69 6651 * # uncompressed fa: fai_load3 with filename and index_fai
jpayne@69 6652 * # uncompressed fa: fai_load with default index name
jpayne@69 6653 * if filepath_index: # <<<<<<<<<<<<<<
jpayne@69 6654 * # when opening, set flags to 0 - do not automatically
jpayne@69 6655 * # build index if it does not exist.
jpayne@69 6656 */
jpayne@69 6657 __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_filepath_index); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 159, __pyx_L1_error)
jpayne@69 6658 if (__pyx_t_1) {
jpayne@69 6659
jpayne@69 6660 /* "pysam/libcfaidx.pyx":163
jpayne@69 6661 * # build index if it does not exist.
jpayne@69 6662 *
jpayne@69 6663 * if not os.path.exists(filepath_index): # <<<<<<<<<<<<<<
jpayne@69 6664 * raise IOError("filename {} does not exist".format(filepath_index))
jpayne@69 6665 * cindexname = bindex_filename = encode_filename(filepath_index)
jpayne@69 6666 */
jpayne@69 6667 __Pyx_GetModuleGlobalName(__pyx_t_2, __pyx_n_s_os); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 163, __pyx_L1_error)
jpayne@69 6668 __Pyx_GOTREF(__pyx_t_2);
jpayne@69 6669 __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_path); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 163, __pyx_L1_error)
jpayne@69 6670 __Pyx_GOTREF(__pyx_t_4);
jpayne@69 6671 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@69 6672 __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_exists); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 163, __pyx_L1_error)
jpayne@69 6673 __Pyx_GOTREF(__pyx_t_2);
jpayne@69 6674 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
jpayne@69 6675 __pyx_t_4 = NULL;
jpayne@69 6676 __pyx_t_5 = 0;
jpayne@69 6677 #if CYTHON_UNPACK_METHODS
jpayne@69 6678 if (likely(PyMethod_Check(__pyx_t_2))) {
jpayne@69 6679 __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
jpayne@69 6680 if (likely(__pyx_t_4)) {
jpayne@69 6681 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
jpayne@69 6682 __Pyx_INCREF(__pyx_t_4);
jpayne@69 6683 __Pyx_INCREF(function);
jpayne@69 6684 __Pyx_DECREF_SET(__pyx_t_2, function);
jpayne@69 6685 __pyx_t_5 = 1;
jpayne@69 6686 }
jpayne@69 6687 }
jpayne@69 6688 #endif
jpayne@69 6689 {
jpayne@69 6690 PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_filepath_index};
jpayne@69 6691 __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
jpayne@69 6692 __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
jpayne@69 6693 if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 163, __pyx_L1_error)
jpayne@69 6694 __Pyx_GOTREF(__pyx_t_3);
jpayne@69 6695 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@69 6696 }
jpayne@69 6697 __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 163, __pyx_L1_error)
jpayne@69 6698 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
jpayne@69 6699 __pyx_t_8 = (!__pyx_t_1);
jpayne@69 6700 if (unlikely(__pyx_t_8)) {
jpayne@69 6701
jpayne@69 6702 /* "pysam/libcfaidx.pyx":164
jpayne@69 6703 *
jpayne@69 6704 * if not os.path.exists(filepath_index):
jpayne@69 6705 * raise IOError("filename {} does not exist".format(filepath_index)) # <<<<<<<<<<<<<<
jpayne@69 6706 * cindexname = bindex_filename = encode_filename(filepath_index)
jpayne@69 6707 *
jpayne@69 6708 */
jpayne@69 6709 __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_filename_does_not_exist, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 164, __pyx_L1_error)
jpayne@69 6710 __Pyx_GOTREF(__pyx_t_2);
jpayne@69 6711 __pyx_t_4 = NULL;
jpayne@69 6712 __pyx_t_5 = 0;
jpayne@69 6713 #if CYTHON_UNPACK_METHODS
jpayne@69 6714 if (likely(PyMethod_Check(__pyx_t_2))) {
jpayne@69 6715 __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
jpayne@69 6716 if (likely(__pyx_t_4)) {
jpayne@69 6717 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
jpayne@69 6718 __Pyx_INCREF(__pyx_t_4);
jpayne@69 6719 __Pyx_INCREF(function);
jpayne@69 6720 __Pyx_DECREF_SET(__pyx_t_2, function);
jpayne@69 6721 __pyx_t_5 = 1;
jpayne@69 6722 }
jpayne@69 6723 }
jpayne@69 6724 #endif
jpayne@69 6725 {
jpayne@69 6726 PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_filepath_index};
jpayne@69 6727 __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
jpayne@69 6728 __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
jpayne@69 6729 if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 164, __pyx_L1_error)
jpayne@69 6730 __Pyx_GOTREF(__pyx_t_3);
jpayne@69 6731 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@69 6732 }
jpayne@69 6733 __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_IOError, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 164, __pyx_L1_error)
jpayne@69 6734 __Pyx_GOTREF(__pyx_t_2);
jpayne@69 6735 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
jpayne@69 6736 __Pyx_Raise(__pyx_t_2, 0, 0, 0);
jpayne@69 6737 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@69 6738 __PYX_ERR(0, 164, __pyx_L1_error)
jpayne@69 6739
jpayne@69 6740 /* "pysam/libcfaidx.pyx":163
jpayne@69 6741 * # build index if it does not exist.
jpayne@69 6742 *
jpayne@69 6743 * if not os.path.exists(filepath_index): # <<<<<<<<<<<<<<
jpayne@69 6744 * raise IOError("filename {} does not exist".format(filepath_index))
jpayne@69 6745 * cindexname = bindex_filename = encode_filename(filepath_index)
jpayne@69 6746 */
jpayne@69 6747 }
jpayne@69 6748
jpayne@69 6749 /* "pysam/libcfaidx.pyx":165
jpayne@69 6750 * if not os.path.exists(filepath_index):
jpayne@69 6751 * raise IOError("filename {} does not exist".format(filepath_index))
jpayne@69 6752 * cindexname = bindex_filename = encode_filename(filepath_index) # <<<<<<<<<<<<<<
jpayne@69 6753 *
jpayne@69 6754 * if filepath_index_compressed:
jpayne@69 6755 */
jpayne@69 6756 __pyx_t_2 = __pyx_f_5pysam_9libcutils_encode_filename(__pyx_v_filepath_index); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 165, __pyx_L1_error)
jpayne@69 6757 __Pyx_GOTREF(__pyx_t_2);
jpayne@69 6758 if (unlikely(__pyx_t_2 == Py_None)) {
jpayne@69 6759 PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
jpayne@69 6760 __PYX_ERR(0, 165, __pyx_L1_error)
jpayne@69 6761 }
jpayne@69 6762 __pyx_t_6 = __Pyx_PyBytes_AsWritableString(__pyx_t_2); if (unlikely((!__pyx_t_6) && PyErr_Occurred())) __PYX_ERR(0, 165, __pyx_L1_error)
jpayne@69 6763 __pyx_v_cindexname = __pyx_t_6;
jpayne@69 6764 __Pyx_INCREF(__pyx_t_2);
jpayne@69 6765 __pyx_v_bindex_filename = ((PyObject*)__pyx_t_2);
jpayne@69 6766 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@69 6767
jpayne@69 6768 /* "pysam/libcfaidx.pyx":167
jpayne@69 6769 * cindexname = bindex_filename = encode_filename(filepath_index)
jpayne@69 6770 *
jpayne@69 6771 * if filepath_index_compressed: # <<<<<<<<<<<<<<
jpayne@69 6772 * if not os.path.exists(filepath_index_compressed):
jpayne@69 6773 * raise IOError("filename {} does not exist".format(filepath_index_compressed))
jpayne@69 6774 */
jpayne@69 6775 __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_v_filepath_index_compressed); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 167, __pyx_L1_error)
jpayne@69 6776 if (__pyx_t_8) {
jpayne@69 6777
jpayne@69 6778 /* "pysam/libcfaidx.pyx":168
jpayne@69 6779 *
jpayne@69 6780 * if filepath_index_compressed:
jpayne@69 6781 * if not os.path.exists(filepath_index_compressed): # <<<<<<<<<<<<<<
jpayne@69 6782 * raise IOError("filename {} does not exist".format(filepath_index_compressed))
jpayne@69 6783 * cindexname_compressed = bindex_filename_compressed = encode_filename(filepath_index_compressed)
jpayne@69 6784 */
jpayne@69 6785 __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_os); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 168, __pyx_L1_error)
jpayne@69 6786 __Pyx_GOTREF(__pyx_t_3);
jpayne@69 6787 __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_path); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 168, __pyx_L1_error)
jpayne@69 6788 __Pyx_GOTREF(__pyx_t_4);
jpayne@69 6789 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
jpayne@69 6790 __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_exists); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 168, __pyx_L1_error)
jpayne@69 6791 __Pyx_GOTREF(__pyx_t_3);
jpayne@69 6792 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
jpayne@69 6793 __pyx_t_4 = NULL;
jpayne@69 6794 __pyx_t_5 = 0;
jpayne@69 6795 #if CYTHON_UNPACK_METHODS
jpayne@69 6796 if (likely(PyMethod_Check(__pyx_t_3))) {
jpayne@69 6797 __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
jpayne@69 6798 if (likely(__pyx_t_4)) {
jpayne@69 6799 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
jpayne@69 6800 __Pyx_INCREF(__pyx_t_4);
jpayne@69 6801 __Pyx_INCREF(function);
jpayne@69 6802 __Pyx_DECREF_SET(__pyx_t_3, function);
jpayne@69 6803 __pyx_t_5 = 1;
jpayne@69 6804 }
jpayne@69 6805 }
jpayne@69 6806 #endif
jpayne@69 6807 {
jpayne@69 6808 PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_filepath_index_compressed};
jpayne@69 6809 __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
jpayne@69 6810 __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
jpayne@69 6811 if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 168, __pyx_L1_error)
jpayne@69 6812 __Pyx_GOTREF(__pyx_t_2);
jpayne@69 6813 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
jpayne@69 6814 }
jpayne@69 6815 __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_8 < 0))) __PYX_ERR(0, 168, __pyx_L1_error)
jpayne@69 6816 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@69 6817 __pyx_t_1 = (!__pyx_t_8);
jpayne@69 6818 if (unlikely(__pyx_t_1)) {
jpayne@69 6819
jpayne@69 6820 /* "pysam/libcfaidx.pyx":169
jpayne@69 6821 * if filepath_index_compressed:
jpayne@69 6822 * if not os.path.exists(filepath_index_compressed):
jpayne@69 6823 * raise IOError("filename {} does not exist".format(filepath_index_compressed)) # <<<<<<<<<<<<<<
jpayne@69 6824 * cindexname_compressed = bindex_filename_compressed = encode_filename(filepath_index_compressed)
jpayne@69 6825 * with nogil:
jpayne@69 6826 */
jpayne@69 6827 __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_filename_does_not_exist, __pyx_n_s_format); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 169, __pyx_L1_error)
jpayne@69 6828 __Pyx_GOTREF(__pyx_t_3);
jpayne@69 6829 __pyx_t_4 = NULL;
jpayne@69 6830 __pyx_t_5 = 0;
jpayne@69 6831 #if CYTHON_UNPACK_METHODS
jpayne@69 6832 if (likely(PyMethod_Check(__pyx_t_3))) {
jpayne@69 6833 __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
jpayne@69 6834 if (likely(__pyx_t_4)) {
jpayne@69 6835 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
jpayne@69 6836 __Pyx_INCREF(__pyx_t_4);
jpayne@69 6837 __Pyx_INCREF(function);
jpayne@69 6838 __Pyx_DECREF_SET(__pyx_t_3, function);
jpayne@69 6839 __pyx_t_5 = 1;
jpayne@69 6840 }
jpayne@69 6841 }
jpayne@69 6842 #endif
jpayne@69 6843 {
jpayne@69 6844 PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_filepath_index_compressed};
jpayne@69 6845 __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
jpayne@69 6846 __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
jpayne@69 6847 if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 169, __pyx_L1_error)
jpayne@69 6848 __Pyx_GOTREF(__pyx_t_2);
jpayne@69 6849 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
jpayne@69 6850 }
jpayne@69 6851 __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_IOError, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 169, __pyx_L1_error)
jpayne@69 6852 __Pyx_GOTREF(__pyx_t_3);
jpayne@69 6853 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@69 6854 __Pyx_Raise(__pyx_t_3, 0, 0, 0);
jpayne@69 6855 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
jpayne@69 6856 __PYX_ERR(0, 169, __pyx_L1_error)
jpayne@69 6857
jpayne@69 6858 /* "pysam/libcfaidx.pyx":168
jpayne@69 6859 *
jpayne@69 6860 * if filepath_index_compressed:
jpayne@69 6861 * if not os.path.exists(filepath_index_compressed): # <<<<<<<<<<<<<<
jpayne@69 6862 * raise IOError("filename {} does not exist".format(filepath_index_compressed))
jpayne@69 6863 * cindexname_compressed = bindex_filename_compressed = encode_filename(filepath_index_compressed)
jpayne@69 6864 */
jpayne@69 6865 }
jpayne@69 6866
jpayne@69 6867 /* "pysam/libcfaidx.pyx":170
jpayne@69 6868 * if not os.path.exists(filepath_index_compressed):
jpayne@69 6869 * raise IOError("filename {} does not exist".format(filepath_index_compressed))
jpayne@69 6870 * cindexname_compressed = bindex_filename_compressed = encode_filename(filepath_index_compressed) # <<<<<<<<<<<<<<
jpayne@69 6871 * with nogil:
jpayne@69 6872 * self.fastafile = fai_load3(cfilename, cindexname, cindexname_compressed, 0)
jpayne@69 6873 */
jpayne@69 6874 __pyx_t_3 = __pyx_f_5pysam_9libcutils_encode_filename(__pyx_v_filepath_index_compressed); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 170, __pyx_L1_error)
jpayne@69 6875 __Pyx_GOTREF(__pyx_t_3);
jpayne@69 6876 if (unlikely(__pyx_t_3 == Py_None)) {
jpayne@69 6877 PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
jpayne@69 6878 __PYX_ERR(0, 170, __pyx_L1_error)
jpayne@69 6879 }
jpayne@69 6880 __pyx_t_6 = __Pyx_PyBytes_AsWritableString(__pyx_t_3); if (unlikely((!__pyx_t_6) && PyErr_Occurred())) __PYX_ERR(0, 170, __pyx_L1_error)
jpayne@69 6881 __pyx_v_cindexname_compressed = __pyx_t_6;
jpayne@69 6882 __Pyx_INCREF(__pyx_t_3);
jpayne@69 6883 __pyx_v_bindex_filename_compressed = ((PyObject*)__pyx_t_3);
jpayne@69 6884 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
jpayne@69 6885
jpayne@69 6886 /* "pysam/libcfaidx.pyx":171
jpayne@69 6887 * raise IOError("filename {} does not exist".format(filepath_index_compressed))
jpayne@69 6888 * cindexname_compressed = bindex_filename_compressed = encode_filename(filepath_index_compressed)
jpayne@69 6889 * with nogil: # <<<<<<<<<<<<<<
jpayne@69 6890 * self.fastafile = fai_load3(cfilename, cindexname, cindexname_compressed, 0)
jpayne@69 6891 * else:
jpayne@69 6892 */
jpayne@69 6893 {
jpayne@69 6894 #ifdef WITH_THREAD
jpayne@69 6895 PyThreadState *_save;
jpayne@69 6896 _save = NULL;
jpayne@69 6897 Py_UNBLOCK_THREADS
jpayne@69 6898 __Pyx_FastGIL_Remember();
jpayne@69 6899 #endif
jpayne@69 6900 /*try:*/ {
jpayne@69 6901
jpayne@69 6902 /* "pysam/libcfaidx.pyx":172
jpayne@69 6903 * cindexname_compressed = bindex_filename_compressed = encode_filename(filepath_index_compressed)
jpayne@69 6904 * with nogil:
jpayne@69 6905 * self.fastafile = fai_load3(cfilename, cindexname, cindexname_compressed, 0) # <<<<<<<<<<<<<<
jpayne@69 6906 * else:
jpayne@69 6907 * with nogil:
jpayne@69 6908 */
jpayne@69 6909 __pyx_v_self->fastafile = fai_load3(__pyx_v_cfilename, __pyx_v_cindexname, __pyx_v_cindexname_compressed, 0);
jpayne@69 6910 }
jpayne@69 6911
jpayne@69 6912 /* "pysam/libcfaidx.pyx":171
jpayne@69 6913 * raise IOError("filename {} does not exist".format(filepath_index_compressed))
jpayne@69 6914 * cindexname_compressed = bindex_filename_compressed = encode_filename(filepath_index_compressed)
jpayne@69 6915 * with nogil: # <<<<<<<<<<<<<<
jpayne@69 6916 * self.fastafile = fai_load3(cfilename, cindexname, cindexname_compressed, 0)
jpayne@69 6917 * else:
jpayne@69 6918 */
jpayne@69 6919 /*finally:*/ {
jpayne@69 6920 /*normal exit:*/{
jpayne@69 6921 #ifdef WITH_THREAD
jpayne@69 6922 __Pyx_FastGIL_Forget();
jpayne@69 6923 Py_BLOCK_THREADS
jpayne@69 6924 #endif
jpayne@69 6925 goto __pyx_L14;
jpayne@69 6926 }
jpayne@69 6927 __pyx_L14:;
jpayne@69 6928 }
jpayne@69 6929 }
jpayne@69 6930
jpayne@69 6931 /* "pysam/libcfaidx.pyx":167
jpayne@69 6932 * cindexname = bindex_filename = encode_filename(filepath_index)
jpayne@69 6933 *
jpayne@69 6934 * if filepath_index_compressed: # <<<<<<<<<<<<<<
jpayne@69 6935 * if not os.path.exists(filepath_index_compressed):
jpayne@69 6936 * raise IOError("filename {} does not exist".format(filepath_index_compressed))
jpayne@69 6937 */
jpayne@69 6938 goto __pyx_L10;
jpayne@69 6939 }
jpayne@69 6940
jpayne@69 6941 /* "pysam/libcfaidx.pyx":174
jpayne@69 6942 * self.fastafile = fai_load3(cfilename, cindexname, cindexname_compressed, 0)
jpayne@69 6943 * else:
jpayne@69 6944 * with nogil: # <<<<<<<<<<<<<<
jpayne@69 6945 * self.fastafile = fai_load3(cfilename, cindexname, NULL, 0)
jpayne@69 6946 * else:
jpayne@69 6947 */
jpayne@69 6948 /*else*/ {
jpayne@69 6949 {
jpayne@69 6950 #ifdef WITH_THREAD
jpayne@69 6951 PyThreadState *_save;
jpayne@69 6952 _save = NULL;
jpayne@69 6953 Py_UNBLOCK_THREADS
jpayne@69 6954 __Pyx_FastGIL_Remember();
jpayne@69 6955 #endif
jpayne@69 6956 /*try:*/ {
jpayne@69 6957
jpayne@69 6958 /* "pysam/libcfaidx.pyx":175
jpayne@69 6959 * else:
jpayne@69 6960 * with nogil:
jpayne@69 6961 * self.fastafile = fai_load3(cfilename, cindexname, NULL, 0) # <<<<<<<<<<<<<<
jpayne@69 6962 * else:
jpayne@69 6963 * with nogil:
jpayne@69 6964 */
jpayne@69 6965 __pyx_v_self->fastafile = fai_load3(__pyx_v_cfilename, __pyx_v_cindexname, NULL, 0);
jpayne@69 6966 }
jpayne@69 6967
jpayne@69 6968 /* "pysam/libcfaidx.pyx":174
jpayne@69 6969 * self.fastafile = fai_load3(cfilename, cindexname, cindexname_compressed, 0)
jpayne@69 6970 * else:
jpayne@69 6971 * with nogil: # <<<<<<<<<<<<<<
jpayne@69 6972 * self.fastafile = fai_load3(cfilename, cindexname, NULL, 0)
jpayne@69 6973 * else:
jpayne@69 6974 */
jpayne@69 6975 /*finally:*/ {
jpayne@69 6976 /*normal exit:*/{
jpayne@69 6977 #ifdef WITH_THREAD
jpayne@69 6978 __Pyx_FastGIL_Forget();
jpayne@69 6979 Py_BLOCK_THREADS
jpayne@69 6980 #endif
jpayne@69 6981 goto __pyx_L17;
jpayne@69 6982 }
jpayne@69 6983 __pyx_L17:;
jpayne@69 6984 }
jpayne@69 6985 }
jpayne@69 6986 }
jpayne@69 6987 __pyx_L10:;
jpayne@69 6988
jpayne@69 6989 /* "pysam/libcfaidx.pyx":159
jpayne@69 6990 * # uncompressed fa: fai_load3 with filename and index_fai
jpayne@69 6991 * # uncompressed fa: fai_load with default index name
jpayne@69 6992 * if filepath_index: # <<<<<<<<<<<<<<
jpayne@69 6993 * # when opening, set flags to 0 - do not automatically
jpayne@69 6994 * # build index if it does not exist.
jpayne@69 6995 */
jpayne@69 6996 goto __pyx_L8;
jpayne@69 6997 }
jpayne@69 6998
jpayne@69 6999 /* "pysam/libcfaidx.pyx":177
jpayne@69 7000 * self.fastafile = fai_load3(cfilename, cindexname, NULL, 0)
jpayne@69 7001 * else:
jpayne@69 7002 * with nogil: # <<<<<<<<<<<<<<
jpayne@69 7003 * self.fastafile = fai_load(cfilename)
jpayne@69 7004 *
jpayne@69 7005 */
jpayne@69 7006 /*else*/ {
jpayne@69 7007 {
jpayne@69 7008 #ifdef WITH_THREAD
jpayne@69 7009 PyThreadState *_save;
jpayne@69 7010 _save = NULL;
jpayne@69 7011 Py_UNBLOCK_THREADS
jpayne@69 7012 __Pyx_FastGIL_Remember();
jpayne@69 7013 #endif
jpayne@69 7014 /*try:*/ {
jpayne@69 7015
jpayne@69 7016 /* "pysam/libcfaidx.pyx":178
jpayne@69 7017 * else:
jpayne@69 7018 * with nogil:
jpayne@69 7019 * self.fastafile = fai_load(cfilename) # <<<<<<<<<<<<<<
jpayne@69 7020 *
jpayne@69 7021 * if self.fastafile == NULL:
jpayne@69 7022 */
jpayne@69 7023 __pyx_v_self->fastafile = fai_load(__pyx_v_cfilename);
jpayne@69 7024 }
jpayne@69 7025
jpayne@69 7026 /* "pysam/libcfaidx.pyx":177
jpayne@69 7027 * self.fastafile = fai_load3(cfilename, cindexname, NULL, 0)
jpayne@69 7028 * else:
jpayne@69 7029 * with nogil: # <<<<<<<<<<<<<<
jpayne@69 7030 * self.fastafile = fai_load(cfilename)
jpayne@69 7031 *
jpayne@69 7032 */
jpayne@69 7033 /*finally:*/ {
jpayne@69 7034 /*normal exit:*/{
jpayne@69 7035 #ifdef WITH_THREAD
jpayne@69 7036 __Pyx_FastGIL_Forget();
jpayne@69 7037 Py_BLOCK_THREADS
jpayne@69 7038 #endif
jpayne@69 7039 goto __pyx_L20;
jpayne@69 7040 }
jpayne@69 7041 __pyx_L20:;
jpayne@69 7042 }
jpayne@69 7043 }
jpayne@69 7044 }
jpayne@69 7045 __pyx_L8:;
jpayne@69 7046
jpayne@69 7047 /* "pysam/libcfaidx.pyx":180
jpayne@69 7048 * self.fastafile = fai_load(cfilename)
jpayne@69 7049 *
jpayne@69 7050 * if self.fastafile == NULL: # <<<<<<<<<<<<<<
jpayne@69 7051 * raise IOError("error when opening file `%s`" % filename)
jpayne@69 7052 *
jpayne@69 7053 */
jpayne@69 7054 __pyx_t_1 = (__pyx_v_self->fastafile == NULL);
jpayne@69 7055 if (unlikely(__pyx_t_1)) {
jpayne@69 7056
jpayne@69 7057 /* "pysam/libcfaidx.pyx":181
jpayne@69 7058 *
jpayne@69 7059 * if self.fastafile == NULL:
jpayne@69 7060 * raise IOError("error when opening file `%s`" % filename) # <<<<<<<<<<<<<<
jpayne@69 7061 *
jpayne@69 7062 * cdef int nreferences = faidx_nseq(self.fastafile)
jpayne@69 7063 */
jpayne@69 7064 __pyx_t_3 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_error_when_opening_file_s, __pyx_v_filename); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 181, __pyx_L1_error)
jpayne@69 7065 __Pyx_GOTREF(__pyx_t_3);
jpayne@69 7066 __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_IOError, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 181, __pyx_L1_error)
jpayne@69 7067 __Pyx_GOTREF(__pyx_t_2);
jpayne@69 7068 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
jpayne@69 7069 __Pyx_Raise(__pyx_t_2, 0, 0, 0);
jpayne@69 7070 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@69 7071 __PYX_ERR(0, 181, __pyx_L1_error)
jpayne@69 7072
jpayne@69 7073 /* "pysam/libcfaidx.pyx":180
jpayne@69 7074 * self.fastafile = fai_load(cfilename)
jpayne@69 7075 *
jpayne@69 7076 * if self.fastafile == NULL: # <<<<<<<<<<<<<<
jpayne@69 7077 * raise IOError("error when opening file `%s`" % filename)
jpayne@69 7078 *
jpayne@69 7079 */
jpayne@69 7080 }
jpayne@69 7081
jpayne@69 7082 /* "pysam/libcfaidx.pyx":183
jpayne@69 7083 * raise IOError("error when opening file `%s`" % filename)
jpayne@69 7084 *
jpayne@69 7085 * cdef int nreferences = faidx_nseq(self.fastafile) # <<<<<<<<<<<<<<
jpayne@69 7086 * cdef int x
jpayne@69 7087 * cdef const char * s
jpayne@69 7088 */
jpayne@69 7089 __pyx_v_nreferences = faidx_nseq(__pyx_v_self->fastafile);
jpayne@69 7090
jpayne@69 7091 /* "pysam/libcfaidx.pyx":186
jpayne@69 7092 * cdef int x
jpayne@69 7093 * cdef const char * s
jpayne@69 7094 * self._references = [] # <<<<<<<<<<<<<<
jpayne@69 7095 * self._lengths = []
jpayne@69 7096 * for x from 0 <= x < nreferences:
jpayne@69 7097 */
jpayne@69 7098 __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 186, __pyx_L1_error)
jpayne@69 7099 __Pyx_GOTREF(__pyx_t_2);
jpayne@69 7100 __Pyx_GIVEREF(__pyx_t_2);
jpayne@69 7101 __Pyx_GOTREF(__pyx_v_self->_references);
jpayne@69 7102 __Pyx_DECREF(__pyx_v_self->_references);
jpayne@69 7103 __pyx_v_self->_references = __pyx_t_2;
jpayne@69 7104 __pyx_t_2 = 0;
jpayne@69 7105
jpayne@69 7106 /* "pysam/libcfaidx.pyx":187
jpayne@69 7107 * cdef const char * s
jpayne@69 7108 * self._references = []
jpayne@69 7109 * self._lengths = [] # <<<<<<<<<<<<<<
jpayne@69 7110 * for x from 0 <= x < nreferences:
jpayne@69 7111 * s = faidx_iseq(self.fastafile, x)
jpayne@69 7112 */
jpayne@69 7113 __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 187, __pyx_L1_error)
jpayne@69 7114 __Pyx_GOTREF(__pyx_t_2);
jpayne@69 7115 __Pyx_GIVEREF(__pyx_t_2);
jpayne@69 7116 __Pyx_GOTREF(__pyx_v_self->_lengths);
jpayne@69 7117 __Pyx_DECREF(__pyx_v_self->_lengths);
jpayne@69 7118 __pyx_v_self->_lengths = __pyx_t_2;
jpayne@69 7119 __pyx_t_2 = 0;
jpayne@69 7120
jpayne@69 7121 /* "pysam/libcfaidx.pyx":188
jpayne@69 7122 * self._references = []
jpayne@69 7123 * self._lengths = []
jpayne@69 7124 * for x from 0 <= x < nreferences: # <<<<<<<<<<<<<<
jpayne@69 7125 * s = faidx_iseq(self.fastafile, x)
jpayne@69 7126 * ss = force_str(s)
jpayne@69 7127 */
jpayne@69 7128 __pyx_t_9 = __pyx_v_nreferences;
jpayne@69 7129 for (__pyx_v_x = 0; __pyx_v_x < __pyx_t_9; __pyx_v_x++) {
jpayne@69 7130
jpayne@69 7131 /* "pysam/libcfaidx.pyx":189
jpayne@69 7132 * self._lengths = []
jpayne@69 7133 * for x from 0 <= x < nreferences:
jpayne@69 7134 * s = faidx_iseq(self.fastafile, x) # <<<<<<<<<<<<<<
jpayne@69 7135 * ss = force_str(s)
jpayne@69 7136 * self._references.append(ss)
jpayne@69 7137 */
jpayne@69 7138 __pyx_v_s = faidx_iseq(__pyx_v_self->fastafile, __pyx_v_x);
jpayne@69 7139
jpayne@69 7140 /* "pysam/libcfaidx.pyx":190
jpayne@69 7141 * for x from 0 <= x < nreferences:
jpayne@69 7142 * s = faidx_iseq(self.fastafile, x)
jpayne@69 7143 * ss = force_str(s) # <<<<<<<<<<<<<<
jpayne@69 7144 * self._references.append(ss)
jpayne@69 7145 * self._lengths.append(faidx_seq_len(self.fastafile, s))
jpayne@69 7146 */
jpayne@69 7147 __pyx_t_2 = __Pyx_PyBytes_FromString(__pyx_v_s); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 190, __pyx_L1_error)
jpayne@69 7148 __Pyx_GOTREF(__pyx_t_2);
jpayne@69 7149 __pyx_t_3 = __pyx_f_5pysam_9libcutils_force_str(__pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 190, __pyx_L1_error)
jpayne@69 7150 __Pyx_GOTREF(__pyx_t_3);
jpayne@69 7151 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@69 7152 __Pyx_XDECREF_SET(__pyx_v_ss, __pyx_t_3);
jpayne@69 7153 __pyx_t_3 = 0;
jpayne@69 7154
jpayne@69 7155 /* "pysam/libcfaidx.pyx":191
jpayne@69 7156 * s = faidx_iseq(self.fastafile, x)
jpayne@69 7157 * ss = force_str(s)
jpayne@69 7158 * self._references.append(ss) # <<<<<<<<<<<<<<
jpayne@69 7159 * self._lengths.append(faidx_seq_len(self.fastafile, s))
jpayne@69 7160 * self.reference2length = dict(zip(self._references, self._lengths))
jpayne@69 7161 */
jpayne@69 7162 __pyx_t_10 = __Pyx_PyObject_Append(__pyx_v_self->_references, __pyx_v_ss); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 191, __pyx_L1_error)
jpayne@69 7163
jpayne@69 7164 /* "pysam/libcfaidx.pyx":192
jpayne@69 7165 * ss = force_str(s)
jpayne@69 7166 * self._references.append(ss)
jpayne@69 7167 * self._lengths.append(faidx_seq_len(self.fastafile, s)) # <<<<<<<<<<<<<<
jpayne@69 7168 * self.reference2length = dict(zip(self._references, self._lengths))
jpayne@69 7169 *
jpayne@69 7170 */
jpayne@69 7171 __pyx_t_3 = __Pyx_PyInt_From_int(faidx_seq_len(__pyx_v_self->fastafile, __pyx_v_s)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 192, __pyx_L1_error)
jpayne@69 7172 __Pyx_GOTREF(__pyx_t_3);
jpayne@69 7173 __pyx_t_10 = __Pyx_PyObject_Append(__pyx_v_self->_lengths, __pyx_t_3); if (unlikely(__pyx_t_10 == ((int)-1))) __PYX_ERR(0, 192, __pyx_L1_error)
jpayne@69 7174 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
jpayne@69 7175 }
jpayne@69 7176
jpayne@69 7177 /* "pysam/libcfaidx.pyx":193
jpayne@69 7178 * self._references.append(ss)
jpayne@69 7179 * self._lengths.append(faidx_seq_len(self.fastafile, s))
jpayne@69 7180 * self.reference2length = dict(zip(self._references, self._lengths)) # <<<<<<<<<<<<<<
jpayne@69 7181 *
jpayne@69 7182 * def close(self):
jpayne@69 7183 */
jpayne@69 7184 __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 193, __pyx_L1_error)
jpayne@69 7185 __Pyx_GOTREF(__pyx_t_3);
jpayne@69 7186 __Pyx_INCREF(__pyx_v_self->_references);
jpayne@69 7187 __Pyx_GIVEREF(__pyx_v_self->_references);
jpayne@69 7188 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_self->_references)) __PYX_ERR(0, 193, __pyx_L1_error);
jpayne@69 7189 __Pyx_INCREF(__pyx_v_self->_lengths);
jpayne@69 7190 __Pyx_GIVEREF(__pyx_v_self->_lengths);
jpayne@69 7191 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_self->_lengths)) __PYX_ERR(0, 193, __pyx_L1_error);
jpayne@69 7192 __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_zip, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 193, __pyx_L1_error)
jpayne@69 7193 __Pyx_GOTREF(__pyx_t_2);
jpayne@69 7194 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
jpayne@69 7195 __pyx_t_3 = __Pyx_PyObject_CallOneArg(((PyObject *)(&PyDict_Type)), __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 193, __pyx_L1_error)
jpayne@69 7196 __Pyx_GOTREF(__pyx_t_3);
jpayne@69 7197 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@69 7198 __Pyx_GIVEREF(__pyx_t_3);
jpayne@69 7199 __Pyx_GOTREF(__pyx_v_self->reference2length);
jpayne@69 7200 __Pyx_DECREF(__pyx_v_self->reference2length);
jpayne@69 7201 __pyx_v_self->reference2length = __pyx_t_3;
jpayne@69 7202 __pyx_t_3 = 0;
jpayne@69 7203
jpayne@69 7204 /* "pysam/libcfaidx.pyx":133
jpayne@69 7205 * return faidx_nseq(self.fastafile)
jpayne@69 7206 *
jpayne@69 7207 * def _open(self, filename, filepath_index=None, filepath_index_compressed=None): # <<<<<<<<<<<<<<
jpayne@69 7208 * '''open an indexed fasta file.
jpayne@69 7209 *
jpayne@69 7210 */
jpayne@69 7211
jpayne@69 7212 /* function exit code */
jpayne@69 7213 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
jpayne@69 7214 goto __pyx_L0;
jpayne@69 7215 __pyx_L1_error:;
jpayne@69 7216 __Pyx_XDECREF(__pyx_t_2);
jpayne@69 7217 __Pyx_XDECREF(__pyx_t_3);
jpayne@69 7218 __Pyx_XDECREF(__pyx_t_4);
jpayne@69 7219 __Pyx_AddTraceback("pysam.libcfaidx.FastaFile._open", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 7220 __pyx_r = NULL;
jpayne@69 7221 __pyx_L0:;
jpayne@69 7222 __Pyx_XDECREF(__pyx_v_bindex_filename);
jpayne@69 7223 __Pyx_XDECREF(__pyx_v_bindex_filename_compressed);
jpayne@69 7224 __Pyx_XDECREF(__pyx_v_ss);
jpayne@69 7225 __Pyx_XGIVEREF(__pyx_r);
jpayne@69 7226 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@69 7227 __Pyx_RefNannyFinishContext();
jpayne@69 7228 return __pyx_r;
jpayne@69 7229 }
jpayne@69 7230
jpayne@69 7231 /* "pysam/libcfaidx.pyx":195
jpayne@69 7232 * self.reference2length = dict(zip(self._references, self._lengths))
jpayne@69 7233 *
jpayne@69 7234 * def close(self): # <<<<<<<<<<<<<<
jpayne@69 7235 * """close the file."""
jpayne@69 7236 * if self.fastafile != NULL:
jpayne@69 7237 */
jpayne@69 7238
jpayne@69 7239 /* Python wrapper */
jpayne@69 7240 static PyObject *__pyx_pw_5pysam_9libcfaidx_9FastaFile_9close(PyObject *__pyx_v_self,
jpayne@69 7241 #if CYTHON_METH_FASTCALL
jpayne@69 7242 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@69 7243 #else
jpayne@69 7244 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@69 7245 #endif
jpayne@69 7246 ); /*proto*/
jpayne@69 7247 PyDoc_STRVAR(__pyx_doc_5pysam_9libcfaidx_9FastaFile_8close, "FastaFile.close(self)\nclose the file.");
jpayne@69 7248 static PyMethodDef __pyx_mdef_5pysam_9libcfaidx_9FastaFile_9close = {"close", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_9libcfaidx_9FastaFile_9close, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_9libcfaidx_9FastaFile_8close};
jpayne@69 7249 static PyObject *__pyx_pw_5pysam_9libcfaidx_9FastaFile_9close(PyObject *__pyx_v_self,
jpayne@69 7250 #if CYTHON_METH_FASTCALL
jpayne@69 7251 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@69 7252 #else
jpayne@69 7253 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@69 7254 #endif
jpayne@69 7255 ) {
jpayne@69 7256 #if !CYTHON_METH_FASTCALL
jpayne@69 7257 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
jpayne@69 7258 #endif
jpayne@69 7259 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@69 7260 PyObject *__pyx_r = 0;
jpayne@69 7261 __Pyx_RefNannyDeclarations
jpayne@69 7262 __Pyx_RefNannySetupContext("close (wrapper)", 0);
jpayne@69 7263 #if !CYTHON_METH_FASTCALL
jpayne@69 7264 #if CYTHON_ASSUME_SAFE_MACROS
jpayne@69 7265 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
jpayne@69 7266 #else
jpayne@69 7267 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
jpayne@69 7268 #endif
jpayne@69 7269 #endif
jpayne@69 7270 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
jpayne@69 7271 if (unlikely(__pyx_nargs > 0)) {
jpayne@69 7272 __Pyx_RaiseArgtupleInvalid("close", 1, 0, 0, __pyx_nargs); return NULL;}
jpayne@69 7273 if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "close", 0))) return NULL;
jpayne@69 7274 __pyx_r = __pyx_pf_5pysam_9libcfaidx_9FastaFile_8close(((struct __pyx_obj_5pysam_9libcfaidx_FastaFile *)__pyx_v_self));
jpayne@69 7275
jpayne@69 7276 /* function exit code */
jpayne@69 7277 __Pyx_RefNannyFinishContext();
jpayne@69 7278 return __pyx_r;
jpayne@69 7279 }
jpayne@69 7280
jpayne@69 7281 static PyObject *__pyx_pf_5pysam_9libcfaidx_9FastaFile_8close(struct __pyx_obj_5pysam_9libcfaidx_FastaFile *__pyx_v_self) {
jpayne@69 7282 PyObject *__pyx_r = NULL;
jpayne@69 7283 __Pyx_TraceDeclarations
jpayne@69 7284 __Pyx_RefNannyDeclarations
jpayne@69 7285 int __pyx_t_1;
jpayne@69 7286 int __pyx_lineno = 0;
jpayne@69 7287 const char *__pyx_filename = NULL;
jpayne@69 7288 int __pyx_clineno = 0;
jpayne@69 7289 __Pyx_TraceFrameInit(__pyx_codeobj__5)
jpayne@69 7290 __Pyx_RefNannySetupContext("close", 1);
jpayne@69 7291 __Pyx_TraceCall("close", __pyx_f[0], 195, 0, __PYX_ERR(0, 195, __pyx_L1_error));
jpayne@69 7292
jpayne@69 7293 /* "pysam/libcfaidx.pyx":197
jpayne@69 7294 * def close(self):
jpayne@69 7295 * """close the file."""
jpayne@69 7296 * if self.fastafile != NULL: # <<<<<<<<<<<<<<
jpayne@69 7297 * fai_destroy(self.fastafile)
jpayne@69 7298 * self.fastafile = NULL
jpayne@69 7299 */
jpayne@69 7300 __pyx_t_1 = (__pyx_v_self->fastafile != NULL);
jpayne@69 7301 if (__pyx_t_1) {
jpayne@69 7302
jpayne@69 7303 /* "pysam/libcfaidx.pyx":198
jpayne@69 7304 * """close the file."""
jpayne@69 7305 * if self.fastafile != NULL:
jpayne@69 7306 * fai_destroy(self.fastafile) # <<<<<<<<<<<<<<
jpayne@69 7307 * self.fastafile = NULL
jpayne@69 7308 *
jpayne@69 7309 */
jpayne@69 7310 fai_destroy(__pyx_v_self->fastafile);
jpayne@69 7311
jpayne@69 7312 /* "pysam/libcfaidx.pyx":199
jpayne@69 7313 * if self.fastafile != NULL:
jpayne@69 7314 * fai_destroy(self.fastafile)
jpayne@69 7315 * self.fastafile = NULL # <<<<<<<<<<<<<<
jpayne@69 7316 *
jpayne@69 7317 * def __dealloc__(self):
jpayne@69 7318 */
jpayne@69 7319 __pyx_v_self->fastafile = NULL;
jpayne@69 7320
jpayne@69 7321 /* "pysam/libcfaidx.pyx":197
jpayne@69 7322 * def close(self):
jpayne@69 7323 * """close the file."""
jpayne@69 7324 * if self.fastafile != NULL: # <<<<<<<<<<<<<<
jpayne@69 7325 * fai_destroy(self.fastafile)
jpayne@69 7326 * self.fastafile = NULL
jpayne@69 7327 */
jpayne@69 7328 }
jpayne@69 7329
jpayne@69 7330 /* "pysam/libcfaidx.pyx":195
jpayne@69 7331 * self.reference2length = dict(zip(self._references, self._lengths))
jpayne@69 7332 *
jpayne@69 7333 * def close(self): # <<<<<<<<<<<<<<
jpayne@69 7334 * """close the file."""
jpayne@69 7335 * if self.fastafile != NULL:
jpayne@69 7336 */
jpayne@69 7337
jpayne@69 7338 /* function exit code */
jpayne@69 7339 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
jpayne@69 7340 goto __pyx_L0;
jpayne@69 7341 __pyx_L1_error:;
jpayne@69 7342 __Pyx_AddTraceback("pysam.libcfaidx.FastaFile.close", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 7343 __pyx_r = NULL;
jpayne@69 7344 __pyx_L0:;
jpayne@69 7345 __Pyx_XGIVEREF(__pyx_r);
jpayne@69 7346 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@69 7347 __Pyx_RefNannyFinishContext();
jpayne@69 7348 return __pyx_r;
jpayne@69 7349 }
jpayne@69 7350
jpayne@69 7351 /* "pysam/libcfaidx.pyx":201
jpayne@69 7352 * self.fastafile = NULL
jpayne@69 7353 *
jpayne@69 7354 * def __dealloc__(self): # <<<<<<<<<<<<<<
jpayne@69 7355 * if self.fastafile != NULL:
jpayne@69 7356 * fai_destroy(self.fastafile)
jpayne@69 7357 */
jpayne@69 7358
jpayne@69 7359 /* Python wrapper */
jpayne@69 7360 static void __pyx_pw_5pysam_9libcfaidx_9FastaFile_11__dealloc__(PyObject *__pyx_v_self); /*proto*/
jpayne@69 7361 static void __pyx_pw_5pysam_9libcfaidx_9FastaFile_11__dealloc__(PyObject *__pyx_v_self) {
jpayne@69 7362 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@69 7363 __Pyx_RefNannyDeclarations
jpayne@69 7364 __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
jpayne@69 7365 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
jpayne@69 7366 __pyx_pf_5pysam_9libcfaidx_9FastaFile_10__dealloc__(((struct __pyx_obj_5pysam_9libcfaidx_FastaFile *)__pyx_v_self));
jpayne@69 7367
jpayne@69 7368 /* function exit code */
jpayne@69 7369 __Pyx_RefNannyFinishContext();
jpayne@69 7370 }
jpayne@69 7371
jpayne@69 7372 static void __pyx_pf_5pysam_9libcfaidx_9FastaFile_10__dealloc__(struct __pyx_obj_5pysam_9libcfaidx_FastaFile *__pyx_v_self) {
jpayne@69 7373 __Pyx_TraceDeclarations
jpayne@69 7374 int __pyx_t_1;
jpayne@69 7375 int __pyx_lineno = 0;
jpayne@69 7376 const char *__pyx_filename = NULL;
jpayne@69 7377 int __pyx_clineno = 0;
jpayne@69 7378 __Pyx_TraceCall("__dealloc__", __pyx_f[0], 201, 0, __PYX_ERR(0, 201, __pyx_L1_error));
jpayne@69 7379
jpayne@69 7380 /* "pysam/libcfaidx.pyx":202
jpayne@69 7381 *
jpayne@69 7382 * def __dealloc__(self):
jpayne@69 7383 * if self.fastafile != NULL: # <<<<<<<<<<<<<<
jpayne@69 7384 * fai_destroy(self.fastafile)
jpayne@69 7385 * self.fastafile = NULL
jpayne@69 7386 */
jpayne@69 7387 __pyx_t_1 = (__pyx_v_self->fastafile != NULL);
jpayne@69 7388 if (__pyx_t_1) {
jpayne@69 7389
jpayne@69 7390 /* "pysam/libcfaidx.pyx":203
jpayne@69 7391 * def __dealloc__(self):
jpayne@69 7392 * if self.fastafile != NULL:
jpayne@69 7393 * fai_destroy(self.fastafile) # <<<<<<<<<<<<<<
jpayne@69 7394 * self.fastafile = NULL
jpayne@69 7395 *
jpayne@69 7396 */
jpayne@69 7397 fai_destroy(__pyx_v_self->fastafile);
jpayne@69 7398
jpayne@69 7399 /* "pysam/libcfaidx.pyx":204
jpayne@69 7400 * if self.fastafile != NULL:
jpayne@69 7401 * fai_destroy(self.fastafile)
jpayne@69 7402 * self.fastafile = NULL # <<<<<<<<<<<<<<
jpayne@69 7403 *
jpayne@69 7404 * # context manager interface
jpayne@69 7405 */
jpayne@69 7406 __pyx_v_self->fastafile = NULL;
jpayne@69 7407
jpayne@69 7408 /* "pysam/libcfaidx.pyx":202
jpayne@69 7409 *
jpayne@69 7410 * def __dealloc__(self):
jpayne@69 7411 * if self.fastafile != NULL: # <<<<<<<<<<<<<<
jpayne@69 7412 * fai_destroy(self.fastafile)
jpayne@69 7413 * self.fastafile = NULL
jpayne@69 7414 */
jpayne@69 7415 }
jpayne@69 7416
jpayne@69 7417 /* "pysam/libcfaidx.pyx":201
jpayne@69 7418 * self.fastafile = NULL
jpayne@69 7419 *
jpayne@69 7420 * def __dealloc__(self): # <<<<<<<<<<<<<<
jpayne@69 7421 * if self.fastafile != NULL:
jpayne@69 7422 * fai_destroy(self.fastafile)
jpayne@69 7423 */
jpayne@69 7424
jpayne@69 7425 /* function exit code */
jpayne@69 7426 goto __pyx_L0;
jpayne@69 7427 __pyx_L1_error:;
jpayne@69 7428 __Pyx_WriteUnraisable("pysam.libcfaidx.FastaFile.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
jpayne@69 7429 __pyx_L0:;
jpayne@69 7430 __Pyx_TraceReturn(Py_None, 0);
jpayne@69 7431 }
jpayne@69 7432
jpayne@69 7433 /* "pysam/libcfaidx.pyx":207
jpayne@69 7434 *
jpayne@69 7435 * # context manager interface
jpayne@69 7436 * def __enter__(self): # <<<<<<<<<<<<<<
jpayne@69 7437 * return self
jpayne@69 7438 *
jpayne@69 7439 */
jpayne@69 7440
jpayne@69 7441 /* Python wrapper */
jpayne@69 7442 static PyObject *__pyx_pw_5pysam_9libcfaidx_9FastaFile_13__enter__(PyObject *__pyx_v_self,
jpayne@69 7443 #if CYTHON_METH_FASTCALL
jpayne@69 7444 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@69 7445 #else
jpayne@69 7446 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@69 7447 #endif
jpayne@69 7448 ); /*proto*/
jpayne@69 7449 PyDoc_STRVAR(__pyx_doc_5pysam_9libcfaidx_9FastaFile_12__enter__, "FastaFile.__enter__(self)");
jpayne@69 7450 static PyMethodDef __pyx_mdef_5pysam_9libcfaidx_9FastaFile_13__enter__ = {"__enter__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_9libcfaidx_9FastaFile_13__enter__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_9libcfaidx_9FastaFile_12__enter__};
jpayne@69 7451 static PyObject *__pyx_pw_5pysam_9libcfaidx_9FastaFile_13__enter__(PyObject *__pyx_v_self,
jpayne@69 7452 #if CYTHON_METH_FASTCALL
jpayne@69 7453 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@69 7454 #else
jpayne@69 7455 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@69 7456 #endif
jpayne@69 7457 ) {
jpayne@69 7458 #if !CYTHON_METH_FASTCALL
jpayne@69 7459 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
jpayne@69 7460 #endif
jpayne@69 7461 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@69 7462 PyObject *__pyx_r = 0;
jpayne@69 7463 __Pyx_RefNannyDeclarations
jpayne@69 7464 __Pyx_RefNannySetupContext("__enter__ (wrapper)", 0);
jpayne@69 7465 #if !CYTHON_METH_FASTCALL
jpayne@69 7466 #if CYTHON_ASSUME_SAFE_MACROS
jpayne@69 7467 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
jpayne@69 7468 #else
jpayne@69 7469 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
jpayne@69 7470 #endif
jpayne@69 7471 #endif
jpayne@69 7472 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
jpayne@69 7473 if (unlikely(__pyx_nargs > 0)) {
jpayne@69 7474 __Pyx_RaiseArgtupleInvalid("__enter__", 1, 0, 0, __pyx_nargs); return NULL;}
jpayne@69 7475 if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__enter__", 0))) return NULL;
jpayne@69 7476 __pyx_r = __pyx_pf_5pysam_9libcfaidx_9FastaFile_12__enter__(((struct __pyx_obj_5pysam_9libcfaidx_FastaFile *)__pyx_v_self));
jpayne@69 7477
jpayne@69 7478 /* function exit code */
jpayne@69 7479 __Pyx_RefNannyFinishContext();
jpayne@69 7480 return __pyx_r;
jpayne@69 7481 }
jpayne@69 7482
jpayne@69 7483 static PyObject *__pyx_pf_5pysam_9libcfaidx_9FastaFile_12__enter__(struct __pyx_obj_5pysam_9libcfaidx_FastaFile *__pyx_v_self) {
jpayne@69 7484 PyObject *__pyx_r = NULL;
jpayne@69 7485 __Pyx_TraceDeclarations
jpayne@69 7486 __Pyx_RefNannyDeclarations
jpayne@69 7487 int __pyx_lineno = 0;
jpayne@69 7488 const char *__pyx_filename = NULL;
jpayne@69 7489 int __pyx_clineno = 0;
jpayne@69 7490 __Pyx_TraceFrameInit(__pyx_codeobj__6)
jpayne@69 7491 __Pyx_RefNannySetupContext("__enter__", 1);
jpayne@69 7492 __Pyx_TraceCall("__enter__", __pyx_f[0], 207, 0, __PYX_ERR(0, 207, __pyx_L1_error));
jpayne@69 7493
jpayne@69 7494 /* "pysam/libcfaidx.pyx":208
jpayne@69 7495 * # context manager interface
jpayne@69 7496 * def __enter__(self):
jpayne@69 7497 * return self # <<<<<<<<<<<<<<
jpayne@69 7498 *
jpayne@69 7499 * def __exit__(self, exc_type, exc_value, traceback):
jpayne@69 7500 */
jpayne@69 7501 __Pyx_XDECREF(__pyx_r);
jpayne@69 7502 __Pyx_INCREF((PyObject *)__pyx_v_self);
jpayne@69 7503 __pyx_r = ((PyObject *)__pyx_v_self);
jpayne@69 7504 goto __pyx_L0;
jpayne@69 7505
jpayne@69 7506 /* "pysam/libcfaidx.pyx":207
jpayne@69 7507 *
jpayne@69 7508 * # context manager interface
jpayne@69 7509 * def __enter__(self): # <<<<<<<<<<<<<<
jpayne@69 7510 * return self
jpayne@69 7511 *
jpayne@69 7512 */
jpayne@69 7513
jpayne@69 7514 /* function exit code */
jpayne@69 7515 __pyx_L1_error:;
jpayne@69 7516 __Pyx_AddTraceback("pysam.libcfaidx.FastaFile.__enter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 7517 __pyx_r = NULL;
jpayne@69 7518 __pyx_L0:;
jpayne@69 7519 __Pyx_XGIVEREF(__pyx_r);
jpayne@69 7520 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@69 7521 __Pyx_RefNannyFinishContext();
jpayne@69 7522 return __pyx_r;
jpayne@69 7523 }
jpayne@69 7524
jpayne@69 7525 /* "pysam/libcfaidx.pyx":210
jpayne@69 7526 * return self
jpayne@69 7527 *
jpayne@69 7528 * def __exit__(self, exc_type, exc_value, traceback): # <<<<<<<<<<<<<<
jpayne@69 7529 * self.close()
jpayne@69 7530 * return False
jpayne@69 7531 */
jpayne@69 7532
jpayne@69 7533 /* Python wrapper */
jpayne@69 7534 static PyObject *__pyx_pw_5pysam_9libcfaidx_9FastaFile_15__exit__(PyObject *__pyx_v_self,
jpayne@69 7535 #if CYTHON_METH_FASTCALL
jpayne@69 7536 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@69 7537 #else
jpayne@69 7538 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@69 7539 #endif
jpayne@69 7540 ); /*proto*/
jpayne@69 7541 PyDoc_STRVAR(__pyx_doc_5pysam_9libcfaidx_9FastaFile_14__exit__, "FastaFile.__exit__(self, exc_type, exc_value, traceback)");
jpayne@69 7542 static PyMethodDef __pyx_mdef_5pysam_9libcfaidx_9FastaFile_15__exit__ = {"__exit__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_9libcfaidx_9FastaFile_15__exit__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_9libcfaidx_9FastaFile_14__exit__};
jpayne@69 7543 static PyObject *__pyx_pw_5pysam_9libcfaidx_9FastaFile_15__exit__(PyObject *__pyx_v_self,
jpayne@69 7544 #if CYTHON_METH_FASTCALL
jpayne@69 7545 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@69 7546 #else
jpayne@69 7547 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@69 7548 #endif
jpayne@69 7549 ) {
jpayne@69 7550 CYTHON_UNUSED PyObject *__pyx_v_exc_type = 0;
jpayne@69 7551 CYTHON_UNUSED PyObject *__pyx_v_exc_value = 0;
jpayne@69 7552 CYTHON_UNUSED PyObject *__pyx_v_traceback = 0;
jpayne@69 7553 #if !CYTHON_METH_FASTCALL
jpayne@69 7554 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
jpayne@69 7555 #endif
jpayne@69 7556 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@69 7557 PyObject* values[3] = {0,0,0};
jpayne@69 7558 int __pyx_lineno = 0;
jpayne@69 7559 const char *__pyx_filename = NULL;
jpayne@69 7560 int __pyx_clineno = 0;
jpayne@69 7561 PyObject *__pyx_r = 0;
jpayne@69 7562 __Pyx_RefNannyDeclarations
jpayne@69 7563 __Pyx_RefNannySetupContext("__exit__ (wrapper)", 0);
jpayne@69 7564 #if !CYTHON_METH_FASTCALL
jpayne@69 7565 #if CYTHON_ASSUME_SAFE_MACROS
jpayne@69 7566 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
jpayne@69 7567 #else
jpayne@69 7568 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
jpayne@69 7569 #endif
jpayne@69 7570 #endif
jpayne@69 7571 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
jpayne@69 7572 {
jpayne@69 7573 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_exc_type,&__pyx_n_s_exc_value,&__pyx_n_s_traceback,0};
jpayne@69 7574 if (__pyx_kwds) {
jpayne@69 7575 Py_ssize_t kw_args;
jpayne@69 7576 switch (__pyx_nargs) {
jpayne@69 7577 case 3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
jpayne@69 7578 CYTHON_FALLTHROUGH;
jpayne@69 7579 case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
jpayne@69 7580 CYTHON_FALLTHROUGH;
jpayne@69 7581 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
jpayne@69 7582 CYTHON_FALLTHROUGH;
jpayne@69 7583 case 0: break;
jpayne@69 7584 default: goto __pyx_L5_argtuple_error;
jpayne@69 7585 }
jpayne@69 7586 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
jpayne@69 7587 switch (__pyx_nargs) {
jpayne@69 7588 case 0:
jpayne@69 7589 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_exc_type)) != 0)) {
jpayne@69 7590 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
jpayne@69 7591 kw_args--;
jpayne@69 7592 }
jpayne@69 7593 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 210, __pyx_L3_error)
jpayne@69 7594 else goto __pyx_L5_argtuple_error;
jpayne@69 7595 CYTHON_FALLTHROUGH;
jpayne@69 7596 case 1:
jpayne@69 7597 if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_exc_value)) != 0)) {
jpayne@69 7598 (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
jpayne@69 7599 kw_args--;
jpayne@69 7600 }
jpayne@69 7601 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 210, __pyx_L3_error)
jpayne@69 7602 else {
jpayne@69 7603 __Pyx_RaiseArgtupleInvalid("__exit__", 1, 3, 3, 1); __PYX_ERR(0, 210, __pyx_L3_error)
jpayne@69 7604 }
jpayne@69 7605 CYTHON_FALLTHROUGH;
jpayne@69 7606 case 2:
jpayne@69 7607 if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_traceback)) != 0)) {
jpayne@69 7608 (void)__Pyx_Arg_NewRef_FASTCALL(values[2]);
jpayne@69 7609 kw_args--;
jpayne@69 7610 }
jpayne@69 7611 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 210, __pyx_L3_error)
jpayne@69 7612 else {
jpayne@69 7613 __Pyx_RaiseArgtupleInvalid("__exit__", 1, 3, 3, 2); __PYX_ERR(0, 210, __pyx_L3_error)
jpayne@69 7614 }
jpayne@69 7615 }
jpayne@69 7616 if (unlikely(kw_args > 0)) {
jpayne@69 7617 const Py_ssize_t kwd_pos_args = __pyx_nargs;
jpayne@69 7618 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__exit__") < 0)) __PYX_ERR(0, 210, __pyx_L3_error)
jpayne@69 7619 }
jpayne@69 7620 } else if (unlikely(__pyx_nargs != 3)) {
jpayne@69 7621 goto __pyx_L5_argtuple_error;
jpayne@69 7622 } else {
jpayne@69 7623 values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
jpayne@69 7624 values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
jpayne@69 7625 values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
jpayne@69 7626 }
jpayne@69 7627 __pyx_v_exc_type = values[0];
jpayne@69 7628 __pyx_v_exc_value = values[1];
jpayne@69 7629 __pyx_v_traceback = values[2];
jpayne@69 7630 }
jpayne@69 7631 goto __pyx_L6_skip;
jpayne@69 7632 __pyx_L5_argtuple_error:;
jpayne@69 7633 __Pyx_RaiseArgtupleInvalid("__exit__", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 210, __pyx_L3_error)
jpayne@69 7634 __pyx_L6_skip:;
jpayne@69 7635 goto __pyx_L4_argument_unpacking_done;
jpayne@69 7636 __pyx_L3_error:;
jpayne@69 7637 {
jpayne@69 7638 Py_ssize_t __pyx_temp;
jpayne@69 7639 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
jpayne@69 7640 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
jpayne@69 7641 }
jpayne@69 7642 }
jpayne@69 7643 __Pyx_AddTraceback("pysam.libcfaidx.FastaFile.__exit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 7644 __Pyx_RefNannyFinishContext();
jpayne@69 7645 return NULL;
jpayne@69 7646 __pyx_L4_argument_unpacking_done:;
jpayne@69 7647 __pyx_r = __pyx_pf_5pysam_9libcfaidx_9FastaFile_14__exit__(((struct __pyx_obj_5pysam_9libcfaidx_FastaFile *)__pyx_v_self), __pyx_v_exc_type, __pyx_v_exc_value, __pyx_v_traceback);
jpayne@69 7648
jpayne@69 7649 /* function exit code */
jpayne@69 7650 {
jpayne@69 7651 Py_ssize_t __pyx_temp;
jpayne@69 7652 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
jpayne@69 7653 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
jpayne@69 7654 }
jpayne@69 7655 }
jpayne@69 7656 __Pyx_RefNannyFinishContext();
jpayne@69 7657 return __pyx_r;
jpayne@69 7658 }
jpayne@69 7659
jpayne@69 7660 static PyObject *__pyx_pf_5pysam_9libcfaidx_9FastaFile_14__exit__(struct __pyx_obj_5pysam_9libcfaidx_FastaFile *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_exc_type, CYTHON_UNUSED PyObject *__pyx_v_exc_value, CYTHON_UNUSED PyObject *__pyx_v_traceback) {
jpayne@69 7661 PyObject *__pyx_r = NULL;
jpayne@69 7662 __Pyx_TraceDeclarations
jpayne@69 7663 __Pyx_RefNannyDeclarations
jpayne@69 7664 PyObject *__pyx_t_1 = NULL;
jpayne@69 7665 PyObject *__pyx_t_2 = NULL;
jpayne@69 7666 PyObject *__pyx_t_3 = NULL;
jpayne@69 7667 unsigned int __pyx_t_4;
jpayne@69 7668 int __pyx_lineno = 0;
jpayne@69 7669 const char *__pyx_filename = NULL;
jpayne@69 7670 int __pyx_clineno = 0;
jpayne@69 7671 __Pyx_TraceFrameInit(__pyx_codeobj__7)
jpayne@69 7672 __Pyx_RefNannySetupContext("__exit__", 1);
jpayne@69 7673 __Pyx_TraceCall("__exit__", __pyx_f[0], 210, 0, __PYX_ERR(0, 210, __pyx_L1_error));
jpayne@69 7674
jpayne@69 7675 /* "pysam/libcfaidx.pyx":211
jpayne@69 7676 *
jpayne@69 7677 * def __exit__(self, exc_type, exc_value, traceback):
jpayne@69 7678 * self.close() # <<<<<<<<<<<<<<
jpayne@69 7679 * return False
jpayne@69 7680 *
jpayne@69 7681 */
jpayne@69 7682 __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_close); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 211, __pyx_L1_error)
jpayne@69 7683 __Pyx_GOTREF(__pyx_t_2);
jpayne@69 7684 __pyx_t_3 = NULL;
jpayne@69 7685 __pyx_t_4 = 0;
jpayne@69 7686 #if CYTHON_UNPACK_METHODS
jpayne@69 7687 if (likely(PyMethod_Check(__pyx_t_2))) {
jpayne@69 7688 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
jpayne@69 7689 if (likely(__pyx_t_3)) {
jpayne@69 7690 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
jpayne@69 7691 __Pyx_INCREF(__pyx_t_3);
jpayne@69 7692 __Pyx_INCREF(function);
jpayne@69 7693 __Pyx_DECREF_SET(__pyx_t_2, function);
jpayne@69 7694 __pyx_t_4 = 1;
jpayne@69 7695 }
jpayne@69 7696 }
jpayne@69 7697 #endif
jpayne@69 7698 {
jpayne@69 7699 PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
jpayne@69 7700 __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
jpayne@69 7701 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
jpayne@69 7702 if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 211, __pyx_L1_error)
jpayne@69 7703 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 7704 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@69 7705 }
jpayne@69 7706 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@69 7707
jpayne@69 7708 /* "pysam/libcfaidx.pyx":212
jpayne@69 7709 * def __exit__(self, exc_type, exc_value, traceback):
jpayne@69 7710 * self.close()
jpayne@69 7711 * return False # <<<<<<<<<<<<<<
jpayne@69 7712 *
jpayne@69 7713 * property closed:
jpayne@69 7714 */
jpayne@69 7715 __Pyx_XDECREF(__pyx_r);
jpayne@69 7716 __Pyx_INCREF(Py_False);
jpayne@69 7717 __pyx_r = Py_False;
jpayne@69 7718 goto __pyx_L0;
jpayne@69 7719
jpayne@69 7720 /* "pysam/libcfaidx.pyx":210
jpayne@69 7721 * return self
jpayne@69 7722 *
jpayne@69 7723 * def __exit__(self, exc_type, exc_value, traceback): # <<<<<<<<<<<<<<
jpayne@69 7724 * self.close()
jpayne@69 7725 * return False
jpayne@69 7726 */
jpayne@69 7727
jpayne@69 7728 /* function exit code */
jpayne@69 7729 __pyx_L1_error:;
jpayne@69 7730 __Pyx_XDECREF(__pyx_t_1);
jpayne@69 7731 __Pyx_XDECREF(__pyx_t_2);
jpayne@69 7732 __Pyx_XDECREF(__pyx_t_3);
jpayne@69 7733 __Pyx_AddTraceback("pysam.libcfaidx.FastaFile.__exit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 7734 __pyx_r = NULL;
jpayne@69 7735 __pyx_L0:;
jpayne@69 7736 __Pyx_XGIVEREF(__pyx_r);
jpayne@69 7737 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@69 7738 __Pyx_RefNannyFinishContext();
jpayne@69 7739 return __pyx_r;
jpayne@69 7740 }
jpayne@69 7741
jpayne@69 7742 /* "pysam/libcfaidx.pyx":218
jpayne@69 7743 * This is a read-only attribute; the close() method changes the value.
jpayne@69 7744 * """
jpayne@69 7745 * def __get__(self): # <<<<<<<<<<<<<<
jpayne@69 7746 * return not self.is_open()
jpayne@69 7747 *
jpayne@69 7748 */
jpayne@69 7749
jpayne@69 7750 /* Python wrapper */
jpayne@69 7751 static PyObject *__pyx_pw_5pysam_9libcfaidx_9FastaFile_6closed_1__get__(PyObject *__pyx_v_self); /*proto*/
jpayne@69 7752 static PyObject *__pyx_pw_5pysam_9libcfaidx_9FastaFile_6closed_1__get__(PyObject *__pyx_v_self) {
jpayne@69 7753 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@69 7754 PyObject *__pyx_r = 0;
jpayne@69 7755 __Pyx_RefNannyDeclarations
jpayne@69 7756 __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
jpayne@69 7757 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
jpayne@69 7758 __pyx_r = __pyx_pf_5pysam_9libcfaidx_9FastaFile_6closed___get__(((struct __pyx_obj_5pysam_9libcfaidx_FastaFile *)__pyx_v_self));
jpayne@69 7759
jpayne@69 7760 /* function exit code */
jpayne@69 7761 __Pyx_RefNannyFinishContext();
jpayne@69 7762 return __pyx_r;
jpayne@69 7763 }
jpayne@69 7764
jpayne@69 7765 static PyObject *__pyx_pf_5pysam_9libcfaidx_9FastaFile_6closed___get__(struct __pyx_obj_5pysam_9libcfaidx_FastaFile *__pyx_v_self) {
jpayne@69 7766 PyObject *__pyx_r = NULL;
jpayne@69 7767 __Pyx_TraceDeclarations
jpayne@69 7768 __Pyx_RefNannyDeclarations
jpayne@69 7769 PyObject *__pyx_t_1 = NULL;
jpayne@69 7770 PyObject *__pyx_t_2 = NULL;
jpayne@69 7771 PyObject *__pyx_t_3 = NULL;
jpayne@69 7772 unsigned int __pyx_t_4;
jpayne@69 7773 int __pyx_t_5;
jpayne@69 7774 int __pyx_lineno = 0;
jpayne@69 7775 const char *__pyx_filename = NULL;
jpayne@69 7776 int __pyx_clineno = 0;
jpayne@69 7777 __Pyx_RefNannySetupContext("__get__", 1);
jpayne@69 7778 __Pyx_TraceCall("__get__", __pyx_f[0], 218, 0, __PYX_ERR(0, 218, __pyx_L1_error));
jpayne@69 7779
jpayne@69 7780 /* "pysam/libcfaidx.pyx":219
jpayne@69 7781 * """
jpayne@69 7782 * def __get__(self):
jpayne@69 7783 * return not self.is_open() # <<<<<<<<<<<<<<
jpayne@69 7784 *
jpayne@69 7785 * property filename:
jpayne@69 7786 */
jpayne@69 7787 __Pyx_XDECREF(__pyx_r);
jpayne@69 7788 __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_is_open); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 219, __pyx_L1_error)
jpayne@69 7789 __Pyx_GOTREF(__pyx_t_2);
jpayne@69 7790 __pyx_t_3 = NULL;
jpayne@69 7791 __pyx_t_4 = 0;
jpayne@69 7792 #if CYTHON_UNPACK_METHODS
jpayne@69 7793 if (likely(PyMethod_Check(__pyx_t_2))) {
jpayne@69 7794 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
jpayne@69 7795 if (likely(__pyx_t_3)) {
jpayne@69 7796 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
jpayne@69 7797 __Pyx_INCREF(__pyx_t_3);
jpayne@69 7798 __Pyx_INCREF(function);
jpayne@69 7799 __Pyx_DECREF_SET(__pyx_t_2, function);
jpayne@69 7800 __pyx_t_4 = 1;
jpayne@69 7801 }
jpayne@69 7802 }
jpayne@69 7803 #endif
jpayne@69 7804 {
jpayne@69 7805 PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
jpayne@69 7806 __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
jpayne@69 7807 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
jpayne@69 7808 if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 219, __pyx_L1_error)
jpayne@69 7809 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 7810 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@69 7811 }
jpayne@69 7812 __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 219, __pyx_L1_error)
jpayne@69 7813 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@69 7814 __pyx_t_1 = __Pyx_PyBool_FromLong((!__pyx_t_5)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 219, __pyx_L1_error)
jpayne@69 7815 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 7816 __pyx_r = __pyx_t_1;
jpayne@69 7817 __pyx_t_1 = 0;
jpayne@69 7818 goto __pyx_L0;
jpayne@69 7819
jpayne@69 7820 /* "pysam/libcfaidx.pyx":218
jpayne@69 7821 * This is a read-only attribute; the close() method changes the value.
jpayne@69 7822 * """
jpayne@69 7823 * def __get__(self): # <<<<<<<<<<<<<<
jpayne@69 7824 * return not self.is_open()
jpayne@69 7825 *
jpayne@69 7826 */
jpayne@69 7827
jpayne@69 7828 /* function exit code */
jpayne@69 7829 __pyx_L1_error:;
jpayne@69 7830 __Pyx_XDECREF(__pyx_t_1);
jpayne@69 7831 __Pyx_XDECREF(__pyx_t_2);
jpayne@69 7832 __Pyx_XDECREF(__pyx_t_3);
jpayne@69 7833 __Pyx_AddTraceback("pysam.libcfaidx.FastaFile.closed.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 7834 __pyx_r = NULL;
jpayne@69 7835 __pyx_L0:;
jpayne@69 7836 __Pyx_XGIVEREF(__pyx_r);
jpayne@69 7837 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@69 7838 __Pyx_RefNannyFinishContext();
jpayne@69 7839 return __pyx_r;
jpayne@69 7840 }
jpayne@69 7841
jpayne@69 7842 /* "pysam/libcfaidx.pyx":223
jpayne@69 7843 * property filename:
jpayne@69 7844 * """filename associated with this object. This is a read-only attribute."""
jpayne@69 7845 * def __get__(self): # <<<<<<<<<<<<<<
jpayne@69 7846 * return self._filename
jpayne@69 7847 *
jpayne@69 7848 */
jpayne@69 7849
jpayne@69 7850 /* Python wrapper */
jpayne@69 7851 static PyObject *__pyx_pw_5pysam_9libcfaidx_9FastaFile_8filename_1__get__(PyObject *__pyx_v_self); /*proto*/
jpayne@69 7852 static PyObject *__pyx_pw_5pysam_9libcfaidx_9FastaFile_8filename_1__get__(PyObject *__pyx_v_self) {
jpayne@69 7853 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@69 7854 PyObject *__pyx_r = 0;
jpayne@69 7855 __Pyx_RefNannyDeclarations
jpayne@69 7856 __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
jpayne@69 7857 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
jpayne@69 7858 __pyx_r = __pyx_pf_5pysam_9libcfaidx_9FastaFile_8filename___get__(((struct __pyx_obj_5pysam_9libcfaidx_FastaFile *)__pyx_v_self));
jpayne@69 7859
jpayne@69 7860 /* function exit code */
jpayne@69 7861 __Pyx_RefNannyFinishContext();
jpayne@69 7862 return __pyx_r;
jpayne@69 7863 }
jpayne@69 7864
jpayne@69 7865 static PyObject *__pyx_pf_5pysam_9libcfaidx_9FastaFile_8filename___get__(struct __pyx_obj_5pysam_9libcfaidx_FastaFile *__pyx_v_self) {
jpayne@69 7866 PyObject *__pyx_r = NULL;
jpayne@69 7867 __Pyx_TraceDeclarations
jpayne@69 7868 __Pyx_RefNannyDeclarations
jpayne@69 7869 int __pyx_lineno = 0;
jpayne@69 7870 const char *__pyx_filename = NULL;
jpayne@69 7871 int __pyx_clineno = 0;
jpayne@69 7872 __Pyx_RefNannySetupContext("__get__", 1);
jpayne@69 7873 __Pyx_TraceCall("__get__", __pyx_f[0], 223, 0, __PYX_ERR(0, 223, __pyx_L1_error));
jpayne@69 7874
jpayne@69 7875 /* "pysam/libcfaidx.pyx":224
jpayne@69 7876 * """filename associated with this object. This is a read-only attribute."""
jpayne@69 7877 * def __get__(self):
jpayne@69 7878 * return self._filename # <<<<<<<<<<<<<<
jpayne@69 7879 *
jpayne@69 7880 * property references:
jpayne@69 7881 */
jpayne@69 7882 __Pyx_XDECREF(__pyx_r);
jpayne@69 7883 __Pyx_INCREF(__pyx_v_self->_filename);
jpayne@69 7884 __pyx_r = __pyx_v_self->_filename;
jpayne@69 7885 goto __pyx_L0;
jpayne@69 7886
jpayne@69 7887 /* "pysam/libcfaidx.pyx":223
jpayne@69 7888 * property filename:
jpayne@69 7889 * """filename associated with this object. This is a read-only attribute."""
jpayne@69 7890 * def __get__(self): # <<<<<<<<<<<<<<
jpayne@69 7891 * return self._filename
jpayne@69 7892 *
jpayne@69 7893 */
jpayne@69 7894
jpayne@69 7895 /* function exit code */
jpayne@69 7896 __pyx_L1_error:;
jpayne@69 7897 __Pyx_AddTraceback("pysam.libcfaidx.FastaFile.filename.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 7898 __pyx_r = NULL;
jpayne@69 7899 __pyx_L0:;
jpayne@69 7900 __Pyx_XGIVEREF(__pyx_r);
jpayne@69 7901 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@69 7902 __Pyx_RefNannyFinishContext();
jpayne@69 7903 return __pyx_r;
jpayne@69 7904 }
jpayne@69 7905
jpayne@69 7906 /* "pysam/libcfaidx.pyx":228
jpayne@69 7907 * property references:
jpayne@69 7908 * '''tuple with the names of :term:`reference` sequences.'''
jpayne@69 7909 * def __get__(self): # <<<<<<<<<<<<<<
jpayne@69 7910 * return self._references
jpayne@69 7911 *
jpayne@69 7912 */
jpayne@69 7913
jpayne@69 7914 /* Python wrapper */
jpayne@69 7915 static PyObject *__pyx_pw_5pysam_9libcfaidx_9FastaFile_10references_1__get__(PyObject *__pyx_v_self); /*proto*/
jpayne@69 7916 static PyObject *__pyx_pw_5pysam_9libcfaidx_9FastaFile_10references_1__get__(PyObject *__pyx_v_self) {
jpayne@69 7917 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@69 7918 PyObject *__pyx_r = 0;
jpayne@69 7919 __Pyx_RefNannyDeclarations
jpayne@69 7920 __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
jpayne@69 7921 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
jpayne@69 7922 __pyx_r = __pyx_pf_5pysam_9libcfaidx_9FastaFile_10references___get__(((struct __pyx_obj_5pysam_9libcfaidx_FastaFile *)__pyx_v_self));
jpayne@69 7923
jpayne@69 7924 /* function exit code */
jpayne@69 7925 __Pyx_RefNannyFinishContext();
jpayne@69 7926 return __pyx_r;
jpayne@69 7927 }
jpayne@69 7928
jpayne@69 7929 static PyObject *__pyx_pf_5pysam_9libcfaidx_9FastaFile_10references___get__(struct __pyx_obj_5pysam_9libcfaidx_FastaFile *__pyx_v_self) {
jpayne@69 7930 PyObject *__pyx_r = NULL;
jpayne@69 7931 __Pyx_TraceDeclarations
jpayne@69 7932 __Pyx_RefNannyDeclarations
jpayne@69 7933 int __pyx_lineno = 0;
jpayne@69 7934 const char *__pyx_filename = NULL;
jpayne@69 7935 int __pyx_clineno = 0;
jpayne@69 7936 __Pyx_RefNannySetupContext("__get__", 1);
jpayne@69 7937 __Pyx_TraceCall("__get__", __pyx_f[0], 228, 0, __PYX_ERR(0, 228, __pyx_L1_error));
jpayne@69 7938
jpayne@69 7939 /* "pysam/libcfaidx.pyx":229
jpayne@69 7940 * '''tuple with the names of :term:`reference` sequences.'''
jpayne@69 7941 * def __get__(self):
jpayne@69 7942 * return self._references # <<<<<<<<<<<<<<
jpayne@69 7943 *
jpayne@69 7944 * property nreferences:
jpayne@69 7945 */
jpayne@69 7946 __Pyx_XDECREF(__pyx_r);
jpayne@69 7947 __Pyx_INCREF(__pyx_v_self->_references);
jpayne@69 7948 __pyx_r = __pyx_v_self->_references;
jpayne@69 7949 goto __pyx_L0;
jpayne@69 7950
jpayne@69 7951 /* "pysam/libcfaidx.pyx":228
jpayne@69 7952 * property references:
jpayne@69 7953 * '''tuple with the names of :term:`reference` sequences.'''
jpayne@69 7954 * def __get__(self): # <<<<<<<<<<<<<<
jpayne@69 7955 * return self._references
jpayne@69 7956 *
jpayne@69 7957 */
jpayne@69 7958
jpayne@69 7959 /* function exit code */
jpayne@69 7960 __pyx_L1_error:;
jpayne@69 7961 __Pyx_AddTraceback("pysam.libcfaidx.FastaFile.references.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 7962 __pyx_r = NULL;
jpayne@69 7963 __pyx_L0:;
jpayne@69 7964 __Pyx_XGIVEREF(__pyx_r);
jpayne@69 7965 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@69 7966 __Pyx_RefNannyFinishContext();
jpayne@69 7967 return __pyx_r;
jpayne@69 7968 }
jpayne@69 7969
jpayne@69 7970 /* "pysam/libcfaidx.pyx":234
jpayne@69 7971 * """int with the number of :term:`reference` sequences in the file.
jpayne@69 7972 * This is a read-only attribute."""
jpayne@69 7973 * def __get__(self): # <<<<<<<<<<<<<<
jpayne@69 7974 * return len(self._references) if self.references else None
jpayne@69 7975 *
jpayne@69 7976 */
jpayne@69 7977
jpayne@69 7978 /* Python wrapper */
jpayne@69 7979 static PyObject *__pyx_pw_5pysam_9libcfaidx_9FastaFile_11nreferences_1__get__(PyObject *__pyx_v_self); /*proto*/
jpayne@69 7980 static PyObject *__pyx_pw_5pysam_9libcfaidx_9FastaFile_11nreferences_1__get__(PyObject *__pyx_v_self) {
jpayne@69 7981 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@69 7982 PyObject *__pyx_r = 0;
jpayne@69 7983 __Pyx_RefNannyDeclarations
jpayne@69 7984 __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
jpayne@69 7985 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
jpayne@69 7986 __pyx_r = __pyx_pf_5pysam_9libcfaidx_9FastaFile_11nreferences___get__(((struct __pyx_obj_5pysam_9libcfaidx_FastaFile *)__pyx_v_self));
jpayne@69 7987
jpayne@69 7988 /* function exit code */
jpayne@69 7989 __Pyx_RefNannyFinishContext();
jpayne@69 7990 return __pyx_r;
jpayne@69 7991 }
jpayne@69 7992
jpayne@69 7993 static PyObject *__pyx_pf_5pysam_9libcfaidx_9FastaFile_11nreferences___get__(struct __pyx_obj_5pysam_9libcfaidx_FastaFile *__pyx_v_self) {
jpayne@69 7994 PyObject *__pyx_r = NULL;
jpayne@69 7995 __Pyx_TraceDeclarations
jpayne@69 7996 __Pyx_RefNannyDeclarations
jpayne@69 7997 PyObject *__pyx_t_1 = NULL;
jpayne@69 7998 PyObject *__pyx_t_2 = NULL;
jpayne@69 7999 int __pyx_t_3;
jpayne@69 8000 Py_ssize_t __pyx_t_4;
jpayne@69 8001 int __pyx_lineno = 0;
jpayne@69 8002 const char *__pyx_filename = NULL;
jpayne@69 8003 int __pyx_clineno = 0;
jpayne@69 8004 __Pyx_RefNannySetupContext("__get__", 1);
jpayne@69 8005 __Pyx_TraceCall("__get__", __pyx_f[0], 234, 0, __PYX_ERR(0, 234, __pyx_L1_error));
jpayne@69 8006
jpayne@69 8007 /* "pysam/libcfaidx.pyx":235
jpayne@69 8008 * This is a read-only attribute."""
jpayne@69 8009 * def __get__(self):
jpayne@69 8010 * return len(self._references) if self.references else None # <<<<<<<<<<<<<<
jpayne@69 8011 *
jpayne@69 8012 * property lengths:
jpayne@69 8013 */
jpayne@69 8014 __Pyx_XDECREF(__pyx_r);
jpayne@69 8015 __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_references); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 235, __pyx_L1_error)
jpayne@69 8016 __Pyx_GOTREF(__pyx_t_2);
jpayne@69 8017 __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_3 < 0))) __PYX_ERR(0, 235, __pyx_L1_error)
jpayne@69 8018 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@69 8019 if (__pyx_t_3) {
jpayne@69 8020 __pyx_t_2 = __pyx_v_self->_references;
jpayne@69 8021 __Pyx_INCREF(__pyx_t_2);
jpayne@69 8022 __pyx_t_4 = PyObject_Length(__pyx_t_2); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(0, 235, __pyx_L1_error)
jpayne@69 8023 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@69 8024 __pyx_t_2 = PyInt_FromSsize_t(__pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 235, __pyx_L1_error)
jpayne@69 8025 __Pyx_GOTREF(__pyx_t_2);
jpayne@69 8026 __pyx_t_1 = __pyx_t_2;
jpayne@69 8027 __pyx_t_2 = 0;
jpayne@69 8028 } else {
jpayne@69 8029 __Pyx_INCREF(Py_None);
jpayne@69 8030 __pyx_t_1 = Py_None;
jpayne@69 8031 }
jpayne@69 8032 __pyx_r = __pyx_t_1;
jpayne@69 8033 __pyx_t_1 = 0;
jpayne@69 8034 goto __pyx_L0;
jpayne@69 8035
jpayne@69 8036 /* "pysam/libcfaidx.pyx":234
jpayne@69 8037 * """int with the number of :term:`reference` sequences in the file.
jpayne@69 8038 * This is a read-only attribute."""
jpayne@69 8039 * def __get__(self): # <<<<<<<<<<<<<<
jpayne@69 8040 * return len(self._references) if self.references else None
jpayne@69 8041 *
jpayne@69 8042 */
jpayne@69 8043
jpayne@69 8044 /* function exit code */
jpayne@69 8045 __pyx_L1_error:;
jpayne@69 8046 __Pyx_XDECREF(__pyx_t_1);
jpayne@69 8047 __Pyx_XDECREF(__pyx_t_2);
jpayne@69 8048 __Pyx_AddTraceback("pysam.libcfaidx.FastaFile.nreferences.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 8049 __pyx_r = NULL;
jpayne@69 8050 __pyx_L0:;
jpayne@69 8051 __Pyx_XGIVEREF(__pyx_r);
jpayne@69 8052 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@69 8053 __Pyx_RefNannyFinishContext();
jpayne@69 8054 return __pyx_r;
jpayne@69 8055 }
jpayne@69 8056
jpayne@69 8057 /* "pysam/libcfaidx.pyx":239
jpayne@69 8058 * property lengths:
jpayne@69 8059 * """tuple with the lengths of :term:`reference` sequences."""
jpayne@69 8060 * def __get__(self): # <<<<<<<<<<<<<<
jpayne@69 8061 * return self._lengths
jpayne@69 8062 *
jpayne@69 8063 */
jpayne@69 8064
jpayne@69 8065 /* Python wrapper */
jpayne@69 8066 static PyObject *__pyx_pw_5pysam_9libcfaidx_9FastaFile_7lengths_1__get__(PyObject *__pyx_v_self); /*proto*/
jpayne@69 8067 static PyObject *__pyx_pw_5pysam_9libcfaidx_9FastaFile_7lengths_1__get__(PyObject *__pyx_v_self) {
jpayne@69 8068 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@69 8069 PyObject *__pyx_r = 0;
jpayne@69 8070 __Pyx_RefNannyDeclarations
jpayne@69 8071 __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
jpayne@69 8072 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
jpayne@69 8073 __pyx_r = __pyx_pf_5pysam_9libcfaidx_9FastaFile_7lengths___get__(((struct __pyx_obj_5pysam_9libcfaidx_FastaFile *)__pyx_v_self));
jpayne@69 8074
jpayne@69 8075 /* function exit code */
jpayne@69 8076 __Pyx_RefNannyFinishContext();
jpayne@69 8077 return __pyx_r;
jpayne@69 8078 }
jpayne@69 8079
jpayne@69 8080 static PyObject *__pyx_pf_5pysam_9libcfaidx_9FastaFile_7lengths___get__(struct __pyx_obj_5pysam_9libcfaidx_FastaFile *__pyx_v_self) {
jpayne@69 8081 PyObject *__pyx_r = NULL;
jpayne@69 8082 __Pyx_TraceDeclarations
jpayne@69 8083 __Pyx_RefNannyDeclarations
jpayne@69 8084 int __pyx_lineno = 0;
jpayne@69 8085 const char *__pyx_filename = NULL;
jpayne@69 8086 int __pyx_clineno = 0;
jpayne@69 8087 __Pyx_RefNannySetupContext("__get__", 1);
jpayne@69 8088 __Pyx_TraceCall("__get__", __pyx_f[0], 239, 0, __PYX_ERR(0, 239, __pyx_L1_error));
jpayne@69 8089
jpayne@69 8090 /* "pysam/libcfaidx.pyx":240
jpayne@69 8091 * """tuple with the lengths of :term:`reference` sequences."""
jpayne@69 8092 * def __get__(self):
jpayne@69 8093 * return self._lengths # <<<<<<<<<<<<<<
jpayne@69 8094 *
jpayne@69 8095 * def fetch(self,
jpayne@69 8096 */
jpayne@69 8097 __Pyx_XDECREF(__pyx_r);
jpayne@69 8098 __Pyx_INCREF(__pyx_v_self->_lengths);
jpayne@69 8099 __pyx_r = __pyx_v_self->_lengths;
jpayne@69 8100 goto __pyx_L0;
jpayne@69 8101
jpayne@69 8102 /* "pysam/libcfaidx.pyx":239
jpayne@69 8103 * property lengths:
jpayne@69 8104 * """tuple with the lengths of :term:`reference` sequences."""
jpayne@69 8105 * def __get__(self): # <<<<<<<<<<<<<<
jpayne@69 8106 * return self._lengths
jpayne@69 8107 *
jpayne@69 8108 */
jpayne@69 8109
jpayne@69 8110 /* function exit code */
jpayne@69 8111 __pyx_L1_error:;
jpayne@69 8112 __Pyx_AddTraceback("pysam.libcfaidx.FastaFile.lengths.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 8113 __pyx_r = NULL;
jpayne@69 8114 __pyx_L0:;
jpayne@69 8115 __Pyx_XGIVEREF(__pyx_r);
jpayne@69 8116 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@69 8117 __Pyx_RefNannyFinishContext();
jpayne@69 8118 return __pyx_r;
jpayne@69 8119 }
jpayne@69 8120
jpayne@69 8121 /* "pysam/libcfaidx.pyx":242
jpayne@69 8122 * return self._lengths
jpayne@69 8123 *
jpayne@69 8124 * def fetch(self, # <<<<<<<<<<<<<<
jpayne@69 8125 * reference=None,
jpayne@69 8126 * start=None,
jpayne@69 8127 */
jpayne@69 8128
jpayne@69 8129 /* Python wrapper */
jpayne@69 8130 static PyObject *__pyx_pw_5pysam_9libcfaidx_9FastaFile_17fetch(PyObject *__pyx_v_self,
jpayne@69 8131 #if CYTHON_METH_FASTCALL
jpayne@69 8132 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@69 8133 #else
jpayne@69 8134 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@69 8135 #endif
jpayne@69 8136 ); /*proto*/
jpayne@69 8137 PyDoc_STRVAR(__pyx_doc_5pysam_9libcfaidx_9FastaFile_16fetch, "FastaFile.fetch(self, reference=None, start=None, end=None, region=None)\nfetch sequences in a :term:`region`.\n\n A region can\n either be specified by :term:`reference`, `start` and\n `end`. `start` and `end` denote 0-based, half-open\n intervals.\n\n Alternatively, a samtools :term:`region` string can be\n supplied.\n\n If any of the coordinates are missing they will be replaced by the\n minimum (`start`) or maximum (`end`) coordinate.\n\n Note that region strings are 1-based, while `start` and `end` denote\n an interval in python coordinates.\n The region is specified by :term:`reference`, `start` and `end`.\n\n Returns\n -------\n\n string : a string with the sequence specified by the region.\n\n Raises\n ------\n\n IndexError\n if the coordinates are out of range\n\n ValueError\n if the region is invalid\n\n ");
jpayne@69 8138 static PyMethodDef __pyx_mdef_5pysam_9libcfaidx_9FastaFile_17fetch = {"fetch", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_9libcfaidx_9FastaFile_17fetch, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_9libcfaidx_9FastaFile_16fetch};
jpayne@69 8139 static PyObject *__pyx_pw_5pysam_9libcfaidx_9FastaFile_17fetch(PyObject *__pyx_v_self,
jpayne@69 8140 #if CYTHON_METH_FASTCALL
jpayne@69 8141 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@69 8142 #else
jpayne@69 8143 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@69 8144 #endif
jpayne@69 8145 ) {
jpayne@69 8146 PyObject *__pyx_v_reference = 0;
jpayne@69 8147 PyObject *__pyx_v_start = 0;
jpayne@69 8148 PyObject *__pyx_v_end = 0;
jpayne@69 8149 PyObject *__pyx_v_region = 0;
jpayne@69 8150 #if !CYTHON_METH_FASTCALL
jpayne@69 8151 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
jpayne@69 8152 #endif
jpayne@69 8153 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@69 8154 PyObject* values[4] = {0,0,0,0};
jpayne@69 8155 int __pyx_lineno = 0;
jpayne@69 8156 const char *__pyx_filename = NULL;
jpayne@69 8157 int __pyx_clineno = 0;
jpayne@69 8158 PyObject *__pyx_r = 0;
jpayne@69 8159 __Pyx_RefNannyDeclarations
jpayne@69 8160 __Pyx_RefNannySetupContext("fetch (wrapper)", 0);
jpayne@69 8161 #if !CYTHON_METH_FASTCALL
jpayne@69 8162 #if CYTHON_ASSUME_SAFE_MACROS
jpayne@69 8163 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
jpayne@69 8164 #else
jpayne@69 8165 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
jpayne@69 8166 #endif
jpayne@69 8167 #endif
jpayne@69 8168 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
jpayne@69 8169 {
jpayne@69 8170 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_reference,&__pyx_n_s_start,&__pyx_n_s_end,&__pyx_n_s_region,0};
jpayne@69 8171
jpayne@69 8172 /* "pysam/libcfaidx.pyx":243
jpayne@69 8173 *
jpayne@69 8174 * def fetch(self,
jpayne@69 8175 * reference=None, # <<<<<<<<<<<<<<
jpayne@69 8176 * start=None,
jpayne@69 8177 * end=None,
jpayne@69 8178 */
jpayne@69 8179 values[0] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
jpayne@69 8180
jpayne@69 8181 /* "pysam/libcfaidx.pyx":244
jpayne@69 8182 * def fetch(self,
jpayne@69 8183 * reference=None,
jpayne@69 8184 * start=None, # <<<<<<<<<<<<<<
jpayne@69 8185 * end=None,
jpayne@69 8186 * region=None):
jpayne@69 8187 */
jpayne@69 8188 values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
jpayne@69 8189
jpayne@69 8190 /* "pysam/libcfaidx.pyx":245
jpayne@69 8191 * reference=None,
jpayne@69 8192 * start=None,
jpayne@69 8193 * end=None, # <<<<<<<<<<<<<<
jpayne@69 8194 * region=None):
jpayne@69 8195 * """fetch sequences in a :term:`region`.
jpayne@69 8196 */
jpayne@69 8197 values[2] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
jpayne@69 8198
jpayne@69 8199 /* "pysam/libcfaidx.pyx":246
jpayne@69 8200 * start=None,
jpayne@69 8201 * end=None,
jpayne@69 8202 * region=None): # <<<<<<<<<<<<<<
jpayne@69 8203 * """fetch sequences in a :term:`region`.
jpayne@69 8204 *
jpayne@69 8205 */
jpayne@69 8206 values[3] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
jpayne@69 8207 if (__pyx_kwds) {
jpayne@69 8208 Py_ssize_t kw_args;
jpayne@69 8209 switch (__pyx_nargs) {
jpayne@69 8210 case 4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
jpayne@69 8211 CYTHON_FALLTHROUGH;
jpayne@69 8212 case 3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
jpayne@69 8213 CYTHON_FALLTHROUGH;
jpayne@69 8214 case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
jpayne@69 8215 CYTHON_FALLTHROUGH;
jpayne@69 8216 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
jpayne@69 8217 CYTHON_FALLTHROUGH;
jpayne@69 8218 case 0: break;
jpayne@69 8219 default: goto __pyx_L5_argtuple_error;
jpayne@69 8220 }
jpayne@69 8221 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
jpayne@69 8222 switch (__pyx_nargs) {
jpayne@69 8223 case 0:
jpayne@69 8224 if (kw_args > 0) {
jpayne@69 8225 PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_reference);
jpayne@69 8226 if (value) { values[0] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
jpayne@69 8227 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 242, __pyx_L3_error)
jpayne@69 8228 }
jpayne@69 8229 CYTHON_FALLTHROUGH;
jpayne@69 8230 case 1:
jpayne@69 8231 if (kw_args > 0) {
jpayne@69 8232 PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_start);
jpayne@69 8233 if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
jpayne@69 8234 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 242, __pyx_L3_error)
jpayne@69 8235 }
jpayne@69 8236 CYTHON_FALLTHROUGH;
jpayne@69 8237 case 2:
jpayne@69 8238 if (kw_args > 0) {
jpayne@69 8239 PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_end);
jpayne@69 8240 if (value) { values[2] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
jpayne@69 8241 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 242, __pyx_L3_error)
jpayne@69 8242 }
jpayne@69 8243 CYTHON_FALLTHROUGH;
jpayne@69 8244 case 3:
jpayne@69 8245 if (kw_args > 0) {
jpayne@69 8246 PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_region);
jpayne@69 8247 if (value) { values[3] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
jpayne@69 8248 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 242, __pyx_L3_error)
jpayne@69 8249 }
jpayne@69 8250 }
jpayne@69 8251 if (unlikely(kw_args > 0)) {
jpayne@69 8252 const Py_ssize_t kwd_pos_args = __pyx_nargs;
jpayne@69 8253 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "fetch") < 0)) __PYX_ERR(0, 242, __pyx_L3_error)
jpayne@69 8254 }
jpayne@69 8255 } else {
jpayne@69 8256 switch (__pyx_nargs) {
jpayne@69 8257 case 4: values[3] = __Pyx_Arg_FASTCALL(__pyx_args, 3);
jpayne@69 8258 CYTHON_FALLTHROUGH;
jpayne@69 8259 case 3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
jpayne@69 8260 CYTHON_FALLTHROUGH;
jpayne@69 8261 case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
jpayne@69 8262 CYTHON_FALLTHROUGH;
jpayne@69 8263 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
jpayne@69 8264 CYTHON_FALLTHROUGH;
jpayne@69 8265 case 0: break;
jpayne@69 8266 default: goto __pyx_L5_argtuple_error;
jpayne@69 8267 }
jpayne@69 8268 }
jpayne@69 8269 __pyx_v_reference = values[0];
jpayne@69 8270 __pyx_v_start = values[1];
jpayne@69 8271 __pyx_v_end = values[2];
jpayne@69 8272 __pyx_v_region = values[3];
jpayne@69 8273 }
jpayne@69 8274 goto __pyx_L6_skip;
jpayne@69 8275 __pyx_L5_argtuple_error:;
jpayne@69 8276 __Pyx_RaiseArgtupleInvalid("fetch", 0, 0, 4, __pyx_nargs); __PYX_ERR(0, 242, __pyx_L3_error)
jpayne@69 8277 __pyx_L6_skip:;
jpayne@69 8278 goto __pyx_L4_argument_unpacking_done;
jpayne@69 8279 __pyx_L3_error:;
jpayne@69 8280 {
jpayne@69 8281 Py_ssize_t __pyx_temp;
jpayne@69 8282 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
jpayne@69 8283 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
jpayne@69 8284 }
jpayne@69 8285 }
jpayne@69 8286 __Pyx_AddTraceback("pysam.libcfaidx.FastaFile.fetch", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 8287 __Pyx_RefNannyFinishContext();
jpayne@69 8288 return NULL;
jpayne@69 8289 __pyx_L4_argument_unpacking_done:;
jpayne@69 8290 __pyx_r = __pyx_pf_5pysam_9libcfaidx_9FastaFile_16fetch(((struct __pyx_obj_5pysam_9libcfaidx_FastaFile *)__pyx_v_self), __pyx_v_reference, __pyx_v_start, __pyx_v_end, __pyx_v_region);
jpayne@69 8291
jpayne@69 8292 /* "pysam/libcfaidx.pyx":242
jpayne@69 8293 * return self._lengths
jpayne@69 8294 *
jpayne@69 8295 * def fetch(self, # <<<<<<<<<<<<<<
jpayne@69 8296 * reference=None,
jpayne@69 8297 * start=None,
jpayne@69 8298 */
jpayne@69 8299
jpayne@69 8300 /* function exit code */
jpayne@69 8301 {
jpayne@69 8302 Py_ssize_t __pyx_temp;
jpayne@69 8303 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
jpayne@69 8304 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
jpayne@69 8305 }
jpayne@69 8306 }
jpayne@69 8307 __Pyx_RefNannyFinishContext();
jpayne@69 8308 return __pyx_r;
jpayne@69 8309 }
jpayne@69 8310
jpayne@69 8311 static PyObject *__pyx_pf_5pysam_9libcfaidx_9FastaFile_16fetch(struct __pyx_obj_5pysam_9libcfaidx_FastaFile *__pyx_v_self, PyObject *__pyx_v_reference, PyObject *__pyx_v_start, PyObject *__pyx_v_end, PyObject *__pyx_v_region) {
jpayne@69 8312 int __pyx_v_length;
jpayne@69 8313 char *__pyx_v_seq;
jpayne@69 8314 char *__pyx_v_ref;
jpayne@69 8315 int __pyx_v_rstart;
jpayne@69 8316 int __pyx_v_rend;
jpayne@69 8317 PyObject *__pyx_v_contig = NULL;
jpayne@69 8318 PyObject *__pyx_v_contig_b = NULL;
jpayne@69 8319 PyObject *__pyx_r = NULL;
jpayne@69 8320 __Pyx_TraceDeclarations
jpayne@69 8321 __Pyx_RefNannyDeclarations
jpayne@69 8322 PyObject *__pyx_t_1 = NULL;
jpayne@69 8323 PyObject *__pyx_t_2 = NULL;
jpayne@69 8324 PyObject *__pyx_t_3 = NULL;
jpayne@69 8325 unsigned int __pyx_t_4;
jpayne@69 8326 int __pyx_t_5;
jpayne@69 8327 int __pyx_t_6;
jpayne@69 8328 struct __pyx_opt_args_5pysam_9libcutils_parse_region __pyx_t_7;
jpayne@69 8329 PyObject *__pyx_t_8 = NULL;
jpayne@69 8330 PyObject *__pyx_t_9 = NULL;
jpayne@69 8331 PyObject *(*__pyx_t_10)(PyObject *);
jpayne@69 8332 int __pyx_t_11;
jpayne@69 8333 int __pyx_t_12;
jpayne@69 8334 char *__pyx_t_13;
jpayne@69 8335 char const *__pyx_t_14;
jpayne@69 8336 PyObject *__pyx_t_15 = NULL;
jpayne@69 8337 PyObject *__pyx_t_16 = NULL;
jpayne@69 8338 PyObject *__pyx_t_17 = NULL;
jpayne@69 8339 PyObject *__pyx_t_18 = NULL;
jpayne@69 8340 PyObject *__pyx_t_19 = NULL;
jpayne@69 8341 PyObject *__pyx_t_20 = NULL;
jpayne@69 8342 int __pyx_lineno = 0;
jpayne@69 8343 const char *__pyx_filename = NULL;
jpayne@69 8344 int __pyx_clineno = 0;
jpayne@69 8345 __Pyx_TraceFrameInit(__pyx_codeobj__8)
jpayne@69 8346 __Pyx_RefNannySetupContext("fetch", 1);
jpayne@69 8347 __Pyx_TraceCall("fetch", __pyx_f[0], 242, 0, __PYX_ERR(0, 242, __pyx_L1_error));
jpayne@69 8348
jpayne@69 8349 /* "pysam/libcfaidx.pyx":280
jpayne@69 8350 * """
jpayne@69 8351 *
jpayne@69 8352 * if not self.is_open(): # <<<<<<<<<<<<<<
jpayne@69 8353 * raise ValueError("I/O operation on closed file" )
jpayne@69 8354 *
jpayne@69 8355 */
jpayne@69 8356 __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_is_open); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 280, __pyx_L1_error)
jpayne@69 8357 __Pyx_GOTREF(__pyx_t_2);
jpayne@69 8358 __pyx_t_3 = NULL;
jpayne@69 8359 __pyx_t_4 = 0;
jpayne@69 8360 #if CYTHON_UNPACK_METHODS
jpayne@69 8361 if (likely(PyMethod_Check(__pyx_t_2))) {
jpayne@69 8362 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
jpayne@69 8363 if (likely(__pyx_t_3)) {
jpayne@69 8364 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
jpayne@69 8365 __Pyx_INCREF(__pyx_t_3);
jpayne@69 8366 __Pyx_INCREF(function);
jpayne@69 8367 __Pyx_DECREF_SET(__pyx_t_2, function);
jpayne@69 8368 __pyx_t_4 = 1;
jpayne@69 8369 }
jpayne@69 8370 }
jpayne@69 8371 #endif
jpayne@69 8372 {
jpayne@69 8373 PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
jpayne@69 8374 __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
jpayne@69 8375 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
jpayne@69 8376 if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 280, __pyx_L1_error)
jpayne@69 8377 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 8378 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@69 8379 }
jpayne@69 8380 __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 280, __pyx_L1_error)
jpayne@69 8381 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@69 8382 __pyx_t_6 = (!__pyx_t_5);
jpayne@69 8383 if (unlikely(__pyx_t_6)) {
jpayne@69 8384
jpayne@69 8385 /* "pysam/libcfaidx.pyx":281
jpayne@69 8386 *
jpayne@69 8387 * if not self.is_open():
jpayne@69 8388 * raise ValueError("I/O operation on closed file" ) # <<<<<<<<<<<<<<
jpayne@69 8389 *
jpayne@69 8390 * cdef int length
jpayne@69 8391 */
jpayne@69 8392 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 281, __pyx_L1_error)
jpayne@69 8393 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 8394 __Pyx_Raise(__pyx_t_1, 0, 0, 0);
jpayne@69 8395 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@69 8396 __PYX_ERR(0, 281, __pyx_L1_error)
jpayne@69 8397
jpayne@69 8398 /* "pysam/libcfaidx.pyx":280
jpayne@69 8399 * """
jpayne@69 8400 *
jpayne@69 8401 * if not self.is_open(): # <<<<<<<<<<<<<<
jpayne@69 8402 * raise ValueError("I/O operation on closed file" )
jpayne@69 8403 *
jpayne@69 8404 */
jpayne@69 8405 }
jpayne@69 8406
jpayne@69 8407 /* "pysam/libcfaidx.pyx":288
jpayne@69 8408 * cdef int rstart, rend
jpayne@69 8409 *
jpayne@69 8410 * contig, rstart, rend = parse_region(reference, start, end, region) # <<<<<<<<<<<<<<
jpayne@69 8411 *
jpayne@69 8412 * if contig is None:
jpayne@69 8413 */
jpayne@69 8414 __pyx_t_7.__pyx_n = 4;
jpayne@69 8415 __pyx_t_7.contig = __pyx_v_reference;
jpayne@69 8416 __pyx_t_7.start = __pyx_v_start;
jpayne@69 8417 __pyx_t_7.stop = __pyx_v_end;
jpayne@69 8418 __pyx_t_7.region = __pyx_v_region;
jpayne@69 8419 __pyx_t_1 = __pyx_f_5pysam_9libcutils_parse_region(0, &__pyx_t_7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 288, __pyx_L1_error)
jpayne@69 8420 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 8421 if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
jpayne@69 8422 PyObject* sequence = __pyx_t_1;
jpayne@69 8423 Py_ssize_t size = __Pyx_PySequence_SIZE(sequence);
jpayne@69 8424 if (unlikely(size != 3)) {
jpayne@69 8425 if (size > 3) __Pyx_RaiseTooManyValuesError(3);
jpayne@69 8426 else if (size >= 0) __Pyx_RaiseNeedMoreValuesError(size);
jpayne@69 8427 __PYX_ERR(0, 288, __pyx_L1_error)
jpayne@69 8428 }
jpayne@69 8429 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
jpayne@69 8430 if (likely(PyTuple_CheckExact(sequence))) {
jpayne@69 8431 __pyx_t_2 = PyTuple_GET_ITEM(sequence, 0);
jpayne@69 8432 __pyx_t_3 = PyTuple_GET_ITEM(sequence, 1);
jpayne@69 8433 __pyx_t_8 = PyTuple_GET_ITEM(sequence, 2);
jpayne@69 8434 } else {
jpayne@69 8435 __pyx_t_2 = PyList_GET_ITEM(sequence, 0);
jpayne@69 8436 __pyx_t_3 = PyList_GET_ITEM(sequence, 1);
jpayne@69 8437 __pyx_t_8 = PyList_GET_ITEM(sequence, 2);
jpayne@69 8438 }
jpayne@69 8439 __Pyx_INCREF(__pyx_t_2);
jpayne@69 8440 __Pyx_INCREF(__pyx_t_3);
jpayne@69 8441 __Pyx_INCREF(__pyx_t_8);
jpayne@69 8442 #else
jpayne@69 8443 __pyx_t_2 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 288, __pyx_L1_error)
jpayne@69 8444 __Pyx_GOTREF(__pyx_t_2);
jpayne@69 8445 __pyx_t_3 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 288, __pyx_L1_error)
jpayne@69 8446 __Pyx_GOTREF(__pyx_t_3);
jpayne@69 8447 __pyx_t_8 = PySequence_ITEM(sequence, 2); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 288, __pyx_L1_error)
jpayne@69 8448 __Pyx_GOTREF(__pyx_t_8);
jpayne@69 8449 #endif
jpayne@69 8450 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@69 8451 } else {
jpayne@69 8452 Py_ssize_t index = -1;
jpayne@69 8453 __pyx_t_9 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_9)) __PYX_ERR(0, 288, __pyx_L1_error)
jpayne@69 8454 __Pyx_GOTREF(__pyx_t_9);
jpayne@69 8455 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@69 8456 __pyx_t_10 = __Pyx_PyObject_GetIterNextFunc(__pyx_t_9);
jpayne@69 8457 index = 0; __pyx_t_2 = __pyx_t_10(__pyx_t_9); if (unlikely(!__pyx_t_2)) goto __pyx_L4_unpacking_failed;
jpayne@69 8458 __Pyx_GOTREF(__pyx_t_2);
jpayne@69 8459 index = 1; __pyx_t_3 = __pyx_t_10(__pyx_t_9); if (unlikely(!__pyx_t_3)) goto __pyx_L4_unpacking_failed;
jpayne@69 8460 __Pyx_GOTREF(__pyx_t_3);
jpayne@69 8461 index = 2; __pyx_t_8 = __pyx_t_10(__pyx_t_9); if (unlikely(!__pyx_t_8)) goto __pyx_L4_unpacking_failed;
jpayne@69 8462 __Pyx_GOTREF(__pyx_t_8);
jpayne@69 8463 if (__Pyx_IternextUnpackEndCheck(__pyx_t_10(__pyx_t_9), 3) < 0) __PYX_ERR(0, 288, __pyx_L1_error)
jpayne@69 8464 __pyx_t_10 = NULL;
jpayne@69 8465 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
jpayne@69 8466 goto __pyx_L5_unpacking_done;
jpayne@69 8467 __pyx_L4_unpacking_failed:;
jpayne@69 8468 __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
jpayne@69 8469 __pyx_t_10 = NULL;
jpayne@69 8470 if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index);
jpayne@69 8471 __PYX_ERR(0, 288, __pyx_L1_error)
jpayne@69 8472 __pyx_L5_unpacking_done:;
jpayne@69 8473 }
jpayne@69 8474 __pyx_t_11 = __Pyx_PyInt_As_int(__pyx_t_3); if (unlikely((__pyx_t_11 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 288, __pyx_L1_error)
jpayne@69 8475 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
jpayne@69 8476 __pyx_t_12 = __Pyx_PyInt_As_int(__pyx_t_8); if (unlikely((__pyx_t_12 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 288, __pyx_L1_error)
jpayne@69 8477 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
jpayne@69 8478 __pyx_v_contig = __pyx_t_2;
jpayne@69 8479 __pyx_t_2 = 0;
jpayne@69 8480 __pyx_v_rstart = __pyx_t_11;
jpayne@69 8481 __pyx_v_rend = __pyx_t_12;
jpayne@69 8482
jpayne@69 8483 /* "pysam/libcfaidx.pyx":290
jpayne@69 8484 * contig, rstart, rend = parse_region(reference, start, end, region)
jpayne@69 8485 *
jpayne@69 8486 * if contig is None: # <<<<<<<<<<<<<<
jpayne@69 8487 * raise ValueError("no sequence/region supplied.")
jpayne@69 8488 *
jpayne@69 8489 */
jpayne@69 8490 __pyx_t_6 = (__pyx_v_contig == Py_None);
jpayne@69 8491 if (unlikely(__pyx_t_6)) {
jpayne@69 8492
jpayne@69 8493 /* "pysam/libcfaidx.pyx":291
jpayne@69 8494 *
jpayne@69 8495 * if contig is None:
jpayne@69 8496 * raise ValueError("no sequence/region supplied.") # <<<<<<<<<<<<<<
jpayne@69 8497 *
jpayne@69 8498 * if rstart == rend:
jpayne@69 8499 */
jpayne@69 8500 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__10, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 291, __pyx_L1_error)
jpayne@69 8501 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 8502 __Pyx_Raise(__pyx_t_1, 0, 0, 0);
jpayne@69 8503 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@69 8504 __PYX_ERR(0, 291, __pyx_L1_error)
jpayne@69 8505
jpayne@69 8506 /* "pysam/libcfaidx.pyx":290
jpayne@69 8507 * contig, rstart, rend = parse_region(reference, start, end, region)
jpayne@69 8508 *
jpayne@69 8509 * if contig is None: # <<<<<<<<<<<<<<
jpayne@69 8510 * raise ValueError("no sequence/region supplied.")
jpayne@69 8511 *
jpayne@69 8512 */
jpayne@69 8513 }
jpayne@69 8514
jpayne@69 8515 /* "pysam/libcfaidx.pyx":293
jpayne@69 8516 * raise ValueError("no sequence/region supplied.")
jpayne@69 8517 *
jpayne@69 8518 * if rstart == rend: # <<<<<<<<<<<<<<
jpayne@69 8519 * return ""
jpayne@69 8520 *
jpayne@69 8521 */
jpayne@69 8522 __pyx_t_6 = (__pyx_v_rstart == __pyx_v_rend);
jpayne@69 8523 if (__pyx_t_6) {
jpayne@69 8524
jpayne@69 8525 /* "pysam/libcfaidx.pyx":294
jpayne@69 8526 *
jpayne@69 8527 * if rstart == rend:
jpayne@69 8528 * return "" # <<<<<<<<<<<<<<
jpayne@69 8529 *
jpayne@69 8530 * contig_b = force_bytes(contig)
jpayne@69 8531 */
jpayne@69 8532 __Pyx_XDECREF(__pyx_r);
jpayne@69 8533 __Pyx_INCREF(__pyx_kp_u__11);
jpayne@69 8534 __pyx_r = __pyx_kp_u__11;
jpayne@69 8535 goto __pyx_L0;
jpayne@69 8536
jpayne@69 8537 /* "pysam/libcfaidx.pyx":293
jpayne@69 8538 * raise ValueError("no sequence/region supplied.")
jpayne@69 8539 *
jpayne@69 8540 * if rstart == rend: # <<<<<<<<<<<<<<
jpayne@69 8541 * return ""
jpayne@69 8542 *
jpayne@69 8543 */
jpayne@69 8544 }
jpayne@69 8545
jpayne@69 8546 /* "pysam/libcfaidx.pyx":296
jpayne@69 8547 * return ""
jpayne@69 8548 *
jpayne@69 8549 * contig_b = force_bytes(contig) # <<<<<<<<<<<<<<
jpayne@69 8550 * ref = contig_b
jpayne@69 8551 * with nogil:
jpayne@69 8552 */
jpayne@69 8553 __pyx_t_1 = __pyx_f_5pysam_9libcutils_force_bytes(__pyx_v_contig, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 296, __pyx_L1_error)
jpayne@69 8554 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 8555 __pyx_v_contig_b = ((PyObject*)__pyx_t_1);
jpayne@69 8556 __pyx_t_1 = 0;
jpayne@69 8557
jpayne@69 8558 /* "pysam/libcfaidx.pyx":297
jpayne@69 8559 *
jpayne@69 8560 * contig_b = force_bytes(contig)
jpayne@69 8561 * ref = contig_b # <<<<<<<<<<<<<<
jpayne@69 8562 * with nogil:
jpayne@69 8563 * length = faidx_seq_len(self.fastafile, ref)
jpayne@69 8564 */
jpayne@69 8565 if (unlikely(__pyx_v_contig_b == Py_None)) {
jpayne@69 8566 PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
jpayne@69 8567 __PYX_ERR(0, 297, __pyx_L1_error)
jpayne@69 8568 }
jpayne@69 8569 __pyx_t_13 = __Pyx_PyBytes_AsWritableString(__pyx_v_contig_b); if (unlikely((!__pyx_t_13) && PyErr_Occurred())) __PYX_ERR(0, 297, __pyx_L1_error)
jpayne@69 8570 __pyx_v_ref = __pyx_t_13;
jpayne@69 8571
jpayne@69 8572 /* "pysam/libcfaidx.pyx":298
jpayne@69 8573 * contig_b = force_bytes(contig)
jpayne@69 8574 * ref = contig_b
jpayne@69 8575 * with nogil: # <<<<<<<<<<<<<<
jpayne@69 8576 * length = faidx_seq_len(self.fastafile, ref)
jpayne@69 8577 * if length == -1:
jpayne@69 8578 */
jpayne@69 8579 {
jpayne@69 8580 #ifdef WITH_THREAD
jpayne@69 8581 PyThreadState *_save;
jpayne@69 8582 _save = NULL;
jpayne@69 8583 Py_UNBLOCK_THREADS
jpayne@69 8584 __Pyx_FastGIL_Remember();
jpayne@69 8585 #endif
jpayne@69 8586 /*try:*/ {
jpayne@69 8587
jpayne@69 8588 /* "pysam/libcfaidx.pyx":299
jpayne@69 8589 * ref = contig_b
jpayne@69 8590 * with nogil:
jpayne@69 8591 * length = faidx_seq_len(self.fastafile, ref) # <<<<<<<<<<<<<<
jpayne@69 8592 * if length == -1:
jpayne@69 8593 * raise KeyError("sequence '%s' not present" % contig)
jpayne@69 8594 */
jpayne@69 8595 __pyx_v_length = faidx_seq_len(__pyx_v_self->fastafile, __pyx_v_ref);
jpayne@69 8596 }
jpayne@69 8597
jpayne@69 8598 /* "pysam/libcfaidx.pyx":298
jpayne@69 8599 * contig_b = force_bytes(contig)
jpayne@69 8600 * ref = contig_b
jpayne@69 8601 * with nogil: # <<<<<<<<<<<<<<
jpayne@69 8602 * length = faidx_seq_len(self.fastafile, ref)
jpayne@69 8603 * if length == -1:
jpayne@69 8604 */
jpayne@69 8605 /*finally:*/ {
jpayne@69 8606 /*normal exit:*/{
jpayne@69 8607 #ifdef WITH_THREAD
jpayne@69 8608 __Pyx_FastGIL_Forget();
jpayne@69 8609 Py_BLOCK_THREADS
jpayne@69 8610 #endif
jpayne@69 8611 goto __pyx_L10;
jpayne@69 8612 }
jpayne@69 8613 __pyx_L10:;
jpayne@69 8614 }
jpayne@69 8615 }
jpayne@69 8616
jpayne@69 8617 /* "pysam/libcfaidx.pyx":300
jpayne@69 8618 * with nogil:
jpayne@69 8619 * length = faidx_seq_len(self.fastafile, ref)
jpayne@69 8620 * if length == -1: # <<<<<<<<<<<<<<
jpayne@69 8621 * raise KeyError("sequence '%s' not present" % contig)
jpayne@69 8622 * if rstart >= length:
jpayne@69 8623 */
jpayne@69 8624 __pyx_t_6 = (__pyx_v_length == -1L);
jpayne@69 8625 if (unlikely(__pyx_t_6)) {
jpayne@69 8626
jpayne@69 8627 /* "pysam/libcfaidx.pyx":301
jpayne@69 8628 * length = faidx_seq_len(self.fastafile, ref)
jpayne@69 8629 * if length == -1:
jpayne@69 8630 * raise KeyError("sequence '%s' not present" % contig) # <<<<<<<<<<<<<<
jpayne@69 8631 * if rstart >= length:
jpayne@69 8632 * return ""
jpayne@69 8633 */
jpayne@69 8634 __pyx_t_1 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_sequence_s_not_present, __pyx_v_contig); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 301, __pyx_L1_error)
jpayne@69 8635 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 8636 __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_builtin_KeyError, __pyx_t_1); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 301, __pyx_L1_error)
jpayne@69 8637 __Pyx_GOTREF(__pyx_t_8);
jpayne@69 8638 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@69 8639 __Pyx_Raise(__pyx_t_8, 0, 0, 0);
jpayne@69 8640 __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
jpayne@69 8641 __PYX_ERR(0, 301, __pyx_L1_error)
jpayne@69 8642
jpayne@69 8643 /* "pysam/libcfaidx.pyx":300
jpayne@69 8644 * with nogil:
jpayne@69 8645 * length = faidx_seq_len(self.fastafile, ref)
jpayne@69 8646 * if length == -1: # <<<<<<<<<<<<<<
jpayne@69 8647 * raise KeyError("sequence '%s' not present" % contig)
jpayne@69 8648 * if rstart >= length:
jpayne@69 8649 */
jpayne@69 8650 }
jpayne@69 8651
jpayne@69 8652 /* "pysam/libcfaidx.pyx":302
jpayne@69 8653 * if length == -1:
jpayne@69 8654 * raise KeyError("sequence '%s' not present" % contig)
jpayne@69 8655 * if rstart >= length: # <<<<<<<<<<<<<<
jpayne@69 8656 * return ""
jpayne@69 8657 *
jpayne@69 8658 */
jpayne@69 8659 __pyx_t_6 = (__pyx_v_rstart >= __pyx_v_length);
jpayne@69 8660 if (__pyx_t_6) {
jpayne@69 8661
jpayne@69 8662 /* "pysam/libcfaidx.pyx":303
jpayne@69 8663 * raise KeyError("sequence '%s' not present" % contig)
jpayne@69 8664 * if rstart >= length:
jpayne@69 8665 * return "" # <<<<<<<<<<<<<<
jpayne@69 8666 *
jpayne@69 8667 * # fai_fetch adds a '\0' at the end
jpayne@69 8668 */
jpayne@69 8669 __Pyx_XDECREF(__pyx_r);
jpayne@69 8670 __Pyx_INCREF(__pyx_kp_u__11);
jpayne@69 8671 __pyx_r = __pyx_kp_u__11;
jpayne@69 8672 goto __pyx_L0;
jpayne@69 8673
jpayne@69 8674 /* "pysam/libcfaidx.pyx":302
jpayne@69 8675 * if length == -1:
jpayne@69 8676 * raise KeyError("sequence '%s' not present" % contig)
jpayne@69 8677 * if rstart >= length: # <<<<<<<<<<<<<<
jpayne@69 8678 * return ""
jpayne@69 8679 *
jpayne@69 8680 */
jpayne@69 8681 }
jpayne@69 8682
jpayne@69 8683 /* "pysam/libcfaidx.pyx":306
jpayne@69 8684 *
jpayne@69 8685 * # fai_fetch adds a '\0' at the end
jpayne@69 8686 * with nogil: # <<<<<<<<<<<<<<
jpayne@69 8687 * seq = faidx_fetch_seq(self.fastafile,
jpayne@69 8688 * ref,
jpayne@69 8689 */
jpayne@69 8690 {
jpayne@69 8691 #ifdef WITH_THREAD
jpayne@69 8692 PyThreadState *_save;
jpayne@69 8693 _save = NULL;
jpayne@69 8694 Py_UNBLOCK_THREADS
jpayne@69 8695 __Pyx_FastGIL_Remember();
jpayne@69 8696 #endif
jpayne@69 8697 /*try:*/ {
jpayne@69 8698
jpayne@69 8699 /* "pysam/libcfaidx.pyx":307
jpayne@69 8700 * # fai_fetch adds a '\0' at the end
jpayne@69 8701 * with nogil:
jpayne@69 8702 * seq = faidx_fetch_seq(self.fastafile, # <<<<<<<<<<<<<<
jpayne@69 8703 * ref,
jpayne@69 8704 * rstart,
jpayne@69 8705 */
jpayne@69 8706 __pyx_v_seq = faidx_fetch_seq(__pyx_v_self->fastafile, __pyx_v_ref, __pyx_v_rstart, (__pyx_v_rend - 1), (&__pyx_v_length));
jpayne@69 8707 }
jpayne@69 8708
jpayne@69 8709 /* "pysam/libcfaidx.pyx":306
jpayne@69 8710 *
jpayne@69 8711 * # fai_fetch adds a '\0' at the end
jpayne@69 8712 * with nogil: # <<<<<<<<<<<<<<
jpayne@69 8713 * seq = faidx_fetch_seq(self.fastafile,
jpayne@69 8714 * ref,
jpayne@69 8715 */
jpayne@69 8716 /*finally:*/ {
jpayne@69 8717 /*normal exit:*/{
jpayne@69 8718 #ifdef WITH_THREAD
jpayne@69 8719 __Pyx_FastGIL_Forget();
jpayne@69 8720 Py_BLOCK_THREADS
jpayne@69 8721 #endif
jpayne@69 8722 goto __pyx_L15;
jpayne@69 8723 }
jpayne@69 8724 __pyx_L15:;
jpayne@69 8725 }
jpayne@69 8726 }
jpayne@69 8727
jpayne@69 8728 /* "pysam/libcfaidx.pyx":313
jpayne@69 8729 * &length)
jpayne@69 8730 *
jpayne@69 8731 * if not seq: # <<<<<<<<<<<<<<
jpayne@69 8732 * if errno:
jpayne@69 8733 * raise IOError(errno, strerror(errno))
jpayne@69 8734 */
jpayne@69 8735 __pyx_t_6 = (!(__pyx_v_seq != 0));
jpayne@69 8736 if (__pyx_t_6) {
jpayne@69 8737
jpayne@69 8738 /* "pysam/libcfaidx.pyx":314
jpayne@69 8739 *
jpayne@69 8740 * if not seq:
jpayne@69 8741 * if errno: # <<<<<<<<<<<<<<
jpayne@69 8742 * raise IOError(errno, strerror(errno))
jpayne@69 8743 * else:
jpayne@69 8744 */
jpayne@69 8745 __pyx_t_6 = (errno != 0);
jpayne@69 8746 if (unlikely(__pyx_t_6)) {
jpayne@69 8747
jpayne@69 8748 /* "pysam/libcfaidx.pyx":315
jpayne@69 8749 * if not seq:
jpayne@69 8750 * if errno:
jpayne@69 8751 * raise IOError(errno, strerror(errno)) # <<<<<<<<<<<<<<
jpayne@69 8752 * else:
jpayne@69 8753 * raise ValueError("failure when retrieving sequence on '%s'" % contig)
jpayne@69 8754 */
jpayne@69 8755 __pyx_t_8 = __Pyx_PyInt_From_int(errno); if (unlikely(!__pyx_t_8)) __PYX_ERR(0, 315, __pyx_L1_error)
jpayne@69 8756 __Pyx_GOTREF(__pyx_t_8);
jpayne@69 8757 __pyx_t_1 = __Pyx_PyBytes_FromString(strerror(errno)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 315, __pyx_L1_error)
jpayne@69 8758 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 8759 __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 315, __pyx_L1_error)
jpayne@69 8760 __Pyx_GOTREF(__pyx_t_3);
jpayne@69 8761 __Pyx_GIVEREF(__pyx_t_8);
jpayne@69 8762 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_8)) __PYX_ERR(0, 315, __pyx_L1_error);
jpayne@69 8763 __Pyx_GIVEREF(__pyx_t_1);
jpayne@69 8764 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1)) __PYX_ERR(0, 315, __pyx_L1_error);
jpayne@69 8765 __pyx_t_8 = 0;
jpayne@69 8766 __pyx_t_1 = 0;
jpayne@69 8767 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_IOError, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 315, __pyx_L1_error)
jpayne@69 8768 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 8769 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
jpayne@69 8770 __Pyx_Raise(__pyx_t_1, 0, 0, 0);
jpayne@69 8771 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@69 8772 __PYX_ERR(0, 315, __pyx_L1_error)
jpayne@69 8773
jpayne@69 8774 /* "pysam/libcfaidx.pyx":314
jpayne@69 8775 *
jpayne@69 8776 * if not seq:
jpayne@69 8777 * if errno: # <<<<<<<<<<<<<<
jpayne@69 8778 * raise IOError(errno, strerror(errno))
jpayne@69 8779 * else:
jpayne@69 8780 */
jpayne@69 8781 }
jpayne@69 8782
jpayne@69 8783 /* "pysam/libcfaidx.pyx":317
jpayne@69 8784 * raise IOError(errno, strerror(errno))
jpayne@69 8785 * else:
jpayne@69 8786 * raise ValueError("failure when retrieving sequence on '%s'" % contig) # <<<<<<<<<<<<<<
jpayne@69 8787 *
jpayne@69 8788 * try:
jpayne@69 8789 */
jpayne@69 8790 /*else*/ {
jpayne@69 8791 __pyx_t_1 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_failure_when_retrieving_sequence, __pyx_v_contig); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 317, __pyx_L1_error)
jpayne@69 8792 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 8793 __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 317, __pyx_L1_error)
jpayne@69 8794 __Pyx_GOTREF(__pyx_t_3);
jpayne@69 8795 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@69 8796 __Pyx_Raise(__pyx_t_3, 0, 0, 0);
jpayne@69 8797 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
jpayne@69 8798 __PYX_ERR(0, 317, __pyx_L1_error)
jpayne@69 8799 }
jpayne@69 8800
jpayne@69 8801 /* "pysam/libcfaidx.pyx":313
jpayne@69 8802 * &length)
jpayne@69 8803 *
jpayne@69 8804 * if not seq: # <<<<<<<<<<<<<<
jpayne@69 8805 * if errno:
jpayne@69 8806 * raise IOError(errno, strerror(errno))
jpayne@69 8807 */
jpayne@69 8808 }
jpayne@69 8809
jpayne@69 8810 /* "pysam/libcfaidx.pyx":319
jpayne@69 8811 * raise ValueError("failure when retrieving sequence on '%s'" % contig)
jpayne@69 8812 *
jpayne@69 8813 * try: # <<<<<<<<<<<<<<
jpayne@69 8814 * return charptr_to_str(seq)
jpayne@69 8815 * finally:
jpayne@69 8816 */
jpayne@69 8817 /*try:*/ {
jpayne@69 8818
jpayne@69 8819 /* "pysam/libcfaidx.pyx":320
jpayne@69 8820 *
jpayne@69 8821 * try:
jpayne@69 8822 * return charptr_to_str(seq) # <<<<<<<<<<<<<<
jpayne@69 8823 * finally:
jpayne@69 8824 * free(seq)
jpayne@69 8825 */
jpayne@69 8826 __Pyx_XDECREF(__pyx_r);
jpayne@69 8827 __pyx_t_3 = __pyx_f_5pysam_9libcutils_charptr_to_str(__pyx_v_seq, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 320, __pyx_L19_error)
jpayne@69 8828 __Pyx_GOTREF(__pyx_t_3);
jpayne@69 8829 __pyx_r = __pyx_t_3;
jpayne@69 8830 __pyx_t_3 = 0;
jpayne@69 8831 goto __pyx_L18_return;
jpayne@69 8832 }
jpayne@69 8833
jpayne@69 8834 /* "pysam/libcfaidx.pyx":322
jpayne@69 8835 * return charptr_to_str(seq)
jpayne@69 8836 * finally:
jpayne@69 8837 * free(seq) # <<<<<<<<<<<<<<
jpayne@69 8838 *
jpayne@69 8839 * cdef char *_fetch(self, char *reference, int start, int end, int *length) except? NULL:
jpayne@69 8840 */
jpayne@69 8841 /*finally:*/ {
jpayne@69 8842 __pyx_L19_error:;
jpayne@69 8843 /*exception exit:*/{
jpayne@69 8844 __Pyx_PyThreadState_declare
jpayne@69 8845 __Pyx_PyThreadState_assign
jpayne@69 8846 __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0;
jpayne@69 8847 __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@69 8848 __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@69 8849 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
jpayne@69 8850 __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
jpayne@69 8851 __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
jpayne@69 8852 if (PY_MAJOR_VERSION >= 3) __Pyx_ExceptionSwap(&__pyx_t_18, &__pyx_t_19, &__pyx_t_20);
jpayne@69 8853 if ((PY_MAJOR_VERSION < 3) || unlikely(__Pyx_GetException(&__pyx_t_15, &__pyx_t_16, &__pyx_t_17) < 0)) __Pyx_ErrFetch(&__pyx_t_15, &__pyx_t_16, &__pyx_t_17);
jpayne@69 8854 __Pyx_XGOTREF(__pyx_t_15);
jpayne@69 8855 __Pyx_XGOTREF(__pyx_t_16);
jpayne@69 8856 __Pyx_XGOTREF(__pyx_t_17);
jpayne@69 8857 __Pyx_XGOTREF(__pyx_t_18);
jpayne@69 8858 __Pyx_XGOTREF(__pyx_t_19);
jpayne@69 8859 __Pyx_XGOTREF(__pyx_t_20);
jpayne@69 8860 __pyx_t_12 = __pyx_lineno; __pyx_t_11 = __pyx_clineno; __pyx_t_14 = __pyx_filename;
jpayne@69 8861 {
jpayne@69 8862 free(__pyx_v_seq);
jpayne@69 8863 }
jpayne@69 8864 if (PY_MAJOR_VERSION >= 3) {
jpayne@69 8865 __Pyx_XGIVEREF(__pyx_t_18);
jpayne@69 8866 __Pyx_XGIVEREF(__pyx_t_19);
jpayne@69 8867 __Pyx_XGIVEREF(__pyx_t_20);
jpayne@69 8868 __Pyx_ExceptionReset(__pyx_t_18, __pyx_t_19, __pyx_t_20);
jpayne@69 8869 }
jpayne@69 8870 __Pyx_XGIVEREF(__pyx_t_15);
jpayne@69 8871 __Pyx_XGIVEREF(__pyx_t_16);
jpayne@69 8872 __Pyx_XGIVEREF(__pyx_t_17);
jpayne@69 8873 __Pyx_ErrRestore(__pyx_t_15, __pyx_t_16, __pyx_t_17);
jpayne@69 8874 __pyx_t_15 = 0; __pyx_t_16 = 0; __pyx_t_17 = 0; __pyx_t_18 = 0; __pyx_t_19 = 0; __pyx_t_20 = 0;
jpayne@69 8875 __pyx_lineno = __pyx_t_12; __pyx_clineno = __pyx_t_11; __pyx_filename = __pyx_t_14;
jpayne@69 8876 goto __pyx_L1_error;
jpayne@69 8877 }
jpayne@69 8878 __pyx_L18_return: {
jpayne@69 8879 __pyx_t_20 = __pyx_r;
jpayne@69 8880 __pyx_r = 0;
jpayne@69 8881 free(__pyx_v_seq);
jpayne@69 8882 __pyx_r = __pyx_t_20;
jpayne@69 8883 __pyx_t_20 = 0;
jpayne@69 8884 goto __pyx_L0;
jpayne@69 8885 }
jpayne@69 8886 }
jpayne@69 8887
jpayne@69 8888 /* "pysam/libcfaidx.pyx":242
jpayne@69 8889 * return self._lengths
jpayne@69 8890 *
jpayne@69 8891 * def fetch(self, # <<<<<<<<<<<<<<
jpayne@69 8892 * reference=None,
jpayne@69 8893 * start=None,
jpayne@69 8894 */
jpayne@69 8895
jpayne@69 8896 /* function exit code */
jpayne@69 8897 __pyx_L1_error:;
jpayne@69 8898 __Pyx_XDECREF(__pyx_t_1);
jpayne@69 8899 __Pyx_XDECREF(__pyx_t_2);
jpayne@69 8900 __Pyx_XDECREF(__pyx_t_3);
jpayne@69 8901 __Pyx_XDECREF(__pyx_t_8);
jpayne@69 8902 __Pyx_XDECREF(__pyx_t_9);
jpayne@69 8903 __Pyx_AddTraceback("pysam.libcfaidx.FastaFile.fetch", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 8904 __pyx_r = NULL;
jpayne@69 8905 __pyx_L0:;
jpayne@69 8906 __Pyx_XDECREF(__pyx_v_contig);
jpayne@69 8907 __Pyx_XDECREF(__pyx_v_contig_b);
jpayne@69 8908 __Pyx_XGIVEREF(__pyx_r);
jpayne@69 8909 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@69 8910 __Pyx_RefNannyFinishContext();
jpayne@69 8911 return __pyx_r;
jpayne@69 8912 }
jpayne@69 8913
jpayne@69 8914 /* "pysam/libcfaidx.pyx":324
jpayne@69 8915 * free(seq)
jpayne@69 8916 *
jpayne@69 8917 * cdef char *_fetch(self, char *reference, int start, int end, int *length) except? NULL: # <<<<<<<<<<<<<<
jpayne@69 8918 * '''fetch sequence for reference, start and end'''
jpayne@69 8919 *
jpayne@69 8920 */
jpayne@69 8921
jpayne@69 8922 static char *__pyx_f_5pysam_9libcfaidx_9FastaFile__fetch(struct __pyx_obj_5pysam_9libcfaidx_FastaFile *__pyx_v_self, char *__pyx_v_reference, int __pyx_v_start, int __pyx_v_end, int *__pyx_v_length) {
jpayne@69 8923 char *__pyx_v_seq;
jpayne@69 8924 char *__pyx_r;
jpayne@69 8925 __Pyx_TraceDeclarations
jpayne@69 8926 __Pyx_RefNannyDeclarations
jpayne@69 8927 int __pyx_t_1;
jpayne@69 8928 PyObject *__pyx_t_2 = NULL;
jpayne@69 8929 PyObject *__pyx_t_3 = NULL;
jpayne@69 8930 PyObject *__pyx_t_4 = NULL;
jpayne@69 8931 int __pyx_lineno = 0;
jpayne@69 8932 const char *__pyx_filename = NULL;
jpayne@69 8933 int __pyx_clineno = 0;
jpayne@69 8934 __Pyx_RefNannySetupContext("_fetch", 1);
jpayne@69 8935 __Pyx_TraceCall("_fetch", __pyx_f[0], 324, 0, __PYX_ERR(0, 324, __pyx_L1_error));
jpayne@69 8936
jpayne@69 8937 /* "pysam/libcfaidx.pyx":328
jpayne@69 8938 *
jpayne@69 8939 * cdef char *seq
jpayne@69 8940 * with nogil: # <<<<<<<<<<<<<<
jpayne@69 8941 * seq = faidx_fetch_seq(self.fastafile,
jpayne@69 8942 * reference,
jpayne@69 8943 */
jpayne@69 8944 {
jpayne@69 8945 #ifdef WITH_THREAD
jpayne@69 8946 PyThreadState *_save;
jpayne@69 8947 _save = NULL;
jpayne@69 8948 Py_UNBLOCK_THREADS
jpayne@69 8949 __Pyx_FastGIL_Remember();
jpayne@69 8950 #endif
jpayne@69 8951 /*try:*/ {
jpayne@69 8952
jpayne@69 8953 /* "pysam/libcfaidx.pyx":329
jpayne@69 8954 * cdef char *seq
jpayne@69 8955 * with nogil:
jpayne@69 8956 * seq = faidx_fetch_seq(self.fastafile, # <<<<<<<<<<<<<<
jpayne@69 8957 * reference,
jpayne@69 8958 * start,
jpayne@69 8959 */
jpayne@69 8960 __pyx_v_seq = faidx_fetch_seq(__pyx_v_self->fastafile, __pyx_v_reference, __pyx_v_start, (__pyx_v_end - 1), __pyx_v_length);
jpayne@69 8961 }
jpayne@69 8962
jpayne@69 8963 /* "pysam/libcfaidx.pyx":328
jpayne@69 8964 *
jpayne@69 8965 * cdef char *seq
jpayne@69 8966 * with nogil: # <<<<<<<<<<<<<<
jpayne@69 8967 * seq = faidx_fetch_seq(self.fastafile,
jpayne@69 8968 * reference,
jpayne@69 8969 */
jpayne@69 8970 /*finally:*/ {
jpayne@69 8971 /*normal exit:*/{
jpayne@69 8972 #ifdef WITH_THREAD
jpayne@69 8973 __Pyx_FastGIL_Forget();
jpayne@69 8974 Py_BLOCK_THREADS
jpayne@69 8975 #endif
jpayne@69 8976 goto __pyx_L5;
jpayne@69 8977 }
jpayne@69 8978 __pyx_L5:;
jpayne@69 8979 }
jpayne@69 8980 }
jpayne@69 8981
jpayne@69 8982 /* "pysam/libcfaidx.pyx":335
jpayne@69 8983 * length)
jpayne@69 8984 *
jpayne@69 8985 * if not seq: # <<<<<<<<<<<<<<
jpayne@69 8986 * if errno:
jpayne@69 8987 * raise IOError(errno, strerror(errno))
jpayne@69 8988 */
jpayne@69 8989 __pyx_t_1 = (!(__pyx_v_seq != 0));
jpayne@69 8990 if (__pyx_t_1) {
jpayne@69 8991
jpayne@69 8992 /* "pysam/libcfaidx.pyx":336
jpayne@69 8993 *
jpayne@69 8994 * if not seq:
jpayne@69 8995 * if errno: # <<<<<<<<<<<<<<
jpayne@69 8996 * raise IOError(errno, strerror(errno))
jpayne@69 8997 * else:
jpayne@69 8998 */
jpayne@69 8999 __pyx_t_1 = (errno != 0);
jpayne@69 9000 if (unlikely(__pyx_t_1)) {
jpayne@69 9001
jpayne@69 9002 /* "pysam/libcfaidx.pyx":337
jpayne@69 9003 * if not seq:
jpayne@69 9004 * if errno:
jpayne@69 9005 * raise IOError(errno, strerror(errno)) # <<<<<<<<<<<<<<
jpayne@69 9006 * else:
jpayne@69 9007 * raise ValueError("failure when retrieving sequence on '%s'" % reference)
jpayne@69 9008 */
jpayne@69 9009 __pyx_t_2 = __Pyx_PyInt_From_int(errno); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 337, __pyx_L1_error)
jpayne@69 9010 __Pyx_GOTREF(__pyx_t_2);
jpayne@69 9011 __pyx_t_3 = __Pyx_PyBytes_FromString(strerror(errno)); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 337, __pyx_L1_error)
jpayne@69 9012 __Pyx_GOTREF(__pyx_t_3);
jpayne@69 9013 __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 337, __pyx_L1_error)
jpayne@69 9014 __Pyx_GOTREF(__pyx_t_4);
jpayne@69 9015 __Pyx_GIVEREF(__pyx_t_2);
jpayne@69 9016 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2)) __PYX_ERR(0, 337, __pyx_L1_error);
jpayne@69 9017 __Pyx_GIVEREF(__pyx_t_3);
jpayne@69 9018 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3)) __PYX_ERR(0, 337, __pyx_L1_error);
jpayne@69 9019 __pyx_t_2 = 0;
jpayne@69 9020 __pyx_t_3 = 0;
jpayne@69 9021 __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_IOError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 337, __pyx_L1_error)
jpayne@69 9022 __Pyx_GOTREF(__pyx_t_3);
jpayne@69 9023 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
jpayne@69 9024 __Pyx_Raise(__pyx_t_3, 0, 0, 0);
jpayne@69 9025 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
jpayne@69 9026 __PYX_ERR(0, 337, __pyx_L1_error)
jpayne@69 9027
jpayne@69 9028 /* "pysam/libcfaidx.pyx":336
jpayne@69 9029 *
jpayne@69 9030 * if not seq:
jpayne@69 9031 * if errno: # <<<<<<<<<<<<<<
jpayne@69 9032 * raise IOError(errno, strerror(errno))
jpayne@69 9033 * else:
jpayne@69 9034 */
jpayne@69 9035 }
jpayne@69 9036
jpayne@69 9037 /* "pysam/libcfaidx.pyx":339
jpayne@69 9038 * raise IOError(errno, strerror(errno))
jpayne@69 9039 * else:
jpayne@69 9040 * raise ValueError("failure when retrieving sequence on '%s'" % reference) # <<<<<<<<<<<<<<
jpayne@69 9041 *
jpayne@69 9042 * return seq
jpayne@69 9043 */
jpayne@69 9044 /*else*/ {
jpayne@69 9045 __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_v_reference); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 339, __pyx_L1_error)
jpayne@69 9046 __Pyx_GOTREF(__pyx_t_3);
jpayne@69 9047 __pyx_t_4 = PyUnicode_Format(__pyx_kp_u_failure_when_retrieving_sequence, __pyx_t_3); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 339, __pyx_L1_error)
jpayne@69 9048 __Pyx_GOTREF(__pyx_t_4);
jpayne@69 9049 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
jpayne@69 9050 __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_4); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 339, __pyx_L1_error)
jpayne@69 9051 __Pyx_GOTREF(__pyx_t_3);
jpayne@69 9052 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
jpayne@69 9053 __Pyx_Raise(__pyx_t_3, 0, 0, 0);
jpayne@69 9054 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
jpayne@69 9055 __PYX_ERR(0, 339, __pyx_L1_error)
jpayne@69 9056 }
jpayne@69 9057
jpayne@69 9058 /* "pysam/libcfaidx.pyx":335
jpayne@69 9059 * length)
jpayne@69 9060 *
jpayne@69 9061 * if not seq: # <<<<<<<<<<<<<<
jpayne@69 9062 * if errno:
jpayne@69 9063 * raise IOError(errno, strerror(errno))
jpayne@69 9064 */
jpayne@69 9065 }
jpayne@69 9066
jpayne@69 9067 /* "pysam/libcfaidx.pyx":341
jpayne@69 9068 * raise ValueError("failure when retrieving sequence on '%s'" % reference)
jpayne@69 9069 *
jpayne@69 9070 * return seq # <<<<<<<<<<<<<<
jpayne@69 9071 *
jpayne@69 9072 * def get_reference_length(self, reference):
jpayne@69 9073 */
jpayne@69 9074 __pyx_r = __pyx_v_seq;
jpayne@69 9075 goto __pyx_L0;
jpayne@69 9076
jpayne@69 9077 /* "pysam/libcfaidx.pyx":324
jpayne@69 9078 * free(seq)
jpayne@69 9079 *
jpayne@69 9080 * cdef char *_fetch(self, char *reference, int start, int end, int *length) except? NULL: # <<<<<<<<<<<<<<
jpayne@69 9081 * '''fetch sequence for reference, start and end'''
jpayne@69 9082 *
jpayne@69 9083 */
jpayne@69 9084
jpayne@69 9085 /* function exit code */
jpayne@69 9086 __pyx_L1_error:;
jpayne@69 9087 __Pyx_XDECREF(__pyx_t_2);
jpayne@69 9088 __Pyx_XDECREF(__pyx_t_3);
jpayne@69 9089 __Pyx_XDECREF(__pyx_t_4);
jpayne@69 9090 __Pyx_AddTraceback("pysam.libcfaidx.FastaFile._fetch", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 9091 __pyx_r = NULL;
jpayne@69 9092 __pyx_L0:;
jpayne@69 9093 __Pyx_TraceReturn(Py_None, 0);
jpayne@69 9094 __Pyx_RefNannyFinishContext();
jpayne@69 9095 return __pyx_r;
jpayne@69 9096 }
jpayne@69 9097
jpayne@69 9098 /* "pysam/libcfaidx.pyx":343
jpayne@69 9099 * return seq
jpayne@69 9100 *
jpayne@69 9101 * def get_reference_length(self, reference): # <<<<<<<<<<<<<<
jpayne@69 9102 * '''return the length of reference.'''
jpayne@69 9103 * return self.reference2length[reference]
jpayne@69 9104 */
jpayne@69 9105
jpayne@69 9106 /* Python wrapper */
jpayne@69 9107 static PyObject *__pyx_pw_5pysam_9libcfaidx_9FastaFile_19get_reference_length(PyObject *__pyx_v_self,
jpayne@69 9108 #if CYTHON_METH_FASTCALL
jpayne@69 9109 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@69 9110 #else
jpayne@69 9111 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@69 9112 #endif
jpayne@69 9113 ); /*proto*/
jpayne@69 9114 PyDoc_STRVAR(__pyx_doc_5pysam_9libcfaidx_9FastaFile_18get_reference_length, "FastaFile.get_reference_length(self, reference)\nreturn the length of reference.");
jpayne@69 9115 static PyMethodDef __pyx_mdef_5pysam_9libcfaidx_9FastaFile_19get_reference_length = {"get_reference_length", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_9libcfaidx_9FastaFile_19get_reference_length, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_9libcfaidx_9FastaFile_18get_reference_length};
jpayne@69 9116 static PyObject *__pyx_pw_5pysam_9libcfaidx_9FastaFile_19get_reference_length(PyObject *__pyx_v_self,
jpayne@69 9117 #if CYTHON_METH_FASTCALL
jpayne@69 9118 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@69 9119 #else
jpayne@69 9120 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@69 9121 #endif
jpayne@69 9122 ) {
jpayne@69 9123 PyObject *__pyx_v_reference = 0;
jpayne@69 9124 #if !CYTHON_METH_FASTCALL
jpayne@69 9125 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
jpayne@69 9126 #endif
jpayne@69 9127 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@69 9128 PyObject* values[1] = {0};
jpayne@69 9129 int __pyx_lineno = 0;
jpayne@69 9130 const char *__pyx_filename = NULL;
jpayne@69 9131 int __pyx_clineno = 0;
jpayne@69 9132 PyObject *__pyx_r = 0;
jpayne@69 9133 __Pyx_RefNannyDeclarations
jpayne@69 9134 __Pyx_RefNannySetupContext("get_reference_length (wrapper)", 0);
jpayne@69 9135 #if !CYTHON_METH_FASTCALL
jpayne@69 9136 #if CYTHON_ASSUME_SAFE_MACROS
jpayne@69 9137 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
jpayne@69 9138 #else
jpayne@69 9139 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
jpayne@69 9140 #endif
jpayne@69 9141 #endif
jpayne@69 9142 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
jpayne@69 9143 {
jpayne@69 9144 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_reference,0};
jpayne@69 9145 if (__pyx_kwds) {
jpayne@69 9146 Py_ssize_t kw_args;
jpayne@69 9147 switch (__pyx_nargs) {
jpayne@69 9148 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
jpayne@69 9149 CYTHON_FALLTHROUGH;
jpayne@69 9150 case 0: break;
jpayne@69 9151 default: goto __pyx_L5_argtuple_error;
jpayne@69 9152 }
jpayne@69 9153 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
jpayne@69 9154 switch (__pyx_nargs) {
jpayne@69 9155 case 0:
jpayne@69 9156 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_reference)) != 0)) {
jpayne@69 9157 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
jpayne@69 9158 kw_args--;
jpayne@69 9159 }
jpayne@69 9160 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 343, __pyx_L3_error)
jpayne@69 9161 else goto __pyx_L5_argtuple_error;
jpayne@69 9162 }
jpayne@69 9163 if (unlikely(kw_args > 0)) {
jpayne@69 9164 const Py_ssize_t kwd_pos_args = __pyx_nargs;
jpayne@69 9165 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "get_reference_length") < 0)) __PYX_ERR(0, 343, __pyx_L3_error)
jpayne@69 9166 }
jpayne@69 9167 } else if (unlikely(__pyx_nargs != 1)) {
jpayne@69 9168 goto __pyx_L5_argtuple_error;
jpayne@69 9169 } else {
jpayne@69 9170 values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
jpayne@69 9171 }
jpayne@69 9172 __pyx_v_reference = values[0];
jpayne@69 9173 }
jpayne@69 9174 goto __pyx_L6_skip;
jpayne@69 9175 __pyx_L5_argtuple_error:;
jpayne@69 9176 __Pyx_RaiseArgtupleInvalid("get_reference_length", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 343, __pyx_L3_error)
jpayne@69 9177 __pyx_L6_skip:;
jpayne@69 9178 goto __pyx_L4_argument_unpacking_done;
jpayne@69 9179 __pyx_L3_error:;
jpayne@69 9180 {
jpayne@69 9181 Py_ssize_t __pyx_temp;
jpayne@69 9182 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
jpayne@69 9183 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
jpayne@69 9184 }
jpayne@69 9185 }
jpayne@69 9186 __Pyx_AddTraceback("pysam.libcfaidx.FastaFile.get_reference_length", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 9187 __Pyx_RefNannyFinishContext();
jpayne@69 9188 return NULL;
jpayne@69 9189 __pyx_L4_argument_unpacking_done:;
jpayne@69 9190 __pyx_r = __pyx_pf_5pysam_9libcfaidx_9FastaFile_18get_reference_length(((struct __pyx_obj_5pysam_9libcfaidx_FastaFile *)__pyx_v_self), __pyx_v_reference);
jpayne@69 9191
jpayne@69 9192 /* function exit code */
jpayne@69 9193 {
jpayne@69 9194 Py_ssize_t __pyx_temp;
jpayne@69 9195 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
jpayne@69 9196 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
jpayne@69 9197 }
jpayne@69 9198 }
jpayne@69 9199 __Pyx_RefNannyFinishContext();
jpayne@69 9200 return __pyx_r;
jpayne@69 9201 }
jpayne@69 9202
jpayne@69 9203 static PyObject *__pyx_pf_5pysam_9libcfaidx_9FastaFile_18get_reference_length(struct __pyx_obj_5pysam_9libcfaidx_FastaFile *__pyx_v_self, PyObject *__pyx_v_reference) {
jpayne@69 9204 PyObject *__pyx_r = NULL;
jpayne@69 9205 __Pyx_TraceDeclarations
jpayne@69 9206 __Pyx_RefNannyDeclarations
jpayne@69 9207 PyObject *__pyx_t_1 = NULL;
jpayne@69 9208 int __pyx_lineno = 0;
jpayne@69 9209 const char *__pyx_filename = NULL;
jpayne@69 9210 int __pyx_clineno = 0;
jpayne@69 9211 __Pyx_TraceFrameInit(__pyx_codeobj__12)
jpayne@69 9212 __Pyx_RefNannySetupContext("get_reference_length", 1);
jpayne@69 9213 __Pyx_TraceCall("get_reference_length", __pyx_f[0], 343, 0, __PYX_ERR(0, 343, __pyx_L1_error));
jpayne@69 9214
jpayne@69 9215 /* "pysam/libcfaidx.pyx":345
jpayne@69 9216 * def get_reference_length(self, reference):
jpayne@69 9217 * '''return the length of reference.'''
jpayne@69 9218 * return self.reference2length[reference] # <<<<<<<<<<<<<<
jpayne@69 9219 *
jpayne@69 9220 * def __getitem__(self, reference):
jpayne@69 9221 */
jpayne@69 9222 __Pyx_XDECREF(__pyx_r);
jpayne@69 9223 __pyx_t_1 = __Pyx_PyObject_GetItem(__pyx_v_self->reference2length, __pyx_v_reference); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 345, __pyx_L1_error)
jpayne@69 9224 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 9225 __pyx_r = __pyx_t_1;
jpayne@69 9226 __pyx_t_1 = 0;
jpayne@69 9227 goto __pyx_L0;
jpayne@69 9228
jpayne@69 9229 /* "pysam/libcfaidx.pyx":343
jpayne@69 9230 * return seq
jpayne@69 9231 *
jpayne@69 9232 * def get_reference_length(self, reference): # <<<<<<<<<<<<<<
jpayne@69 9233 * '''return the length of reference.'''
jpayne@69 9234 * return self.reference2length[reference]
jpayne@69 9235 */
jpayne@69 9236
jpayne@69 9237 /* function exit code */
jpayne@69 9238 __pyx_L1_error:;
jpayne@69 9239 __Pyx_XDECREF(__pyx_t_1);
jpayne@69 9240 __Pyx_AddTraceback("pysam.libcfaidx.FastaFile.get_reference_length", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 9241 __pyx_r = NULL;
jpayne@69 9242 __pyx_L0:;
jpayne@69 9243 __Pyx_XGIVEREF(__pyx_r);
jpayne@69 9244 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@69 9245 __Pyx_RefNannyFinishContext();
jpayne@69 9246 return __pyx_r;
jpayne@69 9247 }
jpayne@69 9248
jpayne@69 9249 /* "pysam/libcfaidx.pyx":347
jpayne@69 9250 * return self.reference2length[reference]
jpayne@69 9251 *
jpayne@69 9252 * def __getitem__(self, reference): # <<<<<<<<<<<<<<
jpayne@69 9253 * return self.fetch(reference)
jpayne@69 9254 *
jpayne@69 9255 */
jpayne@69 9256
jpayne@69 9257 /* Python wrapper */
jpayne@69 9258 static PyObject *__pyx_pw_5pysam_9libcfaidx_9FastaFile_21__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_reference); /*proto*/
jpayne@69 9259 static PyObject *__pyx_pw_5pysam_9libcfaidx_9FastaFile_21__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_reference) {
jpayne@69 9260 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@69 9261 PyObject *__pyx_r = 0;
jpayne@69 9262 __Pyx_RefNannyDeclarations
jpayne@69 9263 __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0);
jpayne@69 9264 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
jpayne@69 9265 __pyx_r = __pyx_pf_5pysam_9libcfaidx_9FastaFile_20__getitem__(((struct __pyx_obj_5pysam_9libcfaidx_FastaFile *)__pyx_v_self), ((PyObject *)__pyx_v_reference));
jpayne@69 9266
jpayne@69 9267 /* function exit code */
jpayne@69 9268 __Pyx_RefNannyFinishContext();
jpayne@69 9269 return __pyx_r;
jpayne@69 9270 }
jpayne@69 9271
jpayne@69 9272 static PyObject *__pyx_pf_5pysam_9libcfaidx_9FastaFile_20__getitem__(struct __pyx_obj_5pysam_9libcfaidx_FastaFile *__pyx_v_self, PyObject *__pyx_v_reference) {
jpayne@69 9273 PyObject *__pyx_r = NULL;
jpayne@69 9274 __Pyx_TraceDeclarations
jpayne@69 9275 __Pyx_RefNannyDeclarations
jpayne@69 9276 PyObject *__pyx_t_1 = NULL;
jpayne@69 9277 PyObject *__pyx_t_2 = NULL;
jpayne@69 9278 PyObject *__pyx_t_3 = NULL;
jpayne@69 9279 unsigned int __pyx_t_4;
jpayne@69 9280 int __pyx_lineno = 0;
jpayne@69 9281 const char *__pyx_filename = NULL;
jpayne@69 9282 int __pyx_clineno = 0;
jpayne@69 9283 __Pyx_RefNannySetupContext("__getitem__", 1);
jpayne@69 9284 __Pyx_TraceCall("__getitem__", __pyx_f[0], 347, 0, __PYX_ERR(0, 347, __pyx_L1_error));
jpayne@69 9285
jpayne@69 9286 /* "pysam/libcfaidx.pyx":348
jpayne@69 9287 *
jpayne@69 9288 * def __getitem__(self, reference):
jpayne@69 9289 * return self.fetch(reference) # <<<<<<<<<<<<<<
jpayne@69 9290 *
jpayne@69 9291 * def __contains__(self, reference):
jpayne@69 9292 */
jpayne@69 9293 __Pyx_XDECREF(__pyx_r);
jpayne@69 9294 __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_fetch); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 348, __pyx_L1_error)
jpayne@69 9295 __Pyx_GOTREF(__pyx_t_2);
jpayne@69 9296 __pyx_t_3 = NULL;
jpayne@69 9297 __pyx_t_4 = 0;
jpayne@69 9298 #if CYTHON_UNPACK_METHODS
jpayne@69 9299 if (likely(PyMethod_Check(__pyx_t_2))) {
jpayne@69 9300 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
jpayne@69 9301 if (likely(__pyx_t_3)) {
jpayne@69 9302 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
jpayne@69 9303 __Pyx_INCREF(__pyx_t_3);
jpayne@69 9304 __Pyx_INCREF(function);
jpayne@69 9305 __Pyx_DECREF_SET(__pyx_t_2, function);
jpayne@69 9306 __pyx_t_4 = 1;
jpayne@69 9307 }
jpayne@69 9308 }
jpayne@69 9309 #endif
jpayne@69 9310 {
jpayne@69 9311 PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_v_reference};
jpayne@69 9312 __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 1+__pyx_t_4);
jpayne@69 9313 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
jpayne@69 9314 if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 348, __pyx_L1_error)
jpayne@69 9315 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 9316 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@69 9317 }
jpayne@69 9318 __pyx_r = __pyx_t_1;
jpayne@69 9319 __pyx_t_1 = 0;
jpayne@69 9320 goto __pyx_L0;
jpayne@69 9321
jpayne@69 9322 /* "pysam/libcfaidx.pyx":347
jpayne@69 9323 * return self.reference2length[reference]
jpayne@69 9324 *
jpayne@69 9325 * def __getitem__(self, reference): # <<<<<<<<<<<<<<
jpayne@69 9326 * return self.fetch(reference)
jpayne@69 9327 *
jpayne@69 9328 */
jpayne@69 9329
jpayne@69 9330 /* function exit code */
jpayne@69 9331 __pyx_L1_error:;
jpayne@69 9332 __Pyx_XDECREF(__pyx_t_1);
jpayne@69 9333 __Pyx_XDECREF(__pyx_t_2);
jpayne@69 9334 __Pyx_XDECREF(__pyx_t_3);
jpayne@69 9335 __Pyx_AddTraceback("pysam.libcfaidx.FastaFile.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 9336 __pyx_r = NULL;
jpayne@69 9337 __pyx_L0:;
jpayne@69 9338 __Pyx_XGIVEREF(__pyx_r);
jpayne@69 9339 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@69 9340 __Pyx_RefNannyFinishContext();
jpayne@69 9341 return __pyx_r;
jpayne@69 9342 }
jpayne@69 9343
jpayne@69 9344 /* "pysam/libcfaidx.pyx":350
jpayne@69 9345 * return self.fetch(reference)
jpayne@69 9346 *
jpayne@69 9347 * def __contains__(self, reference): # <<<<<<<<<<<<<<
jpayne@69 9348 * '''return true if reference in fasta file.'''
jpayne@69 9349 * return reference in self.reference2length
jpayne@69 9350 */
jpayne@69 9351
jpayne@69 9352 /* Python wrapper */
jpayne@69 9353 static int __pyx_pw_5pysam_9libcfaidx_9FastaFile_23__contains__(PyObject *__pyx_v_self, PyObject *__pyx_v_reference); /*proto*/
jpayne@69 9354 PyDoc_STRVAR(__pyx_doc_5pysam_9libcfaidx_9FastaFile_22__contains__, "return true if reference in fasta file.");
jpayne@69 9355 #if CYTHON_UPDATE_DESCRIPTOR_DOC
jpayne@69 9356 struct wrapperbase __pyx_wrapperbase_5pysam_9libcfaidx_9FastaFile_22__contains__;
jpayne@69 9357 #endif
jpayne@69 9358 static int __pyx_pw_5pysam_9libcfaidx_9FastaFile_23__contains__(PyObject *__pyx_v_self, PyObject *__pyx_v_reference) {
jpayne@69 9359 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@69 9360 int __pyx_r;
jpayne@69 9361 __Pyx_RefNannyDeclarations
jpayne@69 9362 __Pyx_RefNannySetupContext("__contains__ (wrapper)", 0);
jpayne@69 9363 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
jpayne@69 9364 __pyx_r = __pyx_pf_5pysam_9libcfaidx_9FastaFile_22__contains__(((struct __pyx_obj_5pysam_9libcfaidx_FastaFile *)__pyx_v_self), ((PyObject *)__pyx_v_reference));
jpayne@69 9365
jpayne@69 9366 /* function exit code */
jpayne@69 9367 __Pyx_RefNannyFinishContext();
jpayne@69 9368 return __pyx_r;
jpayne@69 9369 }
jpayne@69 9370
jpayne@69 9371 static int __pyx_pf_5pysam_9libcfaidx_9FastaFile_22__contains__(struct __pyx_obj_5pysam_9libcfaidx_FastaFile *__pyx_v_self, PyObject *__pyx_v_reference) {
jpayne@69 9372 int __pyx_r;
jpayne@69 9373 __Pyx_TraceDeclarations
jpayne@69 9374 int __pyx_t_1;
jpayne@69 9375 int __pyx_lineno = 0;
jpayne@69 9376 const char *__pyx_filename = NULL;
jpayne@69 9377 int __pyx_clineno = 0;
jpayne@69 9378 __Pyx_TraceCall("__contains__", __pyx_f[0], 350, 0, __PYX_ERR(0, 350, __pyx_L1_error));
jpayne@69 9379
jpayne@69 9380 /* "pysam/libcfaidx.pyx":352
jpayne@69 9381 * def __contains__(self, reference):
jpayne@69 9382 * '''return true if reference in fasta file.'''
jpayne@69 9383 * return reference in self.reference2length # <<<<<<<<<<<<<<
jpayne@69 9384 *
jpayne@69 9385 *
jpayne@69 9386 */
jpayne@69 9387 __pyx_t_1 = (__Pyx_PySequence_ContainsTF(__pyx_v_reference, __pyx_v_self->reference2length, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 352, __pyx_L1_error)
jpayne@69 9388 __pyx_r = __pyx_t_1;
jpayne@69 9389 goto __pyx_L0;
jpayne@69 9390
jpayne@69 9391 /* "pysam/libcfaidx.pyx":350
jpayne@69 9392 * return self.fetch(reference)
jpayne@69 9393 *
jpayne@69 9394 * def __contains__(self, reference): # <<<<<<<<<<<<<<
jpayne@69 9395 * '''return true if reference in fasta file.'''
jpayne@69 9396 * return reference in self.reference2length
jpayne@69 9397 */
jpayne@69 9398
jpayne@69 9399 /* function exit code */
jpayne@69 9400 __pyx_L1_error:;
jpayne@69 9401 __Pyx_AddTraceback("pysam.libcfaidx.FastaFile.__contains__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 9402 __pyx_r = -1;
jpayne@69 9403 __pyx_L0:;
jpayne@69 9404 __Pyx_TraceReturn(Py_None, 0);
jpayne@69 9405 return __pyx_r;
jpayne@69 9406 }
jpayne@69 9407
jpayne@69 9408 /* "(tree fragment)":1
jpayne@69 9409 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
jpayne@69 9410 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
jpayne@69 9411 * def __setstate_cython__(self, __pyx_state):
jpayne@69 9412 */
jpayne@69 9413
jpayne@69 9414 /* Python wrapper */
jpayne@69 9415 static PyObject *__pyx_pw_5pysam_9libcfaidx_9FastaFile_25__reduce_cython__(PyObject *__pyx_v_self,
jpayne@69 9416 #if CYTHON_METH_FASTCALL
jpayne@69 9417 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@69 9418 #else
jpayne@69 9419 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@69 9420 #endif
jpayne@69 9421 ); /*proto*/
jpayne@69 9422 PyDoc_STRVAR(__pyx_doc_5pysam_9libcfaidx_9FastaFile_24__reduce_cython__, "FastaFile.__reduce_cython__(self)");
jpayne@69 9423 static PyMethodDef __pyx_mdef_5pysam_9libcfaidx_9FastaFile_25__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_9libcfaidx_9FastaFile_25__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_9libcfaidx_9FastaFile_24__reduce_cython__};
jpayne@69 9424 static PyObject *__pyx_pw_5pysam_9libcfaidx_9FastaFile_25__reduce_cython__(PyObject *__pyx_v_self,
jpayne@69 9425 #if CYTHON_METH_FASTCALL
jpayne@69 9426 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@69 9427 #else
jpayne@69 9428 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@69 9429 #endif
jpayne@69 9430 ) {
jpayne@69 9431 #if !CYTHON_METH_FASTCALL
jpayne@69 9432 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
jpayne@69 9433 #endif
jpayne@69 9434 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@69 9435 PyObject *__pyx_r = 0;
jpayne@69 9436 __Pyx_RefNannyDeclarations
jpayne@69 9437 __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
jpayne@69 9438 #if !CYTHON_METH_FASTCALL
jpayne@69 9439 #if CYTHON_ASSUME_SAFE_MACROS
jpayne@69 9440 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
jpayne@69 9441 #else
jpayne@69 9442 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
jpayne@69 9443 #endif
jpayne@69 9444 #endif
jpayne@69 9445 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
jpayne@69 9446 if (unlikely(__pyx_nargs > 0)) {
jpayne@69 9447 __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL;}
jpayne@69 9448 if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__reduce_cython__", 0))) return NULL;
jpayne@69 9449 __pyx_r = __pyx_pf_5pysam_9libcfaidx_9FastaFile_24__reduce_cython__(((struct __pyx_obj_5pysam_9libcfaidx_FastaFile *)__pyx_v_self));
jpayne@69 9450
jpayne@69 9451 /* function exit code */
jpayne@69 9452 __Pyx_RefNannyFinishContext();
jpayne@69 9453 return __pyx_r;
jpayne@69 9454 }
jpayne@69 9455
jpayne@69 9456 static PyObject *__pyx_pf_5pysam_9libcfaidx_9FastaFile_24__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5pysam_9libcfaidx_FastaFile *__pyx_v_self) {
jpayne@69 9457 PyObject *__pyx_r = NULL;
jpayne@69 9458 __Pyx_TraceDeclarations
jpayne@69 9459 __Pyx_RefNannyDeclarations
jpayne@69 9460 int __pyx_lineno = 0;
jpayne@69 9461 const char *__pyx_filename = NULL;
jpayne@69 9462 int __pyx_clineno = 0;
jpayne@69 9463 __Pyx_TraceFrameInit(__pyx_codeobj__13)
jpayne@69 9464 __Pyx_RefNannySetupContext("__reduce_cython__", 1);
jpayne@69 9465 __Pyx_TraceCall("__reduce_cython__", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));
jpayne@69 9466
jpayne@69 9467 /* "(tree fragment)":2
jpayne@69 9468 * def __reduce_cython__(self):
jpayne@69 9469 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" # <<<<<<<<<<<<<<
jpayne@69 9470 * def __setstate_cython__(self, __pyx_state):
jpayne@69 9471 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
jpayne@69 9472 */
jpayne@69 9473 __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_no_default___reduce___due_to_non, 0, 0);
jpayne@69 9474 __PYX_ERR(1, 2, __pyx_L1_error)
jpayne@69 9475
jpayne@69 9476 /* "(tree fragment)":1
jpayne@69 9477 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
jpayne@69 9478 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
jpayne@69 9479 * def __setstate_cython__(self, __pyx_state):
jpayne@69 9480 */
jpayne@69 9481
jpayne@69 9482 /* function exit code */
jpayne@69 9483 __pyx_L1_error:;
jpayne@69 9484 __Pyx_AddTraceback("pysam.libcfaidx.FastaFile.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 9485 __pyx_r = NULL;
jpayne@69 9486 __Pyx_XGIVEREF(__pyx_r);
jpayne@69 9487 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@69 9488 __Pyx_RefNannyFinishContext();
jpayne@69 9489 return __pyx_r;
jpayne@69 9490 }
jpayne@69 9491
jpayne@69 9492 /* "(tree fragment)":3
jpayne@69 9493 * def __reduce_cython__(self):
jpayne@69 9494 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
jpayne@69 9495 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
jpayne@69 9496 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
jpayne@69 9497 */
jpayne@69 9498
jpayne@69 9499 /* Python wrapper */
jpayne@69 9500 static PyObject *__pyx_pw_5pysam_9libcfaidx_9FastaFile_27__setstate_cython__(PyObject *__pyx_v_self,
jpayne@69 9501 #if CYTHON_METH_FASTCALL
jpayne@69 9502 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@69 9503 #else
jpayne@69 9504 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@69 9505 #endif
jpayne@69 9506 ); /*proto*/
jpayne@69 9507 PyDoc_STRVAR(__pyx_doc_5pysam_9libcfaidx_9FastaFile_26__setstate_cython__, "FastaFile.__setstate_cython__(self, __pyx_state)");
jpayne@69 9508 static PyMethodDef __pyx_mdef_5pysam_9libcfaidx_9FastaFile_27__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_9libcfaidx_9FastaFile_27__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_9libcfaidx_9FastaFile_26__setstate_cython__};
jpayne@69 9509 static PyObject *__pyx_pw_5pysam_9libcfaidx_9FastaFile_27__setstate_cython__(PyObject *__pyx_v_self,
jpayne@69 9510 #if CYTHON_METH_FASTCALL
jpayne@69 9511 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@69 9512 #else
jpayne@69 9513 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@69 9514 #endif
jpayne@69 9515 ) {
jpayne@69 9516 CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0;
jpayne@69 9517 #if !CYTHON_METH_FASTCALL
jpayne@69 9518 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
jpayne@69 9519 #endif
jpayne@69 9520 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@69 9521 PyObject* values[1] = {0};
jpayne@69 9522 int __pyx_lineno = 0;
jpayne@69 9523 const char *__pyx_filename = NULL;
jpayne@69 9524 int __pyx_clineno = 0;
jpayne@69 9525 PyObject *__pyx_r = 0;
jpayne@69 9526 __Pyx_RefNannyDeclarations
jpayne@69 9527 __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
jpayne@69 9528 #if !CYTHON_METH_FASTCALL
jpayne@69 9529 #if CYTHON_ASSUME_SAFE_MACROS
jpayne@69 9530 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
jpayne@69 9531 #else
jpayne@69 9532 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
jpayne@69 9533 #endif
jpayne@69 9534 #endif
jpayne@69 9535 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
jpayne@69 9536 {
jpayne@69 9537 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0};
jpayne@69 9538 if (__pyx_kwds) {
jpayne@69 9539 Py_ssize_t kw_args;
jpayne@69 9540 switch (__pyx_nargs) {
jpayne@69 9541 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
jpayne@69 9542 CYTHON_FALLTHROUGH;
jpayne@69 9543 case 0: break;
jpayne@69 9544 default: goto __pyx_L5_argtuple_error;
jpayne@69 9545 }
jpayne@69 9546 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
jpayne@69 9547 switch (__pyx_nargs) {
jpayne@69 9548 case 0:
jpayne@69 9549 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) {
jpayne@69 9550 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
jpayne@69 9551 kw_args--;
jpayne@69 9552 }
jpayne@69 9553 else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 3, __pyx_L3_error)
jpayne@69 9554 else goto __pyx_L5_argtuple_error;
jpayne@69 9555 }
jpayne@69 9556 if (unlikely(kw_args > 0)) {
jpayne@69 9557 const Py_ssize_t kwd_pos_args = __pyx_nargs;
jpayne@69 9558 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__setstate_cython__") < 0)) __PYX_ERR(1, 3, __pyx_L3_error)
jpayne@69 9559 }
jpayne@69 9560 } else if (unlikely(__pyx_nargs != 1)) {
jpayne@69 9561 goto __pyx_L5_argtuple_error;
jpayne@69 9562 } else {
jpayne@69 9563 values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
jpayne@69 9564 }
jpayne@69 9565 __pyx_v___pyx_state = values[0];
jpayne@69 9566 }
jpayne@69 9567 goto __pyx_L6_skip;
jpayne@69 9568 __pyx_L5_argtuple_error:;
jpayne@69 9569 __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 3, __pyx_L3_error)
jpayne@69 9570 __pyx_L6_skip:;
jpayne@69 9571 goto __pyx_L4_argument_unpacking_done;
jpayne@69 9572 __pyx_L3_error:;
jpayne@69 9573 {
jpayne@69 9574 Py_ssize_t __pyx_temp;
jpayne@69 9575 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
jpayne@69 9576 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
jpayne@69 9577 }
jpayne@69 9578 }
jpayne@69 9579 __Pyx_AddTraceback("pysam.libcfaidx.FastaFile.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 9580 __Pyx_RefNannyFinishContext();
jpayne@69 9581 return NULL;
jpayne@69 9582 __pyx_L4_argument_unpacking_done:;
jpayne@69 9583 __pyx_r = __pyx_pf_5pysam_9libcfaidx_9FastaFile_26__setstate_cython__(((struct __pyx_obj_5pysam_9libcfaidx_FastaFile *)__pyx_v_self), __pyx_v___pyx_state);
jpayne@69 9584
jpayne@69 9585 /* function exit code */
jpayne@69 9586 {
jpayne@69 9587 Py_ssize_t __pyx_temp;
jpayne@69 9588 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
jpayne@69 9589 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
jpayne@69 9590 }
jpayne@69 9591 }
jpayne@69 9592 __Pyx_RefNannyFinishContext();
jpayne@69 9593 return __pyx_r;
jpayne@69 9594 }
jpayne@69 9595
jpayne@69 9596 static PyObject *__pyx_pf_5pysam_9libcfaidx_9FastaFile_26__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_5pysam_9libcfaidx_FastaFile *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
jpayne@69 9597 PyObject *__pyx_r = NULL;
jpayne@69 9598 __Pyx_TraceDeclarations
jpayne@69 9599 __Pyx_RefNannyDeclarations
jpayne@69 9600 int __pyx_lineno = 0;
jpayne@69 9601 const char *__pyx_filename = NULL;
jpayne@69 9602 int __pyx_clineno = 0;
jpayne@69 9603 __Pyx_TraceFrameInit(__pyx_codeobj__14)
jpayne@69 9604 __Pyx_RefNannySetupContext("__setstate_cython__", 1);
jpayne@69 9605 __Pyx_TraceCall("__setstate_cython__", __pyx_f[1], 3, 0, __PYX_ERR(1, 3, __pyx_L1_error));
jpayne@69 9606
jpayne@69 9607 /* "(tree fragment)":4
jpayne@69 9608 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
jpayne@69 9609 * def __setstate_cython__(self, __pyx_state):
jpayne@69 9610 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" # <<<<<<<<<<<<<<
jpayne@69 9611 */
jpayne@69 9612 __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_no_default___reduce___due_to_non, 0, 0);
jpayne@69 9613 __PYX_ERR(1, 4, __pyx_L1_error)
jpayne@69 9614
jpayne@69 9615 /* "(tree fragment)":3
jpayne@69 9616 * def __reduce_cython__(self):
jpayne@69 9617 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
jpayne@69 9618 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
jpayne@69 9619 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
jpayne@69 9620 */
jpayne@69 9621
jpayne@69 9622 /* function exit code */
jpayne@69 9623 __pyx_L1_error:;
jpayne@69 9624 __Pyx_AddTraceback("pysam.libcfaidx.FastaFile.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 9625 __pyx_r = NULL;
jpayne@69 9626 __Pyx_XGIVEREF(__pyx_r);
jpayne@69 9627 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@69 9628 __Pyx_RefNannyFinishContext();
jpayne@69 9629 return __pyx_r;
jpayne@69 9630 }
jpayne@69 9631
jpayne@69 9632 /* "pysam/libcfaidx.pyx":357
jpayne@69 9633 * cdef class FastqProxy:
jpayne@69 9634 * """A single entry in a fastq file."""
jpayne@69 9635 * def __init__(self): # <<<<<<<<<<<<<<
jpayne@69 9636 * raise ValueError("do not instantiate FastqProxy directly")
jpayne@69 9637 *
jpayne@69 9638 */
jpayne@69 9639
jpayne@69 9640 /* Python wrapper */
jpayne@69 9641 static int __pyx_pw_5pysam_9libcfaidx_10FastqProxy_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
jpayne@69 9642 static int __pyx_pw_5pysam_9libcfaidx_10FastqProxy_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
jpayne@69 9643 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
jpayne@69 9644 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@69 9645 int __pyx_r;
jpayne@69 9646 __Pyx_RefNannyDeclarations
jpayne@69 9647 __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
jpayne@69 9648 #if CYTHON_ASSUME_SAFE_MACROS
jpayne@69 9649 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
jpayne@69 9650 #else
jpayne@69 9651 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
jpayne@69 9652 #endif
jpayne@69 9653 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
jpayne@69 9654 if (unlikely(__pyx_nargs > 0)) {
jpayne@69 9655 __Pyx_RaiseArgtupleInvalid("__init__", 1, 0, 0, __pyx_nargs); return -1;}
jpayne@69 9656 if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_VARARGS(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__init__", 0))) return -1;
jpayne@69 9657 __pyx_r = __pyx_pf_5pysam_9libcfaidx_10FastqProxy___init__(((struct __pyx_obj_5pysam_9libcfaidx_FastqProxy *)__pyx_v_self));
jpayne@69 9658
jpayne@69 9659 /* function exit code */
jpayne@69 9660 __Pyx_RefNannyFinishContext();
jpayne@69 9661 return __pyx_r;
jpayne@69 9662 }
jpayne@69 9663
jpayne@69 9664 static int __pyx_pf_5pysam_9libcfaidx_10FastqProxy___init__(CYTHON_UNUSED struct __pyx_obj_5pysam_9libcfaidx_FastqProxy *__pyx_v_self) {
jpayne@69 9665 int __pyx_r;
jpayne@69 9666 __Pyx_TraceDeclarations
jpayne@69 9667 __Pyx_RefNannyDeclarations
jpayne@69 9668 PyObject *__pyx_t_1 = NULL;
jpayne@69 9669 int __pyx_lineno = 0;
jpayne@69 9670 const char *__pyx_filename = NULL;
jpayne@69 9671 int __pyx_clineno = 0;
jpayne@69 9672 __Pyx_RefNannySetupContext("__init__", 1);
jpayne@69 9673 __Pyx_TraceCall("__init__", __pyx_f[0], 357, 0, __PYX_ERR(0, 357, __pyx_L1_error));
jpayne@69 9674
jpayne@69 9675 /* "pysam/libcfaidx.pyx":358
jpayne@69 9676 * """A single entry in a fastq file."""
jpayne@69 9677 * def __init__(self):
jpayne@69 9678 * raise ValueError("do not instantiate FastqProxy directly") # <<<<<<<<<<<<<<
jpayne@69 9679 *
jpayne@69 9680 * property name:
jpayne@69 9681 */
jpayne@69 9682 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__15, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 358, __pyx_L1_error)
jpayne@69 9683 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 9684 __Pyx_Raise(__pyx_t_1, 0, 0, 0);
jpayne@69 9685 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@69 9686 __PYX_ERR(0, 358, __pyx_L1_error)
jpayne@69 9687
jpayne@69 9688 /* "pysam/libcfaidx.pyx":357
jpayne@69 9689 * cdef class FastqProxy:
jpayne@69 9690 * """A single entry in a fastq file."""
jpayne@69 9691 * def __init__(self): # <<<<<<<<<<<<<<
jpayne@69 9692 * raise ValueError("do not instantiate FastqProxy directly")
jpayne@69 9693 *
jpayne@69 9694 */
jpayne@69 9695
jpayne@69 9696 /* function exit code */
jpayne@69 9697 __pyx_L1_error:;
jpayne@69 9698 __Pyx_XDECREF(__pyx_t_1);
jpayne@69 9699 __Pyx_AddTraceback("pysam.libcfaidx.FastqProxy.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 9700 __pyx_r = -1;
jpayne@69 9701 __Pyx_TraceReturn(Py_None, 0);
jpayne@69 9702 __Pyx_RefNannyFinishContext();
jpayne@69 9703 return __pyx_r;
jpayne@69 9704 }
jpayne@69 9705
jpayne@69 9706 /* "pysam/libcfaidx.pyx":362
jpayne@69 9707 * property name:
jpayne@69 9708 * """The name of each entry in the fastq file."""
jpayne@69 9709 * def __get__(self): # <<<<<<<<<<<<<<
jpayne@69 9710 * return charptr_to_str(self._delegate.name.s)
jpayne@69 9711 *
jpayne@69 9712 */
jpayne@69 9713
jpayne@69 9714 /* Python wrapper */
jpayne@69 9715 static PyObject *__pyx_pw_5pysam_9libcfaidx_10FastqProxy_4name_1__get__(PyObject *__pyx_v_self); /*proto*/
jpayne@69 9716 static PyObject *__pyx_pw_5pysam_9libcfaidx_10FastqProxy_4name_1__get__(PyObject *__pyx_v_self) {
jpayne@69 9717 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@69 9718 PyObject *__pyx_r = 0;
jpayne@69 9719 __Pyx_RefNannyDeclarations
jpayne@69 9720 __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
jpayne@69 9721 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
jpayne@69 9722 __pyx_r = __pyx_pf_5pysam_9libcfaidx_10FastqProxy_4name___get__(((struct __pyx_obj_5pysam_9libcfaidx_FastqProxy *)__pyx_v_self));
jpayne@69 9723
jpayne@69 9724 /* function exit code */
jpayne@69 9725 __Pyx_RefNannyFinishContext();
jpayne@69 9726 return __pyx_r;
jpayne@69 9727 }
jpayne@69 9728
jpayne@69 9729 static PyObject *__pyx_pf_5pysam_9libcfaidx_10FastqProxy_4name___get__(struct __pyx_obj_5pysam_9libcfaidx_FastqProxy *__pyx_v_self) {
jpayne@69 9730 PyObject *__pyx_r = NULL;
jpayne@69 9731 __Pyx_TraceDeclarations
jpayne@69 9732 __Pyx_RefNannyDeclarations
jpayne@69 9733 PyObject *__pyx_t_1 = NULL;
jpayne@69 9734 int __pyx_lineno = 0;
jpayne@69 9735 const char *__pyx_filename = NULL;
jpayne@69 9736 int __pyx_clineno = 0;
jpayne@69 9737 __Pyx_RefNannySetupContext("__get__", 1);
jpayne@69 9738 __Pyx_TraceCall("__get__", __pyx_f[0], 362, 0, __PYX_ERR(0, 362, __pyx_L1_error));
jpayne@69 9739
jpayne@69 9740 /* "pysam/libcfaidx.pyx":363
jpayne@69 9741 * """The name of each entry in the fastq file."""
jpayne@69 9742 * def __get__(self):
jpayne@69 9743 * return charptr_to_str(self._delegate.name.s) # <<<<<<<<<<<<<<
jpayne@69 9744 *
jpayne@69 9745 * property sequence:
jpayne@69 9746 */
jpayne@69 9747 __Pyx_XDECREF(__pyx_r);
jpayne@69 9748 __pyx_t_1 = __pyx_f_5pysam_9libcutils_charptr_to_str(__pyx_v_self->_delegate->name.s, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 363, __pyx_L1_error)
jpayne@69 9749 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 9750 __pyx_r = __pyx_t_1;
jpayne@69 9751 __pyx_t_1 = 0;
jpayne@69 9752 goto __pyx_L0;
jpayne@69 9753
jpayne@69 9754 /* "pysam/libcfaidx.pyx":362
jpayne@69 9755 * property name:
jpayne@69 9756 * """The name of each entry in the fastq file."""
jpayne@69 9757 * def __get__(self): # <<<<<<<<<<<<<<
jpayne@69 9758 * return charptr_to_str(self._delegate.name.s)
jpayne@69 9759 *
jpayne@69 9760 */
jpayne@69 9761
jpayne@69 9762 /* function exit code */
jpayne@69 9763 __pyx_L1_error:;
jpayne@69 9764 __Pyx_XDECREF(__pyx_t_1);
jpayne@69 9765 __Pyx_AddTraceback("pysam.libcfaidx.FastqProxy.name.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 9766 __pyx_r = NULL;
jpayne@69 9767 __pyx_L0:;
jpayne@69 9768 __Pyx_XGIVEREF(__pyx_r);
jpayne@69 9769 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@69 9770 __Pyx_RefNannyFinishContext();
jpayne@69 9771 return __pyx_r;
jpayne@69 9772 }
jpayne@69 9773
jpayne@69 9774 /* "pysam/libcfaidx.pyx":367
jpayne@69 9775 * property sequence:
jpayne@69 9776 * """The sequence of each entry in the fastq file."""
jpayne@69 9777 * def __get__(self): # <<<<<<<<<<<<<<
jpayne@69 9778 * return charptr_to_str(self._delegate.seq.s)
jpayne@69 9779 *
jpayne@69 9780 */
jpayne@69 9781
jpayne@69 9782 /* Python wrapper */
jpayne@69 9783 static PyObject *__pyx_pw_5pysam_9libcfaidx_10FastqProxy_8sequence_1__get__(PyObject *__pyx_v_self); /*proto*/
jpayne@69 9784 static PyObject *__pyx_pw_5pysam_9libcfaidx_10FastqProxy_8sequence_1__get__(PyObject *__pyx_v_self) {
jpayne@69 9785 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@69 9786 PyObject *__pyx_r = 0;
jpayne@69 9787 __Pyx_RefNannyDeclarations
jpayne@69 9788 __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
jpayne@69 9789 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
jpayne@69 9790 __pyx_r = __pyx_pf_5pysam_9libcfaidx_10FastqProxy_8sequence___get__(((struct __pyx_obj_5pysam_9libcfaidx_FastqProxy *)__pyx_v_self));
jpayne@69 9791
jpayne@69 9792 /* function exit code */
jpayne@69 9793 __Pyx_RefNannyFinishContext();
jpayne@69 9794 return __pyx_r;
jpayne@69 9795 }
jpayne@69 9796
jpayne@69 9797 static PyObject *__pyx_pf_5pysam_9libcfaidx_10FastqProxy_8sequence___get__(struct __pyx_obj_5pysam_9libcfaidx_FastqProxy *__pyx_v_self) {
jpayne@69 9798 PyObject *__pyx_r = NULL;
jpayne@69 9799 __Pyx_TraceDeclarations
jpayne@69 9800 __Pyx_RefNannyDeclarations
jpayne@69 9801 PyObject *__pyx_t_1 = NULL;
jpayne@69 9802 int __pyx_lineno = 0;
jpayne@69 9803 const char *__pyx_filename = NULL;
jpayne@69 9804 int __pyx_clineno = 0;
jpayne@69 9805 __Pyx_RefNannySetupContext("__get__", 1);
jpayne@69 9806 __Pyx_TraceCall("__get__", __pyx_f[0], 367, 0, __PYX_ERR(0, 367, __pyx_L1_error));
jpayne@69 9807
jpayne@69 9808 /* "pysam/libcfaidx.pyx":368
jpayne@69 9809 * """The sequence of each entry in the fastq file."""
jpayne@69 9810 * def __get__(self):
jpayne@69 9811 * return charptr_to_str(self._delegate.seq.s) # <<<<<<<<<<<<<<
jpayne@69 9812 *
jpayne@69 9813 * property comment:
jpayne@69 9814 */
jpayne@69 9815 __Pyx_XDECREF(__pyx_r);
jpayne@69 9816 __pyx_t_1 = __pyx_f_5pysam_9libcutils_charptr_to_str(__pyx_v_self->_delegate->seq.s, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 368, __pyx_L1_error)
jpayne@69 9817 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 9818 __pyx_r = __pyx_t_1;
jpayne@69 9819 __pyx_t_1 = 0;
jpayne@69 9820 goto __pyx_L0;
jpayne@69 9821
jpayne@69 9822 /* "pysam/libcfaidx.pyx":367
jpayne@69 9823 * property sequence:
jpayne@69 9824 * """The sequence of each entry in the fastq file."""
jpayne@69 9825 * def __get__(self): # <<<<<<<<<<<<<<
jpayne@69 9826 * return charptr_to_str(self._delegate.seq.s)
jpayne@69 9827 *
jpayne@69 9828 */
jpayne@69 9829
jpayne@69 9830 /* function exit code */
jpayne@69 9831 __pyx_L1_error:;
jpayne@69 9832 __Pyx_XDECREF(__pyx_t_1);
jpayne@69 9833 __Pyx_AddTraceback("pysam.libcfaidx.FastqProxy.sequence.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 9834 __pyx_r = NULL;
jpayne@69 9835 __pyx_L0:;
jpayne@69 9836 __Pyx_XGIVEREF(__pyx_r);
jpayne@69 9837 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@69 9838 __Pyx_RefNannyFinishContext();
jpayne@69 9839 return __pyx_r;
jpayne@69 9840 }
jpayne@69 9841
jpayne@69 9842 /* "pysam/libcfaidx.pyx":371
jpayne@69 9843 *
jpayne@69 9844 * property comment:
jpayne@69 9845 * def __get__(self): # <<<<<<<<<<<<<<
jpayne@69 9846 * if self._delegate.comment.l:
jpayne@69 9847 * return charptr_to_str(self._delegate.comment.s)
jpayne@69 9848 */
jpayne@69 9849
jpayne@69 9850 /* Python wrapper */
jpayne@69 9851 static PyObject *__pyx_pw_5pysam_9libcfaidx_10FastqProxy_7comment_1__get__(PyObject *__pyx_v_self); /*proto*/
jpayne@69 9852 static PyObject *__pyx_pw_5pysam_9libcfaidx_10FastqProxy_7comment_1__get__(PyObject *__pyx_v_self) {
jpayne@69 9853 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@69 9854 PyObject *__pyx_r = 0;
jpayne@69 9855 __Pyx_RefNannyDeclarations
jpayne@69 9856 __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
jpayne@69 9857 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
jpayne@69 9858 __pyx_r = __pyx_pf_5pysam_9libcfaidx_10FastqProxy_7comment___get__(((struct __pyx_obj_5pysam_9libcfaidx_FastqProxy *)__pyx_v_self));
jpayne@69 9859
jpayne@69 9860 /* function exit code */
jpayne@69 9861 __Pyx_RefNannyFinishContext();
jpayne@69 9862 return __pyx_r;
jpayne@69 9863 }
jpayne@69 9864
jpayne@69 9865 static PyObject *__pyx_pf_5pysam_9libcfaidx_10FastqProxy_7comment___get__(struct __pyx_obj_5pysam_9libcfaidx_FastqProxy *__pyx_v_self) {
jpayne@69 9866 PyObject *__pyx_r = NULL;
jpayne@69 9867 __Pyx_TraceDeclarations
jpayne@69 9868 __Pyx_RefNannyDeclarations
jpayne@69 9869 int __pyx_t_1;
jpayne@69 9870 PyObject *__pyx_t_2 = NULL;
jpayne@69 9871 int __pyx_lineno = 0;
jpayne@69 9872 const char *__pyx_filename = NULL;
jpayne@69 9873 int __pyx_clineno = 0;
jpayne@69 9874 __Pyx_RefNannySetupContext("__get__", 1);
jpayne@69 9875 __Pyx_TraceCall("__get__", __pyx_f[0], 371, 0, __PYX_ERR(0, 371, __pyx_L1_error));
jpayne@69 9876
jpayne@69 9877 /* "pysam/libcfaidx.pyx":372
jpayne@69 9878 * property comment:
jpayne@69 9879 * def __get__(self):
jpayne@69 9880 * if self._delegate.comment.l: # <<<<<<<<<<<<<<
jpayne@69 9881 * return charptr_to_str(self._delegate.comment.s)
jpayne@69 9882 * else:
jpayne@69 9883 */
jpayne@69 9884 __pyx_t_1 = (__pyx_v_self->_delegate->comment.l != 0);
jpayne@69 9885 if (__pyx_t_1) {
jpayne@69 9886
jpayne@69 9887 /* "pysam/libcfaidx.pyx":373
jpayne@69 9888 * def __get__(self):
jpayne@69 9889 * if self._delegate.comment.l:
jpayne@69 9890 * return charptr_to_str(self._delegate.comment.s) # <<<<<<<<<<<<<<
jpayne@69 9891 * else:
jpayne@69 9892 * return None
jpayne@69 9893 */
jpayne@69 9894 __Pyx_XDECREF(__pyx_r);
jpayne@69 9895 __pyx_t_2 = __pyx_f_5pysam_9libcutils_charptr_to_str(__pyx_v_self->_delegate->comment.s, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 373, __pyx_L1_error)
jpayne@69 9896 __Pyx_GOTREF(__pyx_t_2);
jpayne@69 9897 __pyx_r = __pyx_t_2;
jpayne@69 9898 __pyx_t_2 = 0;
jpayne@69 9899 goto __pyx_L0;
jpayne@69 9900
jpayne@69 9901 /* "pysam/libcfaidx.pyx":372
jpayne@69 9902 * property comment:
jpayne@69 9903 * def __get__(self):
jpayne@69 9904 * if self._delegate.comment.l: # <<<<<<<<<<<<<<
jpayne@69 9905 * return charptr_to_str(self._delegate.comment.s)
jpayne@69 9906 * else:
jpayne@69 9907 */
jpayne@69 9908 }
jpayne@69 9909
jpayne@69 9910 /* "pysam/libcfaidx.pyx":375
jpayne@69 9911 * return charptr_to_str(self._delegate.comment.s)
jpayne@69 9912 * else:
jpayne@69 9913 * return None # <<<<<<<<<<<<<<
jpayne@69 9914 *
jpayne@69 9915 * property quality:
jpayne@69 9916 */
jpayne@69 9917 /*else*/ {
jpayne@69 9918 __Pyx_XDECREF(__pyx_r);
jpayne@69 9919 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
jpayne@69 9920 goto __pyx_L0;
jpayne@69 9921 }
jpayne@69 9922
jpayne@69 9923 /* "pysam/libcfaidx.pyx":371
jpayne@69 9924 *
jpayne@69 9925 * property comment:
jpayne@69 9926 * def __get__(self): # <<<<<<<<<<<<<<
jpayne@69 9927 * if self._delegate.comment.l:
jpayne@69 9928 * return charptr_to_str(self._delegate.comment.s)
jpayne@69 9929 */
jpayne@69 9930
jpayne@69 9931 /* function exit code */
jpayne@69 9932 __pyx_L1_error:;
jpayne@69 9933 __Pyx_XDECREF(__pyx_t_2);
jpayne@69 9934 __Pyx_AddTraceback("pysam.libcfaidx.FastqProxy.comment.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 9935 __pyx_r = NULL;
jpayne@69 9936 __pyx_L0:;
jpayne@69 9937 __Pyx_XGIVEREF(__pyx_r);
jpayne@69 9938 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@69 9939 __Pyx_RefNannyFinishContext();
jpayne@69 9940 return __pyx_r;
jpayne@69 9941 }
jpayne@69 9942
jpayne@69 9943 /* "pysam/libcfaidx.pyx":379
jpayne@69 9944 * property quality:
jpayne@69 9945 * """The quality score of each entry in the fastq file, represented as a string."""
jpayne@69 9946 * def __get__(self): # <<<<<<<<<<<<<<
jpayne@69 9947 * if self._delegate.qual.l:
jpayne@69 9948 * return charptr_to_str(self._delegate.qual.s)
jpayne@69 9949 */
jpayne@69 9950
jpayne@69 9951 /* Python wrapper */
jpayne@69 9952 static PyObject *__pyx_pw_5pysam_9libcfaidx_10FastqProxy_7quality_1__get__(PyObject *__pyx_v_self); /*proto*/
jpayne@69 9953 static PyObject *__pyx_pw_5pysam_9libcfaidx_10FastqProxy_7quality_1__get__(PyObject *__pyx_v_self) {
jpayne@69 9954 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@69 9955 PyObject *__pyx_r = 0;
jpayne@69 9956 __Pyx_RefNannyDeclarations
jpayne@69 9957 __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
jpayne@69 9958 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
jpayne@69 9959 __pyx_r = __pyx_pf_5pysam_9libcfaidx_10FastqProxy_7quality___get__(((struct __pyx_obj_5pysam_9libcfaidx_FastqProxy *)__pyx_v_self));
jpayne@69 9960
jpayne@69 9961 /* function exit code */
jpayne@69 9962 __Pyx_RefNannyFinishContext();
jpayne@69 9963 return __pyx_r;
jpayne@69 9964 }
jpayne@69 9965
jpayne@69 9966 static PyObject *__pyx_pf_5pysam_9libcfaidx_10FastqProxy_7quality___get__(struct __pyx_obj_5pysam_9libcfaidx_FastqProxy *__pyx_v_self) {
jpayne@69 9967 PyObject *__pyx_r = NULL;
jpayne@69 9968 __Pyx_TraceDeclarations
jpayne@69 9969 __Pyx_RefNannyDeclarations
jpayne@69 9970 int __pyx_t_1;
jpayne@69 9971 PyObject *__pyx_t_2 = NULL;
jpayne@69 9972 int __pyx_lineno = 0;
jpayne@69 9973 const char *__pyx_filename = NULL;
jpayne@69 9974 int __pyx_clineno = 0;
jpayne@69 9975 __Pyx_RefNannySetupContext("__get__", 1);
jpayne@69 9976 __Pyx_TraceCall("__get__", __pyx_f[0], 379, 0, __PYX_ERR(0, 379, __pyx_L1_error));
jpayne@69 9977
jpayne@69 9978 /* "pysam/libcfaidx.pyx":380
jpayne@69 9979 * """The quality score of each entry in the fastq file, represented as a string."""
jpayne@69 9980 * def __get__(self):
jpayne@69 9981 * if self._delegate.qual.l: # <<<<<<<<<<<<<<
jpayne@69 9982 * return charptr_to_str(self._delegate.qual.s)
jpayne@69 9983 * else:
jpayne@69 9984 */
jpayne@69 9985 __pyx_t_1 = (__pyx_v_self->_delegate->qual.l != 0);
jpayne@69 9986 if (__pyx_t_1) {
jpayne@69 9987
jpayne@69 9988 /* "pysam/libcfaidx.pyx":381
jpayne@69 9989 * def __get__(self):
jpayne@69 9990 * if self._delegate.qual.l:
jpayne@69 9991 * return charptr_to_str(self._delegate.qual.s) # <<<<<<<<<<<<<<
jpayne@69 9992 * else:
jpayne@69 9993 * return None
jpayne@69 9994 */
jpayne@69 9995 __Pyx_XDECREF(__pyx_r);
jpayne@69 9996 __pyx_t_2 = __pyx_f_5pysam_9libcutils_charptr_to_str(__pyx_v_self->_delegate->qual.s, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 381, __pyx_L1_error)
jpayne@69 9997 __Pyx_GOTREF(__pyx_t_2);
jpayne@69 9998 __pyx_r = __pyx_t_2;
jpayne@69 9999 __pyx_t_2 = 0;
jpayne@69 10000 goto __pyx_L0;
jpayne@69 10001
jpayne@69 10002 /* "pysam/libcfaidx.pyx":380
jpayne@69 10003 * """The quality score of each entry in the fastq file, represented as a string."""
jpayne@69 10004 * def __get__(self):
jpayne@69 10005 * if self._delegate.qual.l: # <<<<<<<<<<<<<<
jpayne@69 10006 * return charptr_to_str(self._delegate.qual.s)
jpayne@69 10007 * else:
jpayne@69 10008 */
jpayne@69 10009 }
jpayne@69 10010
jpayne@69 10011 /* "pysam/libcfaidx.pyx":383
jpayne@69 10012 * return charptr_to_str(self._delegate.qual.s)
jpayne@69 10013 * else:
jpayne@69 10014 * return None # <<<<<<<<<<<<<<
jpayne@69 10015 *
jpayne@69 10016 * cdef cython.str to_string(self):
jpayne@69 10017 */
jpayne@69 10018 /*else*/ {
jpayne@69 10019 __Pyx_XDECREF(__pyx_r);
jpayne@69 10020 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
jpayne@69 10021 goto __pyx_L0;
jpayne@69 10022 }
jpayne@69 10023
jpayne@69 10024 /* "pysam/libcfaidx.pyx":379
jpayne@69 10025 * property quality:
jpayne@69 10026 * """The quality score of each entry in the fastq file, represented as a string."""
jpayne@69 10027 * def __get__(self): # <<<<<<<<<<<<<<
jpayne@69 10028 * if self._delegate.qual.l:
jpayne@69 10029 * return charptr_to_str(self._delegate.qual.s)
jpayne@69 10030 */
jpayne@69 10031
jpayne@69 10032 /* function exit code */
jpayne@69 10033 __pyx_L1_error:;
jpayne@69 10034 __Pyx_XDECREF(__pyx_t_2);
jpayne@69 10035 __Pyx_AddTraceback("pysam.libcfaidx.FastqProxy.quality.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 10036 __pyx_r = NULL;
jpayne@69 10037 __pyx_L0:;
jpayne@69 10038 __Pyx_XGIVEREF(__pyx_r);
jpayne@69 10039 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@69 10040 __Pyx_RefNannyFinishContext();
jpayne@69 10041 return __pyx_r;
jpayne@69 10042 }
jpayne@69 10043
jpayne@69 10044 /* "pysam/libcfaidx.pyx":385
jpayne@69 10045 * return None
jpayne@69 10046 *
jpayne@69 10047 * cdef cython.str to_string(self): # <<<<<<<<<<<<<<
jpayne@69 10048 * if self.comment is None:
jpayne@69 10049 * comment = ""
jpayne@69 10050 */
jpayne@69 10051
jpayne@69 10052 static PyObject *__pyx_f_5pysam_9libcfaidx_10FastqProxy_to_string(struct __pyx_obj_5pysam_9libcfaidx_FastqProxy *__pyx_v_self) {
jpayne@69 10053 PyObject *__pyx_v_comment = NULL;
jpayne@69 10054 PyObject *__pyx_r = NULL;
jpayne@69 10055 __Pyx_TraceDeclarations
jpayne@69 10056 __Pyx_RefNannyDeclarations
jpayne@69 10057 PyObject *__pyx_t_1 = NULL;
jpayne@69 10058 int __pyx_t_2;
jpayne@69 10059 PyObject *__pyx_t_3 = NULL;
jpayne@69 10060 Py_ssize_t __pyx_t_4;
jpayne@69 10061 Py_UCS4 __pyx_t_5;
jpayne@69 10062 PyObject *__pyx_t_6 = NULL;
jpayne@69 10063 int __pyx_lineno = 0;
jpayne@69 10064 const char *__pyx_filename = NULL;
jpayne@69 10065 int __pyx_clineno = 0;
jpayne@69 10066 __Pyx_RefNannySetupContext("to_string", 1);
jpayne@69 10067 __Pyx_TraceCall("to_string", __pyx_f[0], 385, 0, __PYX_ERR(0, 385, __pyx_L1_error));
jpayne@69 10068
jpayne@69 10069 /* "pysam/libcfaidx.pyx":386
jpayne@69 10070 *
jpayne@69 10071 * cdef cython.str to_string(self):
jpayne@69 10072 * if self.comment is None: # <<<<<<<<<<<<<<
jpayne@69 10073 * comment = ""
jpayne@69 10074 * else:
jpayne@69 10075 */
jpayne@69 10076 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_comment); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 386, __pyx_L1_error)
jpayne@69 10077 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 10078 __pyx_t_2 = (__pyx_t_1 == Py_None);
jpayne@69 10079 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@69 10080 if (__pyx_t_2) {
jpayne@69 10081
jpayne@69 10082 /* "pysam/libcfaidx.pyx":387
jpayne@69 10083 * cdef cython.str to_string(self):
jpayne@69 10084 * if self.comment is None:
jpayne@69 10085 * comment = "" # <<<<<<<<<<<<<<
jpayne@69 10086 * else:
jpayne@69 10087 * comment = " %s" % self.comment
jpayne@69 10088 */
jpayne@69 10089 __Pyx_INCREF(__pyx_kp_u__11);
jpayne@69 10090 __pyx_v_comment = __pyx_kp_u__11;
jpayne@69 10091
jpayne@69 10092 /* "pysam/libcfaidx.pyx":386
jpayne@69 10093 *
jpayne@69 10094 * cdef cython.str to_string(self):
jpayne@69 10095 * if self.comment is None: # <<<<<<<<<<<<<<
jpayne@69 10096 * comment = ""
jpayne@69 10097 * else:
jpayne@69 10098 */
jpayne@69 10099 goto __pyx_L3;
jpayne@69 10100 }
jpayne@69 10101
jpayne@69 10102 /* "pysam/libcfaidx.pyx":389
jpayne@69 10103 * comment = ""
jpayne@69 10104 * else:
jpayne@69 10105 * comment = " %s" % self.comment # <<<<<<<<<<<<<<
jpayne@69 10106 *
jpayne@69 10107 * if self.quality is None:
jpayne@69 10108 */
jpayne@69 10109 /*else*/ {
jpayne@69 10110 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_comment); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 389, __pyx_L1_error)
jpayne@69 10111 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 10112 __pyx_t_3 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_s, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 389, __pyx_L1_error)
jpayne@69 10113 __Pyx_GOTREF(__pyx_t_3);
jpayne@69 10114 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@69 10115 __pyx_v_comment = ((PyObject*)__pyx_t_3);
jpayne@69 10116 __pyx_t_3 = 0;
jpayne@69 10117 }
jpayne@69 10118 __pyx_L3:;
jpayne@69 10119
jpayne@69 10120 /* "pysam/libcfaidx.pyx":391
jpayne@69 10121 * comment = " %s" % self.comment
jpayne@69 10122 *
jpayne@69 10123 * if self.quality is None: # <<<<<<<<<<<<<<
jpayne@69 10124 * return ">%s%s\n%s" % (self.name, comment, self.sequence)
jpayne@69 10125 * else:
jpayne@69 10126 */
jpayne@69 10127 __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_quality); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 391, __pyx_L1_error)
jpayne@69 10128 __Pyx_GOTREF(__pyx_t_3);
jpayne@69 10129 __pyx_t_2 = (__pyx_t_3 == Py_None);
jpayne@69 10130 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
jpayne@69 10131 if (__pyx_t_2) {
jpayne@69 10132
jpayne@69 10133 /* "pysam/libcfaidx.pyx":392
jpayne@69 10134 *
jpayne@69 10135 * if self.quality is None:
jpayne@69 10136 * return ">%s%s\n%s" % (self.name, comment, self.sequence) # <<<<<<<<<<<<<<
jpayne@69 10137 * else:
jpayne@69 10138 * return "@%s%s\n%s\n+\n%s" % (self.name, comment,
jpayne@69 10139 */
jpayne@69 10140 __Pyx_XDECREF(__pyx_r);
jpayne@69 10141 __pyx_t_3 = PyTuple_New(5); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 392, __pyx_L1_error)
jpayne@69 10142 __Pyx_GOTREF(__pyx_t_3);
jpayne@69 10143 __pyx_t_4 = 0;
jpayne@69 10144 __pyx_t_5 = 127;
jpayne@69 10145 __Pyx_INCREF(__pyx_kp_u__16);
jpayne@69 10146 __pyx_t_4 += 1;
jpayne@69 10147 __Pyx_GIVEREF(__pyx_kp_u__16);
jpayne@69 10148 PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_kp_u__16);
jpayne@69 10149 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_name); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 392, __pyx_L1_error)
jpayne@69 10150 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 10151 __pyx_t_6 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(__pyx_t_1), __pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 392, __pyx_L1_error)
jpayne@69 10152 __Pyx_GOTREF(__pyx_t_6);
jpayne@69 10153 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@69 10154 __pyx_t_5 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) > __pyx_t_5) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) : __pyx_t_5;
jpayne@69 10155 __pyx_t_4 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6);
jpayne@69 10156 __Pyx_GIVEREF(__pyx_t_6);
jpayne@69 10157 PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_6);
jpayne@69 10158 __pyx_t_6 = 0;
jpayne@69 10159 __Pyx_INCREF(__pyx_v_comment);
jpayne@69 10160 __pyx_t_5 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_v_comment) > __pyx_t_5) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_v_comment) : __pyx_t_5;
jpayne@69 10161 __pyx_t_4 += __Pyx_PyUnicode_GET_LENGTH(__pyx_v_comment);
jpayne@69 10162 __Pyx_GIVEREF(__pyx_v_comment);
jpayne@69 10163 PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_comment);
jpayne@69 10164 __Pyx_INCREF(__pyx_kp_u__17);
jpayne@69 10165 __pyx_t_4 += 1;
jpayne@69 10166 __Pyx_GIVEREF(__pyx_kp_u__17);
jpayne@69 10167 PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_kp_u__17);
jpayne@69 10168 __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_sequence); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 392, __pyx_L1_error)
jpayne@69 10169 __Pyx_GOTREF(__pyx_t_6);
jpayne@69 10170 __pyx_t_1 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(__pyx_t_6), __pyx_empty_unicode); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 392, __pyx_L1_error)
jpayne@69 10171 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 10172 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
jpayne@69 10173 __pyx_t_5 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) > __pyx_t_5) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_1) : __pyx_t_5;
jpayne@69 10174 __pyx_t_4 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_1);
jpayne@69 10175 __Pyx_GIVEREF(__pyx_t_1);
jpayne@69 10176 PyTuple_SET_ITEM(__pyx_t_3, 4, __pyx_t_1);
jpayne@69 10177 __pyx_t_1 = 0;
jpayne@69 10178 __pyx_t_1 = __Pyx_PyUnicode_Join(__pyx_t_3, 5, __pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 392, __pyx_L1_error)
jpayne@69 10179 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 10180 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
jpayne@69 10181 __pyx_r = ((PyObject*)__pyx_t_1);
jpayne@69 10182 __pyx_t_1 = 0;
jpayne@69 10183 goto __pyx_L0;
jpayne@69 10184
jpayne@69 10185 /* "pysam/libcfaidx.pyx":391
jpayne@69 10186 * comment = " %s" % self.comment
jpayne@69 10187 *
jpayne@69 10188 * if self.quality is None: # <<<<<<<<<<<<<<
jpayne@69 10189 * return ">%s%s\n%s" % (self.name, comment, self.sequence)
jpayne@69 10190 * else:
jpayne@69 10191 */
jpayne@69 10192 }
jpayne@69 10193
jpayne@69 10194 /* "pysam/libcfaidx.pyx":394
jpayne@69 10195 * return ">%s%s\n%s" % (self.name, comment, self.sequence)
jpayne@69 10196 * else:
jpayne@69 10197 * return "@%s%s\n%s\n+\n%s" % (self.name, comment, # <<<<<<<<<<<<<<
jpayne@69 10198 * self.sequence, self.quality)
jpayne@69 10199 *
jpayne@69 10200 */
jpayne@69 10201 /*else*/ {
jpayne@69 10202 __Pyx_XDECREF(__pyx_r);
jpayne@69 10203 __pyx_t_1 = PyTuple_New(7); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 394, __pyx_L1_error)
jpayne@69 10204 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 10205 __pyx_t_4 = 0;
jpayne@69 10206 __pyx_t_5 = 127;
jpayne@69 10207 __Pyx_INCREF(__pyx_kp_u__18);
jpayne@69 10208 __pyx_t_4 += 1;
jpayne@69 10209 __Pyx_GIVEREF(__pyx_kp_u__18);
jpayne@69 10210 PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_kp_u__18);
jpayne@69 10211 __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_name); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 394, __pyx_L1_error)
jpayne@69 10212 __Pyx_GOTREF(__pyx_t_3);
jpayne@69 10213 __pyx_t_6 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(__pyx_t_3), __pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 394, __pyx_L1_error)
jpayne@69 10214 __Pyx_GOTREF(__pyx_t_6);
jpayne@69 10215 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
jpayne@69 10216 __pyx_t_5 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) > __pyx_t_5) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) : __pyx_t_5;
jpayne@69 10217 __pyx_t_4 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6);
jpayne@69 10218 __Pyx_GIVEREF(__pyx_t_6);
jpayne@69 10219 PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_6);
jpayne@69 10220 __pyx_t_6 = 0;
jpayne@69 10221 __Pyx_INCREF(__pyx_v_comment);
jpayne@69 10222 __pyx_t_5 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_v_comment) > __pyx_t_5) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_v_comment) : __pyx_t_5;
jpayne@69 10223 __pyx_t_4 += __Pyx_PyUnicode_GET_LENGTH(__pyx_v_comment);
jpayne@69 10224 __Pyx_GIVEREF(__pyx_v_comment);
jpayne@69 10225 PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_comment);
jpayne@69 10226 __Pyx_INCREF(__pyx_kp_u__17);
jpayne@69 10227 __pyx_t_4 += 1;
jpayne@69 10228 __Pyx_GIVEREF(__pyx_kp_u__17);
jpayne@69 10229 PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_kp_u__17);
jpayne@69 10230
jpayne@69 10231 /* "pysam/libcfaidx.pyx":395
jpayne@69 10232 * else:
jpayne@69 10233 * return "@%s%s\n%s\n+\n%s" % (self.name, comment,
jpayne@69 10234 * self.sequence, self.quality) # <<<<<<<<<<<<<<
jpayne@69 10235 *
jpayne@69 10236 * cdef cython.str tostring(self):
jpayne@69 10237 */
jpayne@69 10238 __pyx_t_6 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_sequence); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 395, __pyx_L1_error)
jpayne@69 10239 __Pyx_GOTREF(__pyx_t_6);
jpayne@69 10240 __pyx_t_3 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(__pyx_t_6), __pyx_empty_unicode); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 395, __pyx_L1_error)
jpayne@69 10241 __Pyx_GOTREF(__pyx_t_3);
jpayne@69 10242 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
jpayne@69 10243 __pyx_t_5 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3) > __pyx_t_5) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_3) : __pyx_t_5;
jpayne@69 10244 __pyx_t_4 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_3);
jpayne@69 10245 __Pyx_GIVEREF(__pyx_t_3);
jpayne@69 10246 PyTuple_SET_ITEM(__pyx_t_1, 4, __pyx_t_3);
jpayne@69 10247 __pyx_t_3 = 0;
jpayne@69 10248 __Pyx_INCREF(__pyx_kp_u__19);
jpayne@69 10249 __pyx_t_4 += 3;
jpayne@69 10250 __Pyx_GIVEREF(__pyx_kp_u__19);
jpayne@69 10251 PyTuple_SET_ITEM(__pyx_t_1, 5, __pyx_kp_u__19);
jpayne@69 10252 __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_quality); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 395, __pyx_L1_error)
jpayne@69 10253 __Pyx_GOTREF(__pyx_t_3);
jpayne@69 10254 __pyx_t_6 = __Pyx_PyObject_FormatSimpleAndDecref(PyObject_Unicode(__pyx_t_3), __pyx_empty_unicode); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 395, __pyx_L1_error)
jpayne@69 10255 __Pyx_GOTREF(__pyx_t_6);
jpayne@69 10256 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
jpayne@69 10257 __pyx_t_5 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) > __pyx_t_5) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_6) : __pyx_t_5;
jpayne@69 10258 __pyx_t_4 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_6);
jpayne@69 10259 __Pyx_GIVEREF(__pyx_t_6);
jpayne@69 10260 PyTuple_SET_ITEM(__pyx_t_1, 6, __pyx_t_6);
jpayne@69 10261 __pyx_t_6 = 0;
jpayne@69 10262
jpayne@69 10263 /* "pysam/libcfaidx.pyx":394
jpayne@69 10264 * return ">%s%s\n%s" % (self.name, comment, self.sequence)
jpayne@69 10265 * else:
jpayne@69 10266 * return "@%s%s\n%s\n+\n%s" % (self.name, comment, # <<<<<<<<<<<<<<
jpayne@69 10267 * self.sequence, self.quality)
jpayne@69 10268 *
jpayne@69 10269 */
jpayne@69 10270 __pyx_t_6 = __Pyx_PyUnicode_Join(__pyx_t_1, 7, __pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 394, __pyx_L1_error)
jpayne@69 10271 __Pyx_GOTREF(__pyx_t_6);
jpayne@69 10272 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@69 10273 __pyx_r = ((PyObject*)__pyx_t_6);
jpayne@69 10274 __pyx_t_6 = 0;
jpayne@69 10275 goto __pyx_L0;
jpayne@69 10276 }
jpayne@69 10277
jpayne@69 10278 /* "pysam/libcfaidx.pyx":385
jpayne@69 10279 * return None
jpayne@69 10280 *
jpayne@69 10281 * cdef cython.str to_string(self): # <<<<<<<<<<<<<<
jpayne@69 10282 * if self.comment is None:
jpayne@69 10283 * comment = ""
jpayne@69 10284 */
jpayne@69 10285
jpayne@69 10286 /* function exit code */
jpayne@69 10287 __pyx_L1_error:;
jpayne@69 10288 __Pyx_XDECREF(__pyx_t_1);
jpayne@69 10289 __Pyx_XDECREF(__pyx_t_3);
jpayne@69 10290 __Pyx_XDECREF(__pyx_t_6);
jpayne@69 10291 __Pyx_AddTraceback("pysam.libcfaidx.FastqProxy.to_string", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 10292 __pyx_r = 0;
jpayne@69 10293 __pyx_L0:;
jpayne@69 10294 __Pyx_XDECREF(__pyx_v_comment);
jpayne@69 10295 __Pyx_XGIVEREF(__pyx_r);
jpayne@69 10296 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@69 10297 __Pyx_RefNannyFinishContext();
jpayne@69 10298 return __pyx_r;
jpayne@69 10299 }
jpayne@69 10300
jpayne@69 10301 /* "pysam/libcfaidx.pyx":397
jpayne@69 10302 * self.sequence, self.quality)
jpayne@69 10303 *
jpayne@69 10304 * cdef cython.str tostring(self): # <<<<<<<<<<<<<<
jpayne@69 10305 * """deprecated : use :meth:`to_string`"""
jpayne@69 10306 * return self.to_string()
jpayne@69 10307 */
jpayne@69 10308
jpayne@69 10309 static PyObject *__pyx_f_5pysam_9libcfaidx_10FastqProxy_tostring(struct __pyx_obj_5pysam_9libcfaidx_FastqProxy *__pyx_v_self) {
jpayne@69 10310 PyObject *__pyx_r = NULL;
jpayne@69 10311 __Pyx_TraceDeclarations
jpayne@69 10312 __Pyx_RefNannyDeclarations
jpayne@69 10313 PyObject *__pyx_t_1 = NULL;
jpayne@69 10314 int __pyx_lineno = 0;
jpayne@69 10315 const char *__pyx_filename = NULL;
jpayne@69 10316 int __pyx_clineno = 0;
jpayne@69 10317 __Pyx_RefNannySetupContext("tostring", 1);
jpayne@69 10318 __Pyx_TraceCall("tostring", __pyx_f[0], 397, 0, __PYX_ERR(0, 397, __pyx_L1_error));
jpayne@69 10319
jpayne@69 10320 /* "pysam/libcfaidx.pyx":399
jpayne@69 10321 * cdef cython.str tostring(self):
jpayne@69 10322 * """deprecated : use :meth:`to_string`"""
jpayne@69 10323 * return self.to_string() # <<<<<<<<<<<<<<
jpayne@69 10324 *
jpayne@69 10325 * def __str__(self):
jpayne@69 10326 */
jpayne@69 10327 __Pyx_XDECREF(__pyx_r);
jpayne@69 10328 __pyx_t_1 = ((struct __pyx_vtabstruct_5pysam_9libcfaidx_FastqProxy *)__pyx_v_self->__pyx_vtab)->to_string(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 399, __pyx_L1_error)
jpayne@69 10329 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 10330 __pyx_r = ((PyObject*)__pyx_t_1);
jpayne@69 10331 __pyx_t_1 = 0;
jpayne@69 10332 goto __pyx_L0;
jpayne@69 10333
jpayne@69 10334 /* "pysam/libcfaidx.pyx":397
jpayne@69 10335 * self.sequence, self.quality)
jpayne@69 10336 *
jpayne@69 10337 * cdef cython.str tostring(self): # <<<<<<<<<<<<<<
jpayne@69 10338 * """deprecated : use :meth:`to_string`"""
jpayne@69 10339 * return self.to_string()
jpayne@69 10340 */
jpayne@69 10341
jpayne@69 10342 /* function exit code */
jpayne@69 10343 __pyx_L1_error:;
jpayne@69 10344 __Pyx_XDECREF(__pyx_t_1);
jpayne@69 10345 __Pyx_AddTraceback("pysam.libcfaidx.FastqProxy.tostring", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 10346 __pyx_r = 0;
jpayne@69 10347 __pyx_L0:;
jpayne@69 10348 __Pyx_XGIVEREF(__pyx_r);
jpayne@69 10349 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@69 10350 __Pyx_RefNannyFinishContext();
jpayne@69 10351 return __pyx_r;
jpayne@69 10352 }
jpayne@69 10353
jpayne@69 10354 /* "pysam/libcfaidx.pyx":401
jpayne@69 10355 * return self.to_string()
jpayne@69 10356 *
jpayne@69 10357 * def __str__(self): # <<<<<<<<<<<<<<
jpayne@69 10358 * return self.to_string()
jpayne@69 10359 *
jpayne@69 10360 */
jpayne@69 10361
jpayne@69 10362 /* Python wrapper */
jpayne@69 10363 static PyObject *__pyx_pw_5pysam_9libcfaidx_10FastqProxy_3__str__(PyObject *__pyx_v_self); /*proto*/
jpayne@69 10364 static PyObject *__pyx_pw_5pysam_9libcfaidx_10FastqProxy_3__str__(PyObject *__pyx_v_self) {
jpayne@69 10365 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@69 10366 PyObject *__pyx_r = 0;
jpayne@69 10367 __Pyx_RefNannyDeclarations
jpayne@69 10368 __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
jpayne@69 10369 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
jpayne@69 10370 __pyx_r = __pyx_pf_5pysam_9libcfaidx_10FastqProxy_2__str__(((struct __pyx_obj_5pysam_9libcfaidx_FastqProxy *)__pyx_v_self));
jpayne@69 10371
jpayne@69 10372 /* function exit code */
jpayne@69 10373 __Pyx_RefNannyFinishContext();
jpayne@69 10374 return __pyx_r;
jpayne@69 10375 }
jpayne@69 10376
jpayne@69 10377 static PyObject *__pyx_pf_5pysam_9libcfaidx_10FastqProxy_2__str__(struct __pyx_obj_5pysam_9libcfaidx_FastqProxy *__pyx_v_self) {
jpayne@69 10378 PyObject *__pyx_r = NULL;
jpayne@69 10379 __Pyx_TraceDeclarations
jpayne@69 10380 __Pyx_RefNannyDeclarations
jpayne@69 10381 PyObject *__pyx_t_1 = NULL;
jpayne@69 10382 int __pyx_lineno = 0;
jpayne@69 10383 const char *__pyx_filename = NULL;
jpayne@69 10384 int __pyx_clineno = 0;
jpayne@69 10385 __Pyx_RefNannySetupContext("__str__", 1);
jpayne@69 10386 __Pyx_TraceCall("__str__", __pyx_f[0], 401, 0, __PYX_ERR(0, 401, __pyx_L1_error));
jpayne@69 10387
jpayne@69 10388 /* "pysam/libcfaidx.pyx":402
jpayne@69 10389 *
jpayne@69 10390 * def __str__(self):
jpayne@69 10391 * return self.to_string() # <<<<<<<<<<<<<<
jpayne@69 10392 *
jpayne@69 10393 * cpdef array.array get_quality_array(self, int offset=33):
jpayne@69 10394 */
jpayne@69 10395 __Pyx_XDECREF(__pyx_r);
jpayne@69 10396 __pyx_t_1 = ((struct __pyx_vtabstruct_5pysam_9libcfaidx_FastqProxy *)__pyx_v_self->__pyx_vtab)->to_string(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 402, __pyx_L1_error)
jpayne@69 10397 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 10398 __pyx_r = __pyx_t_1;
jpayne@69 10399 __pyx_t_1 = 0;
jpayne@69 10400 goto __pyx_L0;
jpayne@69 10401
jpayne@69 10402 /* "pysam/libcfaidx.pyx":401
jpayne@69 10403 * return self.to_string()
jpayne@69 10404 *
jpayne@69 10405 * def __str__(self): # <<<<<<<<<<<<<<
jpayne@69 10406 * return self.to_string()
jpayne@69 10407 *
jpayne@69 10408 */
jpayne@69 10409
jpayne@69 10410 /* function exit code */
jpayne@69 10411 __pyx_L1_error:;
jpayne@69 10412 __Pyx_XDECREF(__pyx_t_1);
jpayne@69 10413 __Pyx_AddTraceback("pysam.libcfaidx.FastqProxy.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 10414 __pyx_r = NULL;
jpayne@69 10415 __pyx_L0:;
jpayne@69 10416 __Pyx_XGIVEREF(__pyx_r);
jpayne@69 10417 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@69 10418 __Pyx_RefNannyFinishContext();
jpayne@69 10419 return __pyx_r;
jpayne@69 10420 }
jpayne@69 10421
jpayne@69 10422 /* "pysam/libcfaidx.pyx":404
jpayne@69 10423 * return self.to_string()
jpayne@69 10424 *
jpayne@69 10425 * cpdef array.array get_quality_array(self, int offset=33): # <<<<<<<<<<<<<<
jpayne@69 10426 * '''return quality values as integer array after subtracting offset.'''
jpayne@69 10427 * if self.quality is None:
jpayne@69 10428 */
jpayne@69 10429
jpayne@69 10430 static PyObject *__pyx_pw_5pysam_9libcfaidx_10FastqProxy_5get_quality_array(PyObject *__pyx_v_self,
jpayne@69 10431 #if CYTHON_METH_FASTCALL
jpayne@69 10432 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@69 10433 #else
jpayne@69 10434 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@69 10435 #endif
jpayne@69 10436 ); /*proto*/
jpayne@69 10437 static arrayobject *__pyx_f_5pysam_9libcfaidx_10FastqProxy_get_quality_array(struct __pyx_obj_5pysam_9libcfaidx_FastqProxy *__pyx_v_self, int __pyx_skip_dispatch, struct __pyx_opt_args_5pysam_9libcfaidx_10FastqProxy_get_quality_array *__pyx_optional_args) {
jpayne@69 10438 int __pyx_v_offset = ((int)33);
jpayne@69 10439 arrayobject *__pyx_r = NULL;
jpayne@69 10440 __Pyx_TraceDeclarations
jpayne@69 10441 __Pyx_RefNannyDeclarations
jpayne@69 10442 PyObject *__pyx_t_1 = NULL;
jpayne@69 10443 PyObject *__pyx_t_2 = NULL;
jpayne@69 10444 PyObject *__pyx_t_3 = NULL;
jpayne@69 10445 PyObject *__pyx_t_4 = NULL;
jpayne@69 10446 PyObject *__pyx_t_5 = NULL;
jpayne@69 10447 unsigned int __pyx_t_6;
jpayne@69 10448 int __pyx_t_7;
jpayne@69 10449 struct __pyx_opt_args_5pysam_9libcutils_qualitystring_to_array __pyx_t_8;
jpayne@69 10450 int __pyx_lineno = 0;
jpayne@69 10451 const char *__pyx_filename = NULL;
jpayne@69 10452 int __pyx_clineno = 0;
jpayne@69 10453 __Pyx_TraceFrameInit(__pyx_codeobj__20)
jpayne@69 10454 __Pyx_RefNannySetupContext("get_quality_array", 1);
jpayne@69 10455 __Pyx_TraceCall("get_quality_array", __pyx_f[0], 404, 0, __PYX_ERR(0, 404, __pyx_L1_error));
jpayne@69 10456 if (__pyx_optional_args) {
jpayne@69 10457 if (__pyx_optional_args->__pyx_n > 0) {
jpayne@69 10458 __pyx_v_offset = __pyx_optional_args->offset;
jpayne@69 10459 }
jpayne@69 10460 }
jpayne@69 10461 /* Check if called by wrapper */
jpayne@69 10462 if (unlikely(__pyx_skip_dispatch)) ;
jpayne@69 10463 /* Check if overridden in Python */
jpayne@69 10464 else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
jpayne@69 10465 #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
jpayne@69 10466 static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
jpayne@69 10467 if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
jpayne@69 10468 PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
jpayne@69 10469 #endif
jpayne@69 10470 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_quality_array); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 404, __pyx_L1_error)
jpayne@69 10471 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 10472 if (!__Pyx_IsSameCFunction(__pyx_t_1, (void*) __pyx_pw_5pysam_9libcfaidx_10FastqProxy_5get_quality_array)) {
jpayne@69 10473 __Pyx_XDECREF((PyObject *)__pyx_r);
jpayne@69 10474 __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_offset); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 404, __pyx_L1_error)
jpayne@69 10475 __Pyx_GOTREF(__pyx_t_3);
jpayne@69 10476 __Pyx_INCREF(__pyx_t_1);
jpayne@69 10477 __pyx_t_4 = __pyx_t_1; __pyx_t_5 = NULL;
jpayne@69 10478 __pyx_t_6 = 0;
jpayne@69 10479 #if CYTHON_UNPACK_METHODS
jpayne@69 10480 if (unlikely(PyMethod_Check(__pyx_t_4))) {
jpayne@69 10481 __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
jpayne@69 10482 if (likely(__pyx_t_5)) {
jpayne@69 10483 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
jpayne@69 10484 __Pyx_INCREF(__pyx_t_5);
jpayne@69 10485 __Pyx_INCREF(function);
jpayne@69 10486 __Pyx_DECREF_SET(__pyx_t_4, function);
jpayne@69 10487 __pyx_t_6 = 1;
jpayne@69 10488 }
jpayne@69 10489 }
jpayne@69 10490 #endif
jpayne@69 10491 {
jpayne@69 10492 PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_3};
jpayne@69 10493 __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
jpayne@69 10494 __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
jpayne@69 10495 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
jpayne@69 10496 if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 404, __pyx_L1_error)
jpayne@69 10497 __Pyx_GOTREF(__pyx_t_2);
jpayne@69 10498 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
jpayne@69 10499 }
jpayne@69 10500 if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_7cpython_5array_array))))) __PYX_ERR(0, 404, __pyx_L1_error)
jpayne@69 10501 __pyx_r = ((arrayobject *)__pyx_t_2);
jpayne@69 10502 __pyx_t_2 = 0;
jpayne@69 10503 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@69 10504 goto __pyx_L0;
jpayne@69 10505 }
jpayne@69 10506 #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
jpayne@69 10507 __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
jpayne@69 10508 __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
jpayne@69 10509 if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) {
jpayne@69 10510 __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
jpayne@69 10511 }
jpayne@69 10512 #endif
jpayne@69 10513 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@69 10514 #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
jpayne@69 10515 }
jpayne@69 10516 #endif
jpayne@69 10517 }
jpayne@69 10518
jpayne@69 10519 /* "pysam/libcfaidx.pyx":406
jpayne@69 10520 * cpdef array.array get_quality_array(self, int offset=33):
jpayne@69 10521 * '''return quality values as integer array after subtracting offset.'''
jpayne@69 10522 * if self.quality is None: # <<<<<<<<<<<<<<
jpayne@69 10523 * return None
jpayne@69 10524 * return qualitystring_to_array(force_bytes(self.quality),
jpayne@69 10525 */
jpayne@69 10526 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_quality); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 406, __pyx_L1_error)
jpayne@69 10527 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 10528 __pyx_t_7 = (__pyx_t_1 == Py_None);
jpayne@69 10529 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@69 10530 if (__pyx_t_7) {
jpayne@69 10531
jpayne@69 10532 /* "pysam/libcfaidx.pyx":407
jpayne@69 10533 * '''return quality values as integer array after subtracting offset.'''
jpayne@69 10534 * if self.quality is None:
jpayne@69 10535 * return None # <<<<<<<<<<<<<<
jpayne@69 10536 * return qualitystring_to_array(force_bytes(self.quality),
jpayne@69 10537 * offset=offset)
jpayne@69 10538 */
jpayne@69 10539 __Pyx_XDECREF((PyObject *)__pyx_r);
jpayne@69 10540 __pyx_r = ((arrayobject *)Py_None); __Pyx_INCREF(Py_None);
jpayne@69 10541 goto __pyx_L0;
jpayne@69 10542
jpayne@69 10543 /* "pysam/libcfaidx.pyx":406
jpayne@69 10544 * cpdef array.array get_quality_array(self, int offset=33):
jpayne@69 10545 * '''return quality values as integer array after subtracting offset.'''
jpayne@69 10546 * if self.quality is None: # <<<<<<<<<<<<<<
jpayne@69 10547 * return None
jpayne@69 10548 * return qualitystring_to_array(force_bytes(self.quality),
jpayne@69 10549 */
jpayne@69 10550 }
jpayne@69 10551
jpayne@69 10552 /* "pysam/libcfaidx.pyx":408
jpayne@69 10553 * if self.quality is None:
jpayne@69 10554 * return None
jpayne@69 10555 * return qualitystring_to_array(force_bytes(self.quality), # <<<<<<<<<<<<<<
jpayne@69 10556 * offset=offset)
jpayne@69 10557 *
jpayne@69 10558 */
jpayne@69 10559 __Pyx_XDECREF((PyObject *)__pyx_r);
jpayne@69 10560 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_quality); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 408, __pyx_L1_error)
jpayne@69 10561 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 10562 __pyx_t_2 = __pyx_f_5pysam_9libcutils_force_bytes(__pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 408, __pyx_L1_error)
jpayne@69 10563 __Pyx_GOTREF(__pyx_t_2);
jpayne@69 10564 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@69 10565
jpayne@69 10566 /* "pysam/libcfaidx.pyx":409
jpayne@69 10567 * return None
jpayne@69 10568 * return qualitystring_to_array(force_bytes(self.quality),
jpayne@69 10569 * offset=offset) # <<<<<<<<<<<<<<
jpayne@69 10570 *
jpayne@69 10571 * cdef class FastxRecord:
jpayne@69 10572 */
jpayne@69 10573 __pyx_t_8.__pyx_n = 1;
jpayne@69 10574 __pyx_t_8.offset = __pyx_v_offset;
jpayne@69 10575 __pyx_t_1 = ((PyObject *)__pyx_f_5pysam_9libcutils_qualitystring_to_array(__pyx_t_2, 0, &__pyx_t_8)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 408, __pyx_L1_error)
jpayne@69 10576 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 10577 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@69 10578 __pyx_r = ((arrayobject *)__pyx_t_1);
jpayne@69 10579 __pyx_t_1 = 0;
jpayne@69 10580 goto __pyx_L0;
jpayne@69 10581
jpayne@69 10582 /* "pysam/libcfaidx.pyx":404
jpayne@69 10583 * return self.to_string()
jpayne@69 10584 *
jpayne@69 10585 * cpdef array.array get_quality_array(self, int offset=33): # <<<<<<<<<<<<<<
jpayne@69 10586 * '''return quality values as integer array after subtracting offset.'''
jpayne@69 10587 * if self.quality is None:
jpayne@69 10588 */
jpayne@69 10589
jpayne@69 10590 /* function exit code */
jpayne@69 10591 __pyx_L1_error:;
jpayne@69 10592 __Pyx_XDECREF(__pyx_t_1);
jpayne@69 10593 __Pyx_XDECREF(__pyx_t_2);
jpayne@69 10594 __Pyx_XDECREF(__pyx_t_3);
jpayne@69 10595 __Pyx_XDECREF(__pyx_t_4);
jpayne@69 10596 __Pyx_XDECREF(__pyx_t_5);
jpayne@69 10597 __Pyx_AddTraceback("pysam.libcfaidx.FastqProxy.get_quality_array", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 10598 __pyx_r = 0;
jpayne@69 10599 __pyx_L0:;
jpayne@69 10600 __Pyx_XGIVEREF((PyObject *)__pyx_r);
jpayne@69 10601 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@69 10602 __Pyx_RefNannyFinishContext();
jpayne@69 10603 return __pyx_r;
jpayne@69 10604 }
jpayne@69 10605
jpayne@69 10606 /* Python wrapper */
jpayne@69 10607 static PyObject *__pyx_pw_5pysam_9libcfaidx_10FastqProxy_5get_quality_array(PyObject *__pyx_v_self,
jpayne@69 10608 #if CYTHON_METH_FASTCALL
jpayne@69 10609 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@69 10610 #else
jpayne@69 10611 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@69 10612 #endif
jpayne@69 10613 ); /*proto*/
jpayne@69 10614 PyDoc_STRVAR(__pyx_doc_5pysam_9libcfaidx_10FastqProxy_4get_quality_array, "FastqProxy.get_quality_array(self, int offset=33) -> array\nreturn quality values as integer array after subtracting offset.");
jpayne@69 10615 static PyMethodDef __pyx_mdef_5pysam_9libcfaidx_10FastqProxy_5get_quality_array = {"get_quality_array", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_9libcfaidx_10FastqProxy_5get_quality_array, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_9libcfaidx_10FastqProxy_4get_quality_array};
jpayne@69 10616 static PyObject *__pyx_pw_5pysam_9libcfaidx_10FastqProxy_5get_quality_array(PyObject *__pyx_v_self,
jpayne@69 10617 #if CYTHON_METH_FASTCALL
jpayne@69 10618 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@69 10619 #else
jpayne@69 10620 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@69 10621 #endif
jpayne@69 10622 ) {
jpayne@69 10623 int __pyx_v_offset;
jpayne@69 10624 #if !CYTHON_METH_FASTCALL
jpayne@69 10625 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
jpayne@69 10626 #endif
jpayne@69 10627 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@69 10628 PyObject* values[1] = {0};
jpayne@69 10629 int __pyx_lineno = 0;
jpayne@69 10630 const char *__pyx_filename = NULL;
jpayne@69 10631 int __pyx_clineno = 0;
jpayne@69 10632 PyObject *__pyx_r = 0;
jpayne@69 10633 __Pyx_RefNannyDeclarations
jpayne@69 10634 __Pyx_RefNannySetupContext("get_quality_array (wrapper)", 0);
jpayne@69 10635 #if !CYTHON_METH_FASTCALL
jpayne@69 10636 #if CYTHON_ASSUME_SAFE_MACROS
jpayne@69 10637 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
jpayne@69 10638 #else
jpayne@69 10639 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
jpayne@69 10640 #endif
jpayne@69 10641 #endif
jpayne@69 10642 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
jpayne@69 10643 {
jpayne@69 10644 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_offset,0};
jpayne@69 10645 if (__pyx_kwds) {
jpayne@69 10646 Py_ssize_t kw_args;
jpayne@69 10647 switch (__pyx_nargs) {
jpayne@69 10648 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
jpayne@69 10649 CYTHON_FALLTHROUGH;
jpayne@69 10650 case 0: break;
jpayne@69 10651 default: goto __pyx_L5_argtuple_error;
jpayne@69 10652 }
jpayne@69 10653 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
jpayne@69 10654 switch (__pyx_nargs) {
jpayne@69 10655 case 0:
jpayne@69 10656 if (kw_args > 0) {
jpayne@69 10657 PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_offset);
jpayne@69 10658 if (value) { values[0] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
jpayne@69 10659 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 404, __pyx_L3_error)
jpayne@69 10660 }
jpayne@69 10661 }
jpayne@69 10662 if (unlikely(kw_args > 0)) {
jpayne@69 10663 const Py_ssize_t kwd_pos_args = __pyx_nargs;
jpayne@69 10664 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "get_quality_array") < 0)) __PYX_ERR(0, 404, __pyx_L3_error)
jpayne@69 10665 }
jpayne@69 10666 } else {
jpayne@69 10667 switch (__pyx_nargs) {
jpayne@69 10668 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
jpayne@69 10669 CYTHON_FALLTHROUGH;
jpayne@69 10670 case 0: break;
jpayne@69 10671 default: goto __pyx_L5_argtuple_error;
jpayne@69 10672 }
jpayne@69 10673 }
jpayne@69 10674 if (values[0]) {
jpayne@69 10675 __pyx_v_offset = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_offset == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 404, __pyx_L3_error)
jpayne@69 10676 } else {
jpayne@69 10677 __pyx_v_offset = ((int)33);
jpayne@69 10678 }
jpayne@69 10679 }
jpayne@69 10680 goto __pyx_L6_skip;
jpayne@69 10681 __pyx_L5_argtuple_error:;
jpayne@69 10682 __Pyx_RaiseArgtupleInvalid("get_quality_array", 0, 0, 1, __pyx_nargs); __PYX_ERR(0, 404, __pyx_L3_error)
jpayne@69 10683 __pyx_L6_skip:;
jpayne@69 10684 goto __pyx_L4_argument_unpacking_done;
jpayne@69 10685 __pyx_L3_error:;
jpayne@69 10686 {
jpayne@69 10687 Py_ssize_t __pyx_temp;
jpayne@69 10688 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
jpayne@69 10689 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
jpayne@69 10690 }
jpayne@69 10691 }
jpayne@69 10692 __Pyx_AddTraceback("pysam.libcfaidx.FastqProxy.get_quality_array", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 10693 __Pyx_RefNannyFinishContext();
jpayne@69 10694 return NULL;
jpayne@69 10695 __pyx_L4_argument_unpacking_done:;
jpayne@69 10696 __pyx_r = __pyx_pf_5pysam_9libcfaidx_10FastqProxy_4get_quality_array(((struct __pyx_obj_5pysam_9libcfaidx_FastqProxy *)__pyx_v_self), __pyx_v_offset);
jpayne@69 10697
jpayne@69 10698 /* function exit code */
jpayne@69 10699 {
jpayne@69 10700 Py_ssize_t __pyx_temp;
jpayne@69 10701 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
jpayne@69 10702 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
jpayne@69 10703 }
jpayne@69 10704 }
jpayne@69 10705 __Pyx_RefNannyFinishContext();
jpayne@69 10706 return __pyx_r;
jpayne@69 10707 }
jpayne@69 10708
jpayne@69 10709 static PyObject *__pyx_pf_5pysam_9libcfaidx_10FastqProxy_4get_quality_array(struct __pyx_obj_5pysam_9libcfaidx_FastqProxy *__pyx_v_self, int __pyx_v_offset) {
jpayne@69 10710 PyObject *__pyx_r = NULL;
jpayne@69 10711 __Pyx_TraceDeclarations
jpayne@69 10712 __Pyx_RefNannyDeclarations
jpayne@69 10713 PyObject *__pyx_t_1 = NULL;
jpayne@69 10714 struct __pyx_opt_args_5pysam_9libcfaidx_10FastqProxy_get_quality_array __pyx_t_2;
jpayne@69 10715 int __pyx_lineno = 0;
jpayne@69 10716 const char *__pyx_filename = NULL;
jpayne@69 10717 int __pyx_clineno = 0;
jpayne@69 10718 __Pyx_TraceFrameInit(__pyx_codeobj__20)
jpayne@69 10719 __Pyx_RefNannySetupContext("get_quality_array", 1);
jpayne@69 10720 __Pyx_TraceCall("get_quality_array (wrapper)", __pyx_f[0], 404, 0, __PYX_ERR(0, 404, __pyx_L1_error));
jpayne@69 10721 __Pyx_XDECREF(__pyx_r);
jpayne@69 10722 __pyx_t_2.__pyx_n = 1;
jpayne@69 10723 __pyx_t_2.offset = __pyx_v_offset;
jpayne@69 10724 __pyx_t_1 = ((PyObject *)__pyx_vtabptr_5pysam_9libcfaidx_FastqProxy->get_quality_array(__pyx_v_self, 1, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 404, __pyx_L1_error)
jpayne@69 10725 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 10726 __pyx_r = __pyx_t_1;
jpayne@69 10727 __pyx_t_1 = 0;
jpayne@69 10728 goto __pyx_L0;
jpayne@69 10729
jpayne@69 10730 /* function exit code */
jpayne@69 10731 __pyx_L1_error:;
jpayne@69 10732 __Pyx_XDECREF(__pyx_t_1);
jpayne@69 10733 __Pyx_AddTraceback("pysam.libcfaidx.FastqProxy.get_quality_array", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 10734 __pyx_r = NULL;
jpayne@69 10735 __pyx_L0:;
jpayne@69 10736 __Pyx_XGIVEREF(__pyx_r);
jpayne@69 10737 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@69 10738 __Pyx_RefNannyFinishContext();
jpayne@69 10739 return __pyx_r;
jpayne@69 10740 }
jpayne@69 10741
jpayne@69 10742 /* "(tree fragment)":1
jpayne@69 10743 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
jpayne@69 10744 * raise TypeError, "self._delegate cannot be converted to a Python object for pickling"
jpayne@69 10745 * def __setstate_cython__(self, __pyx_state):
jpayne@69 10746 */
jpayne@69 10747
jpayne@69 10748 /* Python wrapper */
jpayne@69 10749 static PyObject *__pyx_pw_5pysam_9libcfaidx_10FastqProxy_7__reduce_cython__(PyObject *__pyx_v_self,
jpayne@69 10750 #if CYTHON_METH_FASTCALL
jpayne@69 10751 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@69 10752 #else
jpayne@69 10753 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@69 10754 #endif
jpayne@69 10755 ); /*proto*/
jpayne@69 10756 PyDoc_STRVAR(__pyx_doc_5pysam_9libcfaidx_10FastqProxy_6__reduce_cython__, "FastqProxy.__reduce_cython__(self)");
jpayne@69 10757 static PyMethodDef __pyx_mdef_5pysam_9libcfaidx_10FastqProxy_7__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_9libcfaidx_10FastqProxy_7__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_9libcfaidx_10FastqProxy_6__reduce_cython__};
jpayne@69 10758 static PyObject *__pyx_pw_5pysam_9libcfaidx_10FastqProxy_7__reduce_cython__(PyObject *__pyx_v_self,
jpayne@69 10759 #if CYTHON_METH_FASTCALL
jpayne@69 10760 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@69 10761 #else
jpayne@69 10762 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@69 10763 #endif
jpayne@69 10764 ) {
jpayne@69 10765 #if !CYTHON_METH_FASTCALL
jpayne@69 10766 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
jpayne@69 10767 #endif
jpayne@69 10768 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@69 10769 PyObject *__pyx_r = 0;
jpayne@69 10770 __Pyx_RefNannyDeclarations
jpayne@69 10771 __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
jpayne@69 10772 #if !CYTHON_METH_FASTCALL
jpayne@69 10773 #if CYTHON_ASSUME_SAFE_MACROS
jpayne@69 10774 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
jpayne@69 10775 #else
jpayne@69 10776 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
jpayne@69 10777 #endif
jpayne@69 10778 #endif
jpayne@69 10779 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
jpayne@69 10780 if (unlikely(__pyx_nargs > 0)) {
jpayne@69 10781 __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL;}
jpayne@69 10782 if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__reduce_cython__", 0))) return NULL;
jpayne@69 10783 __pyx_r = __pyx_pf_5pysam_9libcfaidx_10FastqProxy_6__reduce_cython__(((struct __pyx_obj_5pysam_9libcfaidx_FastqProxy *)__pyx_v_self));
jpayne@69 10784
jpayne@69 10785 /* function exit code */
jpayne@69 10786 __Pyx_RefNannyFinishContext();
jpayne@69 10787 return __pyx_r;
jpayne@69 10788 }
jpayne@69 10789
jpayne@69 10790 static PyObject *__pyx_pf_5pysam_9libcfaidx_10FastqProxy_6__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5pysam_9libcfaidx_FastqProxy *__pyx_v_self) {
jpayne@69 10791 PyObject *__pyx_r = NULL;
jpayne@69 10792 __Pyx_TraceDeclarations
jpayne@69 10793 __Pyx_RefNannyDeclarations
jpayne@69 10794 int __pyx_lineno = 0;
jpayne@69 10795 const char *__pyx_filename = NULL;
jpayne@69 10796 int __pyx_clineno = 0;
jpayne@69 10797 __Pyx_TraceFrameInit(__pyx_codeobj__21)
jpayne@69 10798 __Pyx_RefNannySetupContext("__reduce_cython__", 1);
jpayne@69 10799 __Pyx_TraceCall("__reduce_cython__", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));
jpayne@69 10800
jpayne@69 10801 /* "(tree fragment)":2
jpayne@69 10802 * def __reduce_cython__(self):
jpayne@69 10803 * raise TypeError, "self._delegate cannot be converted to a Python object for pickling" # <<<<<<<<<<<<<<
jpayne@69 10804 * def __setstate_cython__(self, __pyx_state):
jpayne@69 10805 * raise TypeError, "self._delegate cannot be converted to a Python object for pickling"
jpayne@69 10806 */
jpayne@69 10807 __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_self__delegate_cannot_be_convert, 0, 0);
jpayne@69 10808 __PYX_ERR(1, 2, __pyx_L1_error)
jpayne@69 10809
jpayne@69 10810 /* "(tree fragment)":1
jpayne@69 10811 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
jpayne@69 10812 * raise TypeError, "self._delegate cannot be converted to a Python object for pickling"
jpayne@69 10813 * def __setstate_cython__(self, __pyx_state):
jpayne@69 10814 */
jpayne@69 10815
jpayne@69 10816 /* function exit code */
jpayne@69 10817 __pyx_L1_error:;
jpayne@69 10818 __Pyx_AddTraceback("pysam.libcfaidx.FastqProxy.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 10819 __pyx_r = NULL;
jpayne@69 10820 __Pyx_XGIVEREF(__pyx_r);
jpayne@69 10821 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@69 10822 __Pyx_RefNannyFinishContext();
jpayne@69 10823 return __pyx_r;
jpayne@69 10824 }
jpayne@69 10825
jpayne@69 10826 /* "(tree fragment)":3
jpayne@69 10827 * def __reduce_cython__(self):
jpayne@69 10828 * raise TypeError, "self._delegate cannot be converted to a Python object for pickling"
jpayne@69 10829 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
jpayne@69 10830 * raise TypeError, "self._delegate cannot be converted to a Python object for pickling"
jpayne@69 10831 */
jpayne@69 10832
jpayne@69 10833 /* Python wrapper */
jpayne@69 10834 static PyObject *__pyx_pw_5pysam_9libcfaidx_10FastqProxy_9__setstate_cython__(PyObject *__pyx_v_self,
jpayne@69 10835 #if CYTHON_METH_FASTCALL
jpayne@69 10836 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@69 10837 #else
jpayne@69 10838 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@69 10839 #endif
jpayne@69 10840 ); /*proto*/
jpayne@69 10841 PyDoc_STRVAR(__pyx_doc_5pysam_9libcfaidx_10FastqProxy_8__setstate_cython__, "FastqProxy.__setstate_cython__(self, __pyx_state)");
jpayne@69 10842 static PyMethodDef __pyx_mdef_5pysam_9libcfaidx_10FastqProxy_9__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_9libcfaidx_10FastqProxy_9__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_9libcfaidx_10FastqProxy_8__setstate_cython__};
jpayne@69 10843 static PyObject *__pyx_pw_5pysam_9libcfaidx_10FastqProxy_9__setstate_cython__(PyObject *__pyx_v_self,
jpayne@69 10844 #if CYTHON_METH_FASTCALL
jpayne@69 10845 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@69 10846 #else
jpayne@69 10847 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@69 10848 #endif
jpayne@69 10849 ) {
jpayne@69 10850 CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0;
jpayne@69 10851 #if !CYTHON_METH_FASTCALL
jpayne@69 10852 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
jpayne@69 10853 #endif
jpayne@69 10854 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@69 10855 PyObject* values[1] = {0};
jpayne@69 10856 int __pyx_lineno = 0;
jpayne@69 10857 const char *__pyx_filename = NULL;
jpayne@69 10858 int __pyx_clineno = 0;
jpayne@69 10859 PyObject *__pyx_r = 0;
jpayne@69 10860 __Pyx_RefNannyDeclarations
jpayne@69 10861 __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
jpayne@69 10862 #if !CYTHON_METH_FASTCALL
jpayne@69 10863 #if CYTHON_ASSUME_SAFE_MACROS
jpayne@69 10864 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
jpayne@69 10865 #else
jpayne@69 10866 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
jpayne@69 10867 #endif
jpayne@69 10868 #endif
jpayne@69 10869 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
jpayne@69 10870 {
jpayne@69 10871 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0};
jpayne@69 10872 if (__pyx_kwds) {
jpayne@69 10873 Py_ssize_t kw_args;
jpayne@69 10874 switch (__pyx_nargs) {
jpayne@69 10875 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
jpayne@69 10876 CYTHON_FALLTHROUGH;
jpayne@69 10877 case 0: break;
jpayne@69 10878 default: goto __pyx_L5_argtuple_error;
jpayne@69 10879 }
jpayne@69 10880 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
jpayne@69 10881 switch (__pyx_nargs) {
jpayne@69 10882 case 0:
jpayne@69 10883 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) {
jpayne@69 10884 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
jpayne@69 10885 kw_args--;
jpayne@69 10886 }
jpayne@69 10887 else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 3, __pyx_L3_error)
jpayne@69 10888 else goto __pyx_L5_argtuple_error;
jpayne@69 10889 }
jpayne@69 10890 if (unlikely(kw_args > 0)) {
jpayne@69 10891 const Py_ssize_t kwd_pos_args = __pyx_nargs;
jpayne@69 10892 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__setstate_cython__") < 0)) __PYX_ERR(1, 3, __pyx_L3_error)
jpayne@69 10893 }
jpayne@69 10894 } else if (unlikely(__pyx_nargs != 1)) {
jpayne@69 10895 goto __pyx_L5_argtuple_error;
jpayne@69 10896 } else {
jpayne@69 10897 values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
jpayne@69 10898 }
jpayne@69 10899 __pyx_v___pyx_state = values[0];
jpayne@69 10900 }
jpayne@69 10901 goto __pyx_L6_skip;
jpayne@69 10902 __pyx_L5_argtuple_error:;
jpayne@69 10903 __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 3, __pyx_L3_error)
jpayne@69 10904 __pyx_L6_skip:;
jpayne@69 10905 goto __pyx_L4_argument_unpacking_done;
jpayne@69 10906 __pyx_L3_error:;
jpayne@69 10907 {
jpayne@69 10908 Py_ssize_t __pyx_temp;
jpayne@69 10909 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
jpayne@69 10910 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
jpayne@69 10911 }
jpayne@69 10912 }
jpayne@69 10913 __Pyx_AddTraceback("pysam.libcfaidx.FastqProxy.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 10914 __Pyx_RefNannyFinishContext();
jpayne@69 10915 return NULL;
jpayne@69 10916 __pyx_L4_argument_unpacking_done:;
jpayne@69 10917 __pyx_r = __pyx_pf_5pysam_9libcfaidx_10FastqProxy_8__setstate_cython__(((struct __pyx_obj_5pysam_9libcfaidx_FastqProxy *)__pyx_v_self), __pyx_v___pyx_state);
jpayne@69 10918
jpayne@69 10919 /* function exit code */
jpayne@69 10920 {
jpayne@69 10921 Py_ssize_t __pyx_temp;
jpayne@69 10922 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
jpayne@69 10923 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
jpayne@69 10924 }
jpayne@69 10925 }
jpayne@69 10926 __Pyx_RefNannyFinishContext();
jpayne@69 10927 return __pyx_r;
jpayne@69 10928 }
jpayne@69 10929
jpayne@69 10930 static PyObject *__pyx_pf_5pysam_9libcfaidx_10FastqProxy_8__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_5pysam_9libcfaidx_FastqProxy *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
jpayne@69 10931 PyObject *__pyx_r = NULL;
jpayne@69 10932 __Pyx_TraceDeclarations
jpayne@69 10933 __Pyx_RefNannyDeclarations
jpayne@69 10934 int __pyx_lineno = 0;
jpayne@69 10935 const char *__pyx_filename = NULL;
jpayne@69 10936 int __pyx_clineno = 0;
jpayne@69 10937 __Pyx_TraceFrameInit(__pyx_codeobj__22)
jpayne@69 10938 __Pyx_RefNannySetupContext("__setstate_cython__", 1);
jpayne@69 10939 __Pyx_TraceCall("__setstate_cython__", __pyx_f[1], 3, 0, __PYX_ERR(1, 3, __pyx_L1_error));
jpayne@69 10940
jpayne@69 10941 /* "(tree fragment)":4
jpayne@69 10942 * raise TypeError, "self._delegate cannot be converted to a Python object for pickling"
jpayne@69 10943 * def __setstate_cython__(self, __pyx_state):
jpayne@69 10944 * raise TypeError, "self._delegate cannot be converted to a Python object for pickling" # <<<<<<<<<<<<<<
jpayne@69 10945 */
jpayne@69 10946 __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_self__delegate_cannot_be_convert, 0, 0);
jpayne@69 10947 __PYX_ERR(1, 4, __pyx_L1_error)
jpayne@69 10948
jpayne@69 10949 /* "(tree fragment)":3
jpayne@69 10950 * def __reduce_cython__(self):
jpayne@69 10951 * raise TypeError, "self._delegate cannot be converted to a Python object for pickling"
jpayne@69 10952 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
jpayne@69 10953 * raise TypeError, "self._delegate cannot be converted to a Python object for pickling"
jpayne@69 10954 */
jpayne@69 10955
jpayne@69 10956 /* function exit code */
jpayne@69 10957 __pyx_L1_error:;
jpayne@69 10958 __Pyx_AddTraceback("pysam.libcfaidx.FastqProxy.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 10959 __pyx_r = NULL;
jpayne@69 10960 __Pyx_XGIVEREF(__pyx_r);
jpayne@69 10961 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@69 10962 __Pyx_RefNannyFinishContext();
jpayne@69 10963 return __pyx_r;
jpayne@69 10964 }
jpayne@69 10965
jpayne@69 10966 /* "pysam/libcfaidx.pyx":418
jpayne@69 10967 *
jpayne@69 10968 * """
jpayne@69 10969 * def __init__(self, # <<<<<<<<<<<<<<
jpayne@69 10970 * name=None,
jpayne@69 10971 * comment=None,
jpayne@69 10972 */
jpayne@69 10973
jpayne@69 10974 /* Python wrapper */
jpayne@69 10975 static int __pyx_pw_5pysam_9libcfaidx_11FastxRecord_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
jpayne@69 10976 static int __pyx_pw_5pysam_9libcfaidx_11FastxRecord_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
jpayne@69 10977 PyObject *__pyx_v_name = 0;
jpayne@69 10978 PyObject *__pyx_v_comment = 0;
jpayne@69 10979 PyObject *__pyx_v_sequence = 0;
jpayne@69 10980 PyObject *__pyx_v_quality = 0;
jpayne@69 10981 struct __pyx_obj_5pysam_9libcfaidx_FastqProxy *__pyx_v_proxy = 0;
jpayne@69 10982 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
jpayne@69 10983 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@69 10984 PyObject* values[5] = {0,0,0,0,0};
jpayne@69 10985 int __pyx_lineno = 0;
jpayne@69 10986 const char *__pyx_filename = NULL;
jpayne@69 10987 int __pyx_clineno = 0;
jpayne@69 10988 int __pyx_r;
jpayne@69 10989 __Pyx_RefNannyDeclarations
jpayne@69 10990 __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
jpayne@69 10991 #if CYTHON_ASSUME_SAFE_MACROS
jpayne@69 10992 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
jpayne@69 10993 #else
jpayne@69 10994 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
jpayne@69 10995 #endif
jpayne@69 10996 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
jpayne@69 10997 {
jpayne@69 10998 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_name,&__pyx_n_s_comment,&__pyx_n_s_sequence,&__pyx_n_s_quality,&__pyx_n_s_proxy,0};
jpayne@69 10999
jpayne@69 11000 /* "pysam/libcfaidx.pyx":419
jpayne@69 11001 * """
jpayne@69 11002 * def __init__(self,
jpayne@69 11003 * name=None, # <<<<<<<<<<<<<<
jpayne@69 11004 * comment=None,
jpayne@69 11005 * sequence=None,
jpayne@69 11006 */
jpayne@69 11007 values[0] = __Pyx_Arg_NewRef_VARARGS(((PyObject *)Py_None));
jpayne@69 11008
jpayne@69 11009 /* "pysam/libcfaidx.pyx":420
jpayne@69 11010 * def __init__(self,
jpayne@69 11011 * name=None,
jpayne@69 11012 * comment=None, # <<<<<<<<<<<<<<
jpayne@69 11013 * sequence=None,
jpayne@69 11014 * quality=None,
jpayne@69 11015 */
jpayne@69 11016 values[1] = __Pyx_Arg_NewRef_VARARGS(((PyObject *)Py_None));
jpayne@69 11017
jpayne@69 11018 /* "pysam/libcfaidx.pyx":421
jpayne@69 11019 * name=None,
jpayne@69 11020 * comment=None,
jpayne@69 11021 * sequence=None, # <<<<<<<<<<<<<<
jpayne@69 11022 * quality=None,
jpayne@69 11023 * FastqProxy proxy=None):
jpayne@69 11024 */
jpayne@69 11025 values[2] = __Pyx_Arg_NewRef_VARARGS(((PyObject *)Py_None));
jpayne@69 11026
jpayne@69 11027 /* "pysam/libcfaidx.pyx":422
jpayne@69 11028 * comment=None,
jpayne@69 11029 * sequence=None,
jpayne@69 11030 * quality=None, # <<<<<<<<<<<<<<
jpayne@69 11031 * FastqProxy proxy=None):
jpayne@69 11032 * if proxy is not None:
jpayne@69 11033 */
jpayne@69 11034 values[3] = __Pyx_Arg_NewRef_VARARGS(((PyObject *)Py_None));
jpayne@69 11035
jpayne@69 11036 /* "pysam/libcfaidx.pyx":423
jpayne@69 11037 * sequence=None,
jpayne@69 11038 * quality=None,
jpayne@69 11039 * FastqProxy proxy=None): # <<<<<<<<<<<<<<
jpayne@69 11040 * if proxy is not None:
jpayne@69 11041 * self.comment = proxy.comment
jpayne@69 11042 */
jpayne@69 11043 values[4] = __Pyx_Arg_NewRef_VARARGS((PyObject *)((struct __pyx_obj_5pysam_9libcfaidx_FastqProxy *)Py_None));
jpayne@69 11044 if (__pyx_kwds) {
jpayne@69 11045 Py_ssize_t kw_args;
jpayne@69 11046 switch (__pyx_nargs) {
jpayne@69 11047 case 5: values[4] = __Pyx_Arg_VARARGS(__pyx_args, 4);
jpayne@69 11048 CYTHON_FALLTHROUGH;
jpayne@69 11049 case 4: values[3] = __Pyx_Arg_VARARGS(__pyx_args, 3);
jpayne@69 11050 CYTHON_FALLTHROUGH;
jpayne@69 11051 case 3: values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2);
jpayne@69 11052 CYTHON_FALLTHROUGH;
jpayne@69 11053 case 2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
jpayne@69 11054 CYTHON_FALLTHROUGH;
jpayne@69 11055 case 1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
jpayne@69 11056 CYTHON_FALLTHROUGH;
jpayne@69 11057 case 0: break;
jpayne@69 11058 default: goto __pyx_L5_argtuple_error;
jpayne@69 11059 }
jpayne@69 11060 kw_args = __Pyx_NumKwargs_VARARGS(__pyx_kwds);
jpayne@69 11061 switch (__pyx_nargs) {
jpayne@69 11062 case 0:
jpayne@69 11063 if (kw_args > 0) {
jpayne@69 11064 PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_name);
jpayne@69 11065 if (value) { values[0] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; }
jpayne@69 11066 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 418, __pyx_L3_error)
jpayne@69 11067 }
jpayne@69 11068 CYTHON_FALLTHROUGH;
jpayne@69 11069 case 1:
jpayne@69 11070 if (kw_args > 0) {
jpayne@69 11071 PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_comment);
jpayne@69 11072 if (value) { values[1] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; }
jpayne@69 11073 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 418, __pyx_L3_error)
jpayne@69 11074 }
jpayne@69 11075 CYTHON_FALLTHROUGH;
jpayne@69 11076 case 2:
jpayne@69 11077 if (kw_args > 0) {
jpayne@69 11078 PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_sequence);
jpayne@69 11079 if (value) { values[2] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; }
jpayne@69 11080 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 418, __pyx_L3_error)
jpayne@69 11081 }
jpayne@69 11082 CYTHON_FALLTHROUGH;
jpayne@69 11083 case 3:
jpayne@69 11084 if (kw_args > 0) {
jpayne@69 11085 PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_quality);
jpayne@69 11086 if (value) { values[3] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; }
jpayne@69 11087 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 418, __pyx_L3_error)
jpayne@69 11088 }
jpayne@69 11089 CYTHON_FALLTHROUGH;
jpayne@69 11090 case 4:
jpayne@69 11091 if (kw_args > 0) {
jpayne@69 11092 PyObject* value = __Pyx_GetKwValue_VARARGS(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_proxy);
jpayne@69 11093 if (value) { values[4] = __Pyx_Arg_NewRef_VARARGS(value); kw_args--; }
jpayne@69 11094 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 418, __pyx_L3_error)
jpayne@69 11095 }
jpayne@69 11096 }
jpayne@69 11097 if (unlikely(kw_args > 0)) {
jpayne@69 11098 const Py_ssize_t kwd_pos_args = __pyx_nargs;
jpayne@69 11099 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__init__") < 0)) __PYX_ERR(0, 418, __pyx_L3_error)
jpayne@69 11100 }
jpayne@69 11101 } else {
jpayne@69 11102 switch (__pyx_nargs) {
jpayne@69 11103 case 5: values[4] = __Pyx_Arg_VARARGS(__pyx_args, 4);
jpayne@69 11104 CYTHON_FALLTHROUGH;
jpayne@69 11105 case 4: values[3] = __Pyx_Arg_VARARGS(__pyx_args, 3);
jpayne@69 11106 CYTHON_FALLTHROUGH;
jpayne@69 11107 case 3: values[2] = __Pyx_Arg_VARARGS(__pyx_args, 2);
jpayne@69 11108 CYTHON_FALLTHROUGH;
jpayne@69 11109 case 2: values[1] = __Pyx_Arg_VARARGS(__pyx_args, 1);
jpayne@69 11110 CYTHON_FALLTHROUGH;
jpayne@69 11111 case 1: values[0] = __Pyx_Arg_VARARGS(__pyx_args, 0);
jpayne@69 11112 CYTHON_FALLTHROUGH;
jpayne@69 11113 case 0: break;
jpayne@69 11114 default: goto __pyx_L5_argtuple_error;
jpayne@69 11115 }
jpayne@69 11116 }
jpayne@69 11117 __pyx_v_name = values[0];
jpayne@69 11118 __pyx_v_comment = values[1];
jpayne@69 11119 __pyx_v_sequence = values[2];
jpayne@69 11120 __pyx_v_quality = values[3];
jpayne@69 11121 __pyx_v_proxy = ((struct __pyx_obj_5pysam_9libcfaidx_FastqProxy *)values[4]);
jpayne@69 11122 }
jpayne@69 11123 goto __pyx_L6_skip;
jpayne@69 11124 __pyx_L5_argtuple_error:;
jpayne@69 11125 __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 5, __pyx_nargs); __PYX_ERR(0, 418, __pyx_L3_error)
jpayne@69 11126 __pyx_L6_skip:;
jpayne@69 11127 goto __pyx_L4_argument_unpacking_done;
jpayne@69 11128 __pyx_L3_error:;
jpayne@69 11129 {
jpayne@69 11130 Py_ssize_t __pyx_temp;
jpayne@69 11131 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
jpayne@69 11132 __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]);
jpayne@69 11133 }
jpayne@69 11134 }
jpayne@69 11135 __Pyx_AddTraceback("pysam.libcfaidx.FastxRecord.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 11136 __Pyx_RefNannyFinishContext();
jpayne@69 11137 return -1;
jpayne@69 11138 __pyx_L4_argument_unpacking_done:;
jpayne@69 11139 if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_proxy), __pyx_ptype_5pysam_9libcfaidx_FastqProxy, 1, "proxy", 0))) __PYX_ERR(0, 423, __pyx_L1_error)
jpayne@69 11140 __pyx_r = __pyx_pf_5pysam_9libcfaidx_11FastxRecord___init__(((struct __pyx_obj_5pysam_9libcfaidx_FastxRecord *)__pyx_v_self), __pyx_v_name, __pyx_v_comment, __pyx_v_sequence, __pyx_v_quality, __pyx_v_proxy);
jpayne@69 11141
jpayne@69 11142 /* "pysam/libcfaidx.pyx":418
jpayne@69 11143 *
jpayne@69 11144 * """
jpayne@69 11145 * def __init__(self, # <<<<<<<<<<<<<<
jpayne@69 11146 * name=None,
jpayne@69 11147 * comment=None,
jpayne@69 11148 */
jpayne@69 11149
jpayne@69 11150 /* function exit code */
jpayne@69 11151 goto __pyx_L0;
jpayne@69 11152 __pyx_L1_error:;
jpayne@69 11153 __pyx_r = -1;
jpayne@69 11154 __pyx_L0:;
jpayne@69 11155 {
jpayne@69 11156 Py_ssize_t __pyx_temp;
jpayne@69 11157 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
jpayne@69 11158 __Pyx_Arg_XDECREF_VARARGS(values[__pyx_temp]);
jpayne@69 11159 }
jpayne@69 11160 }
jpayne@69 11161 __Pyx_RefNannyFinishContext();
jpayne@69 11162 return __pyx_r;
jpayne@69 11163 }
jpayne@69 11164
jpayne@69 11165 static int __pyx_pf_5pysam_9libcfaidx_11FastxRecord___init__(struct __pyx_obj_5pysam_9libcfaidx_FastxRecord *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_comment, PyObject *__pyx_v_sequence, PyObject *__pyx_v_quality, struct __pyx_obj_5pysam_9libcfaidx_FastqProxy *__pyx_v_proxy) {
jpayne@69 11166 int __pyx_r;
jpayne@69 11167 __Pyx_TraceDeclarations
jpayne@69 11168 __Pyx_RefNannyDeclarations
jpayne@69 11169 int __pyx_t_1;
jpayne@69 11170 PyObject *__pyx_t_2 = NULL;
jpayne@69 11171 int __pyx_lineno = 0;
jpayne@69 11172 const char *__pyx_filename = NULL;
jpayne@69 11173 int __pyx_clineno = 0;
jpayne@69 11174 __Pyx_RefNannySetupContext("__init__", 1);
jpayne@69 11175 __Pyx_TraceCall("__init__", __pyx_f[0], 418, 0, __PYX_ERR(0, 418, __pyx_L1_error));
jpayne@69 11176
jpayne@69 11177 /* "pysam/libcfaidx.pyx":424
jpayne@69 11178 * quality=None,
jpayne@69 11179 * FastqProxy proxy=None):
jpayne@69 11180 * if proxy is not None: # <<<<<<<<<<<<<<
jpayne@69 11181 * self.comment = proxy.comment
jpayne@69 11182 * self.quality = proxy.quality
jpayne@69 11183 */
jpayne@69 11184 __pyx_t_1 = (((PyObject *)__pyx_v_proxy) != Py_None);
jpayne@69 11185 if (__pyx_t_1) {
jpayne@69 11186
jpayne@69 11187 /* "pysam/libcfaidx.pyx":425
jpayne@69 11188 * FastqProxy proxy=None):
jpayne@69 11189 * if proxy is not None:
jpayne@69 11190 * self.comment = proxy.comment # <<<<<<<<<<<<<<
jpayne@69 11191 * self.quality = proxy.quality
jpayne@69 11192 * self.sequence = proxy.sequence
jpayne@69 11193 */
jpayne@69 11194 __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_proxy), __pyx_n_s_comment); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 425, __pyx_L1_error)
jpayne@69 11195 __Pyx_GOTREF(__pyx_t_2);
jpayne@69 11196 if (!(likely(PyUnicode_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None) || __Pyx_RaiseUnexpectedTypeError("unicode", __pyx_t_2))) __PYX_ERR(0, 425, __pyx_L1_error)
jpayne@69 11197 __Pyx_GIVEREF(__pyx_t_2);
jpayne@69 11198 __Pyx_GOTREF(__pyx_v_self->comment);
jpayne@69 11199 __Pyx_DECREF(__pyx_v_self->comment);
jpayne@69 11200 __pyx_v_self->comment = ((PyObject*)__pyx_t_2);
jpayne@69 11201 __pyx_t_2 = 0;
jpayne@69 11202
jpayne@69 11203 /* "pysam/libcfaidx.pyx":426
jpayne@69 11204 * if proxy is not None:
jpayne@69 11205 * self.comment = proxy.comment
jpayne@69 11206 * self.quality = proxy.quality # <<<<<<<<<<<<<<
jpayne@69 11207 * self.sequence = proxy.sequence
jpayne@69 11208 * self.name = proxy.name
jpayne@69 11209 */
jpayne@69 11210 __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_proxy), __pyx_n_s_quality); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 426, __pyx_L1_error)
jpayne@69 11211 __Pyx_GOTREF(__pyx_t_2);
jpayne@69 11212 if (!(likely(PyUnicode_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None) || __Pyx_RaiseUnexpectedTypeError("unicode", __pyx_t_2))) __PYX_ERR(0, 426, __pyx_L1_error)
jpayne@69 11213 __Pyx_GIVEREF(__pyx_t_2);
jpayne@69 11214 __Pyx_GOTREF(__pyx_v_self->quality);
jpayne@69 11215 __Pyx_DECREF(__pyx_v_self->quality);
jpayne@69 11216 __pyx_v_self->quality = ((PyObject*)__pyx_t_2);
jpayne@69 11217 __pyx_t_2 = 0;
jpayne@69 11218
jpayne@69 11219 /* "pysam/libcfaidx.pyx":427
jpayne@69 11220 * self.comment = proxy.comment
jpayne@69 11221 * self.quality = proxy.quality
jpayne@69 11222 * self.sequence = proxy.sequence # <<<<<<<<<<<<<<
jpayne@69 11223 * self.name = proxy.name
jpayne@69 11224 * else:
jpayne@69 11225 */
jpayne@69 11226 __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_proxy), __pyx_n_s_sequence); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 427, __pyx_L1_error)
jpayne@69 11227 __Pyx_GOTREF(__pyx_t_2);
jpayne@69 11228 if (!(likely(PyUnicode_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None) || __Pyx_RaiseUnexpectedTypeError("unicode", __pyx_t_2))) __PYX_ERR(0, 427, __pyx_L1_error)
jpayne@69 11229 __Pyx_GIVEREF(__pyx_t_2);
jpayne@69 11230 __Pyx_GOTREF(__pyx_v_self->sequence);
jpayne@69 11231 __Pyx_DECREF(__pyx_v_self->sequence);
jpayne@69 11232 __pyx_v_self->sequence = ((PyObject*)__pyx_t_2);
jpayne@69 11233 __pyx_t_2 = 0;
jpayne@69 11234
jpayne@69 11235 /* "pysam/libcfaidx.pyx":428
jpayne@69 11236 * self.quality = proxy.quality
jpayne@69 11237 * self.sequence = proxy.sequence
jpayne@69 11238 * self.name = proxy.name # <<<<<<<<<<<<<<
jpayne@69 11239 * else:
jpayne@69 11240 * self.comment = comment
jpayne@69 11241 */
jpayne@69 11242 __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_proxy), __pyx_n_s_name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 428, __pyx_L1_error)
jpayne@69 11243 __Pyx_GOTREF(__pyx_t_2);
jpayne@69 11244 if (!(likely(PyUnicode_CheckExact(__pyx_t_2))||((__pyx_t_2) == Py_None) || __Pyx_RaiseUnexpectedTypeError("unicode", __pyx_t_2))) __PYX_ERR(0, 428, __pyx_L1_error)
jpayne@69 11245 __Pyx_GIVEREF(__pyx_t_2);
jpayne@69 11246 __Pyx_GOTREF(__pyx_v_self->name);
jpayne@69 11247 __Pyx_DECREF(__pyx_v_self->name);
jpayne@69 11248 __pyx_v_self->name = ((PyObject*)__pyx_t_2);
jpayne@69 11249 __pyx_t_2 = 0;
jpayne@69 11250
jpayne@69 11251 /* "pysam/libcfaidx.pyx":424
jpayne@69 11252 * quality=None,
jpayne@69 11253 * FastqProxy proxy=None):
jpayne@69 11254 * if proxy is not None: # <<<<<<<<<<<<<<
jpayne@69 11255 * self.comment = proxy.comment
jpayne@69 11256 * self.quality = proxy.quality
jpayne@69 11257 */
jpayne@69 11258 goto __pyx_L3;
jpayne@69 11259 }
jpayne@69 11260
jpayne@69 11261 /* "pysam/libcfaidx.pyx":430
jpayne@69 11262 * self.name = proxy.name
jpayne@69 11263 * else:
jpayne@69 11264 * self.comment = comment # <<<<<<<<<<<<<<
jpayne@69 11265 * self.quality = quality
jpayne@69 11266 * self.sequence = sequence
jpayne@69 11267 */
jpayne@69 11268 /*else*/ {
jpayne@69 11269 if (!(likely(PyUnicode_CheckExact(__pyx_v_comment))||((__pyx_v_comment) == Py_None) || __Pyx_RaiseUnexpectedTypeError("unicode", __pyx_v_comment))) __PYX_ERR(0, 430, __pyx_L1_error)
jpayne@69 11270 __pyx_t_2 = __pyx_v_comment;
jpayne@69 11271 __Pyx_INCREF(__pyx_t_2);
jpayne@69 11272 __Pyx_GIVEREF(__pyx_t_2);
jpayne@69 11273 __Pyx_GOTREF(__pyx_v_self->comment);
jpayne@69 11274 __Pyx_DECREF(__pyx_v_self->comment);
jpayne@69 11275 __pyx_v_self->comment = ((PyObject*)__pyx_t_2);
jpayne@69 11276 __pyx_t_2 = 0;
jpayne@69 11277
jpayne@69 11278 /* "pysam/libcfaidx.pyx":431
jpayne@69 11279 * else:
jpayne@69 11280 * self.comment = comment
jpayne@69 11281 * self.quality = quality # <<<<<<<<<<<<<<
jpayne@69 11282 * self.sequence = sequence
jpayne@69 11283 * self.name = name
jpayne@69 11284 */
jpayne@69 11285 if (!(likely(PyUnicode_CheckExact(__pyx_v_quality))||((__pyx_v_quality) == Py_None) || __Pyx_RaiseUnexpectedTypeError("unicode", __pyx_v_quality))) __PYX_ERR(0, 431, __pyx_L1_error)
jpayne@69 11286 __pyx_t_2 = __pyx_v_quality;
jpayne@69 11287 __Pyx_INCREF(__pyx_t_2);
jpayne@69 11288 __Pyx_GIVEREF(__pyx_t_2);
jpayne@69 11289 __Pyx_GOTREF(__pyx_v_self->quality);
jpayne@69 11290 __Pyx_DECREF(__pyx_v_self->quality);
jpayne@69 11291 __pyx_v_self->quality = ((PyObject*)__pyx_t_2);
jpayne@69 11292 __pyx_t_2 = 0;
jpayne@69 11293
jpayne@69 11294 /* "pysam/libcfaidx.pyx":432
jpayne@69 11295 * self.comment = comment
jpayne@69 11296 * self.quality = quality
jpayne@69 11297 * self.sequence = sequence # <<<<<<<<<<<<<<
jpayne@69 11298 * self.name = name
jpayne@69 11299 *
jpayne@69 11300 */
jpayne@69 11301 if (!(likely(PyUnicode_CheckExact(__pyx_v_sequence))||((__pyx_v_sequence) == Py_None) || __Pyx_RaiseUnexpectedTypeError("unicode", __pyx_v_sequence))) __PYX_ERR(0, 432, __pyx_L1_error)
jpayne@69 11302 __pyx_t_2 = __pyx_v_sequence;
jpayne@69 11303 __Pyx_INCREF(__pyx_t_2);
jpayne@69 11304 __Pyx_GIVEREF(__pyx_t_2);
jpayne@69 11305 __Pyx_GOTREF(__pyx_v_self->sequence);
jpayne@69 11306 __Pyx_DECREF(__pyx_v_self->sequence);
jpayne@69 11307 __pyx_v_self->sequence = ((PyObject*)__pyx_t_2);
jpayne@69 11308 __pyx_t_2 = 0;
jpayne@69 11309
jpayne@69 11310 /* "pysam/libcfaidx.pyx":433
jpayne@69 11311 * self.quality = quality
jpayne@69 11312 * self.sequence = sequence
jpayne@69 11313 * self.name = name # <<<<<<<<<<<<<<
jpayne@69 11314 *
jpayne@69 11315 * def __copy__(self):
jpayne@69 11316 */
jpayne@69 11317 if (!(likely(PyUnicode_CheckExact(__pyx_v_name))||((__pyx_v_name) == Py_None) || __Pyx_RaiseUnexpectedTypeError("unicode", __pyx_v_name))) __PYX_ERR(0, 433, __pyx_L1_error)
jpayne@69 11318 __pyx_t_2 = __pyx_v_name;
jpayne@69 11319 __Pyx_INCREF(__pyx_t_2);
jpayne@69 11320 __Pyx_GIVEREF(__pyx_t_2);
jpayne@69 11321 __Pyx_GOTREF(__pyx_v_self->name);
jpayne@69 11322 __Pyx_DECREF(__pyx_v_self->name);
jpayne@69 11323 __pyx_v_self->name = ((PyObject*)__pyx_t_2);
jpayne@69 11324 __pyx_t_2 = 0;
jpayne@69 11325 }
jpayne@69 11326 __pyx_L3:;
jpayne@69 11327
jpayne@69 11328 /* "pysam/libcfaidx.pyx":418
jpayne@69 11329 *
jpayne@69 11330 * """
jpayne@69 11331 * def __init__(self, # <<<<<<<<<<<<<<
jpayne@69 11332 * name=None,
jpayne@69 11333 * comment=None,
jpayne@69 11334 */
jpayne@69 11335
jpayne@69 11336 /* function exit code */
jpayne@69 11337 __pyx_r = 0;
jpayne@69 11338 goto __pyx_L0;
jpayne@69 11339 __pyx_L1_error:;
jpayne@69 11340 __Pyx_XDECREF(__pyx_t_2);
jpayne@69 11341 __Pyx_AddTraceback("pysam.libcfaidx.FastxRecord.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 11342 __pyx_r = -1;
jpayne@69 11343 __pyx_L0:;
jpayne@69 11344 __Pyx_TraceReturn(Py_None, 0);
jpayne@69 11345 __Pyx_RefNannyFinishContext();
jpayne@69 11346 return __pyx_r;
jpayne@69 11347 }
jpayne@69 11348
jpayne@69 11349 /* "pysam/libcfaidx.pyx":435
jpayne@69 11350 * self.name = name
jpayne@69 11351 *
jpayne@69 11352 * def __copy__(self): # <<<<<<<<<<<<<<
jpayne@69 11353 * return FastxRecord(self.name, self.comment, self.sequence, self.quality)
jpayne@69 11354 *
jpayne@69 11355 */
jpayne@69 11356
jpayne@69 11357 /* Python wrapper */
jpayne@69 11358 static PyObject *__pyx_pw_5pysam_9libcfaidx_11FastxRecord_3__copy__(PyObject *__pyx_v_self,
jpayne@69 11359 #if CYTHON_METH_FASTCALL
jpayne@69 11360 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@69 11361 #else
jpayne@69 11362 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@69 11363 #endif
jpayne@69 11364 ); /*proto*/
jpayne@69 11365 PyDoc_STRVAR(__pyx_doc_5pysam_9libcfaidx_11FastxRecord_2__copy__, "FastxRecord.__copy__(self)");
jpayne@69 11366 static PyMethodDef __pyx_mdef_5pysam_9libcfaidx_11FastxRecord_3__copy__ = {"__copy__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_9libcfaidx_11FastxRecord_3__copy__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_9libcfaidx_11FastxRecord_2__copy__};
jpayne@69 11367 static PyObject *__pyx_pw_5pysam_9libcfaidx_11FastxRecord_3__copy__(PyObject *__pyx_v_self,
jpayne@69 11368 #if CYTHON_METH_FASTCALL
jpayne@69 11369 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@69 11370 #else
jpayne@69 11371 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@69 11372 #endif
jpayne@69 11373 ) {
jpayne@69 11374 #if !CYTHON_METH_FASTCALL
jpayne@69 11375 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
jpayne@69 11376 #endif
jpayne@69 11377 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@69 11378 PyObject *__pyx_r = 0;
jpayne@69 11379 __Pyx_RefNannyDeclarations
jpayne@69 11380 __Pyx_RefNannySetupContext("__copy__ (wrapper)", 0);
jpayne@69 11381 #if !CYTHON_METH_FASTCALL
jpayne@69 11382 #if CYTHON_ASSUME_SAFE_MACROS
jpayne@69 11383 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
jpayne@69 11384 #else
jpayne@69 11385 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
jpayne@69 11386 #endif
jpayne@69 11387 #endif
jpayne@69 11388 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
jpayne@69 11389 if (unlikely(__pyx_nargs > 0)) {
jpayne@69 11390 __Pyx_RaiseArgtupleInvalid("__copy__", 1, 0, 0, __pyx_nargs); return NULL;}
jpayne@69 11391 if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__copy__", 0))) return NULL;
jpayne@69 11392 __pyx_r = __pyx_pf_5pysam_9libcfaidx_11FastxRecord_2__copy__(((struct __pyx_obj_5pysam_9libcfaidx_FastxRecord *)__pyx_v_self));
jpayne@69 11393
jpayne@69 11394 /* function exit code */
jpayne@69 11395 __Pyx_RefNannyFinishContext();
jpayne@69 11396 return __pyx_r;
jpayne@69 11397 }
jpayne@69 11398
jpayne@69 11399 static PyObject *__pyx_pf_5pysam_9libcfaidx_11FastxRecord_2__copy__(struct __pyx_obj_5pysam_9libcfaidx_FastxRecord *__pyx_v_self) {
jpayne@69 11400 PyObject *__pyx_r = NULL;
jpayne@69 11401 __Pyx_TraceDeclarations
jpayne@69 11402 __Pyx_RefNannyDeclarations
jpayne@69 11403 PyObject *__pyx_t_1 = NULL;
jpayne@69 11404 PyObject *__pyx_t_2 = NULL;
jpayne@69 11405 int __pyx_lineno = 0;
jpayne@69 11406 const char *__pyx_filename = NULL;
jpayne@69 11407 int __pyx_clineno = 0;
jpayne@69 11408 __Pyx_TraceFrameInit(__pyx_codeobj__23)
jpayne@69 11409 __Pyx_RefNannySetupContext("__copy__", 1);
jpayne@69 11410 __Pyx_TraceCall("__copy__", __pyx_f[0], 435, 0, __PYX_ERR(0, 435, __pyx_L1_error));
jpayne@69 11411
jpayne@69 11412 /* "pysam/libcfaidx.pyx":436
jpayne@69 11413 *
jpayne@69 11414 * def __copy__(self):
jpayne@69 11415 * return FastxRecord(self.name, self.comment, self.sequence, self.quality) # <<<<<<<<<<<<<<
jpayne@69 11416 *
jpayne@69 11417 * def __deepcopy__(self, memo):
jpayne@69 11418 */
jpayne@69 11419 __Pyx_XDECREF(__pyx_r);
jpayne@69 11420 __pyx_t_1 = PyTuple_New(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 436, __pyx_L1_error)
jpayne@69 11421 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 11422 __Pyx_INCREF(__pyx_v_self->name);
jpayne@69 11423 __Pyx_GIVEREF(__pyx_v_self->name);
jpayne@69 11424 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->name)) __PYX_ERR(0, 436, __pyx_L1_error);
jpayne@69 11425 __Pyx_INCREF(__pyx_v_self->comment);
jpayne@69 11426 __Pyx_GIVEREF(__pyx_v_self->comment);
jpayne@69 11427 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self->comment)) __PYX_ERR(0, 436, __pyx_L1_error);
jpayne@69 11428 __Pyx_INCREF(__pyx_v_self->sequence);
jpayne@69 11429 __Pyx_GIVEREF(__pyx_v_self->sequence);
jpayne@69 11430 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_self->sequence)) __PYX_ERR(0, 436, __pyx_L1_error);
jpayne@69 11431 __Pyx_INCREF(__pyx_v_self->quality);
jpayne@69 11432 __Pyx_GIVEREF(__pyx_v_self->quality);
jpayne@69 11433 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_v_self->quality)) __PYX_ERR(0, 436, __pyx_L1_error);
jpayne@69 11434 __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5pysam_9libcfaidx_FastxRecord), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 436, __pyx_L1_error)
jpayne@69 11435 __Pyx_GOTREF(__pyx_t_2);
jpayne@69 11436 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@69 11437 __pyx_r = __pyx_t_2;
jpayne@69 11438 __pyx_t_2 = 0;
jpayne@69 11439 goto __pyx_L0;
jpayne@69 11440
jpayne@69 11441 /* "pysam/libcfaidx.pyx":435
jpayne@69 11442 * self.name = name
jpayne@69 11443 *
jpayne@69 11444 * def __copy__(self): # <<<<<<<<<<<<<<
jpayne@69 11445 * return FastxRecord(self.name, self.comment, self.sequence, self.quality)
jpayne@69 11446 *
jpayne@69 11447 */
jpayne@69 11448
jpayne@69 11449 /* function exit code */
jpayne@69 11450 __pyx_L1_error:;
jpayne@69 11451 __Pyx_XDECREF(__pyx_t_1);
jpayne@69 11452 __Pyx_XDECREF(__pyx_t_2);
jpayne@69 11453 __Pyx_AddTraceback("pysam.libcfaidx.FastxRecord.__copy__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 11454 __pyx_r = NULL;
jpayne@69 11455 __pyx_L0:;
jpayne@69 11456 __Pyx_XGIVEREF(__pyx_r);
jpayne@69 11457 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@69 11458 __Pyx_RefNannyFinishContext();
jpayne@69 11459 return __pyx_r;
jpayne@69 11460 }
jpayne@69 11461
jpayne@69 11462 /* "pysam/libcfaidx.pyx":438
jpayne@69 11463 * return FastxRecord(self.name, self.comment, self.sequence, self.quality)
jpayne@69 11464 *
jpayne@69 11465 * def __deepcopy__(self, memo): # <<<<<<<<<<<<<<
jpayne@69 11466 * return FastxRecord(self.name, self.comment, self.sequence, self.quality)
jpayne@69 11467 *
jpayne@69 11468 */
jpayne@69 11469
jpayne@69 11470 /* Python wrapper */
jpayne@69 11471 static PyObject *__pyx_pw_5pysam_9libcfaidx_11FastxRecord_5__deepcopy__(PyObject *__pyx_v_self,
jpayne@69 11472 #if CYTHON_METH_FASTCALL
jpayne@69 11473 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@69 11474 #else
jpayne@69 11475 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@69 11476 #endif
jpayne@69 11477 ); /*proto*/
jpayne@69 11478 PyDoc_STRVAR(__pyx_doc_5pysam_9libcfaidx_11FastxRecord_4__deepcopy__, "FastxRecord.__deepcopy__(self, memo)");
jpayne@69 11479 static PyMethodDef __pyx_mdef_5pysam_9libcfaidx_11FastxRecord_5__deepcopy__ = {"__deepcopy__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_9libcfaidx_11FastxRecord_5__deepcopy__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_9libcfaidx_11FastxRecord_4__deepcopy__};
jpayne@69 11480 static PyObject *__pyx_pw_5pysam_9libcfaidx_11FastxRecord_5__deepcopy__(PyObject *__pyx_v_self,
jpayne@69 11481 #if CYTHON_METH_FASTCALL
jpayne@69 11482 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@69 11483 #else
jpayne@69 11484 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@69 11485 #endif
jpayne@69 11486 ) {
jpayne@69 11487 CYTHON_UNUSED PyObject *__pyx_v_memo = 0;
jpayne@69 11488 #if !CYTHON_METH_FASTCALL
jpayne@69 11489 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
jpayne@69 11490 #endif
jpayne@69 11491 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@69 11492 PyObject* values[1] = {0};
jpayne@69 11493 int __pyx_lineno = 0;
jpayne@69 11494 const char *__pyx_filename = NULL;
jpayne@69 11495 int __pyx_clineno = 0;
jpayne@69 11496 PyObject *__pyx_r = 0;
jpayne@69 11497 __Pyx_RefNannyDeclarations
jpayne@69 11498 __Pyx_RefNannySetupContext("__deepcopy__ (wrapper)", 0);
jpayne@69 11499 #if !CYTHON_METH_FASTCALL
jpayne@69 11500 #if CYTHON_ASSUME_SAFE_MACROS
jpayne@69 11501 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
jpayne@69 11502 #else
jpayne@69 11503 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
jpayne@69 11504 #endif
jpayne@69 11505 #endif
jpayne@69 11506 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
jpayne@69 11507 {
jpayne@69 11508 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_memo,0};
jpayne@69 11509 if (__pyx_kwds) {
jpayne@69 11510 Py_ssize_t kw_args;
jpayne@69 11511 switch (__pyx_nargs) {
jpayne@69 11512 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
jpayne@69 11513 CYTHON_FALLTHROUGH;
jpayne@69 11514 case 0: break;
jpayne@69 11515 default: goto __pyx_L5_argtuple_error;
jpayne@69 11516 }
jpayne@69 11517 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
jpayne@69 11518 switch (__pyx_nargs) {
jpayne@69 11519 case 0:
jpayne@69 11520 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_memo)) != 0)) {
jpayne@69 11521 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
jpayne@69 11522 kw_args--;
jpayne@69 11523 }
jpayne@69 11524 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 438, __pyx_L3_error)
jpayne@69 11525 else goto __pyx_L5_argtuple_error;
jpayne@69 11526 }
jpayne@69 11527 if (unlikely(kw_args > 0)) {
jpayne@69 11528 const Py_ssize_t kwd_pos_args = __pyx_nargs;
jpayne@69 11529 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__deepcopy__") < 0)) __PYX_ERR(0, 438, __pyx_L3_error)
jpayne@69 11530 }
jpayne@69 11531 } else if (unlikely(__pyx_nargs != 1)) {
jpayne@69 11532 goto __pyx_L5_argtuple_error;
jpayne@69 11533 } else {
jpayne@69 11534 values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
jpayne@69 11535 }
jpayne@69 11536 __pyx_v_memo = values[0];
jpayne@69 11537 }
jpayne@69 11538 goto __pyx_L6_skip;
jpayne@69 11539 __pyx_L5_argtuple_error:;
jpayne@69 11540 __Pyx_RaiseArgtupleInvalid("__deepcopy__", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 438, __pyx_L3_error)
jpayne@69 11541 __pyx_L6_skip:;
jpayne@69 11542 goto __pyx_L4_argument_unpacking_done;
jpayne@69 11543 __pyx_L3_error:;
jpayne@69 11544 {
jpayne@69 11545 Py_ssize_t __pyx_temp;
jpayne@69 11546 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
jpayne@69 11547 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
jpayne@69 11548 }
jpayne@69 11549 }
jpayne@69 11550 __Pyx_AddTraceback("pysam.libcfaidx.FastxRecord.__deepcopy__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 11551 __Pyx_RefNannyFinishContext();
jpayne@69 11552 return NULL;
jpayne@69 11553 __pyx_L4_argument_unpacking_done:;
jpayne@69 11554 __pyx_r = __pyx_pf_5pysam_9libcfaidx_11FastxRecord_4__deepcopy__(((struct __pyx_obj_5pysam_9libcfaidx_FastxRecord *)__pyx_v_self), __pyx_v_memo);
jpayne@69 11555
jpayne@69 11556 /* function exit code */
jpayne@69 11557 {
jpayne@69 11558 Py_ssize_t __pyx_temp;
jpayne@69 11559 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
jpayne@69 11560 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
jpayne@69 11561 }
jpayne@69 11562 }
jpayne@69 11563 __Pyx_RefNannyFinishContext();
jpayne@69 11564 return __pyx_r;
jpayne@69 11565 }
jpayne@69 11566
jpayne@69 11567 static PyObject *__pyx_pf_5pysam_9libcfaidx_11FastxRecord_4__deepcopy__(struct __pyx_obj_5pysam_9libcfaidx_FastxRecord *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_memo) {
jpayne@69 11568 PyObject *__pyx_r = NULL;
jpayne@69 11569 __Pyx_TraceDeclarations
jpayne@69 11570 __Pyx_RefNannyDeclarations
jpayne@69 11571 PyObject *__pyx_t_1 = NULL;
jpayne@69 11572 PyObject *__pyx_t_2 = NULL;
jpayne@69 11573 int __pyx_lineno = 0;
jpayne@69 11574 const char *__pyx_filename = NULL;
jpayne@69 11575 int __pyx_clineno = 0;
jpayne@69 11576 __Pyx_TraceFrameInit(__pyx_codeobj__24)
jpayne@69 11577 __Pyx_RefNannySetupContext("__deepcopy__", 1);
jpayne@69 11578 __Pyx_TraceCall("__deepcopy__", __pyx_f[0], 438, 0, __PYX_ERR(0, 438, __pyx_L1_error));
jpayne@69 11579
jpayne@69 11580 /* "pysam/libcfaidx.pyx":439
jpayne@69 11581 *
jpayne@69 11582 * def __deepcopy__(self, memo):
jpayne@69 11583 * return FastxRecord(self.name, self.comment, self.sequence, self.quality) # <<<<<<<<<<<<<<
jpayne@69 11584 *
jpayne@69 11585 * cdef cython.str to_string(self):
jpayne@69 11586 */
jpayne@69 11587 __Pyx_XDECREF(__pyx_r);
jpayne@69 11588 __pyx_t_1 = PyTuple_New(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 439, __pyx_L1_error)
jpayne@69 11589 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 11590 __Pyx_INCREF(__pyx_v_self->name);
jpayne@69 11591 __Pyx_GIVEREF(__pyx_v_self->name);
jpayne@69 11592 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->name)) __PYX_ERR(0, 439, __pyx_L1_error);
jpayne@69 11593 __Pyx_INCREF(__pyx_v_self->comment);
jpayne@69 11594 __Pyx_GIVEREF(__pyx_v_self->comment);
jpayne@69 11595 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self->comment)) __PYX_ERR(0, 439, __pyx_L1_error);
jpayne@69 11596 __Pyx_INCREF(__pyx_v_self->sequence);
jpayne@69 11597 __Pyx_GIVEREF(__pyx_v_self->sequence);
jpayne@69 11598 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_self->sequence)) __PYX_ERR(0, 439, __pyx_L1_error);
jpayne@69 11599 __Pyx_INCREF(__pyx_v_self->quality);
jpayne@69 11600 __Pyx_GIVEREF(__pyx_v_self->quality);
jpayne@69 11601 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_v_self->quality)) __PYX_ERR(0, 439, __pyx_L1_error);
jpayne@69 11602 __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5pysam_9libcfaidx_FastxRecord), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 439, __pyx_L1_error)
jpayne@69 11603 __Pyx_GOTREF(__pyx_t_2);
jpayne@69 11604 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@69 11605 __pyx_r = __pyx_t_2;
jpayne@69 11606 __pyx_t_2 = 0;
jpayne@69 11607 goto __pyx_L0;
jpayne@69 11608
jpayne@69 11609 /* "pysam/libcfaidx.pyx":438
jpayne@69 11610 * return FastxRecord(self.name, self.comment, self.sequence, self.quality)
jpayne@69 11611 *
jpayne@69 11612 * def __deepcopy__(self, memo): # <<<<<<<<<<<<<<
jpayne@69 11613 * return FastxRecord(self.name, self.comment, self.sequence, self.quality)
jpayne@69 11614 *
jpayne@69 11615 */
jpayne@69 11616
jpayne@69 11617 /* function exit code */
jpayne@69 11618 __pyx_L1_error:;
jpayne@69 11619 __Pyx_XDECREF(__pyx_t_1);
jpayne@69 11620 __Pyx_XDECREF(__pyx_t_2);
jpayne@69 11621 __Pyx_AddTraceback("pysam.libcfaidx.FastxRecord.__deepcopy__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 11622 __pyx_r = NULL;
jpayne@69 11623 __pyx_L0:;
jpayne@69 11624 __Pyx_XGIVEREF(__pyx_r);
jpayne@69 11625 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@69 11626 __Pyx_RefNannyFinishContext();
jpayne@69 11627 return __pyx_r;
jpayne@69 11628 }
jpayne@69 11629
jpayne@69 11630 /* "pysam/libcfaidx.pyx":441
jpayne@69 11631 * return FastxRecord(self.name, self.comment, self.sequence, self.quality)
jpayne@69 11632 *
jpayne@69 11633 * cdef cython.str to_string(self): # <<<<<<<<<<<<<<
jpayne@69 11634 * if self.name is None:
jpayne@69 11635 * raise ValueError("can not write record without name")
jpayne@69 11636 */
jpayne@69 11637
jpayne@69 11638 static PyObject *__pyx_f_5pysam_9libcfaidx_11FastxRecord_to_string(struct __pyx_obj_5pysam_9libcfaidx_FastxRecord *__pyx_v_self) {
jpayne@69 11639 PyObject *__pyx_v_comment = NULL;
jpayne@69 11640 PyObject *__pyx_r = NULL;
jpayne@69 11641 __Pyx_TraceDeclarations
jpayne@69 11642 __Pyx_RefNannyDeclarations
jpayne@69 11643 int __pyx_t_1;
jpayne@69 11644 PyObject *__pyx_t_2 = NULL;
jpayne@69 11645 Py_ssize_t __pyx_t_3;
jpayne@69 11646 Py_UCS4 __pyx_t_4;
jpayne@69 11647 PyObject *__pyx_t_5 = NULL;
jpayne@69 11648 int __pyx_lineno = 0;
jpayne@69 11649 const char *__pyx_filename = NULL;
jpayne@69 11650 int __pyx_clineno = 0;
jpayne@69 11651 __Pyx_RefNannySetupContext("to_string", 1);
jpayne@69 11652 __Pyx_TraceCall("to_string", __pyx_f[0], 441, 0, __PYX_ERR(0, 441, __pyx_L1_error));
jpayne@69 11653
jpayne@69 11654 /* "pysam/libcfaidx.pyx":442
jpayne@69 11655 *
jpayne@69 11656 * cdef cython.str to_string(self):
jpayne@69 11657 * if self.name is None: # <<<<<<<<<<<<<<
jpayne@69 11658 * raise ValueError("can not write record without name")
jpayne@69 11659 *
jpayne@69 11660 */
jpayne@69 11661 __pyx_t_1 = (__pyx_v_self->name == ((PyObject*)Py_None));
jpayne@69 11662 if (unlikely(__pyx_t_1)) {
jpayne@69 11663
jpayne@69 11664 /* "pysam/libcfaidx.pyx":443
jpayne@69 11665 * cdef cython.str to_string(self):
jpayne@69 11666 * if self.name is None:
jpayne@69 11667 * raise ValueError("can not write record without name") # <<<<<<<<<<<<<<
jpayne@69 11668 *
jpayne@69 11669 * if self.sequence is None:
jpayne@69 11670 */
jpayne@69 11671 __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__25, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 443, __pyx_L1_error)
jpayne@69 11672 __Pyx_GOTREF(__pyx_t_2);
jpayne@69 11673 __Pyx_Raise(__pyx_t_2, 0, 0, 0);
jpayne@69 11674 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@69 11675 __PYX_ERR(0, 443, __pyx_L1_error)
jpayne@69 11676
jpayne@69 11677 /* "pysam/libcfaidx.pyx":442
jpayne@69 11678 *
jpayne@69 11679 * cdef cython.str to_string(self):
jpayne@69 11680 * if self.name is None: # <<<<<<<<<<<<<<
jpayne@69 11681 * raise ValueError("can not write record without name")
jpayne@69 11682 *
jpayne@69 11683 */
jpayne@69 11684 }
jpayne@69 11685
jpayne@69 11686 /* "pysam/libcfaidx.pyx":445
jpayne@69 11687 * raise ValueError("can not write record without name")
jpayne@69 11688 *
jpayne@69 11689 * if self.sequence is None: # <<<<<<<<<<<<<<
jpayne@69 11690 * raise ValueError("can not write record without a sequence")
jpayne@69 11691 *
jpayne@69 11692 */
jpayne@69 11693 __pyx_t_1 = (__pyx_v_self->sequence == ((PyObject*)Py_None));
jpayne@69 11694 if (unlikely(__pyx_t_1)) {
jpayne@69 11695
jpayne@69 11696 /* "pysam/libcfaidx.pyx":446
jpayne@69 11697 *
jpayne@69 11698 * if self.sequence is None:
jpayne@69 11699 * raise ValueError("can not write record without a sequence") # <<<<<<<<<<<<<<
jpayne@69 11700 *
jpayne@69 11701 * if self.comment is None:
jpayne@69 11702 */
jpayne@69 11703 __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__26, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 446, __pyx_L1_error)
jpayne@69 11704 __Pyx_GOTREF(__pyx_t_2);
jpayne@69 11705 __Pyx_Raise(__pyx_t_2, 0, 0, 0);
jpayne@69 11706 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@69 11707 __PYX_ERR(0, 446, __pyx_L1_error)
jpayne@69 11708
jpayne@69 11709 /* "pysam/libcfaidx.pyx":445
jpayne@69 11710 * raise ValueError("can not write record without name")
jpayne@69 11711 *
jpayne@69 11712 * if self.sequence is None: # <<<<<<<<<<<<<<
jpayne@69 11713 * raise ValueError("can not write record without a sequence")
jpayne@69 11714 *
jpayne@69 11715 */
jpayne@69 11716 }
jpayne@69 11717
jpayne@69 11718 /* "pysam/libcfaidx.pyx":448
jpayne@69 11719 * raise ValueError("can not write record without a sequence")
jpayne@69 11720 *
jpayne@69 11721 * if self.comment is None: # <<<<<<<<<<<<<<
jpayne@69 11722 * comment = ""
jpayne@69 11723 * else:
jpayne@69 11724 */
jpayne@69 11725 __pyx_t_1 = (__pyx_v_self->comment == ((PyObject*)Py_None));
jpayne@69 11726 if (__pyx_t_1) {
jpayne@69 11727
jpayne@69 11728 /* "pysam/libcfaidx.pyx":449
jpayne@69 11729 *
jpayne@69 11730 * if self.comment is None:
jpayne@69 11731 * comment = "" # <<<<<<<<<<<<<<
jpayne@69 11732 * else:
jpayne@69 11733 * comment = " %s" % self.comment
jpayne@69 11734 */
jpayne@69 11735 __Pyx_INCREF(__pyx_kp_u__11);
jpayne@69 11736 __pyx_v_comment = __pyx_kp_u__11;
jpayne@69 11737
jpayne@69 11738 /* "pysam/libcfaidx.pyx":448
jpayne@69 11739 * raise ValueError("can not write record without a sequence")
jpayne@69 11740 *
jpayne@69 11741 * if self.comment is None: # <<<<<<<<<<<<<<
jpayne@69 11742 * comment = ""
jpayne@69 11743 * else:
jpayne@69 11744 */
jpayne@69 11745 goto __pyx_L5;
jpayne@69 11746 }
jpayne@69 11747
jpayne@69 11748 /* "pysam/libcfaidx.pyx":451
jpayne@69 11749 * comment = ""
jpayne@69 11750 * else:
jpayne@69 11751 * comment = " %s" % self.comment # <<<<<<<<<<<<<<
jpayne@69 11752 *
jpayne@69 11753 * if self.quality is None:
jpayne@69 11754 */
jpayne@69 11755 /*else*/ {
jpayne@69 11756 __pyx_t_2 = PyUnicode_Format(__pyx_kp_u_s, __pyx_v_self->comment); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 451, __pyx_L1_error)
jpayne@69 11757 __Pyx_GOTREF(__pyx_t_2);
jpayne@69 11758 __pyx_v_comment = ((PyObject*)__pyx_t_2);
jpayne@69 11759 __pyx_t_2 = 0;
jpayne@69 11760 }
jpayne@69 11761 __pyx_L5:;
jpayne@69 11762
jpayne@69 11763 /* "pysam/libcfaidx.pyx":453
jpayne@69 11764 * comment = " %s" % self.comment
jpayne@69 11765 *
jpayne@69 11766 * if self.quality is None: # <<<<<<<<<<<<<<
jpayne@69 11767 * return ">%s%s\n%s" % (self.name, comment, self.sequence)
jpayne@69 11768 * else:
jpayne@69 11769 */
jpayne@69 11770 __pyx_t_1 = (__pyx_v_self->quality == ((PyObject*)Py_None));
jpayne@69 11771 if (__pyx_t_1) {
jpayne@69 11772
jpayne@69 11773 /* "pysam/libcfaidx.pyx":454
jpayne@69 11774 *
jpayne@69 11775 * if self.quality is None:
jpayne@69 11776 * return ">%s%s\n%s" % (self.name, comment, self.sequence) # <<<<<<<<<<<<<<
jpayne@69 11777 * else:
jpayne@69 11778 * return "@%s%s\n%s\n+\n%s" % (self.name, comment,
jpayne@69 11779 */
jpayne@69 11780 __Pyx_XDECREF(__pyx_r);
jpayne@69 11781 __pyx_t_2 = PyTuple_New(5); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 454, __pyx_L1_error)
jpayne@69 11782 __Pyx_GOTREF(__pyx_t_2);
jpayne@69 11783 __pyx_t_3 = 0;
jpayne@69 11784 __pyx_t_4 = 127;
jpayne@69 11785 __Pyx_INCREF(__pyx_kp_u__16);
jpayne@69 11786 __pyx_t_3 += 1;
jpayne@69 11787 __Pyx_GIVEREF(__pyx_kp_u__16);
jpayne@69 11788 PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_kp_u__16);
jpayne@69 11789 __pyx_t_5 = __Pyx_PyUnicode_Unicode(__pyx_v_self->name); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 454, __pyx_L1_error)
jpayne@69 11790 __Pyx_GOTREF(__pyx_t_5);
jpayne@69 11791 __pyx_t_4 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) > __pyx_t_4) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) : __pyx_t_4;
jpayne@69 11792 __pyx_t_3 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5);
jpayne@69 11793 __Pyx_GIVEREF(__pyx_t_5);
jpayne@69 11794 PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_5);
jpayne@69 11795 __pyx_t_5 = 0;
jpayne@69 11796 __Pyx_INCREF(__pyx_v_comment);
jpayne@69 11797 __pyx_t_4 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_v_comment) > __pyx_t_4) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_v_comment) : __pyx_t_4;
jpayne@69 11798 __pyx_t_3 += __Pyx_PyUnicode_GET_LENGTH(__pyx_v_comment);
jpayne@69 11799 __Pyx_GIVEREF(__pyx_v_comment);
jpayne@69 11800 PyTuple_SET_ITEM(__pyx_t_2, 2, __pyx_v_comment);
jpayne@69 11801 __Pyx_INCREF(__pyx_kp_u__17);
jpayne@69 11802 __pyx_t_3 += 1;
jpayne@69 11803 __Pyx_GIVEREF(__pyx_kp_u__17);
jpayne@69 11804 PyTuple_SET_ITEM(__pyx_t_2, 3, __pyx_kp_u__17);
jpayne@69 11805 __pyx_t_5 = __Pyx_PyUnicode_Unicode(__pyx_v_self->sequence); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 454, __pyx_L1_error)
jpayne@69 11806 __Pyx_GOTREF(__pyx_t_5);
jpayne@69 11807 __pyx_t_4 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) > __pyx_t_4) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_5) : __pyx_t_4;
jpayne@69 11808 __pyx_t_3 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_5);
jpayne@69 11809 __Pyx_GIVEREF(__pyx_t_5);
jpayne@69 11810 PyTuple_SET_ITEM(__pyx_t_2, 4, __pyx_t_5);
jpayne@69 11811 __pyx_t_5 = 0;
jpayne@69 11812 __pyx_t_5 = __Pyx_PyUnicode_Join(__pyx_t_2, 5, __pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 454, __pyx_L1_error)
jpayne@69 11813 __Pyx_GOTREF(__pyx_t_5);
jpayne@69 11814 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@69 11815 __pyx_r = ((PyObject*)__pyx_t_5);
jpayne@69 11816 __pyx_t_5 = 0;
jpayne@69 11817 goto __pyx_L0;
jpayne@69 11818
jpayne@69 11819 /* "pysam/libcfaidx.pyx":453
jpayne@69 11820 * comment = " %s" % self.comment
jpayne@69 11821 *
jpayne@69 11822 * if self.quality is None: # <<<<<<<<<<<<<<
jpayne@69 11823 * return ">%s%s\n%s" % (self.name, comment, self.sequence)
jpayne@69 11824 * else:
jpayne@69 11825 */
jpayne@69 11826 }
jpayne@69 11827
jpayne@69 11828 /* "pysam/libcfaidx.pyx":456
jpayne@69 11829 * return ">%s%s\n%s" % (self.name, comment, self.sequence)
jpayne@69 11830 * else:
jpayne@69 11831 * return "@%s%s\n%s\n+\n%s" % (self.name, comment, # <<<<<<<<<<<<<<
jpayne@69 11832 * self.sequence, self.quality)
jpayne@69 11833 *
jpayne@69 11834 */
jpayne@69 11835 /*else*/ {
jpayne@69 11836 __Pyx_XDECREF(__pyx_r);
jpayne@69 11837 __pyx_t_5 = PyTuple_New(7); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 456, __pyx_L1_error)
jpayne@69 11838 __Pyx_GOTREF(__pyx_t_5);
jpayne@69 11839 __pyx_t_3 = 0;
jpayne@69 11840 __pyx_t_4 = 127;
jpayne@69 11841 __Pyx_INCREF(__pyx_kp_u__18);
jpayne@69 11842 __pyx_t_3 += 1;
jpayne@69 11843 __Pyx_GIVEREF(__pyx_kp_u__18);
jpayne@69 11844 PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_kp_u__18);
jpayne@69 11845 __pyx_t_2 = __Pyx_PyUnicode_Unicode(__pyx_v_self->name); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 456, __pyx_L1_error)
jpayne@69 11846 __Pyx_GOTREF(__pyx_t_2);
jpayne@69 11847 __pyx_t_4 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) > __pyx_t_4) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) : __pyx_t_4;
jpayne@69 11848 __pyx_t_3 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2);
jpayne@69 11849 __Pyx_GIVEREF(__pyx_t_2);
jpayne@69 11850 PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_2);
jpayne@69 11851 __pyx_t_2 = 0;
jpayne@69 11852 __Pyx_INCREF(__pyx_v_comment);
jpayne@69 11853 __pyx_t_4 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_v_comment) > __pyx_t_4) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_v_comment) : __pyx_t_4;
jpayne@69 11854 __pyx_t_3 += __Pyx_PyUnicode_GET_LENGTH(__pyx_v_comment);
jpayne@69 11855 __Pyx_GIVEREF(__pyx_v_comment);
jpayne@69 11856 PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_comment);
jpayne@69 11857 __Pyx_INCREF(__pyx_kp_u__17);
jpayne@69 11858 __pyx_t_3 += 1;
jpayne@69 11859 __Pyx_GIVEREF(__pyx_kp_u__17);
jpayne@69 11860 PyTuple_SET_ITEM(__pyx_t_5, 3, __pyx_kp_u__17);
jpayne@69 11861
jpayne@69 11862 /* "pysam/libcfaidx.pyx":457
jpayne@69 11863 * else:
jpayne@69 11864 * return "@%s%s\n%s\n+\n%s" % (self.name, comment,
jpayne@69 11865 * self.sequence, self.quality) # <<<<<<<<<<<<<<
jpayne@69 11866 *
jpayne@69 11867 * cdef cython.str tostring(self):
jpayne@69 11868 */
jpayne@69 11869 __pyx_t_2 = __Pyx_PyUnicode_Unicode(__pyx_v_self->sequence); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 457, __pyx_L1_error)
jpayne@69 11870 __Pyx_GOTREF(__pyx_t_2);
jpayne@69 11871 __pyx_t_4 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) > __pyx_t_4) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) : __pyx_t_4;
jpayne@69 11872 __pyx_t_3 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2);
jpayne@69 11873 __Pyx_GIVEREF(__pyx_t_2);
jpayne@69 11874 PyTuple_SET_ITEM(__pyx_t_5, 4, __pyx_t_2);
jpayne@69 11875 __pyx_t_2 = 0;
jpayne@69 11876 __Pyx_INCREF(__pyx_kp_u__19);
jpayne@69 11877 __pyx_t_3 += 3;
jpayne@69 11878 __Pyx_GIVEREF(__pyx_kp_u__19);
jpayne@69 11879 PyTuple_SET_ITEM(__pyx_t_5, 5, __pyx_kp_u__19);
jpayne@69 11880 __pyx_t_2 = __Pyx_PyUnicode_Unicode(__pyx_v_self->quality); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 457, __pyx_L1_error)
jpayne@69 11881 __Pyx_GOTREF(__pyx_t_2);
jpayne@69 11882 __pyx_t_4 = (__Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) > __pyx_t_4) ? __Pyx_PyUnicode_MAX_CHAR_VALUE(__pyx_t_2) : __pyx_t_4;
jpayne@69 11883 __pyx_t_3 += __Pyx_PyUnicode_GET_LENGTH(__pyx_t_2);
jpayne@69 11884 __Pyx_GIVEREF(__pyx_t_2);
jpayne@69 11885 PyTuple_SET_ITEM(__pyx_t_5, 6, __pyx_t_2);
jpayne@69 11886 __pyx_t_2 = 0;
jpayne@69 11887
jpayne@69 11888 /* "pysam/libcfaidx.pyx":456
jpayne@69 11889 * return ">%s%s\n%s" % (self.name, comment, self.sequence)
jpayne@69 11890 * else:
jpayne@69 11891 * return "@%s%s\n%s\n+\n%s" % (self.name, comment, # <<<<<<<<<<<<<<
jpayne@69 11892 * self.sequence, self.quality)
jpayne@69 11893 *
jpayne@69 11894 */
jpayne@69 11895 __pyx_t_2 = __Pyx_PyUnicode_Join(__pyx_t_5, 7, __pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 456, __pyx_L1_error)
jpayne@69 11896 __Pyx_GOTREF(__pyx_t_2);
jpayne@69 11897 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
jpayne@69 11898 __pyx_r = ((PyObject*)__pyx_t_2);
jpayne@69 11899 __pyx_t_2 = 0;
jpayne@69 11900 goto __pyx_L0;
jpayne@69 11901 }
jpayne@69 11902
jpayne@69 11903 /* "pysam/libcfaidx.pyx":441
jpayne@69 11904 * return FastxRecord(self.name, self.comment, self.sequence, self.quality)
jpayne@69 11905 *
jpayne@69 11906 * cdef cython.str to_string(self): # <<<<<<<<<<<<<<
jpayne@69 11907 * if self.name is None:
jpayne@69 11908 * raise ValueError("can not write record without name")
jpayne@69 11909 */
jpayne@69 11910
jpayne@69 11911 /* function exit code */
jpayne@69 11912 __pyx_L1_error:;
jpayne@69 11913 __Pyx_XDECREF(__pyx_t_2);
jpayne@69 11914 __Pyx_XDECREF(__pyx_t_5);
jpayne@69 11915 __Pyx_AddTraceback("pysam.libcfaidx.FastxRecord.to_string", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 11916 __pyx_r = 0;
jpayne@69 11917 __pyx_L0:;
jpayne@69 11918 __Pyx_XDECREF(__pyx_v_comment);
jpayne@69 11919 __Pyx_XGIVEREF(__pyx_r);
jpayne@69 11920 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@69 11921 __Pyx_RefNannyFinishContext();
jpayne@69 11922 return __pyx_r;
jpayne@69 11923 }
jpayne@69 11924
jpayne@69 11925 /* "pysam/libcfaidx.pyx":459
jpayne@69 11926 * self.sequence, self.quality)
jpayne@69 11927 *
jpayne@69 11928 * cdef cython.str tostring(self): # <<<<<<<<<<<<<<
jpayne@69 11929 * """deprecated : use :meth:`to_string`"""
jpayne@69 11930 * return self.to_string()
jpayne@69 11931 */
jpayne@69 11932
jpayne@69 11933 static PyObject *__pyx_f_5pysam_9libcfaidx_11FastxRecord_tostring(struct __pyx_obj_5pysam_9libcfaidx_FastxRecord *__pyx_v_self) {
jpayne@69 11934 PyObject *__pyx_r = NULL;
jpayne@69 11935 __Pyx_TraceDeclarations
jpayne@69 11936 __Pyx_RefNannyDeclarations
jpayne@69 11937 PyObject *__pyx_t_1 = NULL;
jpayne@69 11938 int __pyx_lineno = 0;
jpayne@69 11939 const char *__pyx_filename = NULL;
jpayne@69 11940 int __pyx_clineno = 0;
jpayne@69 11941 __Pyx_RefNannySetupContext("tostring", 1);
jpayne@69 11942 __Pyx_TraceCall("tostring", __pyx_f[0], 459, 0, __PYX_ERR(0, 459, __pyx_L1_error));
jpayne@69 11943
jpayne@69 11944 /* "pysam/libcfaidx.pyx":461
jpayne@69 11945 * cdef cython.str tostring(self):
jpayne@69 11946 * """deprecated : use :meth:`to_string`"""
jpayne@69 11947 * return self.to_string() # <<<<<<<<<<<<<<
jpayne@69 11948 *
jpayne@69 11949 * def set_name(self, name):
jpayne@69 11950 */
jpayne@69 11951 __Pyx_XDECREF(__pyx_r);
jpayne@69 11952 __pyx_t_1 = ((struct __pyx_vtabstruct_5pysam_9libcfaidx_FastxRecord *)__pyx_v_self->__pyx_vtab)->to_string(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 461, __pyx_L1_error)
jpayne@69 11953 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 11954 __pyx_r = ((PyObject*)__pyx_t_1);
jpayne@69 11955 __pyx_t_1 = 0;
jpayne@69 11956 goto __pyx_L0;
jpayne@69 11957
jpayne@69 11958 /* "pysam/libcfaidx.pyx":459
jpayne@69 11959 * self.sequence, self.quality)
jpayne@69 11960 *
jpayne@69 11961 * cdef cython.str tostring(self): # <<<<<<<<<<<<<<
jpayne@69 11962 * """deprecated : use :meth:`to_string`"""
jpayne@69 11963 * return self.to_string()
jpayne@69 11964 */
jpayne@69 11965
jpayne@69 11966 /* function exit code */
jpayne@69 11967 __pyx_L1_error:;
jpayne@69 11968 __Pyx_XDECREF(__pyx_t_1);
jpayne@69 11969 __Pyx_AddTraceback("pysam.libcfaidx.FastxRecord.tostring", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 11970 __pyx_r = 0;
jpayne@69 11971 __pyx_L0:;
jpayne@69 11972 __Pyx_XGIVEREF(__pyx_r);
jpayne@69 11973 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@69 11974 __Pyx_RefNannyFinishContext();
jpayne@69 11975 return __pyx_r;
jpayne@69 11976 }
jpayne@69 11977
jpayne@69 11978 /* "pysam/libcfaidx.pyx":463
jpayne@69 11979 * return self.to_string()
jpayne@69 11980 *
jpayne@69 11981 * def set_name(self, name): # <<<<<<<<<<<<<<
jpayne@69 11982 * if name is None:
jpayne@69 11983 * raise ValueError("FastxRecord must have a name and not None")
jpayne@69 11984 */
jpayne@69 11985
jpayne@69 11986 /* Python wrapper */
jpayne@69 11987 static PyObject *__pyx_pw_5pysam_9libcfaidx_11FastxRecord_7set_name(PyObject *__pyx_v_self,
jpayne@69 11988 #if CYTHON_METH_FASTCALL
jpayne@69 11989 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@69 11990 #else
jpayne@69 11991 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@69 11992 #endif
jpayne@69 11993 ); /*proto*/
jpayne@69 11994 PyDoc_STRVAR(__pyx_doc_5pysam_9libcfaidx_11FastxRecord_6set_name, "FastxRecord.set_name(self, name)");
jpayne@69 11995 static PyMethodDef __pyx_mdef_5pysam_9libcfaidx_11FastxRecord_7set_name = {"set_name", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_9libcfaidx_11FastxRecord_7set_name, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_9libcfaidx_11FastxRecord_6set_name};
jpayne@69 11996 static PyObject *__pyx_pw_5pysam_9libcfaidx_11FastxRecord_7set_name(PyObject *__pyx_v_self,
jpayne@69 11997 #if CYTHON_METH_FASTCALL
jpayne@69 11998 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@69 11999 #else
jpayne@69 12000 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@69 12001 #endif
jpayne@69 12002 ) {
jpayne@69 12003 PyObject *__pyx_v_name = 0;
jpayne@69 12004 #if !CYTHON_METH_FASTCALL
jpayne@69 12005 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
jpayne@69 12006 #endif
jpayne@69 12007 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@69 12008 PyObject* values[1] = {0};
jpayne@69 12009 int __pyx_lineno = 0;
jpayne@69 12010 const char *__pyx_filename = NULL;
jpayne@69 12011 int __pyx_clineno = 0;
jpayne@69 12012 PyObject *__pyx_r = 0;
jpayne@69 12013 __Pyx_RefNannyDeclarations
jpayne@69 12014 __Pyx_RefNannySetupContext("set_name (wrapper)", 0);
jpayne@69 12015 #if !CYTHON_METH_FASTCALL
jpayne@69 12016 #if CYTHON_ASSUME_SAFE_MACROS
jpayne@69 12017 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
jpayne@69 12018 #else
jpayne@69 12019 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
jpayne@69 12020 #endif
jpayne@69 12021 #endif
jpayne@69 12022 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
jpayne@69 12023 {
jpayne@69 12024 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_name,0};
jpayne@69 12025 if (__pyx_kwds) {
jpayne@69 12026 Py_ssize_t kw_args;
jpayne@69 12027 switch (__pyx_nargs) {
jpayne@69 12028 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
jpayne@69 12029 CYTHON_FALLTHROUGH;
jpayne@69 12030 case 0: break;
jpayne@69 12031 default: goto __pyx_L5_argtuple_error;
jpayne@69 12032 }
jpayne@69 12033 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
jpayne@69 12034 switch (__pyx_nargs) {
jpayne@69 12035 case 0:
jpayne@69 12036 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_name)) != 0)) {
jpayne@69 12037 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
jpayne@69 12038 kw_args--;
jpayne@69 12039 }
jpayne@69 12040 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 463, __pyx_L3_error)
jpayne@69 12041 else goto __pyx_L5_argtuple_error;
jpayne@69 12042 }
jpayne@69 12043 if (unlikely(kw_args > 0)) {
jpayne@69 12044 const Py_ssize_t kwd_pos_args = __pyx_nargs;
jpayne@69 12045 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "set_name") < 0)) __PYX_ERR(0, 463, __pyx_L3_error)
jpayne@69 12046 }
jpayne@69 12047 } else if (unlikely(__pyx_nargs != 1)) {
jpayne@69 12048 goto __pyx_L5_argtuple_error;
jpayne@69 12049 } else {
jpayne@69 12050 values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
jpayne@69 12051 }
jpayne@69 12052 __pyx_v_name = values[0];
jpayne@69 12053 }
jpayne@69 12054 goto __pyx_L6_skip;
jpayne@69 12055 __pyx_L5_argtuple_error:;
jpayne@69 12056 __Pyx_RaiseArgtupleInvalid("set_name", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 463, __pyx_L3_error)
jpayne@69 12057 __pyx_L6_skip:;
jpayne@69 12058 goto __pyx_L4_argument_unpacking_done;
jpayne@69 12059 __pyx_L3_error:;
jpayne@69 12060 {
jpayne@69 12061 Py_ssize_t __pyx_temp;
jpayne@69 12062 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
jpayne@69 12063 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
jpayne@69 12064 }
jpayne@69 12065 }
jpayne@69 12066 __Pyx_AddTraceback("pysam.libcfaidx.FastxRecord.set_name", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 12067 __Pyx_RefNannyFinishContext();
jpayne@69 12068 return NULL;
jpayne@69 12069 __pyx_L4_argument_unpacking_done:;
jpayne@69 12070 __pyx_r = __pyx_pf_5pysam_9libcfaidx_11FastxRecord_6set_name(((struct __pyx_obj_5pysam_9libcfaidx_FastxRecord *)__pyx_v_self), __pyx_v_name);
jpayne@69 12071
jpayne@69 12072 /* function exit code */
jpayne@69 12073 {
jpayne@69 12074 Py_ssize_t __pyx_temp;
jpayne@69 12075 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
jpayne@69 12076 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
jpayne@69 12077 }
jpayne@69 12078 }
jpayne@69 12079 __Pyx_RefNannyFinishContext();
jpayne@69 12080 return __pyx_r;
jpayne@69 12081 }
jpayne@69 12082
jpayne@69 12083 static PyObject *__pyx_pf_5pysam_9libcfaidx_11FastxRecord_6set_name(struct __pyx_obj_5pysam_9libcfaidx_FastxRecord *__pyx_v_self, PyObject *__pyx_v_name) {
jpayne@69 12084 PyObject *__pyx_r = NULL;
jpayne@69 12085 __Pyx_TraceDeclarations
jpayne@69 12086 __Pyx_RefNannyDeclarations
jpayne@69 12087 int __pyx_t_1;
jpayne@69 12088 PyObject *__pyx_t_2 = NULL;
jpayne@69 12089 int __pyx_lineno = 0;
jpayne@69 12090 const char *__pyx_filename = NULL;
jpayne@69 12091 int __pyx_clineno = 0;
jpayne@69 12092 __Pyx_TraceFrameInit(__pyx_codeobj__27)
jpayne@69 12093 __Pyx_RefNannySetupContext("set_name", 1);
jpayne@69 12094 __Pyx_TraceCall("set_name", __pyx_f[0], 463, 0, __PYX_ERR(0, 463, __pyx_L1_error));
jpayne@69 12095
jpayne@69 12096 /* "pysam/libcfaidx.pyx":464
jpayne@69 12097 *
jpayne@69 12098 * def set_name(self, name):
jpayne@69 12099 * if name is None: # <<<<<<<<<<<<<<
jpayne@69 12100 * raise ValueError("FastxRecord must have a name and not None")
jpayne@69 12101 * self.name = name
jpayne@69 12102 */
jpayne@69 12103 __pyx_t_1 = (__pyx_v_name == Py_None);
jpayne@69 12104 if (unlikely(__pyx_t_1)) {
jpayne@69 12105
jpayne@69 12106 /* "pysam/libcfaidx.pyx":465
jpayne@69 12107 * def set_name(self, name):
jpayne@69 12108 * if name is None:
jpayne@69 12109 * raise ValueError("FastxRecord must have a name and not None") # <<<<<<<<<<<<<<
jpayne@69 12110 * self.name = name
jpayne@69 12111 *
jpayne@69 12112 */
jpayne@69 12113 __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__28, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 465, __pyx_L1_error)
jpayne@69 12114 __Pyx_GOTREF(__pyx_t_2);
jpayne@69 12115 __Pyx_Raise(__pyx_t_2, 0, 0, 0);
jpayne@69 12116 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@69 12117 __PYX_ERR(0, 465, __pyx_L1_error)
jpayne@69 12118
jpayne@69 12119 /* "pysam/libcfaidx.pyx":464
jpayne@69 12120 *
jpayne@69 12121 * def set_name(self, name):
jpayne@69 12122 * if name is None: # <<<<<<<<<<<<<<
jpayne@69 12123 * raise ValueError("FastxRecord must have a name and not None")
jpayne@69 12124 * self.name = name
jpayne@69 12125 */
jpayne@69 12126 }
jpayne@69 12127
jpayne@69 12128 /* "pysam/libcfaidx.pyx":466
jpayne@69 12129 * if name is None:
jpayne@69 12130 * raise ValueError("FastxRecord must have a name and not None")
jpayne@69 12131 * self.name = name # <<<<<<<<<<<<<<
jpayne@69 12132 *
jpayne@69 12133 * def set_comment(self, comment):
jpayne@69 12134 */
jpayne@69 12135 if (!(likely(PyUnicode_CheckExact(__pyx_v_name))||((__pyx_v_name) == Py_None) || __Pyx_RaiseUnexpectedTypeError("unicode", __pyx_v_name))) __PYX_ERR(0, 466, __pyx_L1_error)
jpayne@69 12136 __pyx_t_2 = __pyx_v_name;
jpayne@69 12137 __Pyx_INCREF(__pyx_t_2);
jpayne@69 12138 __Pyx_GIVEREF(__pyx_t_2);
jpayne@69 12139 __Pyx_GOTREF(__pyx_v_self->name);
jpayne@69 12140 __Pyx_DECREF(__pyx_v_self->name);
jpayne@69 12141 __pyx_v_self->name = ((PyObject*)__pyx_t_2);
jpayne@69 12142 __pyx_t_2 = 0;
jpayne@69 12143
jpayne@69 12144 /* "pysam/libcfaidx.pyx":463
jpayne@69 12145 * return self.to_string()
jpayne@69 12146 *
jpayne@69 12147 * def set_name(self, name): # <<<<<<<<<<<<<<
jpayne@69 12148 * if name is None:
jpayne@69 12149 * raise ValueError("FastxRecord must have a name and not None")
jpayne@69 12150 */
jpayne@69 12151
jpayne@69 12152 /* function exit code */
jpayne@69 12153 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
jpayne@69 12154 goto __pyx_L0;
jpayne@69 12155 __pyx_L1_error:;
jpayne@69 12156 __Pyx_XDECREF(__pyx_t_2);
jpayne@69 12157 __Pyx_AddTraceback("pysam.libcfaidx.FastxRecord.set_name", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 12158 __pyx_r = NULL;
jpayne@69 12159 __pyx_L0:;
jpayne@69 12160 __Pyx_XGIVEREF(__pyx_r);
jpayne@69 12161 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@69 12162 __Pyx_RefNannyFinishContext();
jpayne@69 12163 return __pyx_r;
jpayne@69 12164 }
jpayne@69 12165
jpayne@69 12166 /* "pysam/libcfaidx.pyx":468
jpayne@69 12167 * self.name = name
jpayne@69 12168 *
jpayne@69 12169 * def set_comment(self, comment): # <<<<<<<<<<<<<<
jpayne@69 12170 * self.comment = comment
jpayne@69 12171 *
jpayne@69 12172 */
jpayne@69 12173
jpayne@69 12174 /* Python wrapper */
jpayne@69 12175 static PyObject *__pyx_pw_5pysam_9libcfaidx_11FastxRecord_9set_comment(PyObject *__pyx_v_self,
jpayne@69 12176 #if CYTHON_METH_FASTCALL
jpayne@69 12177 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@69 12178 #else
jpayne@69 12179 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@69 12180 #endif
jpayne@69 12181 ); /*proto*/
jpayne@69 12182 PyDoc_STRVAR(__pyx_doc_5pysam_9libcfaidx_11FastxRecord_8set_comment, "FastxRecord.set_comment(self, comment)");
jpayne@69 12183 static PyMethodDef __pyx_mdef_5pysam_9libcfaidx_11FastxRecord_9set_comment = {"set_comment", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_9libcfaidx_11FastxRecord_9set_comment, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_9libcfaidx_11FastxRecord_8set_comment};
jpayne@69 12184 static PyObject *__pyx_pw_5pysam_9libcfaidx_11FastxRecord_9set_comment(PyObject *__pyx_v_self,
jpayne@69 12185 #if CYTHON_METH_FASTCALL
jpayne@69 12186 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@69 12187 #else
jpayne@69 12188 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@69 12189 #endif
jpayne@69 12190 ) {
jpayne@69 12191 PyObject *__pyx_v_comment = 0;
jpayne@69 12192 #if !CYTHON_METH_FASTCALL
jpayne@69 12193 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
jpayne@69 12194 #endif
jpayne@69 12195 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@69 12196 PyObject* values[1] = {0};
jpayne@69 12197 int __pyx_lineno = 0;
jpayne@69 12198 const char *__pyx_filename = NULL;
jpayne@69 12199 int __pyx_clineno = 0;
jpayne@69 12200 PyObject *__pyx_r = 0;
jpayne@69 12201 __Pyx_RefNannyDeclarations
jpayne@69 12202 __Pyx_RefNannySetupContext("set_comment (wrapper)", 0);
jpayne@69 12203 #if !CYTHON_METH_FASTCALL
jpayne@69 12204 #if CYTHON_ASSUME_SAFE_MACROS
jpayne@69 12205 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
jpayne@69 12206 #else
jpayne@69 12207 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
jpayne@69 12208 #endif
jpayne@69 12209 #endif
jpayne@69 12210 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
jpayne@69 12211 {
jpayne@69 12212 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_comment,0};
jpayne@69 12213 if (__pyx_kwds) {
jpayne@69 12214 Py_ssize_t kw_args;
jpayne@69 12215 switch (__pyx_nargs) {
jpayne@69 12216 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
jpayne@69 12217 CYTHON_FALLTHROUGH;
jpayne@69 12218 case 0: break;
jpayne@69 12219 default: goto __pyx_L5_argtuple_error;
jpayne@69 12220 }
jpayne@69 12221 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
jpayne@69 12222 switch (__pyx_nargs) {
jpayne@69 12223 case 0:
jpayne@69 12224 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_comment)) != 0)) {
jpayne@69 12225 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
jpayne@69 12226 kw_args--;
jpayne@69 12227 }
jpayne@69 12228 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 468, __pyx_L3_error)
jpayne@69 12229 else goto __pyx_L5_argtuple_error;
jpayne@69 12230 }
jpayne@69 12231 if (unlikely(kw_args > 0)) {
jpayne@69 12232 const Py_ssize_t kwd_pos_args = __pyx_nargs;
jpayne@69 12233 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "set_comment") < 0)) __PYX_ERR(0, 468, __pyx_L3_error)
jpayne@69 12234 }
jpayne@69 12235 } else if (unlikely(__pyx_nargs != 1)) {
jpayne@69 12236 goto __pyx_L5_argtuple_error;
jpayne@69 12237 } else {
jpayne@69 12238 values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
jpayne@69 12239 }
jpayne@69 12240 __pyx_v_comment = values[0];
jpayne@69 12241 }
jpayne@69 12242 goto __pyx_L6_skip;
jpayne@69 12243 __pyx_L5_argtuple_error:;
jpayne@69 12244 __Pyx_RaiseArgtupleInvalid("set_comment", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 468, __pyx_L3_error)
jpayne@69 12245 __pyx_L6_skip:;
jpayne@69 12246 goto __pyx_L4_argument_unpacking_done;
jpayne@69 12247 __pyx_L3_error:;
jpayne@69 12248 {
jpayne@69 12249 Py_ssize_t __pyx_temp;
jpayne@69 12250 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
jpayne@69 12251 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
jpayne@69 12252 }
jpayne@69 12253 }
jpayne@69 12254 __Pyx_AddTraceback("pysam.libcfaidx.FastxRecord.set_comment", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 12255 __Pyx_RefNannyFinishContext();
jpayne@69 12256 return NULL;
jpayne@69 12257 __pyx_L4_argument_unpacking_done:;
jpayne@69 12258 __pyx_r = __pyx_pf_5pysam_9libcfaidx_11FastxRecord_8set_comment(((struct __pyx_obj_5pysam_9libcfaidx_FastxRecord *)__pyx_v_self), __pyx_v_comment);
jpayne@69 12259
jpayne@69 12260 /* function exit code */
jpayne@69 12261 {
jpayne@69 12262 Py_ssize_t __pyx_temp;
jpayne@69 12263 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
jpayne@69 12264 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
jpayne@69 12265 }
jpayne@69 12266 }
jpayne@69 12267 __Pyx_RefNannyFinishContext();
jpayne@69 12268 return __pyx_r;
jpayne@69 12269 }
jpayne@69 12270
jpayne@69 12271 static PyObject *__pyx_pf_5pysam_9libcfaidx_11FastxRecord_8set_comment(struct __pyx_obj_5pysam_9libcfaidx_FastxRecord *__pyx_v_self, PyObject *__pyx_v_comment) {
jpayne@69 12272 PyObject *__pyx_r = NULL;
jpayne@69 12273 __Pyx_TraceDeclarations
jpayne@69 12274 __Pyx_RefNannyDeclarations
jpayne@69 12275 PyObject *__pyx_t_1 = NULL;
jpayne@69 12276 int __pyx_lineno = 0;
jpayne@69 12277 const char *__pyx_filename = NULL;
jpayne@69 12278 int __pyx_clineno = 0;
jpayne@69 12279 __Pyx_TraceFrameInit(__pyx_codeobj__29)
jpayne@69 12280 __Pyx_RefNannySetupContext("set_comment", 1);
jpayne@69 12281 __Pyx_TraceCall("set_comment", __pyx_f[0], 468, 0, __PYX_ERR(0, 468, __pyx_L1_error));
jpayne@69 12282
jpayne@69 12283 /* "pysam/libcfaidx.pyx":469
jpayne@69 12284 *
jpayne@69 12285 * def set_comment(self, comment):
jpayne@69 12286 * self.comment = comment # <<<<<<<<<<<<<<
jpayne@69 12287 *
jpayne@69 12288 * def set_sequence(self, sequence, quality=None):
jpayne@69 12289 */
jpayne@69 12290 if (!(likely(PyUnicode_CheckExact(__pyx_v_comment))||((__pyx_v_comment) == Py_None) || __Pyx_RaiseUnexpectedTypeError("unicode", __pyx_v_comment))) __PYX_ERR(0, 469, __pyx_L1_error)
jpayne@69 12291 __pyx_t_1 = __pyx_v_comment;
jpayne@69 12292 __Pyx_INCREF(__pyx_t_1);
jpayne@69 12293 __Pyx_GIVEREF(__pyx_t_1);
jpayne@69 12294 __Pyx_GOTREF(__pyx_v_self->comment);
jpayne@69 12295 __Pyx_DECREF(__pyx_v_self->comment);
jpayne@69 12296 __pyx_v_self->comment = ((PyObject*)__pyx_t_1);
jpayne@69 12297 __pyx_t_1 = 0;
jpayne@69 12298
jpayne@69 12299 /* "pysam/libcfaidx.pyx":468
jpayne@69 12300 * self.name = name
jpayne@69 12301 *
jpayne@69 12302 * def set_comment(self, comment): # <<<<<<<<<<<<<<
jpayne@69 12303 * self.comment = comment
jpayne@69 12304 *
jpayne@69 12305 */
jpayne@69 12306
jpayne@69 12307 /* function exit code */
jpayne@69 12308 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
jpayne@69 12309 goto __pyx_L0;
jpayne@69 12310 __pyx_L1_error:;
jpayne@69 12311 __Pyx_XDECREF(__pyx_t_1);
jpayne@69 12312 __Pyx_AddTraceback("pysam.libcfaidx.FastxRecord.set_comment", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 12313 __pyx_r = NULL;
jpayne@69 12314 __pyx_L0:;
jpayne@69 12315 __Pyx_XGIVEREF(__pyx_r);
jpayne@69 12316 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@69 12317 __Pyx_RefNannyFinishContext();
jpayne@69 12318 return __pyx_r;
jpayne@69 12319 }
jpayne@69 12320
jpayne@69 12321 /* "pysam/libcfaidx.pyx":471
jpayne@69 12322 * self.comment = comment
jpayne@69 12323 *
jpayne@69 12324 * def set_sequence(self, sequence, quality=None): # <<<<<<<<<<<<<<
jpayne@69 12325 * """set sequence of this record.
jpayne@69 12326 *
jpayne@69 12327 */
jpayne@69 12328
jpayne@69 12329 /* Python wrapper */
jpayne@69 12330 static PyObject *__pyx_pw_5pysam_9libcfaidx_11FastxRecord_11set_sequence(PyObject *__pyx_v_self,
jpayne@69 12331 #if CYTHON_METH_FASTCALL
jpayne@69 12332 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@69 12333 #else
jpayne@69 12334 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@69 12335 #endif
jpayne@69 12336 ); /*proto*/
jpayne@69 12337 PyDoc_STRVAR(__pyx_doc_5pysam_9libcfaidx_11FastxRecord_10set_sequence, "FastxRecord.set_sequence(self, sequence, quality=None)\nset sequence of this record.\n\n ");
jpayne@69 12338 static PyMethodDef __pyx_mdef_5pysam_9libcfaidx_11FastxRecord_11set_sequence = {"set_sequence", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_9libcfaidx_11FastxRecord_11set_sequence, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_9libcfaidx_11FastxRecord_10set_sequence};
jpayne@69 12339 static PyObject *__pyx_pw_5pysam_9libcfaidx_11FastxRecord_11set_sequence(PyObject *__pyx_v_self,
jpayne@69 12340 #if CYTHON_METH_FASTCALL
jpayne@69 12341 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@69 12342 #else
jpayne@69 12343 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@69 12344 #endif
jpayne@69 12345 ) {
jpayne@69 12346 PyObject *__pyx_v_sequence = 0;
jpayne@69 12347 PyObject *__pyx_v_quality = 0;
jpayne@69 12348 #if !CYTHON_METH_FASTCALL
jpayne@69 12349 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
jpayne@69 12350 #endif
jpayne@69 12351 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@69 12352 PyObject* values[2] = {0,0};
jpayne@69 12353 int __pyx_lineno = 0;
jpayne@69 12354 const char *__pyx_filename = NULL;
jpayne@69 12355 int __pyx_clineno = 0;
jpayne@69 12356 PyObject *__pyx_r = 0;
jpayne@69 12357 __Pyx_RefNannyDeclarations
jpayne@69 12358 __Pyx_RefNannySetupContext("set_sequence (wrapper)", 0);
jpayne@69 12359 #if !CYTHON_METH_FASTCALL
jpayne@69 12360 #if CYTHON_ASSUME_SAFE_MACROS
jpayne@69 12361 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
jpayne@69 12362 #else
jpayne@69 12363 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
jpayne@69 12364 #endif
jpayne@69 12365 #endif
jpayne@69 12366 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
jpayne@69 12367 {
jpayne@69 12368 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_sequence,&__pyx_n_s_quality,0};
jpayne@69 12369 values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_None));
jpayne@69 12370 if (__pyx_kwds) {
jpayne@69 12371 Py_ssize_t kw_args;
jpayne@69 12372 switch (__pyx_nargs) {
jpayne@69 12373 case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
jpayne@69 12374 CYTHON_FALLTHROUGH;
jpayne@69 12375 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
jpayne@69 12376 CYTHON_FALLTHROUGH;
jpayne@69 12377 case 0: break;
jpayne@69 12378 default: goto __pyx_L5_argtuple_error;
jpayne@69 12379 }
jpayne@69 12380 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
jpayne@69 12381 switch (__pyx_nargs) {
jpayne@69 12382 case 0:
jpayne@69 12383 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_sequence)) != 0)) {
jpayne@69 12384 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
jpayne@69 12385 kw_args--;
jpayne@69 12386 }
jpayne@69 12387 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 471, __pyx_L3_error)
jpayne@69 12388 else goto __pyx_L5_argtuple_error;
jpayne@69 12389 CYTHON_FALLTHROUGH;
jpayne@69 12390 case 1:
jpayne@69 12391 if (kw_args > 0) {
jpayne@69 12392 PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_quality);
jpayne@69 12393 if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
jpayne@69 12394 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 471, __pyx_L3_error)
jpayne@69 12395 }
jpayne@69 12396 }
jpayne@69 12397 if (unlikely(kw_args > 0)) {
jpayne@69 12398 const Py_ssize_t kwd_pos_args = __pyx_nargs;
jpayne@69 12399 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "set_sequence") < 0)) __PYX_ERR(0, 471, __pyx_L3_error)
jpayne@69 12400 }
jpayne@69 12401 } else {
jpayne@69 12402 switch (__pyx_nargs) {
jpayne@69 12403 case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
jpayne@69 12404 CYTHON_FALLTHROUGH;
jpayne@69 12405 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
jpayne@69 12406 break;
jpayne@69 12407 default: goto __pyx_L5_argtuple_error;
jpayne@69 12408 }
jpayne@69 12409 }
jpayne@69 12410 __pyx_v_sequence = values[0];
jpayne@69 12411 __pyx_v_quality = values[1];
jpayne@69 12412 }
jpayne@69 12413 goto __pyx_L6_skip;
jpayne@69 12414 __pyx_L5_argtuple_error:;
jpayne@69 12415 __Pyx_RaiseArgtupleInvalid("set_sequence", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 471, __pyx_L3_error)
jpayne@69 12416 __pyx_L6_skip:;
jpayne@69 12417 goto __pyx_L4_argument_unpacking_done;
jpayne@69 12418 __pyx_L3_error:;
jpayne@69 12419 {
jpayne@69 12420 Py_ssize_t __pyx_temp;
jpayne@69 12421 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
jpayne@69 12422 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
jpayne@69 12423 }
jpayne@69 12424 }
jpayne@69 12425 __Pyx_AddTraceback("pysam.libcfaidx.FastxRecord.set_sequence", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 12426 __Pyx_RefNannyFinishContext();
jpayne@69 12427 return NULL;
jpayne@69 12428 __pyx_L4_argument_unpacking_done:;
jpayne@69 12429 __pyx_r = __pyx_pf_5pysam_9libcfaidx_11FastxRecord_10set_sequence(((struct __pyx_obj_5pysam_9libcfaidx_FastxRecord *)__pyx_v_self), __pyx_v_sequence, __pyx_v_quality);
jpayne@69 12430
jpayne@69 12431 /* function exit code */
jpayne@69 12432 {
jpayne@69 12433 Py_ssize_t __pyx_temp;
jpayne@69 12434 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
jpayne@69 12435 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
jpayne@69 12436 }
jpayne@69 12437 }
jpayne@69 12438 __Pyx_RefNannyFinishContext();
jpayne@69 12439 return __pyx_r;
jpayne@69 12440 }
jpayne@69 12441
jpayne@69 12442 static PyObject *__pyx_pf_5pysam_9libcfaidx_11FastxRecord_10set_sequence(struct __pyx_obj_5pysam_9libcfaidx_FastxRecord *__pyx_v_self, PyObject *__pyx_v_sequence, PyObject *__pyx_v_quality) {
jpayne@69 12443 PyObject *__pyx_r = NULL;
jpayne@69 12444 __Pyx_TraceDeclarations
jpayne@69 12445 __Pyx_RefNannyDeclarations
jpayne@69 12446 PyObject *__pyx_t_1 = NULL;
jpayne@69 12447 int __pyx_t_2;
jpayne@69 12448 Py_ssize_t __pyx_t_3;
jpayne@69 12449 Py_ssize_t __pyx_t_4;
jpayne@69 12450 PyObject *__pyx_t_5 = NULL;
jpayne@69 12451 PyObject *__pyx_t_6 = NULL;
jpayne@69 12452 PyObject *__pyx_t_7 = NULL;
jpayne@69 12453 PyObject *__pyx_t_8 = NULL;
jpayne@69 12454 unsigned int __pyx_t_9;
jpayne@69 12455 int __pyx_lineno = 0;
jpayne@69 12456 const char *__pyx_filename = NULL;
jpayne@69 12457 int __pyx_clineno = 0;
jpayne@69 12458 __Pyx_TraceFrameInit(__pyx_codeobj__30)
jpayne@69 12459 __Pyx_RefNannySetupContext("set_sequence", 1);
jpayne@69 12460 __Pyx_TraceCall("set_sequence", __pyx_f[0], 471, 0, __PYX_ERR(0, 471, __pyx_L1_error));
jpayne@69 12461
jpayne@69 12462 /* "pysam/libcfaidx.pyx":475
jpayne@69 12463 *
jpayne@69 12464 * """
jpayne@69 12465 * self.sequence = sequence # <<<<<<<<<<<<<<
jpayne@69 12466 * if quality is not None:
jpayne@69 12467 * if len(sequence) != len(quality):
jpayne@69 12468 */
jpayne@69 12469 if (!(likely(PyUnicode_CheckExact(__pyx_v_sequence))||((__pyx_v_sequence) == Py_None) || __Pyx_RaiseUnexpectedTypeError("unicode", __pyx_v_sequence))) __PYX_ERR(0, 475, __pyx_L1_error)
jpayne@69 12470 __pyx_t_1 = __pyx_v_sequence;
jpayne@69 12471 __Pyx_INCREF(__pyx_t_1);
jpayne@69 12472 __Pyx_GIVEREF(__pyx_t_1);
jpayne@69 12473 __Pyx_GOTREF(__pyx_v_self->sequence);
jpayne@69 12474 __Pyx_DECREF(__pyx_v_self->sequence);
jpayne@69 12475 __pyx_v_self->sequence = ((PyObject*)__pyx_t_1);
jpayne@69 12476 __pyx_t_1 = 0;
jpayne@69 12477
jpayne@69 12478 /* "pysam/libcfaidx.pyx":476
jpayne@69 12479 * """
jpayne@69 12480 * self.sequence = sequence
jpayne@69 12481 * if quality is not None: # <<<<<<<<<<<<<<
jpayne@69 12482 * if len(sequence) != len(quality):
jpayne@69 12483 * raise ValueError("sequence and quality length do not match: {} vs {}".format(
jpayne@69 12484 */
jpayne@69 12485 __pyx_t_2 = (__pyx_v_quality != Py_None);
jpayne@69 12486 if (__pyx_t_2) {
jpayne@69 12487
jpayne@69 12488 /* "pysam/libcfaidx.pyx":477
jpayne@69 12489 * self.sequence = sequence
jpayne@69 12490 * if quality is not None:
jpayne@69 12491 * if len(sequence) != len(quality): # <<<<<<<<<<<<<<
jpayne@69 12492 * raise ValueError("sequence and quality length do not match: {} vs {}".format(
jpayne@69 12493 * len(sequence), len(quality)))
jpayne@69 12494 */
jpayne@69 12495 __pyx_t_3 = PyObject_Length(__pyx_v_sequence); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(0, 477, __pyx_L1_error)
jpayne@69 12496 __pyx_t_4 = PyObject_Length(__pyx_v_quality); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(0, 477, __pyx_L1_error)
jpayne@69 12497 __pyx_t_2 = (__pyx_t_3 != __pyx_t_4);
jpayne@69 12498 if (unlikely(__pyx_t_2)) {
jpayne@69 12499
jpayne@69 12500 /* "pysam/libcfaidx.pyx":478
jpayne@69 12501 * if quality is not None:
jpayne@69 12502 * if len(sequence) != len(quality):
jpayne@69 12503 * raise ValueError("sequence and quality length do not match: {} vs {}".format( # <<<<<<<<<<<<<<
jpayne@69 12504 * len(sequence), len(quality)))
jpayne@69 12505 *
jpayne@69 12506 */
jpayne@69 12507 __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_sequence_and_quality_length_do_n, __pyx_n_s_format); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 478, __pyx_L1_error)
jpayne@69 12508 __Pyx_GOTREF(__pyx_t_5);
jpayne@69 12509
jpayne@69 12510 /* "pysam/libcfaidx.pyx":479
jpayne@69 12511 * if len(sequence) != len(quality):
jpayne@69 12512 * raise ValueError("sequence and quality length do not match: {} vs {}".format(
jpayne@69 12513 * len(sequence), len(quality))) # <<<<<<<<<<<<<<
jpayne@69 12514 *
jpayne@69 12515 * self.quality = quality
jpayne@69 12516 */
jpayne@69 12517 __pyx_t_4 = PyObject_Length(__pyx_v_sequence); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(0, 479, __pyx_L1_error)
jpayne@69 12518 __pyx_t_6 = PyInt_FromSsize_t(__pyx_t_4); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 479, __pyx_L1_error)
jpayne@69 12519 __Pyx_GOTREF(__pyx_t_6);
jpayne@69 12520 __pyx_t_4 = PyObject_Length(__pyx_v_quality); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(0, 479, __pyx_L1_error)
jpayne@69 12521 __pyx_t_7 = PyInt_FromSsize_t(__pyx_t_4); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 479, __pyx_L1_error)
jpayne@69 12522 __Pyx_GOTREF(__pyx_t_7);
jpayne@69 12523 __pyx_t_8 = NULL;
jpayne@69 12524 __pyx_t_9 = 0;
jpayne@69 12525 #if CYTHON_UNPACK_METHODS
jpayne@69 12526 if (likely(PyMethod_Check(__pyx_t_5))) {
jpayne@69 12527 __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_5);
jpayne@69 12528 if (likely(__pyx_t_8)) {
jpayne@69 12529 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
jpayne@69 12530 __Pyx_INCREF(__pyx_t_8);
jpayne@69 12531 __Pyx_INCREF(function);
jpayne@69 12532 __Pyx_DECREF_SET(__pyx_t_5, function);
jpayne@69 12533 __pyx_t_9 = 1;
jpayne@69 12534 }
jpayne@69 12535 }
jpayne@69 12536 #endif
jpayne@69 12537 {
jpayne@69 12538 PyObject *__pyx_callargs[3] = {__pyx_t_8, __pyx_t_6, __pyx_t_7};
jpayne@69 12539 __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+1-__pyx_t_9, 2+__pyx_t_9);
jpayne@69 12540 __Pyx_XDECREF(__pyx_t_8); __pyx_t_8 = 0;
jpayne@69 12541 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
jpayne@69 12542 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
jpayne@69 12543 if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 478, __pyx_L1_error)
jpayne@69 12544 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 12545 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
jpayne@69 12546 }
jpayne@69 12547
jpayne@69 12548 /* "pysam/libcfaidx.pyx":478
jpayne@69 12549 * if quality is not None:
jpayne@69 12550 * if len(sequence) != len(quality):
jpayne@69 12551 * raise ValueError("sequence and quality length do not match: {} vs {}".format( # <<<<<<<<<<<<<<
jpayne@69 12552 * len(sequence), len(quality)))
jpayne@69 12553 *
jpayne@69 12554 */
jpayne@69 12555 __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 478, __pyx_L1_error)
jpayne@69 12556 __Pyx_GOTREF(__pyx_t_5);
jpayne@69 12557 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@69 12558 __Pyx_Raise(__pyx_t_5, 0, 0, 0);
jpayne@69 12559 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
jpayne@69 12560 __PYX_ERR(0, 478, __pyx_L1_error)
jpayne@69 12561
jpayne@69 12562 /* "pysam/libcfaidx.pyx":477
jpayne@69 12563 * self.sequence = sequence
jpayne@69 12564 * if quality is not None:
jpayne@69 12565 * if len(sequence) != len(quality): # <<<<<<<<<<<<<<
jpayne@69 12566 * raise ValueError("sequence and quality length do not match: {} vs {}".format(
jpayne@69 12567 * len(sequence), len(quality)))
jpayne@69 12568 */
jpayne@69 12569 }
jpayne@69 12570
jpayne@69 12571 /* "pysam/libcfaidx.pyx":481
jpayne@69 12572 * len(sequence), len(quality)))
jpayne@69 12573 *
jpayne@69 12574 * self.quality = quality # <<<<<<<<<<<<<<
jpayne@69 12575 * else:
jpayne@69 12576 * self.quality = None
jpayne@69 12577 */
jpayne@69 12578 if (!(likely(PyUnicode_CheckExact(__pyx_v_quality))||((__pyx_v_quality) == Py_None) || __Pyx_RaiseUnexpectedTypeError("unicode", __pyx_v_quality))) __PYX_ERR(0, 481, __pyx_L1_error)
jpayne@69 12579 __pyx_t_5 = __pyx_v_quality;
jpayne@69 12580 __Pyx_INCREF(__pyx_t_5);
jpayne@69 12581 __Pyx_GIVEREF(__pyx_t_5);
jpayne@69 12582 __Pyx_GOTREF(__pyx_v_self->quality);
jpayne@69 12583 __Pyx_DECREF(__pyx_v_self->quality);
jpayne@69 12584 __pyx_v_self->quality = ((PyObject*)__pyx_t_5);
jpayne@69 12585 __pyx_t_5 = 0;
jpayne@69 12586
jpayne@69 12587 /* "pysam/libcfaidx.pyx":476
jpayne@69 12588 * """
jpayne@69 12589 * self.sequence = sequence
jpayne@69 12590 * if quality is not None: # <<<<<<<<<<<<<<
jpayne@69 12591 * if len(sequence) != len(quality):
jpayne@69 12592 * raise ValueError("sequence and quality length do not match: {} vs {}".format(
jpayne@69 12593 */
jpayne@69 12594 goto __pyx_L3;
jpayne@69 12595 }
jpayne@69 12596
jpayne@69 12597 /* "pysam/libcfaidx.pyx":483
jpayne@69 12598 * self.quality = quality
jpayne@69 12599 * else:
jpayne@69 12600 * self.quality = None # <<<<<<<<<<<<<<
jpayne@69 12601 *
jpayne@69 12602 * def __str__(self):
jpayne@69 12603 */
jpayne@69 12604 /*else*/ {
jpayne@69 12605 __Pyx_INCREF(Py_None);
jpayne@69 12606 __Pyx_GIVEREF(Py_None);
jpayne@69 12607 __Pyx_GOTREF(__pyx_v_self->quality);
jpayne@69 12608 __Pyx_DECREF(__pyx_v_self->quality);
jpayne@69 12609 __pyx_v_self->quality = ((PyObject*)Py_None);
jpayne@69 12610 }
jpayne@69 12611 __pyx_L3:;
jpayne@69 12612
jpayne@69 12613 /* "pysam/libcfaidx.pyx":471
jpayne@69 12614 * self.comment = comment
jpayne@69 12615 *
jpayne@69 12616 * def set_sequence(self, sequence, quality=None): # <<<<<<<<<<<<<<
jpayne@69 12617 * """set sequence of this record.
jpayne@69 12618 *
jpayne@69 12619 */
jpayne@69 12620
jpayne@69 12621 /* function exit code */
jpayne@69 12622 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
jpayne@69 12623 goto __pyx_L0;
jpayne@69 12624 __pyx_L1_error:;
jpayne@69 12625 __Pyx_XDECREF(__pyx_t_1);
jpayne@69 12626 __Pyx_XDECREF(__pyx_t_5);
jpayne@69 12627 __Pyx_XDECREF(__pyx_t_6);
jpayne@69 12628 __Pyx_XDECREF(__pyx_t_7);
jpayne@69 12629 __Pyx_XDECREF(__pyx_t_8);
jpayne@69 12630 __Pyx_AddTraceback("pysam.libcfaidx.FastxRecord.set_sequence", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 12631 __pyx_r = NULL;
jpayne@69 12632 __pyx_L0:;
jpayne@69 12633 __Pyx_XGIVEREF(__pyx_r);
jpayne@69 12634 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@69 12635 __Pyx_RefNannyFinishContext();
jpayne@69 12636 return __pyx_r;
jpayne@69 12637 }
jpayne@69 12638
jpayne@69 12639 /* "pysam/libcfaidx.pyx":485
jpayne@69 12640 * self.quality = None
jpayne@69 12641 *
jpayne@69 12642 * def __str__(self): # <<<<<<<<<<<<<<
jpayne@69 12643 * return self.to_string()
jpayne@69 12644 *
jpayne@69 12645 */
jpayne@69 12646
jpayne@69 12647 /* Python wrapper */
jpayne@69 12648 static PyObject *__pyx_pw_5pysam_9libcfaidx_11FastxRecord_13__str__(PyObject *__pyx_v_self); /*proto*/
jpayne@69 12649 static PyObject *__pyx_pw_5pysam_9libcfaidx_11FastxRecord_13__str__(PyObject *__pyx_v_self) {
jpayne@69 12650 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@69 12651 PyObject *__pyx_r = 0;
jpayne@69 12652 __Pyx_RefNannyDeclarations
jpayne@69 12653 __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
jpayne@69 12654 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
jpayne@69 12655 __pyx_r = __pyx_pf_5pysam_9libcfaidx_11FastxRecord_12__str__(((struct __pyx_obj_5pysam_9libcfaidx_FastxRecord *)__pyx_v_self));
jpayne@69 12656
jpayne@69 12657 /* function exit code */
jpayne@69 12658 __Pyx_RefNannyFinishContext();
jpayne@69 12659 return __pyx_r;
jpayne@69 12660 }
jpayne@69 12661
jpayne@69 12662 static PyObject *__pyx_pf_5pysam_9libcfaidx_11FastxRecord_12__str__(struct __pyx_obj_5pysam_9libcfaidx_FastxRecord *__pyx_v_self) {
jpayne@69 12663 PyObject *__pyx_r = NULL;
jpayne@69 12664 __Pyx_TraceDeclarations
jpayne@69 12665 __Pyx_RefNannyDeclarations
jpayne@69 12666 PyObject *__pyx_t_1 = NULL;
jpayne@69 12667 int __pyx_lineno = 0;
jpayne@69 12668 const char *__pyx_filename = NULL;
jpayne@69 12669 int __pyx_clineno = 0;
jpayne@69 12670 __Pyx_RefNannySetupContext("__str__", 1);
jpayne@69 12671 __Pyx_TraceCall("__str__", __pyx_f[0], 485, 0, __PYX_ERR(0, 485, __pyx_L1_error));
jpayne@69 12672
jpayne@69 12673 /* "pysam/libcfaidx.pyx":486
jpayne@69 12674 *
jpayne@69 12675 * def __str__(self):
jpayne@69 12676 * return self.to_string() # <<<<<<<<<<<<<<
jpayne@69 12677 *
jpayne@69 12678 * cpdef array.array get_quality_array(self, int offset=33):
jpayne@69 12679 */
jpayne@69 12680 __Pyx_XDECREF(__pyx_r);
jpayne@69 12681 __pyx_t_1 = ((struct __pyx_vtabstruct_5pysam_9libcfaidx_FastxRecord *)__pyx_v_self->__pyx_vtab)->to_string(__pyx_v_self); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 486, __pyx_L1_error)
jpayne@69 12682 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 12683 __pyx_r = __pyx_t_1;
jpayne@69 12684 __pyx_t_1 = 0;
jpayne@69 12685 goto __pyx_L0;
jpayne@69 12686
jpayne@69 12687 /* "pysam/libcfaidx.pyx":485
jpayne@69 12688 * self.quality = None
jpayne@69 12689 *
jpayne@69 12690 * def __str__(self): # <<<<<<<<<<<<<<
jpayne@69 12691 * return self.to_string()
jpayne@69 12692 *
jpayne@69 12693 */
jpayne@69 12694
jpayne@69 12695 /* function exit code */
jpayne@69 12696 __pyx_L1_error:;
jpayne@69 12697 __Pyx_XDECREF(__pyx_t_1);
jpayne@69 12698 __Pyx_AddTraceback("pysam.libcfaidx.FastxRecord.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 12699 __pyx_r = NULL;
jpayne@69 12700 __pyx_L0:;
jpayne@69 12701 __Pyx_XGIVEREF(__pyx_r);
jpayne@69 12702 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@69 12703 __Pyx_RefNannyFinishContext();
jpayne@69 12704 return __pyx_r;
jpayne@69 12705 }
jpayne@69 12706
jpayne@69 12707 /* "pysam/libcfaidx.pyx":488
jpayne@69 12708 * return self.to_string()
jpayne@69 12709 *
jpayne@69 12710 * cpdef array.array get_quality_array(self, int offset=33): # <<<<<<<<<<<<<<
jpayne@69 12711 * '''return quality values as array after subtracting offset.'''
jpayne@69 12712 * if self.quality is None:
jpayne@69 12713 */
jpayne@69 12714
jpayne@69 12715 static PyObject *__pyx_pw_5pysam_9libcfaidx_11FastxRecord_15get_quality_array(PyObject *__pyx_v_self,
jpayne@69 12716 #if CYTHON_METH_FASTCALL
jpayne@69 12717 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@69 12718 #else
jpayne@69 12719 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@69 12720 #endif
jpayne@69 12721 ); /*proto*/
jpayne@69 12722 static arrayobject *__pyx_f_5pysam_9libcfaidx_11FastxRecord_get_quality_array(struct __pyx_obj_5pysam_9libcfaidx_FastxRecord *__pyx_v_self, int __pyx_skip_dispatch, struct __pyx_opt_args_5pysam_9libcfaidx_11FastxRecord_get_quality_array *__pyx_optional_args) {
jpayne@69 12723 int __pyx_v_offset = ((int)33);
jpayne@69 12724 arrayobject *__pyx_r = NULL;
jpayne@69 12725 __Pyx_TraceDeclarations
jpayne@69 12726 __Pyx_RefNannyDeclarations
jpayne@69 12727 PyObject *__pyx_t_1 = NULL;
jpayne@69 12728 PyObject *__pyx_t_2 = NULL;
jpayne@69 12729 PyObject *__pyx_t_3 = NULL;
jpayne@69 12730 PyObject *__pyx_t_4 = NULL;
jpayne@69 12731 PyObject *__pyx_t_5 = NULL;
jpayne@69 12732 unsigned int __pyx_t_6;
jpayne@69 12733 int __pyx_t_7;
jpayne@69 12734 struct __pyx_opt_args_5pysam_9libcutils_qualitystring_to_array __pyx_t_8;
jpayne@69 12735 int __pyx_lineno = 0;
jpayne@69 12736 const char *__pyx_filename = NULL;
jpayne@69 12737 int __pyx_clineno = 0;
jpayne@69 12738 __Pyx_TraceFrameInit(__pyx_codeobj__31)
jpayne@69 12739 __Pyx_RefNannySetupContext("get_quality_array", 1);
jpayne@69 12740 __Pyx_TraceCall("get_quality_array", __pyx_f[0], 488, 0, __PYX_ERR(0, 488, __pyx_L1_error));
jpayne@69 12741 if (__pyx_optional_args) {
jpayne@69 12742 if (__pyx_optional_args->__pyx_n > 0) {
jpayne@69 12743 __pyx_v_offset = __pyx_optional_args->offset;
jpayne@69 12744 }
jpayne@69 12745 }
jpayne@69 12746 /* Check if called by wrapper */
jpayne@69 12747 if (unlikely(__pyx_skip_dispatch)) ;
jpayne@69 12748 /* Check if overridden in Python */
jpayne@69 12749 else if (unlikely((Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0) || __Pyx_PyType_HasFeature(Py_TYPE(((PyObject *)__pyx_v_self)), (Py_TPFLAGS_IS_ABSTRACT | Py_TPFLAGS_HEAPTYPE)))) {
jpayne@69 12750 #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
jpayne@69 12751 static PY_UINT64_T __pyx_tp_dict_version = __PYX_DICT_VERSION_INIT, __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
jpayne@69 12752 if (unlikely(!__Pyx_object_dict_version_matches(((PyObject *)__pyx_v_self), __pyx_tp_dict_version, __pyx_obj_dict_version))) {
jpayne@69 12753 PY_UINT64_T __pyx_typedict_guard = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
jpayne@69 12754 #endif
jpayne@69 12755 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_get_quality_array); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 488, __pyx_L1_error)
jpayne@69 12756 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 12757 if (!__Pyx_IsSameCFunction(__pyx_t_1, (void*) __pyx_pw_5pysam_9libcfaidx_11FastxRecord_15get_quality_array)) {
jpayne@69 12758 __Pyx_XDECREF((PyObject *)__pyx_r);
jpayne@69 12759 __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_offset); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 488, __pyx_L1_error)
jpayne@69 12760 __Pyx_GOTREF(__pyx_t_3);
jpayne@69 12761 __Pyx_INCREF(__pyx_t_1);
jpayne@69 12762 __pyx_t_4 = __pyx_t_1; __pyx_t_5 = NULL;
jpayne@69 12763 __pyx_t_6 = 0;
jpayne@69 12764 #if CYTHON_UNPACK_METHODS
jpayne@69 12765 if (unlikely(PyMethod_Check(__pyx_t_4))) {
jpayne@69 12766 __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
jpayne@69 12767 if (likely(__pyx_t_5)) {
jpayne@69 12768 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
jpayne@69 12769 __Pyx_INCREF(__pyx_t_5);
jpayne@69 12770 __Pyx_INCREF(function);
jpayne@69 12771 __Pyx_DECREF_SET(__pyx_t_4, function);
jpayne@69 12772 __pyx_t_6 = 1;
jpayne@69 12773 }
jpayne@69 12774 }
jpayne@69 12775 #endif
jpayne@69 12776 {
jpayne@69 12777 PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_t_3};
jpayne@69 12778 __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_4, __pyx_callargs+1-__pyx_t_6, 1+__pyx_t_6);
jpayne@69 12779 __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
jpayne@69 12780 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
jpayne@69 12781 if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 488, __pyx_L1_error)
jpayne@69 12782 __Pyx_GOTREF(__pyx_t_2);
jpayne@69 12783 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
jpayne@69 12784 }
jpayne@69 12785 if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_7cpython_5array_array))))) __PYX_ERR(0, 488, __pyx_L1_error)
jpayne@69 12786 __pyx_r = ((arrayobject *)__pyx_t_2);
jpayne@69 12787 __pyx_t_2 = 0;
jpayne@69 12788 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@69 12789 goto __pyx_L0;
jpayne@69 12790 }
jpayne@69 12791 #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
jpayne@69 12792 __pyx_tp_dict_version = __Pyx_get_tp_dict_version(((PyObject *)__pyx_v_self));
jpayne@69 12793 __pyx_obj_dict_version = __Pyx_get_object_dict_version(((PyObject *)__pyx_v_self));
jpayne@69 12794 if (unlikely(__pyx_typedict_guard != __pyx_tp_dict_version)) {
jpayne@69 12795 __pyx_tp_dict_version = __pyx_obj_dict_version = __PYX_DICT_VERSION_INIT;
jpayne@69 12796 }
jpayne@69 12797 #endif
jpayne@69 12798 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@69 12799 #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_PYTYPE_LOOKUP && CYTHON_USE_TYPE_SLOTS
jpayne@69 12800 }
jpayne@69 12801 #endif
jpayne@69 12802 }
jpayne@69 12803
jpayne@69 12804 /* "pysam/libcfaidx.pyx":490
jpayne@69 12805 * cpdef array.array get_quality_array(self, int offset=33):
jpayne@69 12806 * '''return quality values as array after subtracting offset.'''
jpayne@69 12807 * if self.quality is None: # <<<<<<<<<<<<<<
jpayne@69 12808 * return None
jpayne@69 12809 * return qualitystring_to_array(force_bytes(self.quality),
jpayne@69 12810 */
jpayne@69 12811 __pyx_t_7 = (__pyx_v_self->quality == ((PyObject*)Py_None));
jpayne@69 12812 if (__pyx_t_7) {
jpayne@69 12813
jpayne@69 12814 /* "pysam/libcfaidx.pyx":491
jpayne@69 12815 * '''return quality values as array after subtracting offset.'''
jpayne@69 12816 * if self.quality is None:
jpayne@69 12817 * return None # <<<<<<<<<<<<<<
jpayne@69 12818 * return qualitystring_to_array(force_bytes(self.quality),
jpayne@69 12819 * offset=offset)
jpayne@69 12820 */
jpayne@69 12821 __Pyx_XDECREF((PyObject *)__pyx_r);
jpayne@69 12822 __pyx_r = ((arrayobject *)Py_None); __Pyx_INCREF(Py_None);
jpayne@69 12823 goto __pyx_L0;
jpayne@69 12824
jpayne@69 12825 /* "pysam/libcfaidx.pyx":490
jpayne@69 12826 * cpdef array.array get_quality_array(self, int offset=33):
jpayne@69 12827 * '''return quality values as array after subtracting offset.'''
jpayne@69 12828 * if self.quality is None: # <<<<<<<<<<<<<<
jpayne@69 12829 * return None
jpayne@69 12830 * return qualitystring_to_array(force_bytes(self.quality),
jpayne@69 12831 */
jpayne@69 12832 }
jpayne@69 12833
jpayne@69 12834 /* "pysam/libcfaidx.pyx":492
jpayne@69 12835 * if self.quality is None:
jpayne@69 12836 * return None
jpayne@69 12837 * return qualitystring_to_array(force_bytes(self.quality), # <<<<<<<<<<<<<<
jpayne@69 12838 * offset=offset)
jpayne@69 12839 *
jpayne@69 12840 */
jpayne@69 12841 __Pyx_XDECREF((PyObject *)__pyx_r);
jpayne@69 12842 __pyx_t_1 = __pyx_v_self->quality;
jpayne@69 12843 __Pyx_INCREF(__pyx_t_1);
jpayne@69 12844 __pyx_t_2 = __pyx_f_5pysam_9libcutils_force_bytes(__pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 492, __pyx_L1_error)
jpayne@69 12845 __Pyx_GOTREF(__pyx_t_2);
jpayne@69 12846 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@69 12847
jpayne@69 12848 /* "pysam/libcfaidx.pyx":493
jpayne@69 12849 * return None
jpayne@69 12850 * return qualitystring_to_array(force_bytes(self.quality),
jpayne@69 12851 * offset=offset) # <<<<<<<<<<<<<<
jpayne@69 12852 *
jpayne@69 12853 *
jpayne@69 12854 */
jpayne@69 12855 __pyx_t_8.__pyx_n = 1;
jpayne@69 12856 __pyx_t_8.offset = __pyx_v_offset;
jpayne@69 12857 __pyx_t_1 = ((PyObject *)__pyx_f_5pysam_9libcutils_qualitystring_to_array(__pyx_t_2, 0, &__pyx_t_8)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 492, __pyx_L1_error)
jpayne@69 12858 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 12859 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@69 12860 __pyx_r = ((arrayobject *)__pyx_t_1);
jpayne@69 12861 __pyx_t_1 = 0;
jpayne@69 12862 goto __pyx_L0;
jpayne@69 12863
jpayne@69 12864 /* "pysam/libcfaidx.pyx":488
jpayne@69 12865 * return self.to_string()
jpayne@69 12866 *
jpayne@69 12867 * cpdef array.array get_quality_array(self, int offset=33): # <<<<<<<<<<<<<<
jpayne@69 12868 * '''return quality values as array after subtracting offset.'''
jpayne@69 12869 * if self.quality is None:
jpayne@69 12870 */
jpayne@69 12871
jpayne@69 12872 /* function exit code */
jpayne@69 12873 __pyx_L1_error:;
jpayne@69 12874 __Pyx_XDECREF(__pyx_t_1);
jpayne@69 12875 __Pyx_XDECREF(__pyx_t_2);
jpayne@69 12876 __Pyx_XDECREF(__pyx_t_3);
jpayne@69 12877 __Pyx_XDECREF(__pyx_t_4);
jpayne@69 12878 __Pyx_XDECREF(__pyx_t_5);
jpayne@69 12879 __Pyx_AddTraceback("pysam.libcfaidx.FastxRecord.get_quality_array", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 12880 __pyx_r = 0;
jpayne@69 12881 __pyx_L0:;
jpayne@69 12882 __Pyx_XGIVEREF((PyObject *)__pyx_r);
jpayne@69 12883 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@69 12884 __Pyx_RefNannyFinishContext();
jpayne@69 12885 return __pyx_r;
jpayne@69 12886 }
jpayne@69 12887
jpayne@69 12888 /* Python wrapper */
jpayne@69 12889 static PyObject *__pyx_pw_5pysam_9libcfaidx_11FastxRecord_15get_quality_array(PyObject *__pyx_v_self,
jpayne@69 12890 #if CYTHON_METH_FASTCALL
jpayne@69 12891 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@69 12892 #else
jpayne@69 12893 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@69 12894 #endif
jpayne@69 12895 ); /*proto*/
jpayne@69 12896 PyDoc_STRVAR(__pyx_doc_5pysam_9libcfaidx_11FastxRecord_14get_quality_array, "FastxRecord.get_quality_array(self, int offset=33) -> array\nreturn quality values as array after subtracting offset.");
jpayne@69 12897 static PyMethodDef __pyx_mdef_5pysam_9libcfaidx_11FastxRecord_15get_quality_array = {"get_quality_array", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_9libcfaidx_11FastxRecord_15get_quality_array, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_9libcfaidx_11FastxRecord_14get_quality_array};
jpayne@69 12898 static PyObject *__pyx_pw_5pysam_9libcfaidx_11FastxRecord_15get_quality_array(PyObject *__pyx_v_self,
jpayne@69 12899 #if CYTHON_METH_FASTCALL
jpayne@69 12900 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@69 12901 #else
jpayne@69 12902 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@69 12903 #endif
jpayne@69 12904 ) {
jpayne@69 12905 int __pyx_v_offset;
jpayne@69 12906 #if !CYTHON_METH_FASTCALL
jpayne@69 12907 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
jpayne@69 12908 #endif
jpayne@69 12909 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@69 12910 PyObject* values[1] = {0};
jpayne@69 12911 int __pyx_lineno = 0;
jpayne@69 12912 const char *__pyx_filename = NULL;
jpayne@69 12913 int __pyx_clineno = 0;
jpayne@69 12914 PyObject *__pyx_r = 0;
jpayne@69 12915 __Pyx_RefNannyDeclarations
jpayne@69 12916 __Pyx_RefNannySetupContext("get_quality_array (wrapper)", 0);
jpayne@69 12917 #if !CYTHON_METH_FASTCALL
jpayne@69 12918 #if CYTHON_ASSUME_SAFE_MACROS
jpayne@69 12919 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
jpayne@69 12920 #else
jpayne@69 12921 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
jpayne@69 12922 #endif
jpayne@69 12923 #endif
jpayne@69 12924 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
jpayne@69 12925 {
jpayne@69 12926 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_offset,0};
jpayne@69 12927 if (__pyx_kwds) {
jpayne@69 12928 Py_ssize_t kw_args;
jpayne@69 12929 switch (__pyx_nargs) {
jpayne@69 12930 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
jpayne@69 12931 CYTHON_FALLTHROUGH;
jpayne@69 12932 case 0: break;
jpayne@69 12933 default: goto __pyx_L5_argtuple_error;
jpayne@69 12934 }
jpayne@69 12935 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
jpayne@69 12936 switch (__pyx_nargs) {
jpayne@69 12937 case 0:
jpayne@69 12938 if (kw_args > 0) {
jpayne@69 12939 PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_offset);
jpayne@69 12940 if (value) { values[0] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
jpayne@69 12941 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 488, __pyx_L3_error)
jpayne@69 12942 }
jpayne@69 12943 }
jpayne@69 12944 if (unlikely(kw_args > 0)) {
jpayne@69 12945 const Py_ssize_t kwd_pos_args = __pyx_nargs;
jpayne@69 12946 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "get_quality_array") < 0)) __PYX_ERR(0, 488, __pyx_L3_error)
jpayne@69 12947 }
jpayne@69 12948 } else {
jpayne@69 12949 switch (__pyx_nargs) {
jpayne@69 12950 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
jpayne@69 12951 CYTHON_FALLTHROUGH;
jpayne@69 12952 case 0: break;
jpayne@69 12953 default: goto __pyx_L5_argtuple_error;
jpayne@69 12954 }
jpayne@69 12955 }
jpayne@69 12956 if (values[0]) {
jpayne@69 12957 __pyx_v_offset = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_offset == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 488, __pyx_L3_error)
jpayne@69 12958 } else {
jpayne@69 12959 __pyx_v_offset = ((int)33);
jpayne@69 12960 }
jpayne@69 12961 }
jpayne@69 12962 goto __pyx_L6_skip;
jpayne@69 12963 __pyx_L5_argtuple_error:;
jpayne@69 12964 __Pyx_RaiseArgtupleInvalid("get_quality_array", 0, 0, 1, __pyx_nargs); __PYX_ERR(0, 488, __pyx_L3_error)
jpayne@69 12965 __pyx_L6_skip:;
jpayne@69 12966 goto __pyx_L4_argument_unpacking_done;
jpayne@69 12967 __pyx_L3_error:;
jpayne@69 12968 {
jpayne@69 12969 Py_ssize_t __pyx_temp;
jpayne@69 12970 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
jpayne@69 12971 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
jpayne@69 12972 }
jpayne@69 12973 }
jpayne@69 12974 __Pyx_AddTraceback("pysam.libcfaidx.FastxRecord.get_quality_array", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 12975 __Pyx_RefNannyFinishContext();
jpayne@69 12976 return NULL;
jpayne@69 12977 __pyx_L4_argument_unpacking_done:;
jpayne@69 12978 __pyx_r = __pyx_pf_5pysam_9libcfaidx_11FastxRecord_14get_quality_array(((struct __pyx_obj_5pysam_9libcfaidx_FastxRecord *)__pyx_v_self), __pyx_v_offset);
jpayne@69 12979
jpayne@69 12980 /* function exit code */
jpayne@69 12981 {
jpayne@69 12982 Py_ssize_t __pyx_temp;
jpayne@69 12983 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
jpayne@69 12984 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
jpayne@69 12985 }
jpayne@69 12986 }
jpayne@69 12987 __Pyx_RefNannyFinishContext();
jpayne@69 12988 return __pyx_r;
jpayne@69 12989 }
jpayne@69 12990
jpayne@69 12991 static PyObject *__pyx_pf_5pysam_9libcfaidx_11FastxRecord_14get_quality_array(struct __pyx_obj_5pysam_9libcfaidx_FastxRecord *__pyx_v_self, int __pyx_v_offset) {
jpayne@69 12992 PyObject *__pyx_r = NULL;
jpayne@69 12993 __Pyx_TraceDeclarations
jpayne@69 12994 __Pyx_RefNannyDeclarations
jpayne@69 12995 PyObject *__pyx_t_1 = NULL;
jpayne@69 12996 struct __pyx_opt_args_5pysam_9libcfaidx_11FastxRecord_get_quality_array __pyx_t_2;
jpayne@69 12997 int __pyx_lineno = 0;
jpayne@69 12998 const char *__pyx_filename = NULL;
jpayne@69 12999 int __pyx_clineno = 0;
jpayne@69 13000 __Pyx_TraceFrameInit(__pyx_codeobj__31)
jpayne@69 13001 __Pyx_RefNannySetupContext("get_quality_array", 1);
jpayne@69 13002 __Pyx_TraceCall("get_quality_array (wrapper)", __pyx_f[0], 488, 0, __PYX_ERR(0, 488, __pyx_L1_error));
jpayne@69 13003 __Pyx_XDECREF(__pyx_r);
jpayne@69 13004 __pyx_t_2.__pyx_n = 1;
jpayne@69 13005 __pyx_t_2.offset = __pyx_v_offset;
jpayne@69 13006 __pyx_t_1 = ((PyObject *)__pyx_vtabptr_5pysam_9libcfaidx_FastxRecord->get_quality_array(__pyx_v_self, 1, &__pyx_t_2)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 488, __pyx_L1_error)
jpayne@69 13007 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 13008 __pyx_r = __pyx_t_1;
jpayne@69 13009 __pyx_t_1 = 0;
jpayne@69 13010 goto __pyx_L0;
jpayne@69 13011
jpayne@69 13012 /* function exit code */
jpayne@69 13013 __pyx_L1_error:;
jpayne@69 13014 __Pyx_XDECREF(__pyx_t_1);
jpayne@69 13015 __Pyx_AddTraceback("pysam.libcfaidx.FastxRecord.get_quality_array", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 13016 __pyx_r = NULL;
jpayne@69 13017 __pyx_L0:;
jpayne@69 13018 __Pyx_XGIVEREF(__pyx_r);
jpayne@69 13019 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@69 13020 __Pyx_RefNannyFinishContext();
jpayne@69 13021 return __pyx_r;
jpayne@69 13022 }
jpayne@69 13023
jpayne@69 13024 /* "pysam/libcfaidx.pxd":57
jpayne@69 13025 * Python container for pysam.libcfaidx.FastqProxy with persistence.
jpayne@69 13026 * """
jpayne@69 13027 * cdef public str comment, quality, sequence, name # <<<<<<<<<<<<<<
jpayne@69 13028 * cdef cython.str to_string(self)
jpayne@69 13029 * cdef cython.str tostring(self)
jpayne@69 13030 */
jpayne@69 13031
jpayne@69 13032 /* Python wrapper */
jpayne@69 13033 static PyObject *__pyx_pw_5pysam_9libcfaidx_11FastxRecord_7comment_1__get__(PyObject *__pyx_v_self); /*proto*/
jpayne@69 13034 static PyObject *__pyx_pw_5pysam_9libcfaidx_11FastxRecord_7comment_1__get__(PyObject *__pyx_v_self) {
jpayne@69 13035 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@69 13036 PyObject *__pyx_r = 0;
jpayne@69 13037 __Pyx_RefNannyDeclarations
jpayne@69 13038 __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
jpayne@69 13039 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
jpayne@69 13040 __pyx_r = __pyx_pf_5pysam_9libcfaidx_11FastxRecord_7comment___get__(((struct __pyx_obj_5pysam_9libcfaidx_FastxRecord *)__pyx_v_self));
jpayne@69 13041
jpayne@69 13042 /* function exit code */
jpayne@69 13043 __Pyx_RefNannyFinishContext();
jpayne@69 13044 return __pyx_r;
jpayne@69 13045 }
jpayne@69 13046
jpayne@69 13047 static PyObject *__pyx_pf_5pysam_9libcfaidx_11FastxRecord_7comment___get__(struct __pyx_obj_5pysam_9libcfaidx_FastxRecord *__pyx_v_self) {
jpayne@69 13048 PyObject *__pyx_r = NULL;
jpayne@69 13049 __Pyx_TraceDeclarations
jpayne@69 13050 __Pyx_RefNannyDeclarations
jpayne@69 13051 int __pyx_lineno = 0;
jpayne@69 13052 const char *__pyx_filename = NULL;
jpayne@69 13053 int __pyx_clineno = 0;
jpayne@69 13054 __Pyx_RefNannySetupContext("__get__", 1);
jpayne@69 13055 __Pyx_TraceCall("__get__", __pyx_f[4], 57, 0, __PYX_ERR(4, 57, __pyx_L1_error));
jpayne@69 13056 __Pyx_XDECREF(__pyx_r);
jpayne@69 13057 __Pyx_INCREF(__pyx_v_self->comment);
jpayne@69 13058 __pyx_r = __pyx_v_self->comment;
jpayne@69 13059 goto __pyx_L0;
jpayne@69 13060
jpayne@69 13061 /* function exit code */
jpayne@69 13062 __pyx_L1_error:;
jpayne@69 13063 __Pyx_AddTraceback("pysam.libcfaidx.FastxRecord.comment.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 13064 __pyx_r = NULL;
jpayne@69 13065 __pyx_L0:;
jpayne@69 13066 __Pyx_XGIVEREF(__pyx_r);
jpayne@69 13067 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@69 13068 __Pyx_RefNannyFinishContext();
jpayne@69 13069 return __pyx_r;
jpayne@69 13070 }
jpayne@69 13071
jpayne@69 13072 /* Python wrapper */
jpayne@69 13073 static int __pyx_pw_5pysam_9libcfaidx_11FastxRecord_7comment_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
jpayne@69 13074 static int __pyx_pw_5pysam_9libcfaidx_11FastxRecord_7comment_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
jpayne@69 13075 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@69 13076 int __pyx_r;
jpayne@69 13077 __Pyx_RefNannyDeclarations
jpayne@69 13078 __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
jpayne@69 13079 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
jpayne@69 13080 __pyx_r = __pyx_pf_5pysam_9libcfaidx_11FastxRecord_7comment_2__set__(((struct __pyx_obj_5pysam_9libcfaidx_FastxRecord *)__pyx_v_self), ((PyObject *)__pyx_v_value));
jpayne@69 13081
jpayne@69 13082 /* function exit code */
jpayne@69 13083 __Pyx_RefNannyFinishContext();
jpayne@69 13084 return __pyx_r;
jpayne@69 13085 }
jpayne@69 13086
jpayne@69 13087 static int __pyx_pf_5pysam_9libcfaidx_11FastxRecord_7comment_2__set__(struct __pyx_obj_5pysam_9libcfaidx_FastxRecord *__pyx_v_self, PyObject *__pyx_v_value) {
jpayne@69 13088 int __pyx_r;
jpayne@69 13089 __Pyx_TraceDeclarations
jpayne@69 13090 __Pyx_RefNannyDeclarations
jpayne@69 13091 PyObject *__pyx_t_1 = NULL;
jpayne@69 13092 int __pyx_lineno = 0;
jpayne@69 13093 const char *__pyx_filename = NULL;
jpayne@69 13094 int __pyx_clineno = 0;
jpayne@69 13095 __Pyx_RefNannySetupContext("__set__", 1);
jpayne@69 13096 __Pyx_TraceCall("__set__", __pyx_f[4], 57, 0, __PYX_ERR(4, 57, __pyx_L1_error));
jpayne@69 13097 if (!(likely(PyUnicode_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None) || __Pyx_RaiseUnexpectedTypeError("unicode", __pyx_v_value))) __PYX_ERR(4, 57, __pyx_L1_error)
jpayne@69 13098 __pyx_t_1 = __pyx_v_value;
jpayne@69 13099 __Pyx_INCREF(__pyx_t_1);
jpayne@69 13100 __Pyx_GIVEREF(__pyx_t_1);
jpayne@69 13101 __Pyx_GOTREF(__pyx_v_self->comment);
jpayne@69 13102 __Pyx_DECREF(__pyx_v_self->comment);
jpayne@69 13103 __pyx_v_self->comment = ((PyObject*)__pyx_t_1);
jpayne@69 13104 __pyx_t_1 = 0;
jpayne@69 13105
jpayne@69 13106 /* function exit code */
jpayne@69 13107 __pyx_r = 0;
jpayne@69 13108 goto __pyx_L0;
jpayne@69 13109 __pyx_L1_error:;
jpayne@69 13110 __Pyx_XDECREF(__pyx_t_1);
jpayne@69 13111 __Pyx_AddTraceback("pysam.libcfaidx.FastxRecord.comment.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 13112 __pyx_r = -1;
jpayne@69 13113 __pyx_L0:;
jpayne@69 13114 __Pyx_TraceReturn(Py_None, 0);
jpayne@69 13115 __Pyx_RefNannyFinishContext();
jpayne@69 13116 return __pyx_r;
jpayne@69 13117 }
jpayne@69 13118
jpayne@69 13119 /* Python wrapper */
jpayne@69 13120 static int __pyx_pw_5pysam_9libcfaidx_11FastxRecord_7comment_5__del__(PyObject *__pyx_v_self); /*proto*/
jpayne@69 13121 static int __pyx_pw_5pysam_9libcfaidx_11FastxRecord_7comment_5__del__(PyObject *__pyx_v_self) {
jpayne@69 13122 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@69 13123 int __pyx_r;
jpayne@69 13124 __Pyx_RefNannyDeclarations
jpayne@69 13125 __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
jpayne@69 13126 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
jpayne@69 13127 __pyx_r = __pyx_pf_5pysam_9libcfaidx_11FastxRecord_7comment_4__del__(((struct __pyx_obj_5pysam_9libcfaidx_FastxRecord *)__pyx_v_self));
jpayne@69 13128
jpayne@69 13129 /* function exit code */
jpayne@69 13130 __Pyx_RefNannyFinishContext();
jpayne@69 13131 return __pyx_r;
jpayne@69 13132 }
jpayne@69 13133
jpayne@69 13134 static int __pyx_pf_5pysam_9libcfaidx_11FastxRecord_7comment_4__del__(struct __pyx_obj_5pysam_9libcfaidx_FastxRecord *__pyx_v_self) {
jpayne@69 13135 int __pyx_r;
jpayne@69 13136 __Pyx_TraceDeclarations
jpayne@69 13137 __Pyx_RefNannyDeclarations
jpayne@69 13138 int __pyx_lineno = 0;
jpayne@69 13139 const char *__pyx_filename = NULL;
jpayne@69 13140 int __pyx_clineno = 0;
jpayne@69 13141 __Pyx_RefNannySetupContext("__del__", 1);
jpayne@69 13142 __Pyx_TraceCall("__del__", __pyx_f[4], 57, 0, __PYX_ERR(4, 57, __pyx_L1_error));
jpayne@69 13143 __Pyx_INCREF(Py_None);
jpayne@69 13144 __Pyx_GIVEREF(Py_None);
jpayne@69 13145 __Pyx_GOTREF(__pyx_v_self->comment);
jpayne@69 13146 __Pyx_DECREF(__pyx_v_self->comment);
jpayne@69 13147 __pyx_v_self->comment = ((PyObject*)Py_None);
jpayne@69 13148
jpayne@69 13149 /* function exit code */
jpayne@69 13150 __pyx_r = 0;
jpayne@69 13151 goto __pyx_L0;
jpayne@69 13152 __pyx_L1_error:;
jpayne@69 13153 __Pyx_AddTraceback("pysam.libcfaidx.FastxRecord.comment.__del__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 13154 __pyx_r = -1;
jpayne@69 13155 __pyx_L0:;
jpayne@69 13156 __Pyx_TraceReturn(Py_None, 0);
jpayne@69 13157 __Pyx_RefNannyFinishContext();
jpayne@69 13158 return __pyx_r;
jpayne@69 13159 }
jpayne@69 13160
jpayne@69 13161 /* Python wrapper */
jpayne@69 13162 static PyObject *__pyx_pw_5pysam_9libcfaidx_11FastxRecord_7quality_1__get__(PyObject *__pyx_v_self); /*proto*/
jpayne@69 13163 static PyObject *__pyx_pw_5pysam_9libcfaidx_11FastxRecord_7quality_1__get__(PyObject *__pyx_v_self) {
jpayne@69 13164 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@69 13165 PyObject *__pyx_r = 0;
jpayne@69 13166 __Pyx_RefNannyDeclarations
jpayne@69 13167 __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
jpayne@69 13168 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
jpayne@69 13169 __pyx_r = __pyx_pf_5pysam_9libcfaidx_11FastxRecord_7quality___get__(((struct __pyx_obj_5pysam_9libcfaidx_FastxRecord *)__pyx_v_self));
jpayne@69 13170
jpayne@69 13171 /* function exit code */
jpayne@69 13172 __Pyx_RefNannyFinishContext();
jpayne@69 13173 return __pyx_r;
jpayne@69 13174 }
jpayne@69 13175
jpayne@69 13176 static PyObject *__pyx_pf_5pysam_9libcfaidx_11FastxRecord_7quality___get__(struct __pyx_obj_5pysam_9libcfaidx_FastxRecord *__pyx_v_self) {
jpayne@69 13177 PyObject *__pyx_r = NULL;
jpayne@69 13178 __Pyx_TraceDeclarations
jpayne@69 13179 __Pyx_RefNannyDeclarations
jpayne@69 13180 int __pyx_lineno = 0;
jpayne@69 13181 const char *__pyx_filename = NULL;
jpayne@69 13182 int __pyx_clineno = 0;
jpayne@69 13183 __Pyx_RefNannySetupContext("__get__", 1);
jpayne@69 13184 __Pyx_TraceCall("__get__", __pyx_f[4], 57, 0, __PYX_ERR(4, 57, __pyx_L1_error));
jpayne@69 13185 __Pyx_XDECREF(__pyx_r);
jpayne@69 13186 __Pyx_INCREF(__pyx_v_self->quality);
jpayne@69 13187 __pyx_r = __pyx_v_self->quality;
jpayne@69 13188 goto __pyx_L0;
jpayne@69 13189
jpayne@69 13190 /* function exit code */
jpayne@69 13191 __pyx_L1_error:;
jpayne@69 13192 __Pyx_AddTraceback("pysam.libcfaidx.FastxRecord.quality.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 13193 __pyx_r = NULL;
jpayne@69 13194 __pyx_L0:;
jpayne@69 13195 __Pyx_XGIVEREF(__pyx_r);
jpayne@69 13196 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@69 13197 __Pyx_RefNannyFinishContext();
jpayne@69 13198 return __pyx_r;
jpayne@69 13199 }
jpayne@69 13200
jpayne@69 13201 /* Python wrapper */
jpayne@69 13202 static int __pyx_pw_5pysam_9libcfaidx_11FastxRecord_7quality_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
jpayne@69 13203 static int __pyx_pw_5pysam_9libcfaidx_11FastxRecord_7quality_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
jpayne@69 13204 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@69 13205 int __pyx_r;
jpayne@69 13206 __Pyx_RefNannyDeclarations
jpayne@69 13207 __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
jpayne@69 13208 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
jpayne@69 13209 __pyx_r = __pyx_pf_5pysam_9libcfaidx_11FastxRecord_7quality_2__set__(((struct __pyx_obj_5pysam_9libcfaidx_FastxRecord *)__pyx_v_self), ((PyObject *)__pyx_v_value));
jpayne@69 13210
jpayne@69 13211 /* function exit code */
jpayne@69 13212 __Pyx_RefNannyFinishContext();
jpayne@69 13213 return __pyx_r;
jpayne@69 13214 }
jpayne@69 13215
jpayne@69 13216 static int __pyx_pf_5pysam_9libcfaidx_11FastxRecord_7quality_2__set__(struct __pyx_obj_5pysam_9libcfaidx_FastxRecord *__pyx_v_self, PyObject *__pyx_v_value) {
jpayne@69 13217 int __pyx_r;
jpayne@69 13218 __Pyx_TraceDeclarations
jpayne@69 13219 __Pyx_RefNannyDeclarations
jpayne@69 13220 PyObject *__pyx_t_1 = NULL;
jpayne@69 13221 int __pyx_lineno = 0;
jpayne@69 13222 const char *__pyx_filename = NULL;
jpayne@69 13223 int __pyx_clineno = 0;
jpayne@69 13224 __Pyx_RefNannySetupContext("__set__", 1);
jpayne@69 13225 __Pyx_TraceCall("__set__", __pyx_f[4], 57, 0, __PYX_ERR(4, 57, __pyx_L1_error));
jpayne@69 13226 if (!(likely(PyUnicode_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None) || __Pyx_RaiseUnexpectedTypeError("unicode", __pyx_v_value))) __PYX_ERR(4, 57, __pyx_L1_error)
jpayne@69 13227 __pyx_t_1 = __pyx_v_value;
jpayne@69 13228 __Pyx_INCREF(__pyx_t_1);
jpayne@69 13229 __Pyx_GIVEREF(__pyx_t_1);
jpayne@69 13230 __Pyx_GOTREF(__pyx_v_self->quality);
jpayne@69 13231 __Pyx_DECREF(__pyx_v_self->quality);
jpayne@69 13232 __pyx_v_self->quality = ((PyObject*)__pyx_t_1);
jpayne@69 13233 __pyx_t_1 = 0;
jpayne@69 13234
jpayne@69 13235 /* function exit code */
jpayne@69 13236 __pyx_r = 0;
jpayne@69 13237 goto __pyx_L0;
jpayne@69 13238 __pyx_L1_error:;
jpayne@69 13239 __Pyx_XDECREF(__pyx_t_1);
jpayne@69 13240 __Pyx_AddTraceback("pysam.libcfaidx.FastxRecord.quality.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 13241 __pyx_r = -1;
jpayne@69 13242 __pyx_L0:;
jpayne@69 13243 __Pyx_TraceReturn(Py_None, 0);
jpayne@69 13244 __Pyx_RefNannyFinishContext();
jpayne@69 13245 return __pyx_r;
jpayne@69 13246 }
jpayne@69 13247
jpayne@69 13248 /* Python wrapper */
jpayne@69 13249 static int __pyx_pw_5pysam_9libcfaidx_11FastxRecord_7quality_5__del__(PyObject *__pyx_v_self); /*proto*/
jpayne@69 13250 static int __pyx_pw_5pysam_9libcfaidx_11FastxRecord_7quality_5__del__(PyObject *__pyx_v_self) {
jpayne@69 13251 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@69 13252 int __pyx_r;
jpayne@69 13253 __Pyx_RefNannyDeclarations
jpayne@69 13254 __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
jpayne@69 13255 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
jpayne@69 13256 __pyx_r = __pyx_pf_5pysam_9libcfaidx_11FastxRecord_7quality_4__del__(((struct __pyx_obj_5pysam_9libcfaidx_FastxRecord *)__pyx_v_self));
jpayne@69 13257
jpayne@69 13258 /* function exit code */
jpayne@69 13259 __Pyx_RefNannyFinishContext();
jpayne@69 13260 return __pyx_r;
jpayne@69 13261 }
jpayne@69 13262
jpayne@69 13263 static int __pyx_pf_5pysam_9libcfaidx_11FastxRecord_7quality_4__del__(struct __pyx_obj_5pysam_9libcfaidx_FastxRecord *__pyx_v_self) {
jpayne@69 13264 int __pyx_r;
jpayne@69 13265 __Pyx_TraceDeclarations
jpayne@69 13266 __Pyx_RefNannyDeclarations
jpayne@69 13267 int __pyx_lineno = 0;
jpayne@69 13268 const char *__pyx_filename = NULL;
jpayne@69 13269 int __pyx_clineno = 0;
jpayne@69 13270 __Pyx_RefNannySetupContext("__del__", 1);
jpayne@69 13271 __Pyx_TraceCall("__del__", __pyx_f[4], 57, 0, __PYX_ERR(4, 57, __pyx_L1_error));
jpayne@69 13272 __Pyx_INCREF(Py_None);
jpayne@69 13273 __Pyx_GIVEREF(Py_None);
jpayne@69 13274 __Pyx_GOTREF(__pyx_v_self->quality);
jpayne@69 13275 __Pyx_DECREF(__pyx_v_self->quality);
jpayne@69 13276 __pyx_v_self->quality = ((PyObject*)Py_None);
jpayne@69 13277
jpayne@69 13278 /* function exit code */
jpayne@69 13279 __pyx_r = 0;
jpayne@69 13280 goto __pyx_L0;
jpayne@69 13281 __pyx_L1_error:;
jpayne@69 13282 __Pyx_AddTraceback("pysam.libcfaidx.FastxRecord.quality.__del__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 13283 __pyx_r = -1;
jpayne@69 13284 __pyx_L0:;
jpayne@69 13285 __Pyx_TraceReturn(Py_None, 0);
jpayne@69 13286 __Pyx_RefNannyFinishContext();
jpayne@69 13287 return __pyx_r;
jpayne@69 13288 }
jpayne@69 13289
jpayne@69 13290 /* Python wrapper */
jpayne@69 13291 static PyObject *__pyx_pw_5pysam_9libcfaidx_11FastxRecord_8sequence_1__get__(PyObject *__pyx_v_self); /*proto*/
jpayne@69 13292 static PyObject *__pyx_pw_5pysam_9libcfaidx_11FastxRecord_8sequence_1__get__(PyObject *__pyx_v_self) {
jpayne@69 13293 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@69 13294 PyObject *__pyx_r = 0;
jpayne@69 13295 __Pyx_RefNannyDeclarations
jpayne@69 13296 __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
jpayne@69 13297 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
jpayne@69 13298 __pyx_r = __pyx_pf_5pysam_9libcfaidx_11FastxRecord_8sequence___get__(((struct __pyx_obj_5pysam_9libcfaidx_FastxRecord *)__pyx_v_self));
jpayne@69 13299
jpayne@69 13300 /* function exit code */
jpayne@69 13301 __Pyx_RefNannyFinishContext();
jpayne@69 13302 return __pyx_r;
jpayne@69 13303 }
jpayne@69 13304
jpayne@69 13305 static PyObject *__pyx_pf_5pysam_9libcfaidx_11FastxRecord_8sequence___get__(struct __pyx_obj_5pysam_9libcfaidx_FastxRecord *__pyx_v_self) {
jpayne@69 13306 PyObject *__pyx_r = NULL;
jpayne@69 13307 __Pyx_TraceDeclarations
jpayne@69 13308 __Pyx_RefNannyDeclarations
jpayne@69 13309 int __pyx_lineno = 0;
jpayne@69 13310 const char *__pyx_filename = NULL;
jpayne@69 13311 int __pyx_clineno = 0;
jpayne@69 13312 __Pyx_RefNannySetupContext("__get__", 1);
jpayne@69 13313 __Pyx_TraceCall("__get__", __pyx_f[4], 57, 0, __PYX_ERR(4, 57, __pyx_L1_error));
jpayne@69 13314 __Pyx_XDECREF(__pyx_r);
jpayne@69 13315 __Pyx_INCREF(__pyx_v_self->sequence);
jpayne@69 13316 __pyx_r = __pyx_v_self->sequence;
jpayne@69 13317 goto __pyx_L0;
jpayne@69 13318
jpayne@69 13319 /* function exit code */
jpayne@69 13320 __pyx_L1_error:;
jpayne@69 13321 __Pyx_AddTraceback("pysam.libcfaidx.FastxRecord.sequence.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 13322 __pyx_r = NULL;
jpayne@69 13323 __pyx_L0:;
jpayne@69 13324 __Pyx_XGIVEREF(__pyx_r);
jpayne@69 13325 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@69 13326 __Pyx_RefNannyFinishContext();
jpayne@69 13327 return __pyx_r;
jpayne@69 13328 }
jpayne@69 13329
jpayne@69 13330 /* Python wrapper */
jpayne@69 13331 static int __pyx_pw_5pysam_9libcfaidx_11FastxRecord_8sequence_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
jpayne@69 13332 static int __pyx_pw_5pysam_9libcfaidx_11FastxRecord_8sequence_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
jpayne@69 13333 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@69 13334 int __pyx_r;
jpayne@69 13335 __Pyx_RefNannyDeclarations
jpayne@69 13336 __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
jpayne@69 13337 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
jpayne@69 13338 __pyx_r = __pyx_pf_5pysam_9libcfaidx_11FastxRecord_8sequence_2__set__(((struct __pyx_obj_5pysam_9libcfaidx_FastxRecord *)__pyx_v_self), ((PyObject *)__pyx_v_value));
jpayne@69 13339
jpayne@69 13340 /* function exit code */
jpayne@69 13341 __Pyx_RefNannyFinishContext();
jpayne@69 13342 return __pyx_r;
jpayne@69 13343 }
jpayne@69 13344
jpayne@69 13345 static int __pyx_pf_5pysam_9libcfaidx_11FastxRecord_8sequence_2__set__(struct __pyx_obj_5pysam_9libcfaidx_FastxRecord *__pyx_v_self, PyObject *__pyx_v_value) {
jpayne@69 13346 int __pyx_r;
jpayne@69 13347 __Pyx_TraceDeclarations
jpayne@69 13348 __Pyx_RefNannyDeclarations
jpayne@69 13349 PyObject *__pyx_t_1 = NULL;
jpayne@69 13350 int __pyx_lineno = 0;
jpayne@69 13351 const char *__pyx_filename = NULL;
jpayne@69 13352 int __pyx_clineno = 0;
jpayne@69 13353 __Pyx_RefNannySetupContext("__set__", 1);
jpayne@69 13354 __Pyx_TraceCall("__set__", __pyx_f[4], 57, 0, __PYX_ERR(4, 57, __pyx_L1_error));
jpayne@69 13355 if (!(likely(PyUnicode_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None) || __Pyx_RaiseUnexpectedTypeError("unicode", __pyx_v_value))) __PYX_ERR(4, 57, __pyx_L1_error)
jpayne@69 13356 __pyx_t_1 = __pyx_v_value;
jpayne@69 13357 __Pyx_INCREF(__pyx_t_1);
jpayne@69 13358 __Pyx_GIVEREF(__pyx_t_1);
jpayne@69 13359 __Pyx_GOTREF(__pyx_v_self->sequence);
jpayne@69 13360 __Pyx_DECREF(__pyx_v_self->sequence);
jpayne@69 13361 __pyx_v_self->sequence = ((PyObject*)__pyx_t_1);
jpayne@69 13362 __pyx_t_1 = 0;
jpayne@69 13363
jpayne@69 13364 /* function exit code */
jpayne@69 13365 __pyx_r = 0;
jpayne@69 13366 goto __pyx_L0;
jpayne@69 13367 __pyx_L1_error:;
jpayne@69 13368 __Pyx_XDECREF(__pyx_t_1);
jpayne@69 13369 __Pyx_AddTraceback("pysam.libcfaidx.FastxRecord.sequence.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 13370 __pyx_r = -1;
jpayne@69 13371 __pyx_L0:;
jpayne@69 13372 __Pyx_TraceReturn(Py_None, 0);
jpayne@69 13373 __Pyx_RefNannyFinishContext();
jpayne@69 13374 return __pyx_r;
jpayne@69 13375 }
jpayne@69 13376
jpayne@69 13377 /* Python wrapper */
jpayne@69 13378 static int __pyx_pw_5pysam_9libcfaidx_11FastxRecord_8sequence_5__del__(PyObject *__pyx_v_self); /*proto*/
jpayne@69 13379 static int __pyx_pw_5pysam_9libcfaidx_11FastxRecord_8sequence_5__del__(PyObject *__pyx_v_self) {
jpayne@69 13380 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@69 13381 int __pyx_r;
jpayne@69 13382 __Pyx_RefNannyDeclarations
jpayne@69 13383 __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
jpayne@69 13384 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
jpayne@69 13385 __pyx_r = __pyx_pf_5pysam_9libcfaidx_11FastxRecord_8sequence_4__del__(((struct __pyx_obj_5pysam_9libcfaidx_FastxRecord *)__pyx_v_self));
jpayne@69 13386
jpayne@69 13387 /* function exit code */
jpayne@69 13388 __Pyx_RefNannyFinishContext();
jpayne@69 13389 return __pyx_r;
jpayne@69 13390 }
jpayne@69 13391
jpayne@69 13392 static int __pyx_pf_5pysam_9libcfaidx_11FastxRecord_8sequence_4__del__(struct __pyx_obj_5pysam_9libcfaidx_FastxRecord *__pyx_v_self) {
jpayne@69 13393 int __pyx_r;
jpayne@69 13394 __Pyx_TraceDeclarations
jpayne@69 13395 __Pyx_RefNannyDeclarations
jpayne@69 13396 int __pyx_lineno = 0;
jpayne@69 13397 const char *__pyx_filename = NULL;
jpayne@69 13398 int __pyx_clineno = 0;
jpayne@69 13399 __Pyx_RefNannySetupContext("__del__", 1);
jpayne@69 13400 __Pyx_TraceCall("__del__", __pyx_f[4], 57, 0, __PYX_ERR(4, 57, __pyx_L1_error));
jpayne@69 13401 __Pyx_INCREF(Py_None);
jpayne@69 13402 __Pyx_GIVEREF(Py_None);
jpayne@69 13403 __Pyx_GOTREF(__pyx_v_self->sequence);
jpayne@69 13404 __Pyx_DECREF(__pyx_v_self->sequence);
jpayne@69 13405 __pyx_v_self->sequence = ((PyObject*)Py_None);
jpayne@69 13406
jpayne@69 13407 /* function exit code */
jpayne@69 13408 __pyx_r = 0;
jpayne@69 13409 goto __pyx_L0;
jpayne@69 13410 __pyx_L1_error:;
jpayne@69 13411 __Pyx_AddTraceback("pysam.libcfaidx.FastxRecord.sequence.__del__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 13412 __pyx_r = -1;
jpayne@69 13413 __pyx_L0:;
jpayne@69 13414 __Pyx_TraceReturn(Py_None, 0);
jpayne@69 13415 __Pyx_RefNannyFinishContext();
jpayne@69 13416 return __pyx_r;
jpayne@69 13417 }
jpayne@69 13418
jpayne@69 13419 /* Python wrapper */
jpayne@69 13420 static PyObject *__pyx_pw_5pysam_9libcfaidx_11FastxRecord_4name_1__get__(PyObject *__pyx_v_self); /*proto*/
jpayne@69 13421 static PyObject *__pyx_pw_5pysam_9libcfaidx_11FastxRecord_4name_1__get__(PyObject *__pyx_v_self) {
jpayne@69 13422 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@69 13423 PyObject *__pyx_r = 0;
jpayne@69 13424 __Pyx_RefNannyDeclarations
jpayne@69 13425 __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
jpayne@69 13426 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
jpayne@69 13427 __pyx_r = __pyx_pf_5pysam_9libcfaidx_11FastxRecord_4name___get__(((struct __pyx_obj_5pysam_9libcfaidx_FastxRecord *)__pyx_v_self));
jpayne@69 13428
jpayne@69 13429 /* function exit code */
jpayne@69 13430 __Pyx_RefNannyFinishContext();
jpayne@69 13431 return __pyx_r;
jpayne@69 13432 }
jpayne@69 13433
jpayne@69 13434 static PyObject *__pyx_pf_5pysam_9libcfaidx_11FastxRecord_4name___get__(struct __pyx_obj_5pysam_9libcfaidx_FastxRecord *__pyx_v_self) {
jpayne@69 13435 PyObject *__pyx_r = NULL;
jpayne@69 13436 __Pyx_TraceDeclarations
jpayne@69 13437 __Pyx_RefNannyDeclarations
jpayne@69 13438 int __pyx_lineno = 0;
jpayne@69 13439 const char *__pyx_filename = NULL;
jpayne@69 13440 int __pyx_clineno = 0;
jpayne@69 13441 __Pyx_RefNannySetupContext("__get__", 1);
jpayne@69 13442 __Pyx_TraceCall("__get__", __pyx_f[4], 57, 0, __PYX_ERR(4, 57, __pyx_L1_error));
jpayne@69 13443 __Pyx_XDECREF(__pyx_r);
jpayne@69 13444 __Pyx_INCREF(__pyx_v_self->name);
jpayne@69 13445 __pyx_r = __pyx_v_self->name;
jpayne@69 13446 goto __pyx_L0;
jpayne@69 13447
jpayne@69 13448 /* function exit code */
jpayne@69 13449 __pyx_L1_error:;
jpayne@69 13450 __Pyx_AddTraceback("pysam.libcfaidx.FastxRecord.name.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 13451 __pyx_r = NULL;
jpayne@69 13452 __pyx_L0:;
jpayne@69 13453 __Pyx_XGIVEREF(__pyx_r);
jpayne@69 13454 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@69 13455 __Pyx_RefNannyFinishContext();
jpayne@69 13456 return __pyx_r;
jpayne@69 13457 }
jpayne@69 13458
jpayne@69 13459 /* Python wrapper */
jpayne@69 13460 static int __pyx_pw_5pysam_9libcfaidx_11FastxRecord_4name_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
jpayne@69 13461 static int __pyx_pw_5pysam_9libcfaidx_11FastxRecord_4name_3__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
jpayne@69 13462 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@69 13463 int __pyx_r;
jpayne@69 13464 __Pyx_RefNannyDeclarations
jpayne@69 13465 __Pyx_RefNannySetupContext("__set__ (wrapper)", 0);
jpayne@69 13466 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
jpayne@69 13467 __pyx_r = __pyx_pf_5pysam_9libcfaidx_11FastxRecord_4name_2__set__(((struct __pyx_obj_5pysam_9libcfaidx_FastxRecord *)__pyx_v_self), ((PyObject *)__pyx_v_value));
jpayne@69 13468
jpayne@69 13469 /* function exit code */
jpayne@69 13470 __Pyx_RefNannyFinishContext();
jpayne@69 13471 return __pyx_r;
jpayne@69 13472 }
jpayne@69 13473
jpayne@69 13474 static int __pyx_pf_5pysam_9libcfaidx_11FastxRecord_4name_2__set__(struct __pyx_obj_5pysam_9libcfaidx_FastxRecord *__pyx_v_self, PyObject *__pyx_v_value) {
jpayne@69 13475 int __pyx_r;
jpayne@69 13476 __Pyx_TraceDeclarations
jpayne@69 13477 __Pyx_RefNannyDeclarations
jpayne@69 13478 PyObject *__pyx_t_1 = NULL;
jpayne@69 13479 int __pyx_lineno = 0;
jpayne@69 13480 const char *__pyx_filename = NULL;
jpayne@69 13481 int __pyx_clineno = 0;
jpayne@69 13482 __Pyx_RefNannySetupContext("__set__", 1);
jpayne@69 13483 __Pyx_TraceCall("__set__", __pyx_f[4], 57, 0, __PYX_ERR(4, 57, __pyx_L1_error));
jpayne@69 13484 if (!(likely(PyUnicode_CheckExact(__pyx_v_value))||((__pyx_v_value) == Py_None) || __Pyx_RaiseUnexpectedTypeError("unicode", __pyx_v_value))) __PYX_ERR(4, 57, __pyx_L1_error)
jpayne@69 13485 __pyx_t_1 = __pyx_v_value;
jpayne@69 13486 __Pyx_INCREF(__pyx_t_1);
jpayne@69 13487 __Pyx_GIVEREF(__pyx_t_1);
jpayne@69 13488 __Pyx_GOTREF(__pyx_v_self->name);
jpayne@69 13489 __Pyx_DECREF(__pyx_v_self->name);
jpayne@69 13490 __pyx_v_self->name = ((PyObject*)__pyx_t_1);
jpayne@69 13491 __pyx_t_1 = 0;
jpayne@69 13492
jpayne@69 13493 /* function exit code */
jpayne@69 13494 __pyx_r = 0;
jpayne@69 13495 goto __pyx_L0;
jpayne@69 13496 __pyx_L1_error:;
jpayne@69 13497 __Pyx_XDECREF(__pyx_t_1);
jpayne@69 13498 __Pyx_AddTraceback("pysam.libcfaidx.FastxRecord.name.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 13499 __pyx_r = -1;
jpayne@69 13500 __pyx_L0:;
jpayne@69 13501 __Pyx_TraceReturn(Py_None, 0);
jpayne@69 13502 __Pyx_RefNannyFinishContext();
jpayne@69 13503 return __pyx_r;
jpayne@69 13504 }
jpayne@69 13505
jpayne@69 13506 /* Python wrapper */
jpayne@69 13507 static int __pyx_pw_5pysam_9libcfaidx_11FastxRecord_4name_5__del__(PyObject *__pyx_v_self); /*proto*/
jpayne@69 13508 static int __pyx_pw_5pysam_9libcfaidx_11FastxRecord_4name_5__del__(PyObject *__pyx_v_self) {
jpayne@69 13509 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@69 13510 int __pyx_r;
jpayne@69 13511 __Pyx_RefNannyDeclarations
jpayne@69 13512 __Pyx_RefNannySetupContext("__del__ (wrapper)", 0);
jpayne@69 13513 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
jpayne@69 13514 __pyx_r = __pyx_pf_5pysam_9libcfaidx_11FastxRecord_4name_4__del__(((struct __pyx_obj_5pysam_9libcfaidx_FastxRecord *)__pyx_v_self));
jpayne@69 13515
jpayne@69 13516 /* function exit code */
jpayne@69 13517 __Pyx_RefNannyFinishContext();
jpayne@69 13518 return __pyx_r;
jpayne@69 13519 }
jpayne@69 13520
jpayne@69 13521 static int __pyx_pf_5pysam_9libcfaidx_11FastxRecord_4name_4__del__(struct __pyx_obj_5pysam_9libcfaidx_FastxRecord *__pyx_v_self) {
jpayne@69 13522 int __pyx_r;
jpayne@69 13523 __Pyx_TraceDeclarations
jpayne@69 13524 __Pyx_RefNannyDeclarations
jpayne@69 13525 int __pyx_lineno = 0;
jpayne@69 13526 const char *__pyx_filename = NULL;
jpayne@69 13527 int __pyx_clineno = 0;
jpayne@69 13528 __Pyx_RefNannySetupContext("__del__", 1);
jpayne@69 13529 __Pyx_TraceCall("__del__", __pyx_f[4], 57, 0, __PYX_ERR(4, 57, __pyx_L1_error));
jpayne@69 13530 __Pyx_INCREF(Py_None);
jpayne@69 13531 __Pyx_GIVEREF(Py_None);
jpayne@69 13532 __Pyx_GOTREF(__pyx_v_self->name);
jpayne@69 13533 __Pyx_DECREF(__pyx_v_self->name);
jpayne@69 13534 __pyx_v_self->name = ((PyObject*)Py_None);
jpayne@69 13535
jpayne@69 13536 /* function exit code */
jpayne@69 13537 __pyx_r = 0;
jpayne@69 13538 goto __pyx_L0;
jpayne@69 13539 __pyx_L1_error:;
jpayne@69 13540 __Pyx_AddTraceback("pysam.libcfaidx.FastxRecord.name.__del__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 13541 __pyx_r = -1;
jpayne@69 13542 __pyx_L0:;
jpayne@69 13543 __Pyx_TraceReturn(Py_None, 0);
jpayne@69 13544 __Pyx_RefNannyFinishContext();
jpayne@69 13545 return __pyx_r;
jpayne@69 13546 }
jpayne@69 13547
jpayne@69 13548 /* "(tree fragment)":1
jpayne@69 13549 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
jpayne@69 13550 * cdef tuple state
jpayne@69 13551 * cdef object _dict
jpayne@69 13552 */
jpayne@69 13553
jpayne@69 13554 /* Python wrapper */
jpayne@69 13555 static PyObject *__pyx_pw_5pysam_9libcfaidx_11FastxRecord_17__reduce_cython__(PyObject *__pyx_v_self,
jpayne@69 13556 #if CYTHON_METH_FASTCALL
jpayne@69 13557 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@69 13558 #else
jpayne@69 13559 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@69 13560 #endif
jpayne@69 13561 ); /*proto*/
jpayne@69 13562 PyDoc_STRVAR(__pyx_doc_5pysam_9libcfaidx_11FastxRecord_16__reduce_cython__, "FastxRecord.__reduce_cython__(self)");
jpayne@69 13563 static PyMethodDef __pyx_mdef_5pysam_9libcfaidx_11FastxRecord_17__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_9libcfaidx_11FastxRecord_17__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_9libcfaidx_11FastxRecord_16__reduce_cython__};
jpayne@69 13564 static PyObject *__pyx_pw_5pysam_9libcfaidx_11FastxRecord_17__reduce_cython__(PyObject *__pyx_v_self,
jpayne@69 13565 #if CYTHON_METH_FASTCALL
jpayne@69 13566 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@69 13567 #else
jpayne@69 13568 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@69 13569 #endif
jpayne@69 13570 ) {
jpayne@69 13571 #if !CYTHON_METH_FASTCALL
jpayne@69 13572 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
jpayne@69 13573 #endif
jpayne@69 13574 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@69 13575 PyObject *__pyx_r = 0;
jpayne@69 13576 __Pyx_RefNannyDeclarations
jpayne@69 13577 __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
jpayne@69 13578 #if !CYTHON_METH_FASTCALL
jpayne@69 13579 #if CYTHON_ASSUME_SAFE_MACROS
jpayne@69 13580 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
jpayne@69 13581 #else
jpayne@69 13582 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
jpayne@69 13583 #endif
jpayne@69 13584 #endif
jpayne@69 13585 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
jpayne@69 13586 if (unlikely(__pyx_nargs > 0)) {
jpayne@69 13587 __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL;}
jpayne@69 13588 if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__reduce_cython__", 0))) return NULL;
jpayne@69 13589 __pyx_r = __pyx_pf_5pysam_9libcfaidx_11FastxRecord_16__reduce_cython__(((struct __pyx_obj_5pysam_9libcfaidx_FastxRecord *)__pyx_v_self));
jpayne@69 13590
jpayne@69 13591 /* function exit code */
jpayne@69 13592 __Pyx_RefNannyFinishContext();
jpayne@69 13593 return __pyx_r;
jpayne@69 13594 }
jpayne@69 13595
jpayne@69 13596 static PyObject *__pyx_pf_5pysam_9libcfaidx_11FastxRecord_16__reduce_cython__(struct __pyx_obj_5pysam_9libcfaidx_FastxRecord *__pyx_v_self) {
jpayne@69 13597 PyObject *__pyx_v_state = 0;
jpayne@69 13598 PyObject *__pyx_v__dict = 0;
jpayne@69 13599 int __pyx_v_use_setstate;
jpayne@69 13600 PyObject *__pyx_r = NULL;
jpayne@69 13601 __Pyx_TraceDeclarations
jpayne@69 13602 __Pyx_RefNannyDeclarations
jpayne@69 13603 PyObject *__pyx_t_1 = NULL;
jpayne@69 13604 int __pyx_t_2;
jpayne@69 13605 PyObject *__pyx_t_3 = NULL;
jpayne@69 13606 int __pyx_t_4;
jpayne@69 13607 PyObject *__pyx_t_5 = NULL;
jpayne@69 13608 int __pyx_lineno = 0;
jpayne@69 13609 const char *__pyx_filename = NULL;
jpayne@69 13610 int __pyx_clineno = 0;
jpayne@69 13611 __Pyx_TraceFrameInit(__pyx_codeobj__32)
jpayne@69 13612 __Pyx_RefNannySetupContext("__reduce_cython__", 1);
jpayne@69 13613 __Pyx_TraceCall("__reduce_cython__", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));
jpayne@69 13614
jpayne@69 13615 /* "(tree fragment)":5
jpayne@69 13616 * cdef object _dict
jpayne@69 13617 * cdef bint use_setstate
jpayne@69 13618 * state = (self.comment, self.name, self.quality, self.sequence) # <<<<<<<<<<<<<<
jpayne@69 13619 * _dict = getattr(self, '__dict__', None)
jpayne@69 13620 * if _dict is not None:
jpayne@69 13621 */
jpayne@69 13622 __pyx_t_1 = PyTuple_New(4); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
jpayne@69 13623 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 13624 __Pyx_INCREF(__pyx_v_self->comment);
jpayne@69 13625 __Pyx_GIVEREF(__pyx_v_self->comment);
jpayne@69 13626 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->comment)) __PYX_ERR(1, 5, __pyx_L1_error);
jpayne@69 13627 __Pyx_INCREF(__pyx_v_self->name);
jpayne@69 13628 __Pyx_GIVEREF(__pyx_v_self->name);
jpayne@69 13629 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_self->name)) __PYX_ERR(1, 5, __pyx_L1_error);
jpayne@69 13630 __Pyx_INCREF(__pyx_v_self->quality);
jpayne@69 13631 __Pyx_GIVEREF(__pyx_v_self->quality);
jpayne@69 13632 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_self->quality)) __PYX_ERR(1, 5, __pyx_L1_error);
jpayne@69 13633 __Pyx_INCREF(__pyx_v_self->sequence);
jpayne@69 13634 __Pyx_GIVEREF(__pyx_v_self->sequence);
jpayne@69 13635 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_v_self->sequence)) __PYX_ERR(1, 5, __pyx_L1_error);
jpayne@69 13636 __pyx_v_state = ((PyObject*)__pyx_t_1);
jpayne@69 13637 __pyx_t_1 = 0;
jpayne@69 13638
jpayne@69 13639 /* "(tree fragment)":6
jpayne@69 13640 * cdef bint use_setstate
jpayne@69 13641 * state = (self.comment, self.name, self.quality, self.sequence)
jpayne@69 13642 * _dict = getattr(self, '__dict__', None) # <<<<<<<<<<<<<<
jpayne@69 13643 * if _dict is not None:
jpayne@69 13644 * state += (_dict,)
jpayne@69 13645 */
jpayne@69 13646 __pyx_t_1 = __Pyx_GetAttr3(((PyObject *)__pyx_v_self), __pyx_n_s_dict, Py_None); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error)
jpayne@69 13647 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 13648 __pyx_v__dict = __pyx_t_1;
jpayne@69 13649 __pyx_t_1 = 0;
jpayne@69 13650
jpayne@69 13651 /* "(tree fragment)":7
jpayne@69 13652 * state = (self.comment, self.name, self.quality, self.sequence)
jpayne@69 13653 * _dict = getattr(self, '__dict__', None)
jpayne@69 13654 * if _dict is not None: # <<<<<<<<<<<<<<
jpayne@69 13655 * state += (_dict,)
jpayne@69 13656 * use_setstate = True
jpayne@69 13657 */
jpayne@69 13658 __pyx_t_2 = (__pyx_v__dict != Py_None);
jpayne@69 13659 if (__pyx_t_2) {
jpayne@69 13660
jpayne@69 13661 /* "(tree fragment)":8
jpayne@69 13662 * _dict = getattr(self, '__dict__', None)
jpayne@69 13663 * if _dict is not None:
jpayne@69 13664 * state += (_dict,) # <<<<<<<<<<<<<<
jpayne@69 13665 * use_setstate = True
jpayne@69 13666 * else:
jpayne@69 13667 */
jpayne@69 13668 __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 8, __pyx_L1_error)
jpayne@69 13669 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 13670 __Pyx_INCREF(__pyx_v__dict);
jpayne@69 13671 __Pyx_GIVEREF(__pyx_v__dict);
jpayne@69 13672 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v__dict)) __PYX_ERR(1, 8, __pyx_L1_error);
jpayne@69 13673 __pyx_t_3 = PyNumber_InPlaceAdd(__pyx_v_state, __pyx_t_1); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 8, __pyx_L1_error)
jpayne@69 13674 __Pyx_GOTREF(__pyx_t_3);
jpayne@69 13675 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@69 13676 __Pyx_DECREF_SET(__pyx_v_state, ((PyObject*)__pyx_t_3));
jpayne@69 13677 __pyx_t_3 = 0;
jpayne@69 13678
jpayne@69 13679 /* "(tree fragment)":9
jpayne@69 13680 * if _dict is not None:
jpayne@69 13681 * state += (_dict,)
jpayne@69 13682 * use_setstate = True # <<<<<<<<<<<<<<
jpayne@69 13683 * else:
jpayne@69 13684 * use_setstate = self.comment is not None or self.name is not None or self.quality is not None or self.sequence is not None
jpayne@69 13685 */
jpayne@69 13686 __pyx_v_use_setstate = 1;
jpayne@69 13687
jpayne@69 13688 /* "(tree fragment)":7
jpayne@69 13689 * state = (self.comment, self.name, self.quality, self.sequence)
jpayne@69 13690 * _dict = getattr(self, '__dict__', None)
jpayne@69 13691 * if _dict is not None: # <<<<<<<<<<<<<<
jpayne@69 13692 * state += (_dict,)
jpayne@69 13693 * use_setstate = True
jpayne@69 13694 */
jpayne@69 13695 goto __pyx_L3;
jpayne@69 13696 }
jpayne@69 13697
jpayne@69 13698 /* "(tree fragment)":11
jpayne@69 13699 * use_setstate = True
jpayne@69 13700 * else:
jpayne@69 13701 * use_setstate = self.comment is not None or self.name is not None or self.quality is not None or self.sequence is not None # <<<<<<<<<<<<<<
jpayne@69 13702 * if use_setstate:
jpayne@69 13703 * return __pyx_unpickle_FastxRecord, (type(self), 0x1bdb611, None), state
jpayne@69 13704 */
jpayne@69 13705 /*else*/ {
jpayne@69 13706 __pyx_t_4 = (__pyx_v_self->comment != ((PyObject*)Py_None));
jpayne@69 13707 if (!__pyx_t_4) {
jpayne@69 13708 } else {
jpayne@69 13709 __pyx_t_2 = __pyx_t_4;
jpayne@69 13710 goto __pyx_L4_bool_binop_done;
jpayne@69 13711 }
jpayne@69 13712 __pyx_t_4 = (__pyx_v_self->name != ((PyObject*)Py_None));
jpayne@69 13713 if (!__pyx_t_4) {
jpayne@69 13714 } else {
jpayne@69 13715 __pyx_t_2 = __pyx_t_4;
jpayne@69 13716 goto __pyx_L4_bool_binop_done;
jpayne@69 13717 }
jpayne@69 13718 __pyx_t_4 = (__pyx_v_self->quality != ((PyObject*)Py_None));
jpayne@69 13719 if (!__pyx_t_4) {
jpayne@69 13720 } else {
jpayne@69 13721 __pyx_t_2 = __pyx_t_4;
jpayne@69 13722 goto __pyx_L4_bool_binop_done;
jpayne@69 13723 }
jpayne@69 13724 __pyx_t_4 = (__pyx_v_self->sequence != ((PyObject*)Py_None));
jpayne@69 13725 __pyx_t_2 = __pyx_t_4;
jpayne@69 13726 __pyx_L4_bool_binop_done:;
jpayne@69 13727 __pyx_v_use_setstate = __pyx_t_2;
jpayne@69 13728 }
jpayne@69 13729 __pyx_L3:;
jpayne@69 13730
jpayne@69 13731 /* "(tree fragment)":12
jpayne@69 13732 * else:
jpayne@69 13733 * use_setstate = self.comment is not None or self.name is not None or self.quality is not None or self.sequence is not None
jpayne@69 13734 * if use_setstate: # <<<<<<<<<<<<<<
jpayne@69 13735 * return __pyx_unpickle_FastxRecord, (type(self), 0x1bdb611, None), state
jpayne@69 13736 * else:
jpayne@69 13737 */
jpayne@69 13738 if (__pyx_v_use_setstate) {
jpayne@69 13739
jpayne@69 13740 /* "(tree fragment)":13
jpayne@69 13741 * use_setstate = self.comment is not None or self.name is not None or self.quality is not None or self.sequence is not None
jpayne@69 13742 * if use_setstate:
jpayne@69 13743 * return __pyx_unpickle_FastxRecord, (type(self), 0x1bdb611, None), state # <<<<<<<<<<<<<<
jpayne@69 13744 * else:
jpayne@69 13745 * return __pyx_unpickle_FastxRecord, (type(self), 0x1bdb611, state)
jpayne@69 13746 */
jpayne@69 13747 __Pyx_XDECREF(__pyx_r);
jpayne@69 13748 __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_pyx_unpickle_FastxRecord); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 13, __pyx_L1_error)
jpayne@69 13749 __Pyx_GOTREF(__pyx_t_3);
jpayne@69 13750 __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error)
jpayne@69 13751 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 13752 __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
jpayne@69 13753 __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
jpayne@69 13754 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))))) __PYX_ERR(1, 13, __pyx_L1_error);
jpayne@69 13755 __Pyx_INCREF(__pyx_int_29210129);
jpayne@69 13756 __Pyx_GIVEREF(__pyx_int_29210129);
jpayne@69 13757 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_29210129)) __PYX_ERR(1, 13, __pyx_L1_error);
jpayne@69 13758 __Pyx_INCREF(Py_None);
jpayne@69 13759 __Pyx_GIVEREF(Py_None);
jpayne@69 13760 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, Py_None)) __PYX_ERR(1, 13, __pyx_L1_error);
jpayne@69 13761 __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 13, __pyx_L1_error)
jpayne@69 13762 __Pyx_GOTREF(__pyx_t_5);
jpayne@69 13763 __Pyx_GIVEREF(__pyx_t_3);
jpayne@69 13764 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_3)) __PYX_ERR(1, 13, __pyx_L1_error);
jpayne@69 13765 __Pyx_GIVEREF(__pyx_t_1);
jpayne@69 13766 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_1)) __PYX_ERR(1, 13, __pyx_L1_error);
jpayne@69 13767 __Pyx_INCREF(__pyx_v_state);
jpayne@69 13768 __Pyx_GIVEREF(__pyx_v_state);
jpayne@69 13769 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_v_state)) __PYX_ERR(1, 13, __pyx_L1_error);
jpayne@69 13770 __pyx_t_3 = 0;
jpayne@69 13771 __pyx_t_1 = 0;
jpayne@69 13772 __pyx_r = __pyx_t_5;
jpayne@69 13773 __pyx_t_5 = 0;
jpayne@69 13774 goto __pyx_L0;
jpayne@69 13775
jpayne@69 13776 /* "(tree fragment)":12
jpayne@69 13777 * else:
jpayne@69 13778 * use_setstate = self.comment is not None or self.name is not None or self.quality is not None or self.sequence is not None
jpayne@69 13779 * if use_setstate: # <<<<<<<<<<<<<<
jpayne@69 13780 * return __pyx_unpickle_FastxRecord, (type(self), 0x1bdb611, None), state
jpayne@69 13781 * else:
jpayne@69 13782 */
jpayne@69 13783 }
jpayne@69 13784
jpayne@69 13785 /* "(tree fragment)":15
jpayne@69 13786 * return __pyx_unpickle_FastxRecord, (type(self), 0x1bdb611, None), state
jpayne@69 13787 * else:
jpayne@69 13788 * return __pyx_unpickle_FastxRecord, (type(self), 0x1bdb611, state) # <<<<<<<<<<<<<<
jpayne@69 13789 * def __setstate_cython__(self, __pyx_state):
jpayne@69 13790 * __pyx_unpickle_FastxRecord__set_state(self, __pyx_state)
jpayne@69 13791 */
jpayne@69 13792 /*else*/ {
jpayne@69 13793 __Pyx_XDECREF(__pyx_r);
jpayne@69 13794 __Pyx_GetModuleGlobalName(__pyx_t_5, __pyx_n_s_pyx_unpickle_FastxRecord); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 15, __pyx_L1_error)
jpayne@69 13795 __Pyx_GOTREF(__pyx_t_5);
jpayne@69 13796 __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error)
jpayne@69 13797 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 13798 __Pyx_INCREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
jpayne@69 13799 __Pyx_GIVEREF(((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))));
jpayne@69 13800 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)Py_TYPE(((PyObject *)__pyx_v_self))))) __PYX_ERR(1, 15, __pyx_L1_error);
jpayne@69 13801 __Pyx_INCREF(__pyx_int_29210129);
jpayne@69 13802 __Pyx_GIVEREF(__pyx_int_29210129);
jpayne@69 13803 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_int_29210129)) __PYX_ERR(1, 15, __pyx_L1_error);
jpayne@69 13804 __Pyx_INCREF(__pyx_v_state);
jpayne@69 13805 __Pyx_GIVEREF(__pyx_v_state);
jpayne@69 13806 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_state)) __PYX_ERR(1, 15, __pyx_L1_error);
jpayne@69 13807 __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 15, __pyx_L1_error)
jpayne@69 13808 __Pyx_GOTREF(__pyx_t_3);
jpayne@69 13809 __Pyx_GIVEREF(__pyx_t_5);
jpayne@69 13810 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_5)) __PYX_ERR(1, 15, __pyx_L1_error);
jpayne@69 13811 __Pyx_GIVEREF(__pyx_t_1);
jpayne@69 13812 if (__Pyx_PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1)) __PYX_ERR(1, 15, __pyx_L1_error);
jpayne@69 13813 __pyx_t_5 = 0;
jpayne@69 13814 __pyx_t_1 = 0;
jpayne@69 13815 __pyx_r = __pyx_t_3;
jpayne@69 13816 __pyx_t_3 = 0;
jpayne@69 13817 goto __pyx_L0;
jpayne@69 13818 }
jpayne@69 13819
jpayne@69 13820 /* "(tree fragment)":1
jpayne@69 13821 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
jpayne@69 13822 * cdef tuple state
jpayne@69 13823 * cdef object _dict
jpayne@69 13824 */
jpayne@69 13825
jpayne@69 13826 /* function exit code */
jpayne@69 13827 __pyx_L1_error:;
jpayne@69 13828 __Pyx_XDECREF(__pyx_t_1);
jpayne@69 13829 __Pyx_XDECREF(__pyx_t_3);
jpayne@69 13830 __Pyx_XDECREF(__pyx_t_5);
jpayne@69 13831 __Pyx_AddTraceback("pysam.libcfaidx.FastxRecord.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 13832 __pyx_r = NULL;
jpayne@69 13833 __pyx_L0:;
jpayne@69 13834 __Pyx_XDECREF(__pyx_v_state);
jpayne@69 13835 __Pyx_XDECREF(__pyx_v__dict);
jpayne@69 13836 __Pyx_XGIVEREF(__pyx_r);
jpayne@69 13837 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@69 13838 __Pyx_RefNannyFinishContext();
jpayne@69 13839 return __pyx_r;
jpayne@69 13840 }
jpayne@69 13841
jpayne@69 13842 /* "(tree fragment)":16
jpayne@69 13843 * else:
jpayne@69 13844 * return __pyx_unpickle_FastxRecord, (type(self), 0x1bdb611, state)
jpayne@69 13845 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
jpayne@69 13846 * __pyx_unpickle_FastxRecord__set_state(self, __pyx_state)
jpayne@69 13847 */
jpayne@69 13848
jpayne@69 13849 /* Python wrapper */
jpayne@69 13850 static PyObject *__pyx_pw_5pysam_9libcfaidx_11FastxRecord_19__setstate_cython__(PyObject *__pyx_v_self,
jpayne@69 13851 #if CYTHON_METH_FASTCALL
jpayne@69 13852 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@69 13853 #else
jpayne@69 13854 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@69 13855 #endif
jpayne@69 13856 ); /*proto*/
jpayne@69 13857 PyDoc_STRVAR(__pyx_doc_5pysam_9libcfaidx_11FastxRecord_18__setstate_cython__, "FastxRecord.__setstate_cython__(self, __pyx_state)");
jpayne@69 13858 static PyMethodDef __pyx_mdef_5pysam_9libcfaidx_11FastxRecord_19__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_9libcfaidx_11FastxRecord_19__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_9libcfaidx_11FastxRecord_18__setstate_cython__};
jpayne@69 13859 static PyObject *__pyx_pw_5pysam_9libcfaidx_11FastxRecord_19__setstate_cython__(PyObject *__pyx_v_self,
jpayne@69 13860 #if CYTHON_METH_FASTCALL
jpayne@69 13861 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@69 13862 #else
jpayne@69 13863 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@69 13864 #endif
jpayne@69 13865 ) {
jpayne@69 13866 PyObject *__pyx_v___pyx_state = 0;
jpayne@69 13867 #if !CYTHON_METH_FASTCALL
jpayne@69 13868 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
jpayne@69 13869 #endif
jpayne@69 13870 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@69 13871 PyObject* values[1] = {0};
jpayne@69 13872 int __pyx_lineno = 0;
jpayne@69 13873 const char *__pyx_filename = NULL;
jpayne@69 13874 int __pyx_clineno = 0;
jpayne@69 13875 PyObject *__pyx_r = 0;
jpayne@69 13876 __Pyx_RefNannyDeclarations
jpayne@69 13877 __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
jpayne@69 13878 #if !CYTHON_METH_FASTCALL
jpayne@69 13879 #if CYTHON_ASSUME_SAFE_MACROS
jpayne@69 13880 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
jpayne@69 13881 #else
jpayne@69 13882 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
jpayne@69 13883 #endif
jpayne@69 13884 #endif
jpayne@69 13885 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
jpayne@69 13886 {
jpayne@69 13887 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0};
jpayne@69 13888 if (__pyx_kwds) {
jpayne@69 13889 Py_ssize_t kw_args;
jpayne@69 13890 switch (__pyx_nargs) {
jpayne@69 13891 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
jpayne@69 13892 CYTHON_FALLTHROUGH;
jpayne@69 13893 case 0: break;
jpayne@69 13894 default: goto __pyx_L5_argtuple_error;
jpayne@69 13895 }
jpayne@69 13896 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
jpayne@69 13897 switch (__pyx_nargs) {
jpayne@69 13898 case 0:
jpayne@69 13899 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) {
jpayne@69 13900 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
jpayne@69 13901 kw_args--;
jpayne@69 13902 }
jpayne@69 13903 else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 16, __pyx_L3_error)
jpayne@69 13904 else goto __pyx_L5_argtuple_error;
jpayne@69 13905 }
jpayne@69 13906 if (unlikely(kw_args > 0)) {
jpayne@69 13907 const Py_ssize_t kwd_pos_args = __pyx_nargs;
jpayne@69 13908 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__setstate_cython__") < 0)) __PYX_ERR(1, 16, __pyx_L3_error)
jpayne@69 13909 }
jpayne@69 13910 } else if (unlikely(__pyx_nargs != 1)) {
jpayne@69 13911 goto __pyx_L5_argtuple_error;
jpayne@69 13912 } else {
jpayne@69 13913 values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
jpayne@69 13914 }
jpayne@69 13915 __pyx_v___pyx_state = values[0];
jpayne@69 13916 }
jpayne@69 13917 goto __pyx_L6_skip;
jpayne@69 13918 __pyx_L5_argtuple_error:;
jpayne@69 13919 __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 16, __pyx_L3_error)
jpayne@69 13920 __pyx_L6_skip:;
jpayne@69 13921 goto __pyx_L4_argument_unpacking_done;
jpayne@69 13922 __pyx_L3_error:;
jpayne@69 13923 {
jpayne@69 13924 Py_ssize_t __pyx_temp;
jpayne@69 13925 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
jpayne@69 13926 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
jpayne@69 13927 }
jpayne@69 13928 }
jpayne@69 13929 __Pyx_AddTraceback("pysam.libcfaidx.FastxRecord.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 13930 __Pyx_RefNannyFinishContext();
jpayne@69 13931 return NULL;
jpayne@69 13932 __pyx_L4_argument_unpacking_done:;
jpayne@69 13933 __pyx_r = __pyx_pf_5pysam_9libcfaidx_11FastxRecord_18__setstate_cython__(((struct __pyx_obj_5pysam_9libcfaidx_FastxRecord *)__pyx_v_self), __pyx_v___pyx_state);
jpayne@69 13934
jpayne@69 13935 /* function exit code */
jpayne@69 13936 {
jpayne@69 13937 Py_ssize_t __pyx_temp;
jpayne@69 13938 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
jpayne@69 13939 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
jpayne@69 13940 }
jpayne@69 13941 }
jpayne@69 13942 __Pyx_RefNannyFinishContext();
jpayne@69 13943 return __pyx_r;
jpayne@69 13944 }
jpayne@69 13945
jpayne@69 13946 static PyObject *__pyx_pf_5pysam_9libcfaidx_11FastxRecord_18__setstate_cython__(struct __pyx_obj_5pysam_9libcfaidx_FastxRecord *__pyx_v_self, PyObject *__pyx_v___pyx_state) {
jpayne@69 13947 PyObject *__pyx_r = NULL;
jpayne@69 13948 __Pyx_TraceDeclarations
jpayne@69 13949 __Pyx_RefNannyDeclarations
jpayne@69 13950 PyObject *__pyx_t_1 = NULL;
jpayne@69 13951 int __pyx_lineno = 0;
jpayne@69 13952 const char *__pyx_filename = NULL;
jpayne@69 13953 int __pyx_clineno = 0;
jpayne@69 13954 __Pyx_TraceFrameInit(__pyx_codeobj__33)
jpayne@69 13955 __Pyx_RefNannySetupContext("__setstate_cython__", 1);
jpayne@69 13956 __Pyx_TraceCall("__setstate_cython__", __pyx_f[1], 16, 0, __PYX_ERR(1, 16, __pyx_L1_error));
jpayne@69 13957
jpayne@69 13958 /* "(tree fragment)":17
jpayne@69 13959 * return __pyx_unpickle_FastxRecord, (type(self), 0x1bdb611, state)
jpayne@69 13960 * def __setstate_cython__(self, __pyx_state):
jpayne@69 13961 * __pyx_unpickle_FastxRecord__set_state(self, __pyx_state) # <<<<<<<<<<<<<<
jpayne@69 13962 */
jpayne@69 13963 if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(1, 17, __pyx_L1_error)
jpayne@69 13964 __pyx_t_1 = __pyx_f_5pysam_9libcfaidx___pyx_unpickle_FastxRecord__set_state(__pyx_v_self, ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 17, __pyx_L1_error)
jpayne@69 13965 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 13966 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@69 13967
jpayne@69 13968 /* "(tree fragment)":16
jpayne@69 13969 * else:
jpayne@69 13970 * return __pyx_unpickle_FastxRecord, (type(self), 0x1bdb611, state)
jpayne@69 13971 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
jpayne@69 13972 * __pyx_unpickle_FastxRecord__set_state(self, __pyx_state)
jpayne@69 13973 */
jpayne@69 13974
jpayne@69 13975 /* function exit code */
jpayne@69 13976 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
jpayne@69 13977 goto __pyx_L0;
jpayne@69 13978 __pyx_L1_error:;
jpayne@69 13979 __Pyx_XDECREF(__pyx_t_1);
jpayne@69 13980 __Pyx_AddTraceback("pysam.libcfaidx.FastxRecord.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 13981 __pyx_r = NULL;
jpayne@69 13982 __pyx_L0:;
jpayne@69 13983 __Pyx_XGIVEREF(__pyx_r);
jpayne@69 13984 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@69 13985 __Pyx_RefNannyFinishContext();
jpayne@69 13986 return __pyx_r;
jpayne@69 13987 }
jpayne@69 13988
jpayne@69 13989 /* "pysam/libcfaidx.pyx":545
jpayne@69 13990 *
jpayne@69 13991 * """
jpayne@69 13992 * def __cinit__(self, *args, **kwargs): # <<<<<<<<<<<<<<
jpayne@69 13993 * # self.fastqfile = <gzFile*>NULL
jpayne@69 13994 * self._filename = None
jpayne@69 13995 */
jpayne@69 13996
jpayne@69 13997 /* Python wrapper */
jpayne@69 13998 static int __pyx_pw_5pysam_9libcfaidx_9FastxFile_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
jpayne@69 13999 static int __pyx_pw_5pysam_9libcfaidx_9FastxFile_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
jpayne@69 14000 PyObject *__pyx_v_args = 0;
jpayne@69 14001 PyObject *__pyx_v_kwargs = 0;
jpayne@69 14002 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
jpayne@69 14003 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@69 14004 int __pyx_r;
jpayne@69 14005 __Pyx_RefNannyDeclarations
jpayne@69 14006 __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
jpayne@69 14007 #if CYTHON_ASSUME_SAFE_MACROS
jpayne@69 14008 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
jpayne@69 14009 #else
jpayne@69 14010 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return -1;
jpayne@69 14011 #endif
jpayne@69 14012 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
jpayne@69 14013 if (unlikely(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 1))) return -1;
jpayne@69 14014 if (unlikely(__pyx_kwds)) {
jpayne@69 14015 __pyx_v_kwargs = __Pyx_KwargsAsDict_VARARGS(__pyx_kwds, __pyx_kwvalues);
jpayne@69 14016 if (unlikely(!__pyx_v_kwargs)) return -1;
jpayne@69 14017 __Pyx_GOTREF(__pyx_v_kwargs);
jpayne@69 14018 } else {
jpayne@69 14019 __pyx_v_kwargs = PyDict_New();
jpayne@69 14020 if (unlikely(!__pyx_v_kwargs)) return -1;
jpayne@69 14021 __Pyx_GOTREF(__pyx_v_kwargs);
jpayne@69 14022 }
jpayne@69 14023 __Pyx_INCREF(__pyx_args);
jpayne@69 14024 __pyx_v_args = __pyx_args;
jpayne@69 14025 __pyx_r = __pyx_pf_5pysam_9libcfaidx_9FastxFile___cinit__(((struct __pyx_obj_5pysam_9libcfaidx_FastxFile *)__pyx_v_self), __pyx_v_args, __pyx_v_kwargs);
jpayne@69 14026
jpayne@69 14027 /* function exit code */
jpayne@69 14028 __Pyx_DECREF(__pyx_v_args);
jpayne@69 14029 __Pyx_DECREF(__pyx_v_kwargs);
jpayne@69 14030 __Pyx_RefNannyFinishContext();
jpayne@69 14031 return __pyx_r;
jpayne@69 14032 }
jpayne@69 14033
jpayne@69 14034 static int __pyx_pf_5pysam_9libcfaidx_9FastxFile___cinit__(struct __pyx_obj_5pysam_9libcfaidx_FastxFile *__pyx_v_self, PyObject *__pyx_v_args, PyObject *__pyx_v_kwargs) {
jpayne@69 14035 int __pyx_r;
jpayne@69 14036 __Pyx_TraceDeclarations
jpayne@69 14037 __Pyx_RefNannyDeclarations
jpayne@69 14038 PyObject *__pyx_t_1 = NULL;
jpayne@69 14039 PyObject *__pyx_t_2 = NULL;
jpayne@69 14040 PyObject *__pyx_t_3 = NULL;
jpayne@69 14041 int __pyx_lineno = 0;
jpayne@69 14042 const char *__pyx_filename = NULL;
jpayne@69 14043 int __pyx_clineno = 0;
jpayne@69 14044 __Pyx_RefNannySetupContext("__cinit__", 1);
jpayne@69 14045 __Pyx_TraceCall("__cinit__", __pyx_f[0], 545, 0, __PYX_ERR(0, 545, __pyx_L1_error));
jpayne@69 14046
jpayne@69 14047 /* "pysam/libcfaidx.pyx":547
jpayne@69 14048 * def __cinit__(self, *args, **kwargs):
jpayne@69 14049 * # self.fastqfile = <gzFile*>NULL
jpayne@69 14050 * self._filename = None # <<<<<<<<<<<<<<
jpayne@69 14051 * self.entry = NULL
jpayne@69 14052 * self._open(*args, **kwargs)
jpayne@69 14053 */
jpayne@69 14054 __Pyx_INCREF(Py_None);
jpayne@69 14055 __Pyx_GIVEREF(Py_None);
jpayne@69 14056 __Pyx_GOTREF(__pyx_v_self->_filename);
jpayne@69 14057 __Pyx_DECREF(__pyx_v_self->_filename);
jpayne@69 14058 __pyx_v_self->_filename = Py_None;
jpayne@69 14059
jpayne@69 14060 /* "pysam/libcfaidx.pyx":548
jpayne@69 14061 * # self.fastqfile = <gzFile*>NULL
jpayne@69 14062 * self._filename = None
jpayne@69 14063 * self.entry = NULL # <<<<<<<<<<<<<<
jpayne@69 14064 * self._open(*args, **kwargs)
jpayne@69 14065 *
jpayne@69 14066 */
jpayne@69 14067 __pyx_v_self->entry = NULL;
jpayne@69 14068
jpayne@69 14069 /* "pysam/libcfaidx.pyx":549
jpayne@69 14070 * self._filename = None
jpayne@69 14071 * self.entry = NULL
jpayne@69 14072 * self._open(*args, **kwargs) # <<<<<<<<<<<<<<
jpayne@69 14073 *
jpayne@69 14074 * def is_open(self):
jpayne@69 14075 */
jpayne@69 14076 __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_open); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 549, __pyx_L1_error)
jpayne@69 14077 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 14078 __pyx_t_2 = PyDict_Copy(__pyx_v_kwargs); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 549, __pyx_L1_error)
jpayne@69 14079 __Pyx_GOTREF(__pyx_t_2);
jpayne@69 14080 __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_v_args, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 549, __pyx_L1_error)
jpayne@69 14081 __Pyx_GOTREF(__pyx_t_3);
jpayne@69 14082 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@69 14083 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@69 14084 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
jpayne@69 14085
jpayne@69 14086 /* "pysam/libcfaidx.pyx":545
jpayne@69 14087 *
jpayne@69 14088 * """
jpayne@69 14089 * def __cinit__(self, *args, **kwargs): # <<<<<<<<<<<<<<
jpayne@69 14090 * # self.fastqfile = <gzFile*>NULL
jpayne@69 14091 * self._filename = None
jpayne@69 14092 */
jpayne@69 14093
jpayne@69 14094 /* function exit code */
jpayne@69 14095 __pyx_r = 0;
jpayne@69 14096 goto __pyx_L0;
jpayne@69 14097 __pyx_L1_error:;
jpayne@69 14098 __Pyx_XDECREF(__pyx_t_1);
jpayne@69 14099 __Pyx_XDECREF(__pyx_t_2);
jpayne@69 14100 __Pyx_XDECREF(__pyx_t_3);
jpayne@69 14101 __Pyx_AddTraceback("pysam.libcfaidx.FastxFile.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 14102 __pyx_r = -1;
jpayne@69 14103 __pyx_L0:;
jpayne@69 14104 __Pyx_TraceReturn(Py_None, 0);
jpayne@69 14105 __Pyx_RefNannyFinishContext();
jpayne@69 14106 return __pyx_r;
jpayne@69 14107 }
jpayne@69 14108
jpayne@69 14109 /* "pysam/libcfaidx.pyx":551
jpayne@69 14110 * self._open(*args, **kwargs)
jpayne@69 14111 *
jpayne@69 14112 * def is_open(self): # <<<<<<<<<<<<<<
jpayne@69 14113 * '''return true if samfile has been opened.'''
jpayne@69 14114 * return self.entry != NULL
jpayne@69 14115 */
jpayne@69 14116
jpayne@69 14117 /* Python wrapper */
jpayne@69 14118 static PyObject *__pyx_pw_5pysam_9libcfaidx_9FastxFile_3is_open(PyObject *__pyx_v_self,
jpayne@69 14119 #if CYTHON_METH_FASTCALL
jpayne@69 14120 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@69 14121 #else
jpayne@69 14122 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@69 14123 #endif
jpayne@69 14124 ); /*proto*/
jpayne@69 14125 PyDoc_STRVAR(__pyx_doc_5pysam_9libcfaidx_9FastxFile_2is_open, "FastxFile.is_open(self)\nreturn true if samfile has been opened.");
jpayne@69 14126 static PyMethodDef __pyx_mdef_5pysam_9libcfaidx_9FastxFile_3is_open = {"is_open", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_9libcfaidx_9FastxFile_3is_open, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_9libcfaidx_9FastxFile_2is_open};
jpayne@69 14127 static PyObject *__pyx_pw_5pysam_9libcfaidx_9FastxFile_3is_open(PyObject *__pyx_v_self,
jpayne@69 14128 #if CYTHON_METH_FASTCALL
jpayne@69 14129 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@69 14130 #else
jpayne@69 14131 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@69 14132 #endif
jpayne@69 14133 ) {
jpayne@69 14134 #if !CYTHON_METH_FASTCALL
jpayne@69 14135 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
jpayne@69 14136 #endif
jpayne@69 14137 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@69 14138 PyObject *__pyx_r = 0;
jpayne@69 14139 __Pyx_RefNannyDeclarations
jpayne@69 14140 __Pyx_RefNannySetupContext("is_open (wrapper)", 0);
jpayne@69 14141 #if !CYTHON_METH_FASTCALL
jpayne@69 14142 #if CYTHON_ASSUME_SAFE_MACROS
jpayne@69 14143 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
jpayne@69 14144 #else
jpayne@69 14145 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
jpayne@69 14146 #endif
jpayne@69 14147 #endif
jpayne@69 14148 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
jpayne@69 14149 if (unlikely(__pyx_nargs > 0)) {
jpayne@69 14150 __Pyx_RaiseArgtupleInvalid("is_open", 1, 0, 0, __pyx_nargs); return NULL;}
jpayne@69 14151 if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "is_open", 0))) return NULL;
jpayne@69 14152 __pyx_r = __pyx_pf_5pysam_9libcfaidx_9FastxFile_2is_open(((struct __pyx_obj_5pysam_9libcfaidx_FastxFile *)__pyx_v_self));
jpayne@69 14153
jpayne@69 14154 /* function exit code */
jpayne@69 14155 __Pyx_RefNannyFinishContext();
jpayne@69 14156 return __pyx_r;
jpayne@69 14157 }
jpayne@69 14158
jpayne@69 14159 static PyObject *__pyx_pf_5pysam_9libcfaidx_9FastxFile_2is_open(struct __pyx_obj_5pysam_9libcfaidx_FastxFile *__pyx_v_self) {
jpayne@69 14160 PyObject *__pyx_r = NULL;
jpayne@69 14161 __Pyx_TraceDeclarations
jpayne@69 14162 __Pyx_RefNannyDeclarations
jpayne@69 14163 PyObject *__pyx_t_1 = NULL;
jpayne@69 14164 int __pyx_lineno = 0;
jpayne@69 14165 const char *__pyx_filename = NULL;
jpayne@69 14166 int __pyx_clineno = 0;
jpayne@69 14167 __Pyx_TraceFrameInit(__pyx_codeobj__34)
jpayne@69 14168 __Pyx_RefNannySetupContext("is_open", 1);
jpayne@69 14169 __Pyx_TraceCall("is_open", __pyx_f[0], 551, 0, __PYX_ERR(0, 551, __pyx_L1_error));
jpayne@69 14170
jpayne@69 14171 /* "pysam/libcfaidx.pyx":553
jpayne@69 14172 * def is_open(self):
jpayne@69 14173 * '''return true if samfile has been opened.'''
jpayne@69 14174 * return self.entry != NULL # <<<<<<<<<<<<<<
jpayne@69 14175 *
jpayne@69 14176 * def _open(self, filename, persist=True):
jpayne@69 14177 */
jpayne@69 14178 __Pyx_XDECREF(__pyx_r);
jpayne@69 14179 __pyx_t_1 = __Pyx_PyBool_FromLong((__pyx_v_self->entry != NULL)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 553, __pyx_L1_error)
jpayne@69 14180 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 14181 __pyx_r = __pyx_t_1;
jpayne@69 14182 __pyx_t_1 = 0;
jpayne@69 14183 goto __pyx_L0;
jpayne@69 14184
jpayne@69 14185 /* "pysam/libcfaidx.pyx":551
jpayne@69 14186 * self._open(*args, **kwargs)
jpayne@69 14187 *
jpayne@69 14188 * def is_open(self): # <<<<<<<<<<<<<<
jpayne@69 14189 * '''return true if samfile has been opened.'''
jpayne@69 14190 * return self.entry != NULL
jpayne@69 14191 */
jpayne@69 14192
jpayne@69 14193 /* function exit code */
jpayne@69 14194 __pyx_L1_error:;
jpayne@69 14195 __Pyx_XDECREF(__pyx_t_1);
jpayne@69 14196 __Pyx_AddTraceback("pysam.libcfaidx.FastxFile.is_open", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 14197 __pyx_r = NULL;
jpayne@69 14198 __pyx_L0:;
jpayne@69 14199 __Pyx_XGIVEREF(__pyx_r);
jpayne@69 14200 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@69 14201 __Pyx_RefNannyFinishContext();
jpayne@69 14202 return __pyx_r;
jpayne@69 14203 }
jpayne@69 14204
jpayne@69 14205 /* "pysam/libcfaidx.pyx":555
jpayne@69 14206 * return self.entry != NULL
jpayne@69 14207 *
jpayne@69 14208 * def _open(self, filename, persist=True): # <<<<<<<<<<<<<<
jpayne@69 14209 * '''open a fastq/fasta file in *filename*
jpayne@69 14210 *
jpayne@69 14211 */
jpayne@69 14212
jpayne@69 14213 /* Python wrapper */
jpayne@69 14214 static PyObject *__pyx_pw_5pysam_9libcfaidx_9FastxFile_5_open(PyObject *__pyx_v_self,
jpayne@69 14215 #if CYTHON_METH_FASTCALL
jpayne@69 14216 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@69 14217 #else
jpayne@69 14218 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@69 14219 #endif
jpayne@69 14220 ); /*proto*/
jpayne@69 14221 PyDoc_STRVAR(__pyx_doc_5pysam_9libcfaidx_9FastxFile_4_open, "FastxFile._open(self, filename, persist=True)\nopen a fastq/fasta file in *filename*\n\n Paramentes\n ----------\n\n persist : bool\n\n if True return a copy of the underlying data (default\n True). The copy will persist even if the iteration\n on the file continues.\n\n ");
jpayne@69 14222 static PyMethodDef __pyx_mdef_5pysam_9libcfaidx_9FastxFile_5_open = {"_open", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_9libcfaidx_9FastxFile_5_open, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_9libcfaidx_9FastxFile_4_open};
jpayne@69 14223 static PyObject *__pyx_pw_5pysam_9libcfaidx_9FastxFile_5_open(PyObject *__pyx_v_self,
jpayne@69 14224 #if CYTHON_METH_FASTCALL
jpayne@69 14225 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@69 14226 #else
jpayne@69 14227 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@69 14228 #endif
jpayne@69 14229 ) {
jpayne@69 14230 PyObject *__pyx_v_filename = 0;
jpayne@69 14231 PyObject *__pyx_v_persist = 0;
jpayne@69 14232 #if !CYTHON_METH_FASTCALL
jpayne@69 14233 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
jpayne@69 14234 #endif
jpayne@69 14235 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@69 14236 PyObject* values[2] = {0,0};
jpayne@69 14237 int __pyx_lineno = 0;
jpayne@69 14238 const char *__pyx_filename = NULL;
jpayne@69 14239 int __pyx_clineno = 0;
jpayne@69 14240 PyObject *__pyx_r = 0;
jpayne@69 14241 __Pyx_RefNannyDeclarations
jpayne@69 14242 __Pyx_RefNannySetupContext("_open (wrapper)", 0);
jpayne@69 14243 #if !CYTHON_METH_FASTCALL
jpayne@69 14244 #if CYTHON_ASSUME_SAFE_MACROS
jpayne@69 14245 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
jpayne@69 14246 #else
jpayne@69 14247 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
jpayne@69 14248 #endif
jpayne@69 14249 #endif
jpayne@69 14250 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
jpayne@69 14251 {
jpayne@69 14252 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_filename,&__pyx_n_s_persist,0};
jpayne@69 14253 values[1] = __Pyx_Arg_NewRef_FASTCALL(((PyObject *)Py_True));
jpayne@69 14254 if (__pyx_kwds) {
jpayne@69 14255 Py_ssize_t kw_args;
jpayne@69 14256 switch (__pyx_nargs) {
jpayne@69 14257 case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
jpayne@69 14258 CYTHON_FALLTHROUGH;
jpayne@69 14259 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
jpayne@69 14260 CYTHON_FALLTHROUGH;
jpayne@69 14261 case 0: break;
jpayne@69 14262 default: goto __pyx_L5_argtuple_error;
jpayne@69 14263 }
jpayne@69 14264 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
jpayne@69 14265 switch (__pyx_nargs) {
jpayne@69 14266 case 0:
jpayne@69 14267 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_filename)) != 0)) {
jpayne@69 14268 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
jpayne@69 14269 kw_args--;
jpayne@69 14270 }
jpayne@69 14271 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 555, __pyx_L3_error)
jpayne@69 14272 else goto __pyx_L5_argtuple_error;
jpayne@69 14273 CYTHON_FALLTHROUGH;
jpayne@69 14274 case 1:
jpayne@69 14275 if (kw_args > 0) {
jpayne@69 14276 PyObject* value = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_persist);
jpayne@69 14277 if (value) { values[1] = __Pyx_Arg_NewRef_FASTCALL(value); kw_args--; }
jpayne@69 14278 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 555, __pyx_L3_error)
jpayne@69 14279 }
jpayne@69 14280 }
jpayne@69 14281 if (unlikely(kw_args > 0)) {
jpayne@69 14282 const Py_ssize_t kwd_pos_args = __pyx_nargs;
jpayne@69 14283 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "_open") < 0)) __PYX_ERR(0, 555, __pyx_L3_error)
jpayne@69 14284 }
jpayne@69 14285 } else {
jpayne@69 14286 switch (__pyx_nargs) {
jpayne@69 14287 case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
jpayne@69 14288 CYTHON_FALLTHROUGH;
jpayne@69 14289 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
jpayne@69 14290 break;
jpayne@69 14291 default: goto __pyx_L5_argtuple_error;
jpayne@69 14292 }
jpayne@69 14293 }
jpayne@69 14294 __pyx_v_filename = values[0];
jpayne@69 14295 __pyx_v_persist = values[1];
jpayne@69 14296 }
jpayne@69 14297 goto __pyx_L6_skip;
jpayne@69 14298 __pyx_L5_argtuple_error:;
jpayne@69 14299 __Pyx_RaiseArgtupleInvalid("_open", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 555, __pyx_L3_error)
jpayne@69 14300 __pyx_L6_skip:;
jpayne@69 14301 goto __pyx_L4_argument_unpacking_done;
jpayne@69 14302 __pyx_L3_error:;
jpayne@69 14303 {
jpayne@69 14304 Py_ssize_t __pyx_temp;
jpayne@69 14305 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
jpayne@69 14306 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
jpayne@69 14307 }
jpayne@69 14308 }
jpayne@69 14309 __Pyx_AddTraceback("pysam.libcfaidx.FastxFile._open", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 14310 __Pyx_RefNannyFinishContext();
jpayne@69 14311 return NULL;
jpayne@69 14312 __pyx_L4_argument_unpacking_done:;
jpayne@69 14313 __pyx_r = __pyx_pf_5pysam_9libcfaidx_9FastxFile_4_open(((struct __pyx_obj_5pysam_9libcfaidx_FastxFile *)__pyx_v_self), __pyx_v_filename, __pyx_v_persist);
jpayne@69 14314
jpayne@69 14315 /* function exit code */
jpayne@69 14316 {
jpayne@69 14317 Py_ssize_t __pyx_temp;
jpayne@69 14318 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
jpayne@69 14319 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
jpayne@69 14320 }
jpayne@69 14321 }
jpayne@69 14322 __Pyx_RefNannyFinishContext();
jpayne@69 14323 return __pyx_r;
jpayne@69 14324 }
jpayne@69 14325
jpayne@69 14326 static PyObject *__pyx_pf_5pysam_9libcfaidx_9FastxFile_4_open(struct __pyx_obj_5pysam_9libcfaidx_FastxFile *__pyx_v_self, PyObject *__pyx_v_filename, PyObject *__pyx_v_persist) {
jpayne@69 14327 char *__pyx_v_cfilename;
jpayne@69 14328 PyObject *__pyx_r = NULL;
jpayne@69 14329 __Pyx_TraceDeclarations
jpayne@69 14330 __Pyx_RefNannyDeclarations
jpayne@69 14331 int __pyx_t_1;
jpayne@69 14332 PyObject *__pyx_t_2 = NULL;
jpayne@69 14333 PyObject *__pyx_t_3 = NULL;
jpayne@69 14334 PyObject *__pyx_t_4 = NULL;
jpayne@69 14335 unsigned int __pyx_t_5;
jpayne@69 14336 char *__pyx_t_6;
jpayne@69 14337 int __pyx_t_7;
jpayne@69 14338 int __pyx_t_8;
jpayne@69 14339 int __pyx_lineno = 0;
jpayne@69 14340 const char *__pyx_filename = NULL;
jpayne@69 14341 int __pyx_clineno = 0;
jpayne@69 14342 __Pyx_TraceFrameInit(__pyx_codeobj__35)
jpayne@69 14343 __Pyx_RefNannySetupContext("_open", 1);
jpayne@69 14344 __Pyx_TraceCall("_open", __pyx_f[0], 555, 0, __PYX_ERR(0, 555, __pyx_L1_error));
jpayne@69 14345
jpayne@69 14346 /* "pysam/libcfaidx.pyx":568
jpayne@69 14347 *
jpayne@69 14348 * '''
jpayne@69 14349 * if self.fastqfile != NULL: # <<<<<<<<<<<<<<
jpayne@69 14350 * self.close()
jpayne@69 14351 *
jpayne@69 14352 */
jpayne@69 14353 __pyx_t_1 = (__pyx_v_self->fastqfile != NULL);
jpayne@69 14354 if (__pyx_t_1) {
jpayne@69 14355
jpayne@69 14356 /* "pysam/libcfaidx.pyx":569
jpayne@69 14357 * '''
jpayne@69 14358 * if self.fastqfile != NULL:
jpayne@69 14359 * self.close() # <<<<<<<<<<<<<<
jpayne@69 14360 *
jpayne@69 14361 * self._filename = encode_filename(filename)
jpayne@69 14362 */
jpayne@69 14363 __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_close); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 569, __pyx_L1_error)
jpayne@69 14364 __Pyx_GOTREF(__pyx_t_3);
jpayne@69 14365 __pyx_t_4 = NULL;
jpayne@69 14366 __pyx_t_5 = 0;
jpayne@69 14367 #if CYTHON_UNPACK_METHODS
jpayne@69 14368 if (likely(PyMethod_Check(__pyx_t_3))) {
jpayne@69 14369 __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
jpayne@69 14370 if (likely(__pyx_t_4)) {
jpayne@69 14371 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
jpayne@69 14372 __Pyx_INCREF(__pyx_t_4);
jpayne@69 14373 __Pyx_INCREF(function);
jpayne@69 14374 __Pyx_DECREF_SET(__pyx_t_3, function);
jpayne@69 14375 __pyx_t_5 = 1;
jpayne@69 14376 }
jpayne@69 14377 }
jpayne@69 14378 #endif
jpayne@69 14379 {
jpayne@69 14380 PyObject *__pyx_callargs[2] = {__pyx_t_4, NULL};
jpayne@69 14381 __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 0+__pyx_t_5);
jpayne@69 14382 __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
jpayne@69 14383 if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 569, __pyx_L1_error)
jpayne@69 14384 __Pyx_GOTREF(__pyx_t_2);
jpayne@69 14385 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
jpayne@69 14386 }
jpayne@69 14387 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@69 14388
jpayne@69 14389 /* "pysam/libcfaidx.pyx":568
jpayne@69 14390 *
jpayne@69 14391 * '''
jpayne@69 14392 * if self.fastqfile != NULL: # <<<<<<<<<<<<<<
jpayne@69 14393 * self.close()
jpayne@69 14394 *
jpayne@69 14395 */
jpayne@69 14396 }
jpayne@69 14397
jpayne@69 14398 /* "pysam/libcfaidx.pyx":571
jpayne@69 14399 * self.close()
jpayne@69 14400 *
jpayne@69 14401 * self._filename = encode_filename(filename) # <<<<<<<<<<<<<<
jpayne@69 14402 * cdef char *cfilename = self._filename
jpayne@69 14403 * self.is_remote = hisremote(cfilename)
jpayne@69 14404 */
jpayne@69 14405 __pyx_t_2 = __pyx_f_5pysam_9libcutils_encode_filename(__pyx_v_filename); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 571, __pyx_L1_error)
jpayne@69 14406 __Pyx_GOTREF(__pyx_t_2);
jpayne@69 14407 __Pyx_GIVEREF(__pyx_t_2);
jpayne@69 14408 __Pyx_GOTREF(__pyx_v_self->_filename);
jpayne@69 14409 __Pyx_DECREF(__pyx_v_self->_filename);
jpayne@69 14410 __pyx_v_self->_filename = __pyx_t_2;
jpayne@69 14411 __pyx_t_2 = 0;
jpayne@69 14412
jpayne@69 14413 /* "pysam/libcfaidx.pyx":572
jpayne@69 14414 *
jpayne@69 14415 * self._filename = encode_filename(filename)
jpayne@69 14416 * cdef char *cfilename = self._filename # <<<<<<<<<<<<<<
jpayne@69 14417 * self.is_remote = hisremote(cfilename)
jpayne@69 14418 *
jpayne@69 14419 */
jpayne@69 14420 __pyx_t_6 = __Pyx_PyObject_AsWritableString(__pyx_v_self->_filename); if (unlikely((!__pyx_t_6) && PyErr_Occurred())) __PYX_ERR(0, 572, __pyx_L1_error)
jpayne@69 14421 __pyx_v_cfilename = __pyx_t_6;
jpayne@69 14422
jpayne@69 14423 /* "pysam/libcfaidx.pyx":573
jpayne@69 14424 * self._filename = encode_filename(filename)
jpayne@69 14425 * cdef char *cfilename = self._filename
jpayne@69 14426 * self.is_remote = hisremote(cfilename) # <<<<<<<<<<<<<<
jpayne@69 14427 *
jpayne@69 14428 * # open file for reading
jpayne@69 14429 */
jpayne@69 14430 __pyx_v_self->is_remote = hisremote(__pyx_v_cfilename);
jpayne@69 14431
jpayne@69 14432 /* "pysam/libcfaidx.pyx":576
jpayne@69 14433 *
jpayne@69 14434 * # open file for reading
jpayne@69 14435 * if (self._filename != b"-" # <<<<<<<<<<<<<<
jpayne@69 14436 * and not self.is_remote
jpayne@69 14437 * and not os.path.exists(filename)):
jpayne@69 14438 */
jpayne@69 14439 __pyx_t_7 = (__Pyx_PyBytes_Equals(__pyx_v_self->_filename, __pyx_kp_b__4, Py_NE)); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 576, __pyx_L1_error)
jpayne@69 14440 if (__pyx_t_7) {
jpayne@69 14441 } else {
jpayne@69 14442 __pyx_t_1 = __pyx_t_7;
jpayne@69 14443 goto __pyx_L5_bool_binop_done;
jpayne@69 14444 }
jpayne@69 14445
jpayne@69 14446 /* "pysam/libcfaidx.pyx":577
jpayne@69 14447 * # open file for reading
jpayne@69 14448 * if (self._filename != b"-"
jpayne@69 14449 * and not self.is_remote # <<<<<<<<<<<<<<
jpayne@69 14450 * and not os.path.exists(filename)):
jpayne@69 14451 * raise IOError("file `%s` not found" % filename)
jpayne@69 14452 */
jpayne@69 14453 __pyx_t_7 = (!__pyx_v_self->is_remote);
jpayne@69 14454 if (__pyx_t_7) {
jpayne@69 14455 } else {
jpayne@69 14456 __pyx_t_1 = __pyx_t_7;
jpayne@69 14457 goto __pyx_L5_bool_binop_done;
jpayne@69 14458 }
jpayne@69 14459
jpayne@69 14460 /* "pysam/libcfaidx.pyx":578
jpayne@69 14461 * if (self._filename != b"-"
jpayne@69 14462 * and not self.is_remote
jpayne@69 14463 * and not os.path.exists(filename)): # <<<<<<<<<<<<<<
jpayne@69 14464 * raise IOError("file `%s` not found" % filename)
jpayne@69 14465 *
jpayne@69 14466 */
jpayne@69 14467 __Pyx_GetModuleGlobalName(__pyx_t_3, __pyx_n_s_os); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 578, __pyx_L1_error)
jpayne@69 14468 __Pyx_GOTREF(__pyx_t_3);
jpayne@69 14469 __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_path); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 578, __pyx_L1_error)
jpayne@69 14470 __Pyx_GOTREF(__pyx_t_4);
jpayne@69 14471 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
jpayne@69 14472 __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_exists); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 578, __pyx_L1_error)
jpayne@69 14473 __Pyx_GOTREF(__pyx_t_3);
jpayne@69 14474 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
jpayne@69 14475 __pyx_t_4 = NULL;
jpayne@69 14476 __pyx_t_5 = 0;
jpayne@69 14477 #if CYTHON_UNPACK_METHODS
jpayne@69 14478 if (likely(PyMethod_Check(__pyx_t_3))) {
jpayne@69 14479 __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
jpayne@69 14480 if (likely(__pyx_t_4)) {
jpayne@69 14481 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
jpayne@69 14482 __Pyx_INCREF(__pyx_t_4);
jpayne@69 14483 __Pyx_INCREF(function);
jpayne@69 14484 __Pyx_DECREF_SET(__pyx_t_3, function);
jpayne@69 14485 __pyx_t_5 = 1;
jpayne@69 14486 }
jpayne@69 14487 }
jpayne@69 14488 #endif
jpayne@69 14489 {
jpayne@69 14490 PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_filename};
jpayne@69 14491 __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
jpayne@69 14492 __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
jpayne@69 14493 if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 578, __pyx_L1_error)
jpayne@69 14494 __Pyx_GOTREF(__pyx_t_2);
jpayne@69 14495 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
jpayne@69 14496 }
jpayne@69 14497 __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_7 < 0))) __PYX_ERR(0, 578, __pyx_L1_error)
jpayne@69 14498 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@69 14499 __pyx_t_8 = (!__pyx_t_7);
jpayne@69 14500 __pyx_t_1 = __pyx_t_8;
jpayne@69 14501 __pyx_L5_bool_binop_done:;
jpayne@69 14502
jpayne@69 14503 /* "pysam/libcfaidx.pyx":576
jpayne@69 14504 *
jpayne@69 14505 * # open file for reading
jpayne@69 14506 * if (self._filename != b"-" # <<<<<<<<<<<<<<
jpayne@69 14507 * and not self.is_remote
jpayne@69 14508 * and not os.path.exists(filename)):
jpayne@69 14509 */
jpayne@69 14510 if (unlikely(__pyx_t_1)) {
jpayne@69 14511
jpayne@69 14512 /* "pysam/libcfaidx.pyx":579
jpayne@69 14513 * and not self.is_remote
jpayne@69 14514 * and not os.path.exists(filename)):
jpayne@69 14515 * raise IOError("file `%s` not found" % filename) # <<<<<<<<<<<<<<
jpayne@69 14516 *
jpayne@69 14517 * self.persist = persist
jpayne@69 14518 */
jpayne@69 14519 __pyx_t_2 = __Pyx_PyUnicode_FormatSafe(__pyx_kp_u_file_s_not_found, __pyx_v_filename); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 579, __pyx_L1_error)
jpayne@69 14520 __Pyx_GOTREF(__pyx_t_2);
jpayne@69 14521 __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_IOError, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 579, __pyx_L1_error)
jpayne@69 14522 __Pyx_GOTREF(__pyx_t_3);
jpayne@69 14523 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@69 14524 __Pyx_Raise(__pyx_t_3, 0, 0, 0);
jpayne@69 14525 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
jpayne@69 14526 __PYX_ERR(0, 579, __pyx_L1_error)
jpayne@69 14527
jpayne@69 14528 /* "pysam/libcfaidx.pyx":576
jpayne@69 14529 *
jpayne@69 14530 * # open file for reading
jpayne@69 14531 * if (self._filename != b"-" # <<<<<<<<<<<<<<
jpayne@69 14532 * and not self.is_remote
jpayne@69 14533 * and not os.path.exists(filename)):
jpayne@69 14534 */
jpayne@69 14535 }
jpayne@69 14536
jpayne@69 14537 /* "pysam/libcfaidx.pyx":581
jpayne@69 14538 * raise IOError("file `%s` not found" % filename)
jpayne@69 14539 *
jpayne@69 14540 * self.persist = persist # <<<<<<<<<<<<<<
jpayne@69 14541 *
jpayne@69 14542 * with nogil:
jpayne@69 14543 */
jpayne@69 14544 __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_persist); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 581, __pyx_L1_error)
jpayne@69 14545 __pyx_v_self->persist = __pyx_t_1;
jpayne@69 14546
jpayne@69 14547 /* "pysam/libcfaidx.pyx":583
jpayne@69 14548 * self.persist = persist
jpayne@69 14549 *
jpayne@69 14550 * with nogil: # <<<<<<<<<<<<<<
jpayne@69 14551 * self.fastqfile = bgzf_open(cfilename, "r")
jpayne@69 14552 * self.entry = kseq_init(self.fastqfile)
jpayne@69 14553 */
jpayne@69 14554 {
jpayne@69 14555 #ifdef WITH_THREAD
jpayne@69 14556 PyThreadState *_save;
jpayne@69 14557 _save = NULL;
jpayne@69 14558 Py_UNBLOCK_THREADS
jpayne@69 14559 __Pyx_FastGIL_Remember();
jpayne@69 14560 #endif
jpayne@69 14561 /*try:*/ {
jpayne@69 14562
jpayne@69 14563 /* "pysam/libcfaidx.pyx":584
jpayne@69 14564 *
jpayne@69 14565 * with nogil:
jpayne@69 14566 * self.fastqfile = bgzf_open(cfilename, "r") # <<<<<<<<<<<<<<
jpayne@69 14567 * self.entry = kseq_init(self.fastqfile)
jpayne@69 14568 * self._filename = filename
jpayne@69 14569 */
jpayne@69 14570 __pyx_v_self->fastqfile = bgzf_open(__pyx_v_cfilename, ((char const *)"r"));
jpayne@69 14571
jpayne@69 14572 /* "pysam/libcfaidx.pyx":585
jpayne@69 14573 * with nogil:
jpayne@69 14574 * self.fastqfile = bgzf_open(cfilename, "r")
jpayne@69 14575 * self.entry = kseq_init(self.fastqfile) # <<<<<<<<<<<<<<
jpayne@69 14576 * self._filename = filename
jpayne@69 14577 *
jpayne@69 14578 */
jpayne@69 14579 __pyx_v_self->entry = kseq_init(__pyx_v_self->fastqfile);
jpayne@69 14580 }
jpayne@69 14581
jpayne@69 14582 /* "pysam/libcfaidx.pyx":583
jpayne@69 14583 * self.persist = persist
jpayne@69 14584 *
jpayne@69 14585 * with nogil: # <<<<<<<<<<<<<<
jpayne@69 14586 * self.fastqfile = bgzf_open(cfilename, "r")
jpayne@69 14587 * self.entry = kseq_init(self.fastqfile)
jpayne@69 14588 */
jpayne@69 14589 /*finally:*/ {
jpayne@69 14590 /*normal exit:*/{
jpayne@69 14591 #ifdef WITH_THREAD
jpayne@69 14592 __Pyx_FastGIL_Forget();
jpayne@69 14593 Py_BLOCK_THREADS
jpayne@69 14594 #endif
jpayne@69 14595 goto __pyx_L10;
jpayne@69 14596 }
jpayne@69 14597 __pyx_L10:;
jpayne@69 14598 }
jpayne@69 14599 }
jpayne@69 14600
jpayne@69 14601 /* "pysam/libcfaidx.pyx":586
jpayne@69 14602 * self.fastqfile = bgzf_open(cfilename, "r")
jpayne@69 14603 * self.entry = kseq_init(self.fastqfile)
jpayne@69 14604 * self._filename = filename # <<<<<<<<<<<<<<
jpayne@69 14605 *
jpayne@69 14606 * def close(self):
jpayne@69 14607 */
jpayne@69 14608 __Pyx_INCREF(__pyx_v_filename);
jpayne@69 14609 __Pyx_GIVEREF(__pyx_v_filename);
jpayne@69 14610 __Pyx_GOTREF(__pyx_v_self->_filename);
jpayne@69 14611 __Pyx_DECREF(__pyx_v_self->_filename);
jpayne@69 14612 __pyx_v_self->_filename = __pyx_v_filename;
jpayne@69 14613
jpayne@69 14614 /* "pysam/libcfaidx.pyx":555
jpayne@69 14615 * return self.entry != NULL
jpayne@69 14616 *
jpayne@69 14617 * def _open(self, filename, persist=True): # <<<<<<<<<<<<<<
jpayne@69 14618 * '''open a fastq/fasta file in *filename*
jpayne@69 14619 *
jpayne@69 14620 */
jpayne@69 14621
jpayne@69 14622 /* function exit code */
jpayne@69 14623 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
jpayne@69 14624 goto __pyx_L0;
jpayne@69 14625 __pyx_L1_error:;
jpayne@69 14626 __Pyx_XDECREF(__pyx_t_2);
jpayne@69 14627 __Pyx_XDECREF(__pyx_t_3);
jpayne@69 14628 __Pyx_XDECREF(__pyx_t_4);
jpayne@69 14629 __Pyx_AddTraceback("pysam.libcfaidx.FastxFile._open", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 14630 __pyx_r = NULL;
jpayne@69 14631 __pyx_L0:;
jpayne@69 14632 __Pyx_XGIVEREF(__pyx_r);
jpayne@69 14633 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@69 14634 __Pyx_RefNannyFinishContext();
jpayne@69 14635 return __pyx_r;
jpayne@69 14636 }
jpayne@69 14637
jpayne@69 14638 /* "pysam/libcfaidx.pyx":588
jpayne@69 14639 * self._filename = filename
jpayne@69 14640 *
jpayne@69 14641 * def close(self): # <<<<<<<<<<<<<<
jpayne@69 14642 * '''close the file.'''
jpayne@69 14643 * if self.fastqfile != NULL:
jpayne@69 14644 */
jpayne@69 14645
jpayne@69 14646 /* Python wrapper */
jpayne@69 14647 static PyObject *__pyx_pw_5pysam_9libcfaidx_9FastxFile_7close(PyObject *__pyx_v_self,
jpayne@69 14648 #if CYTHON_METH_FASTCALL
jpayne@69 14649 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@69 14650 #else
jpayne@69 14651 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@69 14652 #endif
jpayne@69 14653 ); /*proto*/
jpayne@69 14654 PyDoc_STRVAR(__pyx_doc_5pysam_9libcfaidx_9FastxFile_6close, "FastxFile.close(self)\nclose the file.");
jpayne@69 14655 static PyMethodDef __pyx_mdef_5pysam_9libcfaidx_9FastxFile_7close = {"close", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_9libcfaidx_9FastxFile_7close, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_9libcfaidx_9FastxFile_6close};
jpayne@69 14656 static PyObject *__pyx_pw_5pysam_9libcfaidx_9FastxFile_7close(PyObject *__pyx_v_self,
jpayne@69 14657 #if CYTHON_METH_FASTCALL
jpayne@69 14658 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@69 14659 #else
jpayne@69 14660 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@69 14661 #endif
jpayne@69 14662 ) {
jpayne@69 14663 #if !CYTHON_METH_FASTCALL
jpayne@69 14664 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
jpayne@69 14665 #endif
jpayne@69 14666 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@69 14667 PyObject *__pyx_r = 0;
jpayne@69 14668 __Pyx_RefNannyDeclarations
jpayne@69 14669 __Pyx_RefNannySetupContext("close (wrapper)", 0);
jpayne@69 14670 #if !CYTHON_METH_FASTCALL
jpayne@69 14671 #if CYTHON_ASSUME_SAFE_MACROS
jpayne@69 14672 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
jpayne@69 14673 #else
jpayne@69 14674 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
jpayne@69 14675 #endif
jpayne@69 14676 #endif
jpayne@69 14677 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
jpayne@69 14678 if (unlikely(__pyx_nargs > 0)) {
jpayne@69 14679 __Pyx_RaiseArgtupleInvalid("close", 1, 0, 0, __pyx_nargs); return NULL;}
jpayne@69 14680 if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "close", 0))) return NULL;
jpayne@69 14681 __pyx_r = __pyx_pf_5pysam_9libcfaidx_9FastxFile_6close(((struct __pyx_obj_5pysam_9libcfaidx_FastxFile *)__pyx_v_self));
jpayne@69 14682
jpayne@69 14683 /* function exit code */
jpayne@69 14684 __Pyx_RefNannyFinishContext();
jpayne@69 14685 return __pyx_r;
jpayne@69 14686 }
jpayne@69 14687
jpayne@69 14688 static PyObject *__pyx_pf_5pysam_9libcfaidx_9FastxFile_6close(struct __pyx_obj_5pysam_9libcfaidx_FastxFile *__pyx_v_self) {
jpayne@69 14689 PyObject *__pyx_r = NULL;
jpayne@69 14690 __Pyx_TraceDeclarations
jpayne@69 14691 __Pyx_RefNannyDeclarations
jpayne@69 14692 int __pyx_t_1;
jpayne@69 14693 int __pyx_lineno = 0;
jpayne@69 14694 const char *__pyx_filename = NULL;
jpayne@69 14695 int __pyx_clineno = 0;
jpayne@69 14696 __Pyx_TraceFrameInit(__pyx_codeobj__36)
jpayne@69 14697 __Pyx_RefNannySetupContext("close", 1);
jpayne@69 14698 __Pyx_TraceCall("close", __pyx_f[0], 588, 0, __PYX_ERR(0, 588, __pyx_L1_error));
jpayne@69 14699
jpayne@69 14700 /* "pysam/libcfaidx.pyx":590
jpayne@69 14701 * def close(self):
jpayne@69 14702 * '''close the file.'''
jpayne@69 14703 * if self.fastqfile != NULL: # <<<<<<<<<<<<<<
jpayne@69 14704 * bgzf_close(self.fastqfile)
jpayne@69 14705 * self.fastqfile = NULL
jpayne@69 14706 */
jpayne@69 14707 __pyx_t_1 = (__pyx_v_self->fastqfile != NULL);
jpayne@69 14708 if (__pyx_t_1) {
jpayne@69 14709
jpayne@69 14710 /* "pysam/libcfaidx.pyx":591
jpayne@69 14711 * '''close the file.'''
jpayne@69 14712 * if self.fastqfile != NULL:
jpayne@69 14713 * bgzf_close(self.fastqfile) # <<<<<<<<<<<<<<
jpayne@69 14714 * self.fastqfile = NULL
jpayne@69 14715 * if self.entry != NULL:
jpayne@69 14716 */
jpayne@69 14717 (void)(bgzf_close(__pyx_v_self->fastqfile));
jpayne@69 14718
jpayne@69 14719 /* "pysam/libcfaidx.pyx":592
jpayne@69 14720 * if self.fastqfile != NULL:
jpayne@69 14721 * bgzf_close(self.fastqfile)
jpayne@69 14722 * self.fastqfile = NULL # <<<<<<<<<<<<<<
jpayne@69 14723 * if self.entry != NULL:
jpayne@69 14724 * kseq_destroy(self.entry)
jpayne@69 14725 */
jpayne@69 14726 __pyx_v_self->fastqfile = NULL;
jpayne@69 14727
jpayne@69 14728 /* "pysam/libcfaidx.pyx":590
jpayne@69 14729 * def close(self):
jpayne@69 14730 * '''close the file.'''
jpayne@69 14731 * if self.fastqfile != NULL: # <<<<<<<<<<<<<<
jpayne@69 14732 * bgzf_close(self.fastqfile)
jpayne@69 14733 * self.fastqfile = NULL
jpayne@69 14734 */
jpayne@69 14735 }
jpayne@69 14736
jpayne@69 14737 /* "pysam/libcfaidx.pyx":593
jpayne@69 14738 * bgzf_close(self.fastqfile)
jpayne@69 14739 * self.fastqfile = NULL
jpayne@69 14740 * if self.entry != NULL: # <<<<<<<<<<<<<<
jpayne@69 14741 * kseq_destroy(self.entry)
jpayne@69 14742 * self.entry = NULL
jpayne@69 14743 */
jpayne@69 14744 __pyx_t_1 = (__pyx_v_self->entry != NULL);
jpayne@69 14745 if (__pyx_t_1) {
jpayne@69 14746
jpayne@69 14747 /* "pysam/libcfaidx.pyx":594
jpayne@69 14748 * self.fastqfile = NULL
jpayne@69 14749 * if self.entry != NULL:
jpayne@69 14750 * kseq_destroy(self.entry) # <<<<<<<<<<<<<<
jpayne@69 14751 * self.entry = NULL
jpayne@69 14752 *
jpayne@69 14753 */
jpayne@69 14754 kseq_destroy(__pyx_v_self->entry);
jpayne@69 14755
jpayne@69 14756 /* "pysam/libcfaidx.pyx":595
jpayne@69 14757 * if self.entry != NULL:
jpayne@69 14758 * kseq_destroy(self.entry)
jpayne@69 14759 * self.entry = NULL # <<<<<<<<<<<<<<
jpayne@69 14760 *
jpayne@69 14761 * def __dealloc__(self):
jpayne@69 14762 */
jpayne@69 14763 __pyx_v_self->entry = NULL;
jpayne@69 14764
jpayne@69 14765 /* "pysam/libcfaidx.pyx":593
jpayne@69 14766 * bgzf_close(self.fastqfile)
jpayne@69 14767 * self.fastqfile = NULL
jpayne@69 14768 * if self.entry != NULL: # <<<<<<<<<<<<<<
jpayne@69 14769 * kseq_destroy(self.entry)
jpayne@69 14770 * self.entry = NULL
jpayne@69 14771 */
jpayne@69 14772 }
jpayne@69 14773
jpayne@69 14774 /* "pysam/libcfaidx.pyx":588
jpayne@69 14775 * self._filename = filename
jpayne@69 14776 *
jpayne@69 14777 * def close(self): # <<<<<<<<<<<<<<
jpayne@69 14778 * '''close the file.'''
jpayne@69 14779 * if self.fastqfile != NULL:
jpayne@69 14780 */
jpayne@69 14781
jpayne@69 14782 /* function exit code */
jpayne@69 14783 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
jpayne@69 14784 goto __pyx_L0;
jpayne@69 14785 __pyx_L1_error:;
jpayne@69 14786 __Pyx_AddTraceback("pysam.libcfaidx.FastxFile.close", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 14787 __pyx_r = NULL;
jpayne@69 14788 __pyx_L0:;
jpayne@69 14789 __Pyx_XGIVEREF(__pyx_r);
jpayne@69 14790 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@69 14791 __Pyx_RefNannyFinishContext();
jpayne@69 14792 return __pyx_r;
jpayne@69 14793 }
jpayne@69 14794
jpayne@69 14795 /* "pysam/libcfaidx.pyx":597
jpayne@69 14796 * self.entry = NULL
jpayne@69 14797 *
jpayne@69 14798 * def __dealloc__(self): # <<<<<<<<<<<<<<
jpayne@69 14799 * if self.fastqfile != NULL:
jpayne@69 14800 * bgzf_close(self.fastqfile)
jpayne@69 14801 */
jpayne@69 14802
jpayne@69 14803 /* Python wrapper */
jpayne@69 14804 static void __pyx_pw_5pysam_9libcfaidx_9FastxFile_9__dealloc__(PyObject *__pyx_v_self); /*proto*/
jpayne@69 14805 static void __pyx_pw_5pysam_9libcfaidx_9FastxFile_9__dealloc__(PyObject *__pyx_v_self) {
jpayne@69 14806 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@69 14807 __Pyx_RefNannyDeclarations
jpayne@69 14808 __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
jpayne@69 14809 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
jpayne@69 14810 __pyx_pf_5pysam_9libcfaidx_9FastxFile_8__dealloc__(((struct __pyx_obj_5pysam_9libcfaidx_FastxFile *)__pyx_v_self));
jpayne@69 14811
jpayne@69 14812 /* function exit code */
jpayne@69 14813 __Pyx_RefNannyFinishContext();
jpayne@69 14814 }
jpayne@69 14815
jpayne@69 14816 static void __pyx_pf_5pysam_9libcfaidx_9FastxFile_8__dealloc__(struct __pyx_obj_5pysam_9libcfaidx_FastxFile *__pyx_v_self) {
jpayne@69 14817 __Pyx_TraceDeclarations
jpayne@69 14818 int __pyx_t_1;
jpayne@69 14819 int __pyx_lineno = 0;
jpayne@69 14820 const char *__pyx_filename = NULL;
jpayne@69 14821 int __pyx_clineno = 0;
jpayne@69 14822 __Pyx_TraceCall("__dealloc__", __pyx_f[0], 597, 0, __PYX_ERR(0, 597, __pyx_L1_error));
jpayne@69 14823
jpayne@69 14824 /* "pysam/libcfaidx.pyx":598
jpayne@69 14825 *
jpayne@69 14826 * def __dealloc__(self):
jpayne@69 14827 * if self.fastqfile != NULL: # <<<<<<<<<<<<<<
jpayne@69 14828 * bgzf_close(self.fastqfile)
jpayne@69 14829 * if self.entry:
jpayne@69 14830 */
jpayne@69 14831 __pyx_t_1 = (__pyx_v_self->fastqfile != NULL);
jpayne@69 14832 if (__pyx_t_1) {
jpayne@69 14833
jpayne@69 14834 /* "pysam/libcfaidx.pyx":599
jpayne@69 14835 * def __dealloc__(self):
jpayne@69 14836 * if self.fastqfile != NULL:
jpayne@69 14837 * bgzf_close(self.fastqfile) # <<<<<<<<<<<<<<
jpayne@69 14838 * if self.entry:
jpayne@69 14839 * kseq_destroy(self.entry)
jpayne@69 14840 */
jpayne@69 14841 (void)(bgzf_close(__pyx_v_self->fastqfile));
jpayne@69 14842
jpayne@69 14843 /* "pysam/libcfaidx.pyx":598
jpayne@69 14844 *
jpayne@69 14845 * def __dealloc__(self):
jpayne@69 14846 * if self.fastqfile != NULL: # <<<<<<<<<<<<<<
jpayne@69 14847 * bgzf_close(self.fastqfile)
jpayne@69 14848 * if self.entry:
jpayne@69 14849 */
jpayne@69 14850 }
jpayne@69 14851
jpayne@69 14852 /* "pysam/libcfaidx.pyx":600
jpayne@69 14853 * if self.fastqfile != NULL:
jpayne@69 14854 * bgzf_close(self.fastqfile)
jpayne@69 14855 * if self.entry: # <<<<<<<<<<<<<<
jpayne@69 14856 * kseq_destroy(self.entry)
jpayne@69 14857 *
jpayne@69 14858 */
jpayne@69 14859 __pyx_t_1 = (__pyx_v_self->entry != 0);
jpayne@69 14860 if (__pyx_t_1) {
jpayne@69 14861
jpayne@69 14862 /* "pysam/libcfaidx.pyx":601
jpayne@69 14863 * bgzf_close(self.fastqfile)
jpayne@69 14864 * if self.entry:
jpayne@69 14865 * kseq_destroy(self.entry) # <<<<<<<<<<<<<<
jpayne@69 14866 *
jpayne@69 14867 * # context manager interface
jpayne@69 14868 */
jpayne@69 14869 kseq_destroy(__pyx_v_self->entry);
jpayne@69 14870
jpayne@69 14871 /* "pysam/libcfaidx.pyx":600
jpayne@69 14872 * if self.fastqfile != NULL:
jpayne@69 14873 * bgzf_close(self.fastqfile)
jpayne@69 14874 * if self.entry: # <<<<<<<<<<<<<<
jpayne@69 14875 * kseq_destroy(self.entry)
jpayne@69 14876 *
jpayne@69 14877 */
jpayne@69 14878 }
jpayne@69 14879
jpayne@69 14880 /* "pysam/libcfaidx.pyx":597
jpayne@69 14881 * self.entry = NULL
jpayne@69 14882 *
jpayne@69 14883 * def __dealloc__(self): # <<<<<<<<<<<<<<
jpayne@69 14884 * if self.fastqfile != NULL:
jpayne@69 14885 * bgzf_close(self.fastqfile)
jpayne@69 14886 */
jpayne@69 14887
jpayne@69 14888 /* function exit code */
jpayne@69 14889 goto __pyx_L0;
jpayne@69 14890 __pyx_L1_error:;
jpayne@69 14891 __Pyx_WriteUnraisable("pysam.libcfaidx.FastxFile.__dealloc__", __pyx_clineno, __pyx_lineno, __pyx_filename, 1, 0);
jpayne@69 14892 __pyx_L0:;
jpayne@69 14893 __Pyx_TraceReturn(Py_None, 0);
jpayne@69 14894 }
jpayne@69 14895
jpayne@69 14896 /* "pysam/libcfaidx.pyx":604
jpayne@69 14897 *
jpayne@69 14898 * # context manager interface
jpayne@69 14899 * def __enter__(self): # <<<<<<<<<<<<<<
jpayne@69 14900 * return self
jpayne@69 14901 *
jpayne@69 14902 */
jpayne@69 14903
jpayne@69 14904 /* Python wrapper */
jpayne@69 14905 static PyObject *__pyx_pw_5pysam_9libcfaidx_9FastxFile_11__enter__(PyObject *__pyx_v_self,
jpayne@69 14906 #if CYTHON_METH_FASTCALL
jpayne@69 14907 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@69 14908 #else
jpayne@69 14909 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@69 14910 #endif
jpayne@69 14911 ); /*proto*/
jpayne@69 14912 PyDoc_STRVAR(__pyx_doc_5pysam_9libcfaidx_9FastxFile_10__enter__, "FastxFile.__enter__(self)");
jpayne@69 14913 static PyMethodDef __pyx_mdef_5pysam_9libcfaidx_9FastxFile_11__enter__ = {"__enter__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_9libcfaidx_9FastxFile_11__enter__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_9libcfaidx_9FastxFile_10__enter__};
jpayne@69 14914 static PyObject *__pyx_pw_5pysam_9libcfaidx_9FastxFile_11__enter__(PyObject *__pyx_v_self,
jpayne@69 14915 #if CYTHON_METH_FASTCALL
jpayne@69 14916 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@69 14917 #else
jpayne@69 14918 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@69 14919 #endif
jpayne@69 14920 ) {
jpayne@69 14921 #if !CYTHON_METH_FASTCALL
jpayne@69 14922 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
jpayne@69 14923 #endif
jpayne@69 14924 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@69 14925 PyObject *__pyx_r = 0;
jpayne@69 14926 __Pyx_RefNannyDeclarations
jpayne@69 14927 __Pyx_RefNannySetupContext("__enter__ (wrapper)", 0);
jpayne@69 14928 #if !CYTHON_METH_FASTCALL
jpayne@69 14929 #if CYTHON_ASSUME_SAFE_MACROS
jpayne@69 14930 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
jpayne@69 14931 #else
jpayne@69 14932 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
jpayne@69 14933 #endif
jpayne@69 14934 #endif
jpayne@69 14935 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
jpayne@69 14936 if (unlikely(__pyx_nargs > 0)) {
jpayne@69 14937 __Pyx_RaiseArgtupleInvalid("__enter__", 1, 0, 0, __pyx_nargs); return NULL;}
jpayne@69 14938 if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__enter__", 0))) return NULL;
jpayne@69 14939 __pyx_r = __pyx_pf_5pysam_9libcfaidx_9FastxFile_10__enter__(((struct __pyx_obj_5pysam_9libcfaidx_FastxFile *)__pyx_v_self));
jpayne@69 14940
jpayne@69 14941 /* function exit code */
jpayne@69 14942 __Pyx_RefNannyFinishContext();
jpayne@69 14943 return __pyx_r;
jpayne@69 14944 }
jpayne@69 14945
jpayne@69 14946 static PyObject *__pyx_pf_5pysam_9libcfaidx_9FastxFile_10__enter__(struct __pyx_obj_5pysam_9libcfaidx_FastxFile *__pyx_v_self) {
jpayne@69 14947 PyObject *__pyx_r = NULL;
jpayne@69 14948 __Pyx_TraceDeclarations
jpayne@69 14949 __Pyx_RefNannyDeclarations
jpayne@69 14950 int __pyx_lineno = 0;
jpayne@69 14951 const char *__pyx_filename = NULL;
jpayne@69 14952 int __pyx_clineno = 0;
jpayne@69 14953 __Pyx_TraceFrameInit(__pyx_codeobj__37)
jpayne@69 14954 __Pyx_RefNannySetupContext("__enter__", 1);
jpayne@69 14955 __Pyx_TraceCall("__enter__", __pyx_f[0], 604, 0, __PYX_ERR(0, 604, __pyx_L1_error));
jpayne@69 14956
jpayne@69 14957 /* "pysam/libcfaidx.pyx":605
jpayne@69 14958 * # context manager interface
jpayne@69 14959 * def __enter__(self):
jpayne@69 14960 * return self # <<<<<<<<<<<<<<
jpayne@69 14961 *
jpayne@69 14962 * def __exit__(self, exc_type, exc_value, traceback):
jpayne@69 14963 */
jpayne@69 14964 __Pyx_XDECREF(__pyx_r);
jpayne@69 14965 __Pyx_INCREF((PyObject *)__pyx_v_self);
jpayne@69 14966 __pyx_r = ((PyObject *)__pyx_v_self);
jpayne@69 14967 goto __pyx_L0;
jpayne@69 14968
jpayne@69 14969 /* "pysam/libcfaidx.pyx":604
jpayne@69 14970 *
jpayne@69 14971 * # context manager interface
jpayne@69 14972 * def __enter__(self): # <<<<<<<<<<<<<<
jpayne@69 14973 * return self
jpayne@69 14974 *
jpayne@69 14975 */
jpayne@69 14976
jpayne@69 14977 /* function exit code */
jpayne@69 14978 __pyx_L1_error:;
jpayne@69 14979 __Pyx_AddTraceback("pysam.libcfaidx.FastxFile.__enter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 14980 __pyx_r = NULL;
jpayne@69 14981 __pyx_L0:;
jpayne@69 14982 __Pyx_XGIVEREF(__pyx_r);
jpayne@69 14983 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@69 14984 __Pyx_RefNannyFinishContext();
jpayne@69 14985 return __pyx_r;
jpayne@69 14986 }
jpayne@69 14987
jpayne@69 14988 /* "pysam/libcfaidx.pyx":607
jpayne@69 14989 * return self
jpayne@69 14990 *
jpayne@69 14991 * def __exit__(self, exc_type, exc_value, traceback): # <<<<<<<<<<<<<<
jpayne@69 14992 * self.close()
jpayne@69 14993 * return False
jpayne@69 14994 */
jpayne@69 14995
jpayne@69 14996 /* Python wrapper */
jpayne@69 14997 static PyObject *__pyx_pw_5pysam_9libcfaidx_9FastxFile_13__exit__(PyObject *__pyx_v_self,
jpayne@69 14998 #if CYTHON_METH_FASTCALL
jpayne@69 14999 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@69 15000 #else
jpayne@69 15001 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@69 15002 #endif
jpayne@69 15003 ); /*proto*/
jpayne@69 15004 PyDoc_STRVAR(__pyx_doc_5pysam_9libcfaidx_9FastxFile_12__exit__, "FastxFile.__exit__(self, exc_type, exc_value, traceback)");
jpayne@69 15005 static PyMethodDef __pyx_mdef_5pysam_9libcfaidx_9FastxFile_13__exit__ = {"__exit__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_9libcfaidx_9FastxFile_13__exit__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_9libcfaidx_9FastxFile_12__exit__};
jpayne@69 15006 static PyObject *__pyx_pw_5pysam_9libcfaidx_9FastxFile_13__exit__(PyObject *__pyx_v_self,
jpayne@69 15007 #if CYTHON_METH_FASTCALL
jpayne@69 15008 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@69 15009 #else
jpayne@69 15010 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@69 15011 #endif
jpayne@69 15012 ) {
jpayne@69 15013 CYTHON_UNUSED PyObject *__pyx_v_exc_type = 0;
jpayne@69 15014 CYTHON_UNUSED PyObject *__pyx_v_exc_value = 0;
jpayne@69 15015 CYTHON_UNUSED PyObject *__pyx_v_traceback = 0;
jpayne@69 15016 #if !CYTHON_METH_FASTCALL
jpayne@69 15017 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
jpayne@69 15018 #endif
jpayne@69 15019 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@69 15020 PyObject* values[3] = {0,0,0};
jpayne@69 15021 int __pyx_lineno = 0;
jpayne@69 15022 const char *__pyx_filename = NULL;
jpayne@69 15023 int __pyx_clineno = 0;
jpayne@69 15024 PyObject *__pyx_r = 0;
jpayne@69 15025 __Pyx_RefNannyDeclarations
jpayne@69 15026 __Pyx_RefNannySetupContext("__exit__ (wrapper)", 0);
jpayne@69 15027 #if !CYTHON_METH_FASTCALL
jpayne@69 15028 #if CYTHON_ASSUME_SAFE_MACROS
jpayne@69 15029 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
jpayne@69 15030 #else
jpayne@69 15031 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
jpayne@69 15032 #endif
jpayne@69 15033 #endif
jpayne@69 15034 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
jpayne@69 15035 {
jpayne@69 15036 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_exc_type,&__pyx_n_s_exc_value,&__pyx_n_s_traceback,0};
jpayne@69 15037 if (__pyx_kwds) {
jpayne@69 15038 Py_ssize_t kw_args;
jpayne@69 15039 switch (__pyx_nargs) {
jpayne@69 15040 case 3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
jpayne@69 15041 CYTHON_FALLTHROUGH;
jpayne@69 15042 case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
jpayne@69 15043 CYTHON_FALLTHROUGH;
jpayne@69 15044 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
jpayne@69 15045 CYTHON_FALLTHROUGH;
jpayne@69 15046 case 0: break;
jpayne@69 15047 default: goto __pyx_L5_argtuple_error;
jpayne@69 15048 }
jpayne@69 15049 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
jpayne@69 15050 switch (__pyx_nargs) {
jpayne@69 15051 case 0:
jpayne@69 15052 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_exc_type)) != 0)) {
jpayne@69 15053 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
jpayne@69 15054 kw_args--;
jpayne@69 15055 }
jpayne@69 15056 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 607, __pyx_L3_error)
jpayne@69 15057 else goto __pyx_L5_argtuple_error;
jpayne@69 15058 CYTHON_FALLTHROUGH;
jpayne@69 15059 case 1:
jpayne@69 15060 if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_exc_value)) != 0)) {
jpayne@69 15061 (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
jpayne@69 15062 kw_args--;
jpayne@69 15063 }
jpayne@69 15064 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 607, __pyx_L3_error)
jpayne@69 15065 else {
jpayne@69 15066 __Pyx_RaiseArgtupleInvalid("__exit__", 1, 3, 3, 1); __PYX_ERR(0, 607, __pyx_L3_error)
jpayne@69 15067 }
jpayne@69 15068 CYTHON_FALLTHROUGH;
jpayne@69 15069 case 2:
jpayne@69 15070 if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_traceback)) != 0)) {
jpayne@69 15071 (void)__Pyx_Arg_NewRef_FASTCALL(values[2]);
jpayne@69 15072 kw_args--;
jpayne@69 15073 }
jpayne@69 15074 else if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 607, __pyx_L3_error)
jpayne@69 15075 else {
jpayne@69 15076 __Pyx_RaiseArgtupleInvalid("__exit__", 1, 3, 3, 2); __PYX_ERR(0, 607, __pyx_L3_error)
jpayne@69 15077 }
jpayne@69 15078 }
jpayne@69 15079 if (unlikely(kw_args > 0)) {
jpayne@69 15080 const Py_ssize_t kwd_pos_args = __pyx_nargs;
jpayne@69 15081 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__exit__") < 0)) __PYX_ERR(0, 607, __pyx_L3_error)
jpayne@69 15082 }
jpayne@69 15083 } else if (unlikely(__pyx_nargs != 3)) {
jpayne@69 15084 goto __pyx_L5_argtuple_error;
jpayne@69 15085 } else {
jpayne@69 15086 values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
jpayne@69 15087 values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
jpayne@69 15088 values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
jpayne@69 15089 }
jpayne@69 15090 __pyx_v_exc_type = values[0];
jpayne@69 15091 __pyx_v_exc_value = values[1];
jpayne@69 15092 __pyx_v_traceback = values[2];
jpayne@69 15093 }
jpayne@69 15094 goto __pyx_L6_skip;
jpayne@69 15095 __pyx_L5_argtuple_error:;
jpayne@69 15096 __Pyx_RaiseArgtupleInvalid("__exit__", 1, 3, 3, __pyx_nargs); __PYX_ERR(0, 607, __pyx_L3_error)
jpayne@69 15097 __pyx_L6_skip:;
jpayne@69 15098 goto __pyx_L4_argument_unpacking_done;
jpayne@69 15099 __pyx_L3_error:;
jpayne@69 15100 {
jpayne@69 15101 Py_ssize_t __pyx_temp;
jpayne@69 15102 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
jpayne@69 15103 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
jpayne@69 15104 }
jpayne@69 15105 }
jpayne@69 15106 __Pyx_AddTraceback("pysam.libcfaidx.FastxFile.__exit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 15107 __Pyx_RefNannyFinishContext();
jpayne@69 15108 return NULL;
jpayne@69 15109 __pyx_L4_argument_unpacking_done:;
jpayne@69 15110 __pyx_r = __pyx_pf_5pysam_9libcfaidx_9FastxFile_12__exit__(((struct __pyx_obj_5pysam_9libcfaidx_FastxFile *)__pyx_v_self), __pyx_v_exc_type, __pyx_v_exc_value, __pyx_v_traceback);
jpayne@69 15111
jpayne@69 15112 /* function exit code */
jpayne@69 15113 {
jpayne@69 15114 Py_ssize_t __pyx_temp;
jpayne@69 15115 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
jpayne@69 15116 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
jpayne@69 15117 }
jpayne@69 15118 }
jpayne@69 15119 __Pyx_RefNannyFinishContext();
jpayne@69 15120 return __pyx_r;
jpayne@69 15121 }
jpayne@69 15122
jpayne@69 15123 static PyObject *__pyx_pf_5pysam_9libcfaidx_9FastxFile_12__exit__(struct __pyx_obj_5pysam_9libcfaidx_FastxFile *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_exc_type, CYTHON_UNUSED PyObject *__pyx_v_exc_value, CYTHON_UNUSED PyObject *__pyx_v_traceback) {
jpayne@69 15124 PyObject *__pyx_r = NULL;
jpayne@69 15125 __Pyx_TraceDeclarations
jpayne@69 15126 __Pyx_RefNannyDeclarations
jpayne@69 15127 PyObject *__pyx_t_1 = NULL;
jpayne@69 15128 PyObject *__pyx_t_2 = NULL;
jpayne@69 15129 PyObject *__pyx_t_3 = NULL;
jpayne@69 15130 unsigned int __pyx_t_4;
jpayne@69 15131 int __pyx_lineno = 0;
jpayne@69 15132 const char *__pyx_filename = NULL;
jpayne@69 15133 int __pyx_clineno = 0;
jpayne@69 15134 __Pyx_TraceFrameInit(__pyx_codeobj__38)
jpayne@69 15135 __Pyx_RefNannySetupContext("__exit__", 1);
jpayne@69 15136 __Pyx_TraceCall("__exit__", __pyx_f[0], 607, 0, __PYX_ERR(0, 607, __pyx_L1_error));
jpayne@69 15137
jpayne@69 15138 /* "pysam/libcfaidx.pyx":608
jpayne@69 15139 *
jpayne@69 15140 * def __exit__(self, exc_type, exc_value, traceback):
jpayne@69 15141 * self.close() # <<<<<<<<<<<<<<
jpayne@69 15142 * return False
jpayne@69 15143 *
jpayne@69 15144 */
jpayne@69 15145 __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_close); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 608, __pyx_L1_error)
jpayne@69 15146 __Pyx_GOTREF(__pyx_t_2);
jpayne@69 15147 __pyx_t_3 = NULL;
jpayne@69 15148 __pyx_t_4 = 0;
jpayne@69 15149 #if CYTHON_UNPACK_METHODS
jpayne@69 15150 if (likely(PyMethod_Check(__pyx_t_2))) {
jpayne@69 15151 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
jpayne@69 15152 if (likely(__pyx_t_3)) {
jpayne@69 15153 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
jpayne@69 15154 __Pyx_INCREF(__pyx_t_3);
jpayne@69 15155 __Pyx_INCREF(function);
jpayne@69 15156 __Pyx_DECREF_SET(__pyx_t_2, function);
jpayne@69 15157 __pyx_t_4 = 1;
jpayne@69 15158 }
jpayne@69 15159 }
jpayne@69 15160 #endif
jpayne@69 15161 {
jpayne@69 15162 PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
jpayne@69 15163 __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
jpayne@69 15164 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
jpayne@69 15165 if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 608, __pyx_L1_error)
jpayne@69 15166 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 15167 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@69 15168 }
jpayne@69 15169 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@69 15170
jpayne@69 15171 /* "pysam/libcfaidx.pyx":609
jpayne@69 15172 * def __exit__(self, exc_type, exc_value, traceback):
jpayne@69 15173 * self.close()
jpayne@69 15174 * return False # <<<<<<<<<<<<<<
jpayne@69 15175 *
jpayne@69 15176 * property closed:
jpayne@69 15177 */
jpayne@69 15178 __Pyx_XDECREF(__pyx_r);
jpayne@69 15179 __Pyx_INCREF(Py_False);
jpayne@69 15180 __pyx_r = Py_False;
jpayne@69 15181 goto __pyx_L0;
jpayne@69 15182
jpayne@69 15183 /* "pysam/libcfaidx.pyx":607
jpayne@69 15184 * return self
jpayne@69 15185 *
jpayne@69 15186 * def __exit__(self, exc_type, exc_value, traceback): # <<<<<<<<<<<<<<
jpayne@69 15187 * self.close()
jpayne@69 15188 * return False
jpayne@69 15189 */
jpayne@69 15190
jpayne@69 15191 /* function exit code */
jpayne@69 15192 __pyx_L1_error:;
jpayne@69 15193 __Pyx_XDECREF(__pyx_t_1);
jpayne@69 15194 __Pyx_XDECREF(__pyx_t_2);
jpayne@69 15195 __Pyx_XDECREF(__pyx_t_3);
jpayne@69 15196 __Pyx_AddTraceback("pysam.libcfaidx.FastxFile.__exit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 15197 __pyx_r = NULL;
jpayne@69 15198 __pyx_L0:;
jpayne@69 15199 __Pyx_XGIVEREF(__pyx_r);
jpayne@69 15200 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@69 15201 __Pyx_RefNannyFinishContext();
jpayne@69 15202 return __pyx_r;
jpayne@69 15203 }
jpayne@69 15204
jpayne@69 15205 /* "pysam/libcfaidx.pyx":615
jpayne@69 15206 * This is a read-only attribute; the close() method changes the value.
jpayne@69 15207 * """
jpayne@69 15208 * def __get__(self): # <<<<<<<<<<<<<<
jpayne@69 15209 * return not self.is_open()
jpayne@69 15210 *
jpayne@69 15211 */
jpayne@69 15212
jpayne@69 15213 /* Python wrapper */
jpayne@69 15214 static PyObject *__pyx_pw_5pysam_9libcfaidx_9FastxFile_6closed_1__get__(PyObject *__pyx_v_self); /*proto*/
jpayne@69 15215 static PyObject *__pyx_pw_5pysam_9libcfaidx_9FastxFile_6closed_1__get__(PyObject *__pyx_v_self) {
jpayne@69 15216 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@69 15217 PyObject *__pyx_r = 0;
jpayne@69 15218 __Pyx_RefNannyDeclarations
jpayne@69 15219 __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
jpayne@69 15220 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
jpayne@69 15221 __pyx_r = __pyx_pf_5pysam_9libcfaidx_9FastxFile_6closed___get__(((struct __pyx_obj_5pysam_9libcfaidx_FastxFile *)__pyx_v_self));
jpayne@69 15222
jpayne@69 15223 /* function exit code */
jpayne@69 15224 __Pyx_RefNannyFinishContext();
jpayne@69 15225 return __pyx_r;
jpayne@69 15226 }
jpayne@69 15227
jpayne@69 15228 static PyObject *__pyx_pf_5pysam_9libcfaidx_9FastxFile_6closed___get__(struct __pyx_obj_5pysam_9libcfaidx_FastxFile *__pyx_v_self) {
jpayne@69 15229 PyObject *__pyx_r = NULL;
jpayne@69 15230 __Pyx_TraceDeclarations
jpayne@69 15231 __Pyx_RefNannyDeclarations
jpayne@69 15232 PyObject *__pyx_t_1 = NULL;
jpayne@69 15233 PyObject *__pyx_t_2 = NULL;
jpayne@69 15234 PyObject *__pyx_t_3 = NULL;
jpayne@69 15235 unsigned int __pyx_t_4;
jpayne@69 15236 int __pyx_t_5;
jpayne@69 15237 int __pyx_lineno = 0;
jpayne@69 15238 const char *__pyx_filename = NULL;
jpayne@69 15239 int __pyx_clineno = 0;
jpayne@69 15240 __Pyx_RefNannySetupContext("__get__", 1);
jpayne@69 15241 __Pyx_TraceCall("__get__", __pyx_f[0], 615, 0, __PYX_ERR(0, 615, __pyx_L1_error));
jpayne@69 15242
jpayne@69 15243 /* "pysam/libcfaidx.pyx":616
jpayne@69 15244 * """
jpayne@69 15245 * def __get__(self):
jpayne@69 15246 * return not self.is_open() # <<<<<<<<<<<<<<
jpayne@69 15247 *
jpayne@69 15248 * property filename:
jpayne@69 15249 */
jpayne@69 15250 __Pyx_XDECREF(__pyx_r);
jpayne@69 15251 __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_is_open); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 616, __pyx_L1_error)
jpayne@69 15252 __Pyx_GOTREF(__pyx_t_2);
jpayne@69 15253 __pyx_t_3 = NULL;
jpayne@69 15254 __pyx_t_4 = 0;
jpayne@69 15255 #if CYTHON_UNPACK_METHODS
jpayne@69 15256 if (likely(PyMethod_Check(__pyx_t_2))) {
jpayne@69 15257 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
jpayne@69 15258 if (likely(__pyx_t_3)) {
jpayne@69 15259 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
jpayne@69 15260 __Pyx_INCREF(__pyx_t_3);
jpayne@69 15261 __Pyx_INCREF(function);
jpayne@69 15262 __Pyx_DECREF_SET(__pyx_t_2, function);
jpayne@69 15263 __pyx_t_4 = 1;
jpayne@69 15264 }
jpayne@69 15265 }
jpayne@69 15266 #endif
jpayne@69 15267 {
jpayne@69 15268 PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
jpayne@69 15269 __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
jpayne@69 15270 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
jpayne@69 15271 if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 616, __pyx_L1_error)
jpayne@69 15272 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 15273 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@69 15274 }
jpayne@69 15275 __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 616, __pyx_L1_error)
jpayne@69 15276 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@69 15277 __pyx_t_1 = __Pyx_PyBool_FromLong((!__pyx_t_5)); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 616, __pyx_L1_error)
jpayne@69 15278 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 15279 __pyx_r = __pyx_t_1;
jpayne@69 15280 __pyx_t_1 = 0;
jpayne@69 15281 goto __pyx_L0;
jpayne@69 15282
jpayne@69 15283 /* "pysam/libcfaidx.pyx":615
jpayne@69 15284 * This is a read-only attribute; the close() method changes the value.
jpayne@69 15285 * """
jpayne@69 15286 * def __get__(self): # <<<<<<<<<<<<<<
jpayne@69 15287 * return not self.is_open()
jpayne@69 15288 *
jpayne@69 15289 */
jpayne@69 15290
jpayne@69 15291 /* function exit code */
jpayne@69 15292 __pyx_L1_error:;
jpayne@69 15293 __Pyx_XDECREF(__pyx_t_1);
jpayne@69 15294 __Pyx_XDECREF(__pyx_t_2);
jpayne@69 15295 __Pyx_XDECREF(__pyx_t_3);
jpayne@69 15296 __Pyx_AddTraceback("pysam.libcfaidx.FastxFile.closed.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 15297 __pyx_r = NULL;
jpayne@69 15298 __pyx_L0:;
jpayne@69 15299 __Pyx_XGIVEREF(__pyx_r);
jpayne@69 15300 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@69 15301 __Pyx_RefNannyFinishContext();
jpayne@69 15302 return __pyx_r;
jpayne@69 15303 }
jpayne@69 15304
jpayne@69 15305 /* "pysam/libcfaidx.pyx":620
jpayne@69 15306 * property filename:
jpayne@69 15307 * """string with the filename associated with this object."""
jpayne@69 15308 * def __get__(self): # <<<<<<<<<<<<<<
jpayne@69 15309 * return self._filename
jpayne@69 15310 *
jpayne@69 15311 */
jpayne@69 15312
jpayne@69 15313 /* Python wrapper */
jpayne@69 15314 static PyObject *__pyx_pw_5pysam_9libcfaidx_9FastxFile_8filename_1__get__(PyObject *__pyx_v_self); /*proto*/
jpayne@69 15315 static PyObject *__pyx_pw_5pysam_9libcfaidx_9FastxFile_8filename_1__get__(PyObject *__pyx_v_self) {
jpayne@69 15316 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@69 15317 PyObject *__pyx_r = 0;
jpayne@69 15318 __Pyx_RefNannyDeclarations
jpayne@69 15319 __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
jpayne@69 15320 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
jpayne@69 15321 __pyx_r = __pyx_pf_5pysam_9libcfaidx_9FastxFile_8filename___get__(((struct __pyx_obj_5pysam_9libcfaidx_FastxFile *)__pyx_v_self));
jpayne@69 15322
jpayne@69 15323 /* function exit code */
jpayne@69 15324 __Pyx_RefNannyFinishContext();
jpayne@69 15325 return __pyx_r;
jpayne@69 15326 }
jpayne@69 15327
jpayne@69 15328 static PyObject *__pyx_pf_5pysam_9libcfaidx_9FastxFile_8filename___get__(struct __pyx_obj_5pysam_9libcfaidx_FastxFile *__pyx_v_self) {
jpayne@69 15329 PyObject *__pyx_r = NULL;
jpayne@69 15330 __Pyx_TraceDeclarations
jpayne@69 15331 __Pyx_RefNannyDeclarations
jpayne@69 15332 int __pyx_lineno = 0;
jpayne@69 15333 const char *__pyx_filename = NULL;
jpayne@69 15334 int __pyx_clineno = 0;
jpayne@69 15335 __Pyx_RefNannySetupContext("__get__", 1);
jpayne@69 15336 __Pyx_TraceCall("__get__", __pyx_f[0], 620, 0, __PYX_ERR(0, 620, __pyx_L1_error));
jpayne@69 15337
jpayne@69 15338 /* "pysam/libcfaidx.pyx":621
jpayne@69 15339 * """string with the filename associated with this object."""
jpayne@69 15340 * def __get__(self):
jpayne@69 15341 * return self._filename # <<<<<<<<<<<<<<
jpayne@69 15342 *
jpayne@69 15343 * def __iter__(self):
jpayne@69 15344 */
jpayne@69 15345 __Pyx_XDECREF(__pyx_r);
jpayne@69 15346 __Pyx_INCREF(__pyx_v_self->_filename);
jpayne@69 15347 __pyx_r = __pyx_v_self->_filename;
jpayne@69 15348 goto __pyx_L0;
jpayne@69 15349
jpayne@69 15350 /* "pysam/libcfaidx.pyx":620
jpayne@69 15351 * property filename:
jpayne@69 15352 * """string with the filename associated with this object."""
jpayne@69 15353 * def __get__(self): # <<<<<<<<<<<<<<
jpayne@69 15354 * return self._filename
jpayne@69 15355 *
jpayne@69 15356 */
jpayne@69 15357
jpayne@69 15358 /* function exit code */
jpayne@69 15359 __pyx_L1_error:;
jpayne@69 15360 __Pyx_AddTraceback("pysam.libcfaidx.FastxFile.filename.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 15361 __pyx_r = NULL;
jpayne@69 15362 __pyx_L0:;
jpayne@69 15363 __Pyx_XGIVEREF(__pyx_r);
jpayne@69 15364 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@69 15365 __Pyx_RefNannyFinishContext();
jpayne@69 15366 return __pyx_r;
jpayne@69 15367 }
jpayne@69 15368
jpayne@69 15369 /* "pysam/libcfaidx.pyx":623
jpayne@69 15370 * return self._filename
jpayne@69 15371 *
jpayne@69 15372 * def __iter__(self): # <<<<<<<<<<<<<<
jpayne@69 15373 * if not self.is_open():
jpayne@69 15374 * raise ValueError("I/O operation on closed file")
jpayne@69 15375 */
jpayne@69 15376
jpayne@69 15377 /* Python wrapper */
jpayne@69 15378 static PyObject *__pyx_pw_5pysam_9libcfaidx_9FastxFile_15__iter__(PyObject *__pyx_v_self); /*proto*/
jpayne@69 15379 static PyObject *__pyx_pw_5pysam_9libcfaidx_9FastxFile_15__iter__(PyObject *__pyx_v_self) {
jpayne@69 15380 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@69 15381 PyObject *__pyx_r = 0;
jpayne@69 15382 __Pyx_RefNannyDeclarations
jpayne@69 15383 __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
jpayne@69 15384 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
jpayne@69 15385 __pyx_r = __pyx_pf_5pysam_9libcfaidx_9FastxFile_14__iter__(((struct __pyx_obj_5pysam_9libcfaidx_FastxFile *)__pyx_v_self));
jpayne@69 15386
jpayne@69 15387 /* function exit code */
jpayne@69 15388 __Pyx_RefNannyFinishContext();
jpayne@69 15389 return __pyx_r;
jpayne@69 15390 }
jpayne@69 15391
jpayne@69 15392 static PyObject *__pyx_pf_5pysam_9libcfaidx_9FastxFile_14__iter__(struct __pyx_obj_5pysam_9libcfaidx_FastxFile *__pyx_v_self) {
jpayne@69 15393 PyObject *__pyx_r = NULL;
jpayne@69 15394 __Pyx_TraceDeclarations
jpayne@69 15395 __Pyx_RefNannyDeclarations
jpayne@69 15396 PyObject *__pyx_t_1 = NULL;
jpayne@69 15397 PyObject *__pyx_t_2 = NULL;
jpayne@69 15398 PyObject *__pyx_t_3 = NULL;
jpayne@69 15399 unsigned int __pyx_t_4;
jpayne@69 15400 int __pyx_t_5;
jpayne@69 15401 int __pyx_t_6;
jpayne@69 15402 int __pyx_lineno = 0;
jpayne@69 15403 const char *__pyx_filename = NULL;
jpayne@69 15404 int __pyx_clineno = 0;
jpayne@69 15405 __Pyx_RefNannySetupContext("__iter__", 1);
jpayne@69 15406 __Pyx_TraceCall("__iter__", __pyx_f[0], 623, 0, __PYX_ERR(0, 623, __pyx_L1_error));
jpayne@69 15407
jpayne@69 15408 /* "pysam/libcfaidx.pyx":624
jpayne@69 15409 *
jpayne@69 15410 * def __iter__(self):
jpayne@69 15411 * if not self.is_open(): # <<<<<<<<<<<<<<
jpayne@69 15412 * raise ValueError("I/O operation on closed file")
jpayne@69 15413 * return self
jpayne@69 15414 */
jpayne@69 15415 __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_is_open); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 624, __pyx_L1_error)
jpayne@69 15416 __Pyx_GOTREF(__pyx_t_2);
jpayne@69 15417 __pyx_t_3 = NULL;
jpayne@69 15418 __pyx_t_4 = 0;
jpayne@69 15419 #if CYTHON_UNPACK_METHODS
jpayne@69 15420 if (likely(PyMethod_Check(__pyx_t_2))) {
jpayne@69 15421 __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
jpayne@69 15422 if (likely(__pyx_t_3)) {
jpayne@69 15423 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
jpayne@69 15424 __Pyx_INCREF(__pyx_t_3);
jpayne@69 15425 __Pyx_INCREF(function);
jpayne@69 15426 __Pyx_DECREF_SET(__pyx_t_2, function);
jpayne@69 15427 __pyx_t_4 = 1;
jpayne@69 15428 }
jpayne@69 15429 }
jpayne@69 15430 #endif
jpayne@69 15431 {
jpayne@69 15432 PyObject *__pyx_callargs[2] = {__pyx_t_3, NULL};
jpayne@69 15433 __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_4, 0+__pyx_t_4);
jpayne@69 15434 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
jpayne@69 15435 if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 624, __pyx_L1_error)
jpayne@69 15436 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 15437 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@69 15438 }
jpayne@69 15439 __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 624, __pyx_L1_error)
jpayne@69 15440 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@69 15441 __pyx_t_6 = (!__pyx_t_5);
jpayne@69 15442 if (unlikely(__pyx_t_6)) {
jpayne@69 15443
jpayne@69 15444 /* "pysam/libcfaidx.pyx":625
jpayne@69 15445 * def __iter__(self):
jpayne@69 15446 * if not self.is_open():
jpayne@69 15447 * raise ValueError("I/O operation on closed file") # <<<<<<<<<<<<<<
jpayne@69 15448 * return self
jpayne@69 15449 *
jpayne@69 15450 */
jpayne@69 15451 __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__9, NULL); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 625, __pyx_L1_error)
jpayne@69 15452 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 15453 __Pyx_Raise(__pyx_t_1, 0, 0, 0);
jpayne@69 15454 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@69 15455 __PYX_ERR(0, 625, __pyx_L1_error)
jpayne@69 15456
jpayne@69 15457 /* "pysam/libcfaidx.pyx":624
jpayne@69 15458 *
jpayne@69 15459 * def __iter__(self):
jpayne@69 15460 * if not self.is_open(): # <<<<<<<<<<<<<<
jpayne@69 15461 * raise ValueError("I/O operation on closed file")
jpayne@69 15462 * return self
jpayne@69 15463 */
jpayne@69 15464 }
jpayne@69 15465
jpayne@69 15466 /* "pysam/libcfaidx.pyx":626
jpayne@69 15467 * if not self.is_open():
jpayne@69 15468 * raise ValueError("I/O operation on closed file")
jpayne@69 15469 * return self # <<<<<<<<<<<<<<
jpayne@69 15470 *
jpayne@69 15471 * cdef kseq_t * getCurrent(self):
jpayne@69 15472 */
jpayne@69 15473 __Pyx_XDECREF(__pyx_r);
jpayne@69 15474 __Pyx_INCREF((PyObject *)__pyx_v_self);
jpayne@69 15475 __pyx_r = ((PyObject *)__pyx_v_self);
jpayne@69 15476 goto __pyx_L0;
jpayne@69 15477
jpayne@69 15478 /* "pysam/libcfaidx.pyx":623
jpayne@69 15479 * return self._filename
jpayne@69 15480 *
jpayne@69 15481 * def __iter__(self): # <<<<<<<<<<<<<<
jpayne@69 15482 * if not self.is_open():
jpayne@69 15483 * raise ValueError("I/O operation on closed file")
jpayne@69 15484 */
jpayne@69 15485
jpayne@69 15486 /* function exit code */
jpayne@69 15487 __pyx_L1_error:;
jpayne@69 15488 __Pyx_XDECREF(__pyx_t_1);
jpayne@69 15489 __Pyx_XDECREF(__pyx_t_2);
jpayne@69 15490 __Pyx_XDECREF(__pyx_t_3);
jpayne@69 15491 __Pyx_AddTraceback("pysam.libcfaidx.FastxFile.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 15492 __pyx_r = NULL;
jpayne@69 15493 __pyx_L0:;
jpayne@69 15494 __Pyx_XGIVEREF(__pyx_r);
jpayne@69 15495 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@69 15496 __Pyx_RefNannyFinishContext();
jpayne@69 15497 return __pyx_r;
jpayne@69 15498 }
jpayne@69 15499
jpayne@69 15500 /* "pysam/libcfaidx.pyx":628
jpayne@69 15501 * return self
jpayne@69 15502 *
jpayne@69 15503 * cdef kseq_t * getCurrent(self): # <<<<<<<<<<<<<<
jpayne@69 15504 * return self.entry
jpayne@69 15505 *
jpayne@69 15506 */
jpayne@69 15507
jpayne@69 15508 static kseq_t *__pyx_f_5pysam_9libcfaidx_9FastxFile_getCurrent(struct __pyx_obj_5pysam_9libcfaidx_FastxFile *__pyx_v_self) {
jpayne@69 15509 kseq_t *__pyx_r;
jpayne@69 15510 __Pyx_TraceDeclarations
jpayne@69 15511 int __pyx_lineno = 0;
jpayne@69 15512 const char *__pyx_filename = NULL;
jpayne@69 15513 int __pyx_clineno = 0;
jpayne@69 15514 __Pyx_TraceCall("getCurrent", __pyx_f[0], 628, 0, __PYX_ERR(0, 628, __pyx_L1_error));
jpayne@69 15515
jpayne@69 15516 /* "pysam/libcfaidx.pyx":629
jpayne@69 15517 *
jpayne@69 15518 * cdef kseq_t * getCurrent(self):
jpayne@69 15519 * return self.entry # <<<<<<<<<<<<<<
jpayne@69 15520 *
jpayne@69 15521 * cdef int cnext(self):
jpayne@69 15522 */
jpayne@69 15523 __pyx_r = __pyx_v_self->entry;
jpayne@69 15524 goto __pyx_L0;
jpayne@69 15525
jpayne@69 15526 /* "pysam/libcfaidx.pyx":628
jpayne@69 15527 * return self
jpayne@69 15528 *
jpayne@69 15529 * cdef kseq_t * getCurrent(self): # <<<<<<<<<<<<<<
jpayne@69 15530 * return self.entry
jpayne@69 15531 *
jpayne@69 15532 */
jpayne@69 15533
jpayne@69 15534 /* function exit code */
jpayne@69 15535 __pyx_L1_error:;
jpayne@69 15536 __Pyx_AddTraceback("pysam.libcfaidx.FastxFile.getCurrent", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 15537 __pyx_r = 0;
jpayne@69 15538 __pyx_L0:;
jpayne@69 15539 __Pyx_TraceReturn(Py_None, 0);
jpayne@69 15540 return __pyx_r;
jpayne@69 15541 }
jpayne@69 15542
jpayne@69 15543 /* "pysam/libcfaidx.pyx":631
jpayne@69 15544 * return self.entry
jpayne@69 15545 *
jpayne@69 15546 * cdef int cnext(self): # <<<<<<<<<<<<<<
jpayne@69 15547 * '''C version of iterator
jpayne@69 15548 * '''
jpayne@69 15549 */
jpayne@69 15550
jpayne@69 15551 static int __pyx_f_5pysam_9libcfaidx_9FastxFile_cnext(struct __pyx_obj_5pysam_9libcfaidx_FastxFile *__pyx_v_self) {
jpayne@69 15552 int __pyx_r;
jpayne@69 15553 __Pyx_TraceDeclarations
jpayne@69 15554 int __pyx_lineno = 0;
jpayne@69 15555 const char *__pyx_filename = NULL;
jpayne@69 15556 int __pyx_clineno = 0;
jpayne@69 15557 __Pyx_TraceCall("cnext", __pyx_f[0], 631, 0, __PYX_ERR(0, 631, __pyx_L1_error));
jpayne@69 15558
jpayne@69 15559 /* "pysam/libcfaidx.pyx":634
jpayne@69 15560 * '''C version of iterator
jpayne@69 15561 * '''
jpayne@69 15562 * with nogil: # <<<<<<<<<<<<<<
jpayne@69 15563 * return kseq_read(self.entry)
jpayne@69 15564 *
jpayne@69 15565 */
jpayne@69 15566 {
jpayne@69 15567 #ifdef WITH_THREAD
jpayne@69 15568 PyThreadState *_save;
jpayne@69 15569 _save = NULL;
jpayne@69 15570 Py_UNBLOCK_THREADS
jpayne@69 15571 __Pyx_FastGIL_Remember();
jpayne@69 15572 #endif
jpayne@69 15573 /*try:*/ {
jpayne@69 15574
jpayne@69 15575 /* "pysam/libcfaidx.pyx":635
jpayne@69 15576 * '''
jpayne@69 15577 * with nogil:
jpayne@69 15578 * return kseq_read(self.entry) # <<<<<<<<<<<<<<
jpayne@69 15579 *
jpayne@69 15580 * def __next__(self):
jpayne@69 15581 */
jpayne@69 15582 __pyx_r = kseq_read(__pyx_v_self->entry);
jpayne@69 15583 goto __pyx_L3_return;
jpayne@69 15584 }
jpayne@69 15585
jpayne@69 15586 /* "pysam/libcfaidx.pyx":634
jpayne@69 15587 * '''C version of iterator
jpayne@69 15588 * '''
jpayne@69 15589 * with nogil: # <<<<<<<<<<<<<<
jpayne@69 15590 * return kseq_read(self.entry)
jpayne@69 15591 *
jpayne@69 15592 */
jpayne@69 15593 /*finally:*/ {
jpayne@69 15594 __pyx_L3_return: {
jpayne@69 15595 #ifdef WITH_THREAD
jpayne@69 15596 __Pyx_FastGIL_Forget();
jpayne@69 15597 Py_BLOCK_THREADS
jpayne@69 15598 #endif
jpayne@69 15599 goto __pyx_L0;
jpayne@69 15600 }
jpayne@69 15601 }
jpayne@69 15602 }
jpayne@69 15603
jpayne@69 15604 /* "pysam/libcfaidx.pyx":631
jpayne@69 15605 * return self.entry
jpayne@69 15606 *
jpayne@69 15607 * cdef int cnext(self): # <<<<<<<<<<<<<<
jpayne@69 15608 * '''C version of iterator
jpayne@69 15609 * '''
jpayne@69 15610 */
jpayne@69 15611
jpayne@69 15612 /* function exit code */
jpayne@69 15613 __pyx_L1_error:;
jpayne@69 15614 __Pyx_AddTraceback("pysam.libcfaidx.FastxFile.cnext", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 15615 __pyx_r = 0;
jpayne@69 15616 __pyx_L0:;
jpayne@69 15617 __Pyx_TraceReturn(Py_None, 0);
jpayne@69 15618 return __pyx_r;
jpayne@69 15619 }
jpayne@69 15620
jpayne@69 15621 /* "pysam/libcfaidx.pyx":637
jpayne@69 15622 * return kseq_read(self.entry)
jpayne@69 15623 *
jpayne@69 15624 * def __next__(self): # <<<<<<<<<<<<<<
jpayne@69 15625 * """
jpayne@69 15626 * python version of next().
jpayne@69 15627 */
jpayne@69 15628
jpayne@69 15629 /* Python wrapper */
jpayne@69 15630 static PyObject *__pyx_pw_5pysam_9libcfaidx_9FastxFile_17__next__(PyObject *__pyx_v_self); /*proto*/
jpayne@69 15631 PyDoc_STRVAR(__pyx_doc_5pysam_9libcfaidx_9FastxFile_16__next__, "\n python version of next().\n ");
jpayne@69 15632 #if CYTHON_UPDATE_DESCRIPTOR_DOC
jpayne@69 15633 struct wrapperbase __pyx_wrapperbase_5pysam_9libcfaidx_9FastxFile_16__next__;
jpayne@69 15634 #endif
jpayne@69 15635 static PyObject *__pyx_pw_5pysam_9libcfaidx_9FastxFile_17__next__(PyObject *__pyx_v_self) {
jpayne@69 15636 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@69 15637 PyObject *__pyx_r = 0;
jpayne@69 15638 __Pyx_RefNannyDeclarations
jpayne@69 15639 __Pyx_RefNannySetupContext("__next__ (wrapper)", 0);
jpayne@69 15640 __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
jpayne@69 15641 __pyx_r = __pyx_pf_5pysam_9libcfaidx_9FastxFile_16__next__(((struct __pyx_obj_5pysam_9libcfaidx_FastxFile *)__pyx_v_self));
jpayne@69 15642
jpayne@69 15643 /* function exit code */
jpayne@69 15644 __Pyx_RefNannyFinishContext();
jpayne@69 15645 return __pyx_r;
jpayne@69 15646 }
jpayne@69 15647
jpayne@69 15648 static PyObject *__pyx_pf_5pysam_9libcfaidx_9FastxFile_16__next__(struct __pyx_obj_5pysam_9libcfaidx_FastxFile *__pyx_v_self) {
jpayne@69 15649 int __pyx_v_l;
jpayne@69 15650 PyObject *__pyx_r = NULL;
jpayne@69 15651 __Pyx_TraceDeclarations
jpayne@69 15652 __Pyx_RefNannyDeclarations
jpayne@69 15653 int __pyx_error_without_exception = 0; /* StopIteration */
jpayne@69 15654 int __pyx_t_1;
jpayne@69 15655 PyObject *__pyx_t_2 = NULL;
jpayne@69 15656 PyObject *__pyx_t_3 = NULL;
jpayne@69 15657 PyObject *__pyx_t_4 = NULL;
jpayne@69 15658 unsigned int __pyx_t_5;
jpayne@69 15659 int __pyx_lineno = 0;
jpayne@69 15660 const char *__pyx_filename = NULL;
jpayne@69 15661 int __pyx_clineno = 0;
jpayne@69 15662 __Pyx_RefNannySetupContext("__next__", 1);
jpayne@69 15663 __Pyx_TraceCall("__next__", __pyx_f[0], 637, 0, __PYX_ERR(0, 637, __pyx_L1_error));
jpayne@69 15664
jpayne@69 15665 /* "pysam/libcfaidx.pyx":642
jpayne@69 15666 * """
jpayne@69 15667 * cdef int l
jpayne@69 15668 * with nogil: # <<<<<<<<<<<<<<
jpayne@69 15669 * l = kseq_read(self.entry)
jpayne@69 15670 * if (l >= 0):
jpayne@69 15671 */
jpayne@69 15672 {
jpayne@69 15673 #ifdef WITH_THREAD
jpayne@69 15674 PyThreadState *_save;
jpayne@69 15675 _save = NULL;
jpayne@69 15676 Py_UNBLOCK_THREADS
jpayne@69 15677 __Pyx_FastGIL_Remember();
jpayne@69 15678 #endif
jpayne@69 15679 /*try:*/ {
jpayne@69 15680
jpayne@69 15681 /* "pysam/libcfaidx.pyx":643
jpayne@69 15682 * cdef int l
jpayne@69 15683 * with nogil:
jpayne@69 15684 * l = kseq_read(self.entry) # <<<<<<<<<<<<<<
jpayne@69 15685 * if (l >= 0):
jpayne@69 15686 * if self.persist:
jpayne@69 15687 */
jpayne@69 15688 __pyx_v_l = kseq_read(__pyx_v_self->entry);
jpayne@69 15689 }
jpayne@69 15690
jpayne@69 15691 /* "pysam/libcfaidx.pyx":642
jpayne@69 15692 * """
jpayne@69 15693 * cdef int l
jpayne@69 15694 * with nogil: # <<<<<<<<<<<<<<
jpayne@69 15695 * l = kseq_read(self.entry)
jpayne@69 15696 * if (l >= 0):
jpayne@69 15697 */
jpayne@69 15698 /*finally:*/ {
jpayne@69 15699 /*normal exit:*/{
jpayne@69 15700 #ifdef WITH_THREAD
jpayne@69 15701 __Pyx_FastGIL_Forget();
jpayne@69 15702 Py_BLOCK_THREADS
jpayne@69 15703 #endif
jpayne@69 15704 goto __pyx_L5;
jpayne@69 15705 }
jpayne@69 15706 __pyx_L5:;
jpayne@69 15707 }
jpayne@69 15708 }
jpayne@69 15709
jpayne@69 15710 /* "pysam/libcfaidx.pyx":644
jpayne@69 15711 * with nogil:
jpayne@69 15712 * l = kseq_read(self.entry)
jpayne@69 15713 * if (l >= 0): # <<<<<<<<<<<<<<
jpayne@69 15714 * if self.persist:
jpayne@69 15715 * return FastxRecord(proxy=makeFastqProxy(self.entry))
jpayne@69 15716 */
jpayne@69 15717 __pyx_t_1 = (__pyx_v_l >= 0);
jpayne@69 15718 if (likely(__pyx_t_1)) {
jpayne@69 15719
jpayne@69 15720 /* "pysam/libcfaidx.pyx":645
jpayne@69 15721 * l = kseq_read(self.entry)
jpayne@69 15722 * if (l >= 0):
jpayne@69 15723 * if self.persist: # <<<<<<<<<<<<<<
jpayne@69 15724 * return FastxRecord(proxy=makeFastqProxy(self.entry))
jpayne@69 15725 * return makeFastqProxy(self.entry)
jpayne@69 15726 */
jpayne@69 15727 if (__pyx_v_self->persist) {
jpayne@69 15728
jpayne@69 15729 /* "pysam/libcfaidx.pyx":646
jpayne@69 15730 * if (l >= 0):
jpayne@69 15731 * if self.persist:
jpayne@69 15732 * return FastxRecord(proxy=makeFastqProxy(self.entry)) # <<<<<<<<<<<<<<
jpayne@69 15733 * return makeFastqProxy(self.entry)
jpayne@69 15734 * elif (l == -1):
jpayne@69 15735 */
jpayne@69 15736 __Pyx_XDECREF(__pyx_r);
jpayne@69 15737 __pyx_t_2 = __Pyx_PyDict_NewPresized(1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 646, __pyx_L1_error)
jpayne@69 15738 __Pyx_GOTREF(__pyx_t_2);
jpayne@69 15739 __pyx_t_3 = __pyx_f_5pysam_9libcfaidx_makeFastqProxy(__pyx_v_self->entry); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 646, __pyx_L1_error)
jpayne@69 15740 __Pyx_GOTREF(__pyx_t_3);
jpayne@69 15741 if (PyDict_SetItem(__pyx_t_2, __pyx_n_s_proxy, __pyx_t_3) < 0) __PYX_ERR(0, 646, __pyx_L1_error)
jpayne@69 15742 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
jpayne@69 15743 __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_5pysam_9libcfaidx_FastxRecord), __pyx_empty_tuple, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 646, __pyx_L1_error)
jpayne@69 15744 __Pyx_GOTREF(__pyx_t_3);
jpayne@69 15745 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@69 15746 __pyx_r = __pyx_t_3;
jpayne@69 15747 __pyx_t_3 = 0;
jpayne@69 15748 goto __pyx_L0;
jpayne@69 15749
jpayne@69 15750 /* "pysam/libcfaidx.pyx":645
jpayne@69 15751 * l = kseq_read(self.entry)
jpayne@69 15752 * if (l >= 0):
jpayne@69 15753 * if self.persist: # <<<<<<<<<<<<<<
jpayne@69 15754 * return FastxRecord(proxy=makeFastqProxy(self.entry))
jpayne@69 15755 * return makeFastqProxy(self.entry)
jpayne@69 15756 */
jpayne@69 15757 }
jpayne@69 15758
jpayne@69 15759 /* "pysam/libcfaidx.pyx":647
jpayne@69 15760 * if self.persist:
jpayne@69 15761 * return FastxRecord(proxy=makeFastqProxy(self.entry))
jpayne@69 15762 * return makeFastqProxy(self.entry) # <<<<<<<<<<<<<<
jpayne@69 15763 * elif (l == -1):
jpayne@69 15764 * raise StopIteration
jpayne@69 15765 */
jpayne@69 15766 __Pyx_XDECREF(__pyx_r);
jpayne@69 15767 __pyx_t_3 = __pyx_f_5pysam_9libcfaidx_makeFastqProxy(__pyx_v_self->entry); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 647, __pyx_L1_error)
jpayne@69 15768 __Pyx_GOTREF(__pyx_t_3);
jpayne@69 15769 __pyx_r = __pyx_t_3;
jpayne@69 15770 __pyx_t_3 = 0;
jpayne@69 15771 goto __pyx_L0;
jpayne@69 15772
jpayne@69 15773 /* "pysam/libcfaidx.pyx":644
jpayne@69 15774 * with nogil:
jpayne@69 15775 * l = kseq_read(self.entry)
jpayne@69 15776 * if (l >= 0): # <<<<<<<<<<<<<<
jpayne@69 15777 * if self.persist:
jpayne@69 15778 * return FastxRecord(proxy=makeFastqProxy(self.entry))
jpayne@69 15779 */
jpayne@69 15780 }
jpayne@69 15781
jpayne@69 15782 /* "pysam/libcfaidx.pyx":648
jpayne@69 15783 * return FastxRecord(proxy=makeFastqProxy(self.entry))
jpayne@69 15784 * return makeFastqProxy(self.entry)
jpayne@69 15785 * elif (l == -1): # <<<<<<<<<<<<<<
jpayne@69 15786 * raise StopIteration
jpayne@69 15787 * elif (l == -2):
jpayne@69 15788 */
jpayne@69 15789 __pyx_t_1 = (__pyx_v_l == -1L);
jpayne@69 15790 if (unlikely(__pyx_t_1)) {
jpayne@69 15791
jpayne@69 15792 /* "pysam/libcfaidx.pyx":649
jpayne@69 15793 * return makeFastqProxy(self.entry)
jpayne@69 15794 * elif (l == -1):
jpayne@69 15795 * raise StopIteration # <<<<<<<<<<<<<<
jpayne@69 15796 * elif (l == -2):
jpayne@69 15797 * raise ValueError('truncated quality string in {0}'
jpayne@69 15798 */
jpayne@69 15799 __pyx_error_without_exception = 1;
jpayne@69 15800 goto __pyx_L1_error;;
jpayne@69 15801
jpayne@69 15802 /* "pysam/libcfaidx.pyx":648
jpayne@69 15803 * return FastxRecord(proxy=makeFastqProxy(self.entry))
jpayne@69 15804 * return makeFastqProxy(self.entry)
jpayne@69 15805 * elif (l == -1): # <<<<<<<<<<<<<<
jpayne@69 15806 * raise StopIteration
jpayne@69 15807 * elif (l == -2):
jpayne@69 15808 */
jpayne@69 15809 }
jpayne@69 15810
jpayne@69 15811 /* "pysam/libcfaidx.pyx":650
jpayne@69 15812 * elif (l == -1):
jpayne@69 15813 * raise StopIteration
jpayne@69 15814 * elif (l == -2): # <<<<<<<<<<<<<<
jpayne@69 15815 * raise ValueError('truncated quality string in {0}'
jpayne@69 15816 * .format(self._filename))
jpayne@69 15817 */
jpayne@69 15818 __pyx_t_1 = (__pyx_v_l == -2L);
jpayne@69 15819 if (unlikely(__pyx_t_1)) {
jpayne@69 15820
jpayne@69 15821 /* "pysam/libcfaidx.pyx":652
jpayne@69 15822 * elif (l == -2):
jpayne@69 15823 * raise ValueError('truncated quality string in {0}'
jpayne@69 15824 * .format(self._filename)) # <<<<<<<<<<<<<<
jpayne@69 15825 * else:
jpayne@69 15826 * raise ValueError('unknown problem parsing {0}'
jpayne@69 15827 */
jpayne@69 15828 __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_truncated_quality_string_in_0, __pyx_n_s_format); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 652, __pyx_L1_error)
jpayne@69 15829 __Pyx_GOTREF(__pyx_t_2);
jpayne@69 15830 __pyx_t_4 = NULL;
jpayne@69 15831 __pyx_t_5 = 0;
jpayne@69 15832 #if CYTHON_UNPACK_METHODS
jpayne@69 15833 if (likely(PyMethod_Check(__pyx_t_2))) {
jpayne@69 15834 __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
jpayne@69 15835 if (likely(__pyx_t_4)) {
jpayne@69 15836 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
jpayne@69 15837 __Pyx_INCREF(__pyx_t_4);
jpayne@69 15838 __Pyx_INCREF(function);
jpayne@69 15839 __Pyx_DECREF_SET(__pyx_t_2, function);
jpayne@69 15840 __pyx_t_5 = 1;
jpayne@69 15841 }
jpayne@69 15842 }
jpayne@69 15843 #endif
jpayne@69 15844 {
jpayne@69 15845 PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_self->_filename};
jpayne@69 15846 __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_2, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
jpayne@69 15847 __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
jpayne@69 15848 if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 652, __pyx_L1_error)
jpayne@69 15849 __Pyx_GOTREF(__pyx_t_3);
jpayne@69 15850 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@69 15851 }
jpayne@69 15852
jpayne@69 15853 /* "pysam/libcfaidx.pyx":651
jpayne@69 15854 * raise StopIteration
jpayne@69 15855 * elif (l == -2):
jpayne@69 15856 * raise ValueError('truncated quality string in {0}' # <<<<<<<<<<<<<<
jpayne@69 15857 * .format(self._filename))
jpayne@69 15858 * else:
jpayne@69 15859 */
jpayne@69 15860 __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 651, __pyx_L1_error)
jpayne@69 15861 __Pyx_GOTREF(__pyx_t_2);
jpayne@69 15862 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
jpayne@69 15863 __Pyx_Raise(__pyx_t_2, 0, 0, 0);
jpayne@69 15864 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@69 15865 __PYX_ERR(0, 651, __pyx_L1_error)
jpayne@69 15866
jpayne@69 15867 /* "pysam/libcfaidx.pyx":650
jpayne@69 15868 * elif (l == -1):
jpayne@69 15869 * raise StopIteration
jpayne@69 15870 * elif (l == -2): # <<<<<<<<<<<<<<
jpayne@69 15871 * raise ValueError('truncated quality string in {0}'
jpayne@69 15872 * .format(self._filename))
jpayne@69 15873 */
jpayne@69 15874 }
jpayne@69 15875
jpayne@69 15876 /* "pysam/libcfaidx.pyx":654
jpayne@69 15877 * .format(self._filename))
jpayne@69 15878 * else:
jpayne@69 15879 * raise ValueError('unknown problem parsing {0}' # <<<<<<<<<<<<<<
jpayne@69 15880 * .format(self._filename))
jpayne@69 15881 *
jpayne@69 15882 */
jpayne@69 15883 /*else*/ {
jpayne@69 15884
jpayne@69 15885 /* "pysam/libcfaidx.pyx":655
jpayne@69 15886 * else:
jpayne@69 15887 * raise ValueError('unknown problem parsing {0}'
jpayne@69 15888 * .format(self._filename)) # <<<<<<<<<<<<<<
jpayne@69 15889 *
jpayne@69 15890 * # Compatibility Layer for pysam 0.8.1
jpayne@69 15891 */
jpayne@69 15892 __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_kp_u_unknown_problem_parsing_0, __pyx_n_s_format); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 655, __pyx_L1_error)
jpayne@69 15893 __Pyx_GOTREF(__pyx_t_3);
jpayne@69 15894 __pyx_t_4 = NULL;
jpayne@69 15895 __pyx_t_5 = 0;
jpayne@69 15896 #if CYTHON_UNPACK_METHODS
jpayne@69 15897 if (likely(PyMethod_Check(__pyx_t_3))) {
jpayne@69 15898 __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
jpayne@69 15899 if (likely(__pyx_t_4)) {
jpayne@69 15900 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
jpayne@69 15901 __Pyx_INCREF(__pyx_t_4);
jpayne@69 15902 __Pyx_INCREF(function);
jpayne@69 15903 __Pyx_DECREF_SET(__pyx_t_3, function);
jpayne@69 15904 __pyx_t_5 = 1;
jpayne@69 15905 }
jpayne@69 15906 }
jpayne@69 15907 #endif
jpayne@69 15908 {
jpayne@69 15909 PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v_self->_filename};
jpayne@69 15910 __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
jpayne@69 15911 __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
jpayne@69 15912 if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 655, __pyx_L1_error)
jpayne@69 15913 __Pyx_GOTREF(__pyx_t_2);
jpayne@69 15914 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
jpayne@69 15915 }
jpayne@69 15916
jpayne@69 15917 /* "pysam/libcfaidx.pyx":654
jpayne@69 15918 * .format(self._filename))
jpayne@69 15919 * else:
jpayne@69 15920 * raise ValueError('unknown problem parsing {0}' # <<<<<<<<<<<<<<
jpayne@69 15921 * .format(self._filename))
jpayne@69 15922 *
jpayne@69 15923 */
jpayne@69 15924 __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_builtin_ValueError, __pyx_t_2); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 654, __pyx_L1_error)
jpayne@69 15925 __Pyx_GOTREF(__pyx_t_3);
jpayne@69 15926 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@69 15927 __Pyx_Raise(__pyx_t_3, 0, 0, 0);
jpayne@69 15928 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
jpayne@69 15929 __PYX_ERR(0, 654, __pyx_L1_error)
jpayne@69 15930 }
jpayne@69 15931
jpayne@69 15932 /* "pysam/libcfaidx.pyx":637
jpayne@69 15933 * return kseq_read(self.entry)
jpayne@69 15934 *
jpayne@69 15935 * def __next__(self): # <<<<<<<<<<<<<<
jpayne@69 15936 * """
jpayne@69 15937 * python version of next().
jpayne@69 15938 */
jpayne@69 15939
jpayne@69 15940 /* function exit code */
jpayne@69 15941 __pyx_L1_error:;
jpayne@69 15942 __Pyx_XDECREF(__pyx_t_2);
jpayne@69 15943 __Pyx_XDECREF(__pyx_t_3);
jpayne@69 15944 __Pyx_XDECREF(__pyx_t_4);
jpayne@69 15945 if (!__pyx_error_without_exception) {
jpayne@69 15946 __Pyx_AddTraceback("pysam.libcfaidx.FastxFile.__next__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 15947 }
jpayne@69 15948 __pyx_r = NULL;
jpayne@69 15949 __pyx_L0:;
jpayne@69 15950 __Pyx_XGIVEREF(__pyx_r);
jpayne@69 15951 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@69 15952 __Pyx_RefNannyFinishContext();
jpayne@69 15953 return __pyx_r;
jpayne@69 15954 }
jpayne@69 15955
jpayne@69 15956 /* "(tree fragment)":1
jpayne@69 15957 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
jpayne@69 15958 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
jpayne@69 15959 * def __setstate_cython__(self, __pyx_state):
jpayne@69 15960 */
jpayne@69 15961
jpayne@69 15962 /* Python wrapper */
jpayne@69 15963 static PyObject *__pyx_pw_5pysam_9libcfaidx_9FastxFile_19__reduce_cython__(PyObject *__pyx_v_self,
jpayne@69 15964 #if CYTHON_METH_FASTCALL
jpayne@69 15965 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@69 15966 #else
jpayne@69 15967 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@69 15968 #endif
jpayne@69 15969 ); /*proto*/
jpayne@69 15970 PyDoc_STRVAR(__pyx_doc_5pysam_9libcfaidx_9FastxFile_18__reduce_cython__, "FastxFile.__reduce_cython__(self)");
jpayne@69 15971 static PyMethodDef __pyx_mdef_5pysam_9libcfaidx_9FastxFile_19__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_9libcfaidx_9FastxFile_19__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_9libcfaidx_9FastxFile_18__reduce_cython__};
jpayne@69 15972 static PyObject *__pyx_pw_5pysam_9libcfaidx_9FastxFile_19__reduce_cython__(PyObject *__pyx_v_self,
jpayne@69 15973 #if CYTHON_METH_FASTCALL
jpayne@69 15974 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@69 15975 #else
jpayne@69 15976 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@69 15977 #endif
jpayne@69 15978 ) {
jpayne@69 15979 #if !CYTHON_METH_FASTCALL
jpayne@69 15980 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
jpayne@69 15981 #endif
jpayne@69 15982 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@69 15983 PyObject *__pyx_r = 0;
jpayne@69 15984 __Pyx_RefNannyDeclarations
jpayne@69 15985 __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
jpayne@69 15986 #if !CYTHON_METH_FASTCALL
jpayne@69 15987 #if CYTHON_ASSUME_SAFE_MACROS
jpayne@69 15988 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
jpayne@69 15989 #else
jpayne@69 15990 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
jpayne@69 15991 #endif
jpayne@69 15992 #endif
jpayne@69 15993 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
jpayne@69 15994 if (unlikely(__pyx_nargs > 0)) {
jpayne@69 15995 __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL;}
jpayne@69 15996 if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__reduce_cython__", 0))) return NULL;
jpayne@69 15997 __pyx_r = __pyx_pf_5pysam_9libcfaidx_9FastxFile_18__reduce_cython__(((struct __pyx_obj_5pysam_9libcfaidx_FastxFile *)__pyx_v_self));
jpayne@69 15998
jpayne@69 15999 /* function exit code */
jpayne@69 16000 __Pyx_RefNannyFinishContext();
jpayne@69 16001 return __pyx_r;
jpayne@69 16002 }
jpayne@69 16003
jpayne@69 16004 static PyObject *__pyx_pf_5pysam_9libcfaidx_9FastxFile_18__reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5pysam_9libcfaidx_FastxFile *__pyx_v_self) {
jpayne@69 16005 PyObject *__pyx_r = NULL;
jpayne@69 16006 __Pyx_TraceDeclarations
jpayne@69 16007 __Pyx_RefNannyDeclarations
jpayne@69 16008 int __pyx_lineno = 0;
jpayne@69 16009 const char *__pyx_filename = NULL;
jpayne@69 16010 int __pyx_clineno = 0;
jpayne@69 16011 __Pyx_TraceFrameInit(__pyx_codeobj__39)
jpayne@69 16012 __Pyx_RefNannySetupContext("__reduce_cython__", 1);
jpayne@69 16013 __Pyx_TraceCall("__reduce_cython__", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));
jpayne@69 16014
jpayne@69 16015 /* "(tree fragment)":2
jpayne@69 16016 * def __reduce_cython__(self):
jpayne@69 16017 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" # <<<<<<<<<<<<<<
jpayne@69 16018 * def __setstate_cython__(self, __pyx_state):
jpayne@69 16019 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
jpayne@69 16020 */
jpayne@69 16021 __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_no_default___reduce___due_to_non, 0, 0);
jpayne@69 16022 __PYX_ERR(1, 2, __pyx_L1_error)
jpayne@69 16023
jpayne@69 16024 /* "(tree fragment)":1
jpayne@69 16025 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
jpayne@69 16026 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
jpayne@69 16027 * def __setstate_cython__(self, __pyx_state):
jpayne@69 16028 */
jpayne@69 16029
jpayne@69 16030 /* function exit code */
jpayne@69 16031 __pyx_L1_error:;
jpayne@69 16032 __Pyx_AddTraceback("pysam.libcfaidx.FastxFile.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 16033 __pyx_r = NULL;
jpayne@69 16034 __Pyx_XGIVEREF(__pyx_r);
jpayne@69 16035 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@69 16036 __Pyx_RefNannyFinishContext();
jpayne@69 16037 return __pyx_r;
jpayne@69 16038 }
jpayne@69 16039
jpayne@69 16040 /* "(tree fragment)":3
jpayne@69 16041 * def __reduce_cython__(self):
jpayne@69 16042 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
jpayne@69 16043 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
jpayne@69 16044 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
jpayne@69 16045 */
jpayne@69 16046
jpayne@69 16047 /* Python wrapper */
jpayne@69 16048 static PyObject *__pyx_pw_5pysam_9libcfaidx_9FastxFile_21__setstate_cython__(PyObject *__pyx_v_self,
jpayne@69 16049 #if CYTHON_METH_FASTCALL
jpayne@69 16050 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@69 16051 #else
jpayne@69 16052 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@69 16053 #endif
jpayne@69 16054 ); /*proto*/
jpayne@69 16055 PyDoc_STRVAR(__pyx_doc_5pysam_9libcfaidx_9FastxFile_20__setstate_cython__, "FastxFile.__setstate_cython__(self, __pyx_state)");
jpayne@69 16056 static PyMethodDef __pyx_mdef_5pysam_9libcfaidx_9FastxFile_21__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_9libcfaidx_9FastxFile_21__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_9libcfaidx_9FastxFile_20__setstate_cython__};
jpayne@69 16057 static PyObject *__pyx_pw_5pysam_9libcfaidx_9FastxFile_21__setstate_cython__(PyObject *__pyx_v_self,
jpayne@69 16058 #if CYTHON_METH_FASTCALL
jpayne@69 16059 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@69 16060 #else
jpayne@69 16061 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@69 16062 #endif
jpayne@69 16063 ) {
jpayne@69 16064 CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0;
jpayne@69 16065 #if !CYTHON_METH_FASTCALL
jpayne@69 16066 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
jpayne@69 16067 #endif
jpayne@69 16068 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@69 16069 PyObject* values[1] = {0};
jpayne@69 16070 int __pyx_lineno = 0;
jpayne@69 16071 const char *__pyx_filename = NULL;
jpayne@69 16072 int __pyx_clineno = 0;
jpayne@69 16073 PyObject *__pyx_r = 0;
jpayne@69 16074 __Pyx_RefNannyDeclarations
jpayne@69 16075 __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
jpayne@69 16076 #if !CYTHON_METH_FASTCALL
jpayne@69 16077 #if CYTHON_ASSUME_SAFE_MACROS
jpayne@69 16078 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
jpayne@69 16079 #else
jpayne@69 16080 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
jpayne@69 16081 #endif
jpayne@69 16082 #endif
jpayne@69 16083 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
jpayne@69 16084 {
jpayne@69 16085 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0};
jpayne@69 16086 if (__pyx_kwds) {
jpayne@69 16087 Py_ssize_t kw_args;
jpayne@69 16088 switch (__pyx_nargs) {
jpayne@69 16089 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
jpayne@69 16090 CYTHON_FALLTHROUGH;
jpayne@69 16091 case 0: break;
jpayne@69 16092 default: goto __pyx_L5_argtuple_error;
jpayne@69 16093 }
jpayne@69 16094 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
jpayne@69 16095 switch (__pyx_nargs) {
jpayne@69 16096 case 0:
jpayne@69 16097 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) {
jpayne@69 16098 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
jpayne@69 16099 kw_args--;
jpayne@69 16100 }
jpayne@69 16101 else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 3, __pyx_L3_error)
jpayne@69 16102 else goto __pyx_L5_argtuple_error;
jpayne@69 16103 }
jpayne@69 16104 if (unlikely(kw_args > 0)) {
jpayne@69 16105 const Py_ssize_t kwd_pos_args = __pyx_nargs;
jpayne@69 16106 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__setstate_cython__") < 0)) __PYX_ERR(1, 3, __pyx_L3_error)
jpayne@69 16107 }
jpayne@69 16108 } else if (unlikely(__pyx_nargs != 1)) {
jpayne@69 16109 goto __pyx_L5_argtuple_error;
jpayne@69 16110 } else {
jpayne@69 16111 values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
jpayne@69 16112 }
jpayne@69 16113 __pyx_v___pyx_state = values[0];
jpayne@69 16114 }
jpayne@69 16115 goto __pyx_L6_skip;
jpayne@69 16116 __pyx_L5_argtuple_error:;
jpayne@69 16117 __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 3, __pyx_L3_error)
jpayne@69 16118 __pyx_L6_skip:;
jpayne@69 16119 goto __pyx_L4_argument_unpacking_done;
jpayne@69 16120 __pyx_L3_error:;
jpayne@69 16121 {
jpayne@69 16122 Py_ssize_t __pyx_temp;
jpayne@69 16123 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
jpayne@69 16124 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
jpayne@69 16125 }
jpayne@69 16126 }
jpayne@69 16127 __Pyx_AddTraceback("pysam.libcfaidx.FastxFile.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 16128 __Pyx_RefNannyFinishContext();
jpayne@69 16129 return NULL;
jpayne@69 16130 __pyx_L4_argument_unpacking_done:;
jpayne@69 16131 __pyx_r = __pyx_pf_5pysam_9libcfaidx_9FastxFile_20__setstate_cython__(((struct __pyx_obj_5pysam_9libcfaidx_FastxFile *)__pyx_v_self), __pyx_v___pyx_state);
jpayne@69 16132
jpayne@69 16133 /* function exit code */
jpayne@69 16134 {
jpayne@69 16135 Py_ssize_t __pyx_temp;
jpayne@69 16136 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
jpayne@69 16137 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
jpayne@69 16138 }
jpayne@69 16139 }
jpayne@69 16140 __Pyx_RefNannyFinishContext();
jpayne@69 16141 return __pyx_r;
jpayne@69 16142 }
jpayne@69 16143
jpayne@69 16144 static PyObject *__pyx_pf_5pysam_9libcfaidx_9FastxFile_20__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_5pysam_9libcfaidx_FastxFile *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
jpayne@69 16145 PyObject *__pyx_r = NULL;
jpayne@69 16146 __Pyx_TraceDeclarations
jpayne@69 16147 __Pyx_RefNannyDeclarations
jpayne@69 16148 int __pyx_lineno = 0;
jpayne@69 16149 const char *__pyx_filename = NULL;
jpayne@69 16150 int __pyx_clineno = 0;
jpayne@69 16151 __Pyx_TraceFrameInit(__pyx_codeobj__40)
jpayne@69 16152 __Pyx_RefNannySetupContext("__setstate_cython__", 1);
jpayne@69 16153 __Pyx_TraceCall("__setstate_cython__", __pyx_f[1], 3, 0, __PYX_ERR(1, 3, __pyx_L1_error));
jpayne@69 16154
jpayne@69 16155 /* "(tree fragment)":4
jpayne@69 16156 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
jpayne@69 16157 * def __setstate_cython__(self, __pyx_state):
jpayne@69 16158 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" # <<<<<<<<<<<<<<
jpayne@69 16159 */
jpayne@69 16160 __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_no_default___reduce___due_to_non, 0, 0);
jpayne@69 16161 __PYX_ERR(1, 4, __pyx_L1_error)
jpayne@69 16162
jpayne@69 16163 /* "(tree fragment)":3
jpayne@69 16164 * def __reduce_cython__(self):
jpayne@69 16165 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
jpayne@69 16166 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
jpayne@69 16167 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
jpayne@69 16168 */
jpayne@69 16169
jpayne@69 16170 /* function exit code */
jpayne@69 16171 __pyx_L1_error:;
jpayne@69 16172 __Pyx_AddTraceback("pysam.libcfaidx.FastxFile.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 16173 __pyx_r = NULL;
jpayne@69 16174 __Pyx_XGIVEREF(__pyx_r);
jpayne@69 16175 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@69 16176 __Pyx_RefNannyFinishContext();
jpayne@69 16177 return __pyx_r;
jpayne@69 16178 }
jpayne@69 16179
jpayne@69 16180 /* "(tree fragment)":1
jpayne@69 16181 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
jpayne@69 16182 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
jpayne@69 16183 * def __setstate_cython__(self, __pyx_state):
jpayne@69 16184 */
jpayne@69 16185
jpayne@69 16186 /* Python wrapper */
jpayne@69 16187 static PyObject *__pyx_pw_5pysam_9libcfaidx_9FastqFile_1__reduce_cython__(PyObject *__pyx_v_self,
jpayne@69 16188 #if CYTHON_METH_FASTCALL
jpayne@69 16189 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@69 16190 #else
jpayne@69 16191 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@69 16192 #endif
jpayne@69 16193 ); /*proto*/
jpayne@69 16194 PyDoc_STRVAR(__pyx_doc_5pysam_9libcfaidx_9FastqFile___reduce_cython__, "FastqFile.__reduce_cython__(self)");
jpayne@69 16195 static PyMethodDef __pyx_mdef_5pysam_9libcfaidx_9FastqFile_1__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_9libcfaidx_9FastqFile_1__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_9libcfaidx_9FastqFile___reduce_cython__};
jpayne@69 16196 static PyObject *__pyx_pw_5pysam_9libcfaidx_9FastqFile_1__reduce_cython__(PyObject *__pyx_v_self,
jpayne@69 16197 #if CYTHON_METH_FASTCALL
jpayne@69 16198 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@69 16199 #else
jpayne@69 16200 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@69 16201 #endif
jpayne@69 16202 ) {
jpayne@69 16203 #if !CYTHON_METH_FASTCALL
jpayne@69 16204 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
jpayne@69 16205 #endif
jpayne@69 16206 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@69 16207 PyObject *__pyx_r = 0;
jpayne@69 16208 __Pyx_RefNannyDeclarations
jpayne@69 16209 __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
jpayne@69 16210 #if !CYTHON_METH_FASTCALL
jpayne@69 16211 #if CYTHON_ASSUME_SAFE_MACROS
jpayne@69 16212 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
jpayne@69 16213 #else
jpayne@69 16214 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
jpayne@69 16215 #endif
jpayne@69 16216 #endif
jpayne@69 16217 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
jpayne@69 16218 if (unlikely(__pyx_nargs > 0)) {
jpayne@69 16219 __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL;}
jpayne@69 16220 if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__reduce_cython__", 0))) return NULL;
jpayne@69 16221 __pyx_r = __pyx_pf_5pysam_9libcfaidx_9FastqFile___reduce_cython__(((struct __pyx_obj_5pysam_9libcfaidx_FastqFile *)__pyx_v_self));
jpayne@69 16222
jpayne@69 16223 /* function exit code */
jpayne@69 16224 __Pyx_RefNannyFinishContext();
jpayne@69 16225 return __pyx_r;
jpayne@69 16226 }
jpayne@69 16227
jpayne@69 16228 static PyObject *__pyx_pf_5pysam_9libcfaidx_9FastqFile___reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5pysam_9libcfaidx_FastqFile *__pyx_v_self) {
jpayne@69 16229 PyObject *__pyx_r = NULL;
jpayne@69 16230 __Pyx_TraceDeclarations
jpayne@69 16231 __Pyx_RefNannyDeclarations
jpayne@69 16232 int __pyx_lineno = 0;
jpayne@69 16233 const char *__pyx_filename = NULL;
jpayne@69 16234 int __pyx_clineno = 0;
jpayne@69 16235 __Pyx_TraceFrameInit(__pyx_codeobj__41)
jpayne@69 16236 __Pyx_RefNannySetupContext("__reduce_cython__", 1);
jpayne@69 16237 __Pyx_TraceCall("__reduce_cython__", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));
jpayne@69 16238
jpayne@69 16239 /* "(tree fragment)":2
jpayne@69 16240 * def __reduce_cython__(self):
jpayne@69 16241 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" # <<<<<<<<<<<<<<
jpayne@69 16242 * def __setstate_cython__(self, __pyx_state):
jpayne@69 16243 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
jpayne@69 16244 */
jpayne@69 16245 __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_no_default___reduce___due_to_non, 0, 0);
jpayne@69 16246 __PYX_ERR(1, 2, __pyx_L1_error)
jpayne@69 16247
jpayne@69 16248 /* "(tree fragment)":1
jpayne@69 16249 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
jpayne@69 16250 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
jpayne@69 16251 * def __setstate_cython__(self, __pyx_state):
jpayne@69 16252 */
jpayne@69 16253
jpayne@69 16254 /* function exit code */
jpayne@69 16255 __pyx_L1_error:;
jpayne@69 16256 __Pyx_AddTraceback("pysam.libcfaidx.FastqFile.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 16257 __pyx_r = NULL;
jpayne@69 16258 __Pyx_XGIVEREF(__pyx_r);
jpayne@69 16259 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@69 16260 __Pyx_RefNannyFinishContext();
jpayne@69 16261 return __pyx_r;
jpayne@69 16262 }
jpayne@69 16263
jpayne@69 16264 /* "(tree fragment)":3
jpayne@69 16265 * def __reduce_cython__(self):
jpayne@69 16266 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
jpayne@69 16267 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
jpayne@69 16268 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
jpayne@69 16269 */
jpayne@69 16270
jpayne@69 16271 /* Python wrapper */
jpayne@69 16272 static PyObject *__pyx_pw_5pysam_9libcfaidx_9FastqFile_3__setstate_cython__(PyObject *__pyx_v_self,
jpayne@69 16273 #if CYTHON_METH_FASTCALL
jpayne@69 16274 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@69 16275 #else
jpayne@69 16276 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@69 16277 #endif
jpayne@69 16278 ); /*proto*/
jpayne@69 16279 PyDoc_STRVAR(__pyx_doc_5pysam_9libcfaidx_9FastqFile_2__setstate_cython__, "FastqFile.__setstate_cython__(self, __pyx_state)");
jpayne@69 16280 static PyMethodDef __pyx_mdef_5pysam_9libcfaidx_9FastqFile_3__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_9libcfaidx_9FastqFile_3__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_9libcfaidx_9FastqFile_2__setstate_cython__};
jpayne@69 16281 static PyObject *__pyx_pw_5pysam_9libcfaidx_9FastqFile_3__setstate_cython__(PyObject *__pyx_v_self,
jpayne@69 16282 #if CYTHON_METH_FASTCALL
jpayne@69 16283 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@69 16284 #else
jpayne@69 16285 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@69 16286 #endif
jpayne@69 16287 ) {
jpayne@69 16288 CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0;
jpayne@69 16289 #if !CYTHON_METH_FASTCALL
jpayne@69 16290 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
jpayne@69 16291 #endif
jpayne@69 16292 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@69 16293 PyObject* values[1] = {0};
jpayne@69 16294 int __pyx_lineno = 0;
jpayne@69 16295 const char *__pyx_filename = NULL;
jpayne@69 16296 int __pyx_clineno = 0;
jpayne@69 16297 PyObject *__pyx_r = 0;
jpayne@69 16298 __Pyx_RefNannyDeclarations
jpayne@69 16299 __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
jpayne@69 16300 #if !CYTHON_METH_FASTCALL
jpayne@69 16301 #if CYTHON_ASSUME_SAFE_MACROS
jpayne@69 16302 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
jpayne@69 16303 #else
jpayne@69 16304 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
jpayne@69 16305 #endif
jpayne@69 16306 #endif
jpayne@69 16307 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
jpayne@69 16308 {
jpayne@69 16309 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0};
jpayne@69 16310 if (__pyx_kwds) {
jpayne@69 16311 Py_ssize_t kw_args;
jpayne@69 16312 switch (__pyx_nargs) {
jpayne@69 16313 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
jpayne@69 16314 CYTHON_FALLTHROUGH;
jpayne@69 16315 case 0: break;
jpayne@69 16316 default: goto __pyx_L5_argtuple_error;
jpayne@69 16317 }
jpayne@69 16318 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
jpayne@69 16319 switch (__pyx_nargs) {
jpayne@69 16320 case 0:
jpayne@69 16321 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) {
jpayne@69 16322 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
jpayne@69 16323 kw_args--;
jpayne@69 16324 }
jpayne@69 16325 else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 3, __pyx_L3_error)
jpayne@69 16326 else goto __pyx_L5_argtuple_error;
jpayne@69 16327 }
jpayne@69 16328 if (unlikely(kw_args > 0)) {
jpayne@69 16329 const Py_ssize_t kwd_pos_args = __pyx_nargs;
jpayne@69 16330 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__setstate_cython__") < 0)) __PYX_ERR(1, 3, __pyx_L3_error)
jpayne@69 16331 }
jpayne@69 16332 } else if (unlikely(__pyx_nargs != 1)) {
jpayne@69 16333 goto __pyx_L5_argtuple_error;
jpayne@69 16334 } else {
jpayne@69 16335 values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
jpayne@69 16336 }
jpayne@69 16337 __pyx_v___pyx_state = values[0];
jpayne@69 16338 }
jpayne@69 16339 goto __pyx_L6_skip;
jpayne@69 16340 __pyx_L5_argtuple_error:;
jpayne@69 16341 __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 3, __pyx_L3_error)
jpayne@69 16342 __pyx_L6_skip:;
jpayne@69 16343 goto __pyx_L4_argument_unpacking_done;
jpayne@69 16344 __pyx_L3_error:;
jpayne@69 16345 {
jpayne@69 16346 Py_ssize_t __pyx_temp;
jpayne@69 16347 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
jpayne@69 16348 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
jpayne@69 16349 }
jpayne@69 16350 }
jpayne@69 16351 __Pyx_AddTraceback("pysam.libcfaidx.FastqFile.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 16352 __Pyx_RefNannyFinishContext();
jpayne@69 16353 return NULL;
jpayne@69 16354 __pyx_L4_argument_unpacking_done:;
jpayne@69 16355 __pyx_r = __pyx_pf_5pysam_9libcfaidx_9FastqFile_2__setstate_cython__(((struct __pyx_obj_5pysam_9libcfaidx_FastqFile *)__pyx_v_self), __pyx_v___pyx_state);
jpayne@69 16356
jpayne@69 16357 /* function exit code */
jpayne@69 16358 {
jpayne@69 16359 Py_ssize_t __pyx_temp;
jpayne@69 16360 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
jpayne@69 16361 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
jpayne@69 16362 }
jpayne@69 16363 }
jpayne@69 16364 __Pyx_RefNannyFinishContext();
jpayne@69 16365 return __pyx_r;
jpayne@69 16366 }
jpayne@69 16367
jpayne@69 16368 static PyObject *__pyx_pf_5pysam_9libcfaidx_9FastqFile_2__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_5pysam_9libcfaidx_FastqFile *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
jpayne@69 16369 PyObject *__pyx_r = NULL;
jpayne@69 16370 __Pyx_TraceDeclarations
jpayne@69 16371 __Pyx_RefNannyDeclarations
jpayne@69 16372 int __pyx_lineno = 0;
jpayne@69 16373 const char *__pyx_filename = NULL;
jpayne@69 16374 int __pyx_clineno = 0;
jpayne@69 16375 __Pyx_TraceFrameInit(__pyx_codeobj__42)
jpayne@69 16376 __Pyx_RefNannySetupContext("__setstate_cython__", 1);
jpayne@69 16377 __Pyx_TraceCall("__setstate_cython__", __pyx_f[1], 3, 0, __PYX_ERR(1, 3, __pyx_L1_error));
jpayne@69 16378
jpayne@69 16379 /* "(tree fragment)":4
jpayne@69 16380 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
jpayne@69 16381 * def __setstate_cython__(self, __pyx_state):
jpayne@69 16382 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" # <<<<<<<<<<<<<<
jpayne@69 16383 */
jpayne@69 16384 __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_no_default___reduce___due_to_non, 0, 0);
jpayne@69 16385 __PYX_ERR(1, 4, __pyx_L1_error)
jpayne@69 16386
jpayne@69 16387 /* "(tree fragment)":3
jpayne@69 16388 * def __reduce_cython__(self):
jpayne@69 16389 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
jpayne@69 16390 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
jpayne@69 16391 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
jpayne@69 16392 */
jpayne@69 16393
jpayne@69 16394 /* function exit code */
jpayne@69 16395 __pyx_L1_error:;
jpayne@69 16396 __Pyx_AddTraceback("pysam.libcfaidx.FastqFile.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 16397 __pyx_r = NULL;
jpayne@69 16398 __Pyx_XGIVEREF(__pyx_r);
jpayne@69 16399 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@69 16400 __Pyx_RefNannyFinishContext();
jpayne@69 16401 return __pyx_r;
jpayne@69 16402 }
jpayne@69 16403
jpayne@69 16404 /* "(tree fragment)":1
jpayne@69 16405 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
jpayne@69 16406 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
jpayne@69 16407 * def __setstate_cython__(self, __pyx_state):
jpayne@69 16408 */
jpayne@69 16409
jpayne@69 16410 /* Python wrapper */
jpayne@69 16411 static PyObject *__pyx_pw_5pysam_9libcfaidx_9Fastafile_1__reduce_cython__(PyObject *__pyx_v_self,
jpayne@69 16412 #if CYTHON_METH_FASTCALL
jpayne@69 16413 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@69 16414 #else
jpayne@69 16415 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@69 16416 #endif
jpayne@69 16417 ); /*proto*/
jpayne@69 16418 PyDoc_STRVAR(__pyx_doc_5pysam_9libcfaidx_9Fastafile___reduce_cython__, "Fastafile.__reduce_cython__(self)");
jpayne@69 16419 static PyMethodDef __pyx_mdef_5pysam_9libcfaidx_9Fastafile_1__reduce_cython__ = {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_9libcfaidx_9Fastafile_1__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_9libcfaidx_9Fastafile___reduce_cython__};
jpayne@69 16420 static PyObject *__pyx_pw_5pysam_9libcfaidx_9Fastafile_1__reduce_cython__(PyObject *__pyx_v_self,
jpayne@69 16421 #if CYTHON_METH_FASTCALL
jpayne@69 16422 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@69 16423 #else
jpayne@69 16424 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@69 16425 #endif
jpayne@69 16426 ) {
jpayne@69 16427 #if !CYTHON_METH_FASTCALL
jpayne@69 16428 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
jpayne@69 16429 #endif
jpayne@69 16430 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@69 16431 PyObject *__pyx_r = 0;
jpayne@69 16432 __Pyx_RefNannyDeclarations
jpayne@69 16433 __Pyx_RefNannySetupContext("__reduce_cython__ (wrapper)", 0);
jpayne@69 16434 #if !CYTHON_METH_FASTCALL
jpayne@69 16435 #if CYTHON_ASSUME_SAFE_MACROS
jpayne@69 16436 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
jpayne@69 16437 #else
jpayne@69 16438 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
jpayne@69 16439 #endif
jpayne@69 16440 #endif
jpayne@69 16441 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
jpayne@69 16442 if (unlikely(__pyx_nargs > 0)) {
jpayne@69 16443 __Pyx_RaiseArgtupleInvalid("__reduce_cython__", 1, 0, 0, __pyx_nargs); return NULL;}
jpayne@69 16444 if (unlikely(__pyx_kwds) && __Pyx_NumKwargs_FASTCALL(__pyx_kwds) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__reduce_cython__", 0))) return NULL;
jpayne@69 16445 __pyx_r = __pyx_pf_5pysam_9libcfaidx_9Fastafile___reduce_cython__(((struct __pyx_obj_5pysam_9libcfaidx_Fastafile *)__pyx_v_self));
jpayne@69 16446
jpayne@69 16447 /* function exit code */
jpayne@69 16448 __Pyx_RefNannyFinishContext();
jpayne@69 16449 return __pyx_r;
jpayne@69 16450 }
jpayne@69 16451
jpayne@69 16452 static PyObject *__pyx_pf_5pysam_9libcfaidx_9Fastafile___reduce_cython__(CYTHON_UNUSED struct __pyx_obj_5pysam_9libcfaidx_Fastafile *__pyx_v_self) {
jpayne@69 16453 PyObject *__pyx_r = NULL;
jpayne@69 16454 __Pyx_TraceDeclarations
jpayne@69 16455 __Pyx_RefNannyDeclarations
jpayne@69 16456 int __pyx_lineno = 0;
jpayne@69 16457 const char *__pyx_filename = NULL;
jpayne@69 16458 int __pyx_clineno = 0;
jpayne@69 16459 __Pyx_TraceFrameInit(__pyx_codeobj__43)
jpayne@69 16460 __Pyx_RefNannySetupContext("__reduce_cython__", 1);
jpayne@69 16461 __Pyx_TraceCall("__reduce_cython__", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));
jpayne@69 16462
jpayne@69 16463 /* "(tree fragment)":2
jpayne@69 16464 * def __reduce_cython__(self):
jpayne@69 16465 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" # <<<<<<<<<<<<<<
jpayne@69 16466 * def __setstate_cython__(self, __pyx_state):
jpayne@69 16467 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
jpayne@69 16468 */
jpayne@69 16469 __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_no_default___reduce___due_to_non, 0, 0);
jpayne@69 16470 __PYX_ERR(1, 2, __pyx_L1_error)
jpayne@69 16471
jpayne@69 16472 /* "(tree fragment)":1
jpayne@69 16473 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
jpayne@69 16474 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
jpayne@69 16475 * def __setstate_cython__(self, __pyx_state):
jpayne@69 16476 */
jpayne@69 16477
jpayne@69 16478 /* function exit code */
jpayne@69 16479 __pyx_L1_error:;
jpayne@69 16480 __Pyx_AddTraceback("pysam.libcfaidx.Fastafile.__reduce_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 16481 __pyx_r = NULL;
jpayne@69 16482 __Pyx_XGIVEREF(__pyx_r);
jpayne@69 16483 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@69 16484 __Pyx_RefNannyFinishContext();
jpayne@69 16485 return __pyx_r;
jpayne@69 16486 }
jpayne@69 16487
jpayne@69 16488 /* "(tree fragment)":3
jpayne@69 16489 * def __reduce_cython__(self):
jpayne@69 16490 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
jpayne@69 16491 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
jpayne@69 16492 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
jpayne@69 16493 */
jpayne@69 16494
jpayne@69 16495 /* Python wrapper */
jpayne@69 16496 static PyObject *__pyx_pw_5pysam_9libcfaidx_9Fastafile_3__setstate_cython__(PyObject *__pyx_v_self,
jpayne@69 16497 #if CYTHON_METH_FASTCALL
jpayne@69 16498 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@69 16499 #else
jpayne@69 16500 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@69 16501 #endif
jpayne@69 16502 ); /*proto*/
jpayne@69 16503 PyDoc_STRVAR(__pyx_doc_5pysam_9libcfaidx_9Fastafile_2__setstate_cython__, "Fastafile.__setstate_cython__(self, __pyx_state)");
jpayne@69 16504 static PyMethodDef __pyx_mdef_5pysam_9libcfaidx_9Fastafile_3__setstate_cython__ = {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_9libcfaidx_9Fastafile_3__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_9libcfaidx_9Fastafile_2__setstate_cython__};
jpayne@69 16505 static PyObject *__pyx_pw_5pysam_9libcfaidx_9Fastafile_3__setstate_cython__(PyObject *__pyx_v_self,
jpayne@69 16506 #if CYTHON_METH_FASTCALL
jpayne@69 16507 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@69 16508 #else
jpayne@69 16509 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@69 16510 #endif
jpayne@69 16511 ) {
jpayne@69 16512 CYTHON_UNUSED PyObject *__pyx_v___pyx_state = 0;
jpayne@69 16513 #if !CYTHON_METH_FASTCALL
jpayne@69 16514 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
jpayne@69 16515 #endif
jpayne@69 16516 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@69 16517 PyObject* values[1] = {0};
jpayne@69 16518 int __pyx_lineno = 0;
jpayne@69 16519 const char *__pyx_filename = NULL;
jpayne@69 16520 int __pyx_clineno = 0;
jpayne@69 16521 PyObject *__pyx_r = 0;
jpayne@69 16522 __Pyx_RefNannyDeclarations
jpayne@69 16523 __Pyx_RefNannySetupContext("__setstate_cython__ (wrapper)", 0);
jpayne@69 16524 #if !CYTHON_METH_FASTCALL
jpayne@69 16525 #if CYTHON_ASSUME_SAFE_MACROS
jpayne@69 16526 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
jpayne@69 16527 #else
jpayne@69 16528 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
jpayne@69 16529 #endif
jpayne@69 16530 #endif
jpayne@69 16531 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
jpayne@69 16532 {
jpayne@69 16533 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_state,0};
jpayne@69 16534 if (__pyx_kwds) {
jpayne@69 16535 Py_ssize_t kw_args;
jpayne@69 16536 switch (__pyx_nargs) {
jpayne@69 16537 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
jpayne@69 16538 CYTHON_FALLTHROUGH;
jpayne@69 16539 case 0: break;
jpayne@69 16540 default: goto __pyx_L5_argtuple_error;
jpayne@69 16541 }
jpayne@69 16542 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
jpayne@69 16543 switch (__pyx_nargs) {
jpayne@69 16544 case 0:
jpayne@69 16545 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) {
jpayne@69 16546 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
jpayne@69 16547 kw_args--;
jpayne@69 16548 }
jpayne@69 16549 else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 3, __pyx_L3_error)
jpayne@69 16550 else goto __pyx_L5_argtuple_error;
jpayne@69 16551 }
jpayne@69 16552 if (unlikely(kw_args > 0)) {
jpayne@69 16553 const Py_ssize_t kwd_pos_args = __pyx_nargs;
jpayne@69 16554 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__setstate_cython__") < 0)) __PYX_ERR(1, 3, __pyx_L3_error)
jpayne@69 16555 }
jpayne@69 16556 } else if (unlikely(__pyx_nargs != 1)) {
jpayne@69 16557 goto __pyx_L5_argtuple_error;
jpayne@69 16558 } else {
jpayne@69 16559 values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
jpayne@69 16560 }
jpayne@69 16561 __pyx_v___pyx_state = values[0];
jpayne@69 16562 }
jpayne@69 16563 goto __pyx_L6_skip;
jpayne@69 16564 __pyx_L5_argtuple_error:;
jpayne@69 16565 __Pyx_RaiseArgtupleInvalid("__setstate_cython__", 1, 1, 1, __pyx_nargs); __PYX_ERR(1, 3, __pyx_L3_error)
jpayne@69 16566 __pyx_L6_skip:;
jpayne@69 16567 goto __pyx_L4_argument_unpacking_done;
jpayne@69 16568 __pyx_L3_error:;
jpayne@69 16569 {
jpayne@69 16570 Py_ssize_t __pyx_temp;
jpayne@69 16571 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
jpayne@69 16572 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
jpayne@69 16573 }
jpayne@69 16574 }
jpayne@69 16575 __Pyx_AddTraceback("pysam.libcfaidx.Fastafile.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 16576 __Pyx_RefNannyFinishContext();
jpayne@69 16577 return NULL;
jpayne@69 16578 __pyx_L4_argument_unpacking_done:;
jpayne@69 16579 __pyx_r = __pyx_pf_5pysam_9libcfaidx_9Fastafile_2__setstate_cython__(((struct __pyx_obj_5pysam_9libcfaidx_Fastafile *)__pyx_v_self), __pyx_v___pyx_state);
jpayne@69 16580
jpayne@69 16581 /* function exit code */
jpayne@69 16582 {
jpayne@69 16583 Py_ssize_t __pyx_temp;
jpayne@69 16584 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
jpayne@69 16585 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
jpayne@69 16586 }
jpayne@69 16587 }
jpayne@69 16588 __Pyx_RefNannyFinishContext();
jpayne@69 16589 return __pyx_r;
jpayne@69 16590 }
jpayne@69 16591
jpayne@69 16592 static PyObject *__pyx_pf_5pysam_9libcfaidx_9Fastafile_2__setstate_cython__(CYTHON_UNUSED struct __pyx_obj_5pysam_9libcfaidx_Fastafile *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v___pyx_state) {
jpayne@69 16593 PyObject *__pyx_r = NULL;
jpayne@69 16594 __Pyx_TraceDeclarations
jpayne@69 16595 __Pyx_RefNannyDeclarations
jpayne@69 16596 int __pyx_lineno = 0;
jpayne@69 16597 const char *__pyx_filename = NULL;
jpayne@69 16598 int __pyx_clineno = 0;
jpayne@69 16599 __Pyx_TraceFrameInit(__pyx_codeobj__44)
jpayne@69 16600 __Pyx_RefNannySetupContext("__setstate_cython__", 1);
jpayne@69 16601 __Pyx_TraceCall("__setstate_cython__", __pyx_f[1], 3, 0, __PYX_ERR(1, 3, __pyx_L1_error));
jpayne@69 16602
jpayne@69 16603 /* "(tree fragment)":4
jpayne@69 16604 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
jpayne@69 16605 * def __setstate_cython__(self, __pyx_state):
jpayne@69 16606 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__" # <<<<<<<<<<<<<<
jpayne@69 16607 */
jpayne@69 16608 __Pyx_Raise(__pyx_builtin_TypeError, __pyx_kp_s_no_default___reduce___due_to_non, 0, 0);
jpayne@69 16609 __PYX_ERR(1, 4, __pyx_L1_error)
jpayne@69 16610
jpayne@69 16611 /* "(tree fragment)":3
jpayne@69 16612 * def __reduce_cython__(self):
jpayne@69 16613 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
jpayne@69 16614 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
jpayne@69 16615 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
jpayne@69 16616 */
jpayne@69 16617
jpayne@69 16618 /* function exit code */
jpayne@69 16619 __pyx_L1_error:;
jpayne@69 16620 __Pyx_AddTraceback("pysam.libcfaidx.Fastafile.__setstate_cython__", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 16621 __pyx_r = NULL;
jpayne@69 16622 __Pyx_XGIVEREF(__pyx_r);
jpayne@69 16623 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@69 16624 __Pyx_RefNannyFinishContext();
jpayne@69 16625 return __pyx_r;
jpayne@69 16626 }
jpayne@69 16627
jpayne@69 16628 /* "(tree fragment)":1
jpayne@69 16629 * def __pyx_unpickle_FastxRecord(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
jpayne@69 16630 * cdef object __pyx_PickleError
jpayne@69 16631 * cdef object __pyx_result
jpayne@69 16632 */
jpayne@69 16633
jpayne@69 16634 /* Python wrapper */
jpayne@69 16635 static PyObject *__pyx_pw_5pysam_9libcfaidx_1__pyx_unpickle_FastxRecord(PyObject *__pyx_self,
jpayne@69 16636 #if CYTHON_METH_FASTCALL
jpayne@69 16637 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@69 16638 #else
jpayne@69 16639 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@69 16640 #endif
jpayne@69 16641 ); /*proto*/
jpayne@69 16642 PyDoc_STRVAR(__pyx_doc_5pysam_9libcfaidx___pyx_unpickle_FastxRecord, "__pyx_unpickle_FastxRecord(__pyx_type, long __pyx_checksum, __pyx_state)");
jpayne@69 16643 static PyMethodDef __pyx_mdef_5pysam_9libcfaidx_1__pyx_unpickle_FastxRecord = {"__pyx_unpickle_FastxRecord", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_9libcfaidx_1__pyx_unpickle_FastxRecord, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_9libcfaidx___pyx_unpickle_FastxRecord};
jpayne@69 16644 static PyObject *__pyx_pw_5pysam_9libcfaidx_1__pyx_unpickle_FastxRecord(PyObject *__pyx_self,
jpayne@69 16645 #if CYTHON_METH_FASTCALL
jpayne@69 16646 PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
jpayne@69 16647 #else
jpayne@69 16648 PyObject *__pyx_args, PyObject *__pyx_kwds
jpayne@69 16649 #endif
jpayne@69 16650 ) {
jpayne@69 16651 PyObject *__pyx_v___pyx_type = 0;
jpayne@69 16652 long __pyx_v___pyx_checksum;
jpayne@69 16653 PyObject *__pyx_v___pyx_state = 0;
jpayne@69 16654 #if !CYTHON_METH_FASTCALL
jpayne@69 16655 CYTHON_UNUSED Py_ssize_t __pyx_nargs;
jpayne@69 16656 #endif
jpayne@69 16657 CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
jpayne@69 16658 PyObject* values[3] = {0,0,0};
jpayne@69 16659 int __pyx_lineno = 0;
jpayne@69 16660 const char *__pyx_filename = NULL;
jpayne@69 16661 int __pyx_clineno = 0;
jpayne@69 16662 PyObject *__pyx_r = 0;
jpayne@69 16663 __Pyx_RefNannyDeclarations
jpayne@69 16664 __Pyx_RefNannySetupContext("__pyx_unpickle_FastxRecord (wrapper)", 0);
jpayne@69 16665 #if !CYTHON_METH_FASTCALL
jpayne@69 16666 #if CYTHON_ASSUME_SAFE_MACROS
jpayne@69 16667 __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
jpayne@69 16668 #else
jpayne@69 16669 __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
jpayne@69 16670 #endif
jpayne@69 16671 #endif
jpayne@69 16672 __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
jpayne@69 16673 {
jpayne@69 16674 PyObject **__pyx_pyargnames[] = {&__pyx_n_s_pyx_type,&__pyx_n_s_pyx_checksum,&__pyx_n_s_pyx_state,0};
jpayne@69 16675 if (__pyx_kwds) {
jpayne@69 16676 Py_ssize_t kw_args;
jpayne@69 16677 switch (__pyx_nargs) {
jpayne@69 16678 case 3: values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
jpayne@69 16679 CYTHON_FALLTHROUGH;
jpayne@69 16680 case 2: values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
jpayne@69 16681 CYTHON_FALLTHROUGH;
jpayne@69 16682 case 1: values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
jpayne@69 16683 CYTHON_FALLTHROUGH;
jpayne@69 16684 case 0: break;
jpayne@69 16685 default: goto __pyx_L5_argtuple_error;
jpayne@69 16686 }
jpayne@69 16687 kw_args = __Pyx_NumKwargs_FASTCALL(__pyx_kwds);
jpayne@69 16688 switch (__pyx_nargs) {
jpayne@69 16689 case 0:
jpayne@69 16690 if (likely((values[0] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_type)) != 0)) {
jpayne@69 16691 (void)__Pyx_Arg_NewRef_FASTCALL(values[0]);
jpayne@69 16692 kw_args--;
jpayne@69 16693 }
jpayne@69 16694 else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
jpayne@69 16695 else goto __pyx_L5_argtuple_error;
jpayne@69 16696 CYTHON_FALLTHROUGH;
jpayne@69 16697 case 1:
jpayne@69 16698 if (likely((values[1] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_checksum)) != 0)) {
jpayne@69 16699 (void)__Pyx_Arg_NewRef_FASTCALL(values[1]);
jpayne@69 16700 kw_args--;
jpayne@69 16701 }
jpayne@69 16702 else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
jpayne@69 16703 else {
jpayne@69 16704 __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_FastxRecord", 1, 3, 3, 1); __PYX_ERR(1, 1, __pyx_L3_error)
jpayne@69 16705 }
jpayne@69 16706 CYTHON_FALLTHROUGH;
jpayne@69 16707 case 2:
jpayne@69 16708 if (likely((values[2] = __Pyx_GetKwValue_FASTCALL(__pyx_kwds, __pyx_kwvalues, __pyx_n_s_pyx_state)) != 0)) {
jpayne@69 16709 (void)__Pyx_Arg_NewRef_FASTCALL(values[2]);
jpayne@69 16710 kw_args--;
jpayne@69 16711 }
jpayne@69 16712 else if (unlikely(PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
jpayne@69 16713 else {
jpayne@69 16714 __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_FastxRecord", 1, 3, 3, 2); __PYX_ERR(1, 1, __pyx_L3_error)
jpayne@69 16715 }
jpayne@69 16716 }
jpayne@69 16717 if (unlikely(kw_args > 0)) {
jpayne@69 16718 const Py_ssize_t kwd_pos_args = __pyx_nargs;
jpayne@69 16719 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values + 0, kwd_pos_args, "__pyx_unpickle_FastxRecord") < 0)) __PYX_ERR(1, 1, __pyx_L3_error)
jpayne@69 16720 }
jpayne@69 16721 } else if (unlikely(__pyx_nargs != 3)) {
jpayne@69 16722 goto __pyx_L5_argtuple_error;
jpayne@69 16723 } else {
jpayne@69 16724 values[0] = __Pyx_Arg_FASTCALL(__pyx_args, 0);
jpayne@69 16725 values[1] = __Pyx_Arg_FASTCALL(__pyx_args, 1);
jpayne@69 16726 values[2] = __Pyx_Arg_FASTCALL(__pyx_args, 2);
jpayne@69 16727 }
jpayne@69 16728 __pyx_v___pyx_type = values[0];
jpayne@69 16729 __pyx_v___pyx_checksum = __Pyx_PyInt_As_long(values[1]); if (unlikely((__pyx_v___pyx_checksum == (long)-1) && PyErr_Occurred())) __PYX_ERR(1, 1, __pyx_L3_error)
jpayne@69 16730 __pyx_v___pyx_state = values[2];
jpayne@69 16731 }
jpayne@69 16732 goto __pyx_L6_skip;
jpayne@69 16733 __pyx_L5_argtuple_error:;
jpayne@69 16734 __Pyx_RaiseArgtupleInvalid("__pyx_unpickle_FastxRecord", 1, 3, 3, __pyx_nargs); __PYX_ERR(1, 1, __pyx_L3_error)
jpayne@69 16735 __pyx_L6_skip:;
jpayne@69 16736 goto __pyx_L4_argument_unpacking_done;
jpayne@69 16737 __pyx_L3_error:;
jpayne@69 16738 {
jpayne@69 16739 Py_ssize_t __pyx_temp;
jpayne@69 16740 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
jpayne@69 16741 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
jpayne@69 16742 }
jpayne@69 16743 }
jpayne@69 16744 __Pyx_AddTraceback("pysam.libcfaidx.__pyx_unpickle_FastxRecord", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 16745 __Pyx_RefNannyFinishContext();
jpayne@69 16746 return NULL;
jpayne@69 16747 __pyx_L4_argument_unpacking_done:;
jpayne@69 16748 __pyx_r = __pyx_pf_5pysam_9libcfaidx___pyx_unpickle_FastxRecord(__pyx_self, __pyx_v___pyx_type, __pyx_v___pyx_checksum, __pyx_v___pyx_state);
jpayne@69 16749
jpayne@69 16750 /* function exit code */
jpayne@69 16751 {
jpayne@69 16752 Py_ssize_t __pyx_temp;
jpayne@69 16753 for (__pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
jpayne@69 16754 __Pyx_Arg_XDECREF_FASTCALL(values[__pyx_temp]);
jpayne@69 16755 }
jpayne@69 16756 }
jpayne@69 16757 __Pyx_RefNannyFinishContext();
jpayne@69 16758 return __pyx_r;
jpayne@69 16759 }
jpayne@69 16760
jpayne@69 16761 static PyObject *__pyx_pf_5pysam_9libcfaidx___pyx_unpickle_FastxRecord(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v___pyx_type, long __pyx_v___pyx_checksum, PyObject *__pyx_v___pyx_state) {
jpayne@69 16762 PyObject *__pyx_v___pyx_PickleError = 0;
jpayne@69 16763 PyObject *__pyx_v___pyx_result = 0;
jpayne@69 16764 PyObject *__pyx_r = NULL;
jpayne@69 16765 __Pyx_TraceDeclarations
jpayne@69 16766 __Pyx_RefNannyDeclarations
jpayne@69 16767 PyObject *__pyx_t_1 = NULL;
jpayne@69 16768 int __pyx_t_2;
jpayne@69 16769 PyObject *__pyx_t_3 = NULL;
jpayne@69 16770 PyObject *__pyx_t_4 = NULL;
jpayne@69 16771 unsigned int __pyx_t_5;
jpayne@69 16772 int __pyx_lineno = 0;
jpayne@69 16773 const char *__pyx_filename = NULL;
jpayne@69 16774 int __pyx_clineno = 0;
jpayne@69 16775 __Pyx_TraceFrameInit(__pyx_codeobj__45)
jpayne@69 16776 __Pyx_RefNannySetupContext("__pyx_unpickle_FastxRecord", 1);
jpayne@69 16777 __Pyx_TraceCall("__pyx_unpickle_FastxRecord", __pyx_f[1], 1, 0, __PYX_ERR(1, 1, __pyx_L1_error));
jpayne@69 16778
jpayne@69 16779 /* "(tree fragment)":4
jpayne@69 16780 * cdef object __pyx_PickleError
jpayne@69 16781 * cdef object __pyx_result
jpayne@69 16782 * if __pyx_checksum not in (0x1bdb611, 0xb688a86, 0x43fd151): # <<<<<<<<<<<<<<
jpayne@69 16783 * from pickle import PickleError as __pyx_PickleError
jpayne@69 16784 * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x1bdb611, 0xb688a86, 0x43fd151) = (comment, name, quality, sequence))" % __pyx_checksum
jpayne@69 16785 */
jpayne@69 16786 __pyx_t_1 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 4, __pyx_L1_error)
jpayne@69 16787 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 16788 __pyx_t_2 = (__Pyx_PySequence_ContainsTF(__pyx_t_1, __pyx_tuple__46, Py_NE)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(1, 4, __pyx_L1_error)
jpayne@69 16789 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@69 16790 if (__pyx_t_2) {
jpayne@69 16791
jpayne@69 16792 /* "(tree fragment)":5
jpayne@69 16793 * cdef object __pyx_result
jpayne@69 16794 * if __pyx_checksum not in (0x1bdb611, 0xb688a86, 0x43fd151):
jpayne@69 16795 * from pickle import PickleError as __pyx_PickleError # <<<<<<<<<<<<<<
jpayne@69 16796 * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x1bdb611, 0xb688a86, 0x43fd151) = (comment, name, quality, sequence))" % __pyx_checksum
jpayne@69 16797 * __pyx_result = FastxRecord.__new__(__pyx_type)
jpayne@69 16798 */
jpayne@69 16799 __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
jpayne@69 16800 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 16801 __Pyx_INCREF(__pyx_n_s_PickleError);
jpayne@69 16802 __Pyx_GIVEREF(__pyx_n_s_PickleError);
jpayne@69 16803 if (__Pyx_PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_PickleError)) __PYX_ERR(1, 5, __pyx_L1_error);
jpayne@69 16804 __pyx_t_3 = __Pyx_Import(__pyx_n_s_pickle, __pyx_t_1, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 5, __pyx_L1_error)
jpayne@69 16805 __Pyx_GOTREF(__pyx_t_3);
jpayne@69 16806 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@69 16807 __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_3, __pyx_n_s_PickleError); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 5, __pyx_L1_error)
jpayne@69 16808 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 16809 __Pyx_INCREF(__pyx_t_1);
jpayne@69 16810 __pyx_v___pyx_PickleError = __pyx_t_1;
jpayne@69 16811 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@69 16812 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
jpayne@69 16813
jpayne@69 16814 /* "(tree fragment)":6
jpayne@69 16815 * if __pyx_checksum not in (0x1bdb611, 0xb688a86, 0x43fd151):
jpayne@69 16816 * from pickle import PickleError as __pyx_PickleError
jpayne@69 16817 * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x1bdb611, 0xb688a86, 0x43fd151) = (comment, name, quality, sequence))" % __pyx_checksum # <<<<<<<<<<<<<<
jpayne@69 16818 * __pyx_result = FastxRecord.__new__(__pyx_type)
jpayne@69 16819 * if __pyx_state is not None:
jpayne@69 16820 */
jpayne@69 16821 __pyx_t_3 = __Pyx_PyInt_From_long(__pyx_v___pyx_checksum); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 6, __pyx_L1_error)
jpayne@69 16822 __Pyx_GOTREF(__pyx_t_3);
jpayne@69 16823 __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_Incompatible_checksums_0x_x_vs_0, __pyx_t_3); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 6, __pyx_L1_error)
jpayne@69 16824 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 16825 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
jpayne@69 16826 __Pyx_Raise(__pyx_v___pyx_PickleError, __pyx_t_1, 0, 0);
jpayne@69 16827 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@69 16828 __PYX_ERR(1, 6, __pyx_L1_error)
jpayne@69 16829
jpayne@69 16830 /* "(tree fragment)":4
jpayne@69 16831 * cdef object __pyx_PickleError
jpayne@69 16832 * cdef object __pyx_result
jpayne@69 16833 * if __pyx_checksum not in (0x1bdb611, 0xb688a86, 0x43fd151): # <<<<<<<<<<<<<<
jpayne@69 16834 * from pickle import PickleError as __pyx_PickleError
jpayne@69 16835 * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x1bdb611, 0xb688a86, 0x43fd151) = (comment, name, quality, sequence))" % __pyx_checksum
jpayne@69 16836 */
jpayne@69 16837 }
jpayne@69 16838
jpayne@69 16839 /* "(tree fragment)":7
jpayne@69 16840 * from pickle import PickleError as __pyx_PickleError
jpayne@69 16841 * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x1bdb611, 0xb688a86, 0x43fd151) = (comment, name, quality, sequence))" % __pyx_checksum
jpayne@69 16842 * __pyx_result = FastxRecord.__new__(__pyx_type) # <<<<<<<<<<<<<<
jpayne@69 16843 * if __pyx_state is not None:
jpayne@69 16844 * __pyx_unpickle_FastxRecord__set_state(<FastxRecord> __pyx_result, __pyx_state)
jpayne@69 16845 */
jpayne@69 16846 __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_ptype_5pysam_9libcfaidx_FastxRecord), __pyx_n_s_new); if (unlikely(!__pyx_t_3)) __PYX_ERR(1, 7, __pyx_L1_error)
jpayne@69 16847 __Pyx_GOTREF(__pyx_t_3);
jpayne@69 16848 __pyx_t_4 = NULL;
jpayne@69 16849 __pyx_t_5 = 0;
jpayne@69 16850 #if CYTHON_UNPACK_METHODS
jpayne@69 16851 if (likely(PyMethod_Check(__pyx_t_3))) {
jpayne@69 16852 __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
jpayne@69 16853 if (likely(__pyx_t_4)) {
jpayne@69 16854 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
jpayne@69 16855 __Pyx_INCREF(__pyx_t_4);
jpayne@69 16856 __Pyx_INCREF(function);
jpayne@69 16857 __Pyx_DECREF_SET(__pyx_t_3, function);
jpayne@69 16858 __pyx_t_5 = 1;
jpayne@69 16859 }
jpayne@69 16860 }
jpayne@69 16861 #endif
jpayne@69 16862 {
jpayne@69 16863 PyObject *__pyx_callargs[2] = {__pyx_t_4, __pyx_v___pyx_type};
jpayne@69 16864 __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+1-__pyx_t_5, 1+__pyx_t_5);
jpayne@69 16865 __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
jpayne@69 16866 if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 7, __pyx_L1_error)
jpayne@69 16867 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 16868 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
jpayne@69 16869 }
jpayne@69 16870 __pyx_v___pyx_result = __pyx_t_1;
jpayne@69 16871 __pyx_t_1 = 0;
jpayne@69 16872
jpayne@69 16873 /* "(tree fragment)":8
jpayne@69 16874 * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x1bdb611, 0xb688a86, 0x43fd151) = (comment, name, quality, sequence))" % __pyx_checksum
jpayne@69 16875 * __pyx_result = FastxRecord.__new__(__pyx_type)
jpayne@69 16876 * if __pyx_state is not None: # <<<<<<<<<<<<<<
jpayne@69 16877 * __pyx_unpickle_FastxRecord__set_state(<FastxRecord> __pyx_result, __pyx_state)
jpayne@69 16878 * return __pyx_result
jpayne@69 16879 */
jpayne@69 16880 __pyx_t_2 = (__pyx_v___pyx_state != Py_None);
jpayne@69 16881 if (__pyx_t_2) {
jpayne@69 16882
jpayne@69 16883 /* "(tree fragment)":9
jpayne@69 16884 * __pyx_result = FastxRecord.__new__(__pyx_type)
jpayne@69 16885 * if __pyx_state is not None:
jpayne@69 16886 * __pyx_unpickle_FastxRecord__set_state(<FastxRecord> __pyx_result, __pyx_state) # <<<<<<<<<<<<<<
jpayne@69 16887 * return __pyx_result
jpayne@69 16888 * cdef __pyx_unpickle_FastxRecord__set_state(FastxRecord __pyx_result, tuple __pyx_state):
jpayne@69 16889 */
jpayne@69 16890 if (!(likely(PyTuple_CheckExact(__pyx_v___pyx_state))||((__pyx_v___pyx_state) == Py_None) || __Pyx_RaiseUnexpectedTypeError("tuple", __pyx_v___pyx_state))) __PYX_ERR(1, 9, __pyx_L1_error)
jpayne@69 16891 __pyx_t_1 = __pyx_f_5pysam_9libcfaidx___pyx_unpickle_FastxRecord__set_state(((struct __pyx_obj_5pysam_9libcfaidx_FastxRecord *)__pyx_v___pyx_result), ((PyObject*)__pyx_v___pyx_state)); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 9, __pyx_L1_error)
jpayne@69 16892 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 16893 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@69 16894
jpayne@69 16895 /* "(tree fragment)":8
jpayne@69 16896 * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x1bdb611, 0xb688a86, 0x43fd151) = (comment, name, quality, sequence))" % __pyx_checksum
jpayne@69 16897 * __pyx_result = FastxRecord.__new__(__pyx_type)
jpayne@69 16898 * if __pyx_state is not None: # <<<<<<<<<<<<<<
jpayne@69 16899 * __pyx_unpickle_FastxRecord__set_state(<FastxRecord> __pyx_result, __pyx_state)
jpayne@69 16900 * return __pyx_result
jpayne@69 16901 */
jpayne@69 16902 }
jpayne@69 16903
jpayne@69 16904 /* "(tree fragment)":10
jpayne@69 16905 * if __pyx_state is not None:
jpayne@69 16906 * __pyx_unpickle_FastxRecord__set_state(<FastxRecord> __pyx_result, __pyx_state)
jpayne@69 16907 * return __pyx_result # <<<<<<<<<<<<<<
jpayne@69 16908 * cdef __pyx_unpickle_FastxRecord__set_state(FastxRecord __pyx_result, tuple __pyx_state):
jpayne@69 16909 * __pyx_result.comment = __pyx_state[0]; __pyx_result.name = __pyx_state[1]; __pyx_result.quality = __pyx_state[2]; __pyx_result.sequence = __pyx_state[3]
jpayne@69 16910 */
jpayne@69 16911 __Pyx_XDECREF(__pyx_r);
jpayne@69 16912 __Pyx_INCREF(__pyx_v___pyx_result);
jpayne@69 16913 __pyx_r = __pyx_v___pyx_result;
jpayne@69 16914 goto __pyx_L0;
jpayne@69 16915
jpayne@69 16916 /* "(tree fragment)":1
jpayne@69 16917 * def __pyx_unpickle_FastxRecord(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
jpayne@69 16918 * cdef object __pyx_PickleError
jpayne@69 16919 * cdef object __pyx_result
jpayne@69 16920 */
jpayne@69 16921
jpayne@69 16922 /* function exit code */
jpayne@69 16923 __pyx_L1_error:;
jpayne@69 16924 __Pyx_XDECREF(__pyx_t_1);
jpayne@69 16925 __Pyx_XDECREF(__pyx_t_3);
jpayne@69 16926 __Pyx_XDECREF(__pyx_t_4);
jpayne@69 16927 __Pyx_AddTraceback("pysam.libcfaidx.__pyx_unpickle_FastxRecord", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 16928 __pyx_r = NULL;
jpayne@69 16929 __pyx_L0:;
jpayne@69 16930 __Pyx_XDECREF(__pyx_v___pyx_PickleError);
jpayne@69 16931 __Pyx_XDECREF(__pyx_v___pyx_result);
jpayne@69 16932 __Pyx_XGIVEREF(__pyx_r);
jpayne@69 16933 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@69 16934 __Pyx_RefNannyFinishContext();
jpayne@69 16935 return __pyx_r;
jpayne@69 16936 }
jpayne@69 16937
jpayne@69 16938 /* "(tree fragment)":11
jpayne@69 16939 * __pyx_unpickle_FastxRecord__set_state(<FastxRecord> __pyx_result, __pyx_state)
jpayne@69 16940 * return __pyx_result
jpayne@69 16941 * cdef __pyx_unpickle_FastxRecord__set_state(FastxRecord __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
jpayne@69 16942 * __pyx_result.comment = __pyx_state[0]; __pyx_result.name = __pyx_state[1]; __pyx_result.quality = __pyx_state[2]; __pyx_result.sequence = __pyx_state[3]
jpayne@69 16943 * if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'):
jpayne@69 16944 */
jpayne@69 16945
jpayne@69 16946 static PyObject *__pyx_f_5pysam_9libcfaidx___pyx_unpickle_FastxRecord__set_state(struct __pyx_obj_5pysam_9libcfaidx_FastxRecord *__pyx_v___pyx_result, PyObject *__pyx_v___pyx_state) {
jpayne@69 16947 PyObject *__pyx_r = NULL;
jpayne@69 16948 __Pyx_TraceDeclarations
jpayne@69 16949 __Pyx_RefNannyDeclarations
jpayne@69 16950 PyObject *__pyx_t_1 = NULL;
jpayne@69 16951 int __pyx_t_2;
jpayne@69 16952 Py_ssize_t __pyx_t_3;
jpayne@69 16953 int __pyx_t_4;
jpayne@69 16954 PyObject *__pyx_t_5 = NULL;
jpayne@69 16955 PyObject *__pyx_t_6 = NULL;
jpayne@69 16956 PyObject *__pyx_t_7 = NULL;
jpayne@69 16957 unsigned int __pyx_t_8;
jpayne@69 16958 int __pyx_lineno = 0;
jpayne@69 16959 const char *__pyx_filename = NULL;
jpayne@69 16960 int __pyx_clineno = 0;
jpayne@69 16961 __Pyx_RefNannySetupContext("__pyx_unpickle_FastxRecord__set_state", 1);
jpayne@69 16962 __Pyx_TraceCall("__pyx_unpickle_FastxRecord__set_state", __pyx_f[1], 11, 0, __PYX_ERR(1, 11, __pyx_L1_error));
jpayne@69 16963
jpayne@69 16964 /* "(tree fragment)":12
jpayne@69 16965 * return __pyx_result
jpayne@69 16966 * cdef __pyx_unpickle_FastxRecord__set_state(FastxRecord __pyx_result, tuple __pyx_state):
jpayne@69 16967 * __pyx_result.comment = __pyx_state[0]; __pyx_result.name = __pyx_state[1]; __pyx_result.quality = __pyx_state[2]; __pyx_result.sequence = __pyx_state[3] # <<<<<<<<<<<<<<
jpayne@69 16968 * if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'):
jpayne@69 16969 * __pyx_result.__dict__.update(__pyx_state[4])
jpayne@69 16970 */
jpayne@69 16971 if (unlikely(__pyx_v___pyx_state == Py_None)) {
jpayne@69 16972 PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
jpayne@69 16973 __PYX_ERR(1, 12, __pyx_L1_error)
jpayne@69 16974 }
jpayne@69 16975 __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
jpayne@69 16976 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 16977 if (!(likely(PyUnicode_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("unicode", __pyx_t_1))) __PYX_ERR(1, 12, __pyx_L1_error)
jpayne@69 16978 __Pyx_GIVEREF(__pyx_t_1);
jpayne@69 16979 __Pyx_GOTREF(__pyx_v___pyx_result->comment);
jpayne@69 16980 __Pyx_DECREF(__pyx_v___pyx_result->comment);
jpayne@69 16981 __pyx_v___pyx_result->comment = ((PyObject*)__pyx_t_1);
jpayne@69 16982 __pyx_t_1 = 0;
jpayne@69 16983 if (unlikely(__pyx_v___pyx_state == Py_None)) {
jpayne@69 16984 PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
jpayne@69 16985 __PYX_ERR(1, 12, __pyx_L1_error)
jpayne@69 16986 }
jpayne@69 16987 __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 1, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
jpayne@69 16988 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 16989 if (!(likely(PyUnicode_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("unicode", __pyx_t_1))) __PYX_ERR(1, 12, __pyx_L1_error)
jpayne@69 16990 __Pyx_GIVEREF(__pyx_t_1);
jpayne@69 16991 __Pyx_GOTREF(__pyx_v___pyx_result->name);
jpayne@69 16992 __Pyx_DECREF(__pyx_v___pyx_result->name);
jpayne@69 16993 __pyx_v___pyx_result->name = ((PyObject*)__pyx_t_1);
jpayne@69 16994 __pyx_t_1 = 0;
jpayne@69 16995 if (unlikely(__pyx_v___pyx_state == Py_None)) {
jpayne@69 16996 PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
jpayne@69 16997 __PYX_ERR(1, 12, __pyx_L1_error)
jpayne@69 16998 }
jpayne@69 16999 __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
jpayne@69 17000 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 17001 if (!(likely(PyUnicode_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("unicode", __pyx_t_1))) __PYX_ERR(1, 12, __pyx_L1_error)
jpayne@69 17002 __Pyx_GIVEREF(__pyx_t_1);
jpayne@69 17003 __Pyx_GOTREF(__pyx_v___pyx_result->quality);
jpayne@69 17004 __Pyx_DECREF(__pyx_v___pyx_result->quality);
jpayne@69 17005 __pyx_v___pyx_result->quality = ((PyObject*)__pyx_t_1);
jpayne@69 17006 __pyx_t_1 = 0;
jpayne@69 17007 if (unlikely(__pyx_v___pyx_state == Py_None)) {
jpayne@69 17008 PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
jpayne@69 17009 __PYX_ERR(1, 12, __pyx_L1_error)
jpayne@69 17010 }
jpayne@69 17011 __pyx_t_1 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 3, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 12, __pyx_L1_error)
jpayne@69 17012 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 17013 if (!(likely(PyUnicode_CheckExact(__pyx_t_1))||((__pyx_t_1) == Py_None) || __Pyx_RaiseUnexpectedTypeError("unicode", __pyx_t_1))) __PYX_ERR(1, 12, __pyx_L1_error)
jpayne@69 17014 __Pyx_GIVEREF(__pyx_t_1);
jpayne@69 17015 __Pyx_GOTREF(__pyx_v___pyx_result->sequence);
jpayne@69 17016 __Pyx_DECREF(__pyx_v___pyx_result->sequence);
jpayne@69 17017 __pyx_v___pyx_result->sequence = ((PyObject*)__pyx_t_1);
jpayne@69 17018 __pyx_t_1 = 0;
jpayne@69 17019
jpayne@69 17020 /* "(tree fragment)":13
jpayne@69 17021 * cdef __pyx_unpickle_FastxRecord__set_state(FastxRecord __pyx_result, tuple __pyx_state):
jpayne@69 17022 * __pyx_result.comment = __pyx_state[0]; __pyx_result.name = __pyx_state[1]; __pyx_result.quality = __pyx_state[2]; __pyx_result.sequence = __pyx_state[3]
jpayne@69 17023 * if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
jpayne@69 17024 * __pyx_result.__dict__.update(__pyx_state[4])
jpayne@69 17025 */
jpayne@69 17026 if (unlikely(__pyx_v___pyx_state == Py_None)) {
jpayne@69 17027 PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
jpayne@69 17028 __PYX_ERR(1, 13, __pyx_L1_error)
jpayne@69 17029 }
jpayne@69 17030 __pyx_t_3 = __Pyx_PyTuple_GET_SIZE(__pyx_v___pyx_state); if (unlikely(__pyx_t_3 == ((Py_ssize_t)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
jpayne@69 17031 __pyx_t_4 = (__pyx_t_3 > 4);
jpayne@69 17032 if (__pyx_t_4) {
jpayne@69 17033 } else {
jpayne@69 17034 __pyx_t_2 = __pyx_t_4;
jpayne@69 17035 goto __pyx_L4_bool_binop_done;
jpayne@69 17036 }
jpayne@69 17037 __pyx_t_4 = __Pyx_HasAttr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(__pyx_t_4 == ((int)-1))) __PYX_ERR(1, 13, __pyx_L1_error)
jpayne@69 17038 __pyx_t_2 = __pyx_t_4;
jpayne@69 17039 __pyx_L4_bool_binop_done:;
jpayne@69 17040 if (__pyx_t_2) {
jpayne@69 17041
jpayne@69 17042 /* "(tree fragment)":14
jpayne@69 17043 * __pyx_result.comment = __pyx_state[0]; __pyx_result.name = __pyx_state[1]; __pyx_result.quality = __pyx_state[2]; __pyx_result.sequence = __pyx_state[3]
jpayne@69 17044 * if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'):
jpayne@69 17045 * __pyx_result.__dict__.update(__pyx_state[4]) # <<<<<<<<<<<<<<
jpayne@69 17046 */
jpayne@69 17047 __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v___pyx_result), __pyx_n_s_dict); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 14, __pyx_L1_error)
jpayne@69 17048 __Pyx_GOTREF(__pyx_t_5);
jpayne@69 17049 __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_update); if (unlikely(!__pyx_t_6)) __PYX_ERR(1, 14, __pyx_L1_error)
jpayne@69 17050 __Pyx_GOTREF(__pyx_t_6);
jpayne@69 17051 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
jpayne@69 17052 if (unlikely(__pyx_v___pyx_state == Py_None)) {
jpayne@69 17053 PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
jpayne@69 17054 __PYX_ERR(1, 14, __pyx_L1_error)
jpayne@69 17055 }
jpayne@69 17056 __pyx_t_5 = __Pyx_GetItemInt_Tuple(__pyx_v___pyx_state, 4, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(1, 14, __pyx_L1_error)
jpayne@69 17057 __Pyx_GOTREF(__pyx_t_5);
jpayne@69 17058 __pyx_t_7 = NULL;
jpayne@69 17059 __pyx_t_8 = 0;
jpayne@69 17060 #if CYTHON_UNPACK_METHODS
jpayne@69 17061 if (likely(PyMethod_Check(__pyx_t_6))) {
jpayne@69 17062 __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
jpayne@69 17063 if (likely(__pyx_t_7)) {
jpayne@69 17064 PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
jpayne@69 17065 __Pyx_INCREF(__pyx_t_7);
jpayne@69 17066 __Pyx_INCREF(function);
jpayne@69 17067 __Pyx_DECREF_SET(__pyx_t_6, function);
jpayne@69 17068 __pyx_t_8 = 1;
jpayne@69 17069 }
jpayne@69 17070 }
jpayne@69 17071 #endif
jpayne@69 17072 {
jpayne@69 17073 PyObject *__pyx_callargs[2] = {__pyx_t_7, __pyx_t_5};
jpayne@69 17074 __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+1-__pyx_t_8, 1+__pyx_t_8);
jpayne@69 17075 __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
jpayne@69 17076 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
jpayne@69 17077 if (unlikely(!__pyx_t_1)) __PYX_ERR(1, 14, __pyx_L1_error)
jpayne@69 17078 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 17079 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
jpayne@69 17080 }
jpayne@69 17081 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@69 17082
jpayne@69 17083 /* "(tree fragment)":13
jpayne@69 17084 * cdef __pyx_unpickle_FastxRecord__set_state(FastxRecord __pyx_result, tuple __pyx_state):
jpayne@69 17085 * __pyx_result.comment = __pyx_state[0]; __pyx_result.name = __pyx_state[1]; __pyx_result.quality = __pyx_state[2]; __pyx_result.sequence = __pyx_state[3]
jpayne@69 17086 * if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'): # <<<<<<<<<<<<<<
jpayne@69 17087 * __pyx_result.__dict__.update(__pyx_state[4])
jpayne@69 17088 */
jpayne@69 17089 }
jpayne@69 17090
jpayne@69 17091 /* "(tree fragment)":11
jpayne@69 17092 * __pyx_unpickle_FastxRecord__set_state(<FastxRecord> __pyx_result, __pyx_state)
jpayne@69 17093 * return __pyx_result
jpayne@69 17094 * cdef __pyx_unpickle_FastxRecord__set_state(FastxRecord __pyx_result, tuple __pyx_state): # <<<<<<<<<<<<<<
jpayne@69 17095 * __pyx_result.comment = __pyx_state[0]; __pyx_result.name = __pyx_state[1]; __pyx_result.quality = __pyx_state[2]; __pyx_result.sequence = __pyx_state[3]
jpayne@69 17096 * if len(__pyx_state) > 4 and hasattr(__pyx_result, '__dict__'):
jpayne@69 17097 */
jpayne@69 17098
jpayne@69 17099 /* function exit code */
jpayne@69 17100 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
jpayne@69 17101 goto __pyx_L0;
jpayne@69 17102 __pyx_L1_error:;
jpayne@69 17103 __Pyx_XDECREF(__pyx_t_1);
jpayne@69 17104 __Pyx_XDECREF(__pyx_t_5);
jpayne@69 17105 __Pyx_XDECREF(__pyx_t_6);
jpayne@69 17106 __Pyx_XDECREF(__pyx_t_7);
jpayne@69 17107 __Pyx_AddTraceback("pysam.libcfaidx.__pyx_unpickle_FastxRecord__set_state", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 17108 __pyx_r = 0;
jpayne@69 17109 __pyx_L0:;
jpayne@69 17110 __Pyx_XGIVEREF(__pyx_r);
jpayne@69 17111 __Pyx_TraceReturn(__pyx_r, 0);
jpayne@69 17112 __Pyx_RefNannyFinishContext();
jpayne@69 17113 return __pyx_r;
jpayne@69 17114 }
jpayne@69 17115 static struct __pyx_vtabstruct_5pysam_9libcfaidx_FastaFile __pyx_vtable_5pysam_9libcfaidx_FastaFile;
jpayne@69 17116
jpayne@69 17117 static PyObject *__pyx_tp_new_5pysam_9libcfaidx_FastaFile(PyTypeObject *t, PyObject *a, PyObject *k) {
jpayne@69 17118 struct __pyx_obj_5pysam_9libcfaidx_FastaFile *p;
jpayne@69 17119 PyObject *o;
jpayne@69 17120 #if CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 17121 allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc);
jpayne@69 17122 o = alloc_func(t, 0);
jpayne@69 17123 #else
jpayne@69 17124 if (likely(!__Pyx_PyType_HasFeature(t, Py_TPFLAGS_IS_ABSTRACT))) {
jpayne@69 17125 o = (*t->tp_alloc)(t, 0);
jpayne@69 17126 } else {
jpayne@69 17127 o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
jpayne@69 17128 }
jpayne@69 17129 if (unlikely(!o)) return 0;
jpayne@69 17130 #endif
jpayne@69 17131 p = ((struct __pyx_obj_5pysam_9libcfaidx_FastaFile *)o);
jpayne@69 17132 p->__pyx_vtab = __pyx_vtabptr_5pysam_9libcfaidx_FastaFile;
jpayne@69 17133 p->_filename = Py_None; Py_INCREF(Py_None);
jpayne@69 17134 p->_references = Py_None; Py_INCREF(Py_None);
jpayne@69 17135 p->_lengths = Py_None; Py_INCREF(Py_None);
jpayne@69 17136 p->reference2length = Py_None; Py_INCREF(Py_None);
jpayne@69 17137 if (unlikely(__pyx_pw_5pysam_9libcfaidx_9FastaFile_1__cinit__(o, a, k) < 0)) goto bad;
jpayne@69 17138 return o;
jpayne@69 17139 bad:
jpayne@69 17140 Py_DECREF(o); o = 0;
jpayne@69 17141 return NULL;
jpayne@69 17142 }
jpayne@69 17143
jpayne@69 17144 static void __pyx_tp_dealloc_5pysam_9libcfaidx_FastaFile(PyObject *o) {
jpayne@69 17145 struct __pyx_obj_5pysam_9libcfaidx_FastaFile *p = (struct __pyx_obj_5pysam_9libcfaidx_FastaFile *)o;
jpayne@69 17146 #if CYTHON_USE_TP_FINALIZE
jpayne@69 17147 if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) {
jpayne@69 17148 if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_5pysam_9libcfaidx_FastaFile) {
jpayne@69 17149 if (PyObject_CallFinalizerFromDealloc(o)) return;
jpayne@69 17150 }
jpayne@69 17151 }
jpayne@69 17152 #endif
jpayne@69 17153 PyObject_GC_UnTrack(o);
jpayne@69 17154 {
jpayne@69 17155 PyObject *etype, *eval, *etb;
jpayne@69 17156 PyErr_Fetch(&etype, &eval, &etb);
jpayne@69 17157 __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
jpayne@69 17158 __pyx_pw_5pysam_9libcfaidx_9FastaFile_11__dealloc__(o);
jpayne@69 17159 __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
jpayne@69 17160 PyErr_Restore(etype, eval, etb);
jpayne@69 17161 }
jpayne@69 17162 Py_CLEAR(p->_filename);
jpayne@69 17163 Py_CLEAR(p->_references);
jpayne@69 17164 Py_CLEAR(p->_lengths);
jpayne@69 17165 Py_CLEAR(p->reference2length);
jpayne@69 17166 #if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY
jpayne@69 17167 (*Py_TYPE(o)->tp_free)(o);
jpayne@69 17168 #else
jpayne@69 17169 {
jpayne@69 17170 freefunc tp_free = (freefunc)PyType_GetSlot(Py_TYPE(o), Py_tp_free);
jpayne@69 17171 if (tp_free) tp_free(o);
jpayne@69 17172 }
jpayne@69 17173 #endif
jpayne@69 17174 }
jpayne@69 17175
jpayne@69 17176 static int __pyx_tp_traverse_5pysam_9libcfaidx_FastaFile(PyObject *o, visitproc v, void *a) {
jpayne@69 17177 int e;
jpayne@69 17178 struct __pyx_obj_5pysam_9libcfaidx_FastaFile *p = (struct __pyx_obj_5pysam_9libcfaidx_FastaFile *)o;
jpayne@69 17179 if (p->_filename) {
jpayne@69 17180 e = (*v)(p->_filename, a); if (e) return e;
jpayne@69 17181 }
jpayne@69 17182 if (p->_references) {
jpayne@69 17183 e = (*v)(p->_references, a); if (e) return e;
jpayne@69 17184 }
jpayne@69 17185 if (p->_lengths) {
jpayne@69 17186 e = (*v)(p->_lengths, a); if (e) return e;
jpayne@69 17187 }
jpayne@69 17188 if (p->reference2length) {
jpayne@69 17189 e = (*v)(p->reference2length, a); if (e) return e;
jpayne@69 17190 }
jpayne@69 17191 return 0;
jpayne@69 17192 }
jpayne@69 17193
jpayne@69 17194 static int __pyx_tp_clear_5pysam_9libcfaidx_FastaFile(PyObject *o) {
jpayne@69 17195 PyObject* tmp;
jpayne@69 17196 struct __pyx_obj_5pysam_9libcfaidx_FastaFile *p = (struct __pyx_obj_5pysam_9libcfaidx_FastaFile *)o;
jpayne@69 17197 tmp = ((PyObject*)p->_filename);
jpayne@69 17198 p->_filename = Py_None; Py_INCREF(Py_None);
jpayne@69 17199 Py_XDECREF(tmp);
jpayne@69 17200 tmp = ((PyObject*)p->_references);
jpayne@69 17201 p->_references = Py_None; Py_INCREF(Py_None);
jpayne@69 17202 Py_XDECREF(tmp);
jpayne@69 17203 tmp = ((PyObject*)p->_lengths);
jpayne@69 17204 p->_lengths = Py_None; Py_INCREF(Py_None);
jpayne@69 17205 Py_XDECREF(tmp);
jpayne@69 17206 tmp = ((PyObject*)p->reference2length);
jpayne@69 17207 p->reference2length = Py_None; Py_INCREF(Py_None);
jpayne@69 17208 Py_XDECREF(tmp);
jpayne@69 17209 return 0;
jpayne@69 17210 }
jpayne@69 17211 static PyObject *__pyx_sq_item_5pysam_9libcfaidx_FastaFile(PyObject *o, Py_ssize_t i) {
jpayne@69 17212 PyObject *r;
jpayne@69 17213 PyObject *x = PyInt_FromSsize_t(i); if(!x) return 0;
jpayne@69 17214 r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x);
jpayne@69 17215 Py_DECREF(x);
jpayne@69 17216 return r;
jpayne@69 17217 }
jpayne@69 17218
jpayne@69 17219 static PyObject *__pyx_getprop_5pysam_9libcfaidx_9FastaFile_closed(PyObject *o, CYTHON_UNUSED void *x) {
jpayne@69 17220 return __pyx_pw_5pysam_9libcfaidx_9FastaFile_6closed_1__get__(o);
jpayne@69 17221 }
jpayne@69 17222
jpayne@69 17223 static PyObject *__pyx_getprop_5pysam_9libcfaidx_9FastaFile_filename(PyObject *o, CYTHON_UNUSED void *x) {
jpayne@69 17224 return __pyx_pw_5pysam_9libcfaidx_9FastaFile_8filename_1__get__(o);
jpayne@69 17225 }
jpayne@69 17226
jpayne@69 17227 static PyObject *__pyx_getprop_5pysam_9libcfaidx_9FastaFile_references(PyObject *o, CYTHON_UNUSED void *x) {
jpayne@69 17228 return __pyx_pw_5pysam_9libcfaidx_9FastaFile_10references_1__get__(o);
jpayne@69 17229 }
jpayne@69 17230
jpayne@69 17231 static PyObject *__pyx_getprop_5pysam_9libcfaidx_9FastaFile_nreferences(PyObject *o, CYTHON_UNUSED void *x) {
jpayne@69 17232 return __pyx_pw_5pysam_9libcfaidx_9FastaFile_11nreferences_1__get__(o);
jpayne@69 17233 }
jpayne@69 17234
jpayne@69 17235 static PyObject *__pyx_getprop_5pysam_9libcfaidx_9FastaFile_lengths(PyObject *o, CYTHON_UNUSED void *x) {
jpayne@69 17236 return __pyx_pw_5pysam_9libcfaidx_9FastaFile_7lengths_1__get__(o);
jpayne@69 17237 }
jpayne@69 17238
jpayne@69 17239 static PyMethodDef __pyx_methods_5pysam_9libcfaidx_FastaFile[] = {
jpayne@69 17240 {"is_open", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_9libcfaidx_9FastaFile_3is_open, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_9libcfaidx_9FastaFile_2is_open},
jpayne@69 17241 {"_open", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_9libcfaidx_9FastaFile_7_open, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_9libcfaidx_9FastaFile_6_open},
jpayne@69 17242 {"close", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_9libcfaidx_9FastaFile_9close, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_9libcfaidx_9FastaFile_8close},
jpayne@69 17243 {"__enter__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_9libcfaidx_9FastaFile_13__enter__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_9libcfaidx_9FastaFile_12__enter__},
jpayne@69 17244 {"__exit__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_9libcfaidx_9FastaFile_15__exit__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_9libcfaidx_9FastaFile_14__exit__},
jpayne@69 17245 {"fetch", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_9libcfaidx_9FastaFile_17fetch, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_9libcfaidx_9FastaFile_16fetch},
jpayne@69 17246 {"get_reference_length", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_9libcfaidx_9FastaFile_19get_reference_length, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_9libcfaidx_9FastaFile_18get_reference_length},
jpayne@69 17247 {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_9libcfaidx_9FastaFile_25__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_9libcfaidx_9FastaFile_24__reduce_cython__},
jpayne@69 17248 {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_9libcfaidx_9FastaFile_27__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_9libcfaidx_9FastaFile_26__setstate_cython__},
jpayne@69 17249 {0, 0, 0, 0}
jpayne@69 17250 };
jpayne@69 17251
jpayne@69 17252 static struct PyGetSetDef __pyx_getsets_5pysam_9libcfaidx_FastaFile[] = {
jpayne@69 17253 {(char *)"closed", __pyx_getprop_5pysam_9libcfaidx_9FastaFile_closed, 0, (char *)PyDoc_STR("bool indicating the current state of the file object.\n This is a read-only attribute; the close() method changes the value.\n "), 0},
jpayne@69 17254 {(char *)"filename", __pyx_getprop_5pysam_9libcfaidx_9FastaFile_filename, 0, (char *)PyDoc_STR("filename associated with this object. This is a read-only attribute."), 0},
jpayne@69 17255 {(char *)"references", __pyx_getprop_5pysam_9libcfaidx_9FastaFile_references, 0, (char *)PyDoc_STR("tuple with the names of :term:`reference` sequences."), 0},
jpayne@69 17256 {(char *)"nreferences", __pyx_getprop_5pysam_9libcfaidx_9FastaFile_nreferences, 0, (char *)PyDoc_STR("int with the number of :term:`reference` sequences in the file.\n This is a read-only attribute."), 0},
jpayne@69 17257 {(char *)"lengths", __pyx_getprop_5pysam_9libcfaidx_9FastaFile_lengths, 0, (char *)PyDoc_STR("tuple with the lengths of :term:`reference` sequences."), 0},
jpayne@69 17258 {0, 0, 0, 0, 0}
jpayne@69 17259 };
jpayne@69 17260 #if CYTHON_USE_TYPE_SPECS
jpayne@69 17261 static PyType_Slot __pyx_type_5pysam_9libcfaidx_FastaFile_slots[] = {
jpayne@69 17262 {Py_tp_dealloc, (void *)__pyx_tp_dealloc_5pysam_9libcfaidx_FastaFile},
jpayne@69 17263 {Py_sq_length, (void *)__pyx_pw_5pysam_9libcfaidx_9FastaFile_5__len__},
jpayne@69 17264 {Py_sq_item, (void *)__pyx_sq_item_5pysam_9libcfaidx_FastaFile},
jpayne@69 17265 {Py_sq_contains, (void *)__pyx_pw_5pysam_9libcfaidx_9FastaFile_23__contains__},
jpayne@69 17266 {Py_mp_length, (void *)__pyx_pw_5pysam_9libcfaidx_9FastaFile_5__len__},
jpayne@69 17267 {Py_mp_subscript, (void *)__pyx_pw_5pysam_9libcfaidx_9FastaFile_21__getitem__},
jpayne@69 17268 {Py_tp_doc, (void *)PyDoc_STR("Random access to fasta formatted files that\n have been indexed by :term:`faidx`.\n\n The file is automatically opened. The index file of file\n ``<filename>`` is expected to be called ``<filename>.fai``.\n\n Parameters\n ----------\n\n filename : string\n Filename of fasta file to be opened.\n\n filepath_index : string\n Optional, filename of the index. By default this is\n the filename + \".fai\".\n\n filepath_index_compressed : string\n Optional, filename of the index if fasta file is. By default this is\n the filename + \".gzi\".\n\n Raises\n ------\n\n ValueError\n if index file is missing\n\n IOError\n if file could not be opened\n\n ")},
jpayne@69 17269 {Py_tp_traverse, (void *)__pyx_tp_traverse_5pysam_9libcfaidx_FastaFile},
jpayne@69 17270 {Py_tp_clear, (void *)__pyx_tp_clear_5pysam_9libcfaidx_FastaFile},
jpayne@69 17271 {Py_tp_methods, (void *)__pyx_methods_5pysam_9libcfaidx_FastaFile},
jpayne@69 17272 {Py_tp_getset, (void *)__pyx_getsets_5pysam_9libcfaidx_FastaFile},
jpayne@69 17273 {Py_tp_new, (void *)__pyx_tp_new_5pysam_9libcfaidx_FastaFile},
jpayne@69 17274 {0, 0},
jpayne@69 17275 };
jpayne@69 17276 static PyType_Spec __pyx_type_5pysam_9libcfaidx_FastaFile_spec = {
jpayne@69 17277 "pysam.libcfaidx.FastaFile",
jpayne@69 17278 sizeof(struct __pyx_obj_5pysam_9libcfaidx_FastaFile),
jpayne@69 17279 0,
jpayne@69 17280 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
jpayne@69 17281 __pyx_type_5pysam_9libcfaidx_FastaFile_slots,
jpayne@69 17282 };
jpayne@69 17283 #else
jpayne@69 17284
jpayne@69 17285 static PySequenceMethods __pyx_tp_as_sequence_FastaFile = {
jpayne@69 17286 __pyx_pw_5pysam_9libcfaidx_9FastaFile_5__len__, /*sq_length*/
jpayne@69 17287 0, /*sq_concat*/
jpayne@69 17288 0, /*sq_repeat*/
jpayne@69 17289 __pyx_sq_item_5pysam_9libcfaidx_FastaFile, /*sq_item*/
jpayne@69 17290 0, /*sq_slice*/
jpayne@69 17291 0, /*sq_ass_item*/
jpayne@69 17292 0, /*sq_ass_slice*/
jpayne@69 17293 __pyx_pw_5pysam_9libcfaidx_9FastaFile_23__contains__, /*sq_contains*/
jpayne@69 17294 0, /*sq_inplace_concat*/
jpayne@69 17295 0, /*sq_inplace_repeat*/
jpayne@69 17296 };
jpayne@69 17297
jpayne@69 17298 static PyMappingMethods __pyx_tp_as_mapping_FastaFile = {
jpayne@69 17299 __pyx_pw_5pysam_9libcfaidx_9FastaFile_5__len__, /*mp_length*/
jpayne@69 17300 __pyx_pw_5pysam_9libcfaidx_9FastaFile_21__getitem__, /*mp_subscript*/
jpayne@69 17301 0, /*mp_ass_subscript*/
jpayne@69 17302 };
jpayne@69 17303
jpayne@69 17304 static PyTypeObject __pyx_type_5pysam_9libcfaidx_FastaFile = {
jpayne@69 17305 PyVarObject_HEAD_INIT(0, 0)
jpayne@69 17306 "pysam.libcfaidx.""FastaFile", /*tp_name*/
jpayne@69 17307 sizeof(struct __pyx_obj_5pysam_9libcfaidx_FastaFile), /*tp_basicsize*/
jpayne@69 17308 0, /*tp_itemsize*/
jpayne@69 17309 __pyx_tp_dealloc_5pysam_9libcfaidx_FastaFile, /*tp_dealloc*/
jpayne@69 17310 #if PY_VERSION_HEX < 0x030800b4
jpayne@69 17311 0, /*tp_print*/
jpayne@69 17312 #endif
jpayne@69 17313 #if PY_VERSION_HEX >= 0x030800b4
jpayne@69 17314 0, /*tp_vectorcall_offset*/
jpayne@69 17315 #endif
jpayne@69 17316 0, /*tp_getattr*/
jpayne@69 17317 0, /*tp_setattr*/
jpayne@69 17318 #if PY_MAJOR_VERSION < 3
jpayne@69 17319 0, /*tp_compare*/
jpayne@69 17320 #endif
jpayne@69 17321 #if PY_MAJOR_VERSION >= 3
jpayne@69 17322 0, /*tp_as_async*/
jpayne@69 17323 #endif
jpayne@69 17324 0, /*tp_repr*/
jpayne@69 17325 0, /*tp_as_number*/
jpayne@69 17326 &__pyx_tp_as_sequence_FastaFile, /*tp_as_sequence*/
jpayne@69 17327 &__pyx_tp_as_mapping_FastaFile, /*tp_as_mapping*/
jpayne@69 17328 0, /*tp_hash*/
jpayne@69 17329 0, /*tp_call*/
jpayne@69 17330 0, /*tp_str*/
jpayne@69 17331 0, /*tp_getattro*/
jpayne@69 17332 0, /*tp_setattro*/
jpayne@69 17333 0, /*tp_as_buffer*/
jpayne@69 17334 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
jpayne@69 17335 PyDoc_STR("Random access to fasta formatted files that\n have been indexed by :term:`faidx`.\n\n The file is automatically opened. The index file of file\n ``<filename>`` is expected to be called ``<filename>.fai``.\n\n Parameters\n ----------\n\n filename : string\n Filename of fasta file to be opened.\n\n filepath_index : string\n Optional, filename of the index. By default this is\n the filename + \".fai\".\n\n filepath_index_compressed : string\n Optional, filename of the index if fasta file is. By default this is\n the filename + \".gzi\".\n\n Raises\n ------\n\n ValueError\n if index file is missing\n\n IOError\n if file could not be opened\n\n "), /*tp_doc*/
jpayne@69 17336 __pyx_tp_traverse_5pysam_9libcfaidx_FastaFile, /*tp_traverse*/
jpayne@69 17337 __pyx_tp_clear_5pysam_9libcfaidx_FastaFile, /*tp_clear*/
jpayne@69 17338 0, /*tp_richcompare*/
jpayne@69 17339 0, /*tp_weaklistoffset*/
jpayne@69 17340 0, /*tp_iter*/
jpayne@69 17341 0, /*tp_iternext*/
jpayne@69 17342 __pyx_methods_5pysam_9libcfaidx_FastaFile, /*tp_methods*/
jpayne@69 17343 0, /*tp_members*/
jpayne@69 17344 __pyx_getsets_5pysam_9libcfaidx_FastaFile, /*tp_getset*/
jpayne@69 17345 0, /*tp_base*/
jpayne@69 17346 0, /*tp_dict*/
jpayne@69 17347 0, /*tp_descr_get*/
jpayne@69 17348 0, /*tp_descr_set*/
jpayne@69 17349 #if !CYTHON_USE_TYPE_SPECS
jpayne@69 17350 0, /*tp_dictoffset*/
jpayne@69 17351 #endif
jpayne@69 17352 0, /*tp_init*/
jpayne@69 17353 0, /*tp_alloc*/
jpayne@69 17354 __pyx_tp_new_5pysam_9libcfaidx_FastaFile, /*tp_new*/
jpayne@69 17355 0, /*tp_free*/
jpayne@69 17356 0, /*tp_is_gc*/
jpayne@69 17357 0, /*tp_bases*/
jpayne@69 17358 0, /*tp_mro*/
jpayne@69 17359 0, /*tp_cache*/
jpayne@69 17360 0, /*tp_subclasses*/
jpayne@69 17361 0, /*tp_weaklist*/
jpayne@69 17362 0, /*tp_del*/
jpayne@69 17363 0, /*tp_version_tag*/
jpayne@69 17364 #if PY_VERSION_HEX >= 0x030400a1
jpayne@69 17365 #if CYTHON_USE_TP_FINALIZE
jpayne@69 17366 0, /*tp_finalize*/
jpayne@69 17367 #else
jpayne@69 17368 NULL, /*tp_finalize*/
jpayne@69 17369 #endif
jpayne@69 17370 #endif
jpayne@69 17371 #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
jpayne@69 17372 0, /*tp_vectorcall*/
jpayne@69 17373 #endif
jpayne@69 17374 #if __PYX_NEED_TP_PRINT_SLOT == 1
jpayne@69 17375 0, /*tp_print*/
jpayne@69 17376 #endif
jpayne@69 17377 #if PY_VERSION_HEX >= 0x030C0000
jpayne@69 17378 0, /*tp_watched*/
jpayne@69 17379 #endif
jpayne@69 17380 #if PY_VERSION_HEX >= 0x030d00A4
jpayne@69 17381 0, /*tp_versions_used*/
jpayne@69 17382 #endif
jpayne@69 17383 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
jpayne@69 17384 0, /*tp_pypy_flags*/
jpayne@69 17385 #endif
jpayne@69 17386 };
jpayne@69 17387 #endif
jpayne@69 17388 static struct __pyx_vtabstruct_5pysam_9libcfaidx_FastqProxy __pyx_vtable_5pysam_9libcfaidx_FastqProxy;
jpayne@69 17389
jpayne@69 17390 static PyObject *__pyx_tp_new_5pysam_9libcfaidx_FastqProxy(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
jpayne@69 17391 struct __pyx_obj_5pysam_9libcfaidx_FastqProxy *p;
jpayne@69 17392 PyObject *o;
jpayne@69 17393 #if CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 17394 allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc);
jpayne@69 17395 o = alloc_func(t, 0);
jpayne@69 17396 #else
jpayne@69 17397 if (likely(!__Pyx_PyType_HasFeature(t, Py_TPFLAGS_IS_ABSTRACT))) {
jpayne@69 17398 o = (*t->tp_alloc)(t, 0);
jpayne@69 17399 } else {
jpayne@69 17400 o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
jpayne@69 17401 }
jpayne@69 17402 if (unlikely(!o)) return 0;
jpayne@69 17403 #endif
jpayne@69 17404 p = ((struct __pyx_obj_5pysam_9libcfaidx_FastqProxy *)o);
jpayne@69 17405 p->__pyx_vtab = __pyx_vtabptr_5pysam_9libcfaidx_FastqProxy;
jpayne@69 17406 return o;
jpayne@69 17407 }
jpayne@69 17408
jpayne@69 17409 static void __pyx_tp_dealloc_5pysam_9libcfaidx_FastqProxy(PyObject *o) {
jpayne@69 17410 #if CYTHON_USE_TP_FINALIZE
jpayne@69 17411 if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && (!PyType_IS_GC(Py_TYPE(o)) || !__Pyx_PyObject_GC_IsFinalized(o))) {
jpayne@69 17412 if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_5pysam_9libcfaidx_FastqProxy) {
jpayne@69 17413 if (PyObject_CallFinalizerFromDealloc(o)) return;
jpayne@69 17414 }
jpayne@69 17415 }
jpayne@69 17416 #endif
jpayne@69 17417 #if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY
jpayne@69 17418 (*Py_TYPE(o)->tp_free)(o);
jpayne@69 17419 #else
jpayne@69 17420 {
jpayne@69 17421 freefunc tp_free = (freefunc)PyType_GetSlot(Py_TYPE(o), Py_tp_free);
jpayne@69 17422 if (tp_free) tp_free(o);
jpayne@69 17423 }
jpayne@69 17424 #endif
jpayne@69 17425 }
jpayne@69 17426
jpayne@69 17427 static PyObject *__pyx_getprop_5pysam_9libcfaidx_10FastqProxy_name(PyObject *o, CYTHON_UNUSED void *x) {
jpayne@69 17428 return __pyx_pw_5pysam_9libcfaidx_10FastqProxy_4name_1__get__(o);
jpayne@69 17429 }
jpayne@69 17430
jpayne@69 17431 static PyObject *__pyx_getprop_5pysam_9libcfaidx_10FastqProxy_sequence(PyObject *o, CYTHON_UNUSED void *x) {
jpayne@69 17432 return __pyx_pw_5pysam_9libcfaidx_10FastqProxy_8sequence_1__get__(o);
jpayne@69 17433 }
jpayne@69 17434
jpayne@69 17435 static PyObject *__pyx_getprop_5pysam_9libcfaidx_10FastqProxy_comment(PyObject *o, CYTHON_UNUSED void *x) {
jpayne@69 17436 return __pyx_pw_5pysam_9libcfaidx_10FastqProxy_7comment_1__get__(o);
jpayne@69 17437 }
jpayne@69 17438
jpayne@69 17439 static PyObject *__pyx_getprop_5pysam_9libcfaidx_10FastqProxy_quality(PyObject *o, CYTHON_UNUSED void *x) {
jpayne@69 17440 return __pyx_pw_5pysam_9libcfaidx_10FastqProxy_7quality_1__get__(o);
jpayne@69 17441 }
jpayne@69 17442
jpayne@69 17443 static PyMethodDef __pyx_methods_5pysam_9libcfaidx_FastqProxy[] = {
jpayne@69 17444 {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_9libcfaidx_10FastqProxy_7__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_9libcfaidx_10FastqProxy_6__reduce_cython__},
jpayne@69 17445 {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_9libcfaidx_10FastqProxy_9__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_9libcfaidx_10FastqProxy_8__setstate_cython__},
jpayne@69 17446 {0, 0, 0, 0}
jpayne@69 17447 };
jpayne@69 17448
jpayne@69 17449 static struct PyGetSetDef __pyx_getsets_5pysam_9libcfaidx_FastqProxy[] = {
jpayne@69 17450 {(char *)"name", __pyx_getprop_5pysam_9libcfaidx_10FastqProxy_name, 0, (char *)PyDoc_STR("The name of each entry in the fastq file."), 0},
jpayne@69 17451 {(char *)"sequence", __pyx_getprop_5pysam_9libcfaidx_10FastqProxy_sequence, 0, (char *)PyDoc_STR("The sequence of each entry in the fastq file."), 0},
jpayne@69 17452 {(char *)"comment", __pyx_getprop_5pysam_9libcfaidx_10FastqProxy_comment, 0, (char *)0, 0},
jpayne@69 17453 {(char *)"quality", __pyx_getprop_5pysam_9libcfaidx_10FastqProxy_quality, 0, (char *)PyDoc_STR("The quality score of each entry in the fastq file, represented as a string."), 0},
jpayne@69 17454 {0, 0, 0, 0, 0}
jpayne@69 17455 };
jpayne@69 17456 #if CYTHON_USE_TYPE_SPECS
jpayne@69 17457 static PyType_Slot __pyx_type_5pysam_9libcfaidx_FastqProxy_slots[] = {
jpayne@69 17458 {Py_tp_dealloc, (void *)__pyx_tp_dealloc_5pysam_9libcfaidx_FastqProxy},
jpayne@69 17459 {Py_tp_str, (void *)__pyx_pw_5pysam_9libcfaidx_10FastqProxy_3__str__},
jpayne@69 17460 {Py_tp_doc, (void *)PyDoc_STR("FastqProxy()\nA single entry in a fastq file.")},
jpayne@69 17461 {Py_tp_methods, (void *)__pyx_methods_5pysam_9libcfaidx_FastqProxy},
jpayne@69 17462 {Py_tp_getset, (void *)__pyx_getsets_5pysam_9libcfaidx_FastqProxy},
jpayne@69 17463 {Py_tp_init, (void *)__pyx_pw_5pysam_9libcfaidx_10FastqProxy_1__init__},
jpayne@69 17464 {Py_tp_new, (void *)__pyx_tp_new_5pysam_9libcfaidx_FastqProxy},
jpayne@69 17465 {0, 0},
jpayne@69 17466 };
jpayne@69 17467 static PyType_Spec __pyx_type_5pysam_9libcfaidx_FastqProxy_spec = {
jpayne@69 17468 "pysam.libcfaidx.FastqProxy",
jpayne@69 17469 sizeof(struct __pyx_obj_5pysam_9libcfaidx_FastqProxy),
jpayne@69 17470 0,
jpayne@69 17471 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE,
jpayne@69 17472 __pyx_type_5pysam_9libcfaidx_FastqProxy_slots,
jpayne@69 17473 };
jpayne@69 17474 #else
jpayne@69 17475
jpayne@69 17476 static PyTypeObject __pyx_type_5pysam_9libcfaidx_FastqProxy = {
jpayne@69 17477 PyVarObject_HEAD_INIT(0, 0)
jpayne@69 17478 "pysam.libcfaidx.""FastqProxy", /*tp_name*/
jpayne@69 17479 sizeof(struct __pyx_obj_5pysam_9libcfaidx_FastqProxy), /*tp_basicsize*/
jpayne@69 17480 0, /*tp_itemsize*/
jpayne@69 17481 __pyx_tp_dealloc_5pysam_9libcfaidx_FastqProxy, /*tp_dealloc*/
jpayne@69 17482 #if PY_VERSION_HEX < 0x030800b4
jpayne@69 17483 0, /*tp_print*/
jpayne@69 17484 #endif
jpayne@69 17485 #if PY_VERSION_HEX >= 0x030800b4
jpayne@69 17486 0, /*tp_vectorcall_offset*/
jpayne@69 17487 #endif
jpayne@69 17488 0, /*tp_getattr*/
jpayne@69 17489 0, /*tp_setattr*/
jpayne@69 17490 #if PY_MAJOR_VERSION < 3
jpayne@69 17491 0, /*tp_compare*/
jpayne@69 17492 #endif
jpayne@69 17493 #if PY_MAJOR_VERSION >= 3
jpayne@69 17494 0, /*tp_as_async*/
jpayne@69 17495 #endif
jpayne@69 17496 0, /*tp_repr*/
jpayne@69 17497 0, /*tp_as_number*/
jpayne@69 17498 0, /*tp_as_sequence*/
jpayne@69 17499 0, /*tp_as_mapping*/
jpayne@69 17500 0, /*tp_hash*/
jpayne@69 17501 0, /*tp_call*/
jpayne@69 17502 __pyx_pw_5pysam_9libcfaidx_10FastqProxy_3__str__, /*tp_str*/
jpayne@69 17503 0, /*tp_getattro*/
jpayne@69 17504 0, /*tp_setattro*/
jpayne@69 17505 0, /*tp_as_buffer*/
jpayne@69 17506 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
jpayne@69 17507 PyDoc_STR("FastqProxy()\nA single entry in a fastq file."), /*tp_doc*/
jpayne@69 17508 0, /*tp_traverse*/
jpayne@69 17509 0, /*tp_clear*/
jpayne@69 17510 0, /*tp_richcompare*/
jpayne@69 17511 0, /*tp_weaklistoffset*/
jpayne@69 17512 0, /*tp_iter*/
jpayne@69 17513 0, /*tp_iternext*/
jpayne@69 17514 __pyx_methods_5pysam_9libcfaidx_FastqProxy, /*tp_methods*/
jpayne@69 17515 0, /*tp_members*/
jpayne@69 17516 __pyx_getsets_5pysam_9libcfaidx_FastqProxy, /*tp_getset*/
jpayne@69 17517 0, /*tp_base*/
jpayne@69 17518 0, /*tp_dict*/
jpayne@69 17519 0, /*tp_descr_get*/
jpayne@69 17520 0, /*tp_descr_set*/
jpayne@69 17521 #if !CYTHON_USE_TYPE_SPECS
jpayne@69 17522 0, /*tp_dictoffset*/
jpayne@69 17523 #endif
jpayne@69 17524 __pyx_pw_5pysam_9libcfaidx_10FastqProxy_1__init__, /*tp_init*/
jpayne@69 17525 0, /*tp_alloc*/
jpayne@69 17526 __pyx_tp_new_5pysam_9libcfaidx_FastqProxy, /*tp_new*/
jpayne@69 17527 0, /*tp_free*/
jpayne@69 17528 0, /*tp_is_gc*/
jpayne@69 17529 0, /*tp_bases*/
jpayne@69 17530 0, /*tp_mro*/
jpayne@69 17531 0, /*tp_cache*/
jpayne@69 17532 0, /*tp_subclasses*/
jpayne@69 17533 0, /*tp_weaklist*/
jpayne@69 17534 0, /*tp_del*/
jpayne@69 17535 0, /*tp_version_tag*/
jpayne@69 17536 #if PY_VERSION_HEX >= 0x030400a1
jpayne@69 17537 #if CYTHON_USE_TP_FINALIZE
jpayne@69 17538 0, /*tp_finalize*/
jpayne@69 17539 #else
jpayne@69 17540 NULL, /*tp_finalize*/
jpayne@69 17541 #endif
jpayne@69 17542 #endif
jpayne@69 17543 #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
jpayne@69 17544 0, /*tp_vectorcall*/
jpayne@69 17545 #endif
jpayne@69 17546 #if __PYX_NEED_TP_PRINT_SLOT == 1
jpayne@69 17547 0, /*tp_print*/
jpayne@69 17548 #endif
jpayne@69 17549 #if PY_VERSION_HEX >= 0x030C0000
jpayne@69 17550 0, /*tp_watched*/
jpayne@69 17551 #endif
jpayne@69 17552 #if PY_VERSION_HEX >= 0x030d00A4
jpayne@69 17553 0, /*tp_versions_used*/
jpayne@69 17554 #endif
jpayne@69 17555 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
jpayne@69 17556 0, /*tp_pypy_flags*/
jpayne@69 17557 #endif
jpayne@69 17558 };
jpayne@69 17559 #endif
jpayne@69 17560 static struct __pyx_vtabstruct_5pysam_9libcfaidx_FastxRecord __pyx_vtable_5pysam_9libcfaidx_FastxRecord;
jpayne@69 17561
jpayne@69 17562 static PyObject *__pyx_tp_new_5pysam_9libcfaidx_FastxRecord(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
jpayne@69 17563 struct __pyx_obj_5pysam_9libcfaidx_FastxRecord *p;
jpayne@69 17564 PyObject *o;
jpayne@69 17565 #if CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 17566 allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc);
jpayne@69 17567 o = alloc_func(t, 0);
jpayne@69 17568 #else
jpayne@69 17569 if (likely(!__Pyx_PyType_HasFeature(t, Py_TPFLAGS_IS_ABSTRACT))) {
jpayne@69 17570 o = (*t->tp_alloc)(t, 0);
jpayne@69 17571 } else {
jpayne@69 17572 o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
jpayne@69 17573 }
jpayne@69 17574 if (unlikely(!o)) return 0;
jpayne@69 17575 #endif
jpayne@69 17576 p = ((struct __pyx_obj_5pysam_9libcfaidx_FastxRecord *)o);
jpayne@69 17577 p->__pyx_vtab = __pyx_vtabptr_5pysam_9libcfaidx_FastxRecord;
jpayne@69 17578 p->comment = ((PyObject*)Py_None); Py_INCREF(Py_None);
jpayne@69 17579 p->quality = ((PyObject*)Py_None); Py_INCREF(Py_None);
jpayne@69 17580 p->sequence = ((PyObject*)Py_None); Py_INCREF(Py_None);
jpayne@69 17581 p->name = ((PyObject*)Py_None); Py_INCREF(Py_None);
jpayne@69 17582 return o;
jpayne@69 17583 }
jpayne@69 17584
jpayne@69 17585 static void __pyx_tp_dealloc_5pysam_9libcfaidx_FastxRecord(PyObject *o) {
jpayne@69 17586 struct __pyx_obj_5pysam_9libcfaidx_FastxRecord *p = (struct __pyx_obj_5pysam_9libcfaidx_FastxRecord *)o;
jpayne@69 17587 #if CYTHON_USE_TP_FINALIZE
jpayne@69 17588 if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && (!PyType_IS_GC(Py_TYPE(o)) || !__Pyx_PyObject_GC_IsFinalized(o))) {
jpayne@69 17589 if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_5pysam_9libcfaidx_FastxRecord) {
jpayne@69 17590 if (PyObject_CallFinalizerFromDealloc(o)) return;
jpayne@69 17591 }
jpayne@69 17592 }
jpayne@69 17593 #endif
jpayne@69 17594 Py_CLEAR(p->comment);
jpayne@69 17595 Py_CLEAR(p->quality);
jpayne@69 17596 Py_CLEAR(p->sequence);
jpayne@69 17597 Py_CLEAR(p->name);
jpayne@69 17598 #if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY
jpayne@69 17599 (*Py_TYPE(o)->tp_free)(o);
jpayne@69 17600 #else
jpayne@69 17601 {
jpayne@69 17602 freefunc tp_free = (freefunc)PyType_GetSlot(Py_TYPE(o), Py_tp_free);
jpayne@69 17603 if (tp_free) tp_free(o);
jpayne@69 17604 }
jpayne@69 17605 #endif
jpayne@69 17606 }
jpayne@69 17607
jpayne@69 17608 static PyObject *__pyx_getprop_5pysam_9libcfaidx_11FastxRecord_comment(PyObject *o, CYTHON_UNUSED void *x) {
jpayne@69 17609 return __pyx_pw_5pysam_9libcfaidx_11FastxRecord_7comment_1__get__(o);
jpayne@69 17610 }
jpayne@69 17611
jpayne@69 17612 static int __pyx_setprop_5pysam_9libcfaidx_11FastxRecord_comment(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
jpayne@69 17613 if (v) {
jpayne@69 17614 return __pyx_pw_5pysam_9libcfaidx_11FastxRecord_7comment_3__set__(o, v);
jpayne@69 17615 }
jpayne@69 17616 else {
jpayne@69 17617 return __pyx_pw_5pysam_9libcfaidx_11FastxRecord_7comment_5__del__(o);
jpayne@69 17618 }
jpayne@69 17619 }
jpayne@69 17620
jpayne@69 17621 static PyObject *__pyx_getprop_5pysam_9libcfaidx_11FastxRecord_quality(PyObject *o, CYTHON_UNUSED void *x) {
jpayne@69 17622 return __pyx_pw_5pysam_9libcfaidx_11FastxRecord_7quality_1__get__(o);
jpayne@69 17623 }
jpayne@69 17624
jpayne@69 17625 static int __pyx_setprop_5pysam_9libcfaidx_11FastxRecord_quality(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
jpayne@69 17626 if (v) {
jpayne@69 17627 return __pyx_pw_5pysam_9libcfaidx_11FastxRecord_7quality_3__set__(o, v);
jpayne@69 17628 }
jpayne@69 17629 else {
jpayne@69 17630 return __pyx_pw_5pysam_9libcfaidx_11FastxRecord_7quality_5__del__(o);
jpayne@69 17631 }
jpayne@69 17632 }
jpayne@69 17633
jpayne@69 17634 static PyObject *__pyx_getprop_5pysam_9libcfaidx_11FastxRecord_sequence(PyObject *o, CYTHON_UNUSED void *x) {
jpayne@69 17635 return __pyx_pw_5pysam_9libcfaidx_11FastxRecord_8sequence_1__get__(o);
jpayne@69 17636 }
jpayne@69 17637
jpayne@69 17638 static int __pyx_setprop_5pysam_9libcfaidx_11FastxRecord_sequence(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
jpayne@69 17639 if (v) {
jpayne@69 17640 return __pyx_pw_5pysam_9libcfaidx_11FastxRecord_8sequence_3__set__(o, v);
jpayne@69 17641 }
jpayne@69 17642 else {
jpayne@69 17643 return __pyx_pw_5pysam_9libcfaidx_11FastxRecord_8sequence_5__del__(o);
jpayne@69 17644 }
jpayne@69 17645 }
jpayne@69 17646
jpayne@69 17647 static PyObject *__pyx_getprop_5pysam_9libcfaidx_11FastxRecord_name(PyObject *o, CYTHON_UNUSED void *x) {
jpayne@69 17648 return __pyx_pw_5pysam_9libcfaidx_11FastxRecord_4name_1__get__(o);
jpayne@69 17649 }
jpayne@69 17650
jpayne@69 17651 static int __pyx_setprop_5pysam_9libcfaidx_11FastxRecord_name(PyObject *o, PyObject *v, CYTHON_UNUSED void *x) {
jpayne@69 17652 if (v) {
jpayne@69 17653 return __pyx_pw_5pysam_9libcfaidx_11FastxRecord_4name_3__set__(o, v);
jpayne@69 17654 }
jpayne@69 17655 else {
jpayne@69 17656 return __pyx_pw_5pysam_9libcfaidx_11FastxRecord_4name_5__del__(o);
jpayne@69 17657 }
jpayne@69 17658 }
jpayne@69 17659
jpayne@69 17660 static PyMethodDef __pyx_methods_5pysam_9libcfaidx_FastxRecord[] = {
jpayne@69 17661 {"__copy__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_9libcfaidx_11FastxRecord_3__copy__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_9libcfaidx_11FastxRecord_2__copy__},
jpayne@69 17662 {"__deepcopy__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_9libcfaidx_11FastxRecord_5__deepcopy__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_9libcfaidx_11FastxRecord_4__deepcopy__},
jpayne@69 17663 {"set_name", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_9libcfaidx_11FastxRecord_7set_name, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_9libcfaidx_11FastxRecord_6set_name},
jpayne@69 17664 {"set_comment", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_9libcfaidx_11FastxRecord_9set_comment, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_9libcfaidx_11FastxRecord_8set_comment},
jpayne@69 17665 {"set_sequence", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_9libcfaidx_11FastxRecord_11set_sequence, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_9libcfaidx_11FastxRecord_10set_sequence},
jpayne@69 17666 {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_9libcfaidx_11FastxRecord_17__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_9libcfaidx_11FastxRecord_16__reduce_cython__},
jpayne@69 17667 {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_9libcfaidx_11FastxRecord_19__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_9libcfaidx_11FastxRecord_18__setstate_cython__},
jpayne@69 17668 {0, 0, 0, 0}
jpayne@69 17669 };
jpayne@69 17670
jpayne@69 17671 static struct PyGetSetDef __pyx_getsets_5pysam_9libcfaidx_FastxRecord[] = {
jpayne@69 17672 {(char *)"comment", __pyx_getprop_5pysam_9libcfaidx_11FastxRecord_comment, __pyx_setprop_5pysam_9libcfaidx_11FastxRecord_comment, (char *)PyDoc_STR("comment: unicode"), 0},
jpayne@69 17673 {(char *)"quality", __pyx_getprop_5pysam_9libcfaidx_11FastxRecord_quality, __pyx_setprop_5pysam_9libcfaidx_11FastxRecord_quality, (char *)PyDoc_STR("quality: unicode"), 0},
jpayne@69 17674 {(char *)"sequence", __pyx_getprop_5pysam_9libcfaidx_11FastxRecord_sequence, __pyx_setprop_5pysam_9libcfaidx_11FastxRecord_sequence, (char *)PyDoc_STR("sequence: unicode"), 0},
jpayne@69 17675 {(char *)"name", __pyx_getprop_5pysam_9libcfaidx_11FastxRecord_name, __pyx_setprop_5pysam_9libcfaidx_11FastxRecord_name, (char *)PyDoc_STR("name: unicode"), 0},
jpayne@69 17676 {0, 0, 0, 0, 0}
jpayne@69 17677 };
jpayne@69 17678 #if CYTHON_USE_TYPE_SPECS
jpayne@69 17679 static PyType_Slot __pyx_type_5pysam_9libcfaidx_FastxRecord_slots[] = {
jpayne@69 17680 {Py_tp_dealloc, (void *)__pyx_tp_dealloc_5pysam_9libcfaidx_FastxRecord},
jpayne@69 17681 {Py_tp_str, (void *)__pyx_pw_5pysam_9libcfaidx_11FastxRecord_13__str__},
jpayne@69 17682 {Py_tp_doc, (void *)PyDoc_STR("FastxRecord(name=None, comment=None, sequence=None, quality=None, FastqProxy proxy=None)\nA fasta/fastq record.\n\n A record must contain a name and a sequence. If either of them are\n None, a ValueError is raised on writing.\n\n ")},
jpayne@69 17683 {Py_tp_methods, (void *)__pyx_methods_5pysam_9libcfaidx_FastxRecord},
jpayne@69 17684 {Py_tp_getset, (void *)__pyx_getsets_5pysam_9libcfaidx_FastxRecord},
jpayne@69 17685 {Py_tp_init, (void *)__pyx_pw_5pysam_9libcfaidx_11FastxRecord_1__init__},
jpayne@69 17686 {Py_tp_new, (void *)__pyx_tp_new_5pysam_9libcfaidx_FastxRecord},
jpayne@69 17687 {0, 0},
jpayne@69 17688 };
jpayne@69 17689 static PyType_Spec __pyx_type_5pysam_9libcfaidx_FastxRecord_spec = {
jpayne@69 17690 "pysam.libcfaidx.FastxRecord",
jpayne@69 17691 sizeof(struct __pyx_obj_5pysam_9libcfaidx_FastxRecord),
jpayne@69 17692 0,
jpayne@69 17693 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE,
jpayne@69 17694 __pyx_type_5pysam_9libcfaidx_FastxRecord_slots,
jpayne@69 17695 };
jpayne@69 17696 #else
jpayne@69 17697
jpayne@69 17698 static PyTypeObject __pyx_type_5pysam_9libcfaidx_FastxRecord = {
jpayne@69 17699 PyVarObject_HEAD_INIT(0, 0)
jpayne@69 17700 "pysam.libcfaidx.""FastxRecord", /*tp_name*/
jpayne@69 17701 sizeof(struct __pyx_obj_5pysam_9libcfaidx_FastxRecord), /*tp_basicsize*/
jpayne@69 17702 0, /*tp_itemsize*/
jpayne@69 17703 __pyx_tp_dealloc_5pysam_9libcfaidx_FastxRecord, /*tp_dealloc*/
jpayne@69 17704 #if PY_VERSION_HEX < 0x030800b4
jpayne@69 17705 0, /*tp_print*/
jpayne@69 17706 #endif
jpayne@69 17707 #if PY_VERSION_HEX >= 0x030800b4
jpayne@69 17708 0, /*tp_vectorcall_offset*/
jpayne@69 17709 #endif
jpayne@69 17710 0, /*tp_getattr*/
jpayne@69 17711 0, /*tp_setattr*/
jpayne@69 17712 #if PY_MAJOR_VERSION < 3
jpayne@69 17713 0, /*tp_compare*/
jpayne@69 17714 #endif
jpayne@69 17715 #if PY_MAJOR_VERSION >= 3
jpayne@69 17716 0, /*tp_as_async*/
jpayne@69 17717 #endif
jpayne@69 17718 0, /*tp_repr*/
jpayne@69 17719 0, /*tp_as_number*/
jpayne@69 17720 0, /*tp_as_sequence*/
jpayne@69 17721 0, /*tp_as_mapping*/
jpayne@69 17722 0, /*tp_hash*/
jpayne@69 17723 0, /*tp_call*/
jpayne@69 17724 __pyx_pw_5pysam_9libcfaidx_11FastxRecord_13__str__, /*tp_str*/
jpayne@69 17725 0, /*tp_getattro*/
jpayne@69 17726 0, /*tp_setattro*/
jpayne@69 17727 0, /*tp_as_buffer*/
jpayne@69 17728 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
jpayne@69 17729 PyDoc_STR("FastxRecord(name=None, comment=None, sequence=None, quality=None, FastqProxy proxy=None)\nA fasta/fastq record.\n\n A record must contain a name and a sequence. If either of them are\n None, a ValueError is raised on writing.\n\n "), /*tp_doc*/
jpayne@69 17730 0, /*tp_traverse*/
jpayne@69 17731 0, /*tp_clear*/
jpayne@69 17732 0, /*tp_richcompare*/
jpayne@69 17733 0, /*tp_weaklistoffset*/
jpayne@69 17734 0, /*tp_iter*/
jpayne@69 17735 0, /*tp_iternext*/
jpayne@69 17736 __pyx_methods_5pysam_9libcfaidx_FastxRecord, /*tp_methods*/
jpayne@69 17737 0, /*tp_members*/
jpayne@69 17738 __pyx_getsets_5pysam_9libcfaidx_FastxRecord, /*tp_getset*/
jpayne@69 17739 0, /*tp_base*/
jpayne@69 17740 0, /*tp_dict*/
jpayne@69 17741 0, /*tp_descr_get*/
jpayne@69 17742 0, /*tp_descr_set*/
jpayne@69 17743 #if !CYTHON_USE_TYPE_SPECS
jpayne@69 17744 0, /*tp_dictoffset*/
jpayne@69 17745 #endif
jpayne@69 17746 __pyx_pw_5pysam_9libcfaidx_11FastxRecord_1__init__, /*tp_init*/
jpayne@69 17747 0, /*tp_alloc*/
jpayne@69 17748 __pyx_tp_new_5pysam_9libcfaidx_FastxRecord, /*tp_new*/
jpayne@69 17749 0, /*tp_free*/
jpayne@69 17750 0, /*tp_is_gc*/
jpayne@69 17751 0, /*tp_bases*/
jpayne@69 17752 0, /*tp_mro*/
jpayne@69 17753 0, /*tp_cache*/
jpayne@69 17754 0, /*tp_subclasses*/
jpayne@69 17755 0, /*tp_weaklist*/
jpayne@69 17756 0, /*tp_del*/
jpayne@69 17757 0, /*tp_version_tag*/
jpayne@69 17758 #if PY_VERSION_HEX >= 0x030400a1
jpayne@69 17759 #if CYTHON_USE_TP_FINALIZE
jpayne@69 17760 0, /*tp_finalize*/
jpayne@69 17761 #else
jpayne@69 17762 NULL, /*tp_finalize*/
jpayne@69 17763 #endif
jpayne@69 17764 #endif
jpayne@69 17765 #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
jpayne@69 17766 0, /*tp_vectorcall*/
jpayne@69 17767 #endif
jpayne@69 17768 #if __PYX_NEED_TP_PRINT_SLOT == 1
jpayne@69 17769 0, /*tp_print*/
jpayne@69 17770 #endif
jpayne@69 17771 #if PY_VERSION_HEX >= 0x030C0000
jpayne@69 17772 0, /*tp_watched*/
jpayne@69 17773 #endif
jpayne@69 17774 #if PY_VERSION_HEX >= 0x030d00A4
jpayne@69 17775 0, /*tp_versions_used*/
jpayne@69 17776 #endif
jpayne@69 17777 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
jpayne@69 17778 0, /*tp_pypy_flags*/
jpayne@69 17779 #endif
jpayne@69 17780 };
jpayne@69 17781 #endif
jpayne@69 17782 static struct __pyx_vtabstruct_5pysam_9libcfaidx_FastxFile __pyx_vtable_5pysam_9libcfaidx_FastxFile;
jpayne@69 17783
jpayne@69 17784 static PyObject *__pyx_tp_new_5pysam_9libcfaidx_FastxFile(PyTypeObject *t, PyObject *a, PyObject *k) {
jpayne@69 17785 struct __pyx_obj_5pysam_9libcfaidx_FastxFile *p;
jpayne@69 17786 PyObject *o;
jpayne@69 17787 #if CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 17788 allocfunc alloc_func = (allocfunc)PyType_GetSlot(t, Py_tp_alloc);
jpayne@69 17789 o = alloc_func(t, 0);
jpayne@69 17790 #else
jpayne@69 17791 if (likely(!__Pyx_PyType_HasFeature(t, Py_TPFLAGS_IS_ABSTRACT))) {
jpayne@69 17792 o = (*t->tp_alloc)(t, 0);
jpayne@69 17793 } else {
jpayne@69 17794 o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
jpayne@69 17795 }
jpayne@69 17796 if (unlikely(!o)) return 0;
jpayne@69 17797 #endif
jpayne@69 17798 p = ((struct __pyx_obj_5pysam_9libcfaidx_FastxFile *)o);
jpayne@69 17799 p->__pyx_vtab = __pyx_vtabptr_5pysam_9libcfaidx_FastxFile;
jpayne@69 17800 p->_filename = Py_None; Py_INCREF(Py_None);
jpayne@69 17801 if (unlikely(__pyx_pw_5pysam_9libcfaidx_9FastxFile_1__cinit__(o, a, k) < 0)) goto bad;
jpayne@69 17802 return o;
jpayne@69 17803 bad:
jpayne@69 17804 Py_DECREF(o); o = 0;
jpayne@69 17805 return NULL;
jpayne@69 17806 }
jpayne@69 17807
jpayne@69 17808 static void __pyx_tp_dealloc_5pysam_9libcfaidx_FastxFile(PyObject *o) {
jpayne@69 17809 struct __pyx_obj_5pysam_9libcfaidx_FastxFile *p = (struct __pyx_obj_5pysam_9libcfaidx_FastxFile *)o;
jpayne@69 17810 #if CYTHON_USE_TP_FINALIZE
jpayne@69 17811 if (unlikely((PY_VERSION_HEX >= 0x03080000 || __Pyx_PyType_HasFeature(Py_TYPE(o), Py_TPFLAGS_HAVE_FINALIZE)) && __Pyx_PyObject_GetSlot(o, tp_finalize, destructor)) && !__Pyx_PyObject_GC_IsFinalized(o)) {
jpayne@69 17812 if (__Pyx_PyObject_GetSlot(o, tp_dealloc, destructor) == __pyx_tp_dealloc_5pysam_9libcfaidx_FastxFile) {
jpayne@69 17813 if (PyObject_CallFinalizerFromDealloc(o)) return;
jpayne@69 17814 }
jpayne@69 17815 }
jpayne@69 17816 #endif
jpayne@69 17817 PyObject_GC_UnTrack(o);
jpayne@69 17818 {
jpayne@69 17819 PyObject *etype, *eval, *etb;
jpayne@69 17820 PyErr_Fetch(&etype, &eval, &etb);
jpayne@69 17821 __Pyx_SET_REFCNT(o, Py_REFCNT(o) + 1);
jpayne@69 17822 __pyx_pw_5pysam_9libcfaidx_9FastxFile_9__dealloc__(o);
jpayne@69 17823 __Pyx_SET_REFCNT(o, Py_REFCNT(o) - 1);
jpayne@69 17824 PyErr_Restore(etype, eval, etb);
jpayne@69 17825 }
jpayne@69 17826 Py_CLEAR(p->_filename);
jpayne@69 17827 #if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY
jpayne@69 17828 (*Py_TYPE(o)->tp_free)(o);
jpayne@69 17829 #else
jpayne@69 17830 {
jpayne@69 17831 freefunc tp_free = (freefunc)PyType_GetSlot(Py_TYPE(o), Py_tp_free);
jpayne@69 17832 if (tp_free) tp_free(o);
jpayne@69 17833 }
jpayne@69 17834 #endif
jpayne@69 17835 }
jpayne@69 17836
jpayne@69 17837 static int __pyx_tp_traverse_5pysam_9libcfaidx_FastxFile(PyObject *o, visitproc v, void *a) {
jpayne@69 17838 int e;
jpayne@69 17839 struct __pyx_obj_5pysam_9libcfaidx_FastxFile *p = (struct __pyx_obj_5pysam_9libcfaidx_FastxFile *)o;
jpayne@69 17840 if (p->_filename) {
jpayne@69 17841 e = (*v)(p->_filename, a); if (e) return e;
jpayne@69 17842 }
jpayne@69 17843 return 0;
jpayne@69 17844 }
jpayne@69 17845
jpayne@69 17846 static int __pyx_tp_clear_5pysam_9libcfaidx_FastxFile(PyObject *o) {
jpayne@69 17847 PyObject* tmp;
jpayne@69 17848 struct __pyx_obj_5pysam_9libcfaidx_FastxFile *p = (struct __pyx_obj_5pysam_9libcfaidx_FastxFile *)o;
jpayne@69 17849 tmp = ((PyObject*)p->_filename);
jpayne@69 17850 p->_filename = Py_None; Py_INCREF(Py_None);
jpayne@69 17851 Py_XDECREF(tmp);
jpayne@69 17852 return 0;
jpayne@69 17853 }
jpayne@69 17854
jpayne@69 17855 static PyObject *__pyx_getprop_5pysam_9libcfaidx_9FastxFile_closed(PyObject *o, CYTHON_UNUSED void *x) {
jpayne@69 17856 return __pyx_pw_5pysam_9libcfaidx_9FastxFile_6closed_1__get__(o);
jpayne@69 17857 }
jpayne@69 17858
jpayne@69 17859 static PyObject *__pyx_getprop_5pysam_9libcfaidx_9FastxFile_filename(PyObject *o, CYTHON_UNUSED void *x) {
jpayne@69 17860 return __pyx_pw_5pysam_9libcfaidx_9FastxFile_8filename_1__get__(o);
jpayne@69 17861 }
jpayne@69 17862
jpayne@69 17863 static PyObject *__pyx_specialmethod___pyx_pw_5pysam_9libcfaidx_9FastxFile_17__next__(PyObject *self, CYTHON_UNUSED PyObject *arg) {
jpayne@69 17864 PyObject *res = __pyx_pw_5pysam_9libcfaidx_9FastxFile_17__next__(self);
jpayne@69 17865 if (!res && !PyErr_Occurred()) { PyErr_SetNone(PyExc_StopIteration); }
jpayne@69 17866 return res;
jpayne@69 17867 }
jpayne@69 17868
jpayne@69 17869 static PyMethodDef __pyx_methods_5pysam_9libcfaidx_FastxFile[] = {
jpayne@69 17870 {"is_open", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_9libcfaidx_9FastxFile_3is_open, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_9libcfaidx_9FastxFile_2is_open},
jpayne@69 17871 {"_open", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_9libcfaidx_9FastxFile_5_open, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_9libcfaidx_9FastxFile_4_open},
jpayne@69 17872 {"close", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_9libcfaidx_9FastxFile_7close, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_9libcfaidx_9FastxFile_6close},
jpayne@69 17873 {"__enter__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_9libcfaidx_9FastxFile_11__enter__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_9libcfaidx_9FastxFile_10__enter__},
jpayne@69 17874 {"__exit__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_9libcfaidx_9FastxFile_13__exit__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_9libcfaidx_9FastxFile_12__exit__},
jpayne@69 17875 {"__next__", (PyCFunction)__pyx_specialmethod___pyx_pw_5pysam_9libcfaidx_9FastxFile_17__next__, METH_NOARGS|METH_COEXIST, __pyx_doc_5pysam_9libcfaidx_9FastxFile_16__next__},
jpayne@69 17876 {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_9libcfaidx_9FastxFile_19__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_9libcfaidx_9FastxFile_18__reduce_cython__},
jpayne@69 17877 {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_9libcfaidx_9FastxFile_21__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_9libcfaidx_9FastxFile_20__setstate_cython__},
jpayne@69 17878 {0, 0, 0, 0}
jpayne@69 17879 };
jpayne@69 17880
jpayne@69 17881 static struct PyGetSetDef __pyx_getsets_5pysam_9libcfaidx_FastxFile[] = {
jpayne@69 17882 {(char *)"closed", __pyx_getprop_5pysam_9libcfaidx_9FastxFile_closed, 0, (char *)PyDoc_STR("bool indicating the current state of the file object.\n This is a read-only attribute; the close() method changes the value.\n "), 0},
jpayne@69 17883 {(char *)"filename", __pyx_getprop_5pysam_9libcfaidx_9FastxFile_filename, 0, (char *)PyDoc_STR("string with the filename associated with this object."), 0},
jpayne@69 17884 {0, 0, 0, 0, 0}
jpayne@69 17885 };
jpayne@69 17886 #if CYTHON_USE_TYPE_SPECS
jpayne@69 17887 static PyType_Slot __pyx_type_5pysam_9libcfaidx_FastxFile_slots[] = {
jpayne@69 17888 {Py_tp_dealloc, (void *)__pyx_tp_dealloc_5pysam_9libcfaidx_FastxFile},
jpayne@69 17889 {Py_tp_doc, (void *)PyDoc_STR("Stream access to :term:`fasta` or :term:`fastq` formatted files.\n\n The file is automatically opened.\n\n Entries in the file can be both fastq or fasta formatted or even a\n mixture of the two.\n\n This file object permits iterating over all entries in the\n file. Random access is not implemented. The iteration returns\n objects of type :class:`FastqProxy`\n\n Parameters\n ----------\n\n filename : string\n Filename of fasta/fastq file to be opened.\n\n persist : bool\n\n If True (default) make a copy of the entry in the file during\n iteration. If set to False, no copy will be made. This will\n permit much faster iteration, but an entry will not persist\n when the iteration continues and an entry is read-only.\n\n Notes\n -----\n Prior to version 0.8.2, this class was called FastqFile.\n\n Raises\n ------\n\n IOError\n if file could not be opened\n\n\n Examples\n --------\n >>> with pysam.FastxFile(filename) as fh:\n ... for entry in fh:\n ... print(entry.name)\n ... print(entry.sequence)\n ... print(entry.comment)\n ... print(entry.quality)\n >>> with pysam.FastxFile(filename) as fin, open(out_filename, mode='w') as fout:\n ... for entry in fin:\n ... fout.write(str(entry) + '\\n')\n\n ")},
jpayne@69 17890 {Py_tp_traverse, (void *)__pyx_tp_traverse_5pysam_9libcfaidx_FastxFile},
jpayne@69 17891 {Py_tp_clear, (void *)__pyx_tp_clear_5pysam_9libcfaidx_FastxFile},
jpayne@69 17892 {Py_tp_iter, (void *)__pyx_pw_5pysam_9libcfaidx_9FastxFile_15__iter__},
jpayne@69 17893 {Py_tp_iternext, (void *)__pyx_pw_5pysam_9libcfaidx_9FastxFile_17__next__},
jpayne@69 17894 {Py_tp_methods, (void *)__pyx_methods_5pysam_9libcfaidx_FastxFile},
jpayne@69 17895 {Py_tp_getset, (void *)__pyx_getsets_5pysam_9libcfaidx_FastxFile},
jpayne@69 17896 {Py_tp_new, (void *)__pyx_tp_new_5pysam_9libcfaidx_FastxFile},
jpayne@69 17897 {0, 0},
jpayne@69 17898 };
jpayne@69 17899 static PyType_Spec __pyx_type_5pysam_9libcfaidx_FastxFile_spec = {
jpayne@69 17900 "pysam.libcfaidx.FastxFile",
jpayne@69 17901 sizeof(struct __pyx_obj_5pysam_9libcfaidx_FastxFile),
jpayne@69 17902 0,
jpayne@69 17903 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
jpayne@69 17904 __pyx_type_5pysam_9libcfaidx_FastxFile_slots,
jpayne@69 17905 };
jpayne@69 17906 #else
jpayne@69 17907
jpayne@69 17908 static PyTypeObject __pyx_type_5pysam_9libcfaidx_FastxFile = {
jpayne@69 17909 PyVarObject_HEAD_INIT(0, 0)
jpayne@69 17910 "pysam.libcfaidx.""FastxFile", /*tp_name*/
jpayne@69 17911 sizeof(struct __pyx_obj_5pysam_9libcfaidx_FastxFile), /*tp_basicsize*/
jpayne@69 17912 0, /*tp_itemsize*/
jpayne@69 17913 __pyx_tp_dealloc_5pysam_9libcfaidx_FastxFile, /*tp_dealloc*/
jpayne@69 17914 #if PY_VERSION_HEX < 0x030800b4
jpayne@69 17915 0, /*tp_print*/
jpayne@69 17916 #endif
jpayne@69 17917 #if PY_VERSION_HEX >= 0x030800b4
jpayne@69 17918 0, /*tp_vectorcall_offset*/
jpayne@69 17919 #endif
jpayne@69 17920 0, /*tp_getattr*/
jpayne@69 17921 0, /*tp_setattr*/
jpayne@69 17922 #if PY_MAJOR_VERSION < 3
jpayne@69 17923 0, /*tp_compare*/
jpayne@69 17924 #endif
jpayne@69 17925 #if PY_MAJOR_VERSION >= 3
jpayne@69 17926 0, /*tp_as_async*/
jpayne@69 17927 #endif
jpayne@69 17928 0, /*tp_repr*/
jpayne@69 17929 0, /*tp_as_number*/
jpayne@69 17930 0, /*tp_as_sequence*/
jpayne@69 17931 0, /*tp_as_mapping*/
jpayne@69 17932 0, /*tp_hash*/
jpayne@69 17933 0, /*tp_call*/
jpayne@69 17934 0, /*tp_str*/
jpayne@69 17935 0, /*tp_getattro*/
jpayne@69 17936 0, /*tp_setattro*/
jpayne@69 17937 0, /*tp_as_buffer*/
jpayne@69 17938 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
jpayne@69 17939 PyDoc_STR("Stream access to :term:`fasta` or :term:`fastq` formatted files.\n\n The file is automatically opened.\n\n Entries in the file can be both fastq or fasta formatted or even a\n mixture of the two.\n\n This file object permits iterating over all entries in the\n file. Random access is not implemented. The iteration returns\n objects of type :class:`FastqProxy`\n\n Parameters\n ----------\n\n filename : string\n Filename of fasta/fastq file to be opened.\n\n persist : bool\n\n If True (default) make a copy of the entry in the file during\n iteration. If set to False, no copy will be made. This will\n permit much faster iteration, but an entry will not persist\n when the iteration continues and an entry is read-only.\n\n Notes\n -----\n Prior to version 0.8.2, this class was called FastqFile.\n\n Raises\n ------\n\n IOError\n if file could not be opened\n\n\n Examples\n --------\n >>> with pysam.FastxFile(filename) as fh:\n ... for entry in fh:\n ... print(entry.name)\n ... print(entry.sequence)\n ... print(entry.comment)\n ... print(entry.quality)\n >>> with pysam.FastxFile(filename) as fin, open(out_filename, mode='w') as fout:\n ... for entry in fin:\n ... fout.write(str(entry) + '\\n')\n\n "), /*tp_doc*/
jpayne@69 17940 __pyx_tp_traverse_5pysam_9libcfaidx_FastxFile, /*tp_traverse*/
jpayne@69 17941 __pyx_tp_clear_5pysam_9libcfaidx_FastxFile, /*tp_clear*/
jpayne@69 17942 0, /*tp_richcompare*/
jpayne@69 17943 0, /*tp_weaklistoffset*/
jpayne@69 17944 __pyx_pw_5pysam_9libcfaidx_9FastxFile_15__iter__, /*tp_iter*/
jpayne@69 17945 __pyx_pw_5pysam_9libcfaidx_9FastxFile_17__next__, /*tp_iternext*/
jpayne@69 17946 __pyx_methods_5pysam_9libcfaidx_FastxFile, /*tp_methods*/
jpayne@69 17947 0, /*tp_members*/
jpayne@69 17948 __pyx_getsets_5pysam_9libcfaidx_FastxFile, /*tp_getset*/
jpayne@69 17949 0, /*tp_base*/
jpayne@69 17950 0, /*tp_dict*/
jpayne@69 17951 0, /*tp_descr_get*/
jpayne@69 17952 0, /*tp_descr_set*/
jpayne@69 17953 #if !CYTHON_USE_TYPE_SPECS
jpayne@69 17954 0, /*tp_dictoffset*/
jpayne@69 17955 #endif
jpayne@69 17956 0, /*tp_init*/
jpayne@69 17957 0, /*tp_alloc*/
jpayne@69 17958 __pyx_tp_new_5pysam_9libcfaidx_FastxFile, /*tp_new*/
jpayne@69 17959 0, /*tp_free*/
jpayne@69 17960 0, /*tp_is_gc*/
jpayne@69 17961 0, /*tp_bases*/
jpayne@69 17962 0, /*tp_mro*/
jpayne@69 17963 0, /*tp_cache*/
jpayne@69 17964 0, /*tp_subclasses*/
jpayne@69 17965 0, /*tp_weaklist*/
jpayne@69 17966 0, /*tp_del*/
jpayne@69 17967 0, /*tp_version_tag*/
jpayne@69 17968 #if PY_VERSION_HEX >= 0x030400a1
jpayne@69 17969 #if CYTHON_USE_TP_FINALIZE
jpayne@69 17970 0, /*tp_finalize*/
jpayne@69 17971 #else
jpayne@69 17972 NULL, /*tp_finalize*/
jpayne@69 17973 #endif
jpayne@69 17974 #endif
jpayne@69 17975 #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
jpayne@69 17976 0, /*tp_vectorcall*/
jpayne@69 17977 #endif
jpayne@69 17978 #if __PYX_NEED_TP_PRINT_SLOT == 1
jpayne@69 17979 0, /*tp_print*/
jpayne@69 17980 #endif
jpayne@69 17981 #if PY_VERSION_HEX >= 0x030C0000
jpayne@69 17982 0, /*tp_watched*/
jpayne@69 17983 #endif
jpayne@69 17984 #if PY_VERSION_HEX >= 0x030d00A4
jpayne@69 17985 0, /*tp_versions_used*/
jpayne@69 17986 #endif
jpayne@69 17987 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
jpayne@69 17988 0, /*tp_pypy_flags*/
jpayne@69 17989 #endif
jpayne@69 17990 };
jpayne@69 17991 #endif
jpayne@69 17992 static struct __pyx_vtabstruct_5pysam_9libcfaidx_FastqFile __pyx_vtable_5pysam_9libcfaidx_FastqFile;
jpayne@69 17993
jpayne@69 17994 static PyObject *__pyx_tp_new_5pysam_9libcfaidx_FastqFile(PyTypeObject *t, PyObject *a, PyObject *k) {
jpayne@69 17995 struct __pyx_obj_5pysam_9libcfaidx_FastqFile *p;
jpayne@69 17996 PyObject *o = __pyx_tp_new_5pysam_9libcfaidx_FastxFile(t, a, k);
jpayne@69 17997 if (unlikely(!o)) return 0;
jpayne@69 17998 p = ((struct __pyx_obj_5pysam_9libcfaidx_FastqFile *)o);
jpayne@69 17999 p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_5pysam_9libcfaidx_FastxFile*)__pyx_vtabptr_5pysam_9libcfaidx_FastqFile;
jpayne@69 18000 return o;
jpayne@69 18001 }
jpayne@69 18002
jpayne@69 18003 static PyMethodDef __pyx_methods_5pysam_9libcfaidx_FastqFile[] = {
jpayne@69 18004 {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_9libcfaidx_9FastqFile_1__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_9libcfaidx_9FastqFile___reduce_cython__},
jpayne@69 18005 {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_9libcfaidx_9FastqFile_3__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_9libcfaidx_9FastqFile_2__setstate_cython__},
jpayne@69 18006 {0, 0, 0, 0}
jpayne@69 18007 };
jpayne@69 18008 #if CYTHON_USE_TYPE_SPECS
jpayne@69 18009 static PyType_Slot __pyx_type_5pysam_9libcfaidx_FastqFile_slots[] = {
jpayne@69 18010 {Py_tp_doc, (void *)PyDoc_STR("FastqFile is deprecated: use FastxFile instead")},
jpayne@69 18011 {Py_tp_traverse, (void *)__pyx_tp_traverse_5pysam_9libcfaidx_FastxFile},
jpayne@69 18012 {Py_tp_clear, (void *)__pyx_tp_clear_5pysam_9libcfaidx_FastxFile},
jpayne@69 18013 {Py_tp_methods, (void *)__pyx_methods_5pysam_9libcfaidx_FastqFile},
jpayne@69 18014 {Py_tp_new, (void *)__pyx_tp_new_5pysam_9libcfaidx_FastqFile},
jpayne@69 18015 {0, 0},
jpayne@69 18016 };
jpayne@69 18017 static PyType_Spec __pyx_type_5pysam_9libcfaidx_FastqFile_spec = {
jpayne@69 18018 "pysam.libcfaidx.FastqFile",
jpayne@69 18019 sizeof(struct __pyx_obj_5pysam_9libcfaidx_FastqFile),
jpayne@69 18020 0,
jpayne@69 18021 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
jpayne@69 18022 __pyx_type_5pysam_9libcfaidx_FastqFile_slots,
jpayne@69 18023 };
jpayne@69 18024 #else
jpayne@69 18025
jpayne@69 18026 static PyTypeObject __pyx_type_5pysam_9libcfaidx_FastqFile = {
jpayne@69 18027 PyVarObject_HEAD_INIT(0, 0)
jpayne@69 18028 "pysam.libcfaidx.""FastqFile", /*tp_name*/
jpayne@69 18029 sizeof(struct __pyx_obj_5pysam_9libcfaidx_FastqFile), /*tp_basicsize*/
jpayne@69 18030 0, /*tp_itemsize*/
jpayne@69 18031 __pyx_tp_dealloc_5pysam_9libcfaidx_FastxFile, /*tp_dealloc*/
jpayne@69 18032 #if PY_VERSION_HEX < 0x030800b4
jpayne@69 18033 0, /*tp_print*/
jpayne@69 18034 #endif
jpayne@69 18035 #if PY_VERSION_HEX >= 0x030800b4
jpayne@69 18036 0, /*tp_vectorcall_offset*/
jpayne@69 18037 #endif
jpayne@69 18038 0, /*tp_getattr*/
jpayne@69 18039 0, /*tp_setattr*/
jpayne@69 18040 #if PY_MAJOR_VERSION < 3
jpayne@69 18041 0, /*tp_compare*/
jpayne@69 18042 #endif
jpayne@69 18043 #if PY_MAJOR_VERSION >= 3
jpayne@69 18044 0, /*tp_as_async*/
jpayne@69 18045 #endif
jpayne@69 18046 0, /*tp_repr*/
jpayne@69 18047 0, /*tp_as_number*/
jpayne@69 18048 0, /*tp_as_sequence*/
jpayne@69 18049 0, /*tp_as_mapping*/
jpayne@69 18050 0, /*tp_hash*/
jpayne@69 18051 0, /*tp_call*/
jpayne@69 18052 0, /*tp_str*/
jpayne@69 18053 0, /*tp_getattro*/
jpayne@69 18054 0, /*tp_setattro*/
jpayne@69 18055 0, /*tp_as_buffer*/
jpayne@69 18056 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
jpayne@69 18057 PyDoc_STR("FastqFile is deprecated: use FastxFile instead"), /*tp_doc*/
jpayne@69 18058 __pyx_tp_traverse_5pysam_9libcfaidx_FastxFile, /*tp_traverse*/
jpayne@69 18059 __pyx_tp_clear_5pysam_9libcfaidx_FastxFile, /*tp_clear*/
jpayne@69 18060 0, /*tp_richcompare*/
jpayne@69 18061 0, /*tp_weaklistoffset*/
jpayne@69 18062 #if CYTHON_COMPILING_IN_PYPY || 0
jpayne@69 18063 __pyx_pw_5pysam_9libcfaidx_9FastxFile_15__iter__, /*tp_iter*/
jpayne@69 18064 #else
jpayne@69 18065 0, /*tp_iter*/
jpayne@69 18066 #endif
jpayne@69 18067 #if CYTHON_COMPILING_IN_PYPY || 0
jpayne@69 18068 __pyx_pw_5pysam_9libcfaidx_9FastxFile_17__next__, /*tp_iternext*/
jpayne@69 18069 #else
jpayne@69 18070 0, /*tp_iternext*/
jpayne@69 18071 #endif
jpayne@69 18072 __pyx_methods_5pysam_9libcfaidx_FastqFile, /*tp_methods*/
jpayne@69 18073 0, /*tp_members*/
jpayne@69 18074 0, /*tp_getset*/
jpayne@69 18075 0, /*tp_base*/
jpayne@69 18076 0, /*tp_dict*/
jpayne@69 18077 0, /*tp_descr_get*/
jpayne@69 18078 0, /*tp_descr_set*/
jpayne@69 18079 #if !CYTHON_USE_TYPE_SPECS
jpayne@69 18080 0, /*tp_dictoffset*/
jpayne@69 18081 #endif
jpayne@69 18082 0, /*tp_init*/
jpayne@69 18083 0, /*tp_alloc*/
jpayne@69 18084 __pyx_tp_new_5pysam_9libcfaidx_FastqFile, /*tp_new*/
jpayne@69 18085 0, /*tp_free*/
jpayne@69 18086 0, /*tp_is_gc*/
jpayne@69 18087 0, /*tp_bases*/
jpayne@69 18088 0, /*tp_mro*/
jpayne@69 18089 0, /*tp_cache*/
jpayne@69 18090 0, /*tp_subclasses*/
jpayne@69 18091 0, /*tp_weaklist*/
jpayne@69 18092 0, /*tp_del*/
jpayne@69 18093 0, /*tp_version_tag*/
jpayne@69 18094 #if PY_VERSION_HEX >= 0x030400a1
jpayne@69 18095 #if CYTHON_USE_TP_FINALIZE
jpayne@69 18096 0, /*tp_finalize*/
jpayne@69 18097 #else
jpayne@69 18098 NULL, /*tp_finalize*/
jpayne@69 18099 #endif
jpayne@69 18100 #endif
jpayne@69 18101 #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
jpayne@69 18102 0, /*tp_vectorcall*/
jpayne@69 18103 #endif
jpayne@69 18104 #if __PYX_NEED_TP_PRINT_SLOT == 1
jpayne@69 18105 0, /*tp_print*/
jpayne@69 18106 #endif
jpayne@69 18107 #if PY_VERSION_HEX >= 0x030C0000
jpayne@69 18108 0, /*tp_watched*/
jpayne@69 18109 #endif
jpayne@69 18110 #if PY_VERSION_HEX >= 0x030d00A4
jpayne@69 18111 0, /*tp_versions_used*/
jpayne@69 18112 #endif
jpayne@69 18113 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
jpayne@69 18114 0, /*tp_pypy_flags*/
jpayne@69 18115 #endif
jpayne@69 18116 };
jpayne@69 18117 #endif
jpayne@69 18118 static struct __pyx_vtabstruct_5pysam_9libcfaidx_Fastafile __pyx_vtable_5pysam_9libcfaidx_Fastafile;
jpayne@69 18119
jpayne@69 18120 static PyObject *__pyx_tp_new_5pysam_9libcfaidx_Fastafile(PyTypeObject *t, PyObject *a, PyObject *k) {
jpayne@69 18121 struct __pyx_obj_5pysam_9libcfaidx_Fastafile *p;
jpayne@69 18122 PyObject *o = __pyx_tp_new_5pysam_9libcfaidx_FastaFile(t, a, k);
jpayne@69 18123 if (unlikely(!o)) return 0;
jpayne@69 18124 p = ((struct __pyx_obj_5pysam_9libcfaidx_Fastafile *)o);
jpayne@69 18125 p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_5pysam_9libcfaidx_FastaFile*)__pyx_vtabptr_5pysam_9libcfaidx_Fastafile;
jpayne@69 18126 return o;
jpayne@69 18127 }
jpayne@69 18128
jpayne@69 18129 static PyMethodDef __pyx_methods_5pysam_9libcfaidx_Fastafile[] = {
jpayne@69 18130 {"__reduce_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_9libcfaidx_9Fastafile_1__reduce_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_9libcfaidx_9Fastafile___reduce_cython__},
jpayne@69 18131 {"__setstate_cython__", (PyCFunction)(void*)(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_5pysam_9libcfaidx_9Fastafile_3__setstate_cython__, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_5pysam_9libcfaidx_9Fastafile_2__setstate_cython__},
jpayne@69 18132 {0, 0, 0, 0}
jpayne@69 18133 };
jpayne@69 18134 #if CYTHON_USE_TYPE_SPECS
jpayne@69 18135 static PyType_Slot __pyx_type_5pysam_9libcfaidx_Fastafile_slots[] = {
jpayne@69 18136 {Py_tp_doc, (void *)PyDoc_STR("Fastafile is deprecated: use FastaFile instead")},
jpayne@69 18137 {Py_tp_traverse, (void *)__pyx_tp_traverse_5pysam_9libcfaidx_FastaFile},
jpayne@69 18138 {Py_tp_clear, (void *)__pyx_tp_clear_5pysam_9libcfaidx_FastaFile},
jpayne@69 18139 {Py_tp_methods, (void *)__pyx_methods_5pysam_9libcfaidx_Fastafile},
jpayne@69 18140 {Py_tp_new, (void *)__pyx_tp_new_5pysam_9libcfaidx_Fastafile},
jpayne@69 18141 {0, 0},
jpayne@69 18142 };
jpayne@69 18143 static PyType_Spec __pyx_type_5pysam_9libcfaidx_Fastafile_spec = {
jpayne@69 18144 "pysam.libcfaidx.Fastafile",
jpayne@69 18145 sizeof(struct __pyx_obj_5pysam_9libcfaidx_Fastafile),
jpayne@69 18146 0,
jpayne@69 18147 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC,
jpayne@69 18148 __pyx_type_5pysam_9libcfaidx_Fastafile_slots,
jpayne@69 18149 };
jpayne@69 18150 #else
jpayne@69 18151
jpayne@69 18152 static PyTypeObject __pyx_type_5pysam_9libcfaidx_Fastafile = {
jpayne@69 18153 PyVarObject_HEAD_INIT(0, 0)
jpayne@69 18154 "pysam.libcfaidx.""Fastafile", /*tp_name*/
jpayne@69 18155 sizeof(struct __pyx_obj_5pysam_9libcfaidx_Fastafile), /*tp_basicsize*/
jpayne@69 18156 0, /*tp_itemsize*/
jpayne@69 18157 __pyx_tp_dealloc_5pysam_9libcfaidx_FastaFile, /*tp_dealloc*/
jpayne@69 18158 #if PY_VERSION_HEX < 0x030800b4
jpayne@69 18159 0, /*tp_print*/
jpayne@69 18160 #endif
jpayne@69 18161 #if PY_VERSION_HEX >= 0x030800b4
jpayne@69 18162 0, /*tp_vectorcall_offset*/
jpayne@69 18163 #endif
jpayne@69 18164 0, /*tp_getattr*/
jpayne@69 18165 0, /*tp_setattr*/
jpayne@69 18166 #if PY_MAJOR_VERSION < 3
jpayne@69 18167 0, /*tp_compare*/
jpayne@69 18168 #endif
jpayne@69 18169 #if PY_MAJOR_VERSION >= 3
jpayne@69 18170 0, /*tp_as_async*/
jpayne@69 18171 #endif
jpayne@69 18172 0, /*tp_repr*/
jpayne@69 18173 0, /*tp_as_number*/
jpayne@69 18174 0, /*tp_as_sequence*/
jpayne@69 18175 0, /*tp_as_mapping*/
jpayne@69 18176 0, /*tp_hash*/
jpayne@69 18177 0, /*tp_call*/
jpayne@69 18178 0, /*tp_str*/
jpayne@69 18179 0, /*tp_getattro*/
jpayne@69 18180 0, /*tp_setattro*/
jpayne@69 18181 0, /*tp_as_buffer*/
jpayne@69 18182 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
jpayne@69 18183 PyDoc_STR("Fastafile is deprecated: use FastaFile instead"), /*tp_doc*/
jpayne@69 18184 __pyx_tp_traverse_5pysam_9libcfaidx_FastaFile, /*tp_traverse*/
jpayne@69 18185 __pyx_tp_clear_5pysam_9libcfaidx_FastaFile, /*tp_clear*/
jpayne@69 18186 0, /*tp_richcompare*/
jpayne@69 18187 0, /*tp_weaklistoffset*/
jpayne@69 18188 0, /*tp_iter*/
jpayne@69 18189 0, /*tp_iternext*/
jpayne@69 18190 __pyx_methods_5pysam_9libcfaidx_Fastafile, /*tp_methods*/
jpayne@69 18191 0, /*tp_members*/
jpayne@69 18192 0, /*tp_getset*/
jpayne@69 18193 0, /*tp_base*/
jpayne@69 18194 0, /*tp_dict*/
jpayne@69 18195 0, /*tp_descr_get*/
jpayne@69 18196 0, /*tp_descr_set*/
jpayne@69 18197 #if !CYTHON_USE_TYPE_SPECS
jpayne@69 18198 0, /*tp_dictoffset*/
jpayne@69 18199 #endif
jpayne@69 18200 0, /*tp_init*/
jpayne@69 18201 0, /*tp_alloc*/
jpayne@69 18202 __pyx_tp_new_5pysam_9libcfaidx_Fastafile, /*tp_new*/
jpayne@69 18203 0, /*tp_free*/
jpayne@69 18204 0, /*tp_is_gc*/
jpayne@69 18205 0, /*tp_bases*/
jpayne@69 18206 0, /*tp_mro*/
jpayne@69 18207 0, /*tp_cache*/
jpayne@69 18208 0, /*tp_subclasses*/
jpayne@69 18209 0, /*tp_weaklist*/
jpayne@69 18210 0, /*tp_del*/
jpayne@69 18211 0, /*tp_version_tag*/
jpayne@69 18212 #if PY_VERSION_HEX >= 0x030400a1
jpayne@69 18213 #if CYTHON_USE_TP_FINALIZE
jpayne@69 18214 0, /*tp_finalize*/
jpayne@69 18215 #else
jpayne@69 18216 NULL, /*tp_finalize*/
jpayne@69 18217 #endif
jpayne@69 18218 #endif
jpayne@69 18219 #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
jpayne@69 18220 0, /*tp_vectorcall*/
jpayne@69 18221 #endif
jpayne@69 18222 #if __PYX_NEED_TP_PRINT_SLOT == 1
jpayne@69 18223 0, /*tp_print*/
jpayne@69 18224 #endif
jpayne@69 18225 #if PY_VERSION_HEX >= 0x030C0000
jpayne@69 18226 0, /*tp_watched*/
jpayne@69 18227 #endif
jpayne@69 18228 #if PY_VERSION_HEX >= 0x030d00A4
jpayne@69 18229 0, /*tp_versions_used*/
jpayne@69 18230 #endif
jpayne@69 18231 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
jpayne@69 18232 0, /*tp_pypy_flags*/
jpayne@69 18233 #endif
jpayne@69 18234 };
jpayne@69 18235 #endif
jpayne@69 18236
jpayne@69 18237 static PyMethodDef __pyx_methods[] = {
jpayne@69 18238 {0, 0, 0, 0}
jpayne@69 18239 };
jpayne@69 18240 #ifndef CYTHON_SMALL_CODE
jpayne@69 18241 #if defined(__clang__)
jpayne@69 18242 #define CYTHON_SMALL_CODE
jpayne@69 18243 #elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3))
jpayne@69 18244 #define CYTHON_SMALL_CODE __attribute__((cold))
jpayne@69 18245 #else
jpayne@69 18246 #define CYTHON_SMALL_CODE
jpayne@69 18247 #endif
jpayne@69 18248 #endif
jpayne@69 18249 /* #### Code section: pystring_table ### */
jpayne@69 18250
jpayne@69 18251 static int __Pyx_CreateStringTabAndInitStrings(void) {
jpayne@69 18252 __Pyx_StringTabEntry __pyx_string_tab[] = {
jpayne@69 18253 {&__pyx_n_s_FastaFile, __pyx_k_FastaFile, sizeof(__pyx_k_FastaFile), 0, 0, 1, 1},
jpayne@69 18254 {&__pyx_n_u_FastaFile, __pyx_k_FastaFile, sizeof(__pyx_k_FastaFile), 0, 1, 0, 1},
jpayne@69 18255 {&__pyx_n_s_FastaFile___enter, __pyx_k_FastaFile___enter, sizeof(__pyx_k_FastaFile___enter), 0, 0, 1, 1},
jpayne@69 18256 {&__pyx_n_s_FastaFile___exit, __pyx_k_FastaFile___exit, sizeof(__pyx_k_FastaFile___exit), 0, 0, 1, 1},
jpayne@69 18257 {&__pyx_n_s_FastaFile___reduce_cython, __pyx_k_FastaFile___reduce_cython, sizeof(__pyx_k_FastaFile___reduce_cython), 0, 0, 1, 1},
jpayne@69 18258 {&__pyx_n_s_FastaFile___setstate_cython, __pyx_k_FastaFile___setstate_cython, sizeof(__pyx_k_FastaFile___setstate_cython), 0, 0, 1, 1},
jpayne@69 18259 {&__pyx_n_s_FastaFile__open, __pyx_k_FastaFile__open, sizeof(__pyx_k_FastaFile__open), 0, 0, 1, 1},
jpayne@69 18260 {&__pyx_n_s_FastaFile_close, __pyx_k_FastaFile_close, sizeof(__pyx_k_FastaFile_close), 0, 0, 1, 1},
jpayne@69 18261 {&__pyx_n_s_FastaFile_fetch, __pyx_k_FastaFile_fetch, sizeof(__pyx_k_FastaFile_fetch), 0, 0, 1, 1},
jpayne@69 18262 {&__pyx_n_s_FastaFile_get_reference_length, __pyx_k_FastaFile_get_reference_length, sizeof(__pyx_k_FastaFile_get_reference_length), 0, 0, 1, 1},
jpayne@69 18263 {&__pyx_n_s_FastaFile_is_open, __pyx_k_FastaFile_is_open, sizeof(__pyx_k_FastaFile_is_open), 0, 0, 1, 1},
jpayne@69 18264 {&__pyx_n_s_Fastafile, __pyx_k_Fastafile, sizeof(__pyx_k_Fastafile), 0, 0, 1, 1},
jpayne@69 18265 {&__pyx_n_u_Fastafile, __pyx_k_Fastafile, sizeof(__pyx_k_Fastafile), 0, 1, 0, 1},
jpayne@69 18266 {&__pyx_n_s_Fastafile___reduce_cython, __pyx_k_Fastafile___reduce_cython, sizeof(__pyx_k_Fastafile___reduce_cython), 0, 0, 1, 1},
jpayne@69 18267 {&__pyx_n_s_Fastafile___setstate_cython, __pyx_k_Fastafile___setstate_cython, sizeof(__pyx_k_Fastafile___setstate_cython), 0, 0, 1, 1},
jpayne@69 18268 {&__pyx_n_s_FastqFile, __pyx_k_FastqFile, sizeof(__pyx_k_FastqFile), 0, 0, 1, 1},
jpayne@69 18269 {&__pyx_n_u_FastqFile, __pyx_k_FastqFile, sizeof(__pyx_k_FastqFile), 0, 1, 0, 1},
jpayne@69 18270 {&__pyx_n_s_FastqFile___reduce_cython, __pyx_k_FastqFile___reduce_cython, sizeof(__pyx_k_FastqFile___reduce_cython), 0, 0, 1, 1},
jpayne@69 18271 {&__pyx_n_s_FastqFile___setstate_cython, __pyx_k_FastqFile___setstate_cython, sizeof(__pyx_k_FastqFile___setstate_cython), 0, 0, 1, 1},
jpayne@69 18272 {&__pyx_n_s_FastqProxy, __pyx_k_FastqProxy, sizeof(__pyx_k_FastqProxy), 0, 0, 1, 1},
jpayne@69 18273 {&__pyx_n_u_FastqProxy, __pyx_k_FastqProxy, sizeof(__pyx_k_FastqProxy), 0, 1, 0, 1},
jpayne@69 18274 {&__pyx_n_s_FastqProxy___reduce_cython, __pyx_k_FastqProxy___reduce_cython, sizeof(__pyx_k_FastqProxy___reduce_cython), 0, 0, 1, 1},
jpayne@69 18275 {&__pyx_n_s_FastqProxy___setstate_cython, __pyx_k_FastqProxy___setstate_cython, sizeof(__pyx_k_FastqProxy___setstate_cython), 0, 0, 1, 1},
jpayne@69 18276 {&__pyx_n_s_FastqProxy_get_quality_array, __pyx_k_FastqProxy_get_quality_array, sizeof(__pyx_k_FastqProxy_get_quality_array), 0, 0, 1, 1},
jpayne@69 18277 {&__pyx_n_s_FastxFile, __pyx_k_FastxFile, sizeof(__pyx_k_FastxFile), 0, 0, 1, 1},
jpayne@69 18278 {&__pyx_n_u_FastxFile, __pyx_k_FastxFile, sizeof(__pyx_k_FastxFile), 0, 1, 0, 1},
jpayne@69 18279 {&__pyx_n_s_FastxFile___enter, __pyx_k_FastxFile___enter, sizeof(__pyx_k_FastxFile___enter), 0, 0, 1, 1},
jpayne@69 18280 {&__pyx_n_s_FastxFile___exit, __pyx_k_FastxFile___exit, sizeof(__pyx_k_FastxFile___exit), 0, 0, 1, 1},
jpayne@69 18281 {&__pyx_n_s_FastxFile___reduce_cython, __pyx_k_FastxFile___reduce_cython, sizeof(__pyx_k_FastxFile___reduce_cython), 0, 0, 1, 1},
jpayne@69 18282 {&__pyx_n_s_FastxFile___setstate_cython, __pyx_k_FastxFile___setstate_cython, sizeof(__pyx_k_FastxFile___setstate_cython), 0, 0, 1, 1},
jpayne@69 18283 {&__pyx_n_s_FastxFile__open, __pyx_k_FastxFile__open, sizeof(__pyx_k_FastxFile__open), 0, 0, 1, 1},
jpayne@69 18284 {&__pyx_n_s_FastxFile_close, __pyx_k_FastxFile_close, sizeof(__pyx_k_FastxFile_close), 0, 0, 1, 1},
jpayne@69 18285 {&__pyx_n_s_FastxFile_is_open, __pyx_k_FastxFile_is_open, sizeof(__pyx_k_FastxFile_is_open), 0, 0, 1, 1},
jpayne@69 18286 {&__pyx_n_s_FastxRecord, __pyx_k_FastxRecord, sizeof(__pyx_k_FastxRecord), 0, 0, 1, 1},
jpayne@69 18287 {&__pyx_n_u_FastxRecord, __pyx_k_FastxRecord, sizeof(__pyx_k_FastxRecord), 0, 1, 0, 1},
jpayne@69 18288 {&__pyx_n_s_FastxRecord___copy, __pyx_k_FastxRecord___copy, sizeof(__pyx_k_FastxRecord___copy), 0, 0, 1, 1},
jpayne@69 18289 {&__pyx_n_s_FastxRecord___deepcopy, __pyx_k_FastxRecord___deepcopy, sizeof(__pyx_k_FastxRecord___deepcopy), 0, 0, 1, 1},
jpayne@69 18290 {&__pyx_n_s_FastxRecord___reduce_cython, __pyx_k_FastxRecord___reduce_cython, sizeof(__pyx_k_FastxRecord___reduce_cython), 0, 0, 1, 1},
jpayne@69 18291 {&__pyx_n_s_FastxRecord___setstate_cython, __pyx_k_FastxRecord___setstate_cython, sizeof(__pyx_k_FastxRecord___setstate_cython), 0, 0, 1, 1},
jpayne@69 18292 {&__pyx_n_s_FastxRecord_get_quality_array, __pyx_k_FastxRecord_get_quality_array, sizeof(__pyx_k_FastxRecord_get_quality_array), 0, 0, 1, 1},
jpayne@69 18293 {&__pyx_kp_u_FastxRecord_must_have_a_name_and, __pyx_k_FastxRecord_must_have_a_name_and, sizeof(__pyx_k_FastxRecord_must_have_a_name_and), 0, 1, 0, 0},
jpayne@69 18294 {&__pyx_n_s_FastxRecord_set_comment, __pyx_k_FastxRecord_set_comment, sizeof(__pyx_k_FastxRecord_set_comment), 0, 0, 1, 1},
jpayne@69 18295 {&__pyx_n_s_FastxRecord_set_name, __pyx_k_FastxRecord_set_name, sizeof(__pyx_k_FastxRecord_set_name), 0, 0, 1, 1},
jpayne@69 18296 {&__pyx_n_s_FastxRecord_set_sequence, __pyx_k_FastxRecord_set_sequence, sizeof(__pyx_k_FastxRecord_set_sequence), 0, 0, 1, 1},
jpayne@69 18297 {&__pyx_n_s_IOError, __pyx_k_IOError, sizeof(__pyx_k_IOError), 0, 0, 1, 1},
jpayne@69 18298 {&__pyx_kp_u_I_O_operation_on_closed_file, __pyx_k_I_O_operation_on_closed_file, sizeof(__pyx_k_I_O_operation_on_closed_file), 0, 1, 0, 0},
jpayne@69 18299 {&__pyx_kp_s_Incompatible_checksums_0x_x_vs_0, __pyx_k_Incompatible_checksums_0x_x_vs_0, sizeof(__pyx_k_Incompatible_checksums_0x_x_vs_0), 0, 0, 1, 0},
jpayne@69 18300 {&__pyx_n_s_KeyError, __pyx_k_KeyError, sizeof(__pyx_k_KeyError), 0, 0, 1, 1},
jpayne@69 18301 {&__pyx_n_s_MemoryError, __pyx_k_MemoryError, sizeof(__pyx_k_MemoryError), 0, 0, 1, 1},
jpayne@69 18302 {&__pyx_kp_u_None, __pyx_k_None, sizeof(__pyx_k_None), 0, 1, 0, 0},
jpayne@69 18303 {&__pyx_n_s_PickleError, __pyx_k_PickleError, sizeof(__pyx_k_PickleError), 0, 0, 1, 1},
jpayne@69 18304 {&__pyx_n_s_StopIteration, __pyx_k_StopIteration, sizeof(__pyx_k_StopIteration), 0, 0, 1, 1},
jpayne@69 18305 {&__pyx_n_s_TypeError, __pyx_k_TypeError, sizeof(__pyx_k_TypeError), 0, 0, 1, 1},
jpayne@69 18306 {&__pyx_n_s_ValueError, __pyx_k_ValueError, sizeof(__pyx_k_ValueError), 0, 0, 1, 1},
jpayne@69 18307 {&__pyx_kp_u__11, __pyx_k__11, sizeof(__pyx_k__11), 0, 1, 0, 0},
jpayne@69 18308 {&__pyx_kp_u__16, __pyx_k__16, sizeof(__pyx_k__16), 0, 1, 0, 0},
jpayne@69 18309 {&__pyx_kp_u__17, __pyx_k__17, sizeof(__pyx_k__17), 0, 1, 0, 0},
jpayne@69 18310 {&__pyx_kp_u__18, __pyx_k__18, sizeof(__pyx_k__18), 0, 1, 0, 0},
jpayne@69 18311 {&__pyx_kp_u__19, __pyx_k__19, sizeof(__pyx_k__19), 0, 1, 0, 0},
jpayne@69 18312 {&__pyx_kp_b__4, __pyx_k__4, sizeof(__pyx_k__4), 0, 0, 0, 0},
jpayne@69 18313 {&__pyx_kp_u__47, __pyx_k__47, sizeof(__pyx_k__47), 0, 1, 0, 0},
jpayne@69 18314 {&__pyx_n_s__48, __pyx_k__48, sizeof(__pyx_k__48), 0, 0, 1, 1},
jpayne@69 18315 {&__pyx_n_s__68, __pyx_k__68, sizeof(__pyx_k__68), 0, 0, 1, 1},
jpayne@69 18316 {&__pyx_n_s_all, __pyx_k_all, sizeof(__pyx_k_all), 0, 0, 1, 1},
jpayne@69 18317 {&__pyx_n_s_append, __pyx_k_append, sizeof(__pyx_k_append), 0, 0, 1, 1},
jpayne@69 18318 {&__pyx_n_s_asyncio_coroutines, __pyx_k_asyncio_coroutines, sizeof(__pyx_k_asyncio_coroutines), 0, 0, 1, 1},
jpayne@69 18319 {&__pyx_n_s_bindex_filename, __pyx_k_bindex_filename, sizeof(__pyx_k_bindex_filename), 0, 0, 1, 1},
jpayne@69 18320 {&__pyx_n_s_bindex_filename_compressed, __pyx_k_bindex_filename_compressed, sizeof(__pyx_k_bindex_filename_compressed), 0, 0, 1, 1},
jpayne@69 18321 {&__pyx_kp_u_calling_len_on_closed_file, __pyx_k_calling_len_on_closed_file, sizeof(__pyx_k_calling_len_on_closed_file), 0, 1, 0, 0},
jpayne@69 18322 {&__pyx_kp_u_can_not_write_record_without_a_s, __pyx_k_can_not_write_record_without_a_s, sizeof(__pyx_k_can_not_write_record_without_a_s), 0, 1, 0, 0},
jpayne@69 18323 {&__pyx_kp_u_can_not_write_record_without_nam, __pyx_k_can_not_write_record_without_nam, sizeof(__pyx_k_can_not_write_record_without_nam), 0, 1, 0, 0},
jpayne@69 18324 {&__pyx_n_s_cfilename, __pyx_k_cfilename, sizeof(__pyx_k_cfilename), 0, 0, 1, 1},
jpayne@69 18325 {&__pyx_n_s_cindexname, __pyx_k_cindexname, sizeof(__pyx_k_cindexname), 0, 0, 1, 1},
jpayne@69 18326 {&__pyx_n_s_cindexname_compressed, __pyx_k_cindexname_compressed, sizeof(__pyx_k_cindexname_compressed), 0, 0, 1, 1},
jpayne@69 18327 {&__pyx_n_s_class_getitem, __pyx_k_class_getitem, sizeof(__pyx_k_class_getitem), 0, 0, 1, 1},
jpayne@69 18328 {&__pyx_n_s_cline_in_traceback, __pyx_k_cline_in_traceback, sizeof(__pyx_k_cline_in_traceback), 0, 0, 1, 1},
jpayne@69 18329 {&__pyx_n_s_close, __pyx_k_close, sizeof(__pyx_k_close), 0, 0, 1, 1},
jpayne@69 18330 {&__pyx_n_s_comment, __pyx_k_comment, sizeof(__pyx_k_comment), 0, 0, 1, 1},
jpayne@69 18331 {&__pyx_n_s_contig, __pyx_k_contig, sizeof(__pyx_k_contig), 0, 0, 1, 1},
jpayne@69 18332 {&__pyx_n_s_contig_b, __pyx_k_contig_b, sizeof(__pyx_k_contig_b), 0, 0, 1, 1},
jpayne@69 18333 {&__pyx_n_s_copy, __pyx_k_copy, sizeof(__pyx_k_copy), 0, 0, 1, 1},
jpayne@69 18334 {&__pyx_n_s_deepcopy, __pyx_k_deepcopy, sizeof(__pyx_k_deepcopy), 0, 0, 1, 1},
jpayne@69 18335 {&__pyx_n_s_dict, __pyx_k_dict, sizeof(__pyx_k_dict), 0, 0, 1, 1},
jpayne@69 18336 {&__pyx_n_s_dict_2, __pyx_k_dict_2, sizeof(__pyx_k_dict_2), 0, 0, 1, 1},
jpayne@69 18337 {&__pyx_kp_u_disable, __pyx_k_disable, sizeof(__pyx_k_disable), 0, 1, 0, 0},
jpayne@69 18338 {&__pyx_kp_u_do_not_instantiate_FastqProxy_di, __pyx_k_do_not_instantiate_FastqProxy_di, sizeof(__pyx_k_do_not_instantiate_FastqProxy_di), 0, 1, 0, 0},
jpayne@69 18339 {&__pyx_kp_u_enable, __pyx_k_enable, sizeof(__pyx_k_enable), 0, 1, 0, 0},
jpayne@69 18340 {&__pyx_n_s_end, __pyx_k_end, sizeof(__pyx_k_end), 0, 0, 1, 1},
jpayne@69 18341 {&__pyx_n_s_enter, __pyx_k_enter, sizeof(__pyx_k_enter), 0, 0, 1, 1},
jpayne@69 18342 {&__pyx_kp_u_error_when_opening_file_s, __pyx_k_error_when_opening_file_s, sizeof(__pyx_k_error_when_opening_file_s), 0, 1, 0, 0},
jpayne@69 18343 {&__pyx_n_s_exc_type, __pyx_k_exc_type, sizeof(__pyx_k_exc_type), 0, 0, 1, 1},
jpayne@69 18344 {&__pyx_n_s_exc_value, __pyx_k_exc_value, sizeof(__pyx_k_exc_value), 0, 0, 1, 1},
jpayne@69 18345 {&__pyx_n_s_exists, __pyx_k_exists, sizeof(__pyx_k_exists), 0, 0, 1, 1},
jpayne@69 18346 {&__pyx_n_s_exit, __pyx_k_exit, sizeof(__pyx_k_exit), 0, 0, 1, 1},
jpayne@69 18347 {&__pyx_kp_u_failure_when_retrieving_sequence, __pyx_k_failure_when_retrieving_sequence, sizeof(__pyx_k_failure_when_retrieving_sequence), 0, 1, 0, 0},
jpayne@69 18348 {&__pyx_n_s_fetch, __pyx_k_fetch, sizeof(__pyx_k_fetch), 0, 0, 1, 1},
jpayne@69 18349 {&__pyx_kp_u_file_s_not_found, __pyx_k_file_s_not_found, sizeof(__pyx_k_file_s_not_found), 0, 1, 0, 0},
jpayne@69 18350 {&__pyx_n_s_filename, __pyx_k_filename, sizeof(__pyx_k_filename), 0, 0, 1, 1},
jpayne@69 18351 {&__pyx_kp_u_filename_does_not_exist, __pyx_k_filename_does_not_exist, sizeof(__pyx_k_filename_does_not_exist), 0, 1, 0, 0},
jpayne@69 18352 {&__pyx_n_s_filepath_index, __pyx_k_filepath_index, sizeof(__pyx_k_filepath_index), 0, 0, 1, 1},
jpayne@69 18353 {&__pyx_n_s_filepath_index_compressed, __pyx_k_filepath_index_compressed, sizeof(__pyx_k_filepath_index_compressed), 0, 0, 1, 1},
jpayne@69 18354 {&__pyx_n_s_format, __pyx_k_format, sizeof(__pyx_k_format), 0, 0, 1, 1},
jpayne@69 18355 {&__pyx_kp_u_gc, __pyx_k_gc, sizeof(__pyx_k_gc), 0, 1, 0, 0},
jpayne@69 18356 {&__pyx_n_s_get_quality_array, __pyx_k_get_quality_array, sizeof(__pyx_k_get_quality_array), 0, 0, 1, 1},
jpayne@69 18357 {&__pyx_n_s_get_reference_length, __pyx_k_get_reference_length, sizeof(__pyx_k_get_reference_length), 0, 0, 1, 1},
jpayne@69 18358 {&__pyx_n_s_getstate, __pyx_k_getstate, sizeof(__pyx_k_getstate), 0, 0, 1, 1},
jpayne@69 18359 {&__pyx_n_s_import, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1},
jpayne@69 18360 {&__pyx_n_s_initializing, __pyx_k_initializing, sizeof(__pyx_k_initializing), 0, 0, 1, 1},
jpayne@69 18361 {&__pyx_n_s_is_coroutine, __pyx_k_is_coroutine, sizeof(__pyx_k_is_coroutine), 0, 0, 1, 1},
jpayne@69 18362 {&__pyx_n_s_is_open, __pyx_k_is_open, sizeof(__pyx_k_is_open), 0, 0, 1, 1},
jpayne@69 18363 {&__pyx_kp_u_isenabled, __pyx_k_isenabled, sizeof(__pyx_k_isenabled), 0, 1, 0, 0},
jpayne@69 18364 {&__pyx_n_s_length, __pyx_k_length, sizeof(__pyx_k_length), 0, 0, 1, 1},
jpayne@69 18365 {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1},
jpayne@69 18366 {&__pyx_n_s_memo, __pyx_k_memo, sizeof(__pyx_k_memo), 0, 0, 1, 1},
jpayne@69 18367 {&__pyx_n_s_name, __pyx_k_name, sizeof(__pyx_k_name), 0, 0, 1, 1},
jpayne@69 18368 {&__pyx_n_s_name_2, __pyx_k_name_2, sizeof(__pyx_k_name_2), 0, 0, 1, 1},
jpayne@69 18369 {&__pyx_n_s_new, __pyx_k_new, sizeof(__pyx_k_new), 0, 0, 1, 1},
jpayne@69 18370 {&__pyx_kp_s_no_default___reduce___due_to_non, __pyx_k_no_default___reduce___due_to_non, sizeof(__pyx_k_no_default___reduce___due_to_non), 0, 0, 1, 0},
jpayne@69 18371 {&__pyx_kp_u_no_sequence_region_supplied, __pyx_k_no_sequence_region_supplied, sizeof(__pyx_k_no_sequence_region_supplied), 0, 1, 0, 0},
jpayne@69 18372 {&__pyx_n_s_nreferences, __pyx_k_nreferences, sizeof(__pyx_k_nreferences), 0, 0, 1, 1},
jpayne@69 18373 {&__pyx_n_s_offset, __pyx_k_offset, sizeof(__pyx_k_offset), 0, 0, 1, 1},
jpayne@69 18374 {&__pyx_n_s_open, __pyx_k_open, sizeof(__pyx_k_open), 0, 0, 1, 1},
jpayne@69 18375 {&__pyx_n_s_os, __pyx_k_os, sizeof(__pyx_k_os), 0, 0, 1, 1},
jpayne@69 18376 {&__pyx_n_s_path, __pyx_k_path, sizeof(__pyx_k_path), 0, 0, 1, 1},
jpayne@69 18377 {&__pyx_n_s_persist, __pyx_k_persist, sizeof(__pyx_k_persist), 0, 0, 1, 1},
jpayne@69 18378 {&__pyx_n_s_pickle, __pyx_k_pickle, sizeof(__pyx_k_pickle), 0, 0, 1, 1},
jpayne@69 18379 {&__pyx_n_s_proxy, __pyx_k_proxy, sizeof(__pyx_k_proxy), 0, 0, 1, 1},
jpayne@69 18380 {&__pyx_n_s_pysam_libcfaidx, __pyx_k_pysam_libcfaidx, sizeof(__pyx_k_pysam_libcfaidx), 0, 0, 1, 1},
jpayne@69 18381 {&__pyx_kp_s_pysam_libcfaidx_pyx, __pyx_k_pysam_libcfaidx_pyx, sizeof(__pyx_k_pysam_libcfaidx_pyx), 0, 0, 1, 0},
jpayne@69 18382 {&__pyx_n_s_pyx_PickleError, __pyx_k_pyx_PickleError, sizeof(__pyx_k_pyx_PickleError), 0, 0, 1, 1},
jpayne@69 18383 {&__pyx_n_s_pyx_checksum, __pyx_k_pyx_checksum, sizeof(__pyx_k_pyx_checksum), 0, 0, 1, 1},
jpayne@69 18384 {&__pyx_n_s_pyx_result, __pyx_k_pyx_result, sizeof(__pyx_k_pyx_result), 0, 0, 1, 1},
jpayne@69 18385 {&__pyx_n_s_pyx_state, __pyx_k_pyx_state, sizeof(__pyx_k_pyx_state), 0, 0, 1, 1},
jpayne@69 18386 {&__pyx_n_s_pyx_type, __pyx_k_pyx_type, sizeof(__pyx_k_pyx_type), 0, 0, 1, 1},
jpayne@69 18387 {&__pyx_n_s_pyx_unpickle_FastxRecord, __pyx_k_pyx_unpickle_FastxRecord, sizeof(__pyx_k_pyx_unpickle_FastxRecord), 0, 0, 1, 1},
jpayne@69 18388 {&__pyx_n_s_pyx_vtable, __pyx_k_pyx_vtable, sizeof(__pyx_k_pyx_vtable), 0, 0, 1, 1},
jpayne@69 18389 {&__pyx_n_s_quality, __pyx_k_quality, sizeof(__pyx_k_quality), 0, 0, 1, 1},
jpayne@69 18390 {&__pyx_n_s_re, __pyx_k_re, sizeof(__pyx_k_re), 0, 0, 1, 1},
jpayne@69 18391 {&__pyx_n_s_reduce, __pyx_k_reduce, sizeof(__pyx_k_reduce), 0, 0, 1, 1},
jpayne@69 18392 {&__pyx_n_s_reduce_cython, __pyx_k_reduce_cython, sizeof(__pyx_k_reduce_cython), 0, 0, 1, 1},
jpayne@69 18393 {&__pyx_n_s_reduce_ex, __pyx_k_reduce_ex, sizeof(__pyx_k_reduce_ex), 0, 0, 1, 1},
jpayne@69 18394 {&__pyx_n_s_ref, __pyx_k_ref, sizeof(__pyx_k_ref), 0, 0, 1, 1},
jpayne@69 18395 {&__pyx_n_s_reference, __pyx_k_reference, sizeof(__pyx_k_reference), 0, 0, 1, 1},
jpayne@69 18396 {&__pyx_n_s_references, __pyx_k_references, sizeof(__pyx_k_references), 0, 0, 1, 1},
jpayne@69 18397 {&__pyx_n_s_region, __pyx_k_region, sizeof(__pyx_k_region), 0, 0, 1, 1},
jpayne@69 18398 {&__pyx_n_s_rend, __pyx_k_rend, sizeof(__pyx_k_rend), 0, 0, 1, 1},
jpayne@69 18399 {&__pyx_n_s_rstart, __pyx_k_rstart, sizeof(__pyx_k_rstart), 0, 0, 1, 1},
jpayne@69 18400 {&__pyx_kp_u_s, __pyx_k_s, sizeof(__pyx_k_s), 0, 1, 0, 0},
jpayne@69 18401 {&__pyx_n_s_s_2, __pyx_k_s_2, sizeof(__pyx_k_s_2), 0, 0, 1, 1},
jpayne@69 18402 {&__pyx_n_s_self, __pyx_k_self, sizeof(__pyx_k_self), 0, 0, 1, 1},
jpayne@69 18403 {&__pyx_kp_s_self__delegate_cannot_be_convert, __pyx_k_self__delegate_cannot_be_convert, sizeof(__pyx_k_self__delegate_cannot_be_convert), 0, 0, 1, 0},
jpayne@69 18404 {&__pyx_n_s_seq, __pyx_k_seq, sizeof(__pyx_k_seq), 0, 0, 1, 1},
jpayne@69 18405 {&__pyx_n_s_sequence, __pyx_k_sequence, sizeof(__pyx_k_sequence), 0, 0, 1, 1},
jpayne@69 18406 {&__pyx_kp_u_sequence_and_quality_length_do_n, __pyx_k_sequence_and_quality_length_do_n, sizeof(__pyx_k_sequence_and_quality_length_do_n), 0, 1, 0, 0},
jpayne@69 18407 {&__pyx_kp_u_sequence_s_not_present, __pyx_k_sequence_s_not_present, sizeof(__pyx_k_sequence_s_not_present), 0, 1, 0, 0},
jpayne@69 18408 {&__pyx_n_s_set_comment, __pyx_k_set_comment, sizeof(__pyx_k_set_comment), 0, 0, 1, 1},
jpayne@69 18409 {&__pyx_n_s_set_name, __pyx_k_set_name, sizeof(__pyx_k_set_name), 0, 0, 1, 1},
jpayne@69 18410 {&__pyx_n_s_set_sequence, __pyx_k_set_sequence, sizeof(__pyx_k_set_sequence), 0, 0, 1, 1},
jpayne@69 18411 {&__pyx_n_s_setstate, __pyx_k_setstate, sizeof(__pyx_k_setstate), 0, 0, 1, 1},
jpayne@69 18412 {&__pyx_n_s_setstate_cython, __pyx_k_setstate_cython, sizeof(__pyx_k_setstate_cython), 0, 0, 1, 1},
jpayne@69 18413 {&__pyx_n_s_spec, __pyx_k_spec, sizeof(__pyx_k_spec), 0, 0, 1, 1},
jpayne@69 18414 {&__pyx_n_s_ss, __pyx_k_ss, sizeof(__pyx_k_ss), 0, 0, 1, 1},
jpayne@69 18415 {&__pyx_n_s_start, __pyx_k_start, sizeof(__pyx_k_start), 0, 0, 1, 1},
jpayne@69 18416 {&__pyx_n_s_state, __pyx_k_state, sizeof(__pyx_k_state), 0, 0, 1, 1},
jpayne@69 18417 {&__pyx_kp_s_stringsource, __pyx_k_stringsource, sizeof(__pyx_k_stringsource), 0, 0, 1, 0},
jpayne@69 18418 {&__pyx_n_s_sys, __pyx_k_sys, sizeof(__pyx_k_sys), 0, 0, 1, 1},
jpayne@69 18419 {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1},
jpayne@69 18420 {&__pyx_n_s_traceback, __pyx_k_traceback, sizeof(__pyx_k_traceback), 0, 0, 1, 1},
jpayne@69 18421 {&__pyx_kp_u_truncated_quality_string_in_0, __pyx_k_truncated_quality_string_in_0, sizeof(__pyx_k_truncated_quality_string_in_0), 0, 1, 0, 0},
jpayne@69 18422 {&__pyx_kp_u_unknown_problem_parsing_0, __pyx_k_unknown_problem_parsing_0, sizeof(__pyx_k_unknown_problem_parsing_0), 0, 1, 0, 0},
jpayne@69 18423 {&__pyx_n_s_update, __pyx_k_update, sizeof(__pyx_k_update), 0, 0, 1, 1},
jpayne@69 18424 {&__pyx_n_s_use_setstate, __pyx_k_use_setstate, sizeof(__pyx_k_use_setstate), 0, 0, 1, 1},
jpayne@69 18425 {&__pyx_n_s_x, __pyx_k_x, sizeof(__pyx_k_x), 0, 0, 1, 1},
jpayne@69 18426 {&__pyx_n_s_zip, __pyx_k_zip, sizeof(__pyx_k_zip), 0, 0, 1, 1},
jpayne@69 18427 {0, 0, 0, 0, 0, 0, 0}
jpayne@69 18428 };
jpayne@69 18429 return __Pyx_InitStrings(__pyx_string_tab);
jpayne@69 18430 }
jpayne@69 18431 /* #### Code section: cached_builtins ### */
jpayne@69 18432 static CYTHON_SMALL_CODE int __Pyx_InitCachedBuiltins(void) {
jpayne@69 18433 __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) __PYX_ERR(0, 129, __pyx_L1_error)
jpayne@69 18434 __pyx_builtin_IOError = __Pyx_GetBuiltinName(__pyx_n_s_IOError); if (!__pyx_builtin_IOError) __PYX_ERR(0, 153, __pyx_L1_error)
jpayne@69 18435 __pyx_builtin_zip = __Pyx_GetBuiltinName(__pyx_n_s_zip); if (!__pyx_builtin_zip) __PYX_ERR(0, 193, __pyx_L1_error)
jpayne@69 18436 __pyx_builtin_KeyError = __Pyx_GetBuiltinName(__pyx_n_s_KeyError); if (!__pyx_builtin_KeyError) __PYX_ERR(0, 301, __pyx_L1_error)
jpayne@69 18437 __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) __PYX_ERR(1, 2, __pyx_L1_error)
jpayne@69 18438 __pyx_builtin_StopIteration = __Pyx_GetBuiltinName(__pyx_n_s_StopIteration); if (!__pyx_builtin_StopIteration) __PYX_ERR(0, 649, __pyx_L1_error)
jpayne@69 18439 __pyx_builtin_MemoryError = __Pyx_GetBuiltinName(__pyx_n_s_MemoryError); if (!__pyx_builtin_MemoryError) __PYX_ERR(3, 120, __pyx_L1_error)
jpayne@69 18440 return 0;
jpayne@69 18441 __pyx_L1_error:;
jpayne@69 18442 return -1;
jpayne@69 18443 }
jpayne@69 18444 /* #### Code section: cached_constants ### */
jpayne@69 18445
jpayne@69 18446 static CYTHON_SMALL_CODE int __Pyx_InitCachedConstants(void) {
jpayne@69 18447 __Pyx_RefNannyDeclarations
jpayne@69 18448 __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants", 0);
jpayne@69 18449
jpayne@69 18450 /* "pysam/libcfaidx.pyx":129
jpayne@69 18451 * def __len__(self):
jpayne@69 18452 * if self.fastafile == NULL:
jpayne@69 18453 * raise ValueError("calling len() on closed file") # <<<<<<<<<<<<<<
jpayne@69 18454 *
jpayne@69 18455 * return faidx_nseq(self.fastafile)
jpayne@69 18456 */
jpayne@69 18457 __pyx_tuple__2 = PyTuple_Pack(1, __pyx_kp_u_calling_len_on_closed_file); if (unlikely(!__pyx_tuple__2)) __PYX_ERR(0, 129, __pyx_L1_error)
jpayne@69 18458 __Pyx_GOTREF(__pyx_tuple__2);
jpayne@69 18459 __Pyx_GIVEREF(__pyx_tuple__2);
jpayne@69 18460
jpayne@69 18461 /* "pysam/libcfaidx.pyx":281
jpayne@69 18462 *
jpayne@69 18463 * if not self.is_open():
jpayne@69 18464 * raise ValueError("I/O operation on closed file" ) # <<<<<<<<<<<<<<
jpayne@69 18465 *
jpayne@69 18466 * cdef int length
jpayne@69 18467 */
jpayne@69 18468 __pyx_tuple__9 = PyTuple_Pack(1, __pyx_kp_u_I_O_operation_on_closed_file); if (unlikely(!__pyx_tuple__9)) __PYX_ERR(0, 281, __pyx_L1_error)
jpayne@69 18469 __Pyx_GOTREF(__pyx_tuple__9);
jpayne@69 18470 __Pyx_GIVEREF(__pyx_tuple__9);
jpayne@69 18471
jpayne@69 18472 /* "pysam/libcfaidx.pyx":291
jpayne@69 18473 *
jpayne@69 18474 * if contig is None:
jpayne@69 18475 * raise ValueError("no sequence/region supplied.") # <<<<<<<<<<<<<<
jpayne@69 18476 *
jpayne@69 18477 * if rstart == rend:
jpayne@69 18478 */
jpayne@69 18479 __pyx_tuple__10 = PyTuple_Pack(1, __pyx_kp_u_no_sequence_region_supplied); if (unlikely(!__pyx_tuple__10)) __PYX_ERR(0, 291, __pyx_L1_error)
jpayne@69 18480 __Pyx_GOTREF(__pyx_tuple__10);
jpayne@69 18481 __Pyx_GIVEREF(__pyx_tuple__10);
jpayne@69 18482
jpayne@69 18483 /* "pysam/libcfaidx.pyx":358
jpayne@69 18484 * """A single entry in a fastq file."""
jpayne@69 18485 * def __init__(self):
jpayne@69 18486 * raise ValueError("do not instantiate FastqProxy directly") # <<<<<<<<<<<<<<
jpayne@69 18487 *
jpayne@69 18488 * property name:
jpayne@69 18489 */
jpayne@69 18490 __pyx_tuple__15 = PyTuple_Pack(1, __pyx_kp_u_do_not_instantiate_FastqProxy_di); if (unlikely(!__pyx_tuple__15)) __PYX_ERR(0, 358, __pyx_L1_error)
jpayne@69 18491 __Pyx_GOTREF(__pyx_tuple__15);
jpayne@69 18492 __Pyx_GIVEREF(__pyx_tuple__15);
jpayne@69 18493
jpayne@69 18494 /* "pysam/libcfaidx.pyx":443
jpayne@69 18495 * cdef cython.str to_string(self):
jpayne@69 18496 * if self.name is None:
jpayne@69 18497 * raise ValueError("can not write record without name") # <<<<<<<<<<<<<<
jpayne@69 18498 *
jpayne@69 18499 * if self.sequence is None:
jpayne@69 18500 */
jpayne@69 18501 __pyx_tuple__25 = PyTuple_Pack(1, __pyx_kp_u_can_not_write_record_without_nam); if (unlikely(!__pyx_tuple__25)) __PYX_ERR(0, 443, __pyx_L1_error)
jpayne@69 18502 __Pyx_GOTREF(__pyx_tuple__25);
jpayne@69 18503 __Pyx_GIVEREF(__pyx_tuple__25);
jpayne@69 18504
jpayne@69 18505 /* "pysam/libcfaidx.pyx":446
jpayne@69 18506 *
jpayne@69 18507 * if self.sequence is None:
jpayne@69 18508 * raise ValueError("can not write record without a sequence") # <<<<<<<<<<<<<<
jpayne@69 18509 *
jpayne@69 18510 * if self.comment is None:
jpayne@69 18511 */
jpayne@69 18512 __pyx_tuple__26 = PyTuple_Pack(1, __pyx_kp_u_can_not_write_record_without_a_s); if (unlikely(!__pyx_tuple__26)) __PYX_ERR(0, 446, __pyx_L1_error)
jpayne@69 18513 __Pyx_GOTREF(__pyx_tuple__26);
jpayne@69 18514 __Pyx_GIVEREF(__pyx_tuple__26);
jpayne@69 18515
jpayne@69 18516 /* "pysam/libcfaidx.pyx":465
jpayne@69 18517 * def set_name(self, name):
jpayne@69 18518 * if name is None:
jpayne@69 18519 * raise ValueError("FastxRecord must have a name and not None") # <<<<<<<<<<<<<<
jpayne@69 18520 * self.name = name
jpayne@69 18521 *
jpayne@69 18522 */
jpayne@69 18523 __pyx_tuple__28 = PyTuple_Pack(1, __pyx_kp_u_FastxRecord_must_have_a_name_and); if (unlikely(!__pyx_tuple__28)) __PYX_ERR(0, 465, __pyx_L1_error)
jpayne@69 18524 __Pyx_GOTREF(__pyx_tuple__28);
jpayne@69 18525 __Pyx_GIVEREF(__pyx_tuple__28);
jpayne@69 18526
jpayne@69 18527 /* "(tree fragment)":4
jpayne@69 18528 * cdef object __pyx_PickleError
jpayne@69 18529 * cdef object __pyx_result
jpayne@69 18530 * if __pyx_checksum not in (0x1bdb611, 0xb688a86, 0x43fd151): # <<<<<<<<<<<<<<
jpayne@69 18531 * from pickle import PickleError as __pyx_PickleError
jpayne@69 18532 * raise __pyx_PickleError, "Incompatible checksums (0x%x vs (0x1bdb611, 0xb688a86, 0x43fd151) = (comment, name, quality, sequence))" % __pyx_checksum
jpayne@69 18533 */
jpayne@69 18534 __pyx_tuple__46 = PyTuple_Pack(3, __pyx_int_29210129, __pyx_int_191400582, __pyx_int_71291217); if (unlikely(!__pyx_tuple__46)) __PYX_ERR(1, 4, __pyx_L1_error)
jpayne@69 18535 __Pyx_GOTREF(__pyx_tuple__46);
jpayne@69 18536 __Pyx_GIVEREF(__pyx_tuple__46);
jpayne@69 18537
jpayne@69 18538 /* "pysam/libcfaidx.pyx":123
jpayne@69 18539 * self._open(*args, **kwargs)
jpayne@69 18540 *
jpayne@69 18541 * def is_open(self): # <<<<<<<<<<<<<<
jpayne@69 18542 * '''return true if samfile has been opened.'''
jpayne@69 18543 * return self.fastafile != NULL
jpayne@69 18544 */
jpayne@69 18545 __pyx_tuple__49 = PyTuple_Pack(1, __pyx_n_s_self); if (unlikely(!__pyx_tuple__49)) __PYX_ERR(0, 123, __pyx_L1_error)
jpayne@69 18546 __Pyx_GOTREF(__pyx_tuple__49);
jpayne@69 18547 __Pyx_GIVEREF(__pyx_tuple__49);
jpayne@69 18548 __pyx_codeobj_ = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__49, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libcfaidx_pyx, __pyx_n_s_is_open, 123, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj_)) __PYX_ERR(0, 123, __pyx_L1_error)
jpayne@69 18549
jpayne@69 18550 /* "pysam/libcfaidx.pyx":133
jpayne@69 18551 * return faidx_nseq(self.fastafile)
jpayne@69 18552 *
jpayne@69 18553 * def _open(self, filename, filepath_index=None, filepath_index_compressed=None): # <<<<<<<<<<<<<<
jpayne@69 18554 * '''open an indexed fasta file.
jpayne@69 18555 *
jpayne@69 18556 */
jpayne@69 18557 __pyx_tuple__50 = PyTuple_Pack(13, __pyx_n_s_self, __pyx_n_s_filename, __pyx_n_s_filepath_index, __pyx_n_s_filepath_index_compressed, __pyx_n_s_cfilename, __pyx_n_s_cindexname, __pyx_n_s_cindexname_compressed, __pyx_n_s_bindex_filename, __pyx_n_s_bindex_filename_compressed, __pyx_n_s_nreferences, __pyx_n_s_x, __pyx_n_s_s_2, __pyx_n_s_ss); if (unlikely(!__pyx_tuple__50)) __PYX_ERR(0, 133, __pyx_L1_error)
jpayne@69 18558 __Pyx_GOTREF(__pyx_tuple__50);
jpayne@69 18559 __Pyx_GIVEREF(__pyx_tuple__50);
jpayne@69 18560 __pyx_codeobj__3 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 13, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__50, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libcfaidx_pyx, __pyx_n_s_open, 133, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__3)) __PYX_ERR(0, 133, __pyx_L1_error)
jpayne@69 18561 __pyx_tuple__51 = PyTuple_Pack(2, Py_None, Py_None); if (unlikely(!__pyx_tuple__51)) __PYX_ERR(0, 133, __pyx_L1_error)
jpayne@69 18562 __Pyx_GOTREF(__pyx_tuple__51);
jpayne@69 18563 __Pyx_GIVEREF(__pyx_tuple__51);
jpayne@69 18564
jpayne@69 18565 /* "pysam/libcfaidx.pyx":195
jpayne@69 18566 * self.reference2length = dict(zip(self._references, self._lengths))
jpayne@69 18567 *
jpayne@69 18568 * def close(self): # <<<<<<<<<<<<<<
jpayne@69 18569 * """close the file."""
jpayne@69 18570 * if self.fastafile != NULL:
jpayne@69 18571 */
jpayne@69 18572 __pyx_codeobj__5 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__49, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libcfaidx_pyx, __pyx_n_s_close, 195, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__5)) __PYX_ERR(0, 195, __pyx_L1_error)
jpayne@69 18573
jpayne@69 18574 /* "pysam/libcfaidx.pyx":207
jpayne@69 18575 *
jpayne@69 18576 * # context manager interface
jpayne@69 18577 * def __enter__(self): # <<<<<<<<<<<<<<
jpayne@69 18578 * return self
jpayne@69 18579 *
jpayne@69 18580 */
jpayne@69 18581 __pyx_codeobj__6 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__49, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libcfaidx_pyx, __pyx_n_s_enter, 207, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__6)) __PYX_ERR(0, 207, __pyx_L1_error)
jpayne@69 18582
jpayne@69 18583 /* "pysam/libcfaidx.pyx":210
jpayne@69 18584 * return self
jpayne@69 18585 *
jpayne@69 18586 * def __exit__(self, exc_type, exc_value, traceback): # <<<<<<<<<<<<<<
jpayne@69 18587 * self.close()
jpayne@69 18588 * return False
jpayne@69 18589 */
jpayne@69 18590 __pyx_tuple__52 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_exc_type, __pyx_n_s_exc_value, __pyx_n_s_traceback); if (unlikely(!__pyx_tuple__52)) __PYX_ERR(0, 210, __pyx_L1_error)
jpayne@69 18591 __Pyx_GOTREF(__pyx_tuple__52);
jpayne@69 18592 __Pyx_GIVEREF(__pyx_tuple__52);
jpayne@69 18593 __pyx_codeobj__7 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__52, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libcfaidx_pyx, __pyx_n_s_exit, 210, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__7)) __PYX_ERR(0, 210, __pyx_L1_error)
jpayne@69 18594
jpayne@69 18595 /* "pysam/libcfaidx.pyx":242
jpayne@69 18596 * return self._lengths
jpayne@69 18597 *
jpayne@69 18598 * def fetch(self, # <<<<<<<<<<<<<<
jpayne@69 18599 * reference=None,
jpayne@69 18600 * start=None,
jpayne@69 18601 */
jpayne@69 18602 __pyx_tuple__53 = 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_length, __pyx_n_s_seq, __pyx_n_s_ref, __pyx_n_s_rstart, __pyx_n_s_rend, __pyx_n_s_contig, __pyx_n_s_contig_b); if (unlikely(!__pyx_tuple__53)) __PYX_ERR(0, 242, __pyx_L1_error)
jpayne@69 18603 __Pyx_GOTREF(__pyx_tuple__53);
jpayne@69 18604 __Pyx_GIVEREF(__pyx_tuple__53);
jpayne@69 18605 __pyx_codeobj__8 = (PyObject*)__Pyx_PyCode_New(5, 0, 0, 12, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__53, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libcfaidx_pyx, __pyx_n_s_fetch, 242, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__8)) __PYX_ERR(0, 242, __pyx_L1_error)
jpayne@69 18606 __pyx_tuple__54 = PyTuple_Pack(4, Py_None, Py_None, Py_None, Py_None); if (unlikely(!__pyx_tuple__54)) __PYX_ERR(0, 242, __pyx_L1_error)
jpayne@69 18607 __Pyx_GOTREF(__pyx_tuple__54);
jpayne@69 18608 __Pyx_GIVEREF(__pyx_tuple__54);
jpayne@69 18609
jpayne@69 18610 /* "pysam/libcfaidx.pyx":343
jpayne@69 18611 * return seq
jpayne@69 18612 *
jpayne@69 18613 * def get_reference_length(self, reference): # <<<<<<<<<<<<<<
jpayne@69 18614 * '''return the length of reference.'''
jpayne@69 18615 * return self.reference2length[reference]
jpayne@69 18616 */
jpayne@69 18617 __pyx_tuple__55 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_reference); if (unlikely(!__pyx_tuple__55)) __PYX_ERR(0, 343, __pyx_L1_error)
jpayne@69 18618 __Pyx_GOTREF(__pyx_tuple__55);
jpayne@69 18619 __Pyx_GIVEREF(__pyx_tuple__55);
jpayne@69 18620 __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__55, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libcfaidx_pyx, __pyx_n_s_get_reference_length, 343, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__12)) __PYX_ERR(0, 343, __pyx_L1_error)
jpayne@69 18621
jpayne@69 18622 /* "(tree fragment)":1
jpayne@69 18623 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
jpayne@69 18624 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
jpayne@69 18625 * def __setstate_cython__(self, __pyx_state):
jpayne@69 18626 */
jpayne@69 18627 __pyx_codeobj__13 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__49, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__13)) __PYX_ERR(1, 1, __pyx_L1_error)
jpayne@69 18628
jpayne@69 18629 /* "(tree fragment)":3
jpayne@69 18630 * def __reduce_cython__(self):
jpayne@69 18631 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
jpayne@69 18632 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
jpayne@69 18633 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
jpayne@69 18634 */
jpayne@69 18635 __pyx_tuple__56 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_pyx_state); if (unlikely(!__pyx_tuple__56)) __PYX_ERR(1, 3, __pyx_L1_error)
jpayne@69 18636 __Pyx_GOTREF(__pyx_tuple__56);
jpayne@69 18637 __Pyx_GIVEREF(__pyx_tuple__56);
jpayne@69 18638 __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__56, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__14)) __PYX_ERR(1, 3, __pyx_L1_error)
jpayne@69 18639
jpayne@69 18640 /* "pysam/libcfaidx.pyx":404
jpayne@69 18641 * return self.to_string()
jpayne@69 18642 *
jpayne@69 18643 * cpdef array.array get_quality_array(self, int offset=33): # <<<<<<<<<<<<<<
jpayne@69 18644 * '''return quality values as integer array after subtracting offset.'''
jpayne@69 18645 * if self.quality is None:
jpayne@69 18646 */
jpayne@69 18647 __pyx_tuple__57 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_offset); if (unlikely(!__pyx_tuple__57)) __PYX_ERR(0, 404, __pyx_L1_error)
jpayne@69 18648 __Pyx_GOTREF(__pyx_tuple__57);
jpayne@69 18649 __Pyx_GIVEREF(__pyx_tuple__57);
jpayne@69 18650 __pyx_codeobj__20 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__57, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libcfaidx_pyx, __pyx_n_s_get_quality_array, 404, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__20)) __PYX_ERR(0, 404, __pyx_L1_error)
jpayne@69 18651 __pyx_tuple__58 = PyTuple_Pack(1, __pyx_int_33); if (unlikely(!__pyx_tuple__58)) __PYX_ERR(0, 404, __pyx_L1_error)
jpayne@69 18652 __Pyx_GOTREF(__pyx_tuple__58);
jpayne@69 18653 __Pyx_GIVEREF(__pyx_tuple__58);
jpayne@69 18654
jpayne@69 18655 /* "(tree fragment)":1
jpayne@69 18656 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
jpayne@69 18657 * raise TypeError, "self._delegate cannot be converted to a Python object for pickling"
jpayne@69 18658 * def __setstate_cython__(self, __pyx_state):
jpayne@69 18659 */
jpayne@69 18660 __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__49, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__21)) __PYX_ERR(1, 1, __pyx_L1_error)
jpayne@69 18661
jpayne@69 18662 /* "(tree fragment)":3
jpayne@69 18663 * def __reduce_cython__(self):
jpayne@69 18664 * raise TypeError, "self._delegate cannot be converted to a Python object for pickling"
jpayne@69 18665 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
jpayne@69 18666 * raise TypeError, "self._delegate cannot be converted to a Python object for pickling"
jpayne@69 18667 */
jpayne@69 18668 __pyx_codeobj__22 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__56, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__22)) __PYX_ERR(1, 3, __pyx_L1_error)
jpayne@69 18669
jpayne@69 18670 /* "pysam/libcfaidx.pyx":435
jpayne@69 18671 * self.name = name
jpayne@69 18672 *
jpayne@69 18673 * def __copy__(self): # <<<<<<<<<<<<<<
jpayne@69 18674 * return FastxRecord(self.name, self.comment, self.sequence, self.quality)
jpayne@69 18675 *
jpayne@69 18676 */
jpayne@69 18677 __pyx_codeobj__23 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__49, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libcfaidx_pyx, __pyx_n_s_copy, 435, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__23)) __PYX_ERR(0, 435, __pyx_L1_error)
jpayne@69 18678
jpayne@69 18679 /* "pysam/libcfaidx.pyx":438
jpayne@69 18680 * return FastxRecord(self.name, self.comment, self.sequence, self.quality)
jpayne@69 18681 *
jpayne@69 18682 * def __deepcopy__(self, memo): # <<<<<<<<<<<<<<
jpayne@69 18683 * return FastxRecord(self.name, self.comment, self.sequence, self.quality)
jpayne@69 18684 *
jpayne@69 18685 */
jpayne@69 18686 __pyx_tuple__59 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_memo); if (unlikely(!__pyx_tuple__59)) __PYX_ERR(0, 438, __pyx_L1_error)
jpayne@69 18687 __Pyx_GOTREF(__pyx_tuple__59);
jpayne@69 18688 __Pyx_GIVEREF(__pyx_tuple__59);
jpayne@69 18689 __pyx_codeobj__24 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__59, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libcfaidx_pyx, __pyx_n_s_deepcopy, 438, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__24)) __PYX_ERR(0, 438, __pyx_L1_error)
jpayne@69 18690
jpayne@69 18691 /* "pysam/libcfaidx.pyx":463
jpayne@69 18692 * return self.to_string()
jpayne@69 18693 *
jpayne@69 18694 * def set_name(self, name): # <<<<<<<<<<<<<<
jpayne@69 18695 * if name is None:
jpayne@69 18696 * raise ValueError("FastxRecord must have a name and not None")
jpayne@69 18697 */
jpayne@69 18698 __pyx_tuple__60 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_name); if (unlikely(!__pyx_tuple__60)) __PYX_ERR(0, 463, __pyx_L1_error)
jpayne@69 18699 __Pyx_GOTREF(__pyx_tuple__60);
jpayne@69 18700 __Pyx_GIVEREF(__pyx_tuple__60);
jpayne@69 18701 __pyx_codeobj__27 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__60, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libcfaidx_pyx, __pyx_n_s_set_name, 463, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__27)) __PYX_ERR(0, 463, __pyx_L1_error)
jpayne@69 18702
jpayne@69 18703 /* "pysam/libcfaidx.pyx":468
jpayne@69 18704 * self.name = name
jpayne@69 18705 *
jpayne@69 18706 * def set_comment(self, comment): # <<<<<<<<<<<<<<
jpayne@69 18707 * self.comment = comment
jpayne@69 18708 *
jpayne@69 18709 */
jpayne@69 18710 __pyx_tuple__61 = PyTuple_Pack(2, __pyx_n_s_self, __pyx_n_s_comment); if (unlikely(!__pyx_tuple__61)) __PYX_ERR(0, 468, __pyx_L1_error)
jpayne@69 18711 __Pyx_GOTREF(__pyx_tuple__61);
jpayne@69 18712 __Pyx_GIVEREF(__pyx_tuple__61);
jpayne@69 18713 __pyx_codeobj__29 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__61, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libcfaidx_pyx, __pyx_n_s_set_comment, 468, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__29)) __PYX_ERR(0, 468, __pyx_L1_error)
jpayne@69 18714
jpayne@69 18715 /* "pysam/libcfaidx.pyx":471
jpayne@69 18716 * self.comment = comment
jpayne@69 18717 *
jpayne@69 18718 * def set_sequence(self, sequence, quality=None): # <<<<<<<<<<<<<<
jpayne@69 18719 * """set sequence of this record.
jpayne@69 18720 *
jpayne@69 18721 */
jpayne@69 18722 __pyx_tuple__62 = PyTuple_Pack(3, __pyx_n_s_self, __pyx_n_s_sequence, __pyx_n_s_quality); if (unlikely(!__pyx_tuple__62)) __PYX_ERR(0, 471, __pyx_L1_error)
jpayne@69 18723 __Pyx_GOTREF(__pyx_tuple__62);
jpayne@69 18724 __Pyx_GIVEREF(__pyx_tuple__62);
jpayne@69 18725 __pyx_codeobj__30 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 3, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__62, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libcfaidx_pyx, __pyx_n_s_set_sequence, 471, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__30)) __PYX_ERR(0, 471, __pyx_L1_error)
jpayne@69 18726 __pyx_tuple__63 = PyTuple_Pack(1, Py_None); if (unlikely(!__pyx_tuple__63)) __PYX_ERR(0, 471, __pyx_L1_error)
jpayne@69 18727 __Pyx_GOTREF(__pyx_tuple__63);
jpayne@69 18728 __Pyx_GIVEREF(__pyx_tuple__63);
jpayne@69 18729
jpayne@69 18730 /* "pysam/libcfaidx.pyx":488
jpayne@69 18731 * return self.to_string()
jpayne@69 18732 *
jpayne@69 18733 * cpdef array.array get_quality_array(self, int offset=33): # <<<<<<<<<<<<<<
jpayne@69 18734 * '''return quality values as array after subtracting offset.'''
jpayne@69 18735 * if self.quality is None:
jpayne@69 18736 */
jpayne@69 18737 __pyx_codeobj__31 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__57, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libcfaidx_pyx, __pyx_n_s_get_quality_array, 488, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__31)) __PYX_ERR(0, 488, __pyx_L1_error)
jpayne@69 18738
jpayne@69 18739 /* "(tree fragment)":1
jpayne@69 18740 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
jpayne@69 18741 * cdef tuple state
jpayne@69 18742 * cdef object _dict
jpayne@69 18743 */
jpayne@69 18744 __pyx_tuple__64 = 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__64)) __PYX_ERR(1, 1, __pyx_L1_error)
jpayne@69 18745 __Pyx_GOTREF(__pyx_tuple__64);
jpayne@69 18746 __Pyx_GIVEREF(__pyx_tuple__64);
jpayne@69 18747 __pyx_codeobj__32 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 4, 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__32)) __PYX_ERR(1, 1, __pyx_L1_error)
jpayne@69 18748
jpayne@69 18749 /* "(tree fragment)":16
jpayne@69 18750 * else:
jpayne@69 18751 * return __pyx_unpickle_FastxRecord, (type(self), 0x1bdb611, state)
jpayne@69 18752 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
jpayne@69 18753 * __pyx_unpickle_FastxRecord__set_state(self, __pyx_state)
jpayne@69 18754 */
jpayne@69 18755 __pyx_codeobj__33 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__56, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 16, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__33)) __PYX_ERR(1, 16, __pyx_L1_error)
jpayne@69 18756
jpayne@69 18757 /* "pysam/libcfaidx.pyx":551
jpayne@69 18758 * self._open(*args, **kwargs)
jpayne@69 18759 *
jpayne@69 18760 * def is_open(self): # <<<<<<<<<<<<<<
jpayne@69 18761 * '''return true if samfile has been opened.'''
jpayne@69 18762 * return self.entry != NULL
jpayne@69 18763 */
jpayne@69 18764 __pyx_codeobj__34 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__49, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libcfaidx_pyx, __pyx_n_s_is_open, 551, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__34)) __PYX_ERR(0, 551, __pyx_L1_error)
jpayne@69 18765
jpayne@69 18766 /* "pysam/libcfaidx.pyx":555
jpayne@69 18767 * return self.entry != NULL
jpayne@69 18768 *
jpayne@69 18769 * def _open(self, filename, persist=True): # <<<<<<<<<<<<<<
jpayne@69 18770 * '''open a fastq/fasta file in *filename*
jpayne@69 18771 *
jpayne@69 18772 */
jpayne@69 18773 __pyx_tuple__65 = PyTuple_Pack(4, __pyx_n_s_self, __pyx_n_s_filename, __pyx_n_s_persist, __pyx_n_s_cfilename); if (unlikely(!__pyx_tuple__65)) __PYX_ERR(0, 555, __pyx_L1_error)
jpayne@69 18774 __Pyx_GOTREF(__pyx_tuple__65);
jpayne@69 18775 __Pyx_GIVEREF(__pyx_tuple__65);
jpayne@69 18776 __pyx_codeobj__35 = (PyObject*)__Pyx_PyCode_New(3, 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_pysam_libcfaidx_pyx, __pyx_n_s_open, 555, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__35)) __PYX_ERR(0, 555, __pyx_L1_error)
jpayne@69 18777 __pyx_tuple__66 = PyTuple_Pack(1, Py_True); if (unlikely(!__pyx_tuple__66)) __PYX_ERR(0, 555, __pyx_L1_error)
jpayne@69 18778 __Pyx_GOTREF(__pyx_tuple__66);
jpayne@69 18779 __Pyx_GIVEREF(__pyx_tuple__66);
jpayne@69 18780
jpayne@69 18781 /* "pysam/libcfaidx.pyx":588
jpayne@69 18782 * self._filename = filename
jpayne@69 18783 *
jpayne@69 18784 * def close(self): # <<<<<<<<<<<<<<
jpayne@69 18785 * '''close the file.'''
jpayne@69 18786 * if self.fastqfile != NULL:
jpayne@69 18787 */
jpayne@69 18788 __pyx_codeobj__36 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__49, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libcfaidx_pyx, __pyx_n_s_close, 588, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__36)) __PYX_ERR(0, 588, __pyx_L1_error)
jpayne@69 18789
jpayne@69 18790 /* "pysam/libcfaidx.pyx":604
jpayne@69 18791 *
jpayne@69 18792 * # context manager interface
jpayne@69 18793 * def __enter__(self): # <<<<<<<<<<<<<<
jpayne@69 18794 * return self
jpayne@69 18795 *
jpayne@69 18796 */
jpayne@69 18797 __pyx_codeobj__37 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__49, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libcfaidx_pyx, __pyx_n_s_enter, 604, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__37)) __PYX_ERR(0, 604, __pyx_L1_error)
jpayne@69 18798
jpayne@69 18799 /* "pysam/libcfaidx.pyx":607
jpayne@69 18800 * return self
jpayne@69 18801 *
jpayne@69 18802 * def __exit__(self, exc_type, exc_value, traceback): # <<<<<<<<<<<<<<
jpayne@69 18803 * self.close()
jpayne@69 18804 * return False
jpayne@69 18805 */
jpayne@69 18806 __pyx_codeobj__38 = (PyObject*)__Pyx_PyCode_New(4, 0, 0, 4, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__52, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_pysam_libcfaidx_pyx, __pyx_n_s_exit, 607, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__38)) __PYX_ERR(0, 607, __pyx_L1_error)
jpayne@69 18807
jpayne@69 18808 /* "(tree fragment)":1
jpayne@69 18809 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
jpayne@69 18810 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
jpayne@69 18811 * def __setstate_cython__(self, __pyx_state):
jpayne@69 18812 */
jpayne@69 18813 __pyx_codeobj__39 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__49, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__39)) __PYX_ERR(1, 1, __pyx_L1_error)
jpayne@69 18814
jpayne@69 18815 /* "(tree fragment)":3
jpayne@69 18816 * def __reduce_cython__(self):
jpayne@69 18817 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
jpayne@69 18818 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
jpayne@69 18819 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
jpayne@69 18820 */
jpayne@69 18821 __pyx_codeobj__40 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__56, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__40)) __PYX_ERR(1, 3, __pyx_L1_error)
jpayne@69 18822
jpayne@69 18823 /* "(tree fragment)":1
jpayne@69 18824 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
jpayne@69 18825 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
jpayne@69 18826 * def __setstate_cython__(self, __pyx_state):
jpayne@69 18827 */
jpayne@69 18828 __pyx_codeobj__41 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__49, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__41)) __PYX_ERR(1, 1, __pyx_L1_error)
jpayne@69 18829
jpayne@69 18830 /* "(tree fragment)":3
jpayne@69 18831 * def __reduce_cython__(self):
jpayne@69 18832 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
jpayne@69 18833 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
jpayne@69 18834 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
jpayne@69 18835 */
jpayne@69 18836 __pyx_codeobj__42 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__56, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__42)) __PYX_ERR(1, 3, __pyx_L1_error)
jpayne@69 18837
jpayne@69 18838 /* "(tree fragment)":1
jpayne@69 18839 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
jpayne@69 18840 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
jpayne@69 18841 * def __setstate_cython__(self, __pyx_state):
jpayne@69 18842 */
jpayne@69 18843 __pyx_codeobj__43 = (PyObject*)__Pyx_PyCode_New(1, 0, 0, 1, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__49, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_reduce_cython, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__43)) __PYX_ERR(1, 1, __pyx_L1_error)
jpayne@69 18844
jpayne@69 18845 /* "(tree fragment)":3
jpayne@69 18846 * def __reduce_cython__(self):
jpayne@69 18847 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
jpayne@69 18848 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
jpayne@69 18849 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
jpayne@69 18850 */
jpayne@69 18851 __pyx_codeobj__44 = (PyObject*)__Pyx_PyCode_New(2, 0, 0, 2, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__56, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_setstate_cython, 3, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__44)) __PYX_ERR(1, 3, __pyx_L1_error)
jpayne@69 18852
jpayne@69 18853 /* "(tree fragment)":1
jpayne@69 18854 * def __pyx_unpickle_FastxRecord(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
jpayne@69 18855 * cdef object __pyx_PickleError
jpayne@69 18856 * cdef object __pyx_result
jpayne@69 18857 */
jpayne@69 18858 __pyx_tuple__67 = 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__67)) __PYX_ERR(1, 1, __pyx_L1_error)
jpayne@69 18859 __Pyx_GOTREF(__pyx_tuple__67);
jpayne@69 18860 __Pyx_GIVEREF(__pyx_tuple__67);
jpayne@69 18861 __pyx_codeobj__45 = (PyObject*)__Pyx_PyCode_New(3, 0, 0, 5, 0, CO_OPTIMIZED|CO_NEWLOCALS, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__67, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_stringsource, __pyx_n_s_pyx_unpickle_FastxRecord, 1, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__45)) __PYX_ERR(1, 1, __pyx_L1_error)
jpayne@69 18862 __Pyx_RefNannyFinishContext();
jpayne@69 18863 return 0;
jpayne@69 18864 __pyx_L1_error:;
jpayne@69 18865 __Pyx_RefNannyFinishContext();
jpayne@69 18866 return -1;
jpayne@69 18867 }
jpayne@69 18868 /* #### Code section: init_constants ### */
jpayne@69 18869
jpayne@69 18870 static CYTHON_SMALL_CODE int __Pyx_InitConstants(void) {
jpayne@69 18871 if (__Pyx_CreateStringTabAndInitStrings() < 0) __PYX_ERR(0, 1, __pyx_L1_error);
jpayne@69 18872 __pyx_int_33 = PyInt_FromLong(33); if (unlikely(!__pyx_int_33)) __PYX_ERR(0, 1, __pyx_L1_error)
jpayne@69 18873 __pyx_int_29210129 = PyInt_FromLong(29210129L); if (unlikely(!__pyx_int_29210129)) __PYX_ERR(0, 1, __pyx_L1_error)
jpayne@69 18874 __pyx_int_71291217 = PyInt_FromLong(71291217L); if (unlikely(!__pyx_int_71291217)) __PYX_ERR(0, 1, __pyx_L1_error)
jpayne@69 18875 __pyx_int_191400582 = PyInt_FromLong(191400582L); if (unlikely(!__pyx_int_191400582)) __PYX_ERR(0, 1, __pyx_L1_error)
jpayne@69 18876 return 0;
jpayne@69 18877 __pyx_L1_error:;
jpayne@69 18878 return -1;
jpayne@69 18879 }
jpayne@69 18880 /* #### Code section: init_globals ### */
jpayne@69 18881
jpayne@69 18882 static CYTHON_SMALL_CODE int __Pyx_InitGlobals(void) {
jpayne@69 18883 return 0;
jpayne@69 18884 }
jpayne@69 18885 /* #### Code section: init_module ### */
jpayne@69 18886
jpayne@69 18887 static CYTHON_SMALL_CODE int __Pyx_modinit_global_init_code(void); /*proto*/
jpayne@69 18888 static CYTHON_SMALL_CODE int __Pyx_modinit_variable_export_code(void); /*proto*/
jpayne@69 18889 static CYTHON_SMALL_CODE int __Pyx_modinit_function_export_code(void); /*proto*/
jpayne@69 18890 static CYTHON_SMALL_CODE int __Pyx_modinit_type_init_code(void); /*proto*/
jpayne@69 18891 static CYTHON_SMALL_CODE int __Pyx_modinit_type_import_code(void); /*proto*/
jpayne@69 18892 static CYTHON_SMALL_CODE int __Pyx_modinit_variable_import_code(void); /*proto*/
jpayne@69 18893 static CYTHON_SMALL_CODE int __Pyx_modinit_function_import_code(void); /*proto*/
jpayne@69 18894
jpayne@69 18895 static int __Pyx_modinit_global_init_code(void) {
jpayne@69 18896 __Pyx_RefNannyDeclarations
jpayne@69 18897 __Pyx_RefNannySetupContext("__Pyx_modinit_global_init_code", 0);
jpayne@69 18898 /*--- Global init code ---*/
jpayne@69 18899 __Pyx_RefNannyFinishContext();
jpayne@69 18900 return 0;
jpayne@69 18901 }
jpayne@69 18902
jpayne@69 18903 static int __Pyx_modinit_variable_export_code(void) {
jpayne@69 18904 __Pyx_RefNannyDeclarations
jpayne@69 18905 __Pyx_RefNannySetupContext("__Pyx_modinit_variable_export_code", 0);
jpayne@69 18906 /*--- Variable export code ---*/
jpayne@69 18907 __Pyx_RefNannyFinishContext();
jpayne@69 18908 return 0;
jpayne@69 18909 }
jpayne@69 18910
jpayne@69 18911 static int __Pyx_modinit_function_export_code(void) {
jpayne@69 18912 __Pyx_RefNannyDeclarations
jpayne@69 18913 __Pyx_RefNannySetupContext("__Pyx_modinit_function_export_code", 0);
jpayne@69 18914 /*--- Function export code ---*/
jpayne@69 18915 __Pyx_RefNannyFinishContext();
jpayne@69 18916 return 0;
jpayne@69 18917 }
jpayne@69 18918
jpayne@69 18919 static int __Pyx_modinit_type_init_code(void) {
jpayne@69 18920 __Pyx_RefNannyDeclarations
jpayne@69 18921 PyObject *__pyx_t_1 = NULL;
jpayne@69 18922 int __pyx_lineno = 0;
jpayne@69 18923 const char *__pyx_filename = NULL;
jpayne@69 18924 int __pyx_clineno = 0;
jpayne@69 18925 __Pyx_RefNannySetupContext("__Pyx_modinit_type_init_code", 0);
jpayne@69 18926 /*--- Type init code ---*/
jpayne@69 18927 __pyx_vtabptr_5pysam_9libcfaidx_FastaFile = &__pyx_vtable_5pysam_9libcfaidx_FastaFile;
jpayne@69 18928 __pyx_vtable_5pysam_9libcfaidx_FastaFile._fetch = (char *(*)(struct __pyx_obj_5pysam_9libcfaidx_FastaFile *, char *, int, int, int *))__pyx_f_5pysam_9libcfaidx_9FastaFile__fetch;
jpayne@69 18929 #if CYTHON_USE_TYPE_SPECS
jpayne@69 18930 __pyx_ptype_5pysam_9libcfaidx_FastaFile = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_5pysam_9libcfaidx_FastaFile_spec, NULL); if (unlikely(!__pyx_ptype_5pysam_9libcfaidx_FastaFile)) __PYX_ERR(0, 83, __pyx_L1_error)
jpayne@69 18931 if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_5pysam_9libcfaidx_FastaFile_spec, __pyx_ptype_5pysam_9libcfaidx_FastaFile) < 0) __PYX_ERR(0, 83, __pyx_L1_error)
jpayne@69 18932 #else
jpayne@69 18933 __pyx_ptype_5pysam_9libcfaidx_FastaFile = &__pyx_type_5pysam_9libcfaidx_FastaFile;
jpayne@69 18934 #endif
jpayne@69 18935 #if !CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 18936 #endif
jpayne@69 18937 #if !CYTHON_USE_TYPE_SPECS
jpayne@69 18938 if (__Pyx_PyType_Ready(__pyx_ptype_5pysam_9libcfaidx_FastaFile) < 0) __PYX_ERR(0, 83, __pyx_L1_error)
jpayne@69 18939 #endif
jpayne@69 18940 #if PY_MAJOR_VERSION < 3
jpayne@69 18941 __pyx_ptype_5pysam_9libcfaidx_FastaFile->tp_print = 0;
jpayne@69 18942 #endif
jpayne@69 18943 #if !CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 18944 if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_5pysam_9libcfaidx_FastaFile->tp_dictoffset && __pyx_ptype_5pysam_9libcfaidx_FastaFile->tp_getattro == PyObject_GenericGetAttr)) {
jpayne@69 18945 __pyx_ptype_5pysam_9libcfaidx_FastaFile->tp_getattro = __Pyx_PyObject_GenericGetAttr;
jpayne@69 18946 }
jpayne@69 18947 #endif
jpayne@69 18948 #if CYTHON_UPDATE_DESCRIPTOR_DOC
jpayne@69 18949 {
jpayne@69 18950 PyObject *wrapper = PyObject_GetAttrString((PyObject *)__pyx_ptype_5pysam_9libcfaidx_FastaFile, "__contains__"); if (unlikely(!wrapper)) __PYX_ERR(0, 83, __pyx_L1_error)
jpayne@69 18951 if (__Pyx_IS_TYPE(wrapper, &PyWrapperDescr_Type)) {
jpayne@69 18952 __pyx_wrapperbase_5pysam_9libcfaidx_9FastaFile_22__contains__ = *((PyWrapperDescrObject *)wrapper)->d_base;
jpayne@69 18953 __pyx_wrapperbase_5pysam_9libcfaidx_9FastaFile_22__contains__.doc = __pyx_doc_5pysam_9libcfaidx_9FastaFile_22__contains__;
jpayne@69 18954 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_5pysam_9libcfaidx_9FastaFile_22__contains__;
jpayne@69 18955 }
jpayne@69 18956 }
jpayne@69 18957 #endif
jpayne@69 18958 if (__Pyx_SetVtable(__pyx_ptype_5pysam_9libcfaidx_FastaFile, __pyx_vtabptr_5pysam_9libcfaidx_FastaFile) < 0) __PYX_ERR(0, 83, __pyx_L1_error)
jpayne@69 18959 #if !CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 18960 if (__Pyx_MergeVtables(__pyx_ptype_5pysam_9libcfaidx_FastaFile) < 0) __PYX_ERR(0, 83, __pyx_L1_error)
jpayne@69 18961 #endif
jpayne@69 18962 if (PyObject_SetAttr(__pyx_m, __pyx_n_s_FastaFile, (PyObject *) __pyx_ptype_5pysam_9libcfaidx_FastaFile) < 0) __PYX_ERR(0, 83, __pyx_L1_error)
jpayne@69 18963 #if !CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 18964 if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_5pysam_9libcfaidx_FastaFile) < 0) __PYX_ERR(0, 83, __pyx_L1_error)
jpayne@69 18965 #endif
jpayne@69 18966 __pyx_vtabptr_5pysam_9libcfaidx_FastqProxy = &__pyx_vtable_5pysam_9libcfaidx_FastqProxy;
jpayne@69 18967 __pyx_vtable_5pysam_9libcfaidx_FastqProxy.to_string = (PyObject *(*)(struct __pyx_obj_5pysam_9libcfaidx_FastqProxy *))__pyx_f_5pysam_9libcfaidx_10FastqProxy_to_string;
jpayne@69 18968 __pyx_vtable_5pysam_9libcfaidx_FastqProxy.tostring = (PyObject *(*)(struct __pyx_obj_5pysam_9libcfaidx_FastqProxy *))__pyx_f_5pysam_9libcfaidx_10FastqProxy_tostring;
jpayne@69 18969 __pyx_vtable_5pysam_9libcfaidx_FastqProxy.get_quality_array = (arrayobject *(*)(struct __pyx_obj_5pysam_9libcfaidx_FastqProxy *, int __pyx_skip_dispatch, struct __pyx_opt_args_5pysam_9libcfaidx_10FastqProxy_get_quality_array *__pyx_optional_args))__pyx_f_5pysam_9libcfaidx_10FastqProxy_get_quality_array;
jpayne@69 18970 #if CYTHON_USE_TYPE_SPECS
jpayne@69 18971 __pyx_ptype_5pysam_9libcfaidx_FastqProxy = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_5pysam_9libcfaidx_FastqProxy_spec, NULL); if (unlikely(!__pyx_ptype_5pysam_9libcfaidx_FastqProxy)) __PYX_ERR(0, 355, __pyx_L1_error)
jpayne@69 18972 if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_5pysam_9libcfaidx_FastqProxy_spec, __pyx_ptype_5pysam_9libcfaidx_FastqProxy) < 0) __PYX_ERR(0, 355, __pyx_L1_error)
jpayne@69 18973 #else
jpayne@69 18974 __pyx_ptype_5pysam_9libcfaidx_FastqProxy = &__pyx_type_5pysam_9libcfaidx_FastqProxy;
jpayne@69 18975 #endif
jpayne@69 18976 #if !CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 18977 #endif
jpayne@69 18978 #if !CYTHON_USE_TYPE_SPECS
jpayne@69 18979 if (__Pyx_PyType_Ready(__pyx_ptype_5pysam_9libcfaidx_FastqProxy) < 0) __PYX_ERR(0, 355, __pyx_L1_error)
jpayne@69 18980 #endif
jpayne@69 18981 #if PY_MAJOR_VERSION < 3
jpayne@69 18982 __pyx_ptype_5pysam_9libcfaidx_FastqProxy->tp_print = 0;
jpayne@69 18983 #endif
jpayne@69 18984 #if !CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 18985 if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_5pysam_9libcfaidx_FastqProxy->tp_dictoffset && __pyx_ptype_5pysam_9libcfaidx_FastqProxy->tp_getattro == PyObject_GenericGetAttr)) {
jpayne@69 18986 __pyx_ptype_5pysam_9libcfaidx_FastqProxy->tp_getattro = __Pyx_PyObject_GenericGetAttr;
jpayne@69 18987 }
jpayne@69 18988 #endif
jpayne@69 18989 if (__Pyx_SetVtable(__pyx_ptype_5pysam_9libcfaidx_FastqProxy, __pyx_vtabptr_5pysam_9libcfaidx_FastqProxy) < 0) __PYX_ERR(0, 355, __pyx_L1_error)
jpayne@69 18990 #if !CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 18991 if (__Pyx_MergeVtables(__pyx_ptype_5pysam_9libcfaidx_FastqProxy) < 0) __PYX_ERR(0, 355, __pyx_L1_error)
jpayne@69 18992 #endif
jpayne@69 18993 if (PyObject_SetAttr(__pyx_m, __pyx_n_s_FastqProxy, (PyObject *) __pyx_ptype_5pysam_9libcfaidx_FastqProxy) < 0) __PYX_ERR(0, 355, __pyx_L1_error)
jpayne@69 18994 #if !CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 18995 if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_5pysam_9libcfaidx_FastqProxy) < 0) __PYX_ERR(0, 355, __pyx_L1_error)
jpayne@69 18996 #endif
jpayne@69 18997 __pyx_vtabptr_5pysam_9libcfaidx_FastxRecord = &__pyx_vtable_5pysam_9libcfaidx_FastxRecord;
jpayne@69 18998 __pyx_vtable_5pysam_9libcfaidx_FastxRecord.to_string = (PyObject *(*)(struct __pyx_obj_5pysam_9libcfaidx_FastxRecord *))__pyx_f_5pysam_9libcfaidx_11FastxRecord_to_string;
jpayne@69 18999 __pyx_vtable_5pysam_9libcfaidx_FastxRecord.tostring = (PyObject *(*)(struct __pyx_obj_5pysam_9libcfaidx_FastxRecord *))__pyx_f_5pysam_9libcfaidx_11FastxRecord_tostring;
jpayne@69 19000 __pyx_vtable_5pysam_9libcfaidx_FastxRecord.get_quality_array = (arrayobject *(*)(struct __pyx_obj_5pysam_9libcfaidx_FastxRecord *, int __pyx_skip_dispatch, struct __pyx_opt_args_5pysam_9libcfaidx_11FastxRecord_get_quality_array *__pyx_optional_args))__pyx_f_5pysam_9libcfaidx_11FastxRecord_get_quality_array;
jpayne@69 19001 #if CYTHON_USE_TYPE_SPECS
jpayne@69 19002 __pyx_ptype_5pysam_9libcfaidx_FastxRecord = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_5pysam_9libcfaidx_FastxRecord_spec, NULL); if (unlikely(!__pyx_ptype_5pysam_9libcfaidx_FastxRecord)) __PYX_ERR(0, 411, __pyx_L1_error)
jpayne@69 19003 if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_5pysam_9libcfaidx_FastxRecord_spec, __pyx_ptype_5pysam_9libcfaidx_FastxRecord) < 0) __PYX_ERR(0, 411, __pyx_L1_error)
jpayne@69 19004 #else
jpayne@69 19005 __pyx_ptype_5pysam_9libcfaidx_FastxRecord = &__pyx_type_5pysam_9libcfaidx_FastxRecord;
jpayne@69 19006 #endif
jpayne@69 19007 #if !CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 19008 #endif
jpayne@69 19009 #if !CYTHON_USE_TYPE_SPECS
jpayne@69 19010 if (__Pyx_PyType_Ready(__pyx_ptype_5pysam_9libcfaidx_FastxRecord) < 0) __PYX_ERR(0, 411, __pyx_L1_error)
jpayne@69 19011 #endif
jpayne@69 19012 #if PY_MAJOR_VERSION < 3
jpayne@69 19013 __pyx_ptype_5pysam_9libcfaidx_FastxRecord->tp_print = 0;
jpayne@69 19014 #endif
jpayne@69 19015 #if !CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 19016 if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_5pysam_9libcfaidx_FastxRecord->tp_dictoffset && __pyx_ptype_5pysam_9libcfaidx_FastxRecord->tp_getattro == PyObject_GenericGetAttr)) {
jpayne@69 19017 __pyx_ptype_5pysam_9libcfaidx_FastxRecord->tp_getattro = __Pyx_PyObject_GenericGetAttr;
jpayne@69 19018 }
jpayne@69 19019 #endif
jpayne@69 19020 if (__Pyx_SetVtable(__pyx_ptype_5pysam_9libcfaidx_FastxRecord, __pyx_vtabptr_5pysam_9libcfaidx_FastxRecord) < 0) __PYX_ERR(0, 411, __pyx_L1_error)
jpayne@69 19021 #if !CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 19022 if (__Pyx_MergeVtables(__pyx_ptype_5pysam_9libcfaidx_FastxRecord) < 0) __PYX_ERR(0, 411, __pyx_L1_error)
jpayne@69 19023 #endif
jpayne@69 19024 if (PyObject_SetAttr(__pyx_m, __pyx_n_s_FastxRecord, (PyObject *) __pyx_ptype_5pysam_9libcfaidx_FastxRecord) < 0) __PYX_ERR(0, 411, __pyx_L1_error)
jpayne@69 19025 #if !CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 19026 if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_5pysam_9libcfaidx_FastxRecord) < 0) __PYX_ERR(0, 411, __pyx_L1_error)
jpayne@69 19027 #endif
jpayne@69 19028 __pyx_vtabptr_5pysam_9libcfaidx_FastxFile = &__pyx_vtable_5pysam_9libcfaidx_FastxFile;
jpayne@69 19029 __pyx_vtable_5pysam_9libcfaidx_FastxFile.getCurrent = (kseq_t *(*)(struct __pyx_obj_5pysam_9libcfaidx_FastxFile *))__pyx_f_5pysam_9libcfaidx_9FastxFile_getCurrent;
jpayne@69 19030 __pyx_vtable_5pysam_9libcfaidx_FastxFile.cnext = (int (*)(struct __pyx_obj_5pysam_9libcfaidx_FastxFile *))__pyx_f_5pysam_9libcfaidx_9FastxFile_cnext;
jpayne@69 19031 #if CYTHON_USE_TYPE_SPECS
jpayne@69 19032 __pyx_ptype_5pysam_9libcfaidx_FastxFile = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_5pysam_9libcfaidx_FastxFile_spec, NULL); if (unlikely(!__pyx_ptype_5pysam_9libcfaidx_FastxFile)) __PYX_ERR(0, 496, __pyx_L1_error)
jpayne@69 19033 if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_5pysam_9libcfaidx_FastxFile_spec, __pyx_ptype_5pysam_9libcfaidx_FastxFile) < 0) __PYX_ERR(0, 496, __pyx_L1_error)
jpayne@69 19034 #else
jpayne@69 19035 __pyx_ptype_5pysam_9libcfaidx_FastxFile = &__pyx_type_5pysam_9libcfaidx_FastxFile;
jpayne@69 19036 #endif
jpayne@69 19037 #if !CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 19038 #endif
jpayne@69 19039 #if !CYTHON_USE_TYPE_SPECS
jpayne@69 19040 if (__Pyx_PyType_Ready(__pyx_ptype_5pysam_9libcfaidx_FastxFile) < 0) __PYX_ERR(0, 496, __pyx_L1_error)
jpayne@69 19041 #endif
jpayne@69 19042 #if PY_MAJOR_VERSION < 3
jpayne@69 19043 __pyx_ptype_5pysam_9libcfaidx_FastxFile->tp_print = 0;
jpayne@69 19044 #endif
jpayne@69 19045 #if !CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 19046 if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_5pysam_9libcfaidx_FastxFile->tp_dictoffset && __pyx_ptype_5pysam_9libcfaidx_FastxFile->tp_getattro == PyObject_GenericGetAttr)) {
jpayne@69 19047 __pyx_ptype_5pysam_9libcfaidx_FastxFile->tp_getattro = __Pyx_PyObject_GenericGetAttr;
jpayne@69 19048 }
jpayne@69 19049 #endif
jpayne@69 19050 #if CYTHON_UPDATE_DESCRIPTOR_DOC
jpayne@69 19051 {
jpayne@69 19052 PyObject *wrapper = PyObject_GetAttrString((PyObject *)__pyx_ptype_5pysam_9libcfaidx_FastxFile, "__next__"); if (unlikely(!wrapper)) __PYX_ERR(0, 496, __pyx_L1_error)
jpayne@69 19053 if (__Pyx_IS_TYPE(wrapper, &PyWrapperDescr_Type)) {
jpayne@69 19054 __pyx_wrapperbase_5pysam_9libcfaidx_9FastxFile_16__next__ = *((PyWrapperDescrObject *)wrapper)->d_base;
jpayne@69 19055 __pyx_wrapperbase_5pysam_9libcfaidx_9FastxFile_16__next__.doc = __pyx_doc_5pysam_9libcfaidx_9FastxFile_16__next__;
jpayne@69 19056 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_5pysam_9libcfaidx_9FastxFile_16__next__;
jpayne@69 19057 }
jpayne@69 19058 }
jpayne@69 19059 #endif
jpayne@69 19060 if (__Pyx_SetVtable(__pyx_ptype_5pysam_9libcfaidx_FastxFile, __pyx_vtabptr_5pysam_9libcfaidx_FastxFile) < 0) __PYX_ERR(0, 496, __pyx_L1_error)
jpayne@69 19061 #if !CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 19062 if (__Pyx_MergeVtables(__pyx_ptype_5pysam_9libcfaidx_FastxFile) < 0) __PYX_ERR(0, 496, __pyx_L1_error)
jpayne@69 19063 #endif
jpayne@69 19064 if (PyObject_SetAttr(__pyx_m, __pyx_n_s_FastxFile, (PyObject *) __pyx_ptype_5pysam_9libcfaidx_FastxFile) < 0) __PYX_ERR(0, 496, __pyx_L1_error)
jpayne@69 19065 #if !CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 19066 if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_5pysam_9libcfaidx_FastxFile) < 0) __PYX_ERR(0, 496, __pyx_L1_error)
jpayne@69 19067 #endif
jpayne@69 19068 __pyx_vtabptr_5pysam_9libcfaidx_FastqFile = &__pyx_vtable_5pysam_9libcfaidx_FastqFile;
jpayne@69 19069 __pyx_vtable_5pysam_9libcfaidx_FastqFile.__pyx_base = *__pyx_vtabptr_5pysam_9libcfaidx_FastxFile;
jpayne@69 19070 #if CYTHON_USE_TYPE_SPECS
jpayne@69 19071 __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_ptype_5pysam_9libcfaidx_FastxFile); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 658, __pyx_L1_error)
jpayne@69 19072 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 19073 __pyx_ptype_5pysam_9libcfaidx_FastqFile = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_5pysam_9libcfaidx_FastqFile_spec, __pyx_t_1);
jpayne@69 19074 __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@69 19075 if (unlikely(!__pyx_ptype_5pysam_9libcfaidx_FastqFile)) __PYX_ERR(0, 658, __pyx_L1_error)
jpayne@69 19076 if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_5pysam_9libcfaidx_FastqFile_spec, __pyx_ptype_5pysam_9libcfaidx_FastqFile) < 0) __PYX_ERR(0, 658, __pyx_L1_error)
jpayne@69 19077 #else
jpayne@69 19078 __pyx_ptype_5pysam_9libcfaidx_FastqFile = &__pyx_type_5pysam_9libcfaidx_FastqFile;
jpayne@69 19079 #endif
jpayne@69 19080 #if !CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 19081 __pyx_ptype_5pysam_9libcfaidx_FastqFile->tp_base = __pyx_ptype_5pysam_9libcfaidx_FastxFile;
jpayne@69 19082 #endif
jpayne@69 19083 #if !CYTHON_USE_TYPE_SPECS
jpayne@69 19084 if (__Pyx_PyType_Ready(__pyx_ptype_5pysam_9libcfaidx_FastqFile) < 0) __PYX_ERR(0, 658, __pyx_L1_error)
jpayne@69 19085 #endif
jpayne@69 19086 #if PY_MAJOR_VERSION < 3
jpayne@69 19087 __pyx_ptype_5pysam_9libcfaidx_FastqFile->tp_print = 0;
jpayne@69 19088 #endif
jpayne@69 19089 #if !CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 19090 if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_5pysam_9libcfaidx_FastqFile->tp_dictoffset && __pyx_ptype_5pysam_9libcfaidx_FastqFile->tp_getattro == PyObject_GenericGetAttr)) {
jpayne@69 19091 __pyx_ptype_5pysam_9libcfaidx_FastqFile->tp_getattro = __Pyx_PyObject_GenericGetAttr;
jpayne@69 19092 }
jpayne@69 19093 #endif
jpayne@69 19094 if (__Pyx_SetVtable(__pyx_ptype_5pysam_9libcfaidx_FastqFile, __pyx_vtabptr_5pysam_9libcfaidx_FastqFile) < 0) __PYX_ERR(0, 658, __pyx_L1_error)
jpayne@69 19095 #if !CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 19096 if (__Pyx_MergeVtables(__pyx_ptype_5pysam_9libcfaidx_FastqFile) < 0) __PYX_ERR(0, 658, __pyx_L1_error)
jpayne@69 19097 #endif
jpayne@69 19098 if (PyObject_SetAttr(__pyx_m, __pyx_n_s_FastqFile, (PyObject *) __pyx_ptype_5pysam_9libcfaidx_FastqFile) < 0) __PYX_ERR(0, 658, __pyx_L1_error)
jpayne@69 19099 #if !CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 19100 if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_5pysam_9libcfaidx_FastqFile) < 0) __PYX_ERR(0, 658, __pyx_L1_error)
jpayne@69 19101 #endif
jpayne@69 19102 __pyx_vtabptr_5pysam_9libcfaidx_Fastafile = &__pyx_vtable_5pysam_9libcfaidx_Fastafile;
jpayne@69 19103 __pyx_vtable_5pysam_9libcfaidx_Fastafile.__pyx_base = *__pyx_vtabptr_5pysam_9libcfaidx_FastaFile;
jpayne@69 19104 #if CYTHON_USE_TYPE_SPECS
jpayne@69 19105 __pyx_t_1 = PyTuple_Pack(1, (PyObject *)__pyx_ptype_5pysam_9libcfaidx_FastaFile); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 663, __pyx_L1_error)
jpayne@69 19106 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 19107 __pyx_ptype_5pysam_9libcfaidx_Fastafile = (PyTypeObject *) __Pyx_PyType_FromModuleAndSpec(__pyx_m, &__pyx_type_5pysam_9libcfaidx_Fastafile_spec, __pyx_t_1);
jpayne@69 19108 __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@69 19109 if (unlikely(!__pyx_ptype_5pysam_9libcfaidx_Fastafile)) __PYX_ERR(0, 663, __pyx_L1_error)
jpayne@69 19110 if (__Pyx_fix_up_extension_type_from_spec(&__pyx_type_5pysam_9libcfaidx_Fastafile_spec, __pyx_ptype_5pysam_9libcfaidx_Fastafile) < 0) __PYX_ERR(0, 663, __pyx_L1_error)
jpayne@69 19111 #else
jpayne@69 19112 __pyx_ptype_5pysam_9libcfaidx_Fastafile = &__pyx_type_5pysam_9libcfaidx_Fastafile;
jpayne@69 19113 #endif
jpayne@69 19114 #if !CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 19115 __pyx_ptype_5pysam_9libcfaidx_Fastafile->tp_base = __pyx_ptype_5pysam_9libcfaidx_FastaFile;
jpayne@69 19116 #endif
jpayne@69 19117 #if !CYTHON_USE_TYPE_SPECS
jpayne@69 19118 if (__Pyx_PyType_Ready(__pyx_ptype_5pysam_9libcfaidx_Fastafile) < 0) __PYX_ERR(0, 663, __pyx_L1_error)
jpayne@69 19119 #endif
jpayne@69 19120 #if PY_MAJOR_VERSION < 3
jpayne@69 19121 __pyx_ptype_5pysam_9libcfaidx_Fastafile->tp_print = 0;
jpayne@69 19122 #endif
jpayne@69 19123 #if !CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 19124 if ((CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP) && likely(!__pyx_ptype_5pysam_9libcfaidx_Fastafile->tp_dictoffset && __pyx_ptype_5pysam_9libcfaidx_Fastafile->tp_getattro == PyObject_GenericGetAttr)) {
jpayne@69 19125 __pyx_ptype_5pysam_9libcfaidx_Fastafile->tp_getattro = __Pyx_PyObject_GenericGetAttr;
jpayne@69 19126 }
jpayne@69 19127 #endif
jpayne@69 19128 if (__Pyx_SetVtable(__pyx_ptype_5pysam_9libcfaidx_Fastafile, __pyx_vtabptr_5pysam_9libcfaidx_Fastafile) < 0) __PYX_ERR(0, 663, __pyx_L1_error)
jpayne@69 19129 #if !CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 19130 if (__Pyx_MergeVtables(__pyx_ptype_5pysam_9libcfaidx_Fastafile) < 0) __PYX_ERR(0, 663, __pyx_L1_error)
jpayne@69 19131 #endif
jpayne@69 19132 if (PyObject_SetAttr(__pyx_m, __pyx_n_s_Fastafile, (PyObject *) __pyx_ptype_5pysam_9libcfaidx_Fastafile) < 0) __PYX_ERR(0, 663, __pyx_L1_error)
jpayne@69 19133 #if !CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 19134 if (__Pyx_setup_reduce((PyObject *) __pyx_ptype_5pysam_9libcfaidx_Fastafile) < 0) __PYX_ERR(0, 663, __pyx_L1_error)
jpayne@69 19135 #endif
jpayne@69 19136 __Pyx_RefNannyFinishContext();
jpayne@69 19137 return 0;
jpayne@69 19138 __pyx_L1_error:;
jpayne@69 19139 __Pyx_XDECREF(__pyx_t_1);
jpayne@69 19140 __Pyx_RefNannyFinishContext();
jpayne@69 19141 return -1;
jpayne@69 19142 }
jpayne@69 19143
jpayne@69 19144 static int __Pyx_modinit_type_import_code(void) {
jpayne@69 19145 __Pyx_RefNannyDeclarations
jpayne@69 19146 PyObject *__pyx_t_1 = NULL;
jpayne@69 19147 int __pyx_lineno = 0;
jpayne@69 19148 const char *__pyx_filename = NULL;
jpayne@69 19149 int __pyx_clineno = 0;
jpayne@69 19150 __Pyx_RefNannySetupContext("__Pyx_modinit_type_import_code", 0);
jpayne@69 19151 /*--- Type import code ---*/
jpayne@69 19152 __pyx_t_1 = PyImport_ImportModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_t_1)) __PYX_ERR(5, 9, __pyx_L1_error)
jpayne@69 19153 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 19154 __pyx_ptype_7cpython_4type_type = __Pyx_ImportType_3_0_11(__pyx_t_1, __Pyx_BUILTIN_MODULE_NAME, "type",
jpayne@69 19155 #if defined(PYPY_VERSION_NUM) && PYPY_VERSION_NUM < 0x050B0000
jpayne@69 19156 sizeof(PyTypeObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_11(PyTypeObject),
jpayne@69 19157 #elif CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 19158 sizeof(PyTypeObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_11(PyTypeObject),
jpayne@69 19159 #else
jpayne@69 19160 sizeof(PyHeapTypeObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_11(PyHeapTypeObject),
jpayne@69 19161 #endif
jpayne@69 19162 __Pyx_ImportType_CheckSize_Warn_3_0_11); if (!__pyx_ptype_7cpython_4type_type) __PYX_ERR(5, 9, __pyx_L1_error)
jpayne@69 19163 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@69 19164 __pyx_t_1 = PyImport_ImportModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_t_1)) __PYX_ERR(6, 8, __pyx_L1_error)
jpayne@69 19165 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 19166 __pyx_ptype_7cpython_4bool_bool = __Pyx_ImportType_3_0_11(__pyx_t_1, __Pyx_BUILTIN_MODULE_NAME, "bool", sizeof(PyBoolObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_11(PyBoolObject),__Pyx_ImportType_CheckSize_Warn_3_0_11); if (!__pyx_ptype_7cpython_4bool_bool) __PYX_ERR(6, 8, __pyx_L1_error)
jpayne@69 19167 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@69 19168 __pyx_t_1 = PyImport_ImportModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_t_1)) __PYX_ERR(7, 15, __pyx_L1_error)
jpayne@69 19169 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 19170 __pyx_ptype_7cpython_7complex_complex = __Pyx_ImportType_3_0_11(__pyx_t_1, __Pyx_BUILTIN_MODULE_NAME, "complex", sizeof(PyComplexObject), __PYX_GET_STRUCT_ALIGNMENT_3_0_11(PyComplexObject),__Pyx_ImportType_CheckSize_Warn_3_0_11); if (!__pyx_ptype_7cpython_7complex_complex) __PYX_ERR(7, 15, __pyx_L1_error)
jpayne@69 19171 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@69 19172 __pyx_t_1 = PyImport_ImportModule("array"); if (unlikely(!__pyx_t_1)) __PYX_ERR(3, 69, __pyx_L1_error)
jpayne@69 19173 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 19174 __pyx_ptype_7cpython_5array_array = __Pyx_ImportType_3_0_11(__pyx_t_1, "array", "array", sizeof(arrayobject), __PYX_GET_STRUCT_ALIGNMENT_3_0_11(arrayobject),__Pyx_ImportType_CheckSize_Warn_3_0_11); if (!__pyx_ptype_7cpython_5array_array) __PYX_ERR(3, 69, __pyx_L1_error)
jpayne@69 19175 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@69 19176 __pyx_t_1 = PyImport_ImportModule("pysam.libchtslib"); if (unlikely(!__pyx_t_1)) __PYX_ERR(8, 2706, __pyx_L1_error)
jpayne@69 19177 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 19178 __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(8, 2706, __pyx_L1_error)
jpayne@69 19179 __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(8, 2706, __pyx_L1_error)
jpayne@69 19180 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@69 19181 __Pyx_RefNannyFinishContext();
jpayne@69 19182 return 0;
jpayne@69 19183 __pyx_L1_error:;
jpayne@69 19184 __Pyx_XDECREF(__pyx_t_1);
jpayne@69 19185 __Pyx_RefNannyFinishContext();
jpayne@69 19186 return -1;
jpayne@69 19187 }
jpayne@69 19188
jpayne@69 19189 static int __Pyx_modinit_variable_import_code(void) {
jpayne@69 19190 __Pyx_RefNannyDeclarations
jpayne@69 19191 __Pyx_RefNannySetupContext("__Pyx_modinit_variable_import_code", 0);
jpayne@69 19192 /*--- Variable import code ---*/
jpayne@69 19193 __Pyx_RefNannyFinishContext();
jpayne@69 19194 return 0;
jpayne@69 19195 }
jpayne@69 19196
jpayne@69 19197 static int __Pyx_modinit_function_import_code(void) {
jpayne@69 19198 __Pyx_RefNannyDeclarations
jpayne@69 19199 PyObject *__pyx_t_1 = NULL;
jpayne@69 19200 int __pyx_lineno = 0;
jpayne@69 19201 const char *__pyx_filename = NULL;
jpayne@69 19202 int __pyx_clineno = 0;
jpayne@69 19203 __Pyx_RefNannySetupContext("__Pyx_modinit_function_import_code", 0);
jpayne@69 19204 /*--- Function import code ---*/
jpayne@69 19205 __pyx_t_1 = PyImport_ImportModule("pysam.libcutils"); if (!__pyx_t_1) __PYX_ERR(0, 1, __pyx_L1_error)
jpayne@69 19206 __Pyx_GOTREF(__pyx_t_1);
jpayne@69 19207 if (__Pyx_ImportFunction_3_0_11(__pyx_t_1, "parse_region", (void (**)(void))&__pyx_f_5pysam_9libcutils_parse_region, "PyObject *(int __pyx_skip_dispatch, struct __pyx_opt_args_5pysam_9libcutils_parse_region *__pyx_optional_args)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
jpayne@69 19208 if (__Pyx_ImportFunction_3_0_11(__pyx_t_1, "qualitystring_to_array", (void (**)(void))&__pyx_f_5pysam_9libcutils_qualitystring_to_array, "arrayobject *(PyObject *, int __pyx_skip_dispatch, struct __pyx_opt_args_5pysam_9libcutils_qualitystring_to_array *__pyx_optional_args)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
jpayne@69 19209 if (__Pyx_ImportFunction_3_0_11(__pyx_t_1, "charptr_to_str", (void (**)(void))&__pyx_f_5pysam_9libcutils_charptr_to_str, "PyObject *(char const *, struct __pyx_opt_args_5pysam_9libcutils_charptr_to_str *__pyx_optional_args)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
jpayne@69 19210 if (__Pyx_ImportFunction_3_0_11(__pyx_t_1, "force_str", (void (**)(void))&__pyx_f_5pysam_9libcutils_force_str, "PyObject *(PyObject *, struct __pyx_opt_args_5pysam_9libcutils_force_str *__pyx_optional_args)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
jpayne@69 19211 if (__Pyx_ImportFunction_3_0_11(__pyx_t_1, "force_bytes", (void (**)(void))&__pyx_f_5pysam_9libcutils_force_bytes, "PyObject *(PyObject *, struct __pyx_opt_args_5pysam_9libcutils_force_bytes *__pyx_optional_args)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
jpayne@69 19212 if (__Pyx_ImportFunction_3_0_11(__pyx_t_1, "encode_filename", (void (**)(void))&__pyx_f_5pysam_9libcutils_encode_filename, "PyObject *(PyObject *)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
jpayne@69 19213 if (__Pyx_ImportFunction_3_0_11(__pyx_t_1, "from_string_and_size", (void (**)(void))&__pyx_f_5pysam_9libcutils_from_string_and_size, "PyObject *(char const *, size_t)") < 0) __PYX_ERR(0, 1, __pyx_L1_error)
jpayne@69 19214 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
jpayne@69 19215 __Pyx_RefNannyFinishContext();
jpayne@69 19216 return 0;
jpayne@69 19217 __pyx_L1_error:;
jpayne@69 19218 __Pyx_XDECREF(__pyx_t_1);
jpayne@69 19219 __Pyx_RefNannyFinishContext();
jpayne@69 19220 return -1;
jpayne@69 19221 }
jpayne@69 19222
jpayne@69 19223
jpayne@69 19224 #if PY_MAJOR_VERSION >= 3
jpayne@69 19225 #if CYTHON_PEP489_MULTI_PHASE_INIT
jpayne@69 19226 static PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def); /*proto*/
jpayne@69 19227 static int __pyx_pymod_exec_libcfaidx(PyObject* module); /*proto*/
jpayne@69 19228 static PyModuleDef_Slot __pyx_moduledef_slots[] = {
jpayne@69 19229 {Py_mod_create, (void*)__pyx_pymod_create},
jpayne@69 19230 {Py_mod_exec, (void*)__pyx_pymod_exec_libcfaidx},
jpayne@69 19231 {0, NULL}
jpayne@69 19232 };
jpayne@69 19233 #endif
jpayne@69 19234
jpayne@69 19235 #ifdef __cplusplus
jpayne@69 19236 namespace {
jpayne@69 19237 struct PyModuleDef __pyx_moduledef =
jpayne@69 19238 #else
jpayne@69 19239 static struct PyModuleDef __pyx_moduledef =
jpayne@69 19240 #endif
jpayne@69 19241 {
jpayne@69 19242 PyModuleDef_HEAD_INIT,
jpayne@69 19243 "libcfaidx",
jpayne@69 19244 0, /* m_doc */
jpayne@69 19245 #if CYTHON_PEP489_MULTI_PHASE_INIT
jpayne@69 19246 0, /* m_size */
jpayne@69 19247 #elif CYTHON_USE_MODULE_STATE
jpayne@69 19248 sizeof(__pyx_mstate), /* m_size */
jpayne@69 19249 #else
jpayne@69 19250 -1, /* m_size */
jpayne@69 19251 #endif
jpayne@69 19252 __pyx_methods /* m_methods */,
jpayne@69 19253 #if CYTHON_PEP489_MULTI_PHASE_INIT
jpayne@69 19254 __pyx_moduledef_slots, /* m_slots */
jpayne@69 19255 #else
jpayne@69 19256 NULL, /* m_reload */
jpayne@69 19257 #endif
jpayne@69 19258 #if CYTHON_USE_MODULE_STATE
jpayne@69 19259 __pyx_m_traverse, /* m_traverse */
jpayne@69 19260 __pyx_m_clear, /* m_clear */
jpayne@69 19261 NULL /* m_free */
jpayne@69 19262 #else
jpayne@69 19263 NULL, /* m_traverse */
jpayne@69 19264 NULL, /* m_clear */
jpayne@69 19265 NULL /* m_free */
jpayne@69 19266 #endif
jpayne@69 19267 };
jpayne@69 19268 #ifdef __cplusplus
jpayne@69 19269 } /* anonymous namespace */
jpayne@69 19270 #endif
jpayne@69 19271 #endif
jpayne@69 19272
jpayne@69 19273 #ifndef CYTHON_NO_PYINIT_EXPORT
jpayne@69 19274 #define __Pyx_PyMODINIT_FUNC PyMODINIT_FUNC
jpayne@69 19275 #elif PY_MAJOR_VERSION < 3
jpayne@69 19276 #ifdef __cplusplus
jpayne@69 19277 #define __Pyx_PyMODINIT_FUNC extern "C" void
jpayne@69 19278 #else
jpayne@69 19279 #define __Pyx_PyMODINIT_FUNC void
jpayne@69 19280 #endif
jpayne@69 19281 #else
jpayne@69 19282 #ifdef __cplusplus
jpayne@69 19283 #define __Pyx_PyMODINIT_FUNC extern "C" PyObject *
jpayne@69 19284 #else
jpayne@69 19285 #define __Pyx_PyMODINIT_FUNC PyObject *
jpayne@69 19286 #endif
jpayne@69 19287 #endif
jpayne@69 19288
jpayne@69 19289
jpayne@69 19290 #if PY_MAJOR_VERSION < 3
jpayne@69 19291 __Pyx_PyMODINIT_FUNC initlibcfaidx(void) CYTHON_SMALL_CODE; /*proto*/
jpayne@69 19292 __Pyx_PyMODINIT_FUNC initlibcfaidx(void)
jpayne@69 19293 #else
jpayne@69 19294 __Pyx_PyMODINIT_FUNC PyInit_libcfaidx(void) CYTHON_SMALL_CODE; /*proto*/
jpayne@69 19295 __Pyx_PyMODINIT_FUNC PyInit_libcfaidx(void)
jpayne@69 19296 #if CYTHON_PEP489_MULTI_PHASE_INIT
jpayne@69 19297 {
jpayne@69 19298 return PyModuleDef_Init(&__pyx_moduledef);
jpayne@69 19299 }
jpayne@69 19300 static CYTHON_SMALL_CODE int __Pyx_check_single_interpreter(void) {
jpayne@69 19301 #if PY_VERSION_HEX >= 0x030700A1
jpayne@69 19302 static PY_INT64_T main_interpreter_id = -1;
jpayne@69 19303 PY_INT64_T current_id = PyInterpreterState_GetID(PyThreadState_Get()->interp);
jpayne@69 19304 if (main_interpreter_id == -1) {
jpayne@69 19305 main_interpreter_id = current_id;
jpayne@69 19306 return (unlikely(current_id == -1)) ? -1 : 0;
jpayne@69 19307 } else if (unlikely(main_interpreter_id != current_id))
jpayne@69 19308 #else
jpayne@69 19309 static PyInterpreterState *main_interpreter = NULL;
jpayne@69 19310 PyInterpreterState *current_interpreter = PyThreadState_Get()->interp;
jpayne@69 19311 if (!main_interpreter) {
jpayne@69 19312 main_interpreter = current_interpreter;
jpayne@69 19313 } else if (unlikely(main_interpreter != current_interpreter))
jpayne@69 19314 #endif
jpayne@69 19315 {
jpayne@69 19316 PyErr_SetString(
jpayne@69 19317 PyExc_ImportError,
jpayne@69 19318 "Interpreter change detected - this module can only be loaded into one interpreter per process.");
jpayne@69 19319 return -1;
jpayne@69 19320 }
jpayne@69 19321 return 0;
jpayne@69 19322 }
jpayne@69 19323 #if CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 19324 static CYTHON_SMALL_CODE int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *module, const char* from_name, const char* to_name, int allow_none)
jpayne@69 19325 #else
jpayne@69 19326 static CYTHON_SMALL_CODE int __Pyx_copy_spec_to_module(PyObject *spec, PyObject *moddict, const char* from_name, const char* to_name, int allow_none)
jpayne@69 19327 #endif
jpayne@69 19328 {
jpayne@69 19329 PyObject *value = PyObject_GetAttrString(spec, from_name);
jpayne@69 19330 int result = 0;
jpayne@69 19331 if (likely(value)) {
jpayne@69 19332 if (allow_none || value != Py_None) {
jpayne@69 19333 #if CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 19334 result = PyModule_AddObject(module, to_name, value);
jpayne@69 19335 #else
jpayne@69 19336 result = PyDict_SetItemString(moddict, to_name, value);
jpayne@69 19337 #endif
jpayne@69 19338 }
jpayne@69 19339 Py_DECREF(value);
jpayne@69 19340 } else if (PyErr_ExceptionMatches(PyExc_AttributeError)) {
jpayne@69 19341 PyErr_Clear();
jpayne@69 19342 } else {
jpayne@69 19343 result = -1;
jpayne@69 19344 }
jpayne@69 19345 return result;
jpayne@69 19346 }
jpayne@69 19347 static CYTHON_SMALL_CODE PyObject* __pyx_pymod_create(PyObject *spec, PyModuleDef *def) {
jpayne@69 19348 PyObject *module = NULL, *moddict, *modname;
jpayne@69 19349 CYTHON_UNUSED_VAR(def);
jpayne@69 19350 if (__Pyx_check_single_interpreter())
jpayne@69 19351 return NULL;
jpayne@69 19352 if (__pyx_m)
jpayne@69 19353 return __Pyx_NewRef(__pyx_m);
jpayne@69 19354 modname = PyObject_GetAttrString(spec, "name");
jpayne@69 19355 if (unlikely(!modname)) goto bad;
jpayne@69 19356 module = PyModule_NewObject(modname);
jpayne@69 19357 Py_DECREF(modname);
jpayne@69 19358 if (unlikely(!module)) goto bad;
jpayne@69 19359 #if CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 19360 moddict = module;
jpayne@69 19361 #else
jpayne@69 19362 moddict = PyModule_GetDict(module);
jpayne@69 19363 if (unlikely(!moddict)) goto bad;
jpayne@69 19364 #endif
jpayne@69 19365 if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "loader", "__loader__", 1) < 0)) goto bad;
jpayne@69 19366 if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "origin", "__file__", 1) < 0)) goto bad;
jpayne@69 19367 if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "parent", "__package__", 1) < 0)) goto bad;
jpayne@69 19368 if (unlikely(__Pyx_copy_spec_to_module(spec, moddict, "submodule_search_locations", "__path__", 0) < 0)) goto bad;
jpayne@69 19369 return module;
jpayne@69 19370 bad:
jpayne@69 19371 Py_XDECREF(module);
jpayne@69 19372 return NULL;
jpayne@69 19373 }
jpayne@69 19374
jpayne@69 19375
jpayne@69 19376 static CYTHON_SMALL_CODE int __pyx_pymod_exec_libcfaidx(PyObject *__pyx_pyinit_module)
jpayne@69 19377 #endif
jpayne@69 19378 #endif
jpayne@69 19379 {
jpayne@69 19380 int stringtab_initialized = 0;
jpayne@69 19381 #if CYTHON_USE_MODULE_STATE
jpayne@69 19382 int pystate_addmodule_run = 0;
jpayne@69 19383 #endif
jpayne@69 19384 __Pyx_TraceDeclarations
jpayne@69 19385 PyObject *__pyx_t_1 = NULL;
jpayne@69 19386 PyObject *__pyx_t_2 = NULL;
jpayne@69 19387 int __pyx_lineno = 0;
jpayne@69 19388 const char *__pyx_filename = NULL;
jpayne@69 19389 int __pyx_clineno = 0;
jpayne@69 19390 __Pyx_RefNannyDeclarations
jpayne@69 19391 #if CYTHON_PEP489_MULTI_PHASE_INIT
jpayne@69 19392 if (__pyx_m) {
jpayne@69 19393 if (__pyx_m == __pyx_pyinit_module) return 0;
jpayne@69 19394 PyErr_SetString(PyExc_RuntimeError, "Module 'libcfaidx' has already been imported. Re-initialisation is not supported.");
jpayne@69 19395 return -1;
jpayne@69 19396 }
jpayne@69 19397 #elif PY_MAJOR_VERSION >= 3
jpayne@69 19398 if (__pyx_m) return __Pyx_NewRef(__pyx_m);
jpayne@69 19399 #endif
jpayne@69 19400 /*--- Module creation code ---*/
jpayne@69 19401 #if CYTHON_PEP489_MULTI_PHASE_INIT
jpayne@69 19402 __pyx_m = __pyx_pyinit_module;
jpayne@69 19403 Py_INCREF(__pyx_m);
jpayne@69 19404 #else
jpayne@69 19405 #if PY_MAJOR_VERSION < 3
jpayne@69 19406 __pyx_m = Py_InitModule4("libcfaidx", __pyx_methods, 0, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m);
jpayne@69 19407 if (unlikely(!__pyx_m)) __PYX_ERR(0, 1, __pyx_L1_error)
jpayne@69 19408 #elif CYTHON_USE_MODULE_STATE
jpayne@69 19409 __pyx_t_1 = PyModule_Create(&__pyx_moduledef); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 1, __pyx_L1_error)
jpayne@69 19410 {
jpayne@69 19411 int add_module_result = PyState_AddModule(__pyx_t_1, &__pyx_moduledef);
jpayne@69 19412 __pyx_t_1 = 0; /* transfer ownership from __pyx_t_1 to "libcfaidx" pseudovariable */
jpayne@69 19413 if (unlikely((add_module_result < 0))) __PYX_ERR(0, 1, __pyx_L1_error)
jpayne@69 19414 pystate_addmodule_run = 1;
jpayne@69 19415 }
jpayne@69 19416 #else
jpayne@69 19417 __pyx_m = PyModule_Create(&__pyx_moduledef);
jpayne@69 19418 if (unlikely(!__pyx_m)) __PYX_ERR(0, 1, __pyx_L1_error)
jpayne@69 19419 #endif
jpayne@69 19420 #endif
jpayne@69 19421 CYTHON_UNUSED_VAR(__pyx_t_1);
jpayne@69 19422 __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) __PYX_ERR(0, 1, __pyx_L1_error)
jpayne@69 19423 Py_INCREF(__pyx_d);
jpayne@69 19424 __pyx_b = __Pyx_PyImport_AddModuleRef(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_b)) __PYX_ERR(0, 1, __pyx_L1_error)
jpayne@69 19425 __pyx_cython_runtime = __Pyx_PyImport_AddModuleRef((const char *) "cython_runtime"); if (unlikely(!__pyx_cython_runtime)) __PYX_ERR(0, 1, __pyx_L1_error)
jpayne@69 19426 if (PyObject_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
jpayne@69 19427 #if CYTHON_REFNANNY
jpayne@69 19428 __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny");
jpayne@69 19429 if (!__Pyx_RefNanny) {
jpayne@69 19430 PyErr_Clear();
jpayne@69 19431 __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny");
jpayne@69 19432 if (!__Pyx_RefNanny)
jpayne@69 19433 Py_FatalError("failed to import 'refnanny' module");
jpayne@69 19434 }
jpayne@69 19435 #endif
jpayne@69 19436 __Pyx_RefNannySetupContext("__Pyx_PyMODINIT_FUNC PyInit_libcfaidx(void)", 0);
jpayne@69 19437 if (__Pyx_check_binary_version(__PYX_LIMITED_VERSION_HEX, __Pyx_get_runtime_version(), CYTHON_COMPILING_IN_LIMITED_API) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
jpayne@69 19438 #ifdef __Pxy_PyFrame_Initialize_Offsets
jpayne@69 19439 __Pxy_PyFrame_Initialize_Offsets();
jpayne@69 19440 #endif
jpayne@69 19441 __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) __PYX_ERR(0, 1, __pyx_L1_error)
jpayne@69 19442 __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) __PYX_ERR(0, 1, __pyx_L1_error)
jpayne@69 19443 __pyx_empty_unicode = PyUnicode_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_unicode)) __PYX_ERR(0, 1, __pyx_L1_error)
jpayne@69 19444 #ifdef __Pyx_CyFunction_USED
jpayne@69 19445 if (__pyx_CyFunction_init(__pyx_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
jpayne@69 19446 #endif
jpayne@69 19447 #ifdef __Pyx_FusedFunction_USED
jpayne@69 19448 if (__pyx_FusedFunction_init(__pyx_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
jpayne@69 19449 #endif
jpayne@69 19450 #ifdef __Pyx_Coroutine_USED
jpayne@69 19451 if (__pyx_Coroutine_init(__pyx_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
jpayne@69 19452 #endif
jpayne@69 19453 #ifdef __Pyx_Generator_USED
jpayne@69 19454 if (__pyx_Generator_init(__pyx_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
jpayne@69 19455 #endif
jpayne@69 19456 #ifdef __Pyx_AsyncGen_USED
jpayne@69 19457 if (__pyx_AsyncGen_init(__pyx_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
jpayne@69 19458 #endif
jpayne@69 19459 #ifdef __Pyx_StopAsyncIteration_USED
jpayne@69 19460 if (__pyx_StopAsyncIteration_init(__pyx_m) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
jpayne@69 19461 #endif
jpayne@69 19462 /*--- Library function declarations ---*/
jpayne@69 19463 /*--- Threads initialization code ---*/
jpayne@69 19464 #if defined(WITH_THREAD) && PY_VERSION_HEX < 0x030700F0 && defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS
jpayne@69 19465 PyEval_InitThreads();
jpayne@69 19466 #endif
jpayne@69 19467 /*--- Initialize various global constants etc. ---*/
jpayne@69 19468 if (__Pyx_InitConstants() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
jpayne@69 19469 stringtab_initialized = 1;
jpayne@69 19470 if (__Pyx_InitGlobals() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
jpayne@69 19471 #if PY_MAJOR_VERSION < 3 && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT)
jpayne@69 19472 if (__Pyx_init_sys_getdefaultencoding_params() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
jpayne@69 19473 #endif
jpayne@69 19474 if (__pyx_module_is_main_pysam__libcfaidx) {
jpayne@69 19475 if (PyObject_SetAttr(__pyx_m, __pyx_n_s_name_2, __pyx_n_s_main) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
jpayne@69 19476 }
jpayne@69 19477 #if PY_MAJOR_VERSION >= 3
jpayne@69 19478 {
jpayne@69 19479 PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) __PYX_ERR(0, 1, __pyx_L1_error)
jpayne@69 19480 if (!PyDict_GetItemString(modules, "pysam.libcfaidx")) {
jpayne@69 19481 if (unlikely((PyDict_SetItemString(modules, "pysam.libcfaidx", __pyx_m) < 0))) __PYX_ERR(0, 1, __pyx_L1_error)
jpayne@69 19482 }
jpayne@69 19483 }
jpayne@69 19484 #endif
jpayne@69 19485 /*--- Builtin init code ---*/
jpayne@69 19486 if (__Pyx_InitCachedBuiltins() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
jpayne@69 19487 /*--- Constants init code ---*/
jpayne@69 19488 if (__Pyx_InitCachedConstants() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
jpayne@69 19489 /*--- Global type/function init code ---*/
jpayne@69 19490 (void)__Pyx_modinit_global_init_code();
jpayne@69 19491 (void)__Pyx_modinit_variable_export_code();
jpayne@69 19492 (void)__Pyx_modinit_function_export_code();
jpayne@69 19493 if (unlikely((__Pyx_modinit_type_init_code() < 0))) __PYX_ERR(0, 1, __pyx_L1_error)
jpayne@69 19494 if (unlikely((__Pyx_modinit_type_import_code() < 0))) __PYX_ERR(0, 1, __pyx_L1_error)
jpayne@69 19495 (void)__Pyx_modinit_variable_import_code();
jpayne@69 19496 if (unlikely((__Pyx_modinit_function_import_code() < 0))) __PYX_ERR(0, 1, __pyx_L1_error)
jpayne@69 19497 /*--- Execution code ---*/
jpayne@69 19498 #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
jpayne@69 19499 if (__Pyx_patch_abc() < 0) __PYX_ERR(0, 1, __pyx_L1_error)
jpayne@69 19500 #endif
jpayne@69 19501 __Pyx_TraceCall("__Pyx_PyMODINIT_FUNC PyInit_libcfaidx(void)", __pyx_f[0], 1, 0, __PYX_ERR(0, 1, __pyx_L1_error));
jpayne@69 19502
jpayne@69 19503 /* "pysam/libcfaidx.pyx":48
jpayne@69 19504 * #
jpayne@69 19505 * ###############################################################################
jpayne@69 19506 * import sys # <<<<<<<<<<<<<<
jpayne@69 19507 * import os
jpayne@69 19508 * import re
jpayne@69 19509 */
jpayne@69 19510 __pyx_t_2 = __Pyx_ImportDottedModule(__pyx_n_s_sys, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 48, __pyx_L1_error)
jpayne@69 19511 __Pyx_GOTREF(__pyx_t_2);
jpayne@69 19512 if (PyDict_SetItem(__pyx_d, __pyx_n_s_sys, __pyx_t_2) < 0) __PYX_ERR(0, 48, __pyx_L1_error)
jpayne@69 19513 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@69 19514
jpayne@69 19515 /* "pysam/libcfaidx.pyx":49
jpayne@69 19516 * ###############################################################################
jpayne@69 19517 * import sys
jpayne@69 19518 * import os # <<<<<<<<<<<<<<
jpayne@69 19519 * import re
jpayne@69 19520 *
jpayne@69 19521 */
jpayne@69 19522 __pyx_t_2 = __Pyx_ImportDottedModule(__pyx_n_s_os, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 49, __pyx_L1_error)
jpayne@69 19523 __Pyx_GOTREF(__pyx_t_2);
jpayne@69 19524 if (PyDict_SetItem(__pyx_d, __pyx_n_s_os, __pyx_t_2) < 0) __PYX_ERR(0, 49, __pyx_L1_error)
jpayne@69 19525 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@69 19526
jpayne@69 19527 /* "pysam/libcfaidx.pyx":50
jpayne@69 19528 * import sys
jpayne@69 19529 * import os
jpayne@69 19530 * import re # <<<<<<<<<<<<<<
jpayne@69 19531 *
jpayne@69 19532 *
jpayne@69 19533 */
jpayne@69 19534 __pyx_t_2 = __Pyx_ImportDottedModule(__pyx_n_s_re, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 50, __pyx_L1_error)
jpayne@69 19535 __Pyx_GOTREF(__pyx_t_2);
jpayne@69 19536 if (PyDict_SetItem(__pyx_d, __pyx_n_s_re, __pyx_t_2) < 0) __PYX_ERR(0, 50, __pyx_L1_error)
jpayne@69 19537 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@69 19538
jpayne@69 19539 /* "pysam/libcfaidx.pyx":123
jpayne@69 19540 * self._open(*args, **kwargs)
jpayne@69 19541 *
jpayne@69 19542 * def is_open(self): # <<<<<<<<<<<<<<
jpayne@69 19543 * '''return true if samfile has been opened.'''
jpayne@69 19544 * return self.fastafile != NULL
jpayne@69 19545 */
jpayne@69 19546 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_9libcfaidx_9FastaFile_3is_open, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_FastaFile_is_open, NULL, __pyx_n_s_pysam_libcfaidx, __pyx_d, ((PyObject *)__pyx_codeobj_)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 123, __pyx_L1_error)
jpayne@69 19547 __Pyx_GOTREF(__pyx_t_2);
jpayne@69 19548 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_9libcfaidx_FastaFile, __pyx_n_s_is_open, __pyx_t_2) < 0) __PYX_ERR(0, 123, __pyx_L1_error)
jpayne@69 19549 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@69 19550 PyType_Modified(__pyx_ptype_5pysam_9libcfaidx_FastaFile);
jpayne@69 19551
jpayne@69 19552 /* "pysam/libcfaidx.pyx":133
jpayne@69 19553 * return faidx_nseq(self.fastafile)
jpayne@69 19554 *
jpayne@69 19555 * def _open(self, filename, filepath_index=None, filepath_index_compressed=None): # <<<<<<<<<<<<<<
jpayne@69 19556 * '''open an indexed fasta file.
jpayne@69 19557 *
jpayne@69 19558 */
jpayne@69 19559 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_9libcfaidx_9FastaFile_7_open, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_FastaFile__open, NULL, __pyx_n_s_pysam_libcfaidx, __pyx_d, ((PyObject *)__pyx_codeobj__3)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 133, __pyx_L1_error)
jpayne@69 19560 __Pyx_GOTREF(__pyx_t_2);
jpayne@69 19561 __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_tuple__51);
jpayne@69 19562 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_9libcfaidx_FastaFile, __pyx_n_s_open, __pyx_t_2) < 0) __PYX_ERR(0, 133, __pyx_L1_error)
jpayne@69 19563 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@69 19564 PyType_Modified(__pyx_ptype_5pysam_9libcfaidx_FastaFile);
jpayne@69 19565
jpayne@69 19566 /* "pysam/libcfaidx.pyx":195
jpayne@69 19567 * self.reference2length = dict(zip(self._references, self._lengths))
jpayne@69 19568 *
jpayne@69 19569 * def close(self): # <<<<<<<<<<<<<<
jpayne@69 19570 * """close the file."""
jpayne@69 19571 * if self.fastafile != NULL:
jpayne@69 19572 */
jpayne@69 19573 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_9libcfaidx_9FastaFile_9close, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_FastaFile_close, NULL, __pyx_n_s_pysam_libcfaidx, __pyx_d, ((PyObject *)__pyx_codeobj__5)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 195, __pyx_L1_error)
jpayne@69 19574 __Pyx_GOTREF(__pyx_t_2);
jpayne@69 19575 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_9libcfaidx_FastaFile, __pyx_n_s_close, __pyx_t_2) < 0) __PYX_ERR(0, 195, __pyx_L1_error)
jpayne@69 19576 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@69 19577 PyType_Modified(__pyx_ptype_5pysam_9libcfaidx_FastaFile);
jpayne@69 19578
jpayne@69 19579 /* "pysam/libcfaidx.pyx":207
jpayne@69 19580 *
jpayne@69 19581 * # context manager interface
jpayne@69 19582 * def __enter__(self): # <<<<<<<<<<<<<<
jpayne@69 19583 * return self
jpayne@69 19584 *
jpayne@69 19585 */
jpayne@69 19586 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_9libcfaidx_9FastaFile_13__enter__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_FastaFile___enter, NULL, __pyx_n_s_pysam_libcfaidx, __pyx_d, ((PyObject *)__pyx_codeobj__6)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 207, __pyx_L1_error)
jpayne@69 19587 __Pyx_GOTREF(__pyx_t_2);
jpayne@69 19588 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_9libcfaidx_FastaFile, __pyx_n_s_enter, __pyx_t_2) < 0) __PYX_ERR(0, 207, __pyx_L1_error)
jpayne@69 19589 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@69 19590 PyType_Modified(__pyx_ptype_5pysam_9libcfaidx_FastaFile);
jpayne@69 19591
jpayne@69 19592 /* "pysam/libcfaidx.pyx":210
jpayne@69 19593 * return self
jpayne@69 19594 *
jpayne@69 19595 * def __exit__(self, exc_type, exc_value, traceback): # <<<<<<<<<<<<<<
jpayne@69 19596 * self.close()
jpayne@69 19597 * return False
jpayne@69 19598 */
jpayne@69 19599 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_9libcfaidx_9FastaFile_15__exit__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_FastaFile___exit, NULL, __pyx_n_s_pysam_libcfaidx, __pyx_d, ((PyObject *)__pyx_codeobj__7)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 210, __pyx_L1_error)
jpayne@69 19600 __Pyx_GOTREF(__pyx_t_2);
jpayne@69 19601 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_9libcfaidx_FastaFile, __pyx_n_s_exit, __pyx_t_2) < 0) __PYX_ERR(0, 210, __pyx_L1_error)
jpayne@69 19602 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@69 19603 PyType_Modified(__pyx_ptype_5pysam_9libcfaidx_FastaFile);
jpayne@69 19604
jpayne@69 19605 /* "pysam/libcfaidx.pyx":242
jpayne@69 19606 * return self._lengths
jpayne@69 19607 *
jpayne@69 19608 * def fetch(self, # <<<<<<<<<<<<<<
jpayne@69 19609 * reference=None,
jpayne@69 19610 * start=None,
jpayne@69 19611 */
jpayne@69 19612 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_9libcfaidx_9FastaFile_17fetch, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_FastaFile_fetch, NULL, __pyx_n_s_pysam_libcfaidx, __pyx_d, ((PyObject *)__pyx_codeobj__8)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 242, __pyx_L1_error)
jpayne@69 19613 __Pyx_GOTREF(__pyx_t_2);
jpayne@69 19614 __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_tuple__54);
jpayne@69 19615 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_9libcfaidx_FastaFile, __pyx_n_s_fetch, __pyx_t_2) < 0) __PYX_ERR(0, 242, __pyx_L1_error)
jpayne@69 19616 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@69 19617 PyType_Modified(__pyx_ptype_5pysam_9libcfaidx_FastaFile);
jpayne@69 19618
jpayne@69 19619 /* "pysam/libcfaidx.pyx":343
jpayne@69 19620 * return seq
jpayne@69 19621 *
jpayne@69 19622 * def get_reference_length(self, reference): # <<<<<<<<<<<<<<
jpayne@69 19623 * '''return the length of reference.'''
jpayne@69 19624 * return self.reference2length[reference]
jpayne@69 19625 */
jpayne@69 19626 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_9libcfaidx_9FastaFile_19get_reference_length, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_FastaFile_get_reference_length, NULL, __pyx_n_s_pysam_libcfaidx, __pyx_d, ((PyObject *)__pyx_codeobj__12)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 343, __pyx_L1_error)
jpayne@69 19627 __Pyx_GOTREF(__pyx_t_2);
jpayne@69 19628 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_9libcfaidx_FastaFile, __pyx_n_s_get_reference_length, __pyx_t_2) < 0) __PYX_ERR(0, 343, __pyx_L1_error)
jpayne@69 19629 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@69 19630 PyType_Modified(__pyx_ptype_5pysam_9libcfaidx_FastaFile);
jpayne@69 19631
jpayne@69 19632 /* "(tree fragment)":1
jpayne@69 19633 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
jpayne@69 19634 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
jpayne@69 19635 * def __setstate_cython__(self, __pyx_state):
jpayne@69 19636 */
jpayne@69 19637 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_9libcfaidx_9FastaFile_25__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_FastaFile___reduce_cython, NULL, __pyx_n_s_pysam_libcfaidx, __pyx_d, ((PyObject *)__pyx_codeobj__13)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error)
jpayne@69 19638 __Pyx_GOTREF(__pyx_t_2);
jpayne@69 19639 if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
jpayne@69 19640 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@69 19641
jpayne@69 19642 /* "(tree fragment)":3
jpayne@69 19643 * def __reduce_cython__(self):
jpayne@69 19644 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
jpayne@69 19645 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
jpayne@69 19646 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
jpayne@69 19647 */
jpayne@69 19648 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_9libcfaidx_9FastaFile_27__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_FastaFile___setstate_cython, NULL, __pyx_n_s_pysam_libcfaidx, __pyx_d, ((PyObject *)__pyx_codeobj__14)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3, __pyx_L1_error)
jpayne@69 19649 __Pyx_GOTREF(__pyx_t_2);
jpayne@69 19650 if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_2) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
jpayne@69 19651 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@69 19652
jpayne@69 19653 /* "pysam/libcfaidx.pyx":404
jpayne@69 19654 * return self.to_string()
jpayne@69 19655 *
jpayne@69 19656 * cpdef array.array get_quality_array(self, int offset=33): # <<<<<<<<<<<<<<
jpayne@69 19657 * '''return quality values as integer array after subtracting offset.'''
jpayne@69 19658 * if self.quality is None:
jpayne@69 19659 */
jpayne@69 19660 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_9libcfaidx_10FastqProxy_5get_quality_array, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_FastqProxy_get_quality_array, NULL, __pyx_n_s_pysam_libcfaidx, __pyx_d, ((PyObject *)__pyx_codeobj__20)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 404, __pyx_L1_error)
jpayne@69 19661 __Pyx_GOTREF(__pyx_t_2);
jpayne@69 19662 __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_tuple__58);
jpayne@69 19663 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_9libcfaidx_FastqProxy, __pyx_n_s_get_quality_array, __pyx_t_2) < 0) __PYX_ERR(0, 404, __pyx_L1_error)
jpayne@69 19664 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@69 19665 PyType_Modified(__pyx_ptype_5pysam_9libcfaidx_FastqProxy);
jpayne@69 19666
jpayne@69 19667 /* "(tree fragment)":1
jpayne@69 19668 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
jpayne@69 19669 * raise TypeError, "self._delegate cannot be converted to a Python object for pickling"
jpayne@69 19670 * def __setstate_cython__(self, __pyx_state):
jpayne@69 19671 */
jpayne@69 19672 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_9libcfaidx_10FastqProxy_7__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_FastqProxy___reduce_cython, NULL, __pyx_n_s_pysam_libcfaidx, __pyx_d, ((PyObject *)__pyx_codeobj__21)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error)
jpayne@69 19673 __Pyx_GOTREF(__pyx_t_2);
jpayne@69 19674 if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
jpayne@69 19675 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@69 19676
jpayne@69 19677 /* "(tree fragment)":3
jpayne@69 19678 * def __reduce_cython__(self):
jpayne@69 19679 * raise TypeError, "self._delegate cannot be converted to a Python object for pickling"
jpayne@69 19680 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
jpayne@69 19681 * raise TypeError, "self._delegate cannot be converted to a Python object for pickling"
jpayne@69 19682 */
jpayne@69 19683 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_9libcfaidx_10FastqProxy_9__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_FastqProxy___setstate_cython, NULL, __pyx_n_s_pysam_libcfaidx, __pyx_d, ((PyObject *)__pyx_codeobj__22)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3, __pyx_L1_error)
jpayne@69 19684 __Pyx_GOTREF(__pyx_t_2);
jpayne@69 19685 if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_2) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
jpayne@69 19686 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@69 19687
jpayne@69 19688 /* "pysam/libcfaidx.pyx":435
jpayne@69 19689 * self.name = name
jpayne@69 19690 *
jpayne@69 19691 * def __copy__(self): # <<<<<<<<<<<<<<
jpayne@69 19692 * return FastxRecord(self.name, self.comment, self.sequence, self.quality)
jpayne@69 19693 *
jpayne@69 19694 */
jpayne@69 19695 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_9libcfaidx_11FastxRecord_3__copy__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_FastxRecord___copy, NULL, __pyx_n_s_pysam_libcfaidx, __pyx_d, ((PyObject *)__pyx_codeobj__23)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 435, __pyx_L1_error)
jpayne@69 19696 __Pyx_GOTREF(__pyx_t_2);
jpayne@69 19697 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_9libcfaidx_FastxRecord, __pyx_n_s_copy, __pyx_t_2) < 0) __PYX_ERR(0, 435, __pyx_L1_error)
jpayne@69 19698 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@69 19699 PyType_Modified(__pyx_ptype_5pysam_9libcfaidx_FastxRecord);
jpayne@69 19700
jpayne@69 19701 /* "pysam/libcfaidx.pyx":438
jpayne@69 19702 * return FastxRecord(self.name, self.comment, self.sequence, self.quality)
jpayne@69 19703 *
jpayne@69 19704 * def __deepcopy__(self, memo): # <<<<<<<<<<<<<<
jpayne@69 19705 * return FastxRecord(self.name, self.comment, self.sequence, self.quality)
jpayne@69 19706 *
jpayne@69 19707 */
jpayne@69 19708 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_9libcfaidx_11FastxRecord_5__deepcopy__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_FastxRecord___deepcopy, NULL, __pyx_n_s_pysam_libcfaidx, __pyx_d, ((PyObject *)__pyx_codeobj__24)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 438, __pyx_L1_error)
jpayne@69 19709 __Pyx_GOTREF(__pyx_t_2);
jpayne@69 19710 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_9libcfaidx_FastxRecord, __pyx_n_s_deepcopy, __pyx_t_2) < 0) __PYX_ERR(0, 438, __pyx_L1_error)
jpayne@69 19711 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@69 19712 PyType_Modified(__pyx_ptype_5pysam_9libcfaidx_FastxRecord);
jpayne@69 19713
jpayne@69 19714 /* "pysam/libcfaidx.pyx":463
jpayne@69 19715 * return self.to_string()
jpayne@69 19716 *
jpayne@69 19717 * def set_name(self, name): # <<<<<<<<<<<<<<
jpayne@69 19718 * if name is None:
jpayne@69 19719 * raise ValueError("FastxRecord must have a name and not None")
jpayne@69 19720 */
jpayne@69 19721 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_9libcfaidx_11FastxRecord_7set_name, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_FastxRecord_set_name, NULL, __pyx_n_s_pysam_libcfaidx, __pyx_d, ((PyObject *)__pyx_codeobj__27)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 463, __pyx_L1_error)
jpayne@69 19722 __Pyx_GOTREF(__pyx_t_2);
jpayne@69 19723 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_9libcfaidx_FastxRecord, __pyx_n_s_set_name, __pyx_t_2) < 0) __PYX_ERR(0, 463, __pyx_L1_error)
jpayne@69 19724 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@69 19725 PyType_Modified(__pyx_ptype_5pysam_9libcfaidx_FastxRecord);
jpayne@69 19726
jpayne@69 19727 /* "pysam/libcfaidx.pyx":468
jpayne@69 19728 * self.name = name
jpayne@69 19729 *
jpayne@69 19730 * def set_comment(self, comment): # <<<<<<<<<<<<<<
jpayne@69 19731 * self.comment = comment
jpayne@69 19732 *
jpayne@69 19733 */
jpayne@69 19734 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_9libcfaidx_11FastxRecord_9set_comment, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_FastxRecord_set_comment, NULL, __pyx_n_s_pysam_libcfaidx, __pyx_d, ((PyObject *)__pyx_codeobj__29)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 468, __pyx_L1_error)
jpayne@69 19735 __Pyx_GOTREF(__pyx_t_2);
jpayne@69 19736 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_9libcfaidx_FastxRecord, __pyx_n_s_set_comment, __pyx_t_2) < 0) __PYX_ERR(0, 468, __pyx_L1_error)
jpayne@69 19737 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@69 19738 PyType_Modified(__pyx_ptype_5pysam_9libcfaidx_FastxRecord);
jpayne@69 19739
jpayne@69 19740 /* "pysam/libcfaidx.pyx":471
jpayne@69 19741 * self.comment = comment
jpayne@69 19742 *
jpayne@69 19743 * def set_sequence(self, sequence, quality=None): # <<<<<<<<<<<<<<
jpayne@69 19744 * """set sequence of this record.
jpayne@69 19745 *
jpayne@69 19746 */
jpayne@69 19747 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_9libcfaidx_11FastxRecord_11set_sequence, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_FastxRecord_set_sequence, NULL, __pyx_n_s_pysam_libcfaidx, __pyx_d, ((PyObject *)__pyx_codeobj__30)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 471, __pyx_L1_error)
jpayne@69 19748 __Pyx_GOTREF(__pyx_t_2);
jpayne@69 19749 __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_tuple__63);
jpayne@69 19750 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_9libcfaidx_FastxRecord, __pyx_n_s_set_sequence, __pyx_t_2) < 0) __PYX_ERR(0, 471, __pyx_L1_error)
jpayne@69 19751 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@69 19752 PyType_Modified(__pyx_ptype_5pysam_9libcfaidx_FastxRecord);
jpayne@69 19753
jpayne@69 19754 /* "pysam/libcfaidx.pyx":488
jpayne@69 19755 * return self.to_string()
jpayne@69 19756 *
jpayne@69 19757 * cpdef array.array get_quality_array(self, int offset=33): # <<<<<<<<<<<<<<
jpayne@69 19758 * '''return quality values as array after subtracting offset.'''
jpayne@69 19759 * if self.quality is None:
jpayne@69 19760 */
jpayne@69 19761 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_9libcfaidx_11FastxRecord_15get_quality_array, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_FastxRecord_get_quality_array, NULL, __pyx_n_s_pysam_libcfaidx, __pyx_d, ((PyObject *)__pyx_codeobj__31)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 488, __pyx_L1_error)
jpayne@69 19762 __Pyx_GOTREF(__pyx_t_2);
jpayne@69 19763 __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_tuple__58);
jpayne@69 19764 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_9libcfaidx_FastxRecord, __pyx_n_s_get_quality_array, __pyx_t_2) < 0) __PYX_ERR(0, 488, __pyx_L1_error)
jpayne@69 19765 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@69 19766 PyType_Modified(__pyx_ptype_5pysam_9libcfaidx_FastxRecord);
jpayne@69 19767
jpayne@69 19768 /* "(tree fragment)":1
jpayne@69 19769 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
jpayne@69 19770 * cdef tuple state
jpayne@69 19771 * cdef object _dict
jpayne@69 19772 */
jpayne@69 19773 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_9libcfaidx_11FastxRecord_17__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_FastxRecord___reduce_cython, NULL, __pyx_n_s_pysam_libcfaidx, __pyx_d, ((PyObject *)__pyx_codeobj__32)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error)
jpayne@69 19774 __Pyx_GOTREF(__pyx_t_2);
jpayne@69 19775 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_9libcfaidx_FastxRecord, __pyx_n_s_reduce_cython, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
jpayne@69 19776 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@69 19777 PyType_Modified(__pyx_ptype_5pysam_9libcfaidx_FastxRecord);
jpayne@69 19778
jpayne@69 19779 /* "(tree fragment)":16
jpayne@69 19780 * else:
jpayne@69 19781 * return __pyx_unpickle_FastxRecord, (type(self), 0x1bdb611, state)
jpayne@69 19782 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
jpayne@69 19783 * __pyx_unpickle_FastxRecord__set_state(self, __pyx_state)
jpayne@69 19784 */
jpayne@69 19785 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_9libcfaidx_11FastxRecord_19__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_FastxRecord___setstate_cython, NULL, __pyx_n_s_pysam_libcfaidx, __pyx_d, ((PyObject *)__pyx_codeobj__33)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 16, __pyx_L1_error)
jpayne@69 19786 __Pyx_GOTREF(__pyx_t_2);
jpayne@69 19787 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_9libcfaidx_FastxRecord, __pyx_n_s_setstate_cython, __pyx_t_2) < 0) __PYX_ERR(1, 16, __pyx_L1_error)
jpayne@69 19788 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@69 19789 PyType_Modified(__pyx_ptype_5pysam_9libcfaidx_FastxRecord);
jpayne@69 19790
jpayne@69 19791 /* "pysam/libcfaidx.pyx":551
jpayne@69 19792 * self._open(*args, **kwargs)
jpayne@69 19793 *
jpayne@69 19794 * def is_open(self): # <<<<<<<<<<<<<<
jpayne@69 19795 * '''return true if samfile has been opened.'''
jpayne@69 19796 * return self.entry != NULL
jpayne@69 19797 */
jpayne@69 19798 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_9libcfaidx_9FastxFile_3is_open, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_FastxFile_is_open, NULL, __pyx_n_s_pysam_libcfaidx, __pyx_d, ((PyObject *)__pyx_codeobj__34)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 551, __pyx_L1_error)
jpayne@69 19799 __Pyx_GOTREF(__pyx_t_2);
jpayne@69 19800 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_9libcfaidx_FastxFile, __pyx_n_s_is_open, __pyx_t_2) < 0) __PYX_ERR(0, 551, __pyx_L1_error)
jpayne@69 19801 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@69 19802 PyType_Modified(__pyx_ptype_5pysam_9libcfaidx_FastxFile);
jpayne@69 19803
jpayne@69 19804 /* "pysam/libcfaidx.pyx":555
jpayne@69 19805 * return self.entry != NULL
jpayne@69 19806 *
jpayne@69 19807 * def _open(self, filename, persist=True): # <<<<<<<<<<<<<<
jpayne@69 19808 * '''open a fastq/fasta file in *filename*
jpayne@69 19809 *
jpayne@69 19810 */
jpayne@69 19811 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_9libcfaidx_9FastxFile_5_open, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_FastxFile__open, NULL, __pyx_n_s_pysam_libcfaidx, __pyx_d, ((PyObject *)__pyx_codeobj__35)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 555, __pyx_L1_error)
jpayne@69 19812 __Pyx_GOTREF(__pyx_t_2);
jpayne@69 19813 __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_tuple__66);
jpayne@69 19814 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_9libcfaidx_FastxFile, __pyx_n_s_open, __pyx_t_2) < 0) __PYX_ERR(0, 555, __pyx_L1_error)
jpayne@69 19815 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@69 19816 PyType_Modified(__pyx_ptype_5pysam_9libcfaidx_FastxFile);
jpayne@69 19817
jpayne@69 19818 /* "pysam/libcfaidx.pyx":588
jpayne@69 19819 * self._filename = filename
jpayne@69 19820 *
jpayne@69 19821 * def close(self): # <<<<<<<<<<<<<<
jpayne@69 19822 * '''close the file.'''
jpayne@69 19823 * if self.fastqfile != NULL:
jpayne@69 19824 */
jpayne@69 19825 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_9libcfaidx_9FastxFile_7close, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_FastxFile_close, NULL, __pyx_n_s_pysam_libcfaidx, __pyx_d, ((PyObject *)__pyx_codeobj__36)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 588, __pyx_L1_error)
jpayne@69 19826 __Pyx_GOTREF(__pyx_t_2);
jpayne@69 19827 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_9libcfaidx_FastxFile, __pyx_n_s_close, __pyx_t_2) < 0) __PYX_ERR(0, 588, __pyx_L1_error)
jpayne@69 19828 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@69 19829 PyType_Modified(__pyx_ptype_5pysam_9libcfaidx_FastxFile);
jpayne@69 19830
jpayne@69 19831 /* "pysam/libcfaidx.pyx":604
jpayne@69 19832 *
jpayne@69 19833 * # context manager interface
jpayne@69 19834 * def __enter__(self): # <<<<<<<<<<<<<<
jpayne@69 19835 * return self
jpayne@69 19836 *
jpayne@69 19837 */
jpayne@69 19838 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_9libcfaidx_9FastxFile_11__enter__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_FastxFile___enter, NULL, __pyx_n_s_pysam_libcfaidx, __pyx_d, ((PyObject *)__pyx_codeobj__37)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 604, __pyx_L1_error)
jpayne@69 19839 __Pyx_GOTREF(__pyx_t_2);
jpayne@69 19840 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_9libcfaidx_FastxFile, __pyx_n_s_enter, __pyx_t_2) < 0) __PYX_ERR(0, 604, __pyx_L1_error)
jpayne@69 19841 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@69 19842 PyType_Modified(__pyx_ptype_5pysam_9libcfaidx_FastxFile);
jpayne@69 19843
jpayne@69 19844 /* "pysam/libcfaidx.pyx":607
jpayne@69 19845 * return self
jpayne@69 19846 *
jpayne@69 19847 * def __exit__(self, exc_type, exc_value, traceback): # <<<<<<<<<<<<<<
jpayne@69 19848 * self.close()
jpayne@69 19849 * return False
jpayne@69 19850 */
jpayne@69 19851 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_9libcfaidx_9FastxFile_13__exit__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_FastxFile___exit, NULL, __pyx_n_s_pysam_libcfaidx, __pyx_d, ((PyObject *)__pyx_codeobj__38)); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 607, __pyx_L1_error)
jpayne@69 19852 __Pyx_GOTREF(__pyx_t_2);
jpayne@69 19853 if (__Pyx_SetItemOnTypeDict((PyObject *)__pyx_ptype_5pysam_9libcfaidx_FastxFile, __pyx_n_s_exit, __pyx_t_2) < 0) __PYX_ERR(0, 607, __pyx_L1_error)
jpayne@69 19854 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@69 19855 PyType_Modified(__pyx_ptype_5pysam_9libcfaidx_FastxFile);
jpayne@69 19856
jpayne@69 19857 /* "(tree fragment)":1
jpayne@69 19858 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
jpayne@69 19859 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
jpayne@69 19860 * def __setstate_cython__(self, __pyx_state):
jpayne@69 19861 */
jpayne@69 19862 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_9libcfaidx_9FastxFile_19__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_FastxFile___reduce_cython, NULL, __pyx_n_s_pysam_libcfaidx, __pyx_d, ((PyObject *)__pyx_codeobj__39)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error)
jpayne@69 19863 __Pyx_GOTREF(__pyx_t_2);
jpayne@69 19864 if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
jpayne@69 19865 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@69 19866
jpayne@69 19867 /* "(tree fragment)":3
jpayne@69 19868 * def __reduce_cython__(self):
jpayne@69 19869 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
jpayne@69 19870 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
jpayne@69 19871 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
jpayne@69 19872 */
jpayne@69 19873 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_9libcfaidx_9FastxFile_21__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_FastxFile___setstate_cython, NULL, __pyx_n_s_pysam_libcfaidx, __pyx_d, ((PyObject *)__pyx_codeobj__40)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3, __pyx_L1_error)
jpayne@69 19874 __Pyx_GOTREF(__pyx_t_2);
jpayne@69 19875 if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_2) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
jpayne@69 19876 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@69 19877
jpayne@69 19878 /* "(tree fragment)":1
jpayne@69 19879 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
jpayne@69 19880 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
jpayne@69 19881 * def __setstate_cython__(self, __pyx_state):
jpayne@69 19882 */
jpayne@69 19883 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_9libcfaidx_9FastqFile_1__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_FastqFile___reduce_cython, NULL, __pyx_n_s_pysam_libcfaidx, __pyx_d, ((PyObject *)__pyx_codeobj__41)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error)
jpayne@69 19884 __Pyx_GOTREF(__pyx_t_2);
jpayne@69 19885 if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
jpayne@69 19886 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@69 19887
jpayne@69 19888 /* "(tree fragment)":3
jpayne@69 19889 * def __reduce_cython__(self):
jpayne@69 19890 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
jpayne@69 19891 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
jpayne@69 19892 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
jpayne@69 19893 */
jpayne@69 19894 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_9libcfaidx_9FastqFile_3__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_FastqFile___setstate_cython, NULL, __pyx_n_s_pysam_libcfaidx, __pyx_d, ((PyObject *)__pyx_codeobj__42)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3, __pyx_L1_error)
jpayne@69 19895 __Pyx_GOTREF(__pyx_t_2);
jpayne@69 19896 if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_2) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
jpayne@69 19897 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@69 19898
jpayne@69 19899 /* "(tree fragment)":1
jpayne@69 19900 * def __reduce_cython__(self): # <<<<<<<<<<<<<<
jpayne@69 19901 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
jpayne@69 19902 * def __setstate_cython__(self, __pyx_state):
jpayne@69 19903 */
jpayne@69 19904 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_9libcfaidx_9Fastafile_1__reduce_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Fastafile___reduce_cython, NULL, __pyx_n_s_pysam_libcfaidx, __pyx_d, ((PyObject *)__pyx_codeobj__43)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error)
jpayne@69 19905 __Pyx_GOTREF(__pyx_t_2);
jpayne@69 19906 if (PyDict_SetItem(__pyx_d, __pyx_n_s_reduce_cython, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
jpayne@69 19907 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@69 19908
jpayne@69 19909 /* "(tree fragment)":3
jpayne@69 19910 * def __reduce_cython__(self):
jpayne@69 19911 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
jpayne@69 19912 * def __setstate_cython__(self, __pyx_state): # <<<<<<<<<<<<<<
jpayne@69 19913 * raise TypeError, "no default __reduce__ due to non-trivial __cinit__"
jpayne@69 19914 */
jpayne@69 19915 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_9libcfaidx_9Fastafile_3__setstate_cython__, __Pyx_CYFUNCTION_CCLASS, __pyx_n_s_Fastafile___setstate_cython, NULL, __pyx_n_s_pysam_libcfaidx, __pyx_d, ((PyObject *)__pyx_codeobj__44)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 3, __pyx_L1_error)
jpayne@69 19916 __Pyx_GOTREF(__pyx_t_2);
jpayne@69 19917 if (PyDict_SetItem(__pyx_d, __pyx_n_s_setstate_cython, __pyx_t_2) < 0) __PYX_ERR(1, 3, __pyx_L1_error)
jpayne@69 19918 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@69 19919
jpayne@69 19920 /* "pysam/libcfaidx.pyx":667
jpayne@69 19921 * pass
jpayne@69 19922 *
jpayne@69 19923 * __all__ = ["FastaFile", # <<<<<<<<<<<<<<
jpayne@69 19924 * "FastqFile",
jpayne@69 19925 * "FastxFile",
jpayne@69 19926 */
jpayne@69 19927 __pyx_t_2 = PyList_New(6); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 667, __pyx_L1_error)
jpayne@69 19928 __Pyx_GOTREF(__pyx_t_2);
jpayne@69 19929 __Pyx_INCREF(__pyx_n_u_FastaFile);
jpayne@69 19930 __Pyx_GIVEREF(__pyx_n_u_FastaFile);
jpayne@69 19931 if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_u_FastaFile)) __PYX_ERR(0, 667, __pyx_L1_error);
jpayne@69 19932 __Pyx_INCREF(__pyx_n_u_FastqFile);
jpayne@69 19933 __Pyx_GIVEREF(__pyx_n_u_FastqFile);
jpayne@69 19934 if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 1, __pyx_n_u_FastqFile)) __PYX_ERR(0, 667, __pyx_L1_error);
jpayne@69 19935 __Pyx_INCREF(__pyx_n_u_FastxFile);
jpayne@69 19936 __Pyx_GIVEREF(__pyx_n_u_FastxFile);
jpayne@69 19937 if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 2, __pyx_n_u_FastxFile)) __PYX_ERR(0, 667, __pyx_L1_error);
jpayne@69 19938 __Pyx_INCREF(__pyx_n_u_Fastafile);
jpayne@69 19939 __Pyx_GIVEREF(__pyx_n_u_Fastafile);
jpayne@69 19940 if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 3, __pyx_n_u_Fastafile)) __PYX_ERR(0, 667, __pyx_L1_error);
jpayne@69 19941 __Pyx_INCREF(__pyx_n_u_FastxRecord);
jpayne@69 19942 __Pyx_GIVEREF(__pyx_n_u_FastxRecord);
jpayne@69 19943 if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 4, __pyx_n_u_FastxRecord)) __PYX_ERR(0, 667, __pyx_L1_error);
jpayne@69 19944 __Pyx_INCREF(__pyx_n_u_FastqProxy);
jpayne@69 19945 __Pyx_GIVEREF(__pyx_n_u_FastqProxy);
jpayne@69 19946 if (__Pyx_PyList_SET_ITEM(__pyx_t_2, 5, __pyx_n_u_FastqProxy)) __PYX_ERR(0, 667, __pyx_L1_error);
jpayne@69 19947 if (PyDict_SetItem(__pyx_d, __pyx_n_s_all, __pyx_t_2) < 0) __PYX_ERR(0, 667, __pyx_L1_error)
jpayne@69 19948 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@69 19949
jpayne@69 19950 /* "(tree fragment)":1
jpayne@69 19951 * def __pyx_unpickle_FastxRecord(__pyx_type, long __pyx_checksum, __pyx_state): # <<<<<<<<<<<<<<
jpayne@69 19952 * cdef object __pyx_PickleError
jpayne@69 19953 * cdef object __pyx_result
jpayne@69 19954 */
jpayne@69 19955 __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_5pysam_9libcfaidx_1__pyx_unpickle_FastxRecord, 0, __pyx_n_s_pyx_unpickle_FastxRecord, NULL, __pyx_n_s_pysam_libcfaidx, __pyx_d, ((PyObject *)__pyx_codeobj__45)); if (unlikely(!__pyx_t_2)) __PYX_ERR(1, 1, __pyx_L1_error)
jpayne@69 19956 __Pyx_GOTREF(__pyx_t_2);
jpayne@69 19957 if (PyDict_SetItem(__pyx_d, __pyx_n_s_pyx_unpickle_FastxRecord, __pyx_t_2) < 0) __PYX_ERR(1, 1, __pyx_L1_error)
jpayne@69 19958 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@69 19959
jpayne@69 19960 /* "pysam/libcfaidx.pyx":1
jpayne@69 19961 * # cython: embedsignature=True # <<<<<<<<<<<<<<
jpayne@69 19962 * # cython: profile=True
jpayne@69 19963 * ###############################################################################
jpayne@69 19964 */
jpayne@69 19965 __pyx_t_2 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1, __pyx_L1_error)
jpayne@69 19966 __Pyx_GOTREF(__pyx_t_2);
jpayne@69 19967 if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_2) < 0) __PYX_ERR(0, 1, __pyx_L1_error)
jpayne@69 19968 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
jpayne@69 19969 __Pyx_TraceReturn(Py_None, 0);
jpayne@69 19970
jpayne@69 19971 /*--- Wrapped vars code ---*/
jpayne@69 19972
jpayne@69 19973 goto __pyx_L0;
jpayne@69 19974 __pyx_L1_error:;
jpayne@69 19975 __Pyx_XDECREF(__pyx_t_2);
jpayne@69 19976 if (__pyx_m) {
jpayne@69 19977 if (__pyx_d && stringtab_initialized) {
jpayne@69 19978 __Pyx_AddTraceback("init pysam.libcfaidx", __pyx_clineno, __pyx_lineno, __pyx_filename);
jpayne@69 19979 }
jpayne@69 19980 #if !CYTHON_USE_MODULE_STATE
jpayne@69 19981 Py_CLEAR(__pyx_m);
jpayne@69 19982 #else
jpayne@69 19983 Py_DECREF(__pyx_m);
jpayne@69 19984 if (pystate_addmodule_run) {
jpayne@69 19985 PyObject *tp, *value, *tb;
jpayne@69 19986 PyErr_Fetch(&tp, &value, &tb);
jpayne@69 19987 PyState_RemoveModule(&__pyx_moduledef);
jpayne@69 19988 PyErr_Restore(tp, value, tb);
jpayne@69 19989 }
jpayne@69 19990 #endif
jpayne@69 19991 } else if (!PyErr_Occurred()) {
jpayne@69 19992 PyErr_SetString(PyExc_ImportError, "init pysam.libcfaidx");
jpayne@69 19993 }
jpayne@69 19994 __pyx_L0:;
jpayne@69 19995 __Pyx_RefNannyFinishContext();
jpayne@69 19996 #if CYTHON_PEP489_MULTI_PHASE_INIT
jpayne@69 19997 return (__pyx_m != NULL) ? 0 : -1;
jpayne@69 19998 #elif PY_MAJOR_VERSION >= 3
jpayne@69 19999 return __pyx_m;
jpayne@69 20000 #else
jpayne@69 20001 return;
jpayne@69 20002 #endif
jpayne@69 20003 }
jpayne@69 20004 /* #### Code section: cleanup_globals ### */
jpayne@69 20005 /* #### Code section: cleanup_module ### */
jpayne@69 20006 /* #### Code section: main_method ### */
jpayne@69 20007 /* #### Code section: utility_code_pragmas ### */
jpayne@69 20008 #ifdef _MSC_VER
jpayne@69 20009 #pragma warning( push )
jpayne@69 20010 /* Warning 4127: conditional expression is constant
jpayne@69 20011 * Cython uses constant conditional expressions to allow in inline functions to be optimized at
jpayne@69 20012 * compile-time, so this warning is not useful
jpayne@69 20013 */
jpayne@69 20014 #pragma warning( disable : 4127 )
jpayne@69 20015 #endif
jpayne@69 20016
jpayne@69 20017
jpayne@69 20018
jpayne@69 20019 /* #### Code section: utility_code_def ### */
jpayne@69 20020
jpayne@69 20021 /* --- Runtime support code --- */
jpayne@69 20022 /* Refnanny */
jpayne@69 20023 #if CYTHON_REFNANNY
jpayne@69 20024 static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) {
jpayne@69 20025 PyObject *m = NULL, *p = NULL;
jpayne@69 20026 void *r = NULL;
jpayne@69 20027 m = PyImport_ImportModule(modname);
jpayne@69 20028 if (!m) goto end;
jpayne@69 20029 p = PyObject_GetAttrString(m, "RefNannyAPI");
jpayne@69 20030 if (!p) goto end;
jpayne@69 20031 r = PyLong_AsVoidPtr(p);
jpayne@69 20032 end:
jpayne@69 20033 Py_XDECREF(p);
jpayne@69 20034 Py_XDECREF(m);
jpayne@69 20035 return (__Pyx_RefNannyAPIStruct *)r;
jpayne@69 20036 }
jpayne@69 20037 #endif
jpayne@69 20038
jpayne@69 20039 /* PyErrExceptionMatches */
jpayne@69 20040 #if CYTHON_FAST_THREAD_STATE
jpayne@69 20041 static int __Pyx_PyErr_ExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
jpayne@69 20042 Py_ssize_t i, n;
jpayne@69 20043 n = PyTuple_GET_SIZE(tuple);
jpayne@69 20044 #if PY_MAJOR_VERSION >= 3
jpayne@69 20045 for (i=0; i<n; i++) {
jpayne@69 20046 if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
jpayne@69 20047 }
jpayne@69 20048 #endif
jpayne@69 20049 for (i=0; i<n; i++) {
jpayne@69 20050 if (__Pyx_PyErr_GivenExceptionMatches(exc_type, PyTuple_GET_ITEM(tuple, i))) return 1;
jpayne@69 20051 }
jpayne@69 20052 return 0;
jpayne@69 20053 }
jpayne@69 20054 static CYTHON_INLINE int __Pyx_PyErr_ExceptionMatchesInState(PyThreadState* tstate, PyObject* err) {
jpayne@69 20055 int result;
jpayne@69 20056 PyObject *exc_type;
jpayne@69 20057 #if PY_VERSION_HEX >= 0x030C00A6
jpayne@69 20058 PyObject *current_exception = tstate->current_exception;
jpayne@69 20059 if (unlikely(!current_exception)) return 0;
jpayne@69 20060 exc_type = (PyObject*) Py_TYPE(current_exception);
jpayne@69 20061 if (exc_type == err) return 1;
jpayne@69 20062 #else
jpayne@69 20063 exc_type = tstate->curexc_type;
jpayne@69 20064 if (exc_type == err) return 1;
jpayne@69 20065 if (unlikely(!exc_type)) return 0;
jpayne@69 20066 #endif
jpayne@69 20067 #if CYTHON_AVOID_BORROWED_REFS
jpayne@69 20068 Py_INCREF(exc_type);
jpayne@69 20069 #endif
jpayne@69 20070 if (unlikely(PyTuple_Check(err))) {
jpayne@69 20071 result = __Pyx_PyErr_ExceptionMatchesTuple(exc_type, err);
jpayne@69 20072 } else {
jpayne@69 20073 result = __Pyx_PyErr_GivenExceptionMatches(exc_type, err);
jpayne@69 20074 }
jpayne@69 20075 #if CYTHON_AVOID_BORROWED_REFS
jpayne@69 20076 Py_DECREF(exc_type);
jpayne@69 20077 #endif
jpayne@69 20078 return result;
jpayne@69 20079 }
jpayne@69 20080 #endif
jpayne@69 20081
jpayne@69 20082 /* PyErrFetchRestore */
jpayne@69 20083 #if CYTHON_FAST_THREAD_STATE
jpayne@69 20084 static CYTHON_INLINE void __Pyx_ErrRestoreInState(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
jpayne@69 20085 #if PY_VERSION_HEX >= 0x030C00A6
jpayne@69 20086 PyObject *tmp_value;
jpayne@69 20087 assert(type == NULL || (value != NULL && type == (PyObject*) Py_TYPE(value)));
jpayne@69 20088 if (value) {
jpayne@69 20089 #if CYTHON_COMPILING_IN_CPYTHON
jpayne@69 20090 if (unlikely(((PyBaseExceptionObject*) value)->traceback != tb))
jpayne@69 20091 #endif
jpayne@69 20092 PyException_SetTraceback(value, tb);
jpayne@69 20093 }
jpayne@69 20094 tmp_value = tstate->current_exception;
jpayne@69 20095 tstate->current_exception = value;
jpayne@69 20096 Py_XDECREF(tmp_value);
jpayne@69 20097 Py_XDECREF(type);
jpayne@69 20098 Py_XDECREF(tb);
jpayne@69 20099 #else
jpayne@69 20100 PyObject *tmp_type, *tmp_value, *tmp_tb;
jpayne@69 20101 tmp_type = tstate->curexc_type;
jpayne@69 20102 tmp_value = tstate->curexc_value;
jpayne@69 20103 tmp_tb = tstate->curexc_traceback;
jpayne@69 20104 tstate->curexc_type = type;
jpayne@69 20105 tstate->curexc_value = value;
jpayne@69 20106 tstate->curexc_traceback = tb;
jpayne@69 20107 Py_XDECREF(tmp_type);
jpayne@69 20108 Py_XDECREF(tmp_value);
jpayne@69 20109 Py_XDECREF(tmp_tb);
jpayne@69 20110 #endif
jpayne@69 20111 }
jpayne@69 20112 static CYTHON_INLINE void __Pyx_ErrFetchInState(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
jpayne@69 20113 #if PY_VERSION_HEX >= 0x030C00A6
jpayne@69 20114 PyObject* exc_value;
jpayne@69 20115 exc_value = tstate->current_exception;
jpayne@69 20116 tstate->current_exception = 0;
jpayne@69 20117 *value = exc_value;
jpayne@69 20118 *type = NULL;
jpayne@69 20119 *tb = NULL;
jpayne@69 20120 if (exc_value) {
jpayne@69 20121 *type = (PyObject*) Py_TYPE(exc_value);
jpayne@69 20122 Py_INCREF(*type);
jpayne@69 20123 #if CYTHON_COMPILING_IN_CPYTHON
jpayne@69 20124 *tb = ((PyBaseExceptionObject*) exc_value)->traceback;
jpayne@69 20125 Py_XINCREF(*tb);
jpayne@69 20126 #else
jpayne@69 20127 *tb = PyException_GetTraceback(exc_value);
jpayne@69 20128 #endif
jpayne@69 20129 }
jpayne@69 20130 #else
jpayne@69 20131 *type = tstate->curexc_type;
jpayne@69 20132 *value = tstate->curexc_value;
jpayne@69 20133 *tb = tstate->curexc_traceback;
jpayne@69 20134 tstate->curexc_type = 0;
jpayne@69 20135 tstate->curexc_value = 0;
jpayne@69 20136 tstate->curexc_traceback = 0;
jpayne@69 20137 #endif
jpayne@69 20138 }
jpayne@69 20139 #endif
jpayne@69 20140
jpayne@69 20141 /* PyObjectGetAttrStr */
jpayne@69 20142 #if CYTHON_USE_TYPE_SLOTS
jpayne@69 20143 static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) {
jpayne@69 20144 PyTypeObject* tp = Py_TYPE(obj);
jpayne@69 20145 if (likely(tp->tp_getattro))
jpayne@69 20146 return tp->tp_getattro(obj, attr_name);
jpayne@69 20147 #if PY_MAJOR_VERSION < 3
jpayne@69 20148 if (likely(tp->tp_getattr))
jpayne@69 20149 return tp->tp_getattr(obj, PyString_AS_STRING(attr_name));
jpayne@69 20150 #endif
jpayne@69 20151 return PyObject_GetAttr(obj, attr_name);
jpayne@69 20152 }
jpayne@69 20153 #endif
jpayne@69 20154
jpayne@69 20155 /* PyObjectGetAttrStrNoError */
jpayne@69 20156 #if __PYX_LIMITED_VERSION_HEX < 0x030d00A1
jpayne@69 20157 static void __Pyx_PyObject_GetAttrStr_ClearAttributeError(void) {
jpayne@69 20158 __Pyx_PyThreadState_declare
jpayne@69 20159 __Pyx_PyThreadState_assign
jpayne@69 20160 if (likely(__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError)))
jpayne@69 20161 __Pyx_PyErr_Clear();
jpayne@69 20162 }
jpayne@69 20163 #endif
jpayne@69 20164 static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStrNoError(PyObject* obj, PyObject* attr_name) {
jpayne@69 20165 PyObject *result;
jpayne@69 20166 #if __PYX_LIMITED_VERSION_HEX >= 0x030d00A1
jpayne@69 20167 (void) PyObject_GetOptionalAttr(obj, attr_name, &result);
jpayne@69 20168 return result;
jpayne@69 20169 #else
jpayne@69 20170 #if CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_TYPE_SLOTS && PY_VERSION_HEX >= 0x030700B1
jpayne@69 20171 PyTypeObject* tp = Py_TYPE(obj);
jpayne@69 20172 if (likely(tp->tp_getattro == PyObject_GenericGetAttr)) {
jpayne@69 20173 return _PyObject_GenericGetAttrWithDict(obj, attr_name, NULL, 1);
jpayne@69 20174 }
jpayne@69 20175 #endif
jpayne@69 20176 result = __Pyx_PyObject_GetAttrStr(obj, attr_name);
jpayne@69 20177 if (unlikely(!result)) {
jpayne@69 20178 __Pyx_PyObject_GetAttrStr_ClearAttributeError();
jpayne@69 20179 }
jpayne@69 20180 return result;
jpayne@69 20181 #endif
jpayne@69 20182 }
jpayne@69 20183
jpayne@69 20184 /* GetBuiltinName */
jpayne@69 20185 static PyObject *__Pyx_GetBuiltinName(PyObject *name) {
jpayne@69 20186 PyObject* result = __Pyx_PyObject_GetAttrStrNoError(__pyx_b, name);
jpayne@69 20187 if (unlikely(!result) && !PyErr_Occurred()) {
jpayne@69 20188 PyErr_Format(PyExc_NameError,
jpayne@69 20189 #if PY_MAJOR_VERSION >= 3
jpayne@69 20190 "name '%U' is not defined", name);
jpayne@69 20191 #else
jpayne@69 20192 "name '%.200s' is not defined", PyString_AS_STRING(name));
jpayne@69 20193 #endif
jpayne@69 20194 }
jpayne@69 20195 return result;
jpayne@69 20196 }
jpayne@69 20197
jpayne@69 20198 /* TupleAndListFromArray */
jpayne@69 20199 #if CYTHON_COMPILING_IN_CPYTHON
jpayne@69 20200 static CYTHON_INLINE void __Pyx_copy_object_array(PyObject *const *CYTHON_RESTRICT src, PyObject** CYTHON_RESTRICT dest, Py_ssize_t length) {
jpayne@69 20201 PyObject *v;
jpayne@69 20202 Py_ssize_t i;
jpayne@69 20203 for (i = 0; i < length; i++) {
jpayne@69 20204 v = dest[i] = src[i];
jpayne@69 20205 Py_INCREF(v);
jpayne@69 20206 }
jpayne@69 20207 }
jpayne@69 20208 static CYTHON_INLINE PyObject *
jpayne@69 20209 __Pyx_PyTuple_FromArray(PyObject *const *src, Py_ssize_t n)
jpayne@69 20210 {
jpayne@69 20211 PyObject *res;
jpayne@69 20212 if (n <= 0) {
jpayne@69 20213 Py_INCREF(__pyx_empty_tuple);
jpayne@69 20214 return __pyx_empty_tuple;
jpayne@69 20215 }
jpayne@69 20216 res = PyTuple_New(n);
jpayne@69 20217 if (unlikely(res == NULL)) return NULL;
jpayne@69 20218 __Pyx_copy_object_array(src, ((PyTupleObject*)res)->ob_item, n);
jpayne@69 20219 return res;
jpayne@69 20220 }
jpayne@69 20221 static CYTHON_INLINE PyObject *
jpayne@69 20222 __Pyx_PyList_FromArray(PyObject *const *src, Py_ssize_t n)
jpayne@69 20223 {
jpayne@69 20224 PyObject *res;
jpayne@69 20225 if (n <= 0) {
jpayne@69 20226 return PyList_New(0);
jpayne@69 20227 }
jpayne@69 20228 res = PyList_New(n);
jpayne@69 20229 if (unlikely(res == NULL)) return NULL;
jpayne@69 20230 __Pyx_copy_object_array(src, ((PyListObject*)res)->ob_item, n);
jpayne@69 20231 return res;
jpayne@69 20232 }
jpayne@69 20233 #endif
jpayne@69 20234
jpayne@69 20235 /* BytesEquals */
jpayne@69 20236 static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals) {
jpayne@69 20237 #if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 20238 return PyObject_RichCompareBool(s1, s2, equals);
jpayne@69 20239 #else
jpayne@69 20240 if (s1 == s2) {
jpayne@69 20241 return (equals == Py_EQ);
jpayne@69 20242 } else if (PyBytes_CheckExact(s1) & PyBytes_CheckExact(s2)) {
jpayne@69 20243 const char *ps1, *ps2;
jpayne@69 20244 Py_ssize_t length = PyBytes_GET_SIZE(s1);
jpayne@69 20245 if (length != PyBytes_GET_SIZE(s2))
jpayne@69 20246 return (equals == Py_NE);
jpayne@69 20247 ps1 = PyBytes_AS_STRING(s1);
jpayne@69 20248 ps2 = PyBytes_AS_STRING(s2);
jpayne@69 20249 if (ps1[0] != ps2[0]) {
jpayne@69 20250 return (equals == Py_NE);
jpayne@69 20251 } else if (length == 1) {
jpayne@69 20252 return (equals == Py_EQ);
jpayne@69 20253 } else {
jpayne@69 20254 int result;
jpayne@69 20255 #if CYTHON_USE_UNICODE_INTERNALS && (PY_VERSION_HEX < 0x030B0000)
jpayne@69 20256 Py_hash_t hash1, hash2;
jpayne@69 20257 hash1 = ((PyBytesObject*)s1)->ob_shash;
jpayne@69 20258 hash2 = ((PyBytesObject*)s2)->ob_shash;
jpayne@69 20259 if (hash1 != hash2 && hash1 != -1 && hash2 != -1) {
jpayne@69 20260 return (equals == Py_NE);
jpayne@69 20261 }
jpayne@69 20262 #endif
jpayne@69 20263 result = memcmp(ps1, ps2, (size_t)length);
jpayne@69 20264 return (equals == Py_EQ) ? (result == 0) : (result != 0);
jpayne@69 20265 }
jpayne@69 20266 } else if ((s1 == Py_None) & PyBytes_CheckExact(s2)) {
jpayne@69 20267 return (equals == Py_NE);
jpayne@69 20268 } else if ((s2 == Py_None) & PyBytes_CheckExact(s1)) {
jpayne@69 20269 return (equals == Py_NE);
jpayne@69 20270 } else {
jpayne@69 20271 int result;
jpayne@69 20272 PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
jpayne@69 20273 if (!py_result)
jpayne@69 20274 return -1;
jpayne@69 20275 result = __Pyx_PyObject_IsTrue(py_result);
jpayne@69 20276 Py_DECREF(py_result);
jpayne@69 20277 return result;
jpayne@69 20278 }
jpayne@69 20279 #endif
jpayne@69 20280 }
jpayne@69 20281
jpayne@69 20282 /* UnicodeEquals */
jpayne@69 20283 static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals) {
jpayne@69 20284 #if CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 20285 return PyObject_RichCompareBool(s1, s2, equals);
jpayne@69 20286 #else
jpayne@69 20287 #if PY_MAJOR_VERSION < 3
jpayne@69 20288 PyObject* owned_ref = NULL;
jpayne@69 20289 #endif
jpayne@69 20290 int s1_is_unicode, s2_is_unicode;
jpayne@69 20291 if (s1 == s2) {
jpayne@69 20292 goto return_eq;
jpayne@69 20293 }
jpayne@69 20294 s1_is_unicode = PyUnicode_CheckExact(s1);
jpayne@69 20295 s2_is_unicode = PyUnicode_CheckExact(s2);
jpayne@69 20296 #if PY_MAJOR_VERSION < 3
jpayne@69 20297 if ((s1_is_unicode & (!s2_is_unicode)) && PyString_CheckExact(s2)) {
jpayne@69 20298 owned_ref = PyUnicode_FromObject(s2);
jpayne@69 20299 if (unlikely(!owned_ref))
jpayne@69 20300 return -1;
jpayne@69 20301 s2 = owned_ref;
jpayne@69 20302 s2_is_unicode = 1;
jpayne@69 20303 } else if ((s2_is_unicode & (!s1_is_unicode)) && PyString_CheckExact(s1)) {
jpayne@69 20304 owned_ref = PyUnicode_FromObject(s1);
jpayne@69 20305 if (unlikely(!owned_ref))
jpayne@69 20306 return -1;
jpayne@69 20307 s1 = owned_ref;
jpayne@69 20308 s1_is_unicode = 1;
jpayne@69 20309 } else if (((!s2_is_unicode) & (!s1_is_unicode))) {
jpayne@69 20310 return __Pyx_PyBytes_Equals(s1, s2, equals);
jpayne@69 20311 }
jpayne@69 20312 #endif
jpayne@69 20313 if (s1_is_unicode & s2_is_unicode) {
jpayne@69 20314 Py_ssize_t length;
jpayne@69 20315 int kind;
jpayne@69 20316 void *data1, *data2;
jpayne@69 20317 if (unlikely(__Pyx_PyUnicode_READY(s1) < 0) || unlikely(__Pyx_PyUnicode_READY(s2) < 0))
jpayne@69 20318 return -1;
jpayne@69 20319 length = __Pyx_PyUnicode_GET_LENGTH(s1);
jpayne@69 20320 if (length != __Pyx_PyUnicode_GET_LENGTH(s2)) {
jpayne@69 20321 goto return_ne;
jpayne@69 20322 }
jpayne@69 20323 #if CYTHON_USE_UNICODE_INTERNALS
jpayne@69 20324 {
jpayne@69 20325 Py_hash_t hash1, hash2;
jpayne@69 20326 #if CYTHON_PEP393_ENABLED
jpayne@69 20327 hash1 = ((PyASCIIObject*)s1)->hash;
jpayne@69 20328 hash2 = ((PyASCIIObject*)s2)->hash;
jpayne@69 20329 #else
jpayne@69 20330 hash1 = ((PyUnicodeObject*)s1)->hash;
jpayne@69 20331 hash2 = ((PyUnicodeObject*)s2)->hash;
jpayne@69 20332 #endif
jpayne@69 20333 if (hash1 != hash2 && hash1 != -1 && hash2 != -1) {
jpayne@69 20334 goto return_ne;
jpayne@69 20335 }
jpayne@69 20336 }
jpayne@69 20337 #endif
jpayne@69 20338 kind = __Pyx_PyUnicode_KIND(s1);
jpayne@69 20339 if (kind != __Pyx_PyUnicode_KIND(s2)) {
jpayne@69 20340 goto return_ne;
jpayne@69 20341 }
jpayne@69 20342 data1 = __Pyx_PyUnicode_DATA(s1);
jpayne@69 20343 data2 = __Pyx_PyUnicode_DATA(s2);
jpayne@69 20344 if (__Pyx_PyUnicode_READ(kind, data1, 0) != __Pyx_PyUnicode_READ(kind, data2, 0)) {
jpayne@69 20345 goto return_ne;
jpayne@69 20346 } else if (length == 1) {
jpayne@69 20347 goto return_eq;
jpayne@69 20348 } else {
jpayne@69 20349 int result = memcmp(data1, data2, (size_t)(length * kind));
jpayne@69 20350 #if PY_MAJOR_VERSION < 3
jpayne@69 20351 Py_XDECREF(owned_ref);
jpayne@69 20352 #endif
jpayne@69 20353 return (equals == Py_EQ) ? (result == 0) : (result != 0);
jpayne@69 20354 }
jpayne@69 20355 } else if ((s1 == Py_None) & s2_is_unicode) {
jpayne@69 20356 goto return_ne;
jpayne@69 20357 } else if ((s2 == Py_None) & s1_is_unicode) {
jpayne@69 20358 goto return_ne;
jpayne@69 20359 } else {
jpayne@69 20360 int result;
jpayne@69 20361 PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
jpayne@69 20362 #if PY_MAJOR_VERSION < 3
jpayne@69 20363 Py_XDECREF(owned_ref);
jpayne@69 20364 #endif
jpayne@69 20365 if (!py_result)
jpayne@69 20366 return -1;
jpayne@69 20367 result = __Pyx_PyObject_IsTrue(py_result);
jpayne@69 20368 Py_DECREF(py_result);
jpayne@69 20369 return result;
jpayne@69 20370 }
jpayne@69 20371 return_eq:
jpayne@69 20372 #if PY_MAJOR_VERSION < 3
jpayne@69 20373 Py_XDECREF(owned_ref);
jpayne@69 20374 #endif
jpayne@69 20375 return (equals == Py_EQ);
jpayne@69 20376 return_ne:
jpayne@69 20377 #if PY_MAJOR_VERSION < 3
jpayne@69 20378 Py_XDECREF(owned_ref);
jpayne@69 20379 #endif
jpayne@69 20380 return (equals == Py_NE);
jpayne@69 20381 #endif
jpayne@69 20382 }
jpayne@69 20383
jpayne@69 20384 /* fastcall */
jpayne@69 20385 #if CYTHON_METH_FASTCALL
jpayne@69 20386 static CYTHON_INLINE PyObject * __Pyx_GetKwValue_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues, PyObject *s)
jpayne@69 20387 {
jpayne@69 20388 Py_ssize_t i, n = PyTuple_GET_SIZE(kwnames);
jpayne@69 20389 for (i = 0; i < n; i++)
jpayne@69 20390 {
jpayne@69 20391 if (s == PyTuple_GET_ITEM(kwnames, i)) return kwvalues[i];
jpayne@69 20392 }
jpayne@69 20393 for (i = 0; i < n; i++)
jpayne@69 20394 {
jpayne@69 20395 int eq = __Pyx_PyUnicode_Equals(s, PyTuple_GET_ITEM(kwnames, i), Py_EQ);
jpayne@69 20396 if (unlikely(eq != 0)) {
jpayne@69 20397 if (unlikely(eq < 0)) return NULL;
jpayne@69 20398 return kwvalues[i];
jpayne@69 20399 }
jpayne@69 20400 }
jpayne@69 20401 return NULL;
jpayne@69 20402 }
jpayne@69 20403 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030d0000
jpayne@69 20404 CYTHON_UNUSED static PyObject *__Pyx_KwargsAsDict_FASTCALL(PyObject *kwnames, PyObject *const *kwvalues) {
jpayne@69 20405 Py_ssize_t i, nkwargs = PyTuple_GET_SIZE(kwnames);
jpayne@69 20406 PyObject *dict;
jpayne@69 20407 dict = PyDict_New();
jpayne@69 20408 if (unlikely(!dict))
jpayne@69 20409 return NULL;
jpayne@69 20410 for (i=0; i<nkwargs; i++) {
jpayne@69 20411 PyObject *key = PyTuple_GET_ITEM(kwnames, i);
jpayne@69 20412 if (unlikely(PyDict_SetItem(dict, key, kwvalues[i]) < 0))
jpayne@69 20413 goto bad;
jpayne@69 20414 }
jpayne@69 20415 return dict;
jpayne@69 20416 bad:
jpayne@69 20417 Py_DECREF(dict);
jpayne@69 20418 return NULL;
jpayne@69 20419 }
jpayne@69 20420 #endif
jpayne@69 20421 #endif
jpayne@69 20422
jpayne@69 20423 /* Profile */
jpayne@69 20424 #if CYTHON_PROFILE
jpayne@69 20425 static int __Pyx_TraceSetupAndCall(PyCodeObject** code,
jpayne@69 20426 PyFrameObject** frame,
jpayne@69 20427 PyThreadState* tstate,
jpayne@69 20428 const char *funcname,
jpayne@69 20429 const char *srcfile,
jpayne@69 20430 int firstlineno) {
jpayne@69 20431 PyObject *type, *value, *traceback;
jpayne@69 20432 int retval;
jpayne@69 20433 if (*frame == NULL || !CYTHON_PROFILE_REUSE_FRAME) {
jpayne@69 20434 if (*code == NULL) {
jpayne@69 20435 *code = __Pyx_createFrameCodeObject(funcname, srcfile, firstlineno);
jpayne@69 20436 if (*code == NULL) return 0;
jpayne@69 20437 }
jpayne@69 20438 *frame = PyFrame_New(
jpayne@69 20439 tstate, /*PyThreadState *tstate*/
jpayne@69 20440 *code, /*PyCodeObject *code*/
jpayne@69 20441 __pyx_d, /*PyObject *globals*/
jpayne@69 20442 0 /*PyObject *locals*/
jpayne@69 20443 );
jpayne@69 20444 if (*frame == NULL) return 0;
jpayne@69 20445 if (CYTHON_TRACE && (*frame)->f_trace == NULL) {
jpayne@69 20446 Py_INCREF(Py_None);
jpayne@69 20447 (*frame)->f_trace = Py_None;
jpayne@69 20448 }
jpayne@69 20449 #if PY_VERSION_HEX < 0x030400B1
jpayne@69 20450 } else {
jpayne@69 20451 (*frame)->f_tstate = tstate;
jpayne@69 20452 #endif
jpayne@69 20453 }
jpayne@69 20454 __Pyx_PyFrame_SetLineNumber(*frame, firstlineno);
jpayne@69 20455 retval = 1;
jpayne@69 20456 __Pyx_EnterTracing(tstate);
jpayne@69 20457 __Pyx_ErrFetchInState(tstate, &type, &value, &traceback);
jpayne@69 20458 #if CYTHON_TRACE
jpayne@69 20459 if (tstate->c_tracefunc)
jpayne@69 20460 retval = tstate->c_tracefunc(tstate->c_traceobj, *frame, PyTrace_CALL, NULL) == 0;
jpayne@69 20461 if (retval && tstate->c_profilefunc)
jpayne@69 20462 #endif
jpayne@69 20463 retval = tstate->c_profilefunc(tstate->c_profileobj, *frame, PyTrace_CALL, NULL) == 0;
jpayne@69 20464 __Pyx_LeaveTracing(tstate);
jpayne@69 20465 if (retval) {
jpayne@69 20466 __Pyx_ErrRestoreInState(tstate, type, value, traceback);
jpayne@69 20467 return __Pyx_IsTracing(tstate, 0, 0) && retval;
jpayne@69 20468 } else {
jpayne@69 20469 Py_XDECREF(type);
jpayne@69 20470 Py_XDECREF(value);
jpayne@69 20471 Py_XDECREF(traceback);
jpayne@69 20472 return -1;
jpayne@69 20473 }
jpayne@69 20474 }
jpayne@69 20475 static PyCodeObject *__Pyx_createFrameCodeObject(const char *funcname, const char *srcfile, int firstlineno) {
jpayne@69 20476 PyCodeObject *py_code = 0;
jpayne@69 20477 #if PY_MAJOR_VERSION >= 3
jpayne@69 20478 py_code = PyCode_NewEmpty(srcfile, funcname, firstlineno);
jpayne@69 20479 if (likely(py_code)) {
jpayne@69 20480 py_code->co_flags |= CO_OPTIMIZED | CO_NEWLOCALS;
jpayne@69 20481 }
jpayne@69 20482 #else
jpayne@69 20483 PyObject *py_srcfile = 0;
jpayne@69 20484 PyObject *py_funcname = 0;
jpayne@69 20485 py_funcname = PyString_FromString(funcname);
jpayne@69 20486 if (unlikely(!py_funcname)) goto bad;
jpayne@69 20487 py_srcfile = PyString_FromString(srcfile);
jpayne@69 20488 if (unlikely(!py_srcfile)) goto bad;
jpayne@69 20489 py_code = PyCode_New(
jpayne@69 20490 0,
jpayne@69 20491 0,
jpayne@69 20492 0,
jpayne@69 20493 CO_OPTIMIZED | CO_NEWLOCALS,
jpayne@69 20494 __pyx_empty_bytes, /*PyObject *code,*/
jpayne@69 20495 __pyx_empty_tuple, /*PyObject *consts,*/
jpayne@69 20496 __pyx_empty_tuple, /*PyObject *names,*/
jpayne@69 20497 __pyx_empty_tuple, /*PyObject *varnames,*/
jpayne@69 20498 __pyx_empty_tuple, /*PyObject *freevars,*/
jpayne@69 20499 __pyx_empty_tuple, /*PyObject *cellvars,*/
jpayne@69 20500 py_srcfile, /*PyObject *filename,*/
jpayne@69 20501 py_funcname, /*PyObject *name,*/
jpayne@69 20502 firstlineno,
jpayne@69 20503 __pyx_empty_bytes /*PyObject *lnotab*/
jpayne@69 20504 );
jpayne@69 20505 bad:
jpayne@69 20506 Py_XDECREF(py_srcfile);
jpayne@69 20507 Py_XDECREF(py_funcname);
jpayne@69 20508 #endif
jpayne@69 20509 return py_code;
jpayne@69 20510 }
jpayne@69 20511 #endif
jpayne@69 20512
jpayne@69 20513 /* KeywordStringCheck */
jpayne@69 20514 static int __Pyx_CheckKeywordStrings(
jpayne@69 20515 PyObject *kw,
jpayne@69 20516 const char* function_name,
jpayne@69 20517 int kw_allowed)
jpayne@69 20518 {
jpayne@69 20519 PyObject* key = 0;
jpayne@69 20520 Py_ssize_t pos = 0;
jpayne@69 20521 #if CYTHON_COMPILING_IN_PYPY
jpayne@69 20522 if (!kw_allowed && PyDict_Next(kw, &pos, &key, 0))
jpayne@69 20523 goto invalid_keyword;
jpayne@69 20524 return 1;
jpayne@69 20525 #else
jpayne@69 20526 if (CYTHON_METH_FASTCALL && likely(PyTuple_Check(kw))) {
jpayne@69 20527 Py_ssize_t kwsize;
jpayne@69 20528 #if CYTHON_ASSUME_SAFE_MACROS
jpayne@69 20529 kwsize = PyTuple_GET_SIZE(kw);
jpayne@69 20530 #else
jpayne@69 20531 kwsize = PyTuple_Size(kw);
jpayne@69 20532 if (kwsize < 0) return 0;
jpayne@69 20533 #endif
jpayne@69 20534 if (unlikely(kwsize == 0))
jpayne@69 20535 return 1;
jpayne@69 20536 if (!kw_allowed) {
jpayne@69 20537 #if CYTHON_ASSUME_SAFE_MACROS
jpayne@69 20538 key = PyTuple_GET_ITEM(kw, 0);
jpayne@69 20539 #else
jpayne@69 20540 key = PyTuple_GetItem(kw, pos);
jpayne@69 20541 if (!key) return 0;
jpayne@69 20542 #endif
jpayne@69 20543 goto invalid_keyword;
jpayne@69 20544 }
jpayne@69 20545 #if PY_VERSION_HEX < 0x03090000
jpayne@69 20546 for (pos = 0; pos < kwsize; pos++) {
jpayne@69 20547 #if CYTHON_ASSUME_SAFE_MACROS
jpayne@69 20548 key = PyTuple_GET_ITEM(kw, pos);
jpayne@69 20549 #else
jpayne@69 20550 key = PyTuple_GetItem(kw, pos);
jpayne@69 20551 if (!key) return 0;
jpayne@69 20552 #endif
jpayne@69 20553 if (unlikely(!PyUnicode_Check(key)))
jpayne@69 20554 goto invalid_keyword_type;
jpayne@69 20555 }
jpayne@69 20556 #endif
jpayne@69 20557 return 1;
jpayne@69 20558 }
jpayne@69 20559 while (PyDict_Next(kw, &pos, &key, 0)) {
jpayne@69 20560 #if PY_MAJOR_VERSION < 3
jpayne@69 20561 if (unlikely(!PyString_Check(key)))
jpayne@69 20562 #endif
jpayne@69 20563 if (unlikely(!PyUnicode_Check(key)))
jpayne@69 20564 goto invalid_keyword_type;
jpayne@69 20565 }
jpayne@69 20566 if (!kw_allowed && unlikely(key))
jpayne@69 20567 goto invalid_keyword;
jpayne@69 20568 return 1;
jpayne@69 20569 invalid_keyword_type:
jpayne@69 20570 PyErr_Format(PyExc_TypeError,
jpayne@69 20571 "%.200s() keywords must be strings", function_name);
jpayne@69 20572 return 0;
jpayne@69 20573 #endif
jpayne@69 20574 invalid_keyword:
jpayne@69 20575 #if PY_MAJOR_VERSION < 3
jpayne@69 20576 PyErr_Format(PyExc_TypeError,
jpayne@69 20577 "%.200s() got an unexpected keyword argument '%.200s'",
jpayne@69 20578 function_name, PyString_AsString(key));
jpayne@69 20579 #else
jpayne@69 20580 PyErr_Format(PyExc_TypeError,
jpayne@69 20581 "%s() got an unexpected keyword argument '%U'",
jpayne@69 20582 function_name, key);
jpayne@69 20583 #endif
jpayne@69 20584 return 0;
jpayne@69 20585 }
jpayne@69 20586
jpayne@69 20587 /* PyObjectCall */
jpayne@69 20588 #if CYTHON_COMPILING_IN_CPYTHON
jpayne@69 20589 static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) {
jpayne@69 20590 PyObject *result;
jpayne@69 20591 ternaryfunc call = Py_TYPE(func)->tp_call;
jpayne@69 20592 if (unlikely(!call))
jpayne@69 20593 return PyObject_Call(func, arg, kw);
jpayne@69 20594 #if PY_MAJOR_VERSION < 3
jpayne@69 20595 if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
jpayne@69 20596 return NULL;
jpayne@69 20597 #else
jpayne@69 20598 if (unlikely(Py_EnterRecursiveCall(" while calling a Python object")))
jpayne@69 20599 return NULL;
jpayne@69 20600 #endif
jpayne@69 20601 result = (*call)(func, arg, kw);
jpayne@69 20602 Py_LeaveRecursiveCall();
jpayne@69 20603 if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
jpayne@69 20604 PyErr_SetString(
jpayne@69 20605 PyExc_SystemError,
jpayne@69 20606 "NULL result without error in PyObject_Call");
jpayne@69 20607 }
jpayne@69 20608 return result;
jpayne@69 20609 }
jpayne@69 20610 #endif
jpayne@69 20611
jpayne@69 20612 /* RaiseArgTupleInvalid */
jpayne@69 20613 static void __Pyx_RaiseArgtupleInvalid(
jpayne@69 20614 const char* func_name,
jpayne@69 20615 int exact,
jpayne@69 20616 Py_ssize_t num_min,
jpayne@69 20617 Py_ssize_t num_max,
jpayne@69 20618 Py_ssize_t num_found)
jpayne@69 20619 {
jpayne@69 20620 Py_ssize_t num_expected;
jpayne@69 20621 const char *more_or_less;
jpayne@69 20622 if (num_found < num_min) {
jpayne@69 20623 num_expected = num_min;
jpayne@69 20624 more_or_less = "at least";
jpayne@69 20625 } else {
jpayne@69 20626 num_expected = num_max;
jpayne@69 20627 more_or_less = "at most";
jpayne@69 20628 }
jpayne@69 20629 if (exact) {
jpayne@69 20630 more_or_less = "exactly";
jpayne@69 20631 }
jpayne@69 20632 PyErr_Format(PyExc_TypeError,
jpayne@69 20633 "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T "d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T "d given)",
jpayne@69 20634 func_name, more_or_less, num_expected,
jpayne@69 20635 (num_expected == 1) ? "" : "s", num_found);
jpayne@69 20636 }
jpayne@69 20637
jpayne@69 20638 /* RaiseException */
jpayne@69 20639 #if PY_MAJOR_VERSION < 3
jpayne@69 20640 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) {
jpayne@69 20641 __Pyx_PyThreadState_declare
jpayne@69 20642 CYTHON_UNUSED_VAR(cause);
jpayne@69 20643 Py_XINCREF(type);
jpayne@69 20644 if (!value || value == Py_None)
jpayne@69 20645 value = NULL;
jpayne@69 20646 else
jpayne@69 20647 Py_INCREF(value);
jpayne@69 20648 if (!tb || tb == Py_None)
jpayne@69 20649 tb = NULL;
jpayne@69 20650 else {
jpayne@69 20651 Py_INCREF(tb);
jpayne@69 20652 if (!PyTraceBack_Check(tb)) {
jpayne@69 20653 PyErr_SetString(PyExc_TypeError,
jpayne@69 20654 "raise: arg 3 must be a traceback or None");
jpayne@69 20655 goto raise_error;
jpayne@69 20656 }
jpayne@69 20657 }
jpayne@69 20658 if (PyType_Check(type)) {
jpayne@69 20659 #if CYTHON_COMPILING_IN_PYPY
jpayne@69 20660 if (!value) {
jpayne@69 20661 Py_INCREF(Py_None);
jpayne@69 20662 value = Py_None;
jpayne@69 20663 }
jpayne@69 20664 #endif
jpayne@69 20665 PyErr_NormalizeException(&type, &value, &tb);
jpayne@69 20666 } else {
jpayne@69 20667 if (value) {
jpayne@69 20668 PyErr_SetString(PyExc_TypeError,
jpayne@69 20669 "instance exception may not have a separate value");
jpayne@69 20670 goto raise_error;
jpayne@69 20671 }
jpayne@69 20672 value = type;
jpayne@69 20673 type = (PyObject*) Py_TYPE(type);
jpayne@69 20674 Py_INCREF(type);
jpayne@69 20675 if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) {
jpayne@69 20676 PyErr_SetString(PyExc_TypeError,
jpayne@69 20677 "raise: exception class must be a subclass of BaseException");
jpayne@69 20678 goto raise_error;
jpayne@69 20679 }
jpayne@69 20680 }
jpayne@69 20681 __Pyx_PyThreadState_assign
jpayne@69 20682 __Pyx_ErrRestore(type, value, tb);
jpayne@69 20683 return;
jpayne@69 20684 raise_error:
jpayne@69 20685 Py_XDECREF(value);
jpayne@69 20686 Py_XDECREF(type);
jpayne@69 20687 Py_XDECREF(tb);
jpayne@69 20688 return;
jpayne@69 20689 }
jpayne@69 20690 #else
jpayne@69 20691 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) {
jpayne@69 20692 PyObject* owned_instance = NULL;
jpayne@69 20693 if (tb == Py_None) {
jpayne@69 20694 tb = 0;
jpayne@69 20695 } else if (tb && !PyTraceBack_Check(tb)) {
jpayne@69 20696 PyErr_SetString(PyExc_TypeError,
jpayne@69 20697 "raise: arg 3 must be a traceback or None");
jpayne@69 20698 goto bad;
jpayne@69 20699 }
jpayne@69 20700 if (value == Py_None)
jpayne@69 20701 value = 0;
jpayne@69 20702 if (PyExceptionInstance_Check(type)) {
jpayne@69 20703 if (value) {
jpayne@69 20704 PyErr_SetString(PyExc_TypeError,
jpayne@69 20705 "instance exception may not have a separate value");
jpayne@69 20706 goto bad;
jpayne@69 20707 }
jpayne@69 20708 value = type;
jpayne@69 20709 type = (PyObject*) Py_TYPE(value);
jpayne@69 20710 } else if (PyExceptionClass_Check(type)) {
jpayne@69 20711 PyObject *instance_class = NULL;
jpayne@69 20712 if (value && PyExceptionInstance_Check(value)) {
jpayne@69 20713 instance_class = (PyObject*) Py_TYPE(value);
jpayne@69 20714 if (instance_class != type) {
jpayne@69 20715 int is_subclass = PyObject_IsSubclass(instance_class, type);
jpayne@69 20716 if (!is_subclass) {
jpayne@69 20717 instance_class = NULL;
jpayne@69 20718 } else if (unlikely(is_subclass == -1)) {
jpayne@69 20719 goto bad;
jpayne@69 20720 } else {
jpayne@69 20721 type = instance_class;
jpayne@69 20722 }
jpayne@69 20723 }
jpayne@69 20724 }
jpayne@69 20725 if (!instance_class) {
jpayne@69 20726 PyObject *args;
jpayne@69 20727 if (!value)
jpayne@69 20728 args = PyTuple_New(0);
jpayne@69 20729 else if (PyTuple_Check(value)) {
jpayne@69 20730 Py_INCREF(value);
jpayne@69 20731 args = value;
jpayne@69 20732 } else
jpayne@69 20733 args = PyTuple_Pack(1, value);
jpayne@69 20734 if (!args)
jpayne@69 20735 goto bad;
jpayne@69 20736 owned_instance = PyObject_Call(type, args, NULL);
jpayne@69 20737 Py_DECREF(args);
jpayne@69 20738 if (!owned_instance)
jpayne@69 20739 goto bad;
jpayne@69 20740 value = owned_instance;
jpayne@69 20741 if (!PyExceptionInstance_Check(value)) {
jpayne@69 20742 PyErr_Format(PyExc_TypeError,
jpayne@69 20743 "calling %R should have returned an instance of "
jpayne@69 20744 "BaseException, not %R",
jpayne@69 20745 type, Py_TYPE(value));
jpayne@69 20746 goto bad;
jpayne@69 20747 }
jpayne@69 20748 }
jpayne@69 20749 } else {
jpayne@69 20750 PyErr_SetString(PyExc_TypeError,
jpayne@69 20751 "raise: exception class must be a subclass of BaseException");
jpayne@69 20752 goto bad;
jpayne@69 20753 }
jpayne@69 20754 if (cause) {
jpayne@69 20755 PyObject *fixed_cause;
jpayne@69 20756 if (cause == Py_None) {
jpayne@69 20757 fixed_cause = NULL;
jpayne@69 20758 } else if (PyExceptionClass_Check(cause)) {
jpayne@69 20759 fixed_cause = PyObject_CallObject(cause, NULL);
jpayne@69 20760 if (fixed_cause == NULL)
jpayne@69 20761 goto bad;
jpayne@69 20762 } else if (PyExceptionInstance_Check(cause)) {
jpayne@69 20763 fixed_cause = cause;
jpayne@69 20764 Py_INCREF(fixed_cause);
jpayne@69 20765 } else {
jpayne@69 20766 PyErr_SetString(PyExc_TypeError,
jpayne@69 20767 "exception causes must derive from "
jpayne@69 20768 "BaseException");
jpayne@69 20769 goto bad;
jpayne@69 20770 }
jpayne@69 20771 PyException_SetCause(value, fixed_cause);
jpayne@69 20772 }
jpayne@69 20773 PyErr_SetObject(type, value);
jpayne@69 20774 if (tb) {
jpayne@69 20775 #if PY_VERSION_HEX >= 0x030C00A6
jpayne@69 20776 PyException_SetTraceback(value, tb);
jpayne@69 20777 #elif CYTHON_FAST_THREAD_STATE
jpayne@69 20778 PyThreadState *tstate = __Pyx_PyThreadState_Current;
jpayne@69 20779 PyObject* tmp_tb = tstate->curexc_traceback;
jpayne@69 20780 if (tb != tmp_tb) {
jpayne@69 20781 Py_INCREF(tb);
jpayne@69 20782 tstate->curexc_traceback = tb;
jpayne@69 20783 Py_XDECREF(tmp_tb);
jpayne@69 20784 }
jpayne@69 20785 #else
jpayne@69 20786 PyObject *tmp_type, *tmp_value, *tmp_tb;
jpayne@69 20787 PyErr_Fetch(&tmp_type, &tmp_value, &tmp_tb);
jpayne@69 20788 Py_INCREF(tb);
jpayne@69 20789 PyErr_Restore(tmp_type, tmp_value, tb);
jpayne@69 20790 Py_XDECREF(tmp_tb);
jpayne@69 20791 #endif
jpayne@69 20792 }
jpayne@69 20793 bad:
jpayne@69 20794 Py_XDECREF(owned_instance);
jpayne@69 20795 return;
jpayne@69 20796 }
jpayne@69 20797 #endif
jpayne@69 20798
jpayne@69 20799 /* RaiseDoubleKeywords */
jpayne@69 20800 static void __Pyx_RaiseDoubleKeywordsError(
jpayne@69 20801 const char* func_name,
jpayne@69 20802 PyObject* kw_name)
jpayne@69 20803 {
jpayne@69 20804 PyErr_Format(PyExc_TypeError,
jpayne@69 20805 #if PY_MAJOR_VERSION >= 3
jpayne@69 20806 "%s() got multiple values for keyword argument '%U'", func_name, kw_name);
jpayne@69 20807 #else
jpayne@69 20808 "%s() got multiple values for keyword argument '%s'", func_name,
jpayne@69 20809 PyString_AsString(kw_name));
jpayne@69 20810 #endif
jpayne@69 20811 }
jpayne@69 20812
jpayne@69 20813 /* ParseKeywords */
jpayne@69 20814 static int __Pyx_ParseOptionalKeywords(
jpayne@69 20815 PyObject *kwds,
jpayne@69 20816 PyObject *const *kwvalues,
jpayne@69 20817 PyObject **argnames[],
jpayne@69 20818 PyObject *kwds2,
jpayne@69 20819 PyObject *values[],
jpayne@69 20820 Py_ssize_t num_pos_args,
jpayne@69 20821 const char* function_name)
jpayne@69 20822 {
jpayne@69 20823 PyObject *key = 0, *value = 0;
jpayne@69 20824 Py_ssize_t pos = 0;
jpayne@69 20825 PyObject*** name;
jpayne@69 20826 PyObject*** first_kw_arg = argnames + num_pos_args;
jpayne@69 20827 int kwds_is_tuple = CYTHON_METH_FASTCALL && likely(PyTuple_Check(kwds));
jpayne@69 20828 while (1) {
jpayne@69 20829 Py_XDECREF(key); key = NULL;
jpayne@69 20830 Py_XDECREF(value); value = NULL;
jpayne@69 20831 if (kwds_is_tuple) {
jpayne@69 20832 Py_ssize_t size;
jpayne@69 20833 #if CYTHON_ASSUME_SAFE_MACROS
jpayne@69 20834 size = PyTuple_GET_SIZE(kwds);
jpayne@69 20835 #else
jpayne@69 20836 size = PyTuple_Size(kwds);
jpayne@69 20837 if (size < 0) goto bad;
jpayne@69 20838 #endif
jpayne@69 20839 if (pos >= size) break;
jpayne@69 20840 #if CYTHON_AVOID_BORROWED_REFS
jpayne@69 20841 key = __Pyx_PySequence_ITEM(kwds, pos);
jpayne@69 20842 if (!key) goto bad;
jpayne@69 20843 #elif CYTHON_ASSUME_SAFE_MACROS
jpayne@69 20844 key = PyTuple_GET_ITEM(kwds, pos);
jpayne@69 20845 #else
jpayne@69 20846 key = PyTuple_GetItem(kwds, pos);
jpayne@69 20847 if (!key) goto bad;
jpayne@69 20848 #endif
jpayne@69 20849 value = kwvalues[pos];
jpayne@69 20850 pos++;
jpayne@69 20851 }
jpayne@69 20852 else
jpayne@69 20853 {
jpayne@69 20854 if (!PyDict_Next(kwds, &pos, &key, &value)) break;
jpayne@69 20855 #if CYTHON_AVOID_BORROWED_REFS
jpayne@69 20856 Py_INCREF(key);
jpayne@69 20857 #endif
jpayne@69 20858 }
jpayne@69 20859 name = first_kw_arg;
jpayne@69 20860 while (*name && (**name != key)) name++;
jpayne@69 20861 if (*name) {
jpayne@69 20862 values[name-argnames] = value;
jpayne@69 20863 #if CYTHON_AVOID_BORROWED_REFS
jpayne@69 20864 Py_INCREF(value);
jpayne@69 20865 Py_DECREF(key);
jpayne@69 20866 #endif
jpayne@69 20867 key = NULL;
jpayne@69 20868 value = NULL;
jpayne@69 20869 continue;
jpayne@69 20870 }
jpayne@69 20871 #if !CYTHON_AVOID_BORROWED_REFS
jpayne@69 20872 Py_INCREF(key);
jpayne@69 20873 #endif
jpayne@69 20874 Py_INCREF(value);
jpayne@69 20875 name = first_kw_arg;
jpayne@69 20876 #if PY_MAJOR_VERSION < 3
jpayne@69 20877 if (likely(PyString_Check(key))) {
jpayne@69 20878 while (*name) {
jpayne@69 20879 if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key))
jpayne@69 20880 && _PyString_Eq(**name, key)) {
jpayne@69 20881 values[name-argnames] = value;
jpayne@69 20882 #if CYTHON_AVOID_BORROWED_REFS
jpayne@69 20883 value = NULL;
jpayne@69 20884 #endif
jpayne@69 20885 break;
jpayne@69 20886 }
jpayne@69 20887 name++;
jpayne@69 20888 }
jpayne@69 20889 if (*name) continue;
jpayne@69 20890 else {
jpayne@69 20891 PyObject*** argname = argnames;
jpayne@69 20892 while (argname != first_kw_arg) {
jpayne@69 20893 if ((**argname == key) || (
jpayne@69 20894 (CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**argname) == PyString_GET_SIZE(key))
jpayne@69 20895 && _PyString_Eq(**argname, key))) {
jpayne@69 20896 goto arg_passed_twice;
jpayne@69 20897 }
jpayne@69 20898 argname++;
jpayne@69 20899 }
jpayne@69 20900 }
jpayne@69 20901 } else
jpayne@69 20902 #endif
jpayne@69 20903 if (likely(PyUnicode_Check(key))) {
jpayne@69 20904 while (*name) {
jpayne@69 20905 int cmp = (
jpayne@69 20906 #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
jpayne@69 20907 (__Pyx_PyUnicode_GET_LENGTH(**name) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 :
jpayne@69 20908 #endif
jpayne@69 20909 PyUnicode_Compare(**name, key)
jpayne@69 20910 );
jpayne@69 20911 if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
jpayne@69 20912 if (cmp == 0) {
jpayne@69 20913 values[name-argnames] = value;
jpayne@69 20914 #if CYTHON_AVOID_BORROWED_REFS
jpayne@69 20915 value = NULL;
jpayne@69 20916 #endif
jpayne@69 20917 break;
jpayne@69 20918 }
jpayne@69 20919 name++;
jpayne@69 20920 }
jpayne@69 20921 if (*name) continue;
jpayne@69 20922 else {
jpayne@69 20923 PyObject*** argname = argnames;
jpayne@69 20924 while (argname != first_kw_arg) {
jpayne@69 20925 int cmp = (**argname == key) ? 0 :
jpayne@69 20926 #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
jpayne@69 20927 (__Pyx_PyUnicode_GET_LENGTH(**argname) != __Pyx_PyUnicode_GET_LENGTH(key)) ? 1 :
jpayne@69 20928 #endif
jpayne@69 20929 PyUnicode_Compare(**argname, key);
jpayne@69 20930 if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
jpayne@69 20931 if (cmp == 0) goto arg_passed_twice;
jpayne@69 20932 argname++;
jpayne@69 20933 }
jpayne@69 20934 }
jpayne@69 20935 } else
jpayne@69 20936 goto invalid_keyword_type;
jpayne@69 20937 if (kwds2) {
jpayne@69 20938 if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad;
jpayne@69 20939 } else {
jpayne@69 20940 goto invalid_keyword;
jpayne@69 20941 }
jpayne@69 20942 }
jpayne@69 20943 Py_XDECREF(key);
jpayne@69 20944 Py_XDECREF(value);
jpayne@69 20945 return 0;
jpayne@69 20946 arg_passed_twice:
jpayne@69 20947 __Pyx_RaiseDoubleKeywordsError(function_name, key);
jpayne@69 20948 goto bad;
jpayne@69 20949 invalid_keyword_type:
jpayne@69 20950 PyErr_Format(PyExc_TypeError,
jpayne@69 20951 "%.200s() keywords must be strings", function_name);
jpayne@69 20952 goto bad;
jpayne@69 20953 invalid_keyword:
jpayne@69 20954 #if PY_MAJOR_VERSION < 3
jpayne@69 20955 PyErr_Format(PyExc_TypeError,
jpayne@69 20956 "%.200s() got an unexpected keyword argument '%.200s'",
jpayne@69 20957 function_name, PyString_AsString(key));
jpayne@69 20958 #else
jpayne@69 20959 PyErr_Format(PyExc_TypeError,
jpayne@69 20960 "%s() got an unexpected keyword argument '%U'",
jpayne@69 20961 function_name, key);
jpayne@69 20962 #endif
jpayne@69 20963 bad:
jpayne@69 20964 Py_XDECREF(key);
jpayne@69 20965 Py_XDECREF(value);
jpayne@69 20966 return -1;
jpayne@69 20967 }
jpayne@69 20968
jpayne@69 20969 /* PyFunctionFastCall */
jpayne@69 20970 #if CYTHON_FAST_PYCALL && !CYTHON_VECTORCALL
jpayne@69 20971 static PyObject* __Pyx_PyFunction_FastCallNoKw(PyCodeObject *co, PyObject **args, Py_ssize_t na,
jpayne@69 20972 PyObject *globals) {
jpayne@69 20973 PyFrameObject *f;
jpayne@69 20974 PyThreadState *tstate = __Pyx_PyThreadState_Current;
jpayne@69 20975 PyObject **fastlocals;
jpayne@69 20976 Py_ssize_t i;
jpayne@69 20977 PyObject *result;
jpayne@69 20978 assert(globals != NULL);
jpayne@69 20979 /* XXX Perhaps we should create a specialized
jpayne@69 20980 PyFrame_New() that doesn't take locals, but does
jpayne@69 20981 take builtins without sanity checking them.
jpayne@69 20982 */
jpayne@69 20983 assert(tstate != NULL);
jpayne@69 20984 f = PyFrame_New(tstate, co, globals, NULL);
jpayne@69 20985 if (f == NULL) {
jpayne@69 20986 return NULL;
jpayne@69 20987 }
jpayne@69 20988 fastlocals = __Pyx_PyFrame_GetLocalsplus(f);
jpayne@69 20989 for (i = 0; i < na; i++) {
jpayne@69 20990 Py_INCREF(*args);
jpayne@69 20991 fastlocals[i] = *args++;
jpayne@69 20992 }
jpayne@69 20993 result = PyEval_EvalFrameEx(f,0);
jpayne@69 20994 ++tstate->recursion_depth;
jpayne@69 20995 Py_DECREF(f);
jpayne@69 20996 --tstate->recursion_depth;
jpayne@69 20997 return result;
jpayne@69 20998 }
jpayne@69 20999 static PyObject *__Pyx_PyFunction_FastCallDict(PyObject *func, PyObject **args, Py_ssize_t nargs, PyObject *kwargs) {
jpayne@69 21000 PyCodeObject *co = (PyCodeObject *)PyFunction_GET_CODE(func);
jpayne@69 21001 PyObject *globals = PyFunction_GET_GLOBALS(func);
jpayne@69 21002 PyObject *argdefs = PyFunction_GET_DEFAULTS(func);
jpayne@69 21003 PyObject *closure;
jpayne@69 21004 #if PY_MAJOR_VERSION >= 3
jpayne@69 21005 PyObject *kwdefs;
jpayne@69 21006 #endif
jpayne@69 21007 PyObject *kwtuple, **k;
jpayne@69 21008 PyObject **d;
jpayne@69 21009 Py_ssize_t nd;
jpayne@69 21010 Py_ssize_t nk;
jpayne@69 21011 PyObject *result;
jpayne@69 21012 assert(kwargs == NULL || PyDict_Check(kwargs));
jpayne@69 21013 nk = kwargs ? PyDict_Size(kwargs) : 0;
jpayne@69 21014 #if PY_MAJOR_VERSION < 3
jpayne@69 21015 if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object"))) {
jpayne@69 21016 return NULL;
jpayne@69 21017 }
jpayne@69 21018 #else
jpayne@69 21019 if (unlikely(Py_EnterRecursiveCall(" while calling a Python object"))) {
jpayne@69 21020 return NULL;
jpayne@69 21021 }
jpayne@69 21022 #endif
jpayne@69 21023 if (
jpayne@69 21024 #if PY_MAJOR_VERSION >= 3
jpayne@69 21025 co->co_kwonlyargcount == 0 &&
jpayne@69 21026 #endif
jpayne@69 21027 likely(kwargs == NULL || nk == 0) &&
jpayne@69 21028 co->co_flags == (CO_OPTIMIZED | CO_NEWLOCALS | CO_NOFREE)) {
jpayne@69 21029 if (argdefs == NULL && co->co_argcount == nargs) {
jpayne@69 21030 result = __Pyx_PyFunction_FastCallNoKw(co, args, nargs, globals);
jpayne@69 21031 goto done;
jpayne@69 21032 }
jpayne@69 21033 else if (nargs == 0 && argdefs != NULL
jpayne@69 21034 && co->co_argcount == Py_SIZE(argdefs)) {
jpayne@69 21035 /* function called with no arguments, but all parameters have
jpayne@69 21036 a default value: use default values as arguments .*/
jpayne@69 21037 args = &PyTuple_GET_ITEM(argdefs, 0);
jpayne@69 21038 result =__Pyx_PyFunction_FastCallNoKw(co, args, Py_SIZE(argdefs), globals);
jpayne@69 21039 goto done;
jpayne@69 21040 }
jpayne@69 21041 }
jpayne@69 21042 if (kwargs != NULL) {
jpayne@69 21043 Py_ssize_t pos, i;
jpayne@69 21044 kwtuple = PyTuple_New(2 * nk);
jpayne@69 21045 if (kwtuple == NULL) {
jpayne@69 21046 result = NULL;
jpayne@69 21047 goto done;
jpayne@69 21048 }
jpayne@69 21049 k = &PyTuple_GET_ITEM(kwtuple, 0);
jpayne@69 21050 pos = i = 0;
jpayne@69 21051 while (PyDict_Next(kwargs, &pos, &k[i], &k[i+1])) {
jpayne@69 21052 Py_INCREF(k[i]);
jpayne@69 21053 Py_INCREF(k[i+1]);
jpayne@69 21054 i += 2;
jpayne@69 21055 }
jpayne@69 21056 nk = i / 2;
jpayne@69 21057 }
jpayne@69 21058 else {
jpayne@69 21059 kwtuple = NULL;
jpayne@69 21060 k = NULL;
jpayne@69 21061 }
jpayne@69 21062 closure = PyFunction_GET_CLOSURE(func);
jpayne@69 21063 #if PY_MAJOR_VERSION >= 3
jpayne@69 21064 kwdefs = PyFunction_GET_KW_DEFAULTS(func);
jpayne@69 21065 #endif
jpayne@69 21066 if (argdefs != NULL) {
jpayne@69 21067 d = &PyTuple_GET_ITEM(argdefs, 0);
jpayne@69 21068 nd = Py_SIZE(argdefs);
jpayne@69 21069 }
jpayne@69 21070 else {
jpayne@69 21071 d = NULL;
jpayne@69 21072 nd = 0;
jpayne@69 21073 }
jpayne@69 21074 #if PY_MAJOR_VERSION >= 3
jpayne@69 21075 result = PyEval_EvalCodeEx((PyObject*)co, globals, (PyObject *)NULL,
jpayne@69 21076 args, (int)nargs,
jpayne@69 21077 k, (int)nk,
jpayne@69 21078 d, (int)nd, kwdefs, closure);
jpayne@69 21079 #else
jpayne@69 21080 result = PyEval_EvalCodeEx(co, globals, (PyObject *)NULL,
jpayne@69 21081 args, (int)nargs,
jpayne@69 21082 k, (int)nk,
jpayne@69 21083 d, (int)nd, closure);
jpayne@69 21084 #endif
jpayne@69 21085 Py_XDECREF(kwtuple);
jpayne@69 21086 done:
jpayne@69 21087 Py_LeaveRecursiveCall();
jpayne@69 21088 return result;
jpayne@69 21089 }
jpayne@69 21090 #endif
jpayne@69 21091
jpayne@69 21092 /* PyObjectCallMethO */
jpayne@69 21093 #if CYTHON_COMPILING_IN_CPYTHON
jpayne@69 21094 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) {
jpayne@69 21095 PyObject *self, *result;
jpayne@69 21096 PyCFunction cfunc;
jpayne@69 21097 cfunc = __Pyx_CyOrPyCFunction_GET_FUNCTION(func);
jpayne@69 21098 self = __Pyx_CyOrPyCFunction_GET_SELF(func);
jpayne@69 21099 #if PY_MAJOR_VERSION < 3
jpayne@69 21100 if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
jpayne@69 21101 return NULL;
jpayne@69 21102 #else
jpayne@69 21103 if (unlikely(Py_EnterRecursiveCall(" while calling a Python object")))
jpayne@69 21104 return NULL;
jpayne@69 21105 #endif
jpayne@69 21106 result = cfunc(self, arg);
jpayne@69 21107 Py_LeaveRecursiveCall();
jpayne@69 21108 if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
jpayne@69 21109 PyErr_SetString(
jpayne@69 21110 PyExc_SystemError,
jpayne@69 21111 "NULL result without error in PyObject_Call");
jpayne@69 21112 }
jpayne@69 21113 return result;
jpayne@69 21114 }
jpayne@69 21115 #endif
jpayne@69 21116
jpayne@69 21117 /* PyObjectFastCall */
jpayne@69 21118 #if PY_VERSION_HEX < 0x03090000 || CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 21119 static PyObject* __Pyx_PyObject_FastCall_fallback(PyObject *func, PyObject **args, size_t nargs, PyObject *kwargs) {
jpayne@69 21120 PyObject *argstuple;
jpayne@69 21121 PyObject *result = 0;
jpayne@69 21122 size_t i;
jpayne@69 21123 argstuple = PyTuple_New((Py_ssize_t)nargs);
jpayne@69 21124 if (unlikely(!argstuple)) return NULL;
jpayne@69 21125 for (i = 0; i < nargs; i++) {
jpayne@69 21126 Py_INCREF(args[i]);
jpayne@69 21127 if (__Pyx_PyTuple_SET_ITEM(argstuple, (Py_ssize_t)i, args[i]) < 0) goto bad;
jpayne@69 21128 }
jpayne@69 21129 result = __Pyx_PyObject_Call(func, argstuple, kwargs);
jpayne@69 21130 bad:
jpayne@69 21131 Py_DECREF(argstuple);
jpayne@69 21132 return result;
jpayne@69 21133 }
jpayne@69 21134 #endif
jpayne@69 21135 static CYTHON_INLINE PyObject* __Pyx_PyObject_FastCallDict(PyObject *func, PyObject **args, size_t _nargs, PyObject *kwargs) {
jpayne@69 21136 Py_ssize_t nargs = __Pyx_PyVectorcall_NARGS(_nargs);
jpayne@69 21137 #if CYTHON_COMPILING_IN_CPYTHON
jpayne@69 21138 if (nargs == 0 && kwargs == NULL) {
jpayne@69 21139 if (__Pyx_CyOrPyCFunction_Check(func) && likely( __Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_NOARGS))
jpayne@69 21140 return __Pyx_PyObject_CallMethO(func, NULL);
jpayne@69 21141 }
jpayne@69 21142 else if (nargs == 1 && kwargs == NULL) {
jpayne@69 21143 if (__Pyx_CyOrPyCFunction_Check(func) && likely( __Pyx_CyOrPyCFunction_GET_FLAGS(func) & METH_O))
jpayne@69 21144 return __Pyx_PyObject_CallMethO(func, args[0]);
jpayne@69 21145 }
jpayne@69 21146 #endif
jpayne@69 21147 #if PY_VERSION_HEX < 0x030800B1
jpayne@69 21148 #if CYTHON_FAST_PYCCALL
jpayne@69 21149 if (PyCFunction_Check(func)) {
jpayne@69 21150 if (kwargs) {
jpayne@69 21151 return _PyCFunction_FastCallDict(func, args, nargs, kwargs);
jpayne@69 21152 } else {
jpayne@69 21153 return _PyCFunction_FastCallKeywords(func, args, nargs, NULL);
jpayne@69 21154 }
jpayne@69 21155 }
jpayne@69 21156 #if PY_VERSION_HEX >= 0x030700A1
jpayne@69 21157 if (!kwargs && __Pyx_IS_TYPE(func, &PyMethodDescr_Type)) {
jpayne@69 21158 return _PyMethodDescr_FastCallKeywords(func, args, nargs, NULL);
jpayne@69 21159 }
jpayne@69 21160 #endif
jpayne@69 21161 #endif
jpayne@69 21162 #if CYTHON_FAST_PYCALL
jpayne@69 21163 if (PyFunction_Check(func)) {
jpayne@69 21164 return __Pyx_PyFunction_FastCallDict(func, args, nargs, kwargs);
jpayne@69 21165 }
jpayne@69 21166 #endif
jpayne@69 21167 #endif
jpayne@69 21168 if (kwargs == NULL) {
jpayne@69 21169 #if CYTHON_VECTORCALL
jpayne@69 21170 #if PY_VERSION_HEX < 0x03090000
jpayne@69 21171 vectorcallfunc f = _PyVectorcall_Function(func);
jpayne@69 21172 #else
jpayne@69 21173 vectorcallfunc f = PyVectorcall_Function(func);
jpayne@69 21174 #endif
jpayne@69 21175 if (f) {
jpayne@69 21176 return f(func, args, (size_t)nargs, NULL);
jpayne@69 21177 }
jpayne@69 21178 #elif defined(__Pyx_CyFunction_USED) && CYTHON_BACKPORT_VECTORCALL
jpayne@69 21179 if (__Pyx_CyFunction_CheckExact(func)) {
jpayne@69 21180 __pyx_vectorcallfunc f = __Pyx_CyFunction_func_vectorcall(func);
jpayne@69 21181 if (f) return f(func, args, (size_t)nargs, NULL);
jpayne@69 21182 }
jpayne@69 21183 #endif
jpayne@69 21184 }
jpayne@69 21185 if (nargs == 0) {
jpayne@69 21186 return __Pyx_PyObject_Call(func, __pyx_empty_tuple, kwargs);
jpayne@69 21187 }
jpayne@69 21188 #if PY_VERSION_HEX >= 0x03090000 && !CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 21189 return PyObject_VectorcallDict(func, args, (size_t)nargs, kwargs);
jpayne@69 21190 #else
jpayne@69 21191 return __Pyx_PyObject_FastCall_fallback(func, args, (size_t)nargs, kwargs);
jpayne@69 21192 #endif
jpayne@69 21193 }
jpayne@69 21194
jpayne@69 21195 /* PyDictVersioning */
jpayne@69 21196 #if CYTHON_USE_DICT_VERSIONS && CYTHON_USE_TYPE_SLOTS
jpayne@69 21197 static CYTHON_INLINE PY_UINT64_T __Pyx_get_tp_dict_version(PyObject *obj) {
jpayne@69 21198 PyObject *dict = Py_TYPE(obj)->tp_dict;
jpayne@69 21199 return likely(dict) ? __PYX_GET_DICT_VERSION(dict) : 0;
jpayne@69 21200 }
jpayne@69 21201 static CYTHON_INLINE PY_UINT64_T __Pyx_get_object_dict_version(PyObject *obj) {
jpayne@69 21202 PyObject **dictptr = NULL;
jpayne@69 21203 Py_ssize_t offset = Py_TYPE(obj)->tp_dictoffset;
jpayne@69 21204 if (offset) {
jpayne@69 21205 #if CYTHON_COMPILING_IN_CPYTHON
jpayne@69 21206 dictptr = (likely(offset > 0)) ? (PyObject **) ((char *)obj + offset) : _PyObject_GetDictPtr(obj);
jpayne@69 21207 #else
jpayne@69 21208 dictptr = _PyObject_GetDictPtr(obj);
jpayne@69 21209 #endif
jpayne@69 21210 }
jpayne@69 21211 return (dictptr && *dictptr) ? __PYX_GET_DICT_VERSION(*dictptr) : 0;
jpayne@69 21212 }
jpayne@69 21213 static CYTHON_INLINE int __Pyx_object_dict_version_matches(PyObject* obj, PY_UINT64_T tp_dict_version, PY_UINT64_T obj_dict_version) {
jpayne@69 21214 PyObject *dict = Py_TYPE(obj)->tp_dict;
jpayne@69 21215 if (unlikely(!dict) || unlikely(tp_dict_version != __PYX_GET_DICT_VERSION(dict)))
jpayne@69 21216 return 0;
jpayne@69 21217 return obj_dict_version == __Pyx_get_object_dict_version(obj);
jpayne@69 21218 }
jpayne@69 21219 #endif
jpayne@69 21220
jpayne@69 21221 /* GetModuleGlobalName */
jpayne@69 21222 #if CYTHON_USE_DICT_VERSIONS
jpayne@69 21223 static PyObject *__Pyx__GetModuleGlobalName(PyObject *name, PY_UINT64_T *dict_version, PyObject **dict_cached_value)
jpayne@69 21224 #else
jpayne@69 21225 static CYTHON_INLINE PyObject *__Pyx__GetModuleGlobalName(PyObject *name)
jpayne@69 21226 #endif
jpayne@69 21227 {
jpayne@69 21228 PyObject *result;
jpayne@69 21229 #if !CYTHON_AVOID_BORROWED_REFS
jpayne@69 21230 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030500A1 && PY_VERSION_HEX < 0x030d0000
jpayne@69 21231 result = _PyDict_GetItem_KnownHash(__pyx_d, name, ((PyASCIIObject *) name)->hash);
jpayne@69 21232 __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
jpayne@69 21233 if (likely(result)) {
jpayne@69 21234 return __Pyx_NewRef(result);
jpayne@69 21235 } else if (unlikely(PyErr_Occurred())) {
jpayne@69 21236 return NULL;
jpayne@69 21237 }
jpayne@69 21238 #elif CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 21239 if (unlikely(!__pyx_m)) {
jpayne@69 21240 return NULL;
jpayne@69 21241 }
jpayne@69 21242 result = PyObject_GetAttr(__pyx_m, name);
jpayne@69 21243 if (likely(result)) {
jpayne@69 21244 return result;
jpayne@69 21245 }
jpayne@69 21246 #else
jpayne@69 21247 result = PyDict_GetItem(__pyx_d, name);
jpayne@69 21248 __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
jpayne@69 21249 if (likely(result)) {
jpayne@69 21250 return __Pyx_NewRef(result);
jpayne@69 21251 }
jpayne@69 21252 #endif
jpayne@69 21253 #else
jpayne@69 21254 result = PyObject_GetItem(__pyx_d, name);
jpayne@69 21255 __PYX_UPDATE_DICT_CACHE(__pyx_d, result, *dict_cached_value, *dict_version)
jpayne@69 21256 if (likely(result)) {
jpayne@69 21257 return __Pyx_NewRef(result);
jpayne@69 21258 }
jpayne@69 21259 PyErr_Clear();
jpayne@69 21260 #endif
jpayne@69 21261 return __Pyx_GetBuiltinName(name);
jpayne@69 21262 }
jpayne@69 21263
jpayne@69 21264 /* PyObjectCallOneArg */
jpayne@69 21265 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
jpayne@69 21266 PyObject *args[2] = {NULL, arg};
jpayne@69 21267 return __Pyx_PyObject_FastCall(func, args+1, 1 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET);
jpayne@69 21268 }
jpayne@69 21269
jpayne@69 21270 /* PyObjectCall2Args */
jpayne@69 21271 static CYTHON_INLINE PyObject* __Pyx_PyObject_Call2Args(PyObject* function, PyObject* arg1, PyObject* arg2) {
jpayne@69 21272 PyObject *args[3] = {NULL, arg1, arg2};
jpayne@69 21273 return __Pyx_PyObject_FastCall(function, args+1, 2 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET);
jpayne@69 21274 }
jpayne@69 21275
jpayne@69 21276 /* PyObjectGetMethod */
jpayne@69 21277 static int __Pyx_PyObject_GetMethod(PyObject *obj, PyObject *name, PyObject **method) {
jpayne@69 21278 PyObject *attr;
jpayne@69 21279 #if CYTHON_UNPACK_METHODS && CYTHON_COMPILING_IN_CPYTHON && CYTHON_USE_PYTYPE_LOOKUP
jpayne@69 21280 __Pyx_TypeName type_name;
jpayne@69 21281 PyTypeObject *tp = Py_TYPE(obj);
jpayne@69 21282 PyObject *descr;
jpayne@69 21283 descrgetfunc f = NULL;
jpayne@69 21284 PyObject **dictptr, *dict;
jpayne@69 21285 int meth_found = 0;
jpayne@69 21286 assert (*method == NULL);
jpayne@69 21287 if (unlikely(tp->tp_getattro != PyObject_GenericGetAttr)) {
jpayne@69 21288 attr = __Pyx_PyObject_GetAttrStr(obj, name);
jpayne@69 21289 goto try_unpack;
jpayne@69 21290 }
jpayne@69 21291 if (unlikely(tp->tp_dict == NULL) && unlikely(PyType_Ready(tp) < 0)) {
jpayne@69 21292 return 0;
jpayne@69 21293 }
jpayne@69 21294 descr = _PyType_Lookup(tp, name);
jpayne@69 21295 if (likely(descr != NULL)) {
jpayne@69 21296 Py_INCREF(descr);
jpayne@69 21297 #if defined(Py_TPFLAGS_METHOD_DESCRIPTOR) && Py_TPFLAGS_METHOD_DESCRIPTOR
jpayne@69 21298 if (__Pyx_PyType_HasFeature(Py_TYPE(descr), Py_TPFLAGS_METHOD_DESCRIPTOR))
jpayne@69 21299 #elif PY_MAJOR_VERSION >= 3
jpayne@69 21300 #ifdef __Pyx_CyFunction_USED
jpayne@69 21301 if (likely(PyFunction_Check(descr) || __Pyx_IS_TYPE(descr, &PyMethodDescr_Type) || __Pyx_CyFunction_Check(descr)))
jpayne@69 21302 #else
jpayne@69 21303 if (likely(PyFunction_Check(descr) || __Pyx_IS_TYPE(descr, &PyMethodDescr_Type)))
jpayne@69 21304 #endif
jpayne@69 21305 #else
jpayne@69 21306 #ifdef __Pyx_CyFunction_USED
jpayne@69 21307 if (likely(PyFunction_Check(descr) || __Pyx_CyFunction_Check(descr)))
jpayne@69 21308 #else
jpayne@69 21309 if (likely(PyFunction_Check(descr)))
jpayne@69 21310 #endif
jpayne@69 21311 #endif
jpayne@69 21312 {
jpayne@69 21313 meth_found = 1;
jpayne@69 21314 } else {
jpayne@69 21315 f = Py_TYPE(descr)->tp_descr_get;
jpayne@69 21316 if (f != NULL && PyDescr_IsData(descr)) {
jpayne@69 21317 attr = f(descr, obj, (PyObject *)Py_TYPE(obj));
jpayne@69 21318 Py_DECREF(descr);
jpayne@69 21319 goto try_unpack;
jpayne@69 21320 }
jpayne@69 21321 }
jpayne@69 21322 }
jpayne@69 21323 dictptr = _PyObject_GetDictPtr(obj);
jpayne@69 21324 if (dictptr != NULL && (dict = *dictptr) != NULL) {
jpayne@69 21325 Py_INCREF(dict);
jpayne@69 21326 attr = __Pyx_PyDict_GetItemStr(dict, name);
jpayne@69 21327 if (attr != NULL) {
jpayne@69 21328 Py_INCREF(attr);
jpayne@69 21329 Py_DECREF(dict);
jpayne@69 21330 Py_XDECREF(descr);
jpayne@69 21331 goto try_unpack;
jpayne@69 21332 }
jpayne@69 21333 Py_DECREF(dict);
jpayne@69 21334 }
jpayne@69 21335 if (meth_found) {
jpayne@69 21336 *method = descr;
jpayne@69 21337 return 1;
jpayne@69 21338 }
jpayne@69 21339 if (f != NULL) {
jpayne@69 21340 attr = f(descr, obj, (PyObject *)Py_TYPE(obj));
jpayne@69 21341 Py_DECREF(descr);
jpayne@69 21342 goto try_unpack;
jpayne@69 21343 }
jpayne@69 21344 if (likely(descr != NULL)) {
jpayne@69 21345 *method = descr;
jpayne@69 21346 return 0;
jpayne@69 21347 }
jpayne@69 21348 type_name = __Pyx_PyType_GetName(tp);
jpayne@69 21349 PyErr_Format(PyExc_AttributeError,
jpayne@69 21350 #if PY_MAJOR_VERSION >= 3
jpayne@69 21351 "'" __Pyx_FMT_TYPENAME "' object has no attribute '%U'",
jpayne@69 21352 type_name, name);
jpayne@69 21353 #else
jpayne@69 21354 "'" __Pyx_FMT_TYPENAME "' object has no attribute '%.400s'",
jpayne@69 21355 type_name, PyString_AS_STRING(name));
jpayne@69 21356 #endif
jpayne@69 21357 __Pyx_DECREF_TypeName(type_name);
jpayne@69 21358 return 0;
jpayne@69 21359 #else
jpayne@69 21360 attr = __Pyx_PyObject_GetAttrStr(obj, name);
jpayne@69 21361 goto try_unpack;
jpayne@69 21362 #endif
jpayne@69 21363 try_unpack:
jpayne@69 21364 #if CYTHON_UNPACK_METHODS
jpayne@69 21365 if (likely(attr) && PyMethod_Check(attr) && likely(PyMethod_GET_SELF(attr) == obj)) {
jpayne@69 21366 PyObject *function = PyMethod_GET_FUNCTION(attr);
jpayne@69 21367 Py_INCREF(function);
jpayne@69 21368 Py_DECREF(attr);
jpayne@69 21369 *method = function;
jpayne@69 21370 return 1;
jpayne@69 21371 }
jpayne@69 21372 #endif
jpayne@69 21373 *method = attr;
jpayne@69 21374 return 0;
jpayne@69 21375 }
jpayne@69 21376
jpayne@69 21377 /* PyObjectCallMethod1 */
jpayne@69 21378 #if !(CYTHON_VECTORCALL && __PYX_LIMITED_VERSION_HEX >= 0x030C00A2)
jpayne@69 21379 static PyObject* __Pyx__PyObject_CallMethod1(PyObject* method, PyObject* arg) {
jpayne@69 21380 PyObject *result = __Pyx_PyObject_CallOneArg(method, arg);
jpayne@69 21381 Py_DECREF(method);
jpayne@69 21382 return result;
jpayne@69 21383 }
jpayne@69 21384 #endif
jpayne@69 21385 static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg) {
jpayne@69 21386 #if CYTHON_VECTORCALL && __PYX_LIMITED_VERSION_HEX >= 0x030C00A2
jpayne@69 21387 PyObject *args[2] = {obj, arg};
jpayne@69 21388 (void) __Pyx_PyObject_GetMethod;
jpayne@69 21389 (void) __Pyx_PyObject_CallOneArg;
jpayne@69 21390 (void) __Pyx_PyObject_Call2Args;
jpayne@69 21391 return PyObject_VectorcallMethod(method_name, args, 2 | PY_VECTORCALL_ARGUMENTS_OFFSET, NULL);
jpayne@69 21392 #else
jpayne@69 21393 PyObject *method = NULL, *result;
jpayne@69 21394 int is_method = __Pyx_PyObject_GetMethod(obj, method_name, &method);
jpayne@69 21395 if (likely(is_method)) {
jpayne@69 21396 result = __Pyx_PyObject_Call2Args(method, obj, arg);
jpayne@69 21397 Py_DECREF(method);
jpayne@69 21398 return result;
jpayne@69 21399 }
jpayne@69 21400 if (unlikely(!method)) return NULL;
jpayne@69 21401 return __Pyx__PyObject_CallMethod1(method, arg);
jpayne@69 21402 #endif
jpayne@69 21403 }
jpayne@69 21404
jpayne@69 21405 /* append */
jpayne@69 21406 static CYTHON_INLINE int __Pyx_PyObject_Append(PyObject* L, PyObject* x) {
jpayne@69 21407 if (likely(PyList_CheckExact(L))) {
jpayne@69 21408 if (unlikely(__Pyx_PyList_Append(L, x) < 0)) return -1;
jpayne@69 21409 } else {
jpayne@69 21410 PyObject* retval = __Pyx_PyObject_CallMethod1(L, __pyx_n_s_append, x);
jpayne@69 21411 if (unlikely(!retval))
jpayne@69 21412 return -1;
jpayne@69 21413 Py_DECREF(retval);
jpayne@69 21414 }
jpayne@69 21415 return 0;
jpayne@69 21416 }
jpayne@69 21417
jpayne@69 21418 /* WriteUnraisableException */
jpayne@69 21419 static void __Pyx_WriteUnraisable(const char *name, int clineno,
jpayne@69 21420 int lineno, const char *filename,
jpayne@69 21421 int full_traceback, int nogil) {
jpayne@69 21422 PyObject *old_exc, *old_val, *old_tb;
jpayne@69 21423 PyObject *ctx;
jpayne@69 21424 __Pyx_PyThreadState_declare
jpayne@69 21425 #ifdef WITH_THREAD
jpayne@69 21426 PyGILState_STATE state;
jpayne@69 21427 if (nogil)
jpayne@69 21428 state = PyGILState_Ensure();
jpayne@69 21429 else state = (PyGILState_STATE)0;
jpayne@69 21430 #endif
jpayne@69 21431 CYTHON_UNUSED_VAR(clineno);
jpayne@69 21432 CYTHON_UNUSED_VAR(lineno);
jpayne@69 21433 CYTHON_UNUSED_VAR(filename);
jpayne@69 21434 CYTHON_MAYBE_UNUSED_VAR(nogil);
jpayne@69 21435 __Pyx_PyThreadState_assign
jpayne@69 21436 __Pyx_ErrFetch(&old_exc, &old_val, &old_tb);
jpayne@69 21437 if (full_traceback) {
jpayne@69 21438 Py_XINCREF(old_exc);
jpayne@69 21439 Py_XINCREF(old_val);
jpayne@69 21440 Py_XINCREF(old_tb);
jpayne@69 21441 __Pyx_ErrRestore(old_exc, old_val, old_tb);
jpayne@69 21442 PyErr_PrintEx(0);
jpayne@69 21443 }
jpayne@69 21444 #if PY_MAJOR_VERSION < 3
jpayne@69 21445 ctx = PyString_FromString(name);
jpayne@69 21446 #else
jpayne@69 21447 ctx = PyUnicode_FromString(name);
jpayne@69 21448 #endif
jpayne@69 21449 __Pyx_ErrRestore(old_exc, old_val, old_tb);
jpayne@69 21450 if (!ctx) {
jpayne@69 21451 PyErr_WriteUnraisable(Py_None);
jpayne@69 21452 } else {
jpayne@69 21453 PyErr_WriteUnraisable(ctx);
jpayne@69 21454 Py_DECREF(ctx);
jpayne@69 21455 }
jpayne@69 21456 #ifdef WITH_THREAD
jpayne@69 21457 if (nogil)
jpayne@69 21458 PyGILState_Release(state);
jpayne@69 21459 #endif
jpayne@69 21460 }
jpayne@69 21461
jpayne@69 21462 /* RaiseTooManyValuesToUnpack */
jpayne@69 21463 static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) {
jpayne@69 21464 PyErr_Format(PyExc_ValueError,
jpayne@69 21465 "too many values to unpack (expected %" CYTHON_FORMAT_SSIZE_T "d)", expected);
jpayne@69 21466 }
jpayne@69 21467
jpayne@69 21468 /* RaiseNeedMoreValuesToUnpack */
jpayne@69 21469 static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) {
jpayne@69 21470 PyErr_Format(PyExc_ValueError,
jpayne@69 21471 "need more than %" CYTHON_FORMAT_SSIZE_T "d value%.1s to unpack",
jpayne@69 21472 index, (index == 1) ? "" : "s");
jpayne@69 21473 }
jpayne@69 21474
jpayne@69 21475 /* IterFinish */
jpayne@69 21476 static CYTHON_INLINE int __Pyx_IterFinish(void) {
jpayne@69 21477 PyObject* exc_type;
jpayne@69 21478 __Pyx_PyThreadState_declare
jpayne@69 21479 __Pyx_PyThreadState_assign
jpayne@69 21480 exc_type = __Pyx_PyErr_CurrentExceptionType();
jpayne@69 21481 if (unlikely(exc_type)) {
jpayne@69 21482 if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration)))
jpayne@69 21483 return -1;
jpayne@69 21484 __Pyx_PyErr_Clear();
jpayne@69 21485 return 0;
jpayne@69 21486 }
jpayne@69 21487 return 0;
jpayne@69 21488 }
jpayne@69 21489
jpayne@69 21490 /* UnpackItemEndCheck */
jpayne@69 21491 static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected) {
jpayne@69 21492 if (unlikely(retval)) {
jpayne@69 21493 Py_DECREF(retval);
jpayne@69 21494 __Pyx_RaiseTooManyValuesError(expected);
jpayne@69 21495 return -1;
jpayne@69 21496 }
jpayne@69 21497 return __Pyx_IterFinish();
jpayne@69 21498 }
jpayne@69 21499
jpayne@69 21500 /* GetException */
jpayne@69 21501 #if CYTHON_FAST_THREAD_STATE
jpayne@69 21502 static int __Pyx__GetException(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb)
jpayne@69 21503 #else
jpayne@69 21504 static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb)
jpayne@69 21505 #endif
jpayne@69 21506 {
jpayne@69 21507 PyObject *local_type = NULL, *local_value, *local_tb = NULL;
jpayne@69 21508 #if CYTHON_FAST_THREAD_STATE
jpayne@69 21509 PyObject *tmp_type, *tmp_value, *tmp_tb;
jpayne@69 21510 #if PY_VERSION_HEX >= 0x030C00A6
jpayne@69 21511 local_value = tstate->current_exception;
jpayne@69 21512 tstate->current_exception = 0;
jpayne@69 21513 if (likely(local_value)) {
jpayne@69 21514 local_type = (PyObject*) Py_TYPE(local_value);
jpayne@69 21515 Py_INCREF(local_type);
jpayne@69 21516 local_tb = PyException_GetTraceback(local_value);
jpayne@69 21517 }
jpayne@69 21518 #else
jpayne@69 21519 local_type = tstate->curexc_type;
jpayne@69 21520 local_value = tstate->curexc_value;
jpayne@69 21521 local_tb = tstate->curexc_traceback;
jpayne@69 21522 tstate->curexc_type = 0;
jpayne@69 21523 tstate->curexc_value = 0;
jpayne@69 21524 tstate->curexc_traceback = 0;
jpayne@69 21525 #endif
jpayne@69 21526 #else
jpayne@69 21527 PyErr_Fetch(&local_type, &local_value, &local_tb);
jpayne@69 21528 #endif
jpayne@69 21529 PyErr_NormalizeException(&local_type, &local_value, &local_tb);
jpayne@69 21530 #if CYTHON_FAST_THREAD_STATE && PY_VERSION_HEX >= 0x030C00A6
jpayne@69 21531 if (unlikely(tstate->current_exception))
jpayne@69 21532 #elif CYTHON_FAST_THREAD_STATE
jpayne@69 21533 if (unlikely(tstate->curexc_type))
jpayne@69 21534 #else
jpayne@69 21535 if (unlikely(PyErr_Occurred()))
jpayne@69 21536 #endif
jpayne@69 21537 goto bad;
jpayne@69 21538 #if PY_MAJOR_VERSION >= 3
jpayne@69 21539 if (local_tb) {
jpayne@69 21540 if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0))
jpayne@69 21541 goto bad;
jpayne@69 21542 }
jpayne@69 21543 #endif
jpayne@69 21544 Py_XINCREF(local_tb);
jpayne@69 21545 Py_XINCREF(local_type);
jpayne@69 21546 Py_XINCREF(local_value);
jpayne@69 21547 *type = local_type;
jpayne@69 21548 *value = local_value;
jpayne@69 21549 *tb = local_tb;
jpayne@69 21550 #if CYTHON_FAST_THREAD_STATE
jpayne@69 21551 #if CYTHON_USE_EXC_INFO_STACK
jpayne@69 21552 {
jpayne@69 21553 _PyErr_StackItem *exc_info = tstate->exc_info;
jpayne@69 21554 #if PY_VERSION_HEX >= 0x030B00a4
jpayne@69 21555 tmp_value = exc_info->exc_value;
jpayne@69 21556 exc_info->exc_value = local_value;
jpayne@69 21557 tmp_type = NULL;
jpayne@69 21558 tmp_tb = NULL;
jpayne@69 21559 Py_XDECREF(local_type);
jpayne@69 21560 Py_XDECREF(local_tb);
jpayne@69 21561 #else
jpayne@69 21562 tmp_type = exc_info->exc_type;
jpayne@69 21563 tmp_value = exc_info->exc_value;
jpayne@69 21564 tmp_tb = exc_info->exc_traceback;
jpayne@69 21565 exc_info->exc_type = local_type;
jpayne@69 21566 exc_info->exc_value = local_value;
jpayne@69 21567 exc_info->exc_traceback = local_tb;
jpayne@69 21568 #endif
jpayne@69 21569 }
jpayne@69 21570 #else
jpayne@69 21571 tmp_type = tstate->exc_type;
jpayne@69 21572 tmp_value = tstate->exc_value;
jpayne@69 21573 tmp_tb = tstate->exc_traceback;
jpayne@69 21574 tstate->exc_type = local_type;
jpayne@69 21575 tstate->exc_value = local_value;
jpayne@69 21576 tstate->exc_traceback = local_tb;
jpayne@69 21577 #endif
jpayne@69 21578 Py_XDECREF(tmp_type);
jpayne@69 21579 Py_XDECREF(tmp_value);
jpayne@69 21580 Py_XDECREF(tmp_tb);
jpayne@69 21581 #else
jpayne@69 21582 PyErr_SetExcInfo(local_type, local_value, local_tb);
jpayne@69 21583 #endif
jpayne@69 21584 return 0;
jpayne@69 21585 bad:
jpayne@69 21586 *type = 0;
jpayne@69 21587 *value = 0;
jpayne@69 21588 *tb = 0;
jpayne@69 21589 Py_XDECREF(local_type);
jpayne@69 21590 Py_XDECREF(local_value);
jpayne@69 21591 Py_XDECREF(local_tb);
jpayne@69 21592 return -1;
jpayne@69 21593 }
jpayne@69 21594
jpayne@69 21595 /* SwapException */
jpayne@69 21596 #if CYTHON_FAST_THREAD_STATE
jpayne@69 21597 static CYTHON_INLINE void __Pyx__ExceptionSwap(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
jpayne@69 21598 PyObject *tmp_type, *tmp_value, *tmp_tb;
jpayne@69 21599 #if CYTHON_USE_EXC_INFO_STACK && PY_VERSION_HEX >= 0x030B00a4
jpayne@69 21600 _PyErr_StackItem *exc_info = tstate->exc_info;
jpayne@69 21601 tmp_value = exc_info->exc_value;
jpayne@69 21602 exc_info->exc_value = *value;
jpayne@69 21603 if (tmp_value == NULL || tmp_value == Py_None) {
jpayne@69 21604 Py_XDECREF(tmp_value);
jpayne@69 21605 tmp_value = NULL;
jpayne@69 21606 tmp_type = NULL;
jpayne@69 21607 tmp_tb = NULL;
jpayne@69 21608 } else {
jpayne@69 21609 tmp_type = (PyObject*) Py_TYPE(tmp_value);
jpayne@69 21610 Py_INCREF(tmp_type);
jpayne@69 21611 #if CYTHON_COMPILING_IN_CPYTHON
jpayne@69 21612 tmp_tb = ((PyBaseExceptionObject*) tmp_value)->traceback;
jpayne@69 21613 Py_XINCREF(tmp_tb);
jpayne@69 21614 #else
jpayne@69 21615 tmp_tb = PyException_GetTraceback(tmp_value);
jpayne@69 21616 #endif
jpayne@69 21617 }
jpayne@69 21618 #elif CYTHON_USE_EXC_INFO_STACK
jpayne@69 21619 _PyErr_StackItem *exc_info = tstate->exc_info;
jpayne@69 21620 tmp_type = exc_info->exc_type;
jpayne@69 21621 tmp_value = exc_info->exc_value;
jpayne@69 21622 tmp_tb = exc_info->exc_traceback;
jpayne@69 21623 exc_info->exc_type = *type;
jpayne@69 21624 exc_info->exc_value = *value;
jpayne@69 21625 exc_info->exc_traceback = *tb;
jpayne@69 21626 #else
jpayne@69 21627 tmp_type = tstate->exc_type;
jpayne@69 21628 tmp_value = tstate->exc_value;
jpayne@69 21629 tmp_tb = tstate->exc_traceback;
jpayne@69 21630 tstate->exc_type = *type;
jpayne@69 21631 tstate->exc_value = *value;
jpayne@69 21632 tstate->exc_traceback = *tb;
jpayne@69 21633 #endif
jpayne@69 21634 *type = tmp_type;
jpayne@69 21635 *value = tmp_value;
jpayne@69 21636 *tb = tmp_tb;
jpayne@69 21637 }
jpayne@69 21638 #else
jpayne@69 21639 static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb) {
jpayne@69 21640 PyObject *tmp_type, *tmp_value, *tmp_tb;
jpayne@69 21641 PyErr_GetExcInfo(&tmp_type, &tmp_value, &tmp_tb);
jpayne@69 21642 PyErr_SetExcInfo(*type, *value, *tb);
jpayne@69 21643 *type = tmp_type;
jpayne@69 21644 *value = tmp_value;
jpayne@69 21645 *tb = tmp_tb;
jpayne@69 21646 }
jpayne@69 21647 #endif
jpayne@69 21648
jpayne@69 21649 /* GetTopmostException */
jpayne@69 21650 #if CYTHON_USE_EXC_INFO_STACK && CYTHON_FAST_THREAD_STATE
jpayne@69 21651 static _PyErr_StackItem *
jpayne@69 21652 __Pyx_PyErr_GetTopmostException(PyThreadState *tstate)
jpayne@69 21653 {
jpayne@69 21654 _PyErr_StackItem *exc_info = tstate->exc_info;
jpayne@69 21655 while ((exc_info->exc_value == NULL || exc_info->exc_value == Py_None) &&
jpayne@69 21656 exc_info->previous_item != NULL)
jpayne@69 21657 {
jpayne@69 21658 exc_info = exc_info->previous_item;
jpayne@69 21659 }
jpayne@69 21660 return exc_info;
jpayne@69 21661 }
jpayne@69 21662 #endif
jpayne@69 21663
jpayne@69 21664 /* SaveResetException */
jpayne@69 21665 #if CYTHON_FAST_THREAD_STATE
jpayne@69 21666 static CYTHON_INLINE void __Pyx__ExceptionSave(PyThreadState *tstate, PyObject **type, PyObject **value, PyObject **tb) {
jpayne@69 21667 #if CYTHON_USE_EXC_INFO_STACK && PY_VERSION_HEX >= 0x030B00a4
jpayne@69 21668 _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate);
jpayne@69 21669 PyObject *exc_value = exc_info->exc_value;
jpayne@69 21670 if (exc_value == NULL || exc_value == Py_None) {
jpayne@69 21671 *value = NULL;
jpayne@69 21672 *type = NULL;
jpayne@69 21673 *tb = NULL;
jpayne@69 21674 } else {
jpayne@69 21675 *value = exc_value;
jpayne@69 21676 Py_INCREF(*value);
jpayne@69 21677 *type = (PyObject*) Py_TYPE(exc_value);
jpayne@69 21678 Py_INCREF(*type);
jpayne@69 21679 *tb = PyException_GetTraceback(exc_value);
jpayne@69 21680 }
jpayne@69 21681 #elif CYTHON_USE_EXC_INFO_STACK
jpayne@69 21682 _PyErr_StackItem *exc_info = __Pyx_PyErr_GetTopmostException(tstate);
jpayne@69 21683 *type = exc_info->exc_type;
jpayne@69 21684 *value = exc_info->exc_value;
jpayne@69 21685 *tb = exc_info->exc_traceback;
jpayne@69 21686 Py_XINCREF(*type);
jpayne@69 21687 Py_XINCREF(*value);
jpayne@69 21688 Py_XINCREF(*tb);
jpayne@69 21689 #else
jpayne@69 21690 *type = tstate->exc_type;
jpayne@69 21691 *value = tstate->exc_value;
jpayne@69 21692 *tb = tstate->exc_traceback;
jpayne@69 21693 Py_XINCREF(*type);
jpayne@69 21694 Py_XINCREF(*value);
jpayne@69 21695 Py_XINCREF(*tb);
jpayne@69 21696 #endif
jpayne@69 21697 }
jpayne@69 21698 static CYTHON_INLINE void __Pyx__ExceptionReset(PyThreadState *tstate, PyObject *type, PyObject *value, PyObject *tb) {
jpayne@69 21699 #if CYTHON_USE_EXC_INFO_STACK && PY_VERSION_HEX >= 0x030B00a4
jpayne@69 21700 _PyErr_StackItem *exc_info = tstate->exc_info;
jpayne@69 21701 PyObject *tmp_value = exc_info->exc_value;
jpayne@69 21702 exc_info->exc_value = value;
jpayne@69 21703 Py_XDECREF(tmp_value);
jpayne@69 21704 Py_XDECREF(type);
jpayne@69 21705 Py_XDECREF(tb);
jpayne@69 21706 #else
jpayne@69 21707 PyObject *tmp_type, *tmp_value, *tmp_tb;
jpayne@69 21708 #if CYTHON_USE_EXC_INFO_STACK
jpayne@69 21709 _PyErr_StackItem *exc_info = tstate->exc_info;
jpayne@69 21710 tmp_type = exc_info->exc_type;
jpayne@69 21711 tmp_value = exc_info->exc_value;
jpayne@69 21712 tmp_tb = exc_info->exc_traceback;
jpayne@69 21713 exc_info->exc_type = type;
jpayne@69 21714 exc_info->exc_value = value;
jpayne@69 21715 exc_info->exc_traceback = tb;
jpayne@69 21716 #else
jpayne@69 21717 tmp_type = tstate->exc_type;
jpayne@69 21718 tmp_value = tstate->exc_value;
jpayne@69 21719 tmp_tb = tstate->exc_traceback;
jpayne@69 21720 tstate->exc_type = type;
jpayne@69 21721 tstate->exc_value = value;
jpayne@69 21722 tstate->exc_traceback = tb;
jpayne@69 21723 #endif
jpayne@69 21724 Py_XDECREF(tmp_type);
jpayne@69 21725 Py_XDECREF(tmp_value);
jpayne@69 21726 Py_XDECREF(tmp_tb);
jpayne@69 21727 #endif
jpayne@69 21728 }
jpayne@69 21729 #endif
jpayne@69 21730
jpayne@69 21731 /* GetItemInt */
jpayne@69 21732 static PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) {
jpayne@69 21733 PyObject *r;
jpayne@69 21734 if (unlikely(!j)) return NULL;
jpayne@69 21735 r = PyObject_GetItem(o, j);
jpayne@69 21736 Py_DECREF(j);
jpayne@69 21737 return r;
jpayne@69 21738 }
jpayne@69 21739 static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
jpayne@69 21740 CYTHON_NCP_UNUSED int wraparound,
jpayne@69 21741 CYTHON_NCP_UNUSED int boundscheck) {
jpayne@69 21742 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
jpayne@69 21743 Py_ssize_t wrapped_i = i;
jpayne@69 21744 if (wraparound & unlikely(i < 0)) {
jpayne@69 21745 wrapped_i += PyList_GET_SIZE(o);
jpayne@69 21746 }
jpayne@69 21747 if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyList_GET_SIZE(o)))) {
jpayne@69 21748 PyObject *r = PyList_GET_ITEM(o, wrapped_i);
jpayne@69 21749 Py_INCREF(r);
jpayne@69 21750 return r;
jpayne@69 21751 }
jpayne@69 21752 return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
jpayne@69 21753 #else
jpayne@69 21754 return PySequence_GetItem(o, i);
jpayne@69 21755 #endif
jpayne@69 21756 }
jpayne@69 21757 static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
jpayne@69 21758 CYTHON_NCP_UNUSED int wraparound,
jpayne@69 21759 CYTHON_NCP_UNUSED int boundscheck) {
jpayne@69 21760 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
jpayne@69 21761 Py_ssize_t wrapped_i = i;
jpayne@69 21762 if (wraparound & unlikely(i < 0)) {
jpayne@69 21763 wrapped_i += PyTuple_GET_SIZE(o);
jpayne@69 21764 }
jpayne@69 21765 if ((!boundscheck) || likely(__Pyx_is_valid_index(wrapped_i, PyTuple_GET_SIZE(o)))) {
jpayne@69 21766 PyObject *r = PyTuple_GET_ITEM(o, wrapped_i);
jpayne@69 21767 Py_INCREF(r);
jpayne@69 21768 return r;
jpayne@69 21769 }
jpayne@69 21770 return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
jpayne@69 21771 #else
jpayne@69 21772 return PySequence_GetItem(o, i);
jpayne@69 21773 #endif
jpayne@69 21774 }
jpayne@69 21775 static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list,
jpayne@69 21776 CYTHON_NCP_UNUSED int wraparound,
jpayne@69 21777 CYTHON_NCP_UNUSED int boundscheck) {
jpayne@69 21778 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS && CYTHON_USE_TYPE_SLOTS
jpayne@69 21779 if (is_list || PyList_CheckExact(o)) {
jpayne@69 21780 Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyList_GET_SIZE(o);
jpayne@69 21781 if ((!boundscheck) || (likely(__Pyx_is_valid_index(n, PyList_GET_SIZE(o))))) {
jpayne@69 21782 PyObject *r = PyList_GET_ITEM(o, n);
jpayne@69 21783 Py_INCREF(r);
jpayne@69 21784 return r;
jpayne@69 21785 }
jpayne@69 21786 }
jpayne@69 21787 else if (PyTuple_CheckExact(o)) {
jpayne@69 21788 Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o);
jpayne@69 21789 if ((!boundscheck) || likely(__Pyx_is_valid_index(n, PyTuple_GET_SIZE(o)))) {
jpayne@69 21790 PyObject *r = PyTuple_GET_ITEM(o, n);
jpayne@69 21791 Py_INCREF(r);
jpayne@69 21792 return r;
jpayne@69 21793 }
jpayne@69 21794 } else {
jpayne@69 21795 PyMappingMethods *mm = Py_TYPE(o)->tp_as_mapping;
jpayne@69 21796 PySequenceMethods *sm = Py_TYPE(o)->tp_as_sequence;
jpayne@69 21797 if (mm && mm->mp_subscript) {
jpayne@69 21798 PyObject *r, *key = PyInt_FromSsize_t(i);
jpayne@69 21799 if (unlikely(!key)) return NULL;
jpayne@69 21800 r = mm->mp_subscript(o, key);
jpayne@69 21801 Py_DECREF(key);
jpayne@69 21802 return r;
jpayne@69 21803 }
jpayne@69 21804 if (likely(sm && sm->sq_item)) {
jpayne@69 21805 if (wraparound && unlikely(i < 0) && likely(sm->sq_length)) {
jpayne@69 21806 Py_ssize_t l = sm->sq_length(o);
jpayne@69 21807 if (likely(l >= 0)) {
jpayne@69 21808 i += l;
jpayne@69 21809 } else {
jpayne@69 21810 if (!PyErr_ExceptionMatches(PyExc_OverflowError))
jpayne@69 21811 return NULL;
jpayne@69 21812 PyErr_Clear();
jpayne@69 21813 }
jpayne@69 21814 }
jpayne@69 21815 return sm->sq_item(o, i);
jpayne@69 21816 }
jpayne@69 21817 }
jpayne@69 21818 #else
jpayne@69 21819 if (is_list || !PyMapping_Check(o)) {
jpayne@69 21820 return PySequence_GetItem(o, i);
jpayne@69 21821 }
jpayne@69 21822 #endif
jpayne@69 21823 return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
jpayne@69 21824 }
jpayne@69 21825
jpayne@69 21826 /* ObjectGetItem */
jpayne@69 21827 #if CYTHON_USE_TYPE_SLOTS
jpayne@69 21828 static PyObject *__Pyx_PyObject_GetIndex(PyObject *obj, PyObject *index) {
jpayne@69 21829 PyObject *runerr = NULL;
jpayne@69 21830 Py_ssize_t key_value;
jpayne@69 21831 key_value = __Pyx_PyIndex_AsSsize_t(index);
jpayne@69 21832 if (likely(key_value != -1 || !(runerr = PyErr_Occurred()))) {
jpayne@69 21833 return __Pyx_GetItemInt_Fast(obj, key_value, 0, 1, 1);
jpayne@69 21834 }
jpayne@69 21835 if (PyErr_GivenExceptionMatches(runerr, PyExc_OverflowError)) {
jpayne@69 21836 __Pyx_TypeName index_type_name = __Pyx_PyType_GetName(Py_TYPE(index));
jpayne@69 21837 PyErr_Clear();
jpayne@69 21838 PyErr_Format(PyExc_IndexError,
jpayne@69 21839 "cannot fit '" __Pyx_FMT_TYPENAME "' into an index-sized integer", index_type_name);
jpayne@69 21840 __Pyx_DECREF_TypeName(index_type_name);
jpayne@69 21841 }
jpayne@69 21842 return NULL;
jpayne@69 21843 }
jpayne@69 21844 static PyObject *__Pyx_PyObject_GetItem_Slow(PyObject *obj, PyObject *key) {
jpayne@69 21845 __Pyx_TypeName obj_type_name;
jpayne@69 21846 if (likely(PyType_Check(obj))) {
jpayne@69 21847 PyObject *meth = __Pyx_PyObject_GetAttrStrNoError(obj, __pyx_n_s_class_getitem);
jpayne@69 21848 if (!meth) {
jpayne@69 21849 PyErr_Clear();
jpayne@69 21850 } else {
jpayne@69 21851 PyObject *result = __Pyx_PyObject_CallOneArg(meth, key);
jpayne@69 21852 Py_DECREF(meth);
jpayne@69 21853 return result;
jpayne@69 21854 }
jpayne@69 21855 }
jpayne@69 21856 obj_type_name = __Pyx_PyType_GetName(Py_TYPE(obj));
jpayne@69 21857 PyErr_Format(PyExc_TypeError,
jpayne@69 21858 "'" __Pyx_FMT_TYPENAME "' object is not subscriptable", obj_type_name);
jpayne@69 21859 __Pyx_DECREF_TypeName(obj_type_name);
jpayne@69 21860 return NULL;
jpayne@69 21861 }
jpayne@69 21862 static PyObject *__Pyx_PyObject_GetItem(PyObject *obj, PyObject *key) {
jpayne@69 21863 PyTypeObject *tp = Py_TYPE(obj);
jpayne@69 21864 PyMappingMethods *mm = tp->tp_as_mapping;
jpayne@69 21865 PySequenceMethods *sm = tp->tp_as_sequence;
jpayne@69 21866 if (likely(mm && mm->mp_subscript)) {
jpayne@69 21867 return mm->mp_subscript(obj, key);
jpayne@69 21868 }
jpayne@69 21869 if (likely(sm && sm->sq_item)) {
jpayne@69 21870 return __Pyx_PyObject_GetIndex(obj, key);
jpayne@69 21871 }
jpayne@69 21872 return __Pyx_PyObject_GetItem_Slow(obj, key);
jpayne@69 21873 }
jpayne@69 21874 #endif
jpayne@69 21875
jpayne@69 21876 /* PyObjectFormatAndDecref */
jpayne@69 21877 static CYTHON_INLINE PyObject* __Pyx_PyObject_FormatSimpleAndDecref(PyObject* s, PyObject* f) {
jpayne@69 21878 if (unlikely(!s)) return NULL;
jpayne@69 21879 if (likely(PyUnicode_CheckExact(s))) return s;
jpayne@69 21880 #if PY_MAJOR_VERSION < 3
jpayne@69 21881 if (likely(PyString_CheckExact(s))) {
jpayne@69 21882 PyObject *result = PyUnicode_FromEncodedObject(s, NULL, "strict");
jpayne@69 21883 Py_DECREF(s);
jpayne@69 21884 return result;
jpayne@69 21885 }
jpayne@69 21886 #endif
jpayne@69 21887 return __Pyx_PyObject_FormatAndDecref(s, f);
jpayne@69 21888 }
jpayne@69 21889 static CYTHON_INLINE PyObject* __Pyx_PyObject_FormatAndDecref(PyObject* s, PyObject* f) {
jpayne@69 21890 PyObject *result;
jpayne@69 21891 if (unlikely(!s)) return NULL;
jpayne@69 21892 result = PyObject_Format(s, f);
jpayne@69 21893 Py_DECREF(s);
jpayne@69 21894 return result;
jpayne@69 21895 }
jpayne@69 21896
jpayne@69 21897 /* JoinPyUnicode */
jpayne@69 21898 static PyObject* __Pyx_PyUnicode_Join(PyObject* value_tuple, Py_ssize_t value_count, Py_ssize_t result_ulength,
jpayne@69 21899 Py_UCS4 max_char) {
jpayne@69 21900 #if CYTHON_USE_UNICODE_INTERNALS && CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
jpayne@69 21901 PyObject *result_uval;
jpayne@69 21902 int result_ukind, kind_shift;
jpayne@69 21903 Py_ssize_t i, char_pos;
jpayne@69 21904 void *result_udata;
jpayne@69 21905 CYTHON_MAYBE_UNUSED_VAR(max_char);
jpayne@69 21906 #if CYTHON_PEP393_ENABLED
jpayne@69 21907 result_uval = PyUnicode_New(result_ulength, max_char);
jpayne@69 21908 if (unlikely(!result_uval)) return NULL;
jpayne@69 21909 result_ukind = (max_char <= 255) ? PyUnicode_1BYTE_KIND : (max_char <= 65535) ? PyUnicode_2BYTE_KIND : PyUnicode_4BYTE_KIND;
jpayne@69 21910 kind_shift = (result_ukind == PyUnicode_4BYTE_KIND) ? 2 : result_ukind - 1;
jpayne@69 21911 result_udata = PyUnicode_DATA(result_uval);
jpayne@69 21912 #else
jpayne@69 21913 result_uval = PyUnicode_FromUnicode(NULL, result_ulength);
jpayne@69 21914 if (unlikely(!result_uval)) return NULL;
jpayne@69 21915 result_ukind = sizeof(Py_UNICODE);
jpayne@69 21916 kind_shift = (result_ukind == 4) ? 2 : result_ukind - 1;
jpayne@69 21917 result_udata = PyUnicode_AS_UNICODE(result_uval);
jpayne@69 21918 #endif
jpayne@69 21919 assert(kind_shift == 2 || kind_shift == 1 || kind_shift == 0);
jpayne@69 21920 char_pos = 0;
jpayne@69 21921 for (i=0; i < value_count; i++) {
jpayne@69 21922 int ukind;
jpayne@69 21923 Py_ssize_t ulength;
jpayne@69 21924 void *udata;
jpayne@69 21925 PyObject *uval = PyTuple_GET_ITEM(value_tuple, i);
jpayne@69 21926 if (unlikely(__Pyx_PyUnicode_READY(uval)))
jpayne@69 21927 goto bad;
jpayne@69 21928 ulength = __Pyx_PyUnicode_GET_LENGTH(uval);
jpayne@69 21929 if (unlikely(!ulength))
jpayne@69 21930 continue;
jpayne@69 21931 if (unlikely((PY_SSIZE_T_MAX >> kind_shift) - ulength < char_pos))
jpayne@69 21932 goto overflow;
jpayne@69 21933 ukind = __Pyx_PyUnicode_KIND(uval);
jpayne@69 21934 udata = __Pyx_PyUnicode_DATA(uval);
jpayne@69 21935 if (!CYTHON_PEP393_ENABLED || ukind == result_ukind) {
jpayne@69 21936 memcpy((char *)result_udata + (char_pos << kind_shift), udata, (size_t) (ulength << kind_shift));
jpayne@69 21937 } else {
jpayne@69 21938 #if PY_VERSION_HEX >= 0x030d0000
jpayne@69 21939 if (unlikely(PyUnicode_CopyCharacters(result_uval, char_pos, uval, 0, ulength) < 0)) goto bad;
jpayne@69 21940 #elif CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030300F0 || defined(_PyUnicode_FastCopyCharacters)
jpayne@69 21941 _PyUnicode_FastCopyCharacters(result_uval, char_pos, uval, 0, ulength);
jpayne@69 21942 #else
jpayne@69 21943 Py_ssize_t j;
jpayne@69 21944 for (j=0; j < ulength; j++) {
jpayne@69 21945 Py_UCS4 uchar = __Pyx_PyUnicode_READ(ukind, udata, j);
jpayne@69 21946 __Pyx_PyUnicode_WRITE(result_ukind, result_udata, char_pos+j, uchar);
jpayne@69 21947 }
jpayne@69 21948 #endif
jpayne@69 21949 }
jpayne@69 21950 char_pos += ulength;
jpayne@69 21951 }
jpayne@69 21952 return result_uval;
jpayne@69 21953 overflow:
jpayne@69 21954 PyErr_SetString(PyExc_OverflowError, "join() result is too long for a Python string");
jpayne@69 21955 bad:
jpayne@69 21956 Py_DECREF(result_uval);
jpayne@69 21957 return NULL;
jpayne@69 21958 #else
jpayne@69 21959 CYTHON_UNUSED_VAR(max_char);
jpayne@69 21960 CYTHON_UNUSED_VAR(result_ulength);
jpayne@69 21961 CYTHON_UNUSED_VAR(value_count);
jpayne@69 21962 return PyUnicode_Join(__pyx_empty_unicode, value_tuple);
jpayne@69 21963 #endif
jpayne@69 21964 }
jpayne@69 21965
jpayne@69 21966 /* ExtTypeTest */
jpayne@69 21967 static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) {
jpayne@69 21968 __Pyx_TypeName obj_type_name;
jpayne@69 21969 __Pyx_TypeName type_name;
jpayne@69 21970 if (unlikely(!type)) {
jpayne@69 21971 PyErr_SetString(PyExc_SystemError, "Missing type object");
jpayne@69 21972 return 0;
jpayne@69 21973 }
jpayne@69 21974 if (likely(__Pyx_TypeCheck(obj, type)))
jpayne@69 21975 return 1;
jpayne@69 21976 obj_type_name = __Pyx_PyType_GetName(Py_TYPE(obj));
jpayne@69 21977 type_name = __Pyx_PyType_GetName(type);
jpayne@69 21978 PyErr_Format(PyExc_TypeError,
jpayne@69 21979 "Cannot convert " __Pyx_FMT_TYPENAME " to " __Pyx_FMT_TYPENAME,
jpayne@69 21980 obj_type_name, type_name);
jpayne@69 21981 __Pyx_DECREF_TypeName(obj_type_name);
jpayne@69 21982 __Pyx_DECREF_TypeName(type_name);
jpayne@69 21983 return 0;
jpayne@69 21984 }
jpayne@69 21985
jpayne@69 21986 /* ArgTypeTest */
jpayne@69 21987 static int __Pyx__ArgTypeTest(PyObject *obj, PyTypeObject *type, const char *name, int exact)
jpayne@69 21988 {
jpayne@69 21989 __Pyx_TypeName type_name;
jpayne@69 21990 __Pyx_TypeName obj_type_name;
jpayne@69 21991 if (unlikely(!type)) {
jpayne@69 21992 PyErr_SetString(PyExc_SystemError, "Missing type object");
jpayne@69 21993 return 0;
jpayne@69 21994 }
jpayne@69 21995 else if (exact) {
jpayne@69 21996 #if PY_MAJOR_VERSION == 2
jpayne@69 21997 if ((type == &PyBaseString_Type) && likely(__Pyx_PyBaseString_CheckExact(obj))) return 1;
jpayne@69 21998 #endif
jpayne@69 21999 }
jpayne@69 22000 else {
jpayne@69 22001 if (likely(__Pyx_TypeCheck(obj, type))) return 1;
jpayne@69 22002 }
jpayne@69 22003 type_name = __Pyx_PyType_GetName(type);
jpayne@69 22004 obj_type_name = __Pyx_PyType_GetName(Py_TYPE(obj));
jpayne@69 22005 PyErr_Format(PyExc_TypeError,
jpayne@69 22006 "Argument '%.200s' has incorrect type (expected " __Pyx_FMT_TYPENAME
jpayne@69 22007 ", got " __Pyx_FMT_TYPENAME ")", name, type_name, obj_type_name);
jpayne@69 22008 __Pyx_DECREF_TypeName(type_name);
jpayne@69 22009 __Pyx_DECREF_TypeName(obj_type_name);
jpayne@69 22010 return 0;
jpayne@69 22011 }
jpayne@69 22012
jpayne@69 22013 /* RaiseUnexpectedTypeError */
jpayne@69 22014 static int
jpayne@69 22015 __Pyx_RaiseUnexpectedTypeError(const char *expected, PyObject *obj)
jpayne@69 22016 {
jpayne@69 22017 __Pyx_TypeName obj_type_name = __Pyx_PyType_GetName(Py_TYPE(obj));
jpayne@69 22018 PyErr_Format(PyExc_TypeError, "Expected %s, got " __Pyx_FMT_TYPENAME,
jpayne@69 22019 expected, obj_type_name);
jpayne@69 22020 __Pyx_DECREF_TypeName(obj_type_name);
jpayne@69 22021 return 0;
jpayne@69 22022 }
jpayne@69 22023
jpayne@69 22024 /* PyUnicode_Unicode */
jpayne@69 22025 static CYTHON_INLINE PyObject* __Pyx_PyUnicode_Unicode(PyObject *obj) {
jpayne@69 22026 if (unlikely(obj == Py_None))
jpayne@69 22027 obj = __pyx_kp_u_None;
jpayne@69 22028 return __Pyx_NewRef(obj);
jpayne@69 22029 }
jpayne@69 22030
jpayne@69 22031 /* GetAttr3 */
jpayne@69 22032 #if __PYX_LIMITED_VERSION_HEX < 0x030d00A1
jpayne@69 22033 static PyObject *__Pyx_GetAttr3Default(PyObject *d) {
jpayne@69 22034 __Pyx_PyThreadState_declare
jpayne@69 22035 __Pyx_PyThreadState_assign
jpayne@69 22036 if (unlikely(!__Pyx_PyErr_ExceptionMatches(PyExc_AttributeError)))
jpayne@69 22037 return NULL;
jpayne@69 22038 __Pyx_PyErr_Clear();
jpayne@69 22039 Py_INCREF(d);
jpayne@69 22040 return d;
jpayne@69 22041 }
jpayne@69 22042 #endif
jpayne@69 22043 static CYTHON_INLINE PyObject *__Pyx_GetAttr3(PyObject *o, PyObject *n, PyObject *d) {
jpayne@69 22044 PyObject *r;
jpayne@69 22045 #if __PYX_LIMITED_VERSION_HEX >= 0x030d00A1
jpayne@69 22046 int res = PyObject_GetOptionalAttr(o, n, &r);
jpayne@69 22047 return (res != 0) ? r : __Pyx_NewRef(d);
jpayne@69 22048 #else
jpayne@69 22049 #if CYTHON_USE_TYPE_SLOTS
jpayne@69 22050 if (likely(PyString_Check(n))) {
jpayne@69 22051 r = __Pyx_PyObject_GetAttrStrNoError(o, n);
jpayne@69 22052 if (unlikely(!r) && likely(!PyErr_Occurred())) {
jpayne@69 22053 r = __Pyx_NewRef(d);
jpayne@69 22054 }
jpayne@69 22055 return r;
jpayne@69 22056 }
jpayne@69 22057 #endif
jpayne@69 22058 r = PyObject_GetAttr(o, n);
jpayne@69 22059 return (likely(r)) ? r : __Pyx_GetAttr3Default(d);
jpayne@69 22060 #endif
jpayne@69 22061 }
jpayne@69 22062
jpayne@69 22063 /* Import */
jpayne@69 22064 static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) {
jpayne@69 22065 PyObject *module = 0;
jpayne@69 22066 PyObject *empty_dict = 0;
jpayne@69 22067 PyObject *empty_list = 0;
jpayne@69 22068 #if PY_MAJOR_VERSION < 3
jpayne@69 22069 PyObject *py_import;
jpayne@69 22070 py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s_import);
jpayne@69 22071 if (unlikely(!py_import))
jpayne@69 22072 goto bad;
jpayne@69 22073 if (!from_list) {
jpayne@69 22074 empty_list = PyList_New(0);
jpayne@69 22075 if (unlikely(!empty_list))
jpayne@69 22076 goto bad;
jpayne@69 22077 from_list = empty_list;
jpayne@69 22078 }
jpayne@69 22079 #endif
jpayne@69 22080 empty_dict = PyDict_New();
jpayne@69 22081 if (unlikely(!empty_dict))
jpayne@69 22082 goto bad;
jpayne@69 22083 {
jpayne@69 22084 #if PY_MAJOR_VERSION >= 3
jpayne@69 22085 if (level == -1) {
jpayne@69 22086 if (strchr(__Pyx_MODULE_NAME, '.') != NULL) {
jpayne@69 22087 module = PyImport_ImportModuleLevelObject(
jpayne@69 22088 name, __pyx_d, empty_dict, from_list, 1);
jpayne@69 22089 if (unlikely(!module)) {
jpayne@69 22090 if (unlikely(!PyErr_ExceptionMatches(PyExc_ImportError)))
jpayne@69 22091 goto bad;
jpayne@69 22092 PyErr_Clear();
jpayne@69 22093 }
jpayne@69 22094 }
jpayne@69 22095 level = 0;
jpayne@69 22096 }
jpayne@69 22097 #endif
jpayne@69 22098 if (!module) {
jpayne@69 22099 #if PY_MAJOR_VERSION < 3
jpayne@69 22100 PyObject *py_level = PyInt_FromLong(level);
jpayne@69 22101 if (unlikely(!py_level))
jpayne@69 22102 goto bad;
jpayne@69 22103 module = PyObject_CallFunctionObjArgs(py_import,
jpayne@69 22104 name, __pyx_d, empty_dict, from_list, py_level, (PyObject *)NULL);
jpayne@69 22105 Py_DECREF(py_level);
jpayne@69 22106 #else
jpayne@69 22107 module = PyImport_ImportModuleLevelObject(
jpayne@69 22108 name, __pyx_d, empty_dict, from_list, level);
jpayne@69 22109 #endif
jpayne@69 22110 }
jpayne@69 22111 }
jpayne@69 22112 bad:
jpayne@69 22113 Py_XDECREF(empty_dict);
jpayne@69 22114 Py_XDECREF(empty_list);
jpayne@69 22115 #if PY_MAJOR_VERSION < 3
jpayne@69 22116 Py_XDECREF(py_import);
jpayne@69 22117 #endif
jpayne@69 22118 return module;
jpayne@69 22119 }
jpayne@69 22120
jpayne@69 22121 /* ImportFrom */
jpayne@69 22122 static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name) {
jpayne@69 22123 PyObject* value = __Pyx_PyObject_GetAttrStr(module, name);
jpayne@69 22124 if (unlikely(!value) && PyErr_ExceptionMatches(PyExc_AttributeError)) {
jpayne@69 22125 const char* module_name_str = 0;
jpayne@69 22126 PyObject* module_name = 0;
jpayne@69 22127 PyObject* module_dot = 0;
jpayne@69 22128 PyObject* full_name = 0;
jpayne@69 22129 PyErr_Clear();
jpayne@69 22130 module_name_str = PyModule_GetName(module);
jpayne@69 22131 if (unlikely(!module_name_str)) { goto modbad; }
jpayne@69 22132 module_name = PyUnicode_FromString(module_name_str);
jpayne@69 22133 if (unlikely(!module_name)) { goto modbad; }
jpayne@69 22134 module_dot = PyUnicode_Concat(module_name, __pyx_kp_u__47);
jpayne@69 22135 if (unlikely(!module_dot)) { goto modbad; }
jpayne@69 22136 full_name = PyUnicode_Concat(module_dot, name);
jpayne@69 22137 if (unlikely(!full_name)) { goto modbad; }
jpayne@69 22138 #if PY_VERSION_HEX < 0x030700A1 || (CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM < 0x07030400)
jpayne@69 22139 {
jpayne@69 22140 PyObject *modules = PyImport_GetModuleDict();
jpayne@69 22141 if (unlikely(!modules))
jpayne@69 22142 goto modbad;
jpayne@69 22143 value = PyObject_GetItem(modules, full_name);
jpayne@69 22144 }
jpayne@69 22145 #else
jpayne@69 22146 value = PyImport_GetModule(full_name);
jpayne@69 22147 #endif
jpayne@69 22148 modbad:
jpayne@69 22149 Py_XDECREF(full_name);
jpayne@69 22150 Py_XDECREF(module_dot);
jpayne@69 22151 Py_XDECREF(module_name);
jpayne@69 22152 }
jpayne@69 22153 if (unlikely(!value)) {
jpayne@69 22154 PyErr_Format(PyExc_ImportError,
jpayne@69 22155 #if PY_MAJOR_VERSION < 3
jpayne@69 22156 "cannot import name %.230s", PyString_AS_STRING(name));
jpayne@69 22157 #else
jpayne@69 22158 "cannot import name %S", name);
jpayne@69 22159 #endif
jpayne@69 22160 }
jpayne@69 22161 return value;
jpayne@69 22162 }
jpayne@69 22163
jpayne@69 22164 /* GetAttr */
jpayne@69 22165 static CYTHON_INLINE PyObject *__Pyx_GetAttr(PyObject *o, PyObject *n) {
jpayne@69 22166 #if CYTHON_USE_TYPE_SLOTS
jpayne@69 22167 #if PY_MAJOR_VERSION >= 3
jpayne@69 22168 if (likely(PyUnicode_Check(n)))
jpayne@69 22169 #else
jpayne@69 22170 if (likely(PyString_Check(n)))
jpayne@69 22171 #endif
jpayne@69 22172 return __Pyx_PyObject_GetAttrStr(o, n);
jpayne@69 22173 #endif
jpayne@69 22174 return PyObject_GetAttr(o, n);
jpayne@69 22175 }
jpayne@69 22176
jpayne@69 22177 /* HasAttr */
jpayne@69 22178 static CYTHON_INLINE int __Pyx_HasAttr(PyObject *o, PyObject *n) {
jpayne@69 22179 PyObject *r;
jpayne@69 22180 if (unlikely(!__Pyx_PyBaseString_Check(n))) {
jpayne@69 22181 PyErr_SetString(PyExc_TypeError,
jpayne@69 22182 "hasattr(): attribute name must be string");
jpayne@69 22183 return -1;
jpayne@69 22184 }
jpayne@69 22185 r = __Pyx_GetAttr(o, n);
jpayne@69 22186 if (!r) {
jpayne@69 22187 PyErr_Clear();
jpayne@69 22188 return 0;
jpayne@69 22189 } else {
jpayne@69 22190 Py_DECREF(r);
jpayne@69 22191 return 1;
jpayne@69 22192 }
jpayne@69 22193 }
jpayne@69 22194
jpayne@69 22195 /* FixUpExtensionType */
jpayne@69 22196 #if CYTHON_USE_TYPE_SPECS
jpayne@69 22197 static int __Pyx_fix_up_extension_type_from_spec(PyType_Spec *spec, PyTypeObject *type) {
jpayne@69 22198 #if PY_VERSION_HEX > 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 22199 CYTHON_UNUSED_VAR(spec);
jpayne@69 22200 CYTHON_UNUSED_VAR(type);
jpayne@69 22201 #else
jpayne@69 22202 const PyType_Slot *slot = spec->slots;
jpayne@69 22203 while (slot && slot->slot && slot->slot != Py_tp_members)
jpayne@69 22204 slot++;
jpayne@69 22205 if (slot && slot->slot == Py_tp_members) {
jpayne@69 22206 int changed = 0;
jpayne@69 22207 #if !(PY_VERSION_HEX <= 0x030900b1 && CYTHON_COMPILING_IN_CPYTHON)
jpayne@69 22208 const
jpayne@69 22209 #endif
jpayne@69 22210 PyMemberDef *memb = (PyMemberDef*) slot->pfunc;
jpayne@69 22211 while (memb && memb->name) {
jpayne@69 22212 if (memb->name[0] == '_' && memb->name[1] == '_') {
jpayne@69 22213 #if PY_VERSION_HEX < 0x030900b1
jpayne@69 22214 if (strcmp(memb->name, "__weaklistoffset__") == 0) {
jpayne@69 22215 assert(memb->type == T_PYSSIZET);
jpayne@69 22216 assert(memb->flags == READONLY);
jpayne@69 22217 type->tp_weaklistoffset = memb->offset;
jpayne@69 22218 changed = 1;
jpayne@69 22219 }
jpayne@69 22220 else if (strcmp(memb->name, "__dictoffset__") == 0) {
jpayne@69 22221 assert(memb->type == T_PYSSIZET);
jpayne@69 22222 assert(memb->flags == READONLY);
jpayne@69 22223 type->tp_dictoffset = memb->offset;
jpayne@69 22224 changed = 1;
jpayne@69 22225 }
jpayne@69 22226 #if CYTHON_METH_FASTCALL
jpayne@69 22227 else if (strcmp(memb->name, "__vectorcalloffset__") == 0) {
jpayne@69 22228 assert(memb->type == T_PYSSIZET);
jpayne@69 22229 assert(memb->flags == READONLY);
jpayne@69 22230 #if PY_VERSION_HEX >= 0x030800b4
jpayne@69 22231 type->tp_vectorcall_offset = memb->offset;
jpayne@69 22232 #else
jpayne@69 22233 type->tp_print = (printfunc) memb->offset;
jpayne@69 22234 #endif
jpayne@69 22235 changed = 1;
jpayne@69 22236 }
jpayne@69 22237 #endif
jpayne@69 22238 #else
jpayne@69 22239 if ((0));
jpayne@69 22240 #endif
jpayne@69 22241 #if PY_VERSION_HEX <= 0x030900b1 && CYTHON_COMPILING_IN_CPYTHON
jpayne@69 22242 else if (strcmp(memb->name, "__module__") == 0) {
jpayne@69 22243 PyObject *descr;
jpayne@69 22244 assert(memb->type == T_OBJECT);
jpayne@69 22245 assert(memb->flags == 0 || memb->flags == READONLY);
jpayne@69 22246 descr = PyDescr_NewMember(type, memb);
jpayne@69 22247 if (unlikely(!descr))
jpayne@69 22248 return -1;
jpayne@69 22249 if (unlikely(PyDict_SetItem(type->tp_dict, PyDescr_NAME(descr), descr) < 0)) {
jpayne@69 22250 Py_DECREF(descr);
jpayne@69 22251 return -1;
jpayne@69 22252 }
jpayne@69 22253 Py_DECREF(descr);
jpayne@69 22254 changed = 1;
jpayne@69 22255 }
jpayne@69 22256 #endif
jpayne@69 22257 }
jpayne@69 22258 memb++;
jpayne@69 22259 }
jpayne@69 22260 if (changed)
jpayne@69 22261 PyType_Modified(type);
jpayne@69 22262 }
jpayne@69 22263 #endif
jpayne@69 22264 return 0;
jpayne@69 22265 }
jpayne@69 22266 #endif
jpayne@69 22267
jpayne@69 22268 /* PyObjectCallNoArg */
jpayne@69 22269 static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) {
jpayne@69 22270 PyObject *arg[2] = {NULL, NULL};
jpayne@69 22271 return __Pyx_PyObject_FastCall(func, arg + 1, 0 | __Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET);
jpayne@69 22272 }
jpayne@69 22273
jpayne@69 22274 /* PyObjectCallMethod0 */
jpayne@69 22275 static PyObject* __Pyx_PyObject_CallMethod0(PyObject* obj, PyObject* method_name) {
jpayne@69 22276 PyObject *method = NULL, *result = NULL;
jpayne@69 22277 int is_method = __Pyx_PyObject_GetMethod(obj, method_name, &method);
jpayne@69 22278 if (likely(is_method)) {
jpayne@69 22279 result = __Pyx_PyObject_CallOneArg(method, obj);
jpayne@69 22280 Py_DECREF(method);
jpayne@69 22281 return result;
jpayne@69 22282 }
jpayne@69 22283 if (unlikely(!method)) goto bad;
jpayne@69 22284 result = __Pyx_PyObject_CallNoArg(method);
jpayne@69 22285 Py_DECREF(method);
jpayne@69 22286 bad:
jpayne@69 22287 return result;
jpayne@69 22288 }
jpayne@69 22289
jpayne@69 22290 /* ValidateBasesTuple */
jpayne@69 22291 #if CYTHON_COMPILING_IN_CPYTHON || CYTHON_COMPILING_IN_LIMITED_API || CYTHON_USE_TYPE_SPECS
jpayne@69 22292 static int __Pyx_validate_bases_tuple(const char *type_name, Py_ssize_t dictoffset, PyObject *bases) {
jpayne@69 22293 Py_ssize_t i, n;
jpayne@69 22294 #if CYTHON_ASSUME_SAFE_MACROS
jpayne@69 22295 n = PyTuple_GET_SIZE(bases);
jpayne@69 22296 #else
jpayne@69 22297 n = PyTuple_Size(bases);
jpayne@69 22298 if (n < 0) return -1;
jpayne@69 22299 #endif
jpayne@69 22300 for (i = 1; i < n; i++)
jpayne@69 22301 {
jpayne@69 22302 #if CYTHON_AVOID_BORROWED_REFS
jpayne@69 22303 PyObject *b0 = PySequence_GetItem(bases, i);
jpayne@69 22304 if (!b0) return -1;
jpayne@69 22305 #elif CYTHON_ASSUME_SAFE_MACROS
jpayne@69 22306 PyObject *b0 = PyTuple_GET_ITEM(bases, i);
jpayne@69 22307 #else
jpayne@69 22308 PyObject *b0 = PyTuple_GetItem(bases, i);
jpayne@69 22309 if (!b0) return -1;
jpayne@69 22310 #endif
jpayne@69 22311 PyTypeObject *b;
jpayne@69 22312 #if PY_MAJOR_VERSION < 3
jpayne@69 22313 if (PyClass_Check(b0))
jpayne@69 22314 {
jpayne@69 22315 PyErr_Format(PyExc_TypeError, "base class '%.200s' is an old-style class",
jpayne@69 22316 PyString_AS_STRING(((PyClassObject*)b0)->cl_name));
jpayne@69 22317 #if CYTHON_AVOID_BORROWED_REFS
jpayne@69 22318 Py_DECREF(b0);
jpayne@69 22319 #endif
jpayne@69 22320 return -1;
jpayne@69 22321 }
jpayne@69 22322 #endif
jpayne@69 22323 b = (PyTypeObject*) b0;
jpayne@69 22324 if (!__Pyx_PyType_HasFeature(b, Py_TPFLAGS_HEAPTYPE))
jpayne@69 22325 {
jpayne@69 22326 __Pyx_TypeName b_name = __Pyx_PyType_GetName(b);
jpayne@69 22327 PyErr_Format(PyExc_TypeError,
jpayne@69 22328 "base class '" __Pyx_FMT_TYPENAME "' is not a heap type", b_name);
jpayne@69 22329 __Pyx_DECREF_TypeName(b_name);
jpayne@69 22330 #if CYTHON_AVOID_BORROWED_REFS
jpayne@69 22331 Py_DECREF(b0);
jpayne@69 22332 #endif
jpayne@69 22333 return -1;
jpayne@69 22334 }
jpayne@69 22335 if (dictoffset == 0)
jpayne@69 22336 {
jpayne@69 22337 Py_ssize_t b_dictoffset = 0;
jpayne@69 22338 #if CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY
jpayne@69 22339 b_dictoffset = b->tp_dictoffset;
jpayne@69 22340 #else
jpayne@69 22341 PyObject *py_b_dictoffset = PyObject_GetAttrString((PyObject*)b, "__dictoffset__");
jpayne@69 22342 if (!py_b_dictoffset) goto dictoffset_return;
jpayne@69 22343 b_dictoffset = PyLong_AsSsize_t(py_b_dictoffset);
jpayne@69 22344 Py_DECREF(py_b_dictoffset);
jpayne@69 22345 if (b_dictoffset == -1 && PyErr_Occurred()) goto dictoffset_return;
jpayne@69 22346 #endif
jpayne@69 22347 if (b_dictoffset) {
jpayne@69 22348 {
jpayne@69 22349 __Pyx_TypeName b_name = __Pyx_PyType_GetName(b);
jpayne@69 22350 PyErr_Format(PyExc_TypeError,
jpayne@69 22351 "extension type '%.200s' has no __dict__ slot, "
jpayne@69 22352 "but base type '" __Pyx_FMT_TYPENAME "' has: "
jpayne@69 22353 "either add 'cdef dict __dict__' to the extension type "
jpayne@69 22354 "or add '__slots__ = [...]' to the base type",
jpayne@69 22355 type_name, b_name);
jpayne@69 22356 __Pyx_DECREF_TypeName(b_name);
jpayne@69 22357 }
jpayne@69 22358 #if !(CYTHON_USE_TYPE_SLOTS || CYTHON_COMPILING_IN_PYPY)
jpayne@69 22359 dictoffset_return:
jpayne@69 22360 #endif
jpayne@69 22361 #if CYTHON_AVOID_BORROWED_REFS
jpayne@69 22362 Py_DECREF(b0);
jpayne@69 22363 #endif
jpayne@69 22364 return -1;
jpayne@69 22365 }
jpayne@69 22366 }
jpayne@69 22367 #if CYTHON_AVOID_BORROWED_REFS
jpayne@69 22368 Py_DECREF(b0);
jpayne@69 22369 #endif
jpayne@69 22370 }
jpayne@69 22371 return 0;
jpayne@69 22372 }
jpayne@69 22373 #endif
jpayne@69 22374
jpayne@69 22375 /* PyType_Ready */
jpayne@69 22376 static int __Pyx_PyType_Ready(PyTypeObject *t) {
jpayne@69 22377 #if CYTHON_USE_TYPE_SPECS || !(CYTHON_COMPILING_IN_CPYTHON || CYTHON_COMPILING_IN_LIMITED_API) || defined(PYSTON_MAJOR_VERSION)
jpayne@69 22378 (void)__Pyx_PyObject_CallMethod0;
jpayne@69 22379 #if CYTHON_USE_TYPE_SPECS
jpayne@69 22380 (void)__Pyx_validate_bases_tuple;
jpayne@69 22381 #endif
jpayne@69 22382 return PyType_Ready(t);
jpayne@69 22383 #else
jpayne@69 22384 int r;
jpayne@69 22385 PyObject *bases = __Pyx_PyType_GetSlot(t, tp_bases, PyObject*);
jpayne@69 22386 if (bases && unlikely(__Pyx_validate_bases_tuple(t->tp_name, t->tp_dictoffset, bases) == -1))
jpayne@69 22387 return -1;
jpayne@69 22388 #if PY_VERSION_HEX >= 0x03050000 && !defined(PYSTON_MAJOR_VERSION)
jpayne@69 22389 {
jpayne@69 22390 int gc_was_enabled;
jpayne@69 22391 #if PY_VERSION_HEX >= 0x030A00b1
jpayne@69 22392 gc_was_enabled = PyGC_Disable();
jpayne@69 22393 (void)__Pyx_PyObject_CallMethod0;
jpayne@69 22394 #else
jpayne@69 22395 PyObject *ret, *py_status;
jpayne@69 22396 PyObject *gc = NULL;
jpayne@69 22397 #if PY_VERSION_HEX >= 0x030700a1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM+0 >= 0x07030400)
jpayne@69 22398 gc = PyImport_GetModule(__pyx_kp_u_gc);
jpayne@69 22399 #endif
jpayne@69 22400 if (unlikely(!gc)) gc = PyImport_Import(__pyx_kp_u_gc);
jpayne@69 22401 if (unlikely(!gc)) return -1;
jpayne@69 22402 py_status = __Pyx_PyObject_CallMethod0(gc, __pyx_kp_u_isenabled);
jpayne@69 22403 if (unlikely(!py_status)) {
jpayne@69 22404 Py_DECREF(gc);
jpayne@69 22405 return -1;
jpayne@69 22406 }
jpayne@69 22407 gc_was_enabled = __Pyx_PyObject_IsTrue(py_status);
jpayne@69 22408 Py_DECREF(py_status);
jpayne@69 22409 if (gc_was_enabled > 0) {
jpayne@69 22410 ret = __Pyx_PyObject_CallMethod0(gc, __pyx_kp_u_disable);
jpayne@69 22411 if (unlikely(!ret)) {
jpayne@69 22412 Py_DECREF(gc);
jpayne@69 22413 return -1;
jpayne@69 22414 }
jpayne@69 22415 Py_DECREF(ret);
jpayne@69 22416 } else if (unlikely(gc_was_enabled == -1)) {
jpayne@69 22417 Py_DECREF(gc);
jpayne@69 22418 return -1;
jpayne@69 22419 }
jpayne@69 22420 #endif
jpayne@69 22421 t->tp_flags |= Py_TPFLAGS_HEAPTYPE;
jpayne@69 22422 #if PY_VERSION_HEX >= 0x030A0000
jpayne@69 22423 t->tp_flags |= Py_TPFLAGS_IMMUTABLETYPE;
jpayne@69 22424 #endif
jpayne@69 22425 #else
jpayne@69 22426 (void)__Pyx_PyObject_CallMethod0;
jpayne@69 22427 #endif
jpayne@69 22428 r = PyType_Ready(t);
jpayne@69 22429 #if PY_VERSION_HEX >= 0x03050000 && !defined(PYSTON_MAJOR_VERSION)
jpayne@69 22430 t->tp_flags &= ~Py_TPFLAGS_HEAPTYPE;
jpayne@69 22431 #if PY_VERSION_HEX >= 0x030A00b1
jpayne@69 22432 if (gc_was_enabled)
jpayne@69 22433 PyGC_Enable();
jpayne@69 22434 #else
jpayne@69 22435 if (gc_was_enabled) {
jpayne@69 22436 PyObject *tp, *v, *tb;
jpayne@69 22437 PyErr_Fetch(&tp, &v, &tb);
jpayne@69 22438 ret = __Pyx_PyObject_CallMethod0(gc, __pyx_kp_u_enable);
jpayne@69 22439 if (likely(ret || r == -1)) {
jpayne@69 22440 Py_XDECREF(ret);
jpayne@69 22441 PyErr_Restore(tp, v, tb);
jpayne@69 22442 } else {
jpayne@69 22443 Py_XDECREF(tp);
jpayne@69 22444 Py_XDECREF(v);
jpayne@69 22445 Py_XDECREF(tb);
jpayne@69 22446 r = -1;
jpayne@69 22447 }
jpayne@69 22448 }
jpayne@69 22449 Py_DECREF(gc);
jpayne@69 22450 #endif
jpayne@69 22451 }
jpayne@69 22452 #endif
jpayne@69 22453 return r;
jpayne@69 22454 #endif
jpayne@69 22455 }
jpayne@69 22456
jpayne@69 22457 /* PyObject_GenericGetAttrNoDict */
jpayne@69 22458 #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
jpayne@69 22459 static PyObject *__Pyx_RaiseGenericGetAttributeError(PyTypeObject *tp, PyObject *attr_name) {
jpayne@69 22460 __Pyx_TypeName type_name = __Pyx_PyType_GetName(tp);
jpayne@69 22461 PyErr_Format(PyExc_AttributeError,
jpayne@69 22462 #if PY_MAJOR_VERSION >= 3
jpayne@69 22463 "'" __Pyx_FMT_TYPENAME "' object has no attribute '%U'",
jpayne@69 22464 type_name, attr_name);
jpayne@69 22465 #else
jpayne@69 22466 "'" __Pyx_FMT_TYPENAME "' object has no attribute '%.400s'",
jpayne@69 22467 type_name, PyString_AS_STRING(attr_name));
jpayne@69 22468 #endif
jpayne@69 22469 __Pyx_DECREF_TypeName(type_name);
jpayne@69 22470 return NULL;
jpayne@69 22471 }
jpayne@69 22472 static CYTHON_INLINE PyObject* __Pyx_PyObject_GenericGetAttrNoDict(PyObject* obj, PyObject* attr_name) {
jpayne@69 22473 PyObject *descr;
jpayne@69 22474 PyTypeObject *tp = Py_TYPE(obj);
jpayne@69 22475 if (unlikely(!PyString_Check(attr_name))) {
jpayne@69 22476 return PyObject_GenericGetAttr(obj, attr_name);
jpayne@69 22477 }
jpayne@69 22478 assert(!tp->tp_dictoffset);
jpayne@69 22479 descr = _PyType_Lookup(tp, attr_name);
jpayne@69 22480 if (unlikely(!descr)) {
jpayne@69 22481 return __Pyx_RaiseGenericGetAttributeError(tp, attr_name);
jpayne@69 22482 }
jpayne@69 22483 Py_INCREF(descr);
jpayne@69 22484 #if PY_MAJOR_VERSION < 3
jpayne@69 22485 if (likely(PyType_HasFeature(Py_TYPE(descr), Py_TPFLAGS_HAVE_CLASS)))
jpayne@69 22486 #endif
jpayne@69 22487 {
jpayne@69 22488 descrgetfunc f = Py_TYPE(descr)->tp_descr_get;
jpayne@69 22489 if (unlikely(f)) {
jpayne@69 22490 PyObject *res = f(descr, obj, (PyObject *)tp);
jpayne@69 22491 Py_DECREF(descr);
jpayne@69 22492 return res;
jpayne@69 22493 }
jpayne@69 22494 }
jpayne@69 22495 return descr;
jpayne@69 22496 }
jpayne@69 22497 #endif
jpayne@69 22498
jpayne@69 22499 /* PyObject_GenericGetAttr */
jpayne@69 22500 #if CYTHON_USE_TYPE_SLOTS && CYTHON_USE_PYTYPE_LOOKUP && PY_VERSION_HEX < 0x03070000
jpayne@69 22501 static PyObject* __Pyx_PyObject_GenericGetAttr(PyObject* obj, PyObject* attr_name) {
jpayne@69 22502 if (unlikely(Py_TYPE(obj)->tp_dictoffset)) {
jpayne@69 22503 return PyObject_GenericGetAttr(obj, attr_name);
jpayne@69 22504 }
jpayne@69 22505 return __Pyx_PyObject_GenericGetAttrNoDict(obj, attr_name);
jpayne@69 22506 }
jpayne@69 22507 #endif
jpayne@69 22508
jpayne@69 22509 /* SetVTable */
jpayne@69 22510 static int __Pyx_SetVtable(PyTypeObject *type, void *vtable) {
jpayne@69 22511 PyObject *ob = PyCapsule_New(vtable, 0, 0);
jpayne@69 22512 if (unlikely(!ob))
jpayne@69 22513 goto bad;
jpayne@69 22514 #if CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 22515 if (unlikely(PyObject_SetAttr((PyObject *) type, __pyx_n_s_pyx_vtable, ob) < 0))
jpayne@69 22516 #else
jpayne@69 22517 if (unlikely(PyDict_SetItem(type->tp_dict, __pyx_n_s_pyx_vtable, ob) < 0))
jpayne@69 22518 #endif
jpayne@69 22519 goto bad;
jpayne@69 22520 Py_DECREF(ob);
jpayne@69 22521 return 0;
jpayne@69 22522 bad:
jpayne@69 22523 Py_XDECREF(ob);
jpayne@69 22524 return -1;
jpayne@69 22525 }
jpayne@69 22526
jpayne@69 22527 /* GetVTable */
jpayne@69 22528 static void* __Pyx_GetVtable(PyTypeObject *type) {
jpayne@69 22529 void* ptr;
jpayne@69 22530 #if CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 22531 PyObject *ob = PyObject_GetAttr((PyObject *)type, __pyx_n_s_pyx_vtable);
jpayne@69 22532 #else
jpayne@69 22533 PyObject *ob = PyObject_GetItem(type->tp_dict, __pyx_n_s_pyx_vtable);
jpayne@69 22534 #endif
jpayne@69 22535 if (!ob)
jpayne@69 22536 goto bad;
jpayne@69 22537 ptr = PyCapsule_GetPointer(ob, 0);
jpayne@69 22538 if (!ptr && !PyErr_Occurred())
jpayne@69 22539 PyErr_SetString(PyExc_RuntimeError, "invalid vtable found for imported type");
jpayne@69 22540 Py_DECREF(ob);
jpayne@69 22541 return ptr;
jpayne@69 22542 bad:
jpayne@69 22543 Py_XDECREF(ob);
jpayne@69 22544 return NULL;
jpayne@69 22545 }
jpayne@69 22546
jpayne@69 22547 /* MergeVTables */
jpayne@69 22548 #if !CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 22549 static int __Pyx_MergeVtables(PyTypeObject *type) {
jpayne@69 22550 int i;
jpayne@69 22551 void** base_vtables;
jpayne@69 22552 __Pyx_TypeName tp_base_name;
jpayne@69 22553 __Pyx_TypeName base_name;
jpayne@69 22554 void* unknown = (void*)-1;
jpayne@69 22555 PyObject* bases = type->tp_bases;
jpayne@69 22556 int base_depth = 0;
jpayne@69 22557 {
jpayne@69 22558 PyTypeObject* base = type->tp_base;
jpayne@69 22559 while (base) {
jpayne@69 22560 base_depth += 1;
jpayne@69 22561 base = base->tp_base;
jpayne@69 22562 }
jpayne@69 22563 }
jpayne@69 22564 base_vtables = (void**) malloc(sizeof(void*) * (size_t)(base_depth + 1));
jpayne@69 22565 base_vtables[0] = unknown;
jpayne@69 22566 for (i = 1; i < PyTuple_GET_SIZE(bases); i++) {
jpayne@69 22567 void* base_vtable = __Pyx_GetVtable(((PyTypeObject*)PyTuple_GET_ITEM(bases, i)));
jpayne@69 22568 if (base_vtable != NULL) {
jpayne@69 22569 int j;
jpayne@69 22570 PyTypeObject* base = type->tp_base;
jpayne@69 22571 for (j = 0; j < base_depth; j++) {
jpayne@69 22572 if (base_vtables[j] == unknown) {
jpayne@69 22573 base_vtables[j] = __Pyx_GetVtable(base);
jpayne@69 22574 base_vtables[j + 1] = unknown;
jpayne@69 22575 }
jpayne@69 22576 if (base_vtables[j] == base_vtable) {
jpayne@69 22577 break;
jpayne@69 22578 } else if (base_vtables[j] == NULL) {
jpayne@69 22579 goto bad;
jpayne@69 22580 }
jpayne@69 22581 base = base->tp_base;
jpayne@69 22582 }
jpayne@69 22583 }
jpayne@69 22584 }
jpayne@69 22585 PyErr_Clear();
jpayne@69 22586 free(base_vtables);
jpayne@69 22587 return 0;
jpayne@69 22588 bad:
jpayne@69 22589 tp_base_name = __Pyx_PyType_GetName(type->tp_base);
jpayne@69 22590 base_name = __Pyx_PyType_GetName((PyTypeObject*)PyTuple_GET_ITEM(bases, i));
jpayne@69 22591 PyErr_Format(PyExc_TypeError,
jpayne@69 22592 "multiple bases have vtable conflict: '" __Pyx_FMT_TYPENAME "' and '" __Pyx_FMT_TYPENAME "'", tp_base_name, base_name);
jpayne@69 22593 __Pyx_DECREF_TypeName(tp_base_name);
jpayne@69 22594 __Pyx_DECREF_TypeName(base_name);
jpayne@69 22595 free(base_vtables);
jpayne@69 22596 return -1;
jpayne@69 22597 }
jpayne@69 22598 #endif
jpayne@69 22599
jpayne@69 22600 /* SetupReduce */
jpayne@69 22601 #if !CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 22602 static int __Pyx_setup_reduce_is_named(PyObject* meth, PyObject* name) {
jpayne@69 22603 int ret;
jpayne@69 22604 PyObject *name_attr;
jpayne@69 22605 name_attr = __Pyx_PyObject_GetAttrStrNoError(meth, __pyx_n_s_name_2);
jpayne@69 22606 if (likely(name_attr)) {
jpayne@69 22607 ret = PyObject_RichCompareBool(name_attr, name, Py_EQ);
jpayne@69 22608 } else {
jpayne@69 22609 ret = -1;
jpayne@69 22610 }
jpayne@69 22611 if (unlikely(ret < 0)) {
jpayne@69 22612 PyErr_Clear();
jpayne@69 22613 ret = 0;
jpayne@69 22614 }
jpayne@69 22615 Py_XDECREF(name_attr);
jpayne@69 22616 return ret;
jpayne@69 22617 }
jpayne@69 22618 static int __Pyx_setup_reduce(PyObject* type_obj) {
jpayne@69 22619 int ret = 0;
jpayne@69 22620 PyObject *object_reduce = NULL;
jpayne@69 22621 PyObject *object_getstate = NULL;
jpayne@69 22622 PyObject *object_reduce_ex = NULL;
jpayne@69 22623 PyObject *reduce = NULL;
jpayne@69 22624 PyObject *reduce_ex = NULL;
jpayne@69 22625 PyObject *reduce_cython = NULL;
jpayne@69 22626 PyObject *setstate = NULL;
jpayne@69 22627 PyObject *setstate_cython = NULL;
jpayne@69 22628 PyObject *getstate = NULL;
jpayne@69 22629 #if CYTHON_USE_PYTYPE_LOOKUP
jpayne@69 22630 getstate = _PyType_Lookup((PyTypeObject*)type_obj, __pyx_n_s_getstate);
jpayne@69 22631 #else
jpayne@69 22632 getstate = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_getstate);
jpayne@69 22633 if (!getstate && PyErr_Occurred()) {
jpayne@69 22634 goto __PYX_BAD;
jpayne@69 22635 }
jpayne@69 22636 #endif
jpayne@69 22637 if (getstate) {
jpayne@69 22638 #if CYTHON_USE_PYTYPE_LOOKUP
jpayne@69 22639 object_getstate = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_getstate);
jpayne@69 22640 #else
jpayne@69 22641 object_getstate = __Pyx_PyObject_GetAttrStrNoError((PyObject*)&PyBaseObject_Type, __pyx_n_s_getstate);
jpayne@69 22642 if (!object_getstate && PyErr_Occurred()) {
jpayne@69 22643 goto __PYX_BAD;
jpayne@69 22644 }
jpayne@69 22645 #endif
jpayne@69 22646 if (object_getstate != getstate) {
jpayne@69 22647 goto __PYX_GOOD;
jpayne@69 22648 }
jpayne@69 22649 }
jpayne@69 22650 #if CYTHON_USE_PYTYPE_LOOKUP
jpayne@69 22651 object_reduce_ex = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD;
jpayne@69 22652 #else
jpayne@69 22653 object_reduce_ex = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce_ex); if (!object_reduce_ex) goto __PYX_BAD;
jpayne@69 22654 #endif
jpayne@69 22655 reduce_ex = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce_ex); if (unlikely(!reduce_ex)) goto __PYX_BAD;
jpayne@69 22656 if (reduce_ex == object_reduce_ex) {
jpayne@69 22657 #if CYTHON_USE_PYTYPE_LOOKUP
jpayne@69 22658 object_reduce = _PyType_Lookup(&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto __PYX_BAD;
jpayne@69 22659 #else
jpayne@69 22660 object_reduce = __Pyx_PyObject_GetAttrStr((PyObject*)&PyBaseObject_Type, __pyx_n_s_reduce); if (!object_reduce) goto __PYX_BAD;
jpayne@69 22661 #endif
jpayne@69 22662 reduce = __Pyx_PyObject_GetAttrStr(type_obj, __pyx_n_s_reduce); if (unlikely(!reduce)) goto __PYX_BAD;
jpayne@69 22663 if (reduce == object_reduce || __Pyx_setup_reduce_is_named(reduce, __pyx_n_s_reduce_cython)) {
jpayne@69 22664 reduce_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_reduce_cython);
jpayne@69 22665 if (likely(reduce_cython)) {
jpayne@69 22666 ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce, reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
jpayne@69 22667 ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_reduce_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
jpayne@69 22668 } else if (reduce == object_reduce || PyErr_Occurred()) {
jpayne@69 22669 goto __PYX_BAD;
jpayne@69 22670 }
jpayne@69 22671 setstate = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_setstate);
jpayne@69 22672 if (!setstate) PyErr_Clear();
jpayne@69 22673 if (!setstate || __Pyx_setup_reduce_is_named(setstate, __pyx_n_s_setstate_cython)) {
jpayne@69 22674 setstate_cython = __Pyx_PyObject_GetAttrStrNoError(type_obj, __pyx_n_s_setstate_cython);
jpayne@69 22675 if (likely(setstate_cython)) {
jpayne@69 22676 ret = PyDict_SetItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate, setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
jpayne@69 22677 ret = PyDict_DelItem(((PyTypeObject*)type_obj)->tp_dict, __pyx_n_s_setstate_cython); if (unlikely(ret < 0)) goto __PYX_BAD;
jpayne@69 22678 } else if (!setstate || PyErr_Occurred()) {
jpayne@69 22679 goto __PYX_BAD;
jpayne@69 22680 }
jpayne@69 22681 }
jpayne@69 22682 PyType_Modified((PyTypeObject*)type_obj);
jpayne@69 22683 }
jpayne@69 22684 }
jpayne@69 22685 goto __PYX_GOOD;
jpayne@69 22686 __PYX_BAD:
jpayne@69 22687 if (!PyErr_Occurred()) {
jpayne@69 22688 __Pyx_TypeName type_obj_name =
jpayne@69 22689 __Pyx_PyType_GetName((PyTypeObject*)type_obj);
jpayne@69 22690 PyErr_Format(PyExc_RuntimeError,
jpayne@69 22691 "Unable to initialize pickling for " __Pyx_FMT_TYPENAME, type_obj_name);
jpayne@69 22692 __Pyx_DECREF_TypeName(type_obj_name);
jpayne@69 22693 }
jpayne@69 22694 ret = -1;
jpayne@69 22695 __PYX_GOOD:
jpayne@69 22696 #if !CYTHON_USE_PYTYPE_LOOKUP
jpayne@69 22697 Py_XDECREF(object_reduce);
jpayne@69 22698 Py_XDECREF(object_reduce_ex);
jpayne@69 22699 Py_XDECREF(object_getstate);
jpayne@69 22700 Py_XDECREF(getstate);
jpayne@69 22701 #endif
jpayne@69 22702 Py_XDECREF(reduce);
jpayne@69 22703 Py_XDECREF(reduce_ex);
jpayne@69 22704 Py_XDECREF(reduce_cython);
jpayne@69 22705 Py_XDECREF(setstate);
jpayne@69 22706 Py_XDECREF(setstate_cython);
jpayne@69 22707 return ret;
jpayne@69 22708 }
jpayne@69 22709 #endif
jpayne@69 22710
jpayne@69 22711 /* TypeImport */
jpayne@69 22712 #ifndef __PYX_HAVE_RT_ImportType_3_0_11
jpayne@69 22713 #define __PYX_HAVE_RT_ImportType_3_0_11
jpayne@69 22714 static PyTypeObject *__Pyx_ImportType_3_0_11(PyObject *module, const char *module_name, const char *class_name,
jpayne@69 22715 size_t size, size_t alignment, enum __Pyx_ImportType_CheckSize_3_0_11 check_size)
jpayne@69 22716 {
jpayne@69 22717 PyObject *result = 0;
jpayne@69 22718 char warning[200];
jpayne@69 22719 Py_ssize_t basicsize;
jpayne@69 22720 Py_ssize_t itemsize;
jpayne@69 22721 #if CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 22722 PyObject *py_basicsize;
jpayne@69 22723 PyObject *py_itemsize;
jpayne@69 22724 #endif
jpayne@69 22725 result = PyObject_GetAttrString(module, class_name);
jpayne@69 22726 if (!result)
jpayne@69 22727 goto bad;
jpayne@69 22728 if (!PyType_Check(result)) {
jpayne@69 22729 PyErr_Format(PyExc_TypeError,
jpayne@69 22730 "%.200s.%.200s is not a type object",
jpayne@69 22731 module_name, class_name);
jpayne@69 22732 goto bad;
jpayne@69 22733 }
jpayne@69 22734 #if !CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 22735 basicsize = ((PyTypeObject *)result)->tp_basicsize;
jpayne@69 22736 itemsize = ((PyTypeObject *)result)->tp_itemsize;
jpayne@69 22737 #else
jpayne@69 22738 py_basicsize = PyObject_GetAttrString(result, "__basicsize__");
jpayne@69 22739 if (!py_basicsize)
jpayne@69 22740 goto bad;
jpayne@69 22741 basicsize = PyLong_AsSsize_t(py_basicsize);
jpayne@69 22742 Py_DECREF(py_basicsize);
jpayne@69 22743 py_basicsize = 0;
jpayne@69 22744 if (basicsize == (Py_ssize_t)-1 && PyErr_Occurred())
jpayne@69 22745 goto bad;
jpayne@69 22746 py_itemsize = PyObject_GetAttrString(result, "__itemsize__");
jpayne@69 22747 if (!py_itemsize)
jpayne@69 22748 goto bad;
jpayne@69 22749 itemsize = PyLong_AsSsize_t(py_itemsize);
jpayne@69 22750 Py_DECREF(py_itemsize);
jpayne@69 22751 py_itemsize = 0;
jpayne@69 22752 if (itemsize == (Py_ssize_t)-1 && PyErr_Occurred())
jpayne@69 22753 goto bad;
jpayne@69 22754 #endif
jpayne@69 22755 if (itemsize) {
jpayne@69 22756 if (size % alignment) {
jpayne@69 22757 alignment = size % alignment;
jpayne@69 22758 }
jpayne@69 22759 if (itemsize < (Py_ssize_t)alignment)
jpayne@69 22760 itemsize = (Py_ssize_t)alignment;
jpayne@69 22761 }
jpayne@69 22762 if ((size_t)(basicsize + itemsize) < size) {
jpayne@69 22763 PyErr_Format(PyExc_ValueError,
jpayne@69 22764 "%.200s.%.200s size changed, may indicate binary incompatibility. "
jpayne@69 22765 "Expected %zd from C header, got %zd from PyObject",
jpayne@69 22766 module_name, class_name, size, basicsize+itemsize);
jpayne@69 22767 goto bad;
jpayne@69 22768 }
jpayne@69 22769 if (check_size == __Pyx_ImportType_CheckSize_Error_3_0_11 &&
jpayne@69 22770 ((size_t)basicsize > size || (size_t)(basicsize + itemsize) < size)) {
jpayne@69 22771 PyErr_Format(PyExc_ValueError,
jpayne@69 22772 "%.200s.%.200s size changed, may indicate binary incompatibility. "
jpayne@69 22773 "Expected %zd from C header, got %zd-%zd from PyObject",
jpayne@69 22774 module_name, class_name, size, basicsize, basicsize+itemsize);
jpayne@69 22775 goto bad;
jpayne@69 22776 }
jpayne@69 22777 else if (check_size == __Pyx_ImportType_CheckSize_Warn_3_0_11 && (size_t)basicsize > size) {
jpayne@69 22778 PyOS_snprintf(warning, sizeof(warning),
jpayne@69 22779 "%s.%s size changed, may indicate binary incompatibility. "
jpayne@69 22780 "Expected %zd from C header, got %zd from PyObject",
jpayne@69 22781 module_name, class_name, size, basicsize);
jpayne@69 22782 if (PyErr_WarnEx(NULL, warning, 0) < 0) goto bad;
jpayne@69 22783 }
jpayne@69 22784 return (PyTypeObject *)result;
jpayne@69 22785 bad:
jpayne@69 22786 Py_XDECREF(result);
jpayne@69 22787 return NULL;
jpayne@69 22788 }
jpayne@69 22789 #endif
jpayne@69 22790
jpayne@69 22791 /* ImportDottedModule */
jpayne@69 22792 #if PY_MAJOR_VERSION >= 3
jpayne@69 22793 static PyObject *__Pyx__ImportDottedModule_Error(PyObject *name, PyObject *parts_tuple, Py_ssize_t count) {
jpayne@69 22794 PyObject *partial_name = NULL, *slice = NULL, *sep = NULL;
jpayne@69 22795 if (unlikely(PyErr_Occurred())) {
jpayne@69 22796 PyErr_Clear();
jpayne@69 22797 }
jpayne@69 22798 if (likely(PyTuple_GET_SIZE(parts_tuple) == count)) {
jpayne@69 22799 partial_name = name;
jpayne@69 22800 } else {
jpayne@69 22801 slice = PySequence_GetSlice(parts_tuple, 0, count);
jpayne@69 22802 if (unlikely(!slice))
jpayne@69 22803 goto bad;
jpayne@69 22804 sep = PyUnicode_FromStringAndSize(".", 1);
jpayne@69 22805 if (unlikely(!sep))
jpayne@69 22806 goto bad;
jpayne@69 22807 partial_name = PyUnicode_Join(sep, slice);
jpayne@69 22808 }
jpayne@69 22809 PyErr_Format(
jpayne@69 22810 #if PY_MAJOR_VERSION < 3
jpayne@69 22811 PyExc_ImportError,
jpayne@69 22812 "No module named '%s'", PyString_AS_STRING(partial_name));
jpayne@69 22813 #else
jpayne@69 22814 #if PY_VERSION_HEX >= 0x030600B1
jpayne@69 22815 PyExc_ModuleNotFoundError,
jpayne@69 22816 #else
jpayne@69 22817 PyExc_ImportError,
jpayne@69 22818 #endif
jpayne@69 22819 "No module named '%U'", partial_name);
jpayne@69 22820 #endif
jpayne@69 22821 bad:
jpayne@69 22822 Py_XDECREF(sep);
jpayne@69 22823 Py_XDECREF(slice);
jpayne@69 22824 Py_XDECREF(partial_name);
jpayne@69 22825 return NULL;
jpayne@69 22826 }
jpayne@69 22827 #endif
jpayne@69 22828 #if PY_MAJOR_VERSION >= 3
jpayne@69 22829 static PyObject *__Pyx__ImportDottedModule_Lookup(PyObject *name) {
jpayne@69 22830 PyObject *imported_module;
jpayne@69 22831 #if PY_VERSION_HEX < 0x030700A1 || (CYTHON_COMPILING_IN_PYPY && PYPY_VERSION_NUM < 0x07030400)
jpayne@69 22832 PyObject *modules = PyImport_GetModuleDict();
jpayne@69 22833 if (unlikely(!modules))
jpayne@69 22834 return NULL;
jpayne@69 22835 imported_module = __Pyx_PyDict_GetItemStr(modules, name);
jpayne@69 22836 Py_XINCREF(imported_module);
jpayne@69 22837 #else
jpayne@69 22838 imported_module = PyImport_GetModule(name);
jpayne@69 22839 #endif
jpayne@69 22840 return imported_module;
jpayne@69 22841 }
jpayne@69 22842 #endif
jpayne@69 22843 #if PY_MAJOR_VERSION >= 3
jpayne@69 22844 static PyObject *__Pyx_ImportDottedModule_WalkParts(PyObject *module, PyObject *name, PyObject *parts_tuple) {
jpayne@69 22845 Py_ssize_t i, nparts;
jpayne@69 22846 nparts = PyTuple_GET_SIZE(parts_tuple);
jpayne@69 22847 for (i=1; i < nparts && module; i++) {
jpayne@69 22848 PyObject *part, *submodule;
jpayne@69 22849 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
jpayne@69 22850 part = PyTuple_GET_ITEM(parts_tuple, i);
jpayne@69 22851 #else
jpayne@69 22852 part = PySequence_ITEM(parts_tuple, i);
jpayne@69 22853 #endif
jpayne@69 22854 submodule = __Pyx_PyObject_GetAttrStrNoError(module, part);
jpayne@69 22855 #if !(CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS)
jpayne@69 22856 Py_DECREF(part);
jpayne@69 22857 #endif
jpayne@69 22858 Py_DECREF(module);
jpayne@69 22859 module = submodule;
jpayne@69 22860 }
jpayne@69 22861 if (unlikely(!module)) {
jpayne@69 22862 return __Pyx__ImportDottedModule_Error(name, parts_tuple, i);
jpayne@69 22863 }
jpayne@69 22864 return module;
jpayne@69 22865 }
jpayne@69 22866 #endif
jpayne@69 22867 static PyObject *__Pyx__ImportDottedModule(PyObject *name, PyObject *parts_tuple) {
jpayne@69 22868 #if PY_MAJOR_VERSION < 3
jpayne@69 22869 PyObject *module, *from_list, *star = __pyx_n_s__48;
jpayne@69 22870 CYTHON_UNUSED_VAR(parts_tuple);
jpayne@69 22871 from_list = PyList_New(1);
jpayne@69 22872 if (unlikely(!from_list))
jpayne@69 22873 return NULL;
jpayne@69 22874 Py_INCREF(star);
jpayne@69 22875 PyList_SET_ITEM(from_list, 0, star);
jpayne@69 22876 module = __Pyx_Import(name, from_list, 0);
jpayne@69 22877 Py_DECREF(from_list);
jpayne@69 22878 return module;
jpayne@69 22879 #else
jpayne@69 22880 PyObject *imported_module;
jpayne@69 22881 PyObject *module = __Pyx_Import(name, NULL, 0);
jpayne@69 22882 if (!parts_tuple || unlikely(!module))
jpayne@69 22883 return module;
jpayne@69 22884 imported_module = __Pyx__ImportDottedModule_Lookup(name);
jpayne@69 22885 if (likely(imported_module)) {
jpayne@69 22886 Py_DECREF(module);
jpayne@69 22887 return imported_module;
jpayne@69 22888 }
jpayne@69 22889 PyErr_Clear();
jpayne@69 22890 return __Pyx_ImportDottedModule_WalkParts(module, name, parts_tuple);
jpayne@69 22891 #endif
jpayne@69 22892 }
jpayne@69 22893 static PyObject *__Pyx_ImportDottedModule(PyObject *name, PyObject *parts_tuple) {
jpayne@69 22894 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x030400B1
jpayne@69 22895 PyObject *module = __Pyx__ImportDottedModule_Lookup(name);
jpayne@69 22896 if (likely(module)) {
jpayne@69 22897 PyObject *spec = __Pyx_PyObject_GetAttrStrNoError(module, __pyx_n_s_spec);
jpayne@69 22898 if (likely(spec)) {
jpayne@69 22899 PyObject *unsafe = __Pyx_PyObject_GetAttrStrNoError(spec, __pyx_n_s_initializing);
jpayne@69 22900 if (likely(!unsafe || !__Pyx_PyObject_IsTrue(unsafe))) {
jpayne@69 22901 Py_DECREF(spec);
jpayne@69 22902 spec = NULL;
jpayne@69 22903 }
jpayne@69 22904 Py_XDECREF(unsafe);
jpayne@69 22905 }
jpayne@69 22906 if (likely(!spec)) {
jpayne@69 22907 PyErr_Clear();
jpayne@69 22908 return module;
jpayne@69 22909 }
jpayne@69 22910 Py_DECREF(spec);
jpayne@69 22911 Py_DECREF(module);
jpayne@69 22912 } else if (PyErr_Occurred()) {
jpayne@69 22913 PyErr_Clear();
jpayne@69 22914 }
jpayne@69 22915 #endif
jpayne@69 22916 return __Pyx__ImportDottedModule(name, parts_tuple);
jpayne@69 22917 }
jpayne@69 22918
jpayne@69 22919 /* FetchSharedCythonModule */
jpayne@69 22920 static PyObject *__Pyx_FetchSharedCythonABIModule(void) {
jpayne@69 22921 return __Pyx_PyImport_AddModuleRef((char*) __PYX_ABI_MODULE_NAME);
jpayne@69 22922 }
jpayne@69 22923
jpayne@69 22924 /* FetchCommonType */
jpayne@69 22925 static int __Pyx_VerifyCachedType(PyObject *cached_type,
jpayne@69 22926 const char *name,
jpayne@69 22927 Py_ssize_t basicsize,
jpayne@69 22928 Py_ssize_t expected_basicsize) {
jpayne@69 22929 if (!PyType_Check(cached_type)) {
jpayne@69 22930 PyErr_Format(PyExc_TypeError,
jpayne@69 22931 "Shared Cython type %.200s is not a type object", name);
jpayne@69 22932 return -1;
jpayne@69 22933 }
jpayne@69 22934 if (basicsize != expected_basicsize) {
jpayne@69 22935 PyErr_Format(PyExc_TypeError,
jpayne@69 22936 "Shared Cython type %.200s has the wrong size, try recompiling",
jpayne@69 22937 name);
jpayne@69 22938 return -1;
jpayne@69 22939 }
jpayne@69 22940 return 0;
jpayne@69 22941 }
jpayne@69 22942 #if !CYTHON_USE_TYPE_SPECS
jpayne@69 22943 static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type) {
jpayne@69 22944 PyObject* abi_module;
jpayne@69 22945 const char* object_name;
jpayne@69 22946 PyTypeObject *cached_type = NULL;
jpayne@69 22947 abi_module = __Pyx_FetchSharedCythonABIModule();
jpayne@69 22948 if (!abi_module) return NULL;
jpayne@69 22949 object_name = strrchr(type->tp_name, '.');
jpayne@69 22950 object_name = object_name ? object_name+1 : type->tp_name;
jpayne@69 22951 cached_type = (PyTypeObject*) PyObject_GetAttrString(abi_module, object_name);
jpayne@69 22952 if (cached_type) {
jpayne@69 22953 if (__Pyx_VerifyCachedType(
jpayne@69 22954 (PyObject *)cached_type,
jpayne@69 22955 object_name,
jpayne@69 22956 cached_type->tp_basicsize,
jpayne@69 22957 type->tp_basicsize) < 0) {
jpayne@69 22958 goto bad;
jpayne@69 22959 }
jpayne@69 22960 goto done;
jpayne@69 22961 }
jpayne@69 22962 if (!PyErr_ExceptionMatches(PyExc_AttributeError)) goto bad;
jpayne@69 22963 PyErr_Clear();
jpayne@69 22964 if (PyType_Ready(type) < 0) goto bad;
jpayne@69 22965 if (PyObject_SetAttrString(abi_module, object_name, (PyObject *)type) < 0)
jpayne@69 22966 goto bad;
jpayne@69 22967 Py_INCREF(type);
jpayne@69 22968 cached_type = type;
jpayne@69 22969 done:
jpayne@69 22970 Py_DECREF(abi_module);
jpayne@69 22971 return cached_type;
jpayne@69 22972 bad:
jpayne@69 22973 Py_XDECREF(cached_type);
jpayne@69 22974 cached_type = NULL;
jpayne@69 22975 goto done;
jpayne@69 22976 }
jpayne@69 22977 #else
jpayne@69 22978 static PyTypeObject *__Pyx_FetchCommonTypeFromSpec(PyObject *module, PyType_Spec *spec, PyObject *bases) {
jpayne@69 22979 PyObject *abi_module, *cached_type = NULL;
jpayne@69 22980 const char* object_name = strrchr(spec->name, '.');
jpayne@69 22981 object_name = object_name ? object_name+1 : spec->name;
jpayne@69 22982 abi_module = __Pyx_FetchSharedCythonABIModule();
jpayne@69 22983 if (!abi_module) return NULL;
jpayne@69 22984 cached_type = PyObject_GetAttrString(abi_module, object_name);
jpayne@69 22985 if (cached_type) {
jpayne@69 22986 Py_ssize_t basicsize;
jpayne@69 22987 #if CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 22988 PyObject *py_basicsize;
jpayne@69 22989 py_basicsize = PyObject_GetAttrString(cached_type, "__basicsize__");
jpayne@69 22990 if (unlikely(!py_basicsize)) goto bad;
jpayne@69 22991 basicsize = PyLong_AsSsize_t(py_basicsize);
jpayne@69 22992 Py_DECREF(py_basicsize);
jpayne@69 22993 py_basicsize = 0;
jpayne@69 22994 if (unlikely(basicsize == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad;
jpayne@69 22995 #else
jpayne@69 22996 basicsize = likely(PyType_Check(cached_type)) ? ((PyTypeObject*) cached_type)->tp_basicsize : -1;
jpayne@69 22997 #endif
jpayne@69 22998 if (__Pyx_VerifyCachedType(
jpayne@69 22999 cached_type,
jpayne@69 23000 object_name,
jpayne@69 23001 basicsize,
jpayne@69 23002 spec->basicsize) < 0) {
jpayne@69 23003 goto bad;
jpayne@69 23004 }
jpayne@69 23005 goto done;
jpayne@69 23006 }
jpayne@69 23007 if (!PyErr_ExceptionMatches(PyExc_AttributeError)) goto bad;
jpayne@69 23008 PyErr_Clear();
jpayne@69 23009 CYTHON_UNUSED_VAR(module);
jpayne@69 23010 cached_type = __Pyx_PyType_FromModuleAndSpec(abi_module, spec, bases);
jpayne@69 23011 if (unlikely(!cached_type)) goto bad;
jpayne@69 23012 if (unlikely(__Pyx_fix_up_extension_type_from_spec(spec, (PyTypeObject *) cached_type) < 0)) goto bad;
jpayne@69 23013 if (PyObject_SetAttrString(abi_module, object_name, cached_type) < 0) goto bad;
jpayne@69 23014 done:
jpayne@69 23015 Py_DECREF(abi_module);
jpayne@69 23016 assert(cached_type == NULL || PyType_Check(cached_type));
jpayne@69 23017 return (PyTypeObject *) cached_type;
jpayne@69 23018 bad:
jpayne@69 23019 Py_XDECREF(cached_type);
jpayne@69 23020 cached_type = NULL;
jpayne@69 23021 goto done;
jpayne@69 23022 }
jpayne@69 23023 #endif
jpayne@69 23024
jpayne@69 23025 /* PyVectorcallFastCallDict */
jpayne@69 23026 #if CYTHON_METH_FASTCALL
jpayne@69 23027 static PyObject *__Pyx_PyVectorcall_FastCallDict_kw(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw)
jpayne@69 23028 {
jpayne@69 23029 PyObject *res = NULL;
jpayne@69 23030 PyObject *kwnames;
jpayne@69 23031 PyObject **newargs;
jpayne@69 23032 PyObject **kwvalues;
jpayne@69 23033 Py_ssize_t i, pos;
jpayne@69 23034 size_t j;
jpayne@69 23035 PyObject *key, *value;
jpayne@69 23036 unsigned long keys_are_strings;
jpayne@69 23037 Py_ssize_t nkw = PyDict_GET_SIZE(kw);
jpayne@69 23038 newargs = (PyObject **)PyMem_Malloc((nargs + (size_t)nkw) * sizeof(args[0]));
jpayne@69 23039 if (unlikely(newargs == NULL)) {
jpayne@69 23040 PyErr_NoMemory();
jpayne@69 23041 return NULL;
jpayne@69 23042 }
jpayne@69 23043 for (j = 0; j < nargs; j++) newargs[j] = args[j];
jpayne@69 23044 kwnames = PyTuple_New(nkw);
jpayne@69 23045 if (unlikely(kwnames == NULL)) {
jpayne@69 23046 PyMem_Free(newargs);
jpayne@69 23047 return NULL;
jpayne@69 23048 }
jpayne@69 23049 kwvalues = newargs + nargs;
jpayne@69 23050 pos = i = 0;
jpayne@69 23051 keys_are_strings = Py_TPFLAGS_UNICODE_SUBCLASS;
jpayne@69 23052 while (PyDict_Next(kw, &pos, &key, &value)) {
jpayne@69 23053 keys_are_strings &= Py_TYPE(key)->tp_flags;
jpayne@69 23054 Py_INCREF(key);
jpayne@69 23055 Py_INCREF(value);
jpayne@69 23056 PyTuple_SET_ITEM(kwnames, i, key);
jpayne@69 23057 kwvalues[i] = value;
jpayne@69 23058 i++;
jpayne@69 23059 }
jpayne@69 23060 if (unlikely(!keys_are_strings)) {
jpayne@69 23061 PyErr_SetString(PyExc_TypeError, "keywords must be strings");
jpayne@69 23062 goto cleanup;
jpayne@69 23063 }
jpayne@69 23064 res = vc(func, newargs, nargs, kwnames);
jpayne@69 23065 cleanup:
jpayne@69 23066 Py_DECREF(kwnames);
jpayne@69 23067 for (i = 0; i < nkw; i++)
jpayne@69 23068 Py_DECREF(kwvalues[i]);
jpayne@69 23069 PyMem_Free(newargs);
jpayne@69 23070 return res;
jpayne@69 23071 }
jpayne@69 23072 static CYTHON_INLINE PyObject *__Pyx_PyVectorcall_FastCallDict(PyObject *func, __pyx_vectorcallfunc vc, PyObject *const *args, size_t nargs, PyObject *kw)
jpayne@69 23073 {
jpayne@69 23074 if (likely(kw == NULL) || PyDict_GET_SIZE(kw) == 0) {
jpayne@69 23075 return vc(func, args, nargs, NULL);
jpayne@69 23076 }
jpayne@69 23077 return __Pyx_PyVectorcall_FastCallDict_kw(func, vc, args, nargs, kw);
jpayne@69 23078 }
jpayne@69 23079 #endif
jpayne@69 23080
jpayne@69 23081 /* CythonFunctionShared */
jpayne@69 23082 #if CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 23083 static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void *cfunc) {
jpayne@69 23084 if (__Pyx_CyFunction_Check(func)) {
jpayne@69 23085 return PyCFunction_GetFunction(((__pyx_CyFunctionObject*)func)->func) == (PyCFunction) cfunc;
jpayne@69 23086 } else if (PyCFunction_Check(func)) {
jpayne@69 23087 return PyCFunction_GetFunction(func) == (PyCFunction) cfunc;
jpayne@69 23088 }
jpayne@69 23089 return 0;
jpayne@69 23090 }
jpayne@69 23091 #else
jpayne@69 23092 static CYTHON_INLINE int __Pyx__IsSameCyOrCFunction(PyObject *func, void *cfunc) {
jpayne@69 23093 return __Pyx_CyOrPyCFunction_Check(func) && __Pyx_CyOrPyCFunction_GET_FUNCTION(func) == (PyCFunction) cfunc;
jpayne@69 23094 }
jpayne@69 23095 #endif
jpayne@69 23096 static CYTHON_INLINE void __Pyx__CyFunction_SetClassObj(__pyx_CyFunctionObject* f, PyObject* classobj) {
jpayne@69 23097 #if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 23098 __Pyx_Py_XDECREF_SET(
jpayne@69 23099 __Pyx_CyFunction_GetClassObj(f),
jpayne@69 23100 ((classobj) ? __Pyx_NewRef(classobj) : NULL));
jpayne@69 23101 #else
jpayne@69 23102 __Pyx_Py_XDECREF_SET(
jpayne@69 23103 ((PyCMethodObject *) (f))->mm_class,
jpayne@69 23104 (PyTypeObject*)((classobj) ? __Pyx_NewRef(classobj) : NULL));
jpayne@69 23105 #endif
jpayne@69 23106 }
jpayne@69 23107 static PyObject *
jpayne@69 23108 __Pyx_CyFunction_get_doc(__pyx_CyFunctionObject *op, void *closure)
jpayne@69 23109 {
jpayne@69 23110 CYTHON_UNUSED_VAR(closure);
jpayne@69 23111 if (unlikely(op->func_doc == NULL)) {
jpayne@69 23112 #if CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 23113 op->func_doc = PyObject_GetAttrString(op->func, "__doc__");
jpayne@69 23114 if (unlikely(!op->func_doc)) return NULL;
jpayne@69 23115 #else
jpayne@69 23116 if (((PyCFunctionObject*)op)->m_ml->ml_doc) {
jpayne@69 23117 #if PY_MAJOR_VERSION >= 3
jpayne@69 23118 op->func_doc = PyUnicode_FromString(((PyCFunctionObject*)op)->m_ml->ml_doc);
jpayne@69 23119 #else
jpayne@69 23120 op->func_doc = PyString_FromString(((PyCFunctionObject*)op)->m_ml->ml_doc);
jpayne@69 23121 #endif
jpayne@69 23122 if (unlikely(op->func_doc == NULL))
jpayne@69 23123 return NULL;
jpayne@69 23124 } else {
jpayne@69 23125 Py_INCREF(Py_None);
jpayne@69 23126 return Py_None;
jpayne@69 23127 }
jpayne@69 23128 #endif
jpayne@69 23129 }
jpayne@69 23130 Py_INCREF(op->func_doc);
jpayne@69 23131 return op->func_doc;
jpayne@69 23132 }
jpayne@69 23133 static int
jpayne@69 23134 __Pyx_CyFunction_set_doc(__pyx_CyFunctionObject *op, PyObject *value, void *context)
jpayne@69 23135 {
jpayne@69 23136 CYTHON_UNUSED_VAR(context);
jpayne@69 23137 if (value == NULL) {
jpayne@69 23138 value = Py_None;
jpayne@69 23139 }
jpayne@69 23140 Py_INCREF(value);
jpayne@69 23141 __Pyx_Py_XDECREF_SET(op->func_doc, value);
jpayne@69 23142 return 0;
jpayne@69 23143 }
jpayne@69 23144 static PyObject *
jpayne@69 23145 __Pyx_CyFunction_get_name(__pyx_CyFunctionObject *op, void *context)
jpayne@69 23146 {
jpayne@69 23147 CYTHON_UNUSED_VAR(context);
jpayne@69 23148 if (unlikely(op->func_name == NULL)) {
jpayne@69 23149 #if CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 23150 op->func_name = PyObject_GetAttrString(op->func, "__name__");
jpayne@69 23151 #elif PY_MAJOR_VERSION >= 3
jpayne@69 23152 op->func_name = PyUnicode_InternFromString(((PyCFunctionObject*)op)->m_ml->ml_name);
jpayne@69 23153 #else
jpayne@69 23154 op->func_name = PyString_InternFromString(((PyCFunctionObject*)op)->m_ml->ml_name);
jpayne@69 23155 #endif
jpayne@69 23156 if (unlikely(op->func_name == NULL))
jpayne@69 23157 return NULL;
jpayne@69 23158 }
jpayne@69 23159 Py_INCREF(op->func_name);
jpayne@69 23160 return op->func_name;
jpayne@69 23161 }
jpayne@69 23162 static int
jpayne@69 23163 __Pyx_CyFunction_set_name(__pyx_CyFunctionObject *op, PyObject *value, void *context)
jpayne@69 23164 {
jpayne@69 23165 CYTHON_UNUSED_VAR(context);
jpayne@69 23166 #if PY_MAJOR_VERSION >= 3
jpayne@69 23167 if (unlikely(value == NULL || !PyUnicode_Check(value)))
jpayne@69 23168 #else
jpayne@69 23169 if (unlikely(value == NULL || !PyString_Check(value)))
jpayne@69 23170 #endif
jpayne@69 23171 {
jpayne@69 23172 PyErr_SetString(PyExc_TypeError,
jpayne@69 23173 "__name__ must be set to a string object");
jpayne@69 23174 return -1;
jpayne@69 23175 }
jpayne@69 23176 Py_INCREF(value);
jpayne@69 23177 __Pyx_Py_XDECREF_SET(op->func_name, value);
jpayne@69 23178 return 0;
jpayne@69 23179 }
jpayne@69 23180 static PyObject *
jpayne@69 23181 __Pyx_CyFunction_get_qualname(__pyx_CyFunctionObject *op, void *context)
jpayne@69 23182 {
jpayne@69 23183 CYTHON_UNUSED_VAR(context);
jpayne@69 23184 Py_INCREF(op->func_qualname);
jpayne@69 23185 return op->func_qualname;
jpayne@69 23186 }
jpayne@69 23187 static int
jpayne@69 23188 __Pyx_CyFunction_set_qualname(__pyx_CyFunctionObject *op, PyObject *value, void *context)
jpayne@69 23189 {
jpayne@69 23190 CYTHON_UNUSED_VAR(context);
jpayne@69 23191 #if PY_MAJOR_VERSION >= 3
jpayne@69 23192 if (unlikely(value == NULL || !PyUnicode_Check(value)))
jpayne@69 23193 #else
jpayne@69 23194 if (unlikely(value == NULL || !PyString_Check(value)))
jpayne@69 23195 #endif
jpayne@69 23196 {
jpayne@69 23197 PyErr_SetString(PyExc_TypeError,
jpayne@69 23198 "__qualname__ must be set to a string object");
jpayne@69 23199 return -1;
jpayne@69 23200 }
jpayne@69 23201 Py_INCREF(value);
jpayne@69 23202 __Pyx_Py_XDECREF_SET(op->func_qualname, value);
jpayne@69 23203 return 0;
jpayne@69 23204 }
jpayne@69 23205 static PyObject *
jpayne@69 23206 __Pyx_CyFunction_get_dict(__pyx_CyFunctionObject *op, void *context)
jpayne@69 23207 {
jpayne@69 23208 CYTHON_UNUSED_VAR(context);
jpayne@69 23209 if (unlikely(op->func_dict == NULL)) {
jpayne@69 23210 op->func_dict = PyDict_New();
jpayne@69 23211 if (unlikely(op->func_dict == NULL))
jpayne@69 23212 return NULL;
jpayne@69 23213 }
jpayne@69 23214 Py_INCREF(op->func_dict);
jpayne@69 23215 return op->func_dict;
jpayne@69 23216 }
jpayne@69 23217 static int
jpayne@69 23218 __Pyx_CyFunction_set_dict(__pyx_CyFunctionObject *op, PyObject *value, void *context)
jpayne@69 23219 {
jpayne@69 23220 CYTHON_UNUSED_VAR(context);
jpayne@69 23221 if (unlikely(value == NULL)) {
jpayne@69 23222 PyErr_SetString(PyExc_TypeError,
jpayne@69 23223 "function's dictionary may not be deleted");
jpayne@69 23224 return -1;
jpayne@69 23225 }
jpayne@69 23226 if (unlikely(!PyDict_Check(value))) {
jpayne@69 23227 PyErr_SetString(PyExc_TypeError,
jpayne@69 23228 "setting function's dictionary to a non-dict");
jpayne@69 23229 return -1;
jpayne@69 23230 }
jpayne@69 23231 Py_INCREF(value);
jpayne@69 23232 __Pyx_Py_XDECREF_SET(op->func_dict, value);
jpayne@69 23233 return 0;
jpayne@69 23234 }
jpayne@69 23235 static PyObject *
jpayne@69 23236 __Pyx_CyFunction_get_globals(__pyx_CyFunctionObject *op, void *context)
jpayne@69 23237 {
jpayne@69 23238 CYTHON_UNUSED_VAR(context);
jpayne@69 23239 Py_INCREF(op->func_globals);
jpayne@69 23240 return op->func_globals;
jpayne@69 23241 }
jpayne@69 23242 static PyObject *
jpayne@69 23243 __Pyx_CyFunction_get_closure(__pyx_CyFunctionObject *op, void *context)
jpayne@69 23244 {
jpayne@69 23245 CYTHON_UNUSED_VAR(op);
jpayne@69 23246 CYTHON_UNUSED_VAR(context);
jpayne@69 23247 Py_INCREF(Py_None);
jpayne@69 23248 return Py_None;
jpayne@69 23249 }
jpayne@69 23250 static PyObject *
jpayne@69 23251 __Pyx_CyFunction_get_code(__pyx_CyFunctionObject *op, void *context)
jpayne@69 23252 {
jpayne@69 23253 PyObject* result = (op->func_code) ? op->func_code : Py_None;
jpayne@69 23254 CYTHON_UNUSED_VAR(context);
jpayne@69 23255 Py_INCREF(result);
jpayne@69 23256 return result;
jpayne@69 23257 }
jpayne@69 23258 static int
jpayne@69 23259 __Pyx_CyFunction_init_defaults(__pyx_CyFunctionObject *op) {
jpayne@69 23260 int result = 0;
jpayne@69 23261 PyObject *res = op->defaults_getter((PyObject *) op);
jpayne@69 23262 if (unlikely(!res))
jpayne@69 23263 return -1;
jpayne@69 23264 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
jpayne@69 23265 op->defaults_tuple = PyTuple_GET_ITEM(res, 0);
jpayne@69 23266 Py_INCREF(op->defaults_tuple);
jpayne@69 23267 op->defaults_kwdict = PyTuple_GET_ITEM(res, 1);
jpayne@69 23268 Py_INCREF(op->defaults_kwdict);
jpayne@69 23269 #else
jpayne@69 23270 op->defaults_tuple = __Pyx_PySequence_ITEM(res, 0);
jpayne@69 23271 if (unlikely(!op->defaults_tuple)) result = -1;
jpayne@69 23272 else {
jpayne@69 23273 op->defaults_kwdict = __Pyx_PySequence_ITEM(res, 1);
jpayne@69 23274 if (unlikely(!op->defaults_kwdict)) result = -1;
jpayne@69 23275 }
jpayne@69 23276 #endif
jpayne@69 23277 Py_DECREF(res);
jpayne@69 23278 return result;
jpayne@69 23279 }
jpayne@69 23280 static int
jpayne@69 23281 __Pyx_CyFunction_set_defaults(__pyx_CyFunctionObject *op, PyObject* value, void *context) {
jpayne@69 23282 CYTHON_UNUSED_VAR(context);
jpayne@69 23283 if (!value) {
jpayne@69 23284 value = Py_None;
jpayne@69 23285 } else if (unlikely(value != Py_None && !PyTuple_Check(value))) {
jpayne@69 23286 PyErr_SetString(PyExc_TypeError,
jpayne@69 23287 "__defaults__ must be set to a tuple object");
jpayne@69 23288 return -1;
jpayne@69 23289 }
jpayne@69 23290 PyErr_WarnEx(PyExc_RuntimeWarning, "changes to cyfunction.__defaults__ will not "
jpayne@69 23291 "currently affect the values used in function calls", 1);
jpayne@69 23292 Py_INCREF(value);
jpayne@69 23293 __Pyx_Py_XDECREF_SET(op->defaults_tuple, value);
jpayne@69 23294 return 0;
jpayne@69 23295 }
jpayne@69 23296 static PyObject *
jpayne@69 23297 __Pyx_CyFunction_get_defaults(__pyx_CyFunctionObject *op, void *context) {
jpayne@69 23298 PyObject* result = op->defaults_tuple;
jpayne@69 23299 CYTHON_UNUSED_VAR(context);
jpayne@69 23300 if (unlikely(!result)) {
jpayne@69 23301 if (op->defaults_getter) {
jpayne@69 23302 if (unlikely(__Pyx_CyFunction_init_defaults(op) < 0)) return NULL;
jpayne@69 23303 result = op->defaults_tuple;
jpayne@69 23304 } else {
jpayne@69 23305 result = Py_None;
jpayne@69 23306 }
jpayne@69 23307 }
jpayne@69 23308 Py_INCREF(result);
jpayne@69 23309 return result;
jpayne@69 23310 }
jpayne@69 23311 static int
jpayne@69 23312 __Pyx_CyFunction_set_kwdefaults(__pyx_CyFunctionObject *op, PyObject* value, void *context) {
jpayne@69 23313 CYTHON_UNUSED_VAR(context);
jpayne@69 23314 if (!value) {
jpayne@69 23315 value = Py_None;
jpayne@69 23316 } else if (unlikely(value != Py_None && !PyDict_Check(value))) {
jpayne@69 23317 PyErr_SetString(PyExc_TypeError,
jpayne@69 23318 "__kwdefaults__ must be set to a dict object");
jpayne@69 23319 return -1;
jpayne@69 23320 }
jpayne@69 23321 PyErr_WarnEx(PyExc_RuntimeWarning, "changes to cyfunction.__kwdefaults__ will not "
jpayne@69 23322 "currently affect the values used in function calls", 1);
jpayne@69 23323 Py_INCREF(value);
jpayne@69 23324 __Pyx_Py_XDECREF_SET(op->defaults_kwdict, value);
jpayne@69 23325 return 0;
jpayne@69 23326 }
jpayne@69 23327 static PyObject *
jpayne@69 23328 __Pyx_CyFunction_get_kwdefaults(__pyx_CyFunctionObject *op, void *context) {
jpayne@69 23329 PyObject* result = op->defaults_kwdict;
jpayne@69 23330 CYTHON_UNUSED_VAR(context);
jpayne@69 23331 if (unlikely(!result)) {
jpayne@69 23332 if (op->defaults_getter) {
jpayne@69 23333 if (unlikely(__Pyx_CyFunction_init_defaults(op) < 0)) return NULL;
jpayne@69 23334 result = op->defaults_kwdict;
jpayne@69 23335 } else {
jpayne@69 23336 result = Py_None;
jpayne@69 23337 }
jpayne@69 23338 }
jpayne@69 23339 Py_INCREF(result);
jpayne@69 23340 return result;
jpayne@69 23341 }
jpayne@69 23342 static int
jpayne@69 23343 __Pyx_CyFunction_set_annotations(__pyx_CyFunctionObject *op, PyObject* value, void *context) {
jpayne@69 23344 CYTHON_UNUSED_VAR(context);
jpayne@69 23345 if (!value || value == Py_None) {
jpayne@69 23346 value = NULL;
jpayne@69 23347 } else if (unlikely(!PyDict_Check(value))) {
jpayne@69 23348 PyErr_SetString(PyExc_TypeError,
jpayne@69 23349 "__annotations__ must be set to a dict object");
jpayne@69 23350 return -1;
jpayne@69 23351 }
jpayne@69 23352 Py_XINCREF(value);
jpayne@69 23353 __Pyx_Py_XDECREF_SET(op->func_annotations, value);
jpayne@69 23354 return 0;
jpayne@69 23355 }
jpayne@69 23356 static PyObject *
jpayne@69 23357 __Pyx_CyFunction_get_annotations(__pyx_CyFunctionObject *op, void *context) {
jpayne@69 23358 PyObject* result = op->func_annotations;
jpayne@69 23359 CYTHON_UNUSED_VAR(context);
jpayne@69 23360 if (unlikely(!result)) {
jpayne@69 23361 result = PyDict_New();
jpayne@69 23362 if (unlikely(!result)) return NULL;
jpayne@69 23363 op->func_annotations = result;
jpayne@69 23364 }
jpayne@69 23365 Py_INCREF(result);
jpayne@69 23366 return result;
jpayne@69 23367 }
jpayne@69 23368 static PyObject *
jpayne@69 23369 __Pyx_CyFunction_get_is_coroutine(__pyx_CyFunctionObject *op, void *context) {
jpayne@69 23370 int is_coroutine;
jpayne@69 23371 CYTHON_UNUSED_VAR(context);
jpayne@69 23372 if (op->func_is_coroutine) {
jpayne@69 23373 return __Pyx_NewRef(op->func_is_coroutine);
jpayne@69 23374 }
jpayne@69 23375 is_coroutine = op->flags & __Pyx_CYFUNCTION_COROUTINE;
jpayne@69 23376 #if PY_VERSION_HEX >= 0x03050000
jpayne@69 23377 if (is_coroutine) {
jpayne@69 23378 PyObject *module, *fromlist, *marker = __pyx_n_s_is_coroutine;
jpayne@69 23379 fromlist = PyList_New(1);
jpayne@69 23380 if (unlikely(!fromlist)) return NULL;
jpayne@69 23381 Py_INCREF(marker);
jpayne@69 23382 #if CYTHON_ASSUME_SAFE_MACROS
jpayne@69 23383 PyList_SET_ITEM(fromlist, 0, marker);
jpayne@69 23384 #else
jpayne@69 23385 if (unlikely(PyList_SetItem(fromlist, 0, marker) < 0)) {
jpayne@69 23386 Py_DECREF(marker);
jpayne@69 23387 Py_DECREF(fromlist);
jpayne@69 23388 return NULL;
jpayne@69 23389 }
jpayne@69 23390 #endif
jpayne@69 23391 module = PyImport_ImportModuleLevelObject(__pyx_n_s_asyncio_coroutines, NULL, NULL, fromlist, 0);
jpayne@69 23392 Py_DECREF(fromlist);
jpayne@69 23393 if (unlikely(!module)) goto ignore;
jpayne@69 23394 op->func_is_coroutine = __Pyx_PyObject_GetAttrStr(module, marker);
jpayne@69 23395 Py_DECREF(module);
jpayne@69 23396 if (likely(op->func_is_coroutine)) {
jpayne@69 23397 return __Pyx_NewRef(op->func_is_coroutine);
jpayne@69 23398 }
jpayne@69 23399 ignore:
jpayne@69 23400 PyErr_Clear();
jpayne@69 23401 }
jpayne@69 23402 #endif
jpayne@69 23403 op->func_is_coroutine = __Pyx_PyBool_FromLong(is_coroutine);
jpayne@69 23404 return __Pyx_NewRef(op->func_is_coroutine);
jpayne@69 23405 }
jpayne@69 23406 #if CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 23407 static PyObject *
jpayne@69 23408 __Pyx_CyFunction_get_module(__pyx_CyFunctionObject *op, void *context) {
jpayne@69 23409 CYTHON_UNUSED_VAR(context);
jpayne@69 23410 return PyObject_GetAttrString(op->func, "__module__");
jpayne@69 23411 }
jpayne@69 23412 static int
jpayne@69 23413 __Pyx_CyFunction_set_module(__pyx_CyFunctionObject *op, PyObject* value, void *context) {
jpayne@69 23414 CYTHON_UNUSED_VAR(context);
jpayne@69 23415 return PyObject_SetAttrString(op->func, "__module__", value);
jpayne@69 23416 }
jpayne@69 23417 #endif
jpayne@69 23418 static PyGetSetDef __pyx_CyFunction_getsets[] = {
jpayne@69 23419 {(char *) "func_doc", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
jpayne@69 23420 {(char *) "__doc__", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0},
jpayne@69 23421 {(char *) "func_name", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0},
jpayne@69 23422 {(char *) "__name__", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0},
jpayne@69 23423 {(char *) "__qualname__", (getter)__Pyx_CyFunction_get_qualname, (setter)__Pyx_CyFunction_set_qualname, 0, 0},
jpayne@69 23424 {(char *) "func_dict", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0},
jpayne@69 23425 {(char *) "__dict__", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0},
jpayne@69 23426 {(char *) "func_globals", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0},
jpayne@69 23427 {(char *) "__globals__", (getter)__Pyx_CyFunction_get_globals, 0, 0, 0},
jpayne@69 23428 {(char *) "func_closure", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0},
jpayne@69 23429 {(char *) "__closure__", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0},
jpayne@69 23430 {(char *) "func_code", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
jpayne@69 23431 {(char *) "__code__", (getter)__Pyx_CyFunction_get_code, 0, 0, 0},
jpayne@69 23432 {(char *) "func_defaults", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0},
jpayne@69 23433 {(char *) "__defaults__", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0},
jpayne@69 23434 {(char *) "__kwdefaults__", (getter)__Pyx_CyFunction_get_kwdefaults, (setter)__Pyx_CyFunction_set_kwdefaults, 0, 0},
jpayne@69 23435 {(char *) "__annotations__", (getter)__Pyx_CyFunction_get_annotations, (setter)__Pyx_CyFunction_set_annotations, 0, 0},
jpayne@69 23436 {(char *) "_is_coroutine", (getter)__Pyx_CyFunction_get_is_coroutine, 0, 0, 0},
jpayne@69 23437 #if CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 23438 {"__module__", (getter)__Pyx_CyFunction_get_module, (setter)__Pyx_CyFunction_set_module, 0, 0},
jpayne@69 23439 #endif
jpayne@69 23440 {0, 0, 0, 0, 0}
jpayne@69 23441 };
jpayne@69 23442 static PyMemberDef __pyx_CyFunction_members[] = {
jpayne@69 23443 #if !CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 23444 {(char *) "__module__", T_OBJECT, offsetof(PyCFunctionObject, m_module), 0, 0},
jpayne@69 23445 #endif
jpayne@69 23446 #if CYTHON_USE_TYPE_SPECS
jpayne@69 23447 {(char *) "__dictoffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_dict), READONLY, 0},
jpayne@69 23448 #if CYTHON_METH_FASTCALL
jpayne@69 23449 #if CYTHON_BACKPORT_VECTORCALL
jpayne@69 23450 {(char *) "__vectorcalloffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_vectorcall), READONLY, 0},
jpayne@69 23451 #else
jpayne@69 23452 #if !CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 23453 {(char *) "__vectorcalloffset__", T_PYSSIZET, offsetof(PyCFunctionObject, vectorcall), READONLY, 0},
jpayne@69 23454 #endif
jpayne@69 23455 #endif
jpayne@69 23456 #endif
jpayne@69 23457 #if PY_VERSION_HEX < 0x030500A0 || CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 23458 {(char *) "__weaklistoffset__", T_PYSSIZET, offsetof(__pyx_CyFunctionObject, func_weakreflist), READONLY, 0},
jpayne@69 23459 #else
jpayne@69 23460 {(char *) "__weaklistoffset__", T_PYSSIZET, offsetof(PyCFunctionObject, m_weakreflist), READONLY, 0},
jpayne@69 23461 #endif
jpayne@69 23462 #endif
jpayne@69 23463 {0, 0, 0, 0, 0}
jpayne@69 23464 };
jpayne@69 23465 static PyObject *
jpayne@69 23466 __Pyx_CyFunction_reduce(__pyx_CyFunctionObject *m, PyObject *args)
jpayne@69 23467 {
jpayne@69 23468 CYTHON_UNUSED_VAR(args);
jpayne@69 23469 #if PY_MAJOR_VERSION >= 3
jpayne@69 23470 Py_INCREF(m->func_qualname);
jpayne@69 23471 return m->func_qualname;
jpayne@69 23472 #else
jpayne@69 23473 return PyString_FromString(((PyCFunctionObject*)m)->m_ml->ml_name);
jpayne@69 23474 #endif
jpayne@69 23475 }
jpayne@69 23476 static PyMethodDef __pyx_CyFunction_methods[] = {
jpayne@69 23477 {"__reduce__", (PyCFunction)__Pyx_CyFunction_reduce, METH_VARARGS, 0},
jpayne@69 23478 {0, 0, 0, 0}
jpayne@69 23479 };
jpayne@69 23480 #if PY_VERSION_HEX < 0x030500A0 || CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 23481 #define __Pyx_CyFunction_weakreflist(cyfunc) ((cyfunc)->func_weakreflist)
jpayne@69 23482 #else
jpayne@69 23483 #define __Pyx_CyFunction_weakreflist(cyfunc) (((PyCFunctionObject*)cyfunc)->m_weakreflist)
jpayne@69 23484 #endif
jpayne@69 23485 static PyObject *__Pyx_CyFunction_Init(__pyx_CyFunctionObject *op, PyMethodDef *ml, int flags, PyObject* qualname,
jpayne@69 23486 PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) {
jpayne@69 23487 #if !CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 23488 PyCFunctionObject *cf = (PyCFunctionObject*) op;
jpayne@69 23489 #endif
jpayne@69 23490 if (unlikely(op == NULL))
jpayne@69 23491 return NULL;
jpayne@69 23492 #if CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 23493 op->func = PyCFunction_NewEx(ml, (PyObject*)op, module);
jpayne@69 23494 if (unlikely(!op->func)) return NULL;
jpayne@69 23495 #endif
jpayne@69 23496 op->flags = flags;
jpayne@69 23497 __Pyx_CyFunction_weakreflist(op) = NULL;
jpayne@69 23498 #if !CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 23499 cf->m_ml = ml;
jpayne@69 23500 cf->m_self = (PyObject *) op;
jpayne@69 23501 #endif
jpayne@69 23502 Py_XINCREF(closure);
jpayne@69 23503 op->func_closure = closure;
jpayne@69 23504 #if !CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 23505 Py_XINCREF(module);
jpayne@69 23506 cf->m_module = module;
jpayne@69 23507 #endif
jpayne@69 23508 op->func_dict = NULL;
jpayne@69 23509 op->func_name = NULL;
jpayne@69 23510 Py_INCREF(qualname);
jpayne@69 23511 op->func_qualname = qualname;
jpayne@69 23512 op->func_doc = NULL;
jpayne@69 23513 #if PY_VERSION_HEX < 0x030900B1 || CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 23514 op->func_classobj = NULL;
jpayne@69 23515 #else
jpayne@69 23516 ((PyCMethodObject*)op)->mm_class = NULL;
jpayne@69 23517 #endif
jpayne@69 23518 op->func_globals = globals;
jpayne@69 23519 Py_INCREF(op->func_globals);
jpayne@69 23520 Py_XINCREF(code);
jpayne@69 23521 op->func_code = code;
jpayne@69 23522 op->defaults_pyobjects = 0;
jpayne@69 23523 op->defaults_size = 0;
jpayne@69 23524 op->defaults = NULL;
jpayne@69 23525 op->defaults_tuple = NULL;
jpayne@69 23526 op->defaults_kwdict = NULL;
jpayne@69 23527 op->defaults_getter = NULL;
jpayne@69 23528 op->func_annotations = NULL;
jpayne@69 23529 op->func_is_coroutine = NULL;
jpayne@69 23530 #if CYTHON_METH_FASTCALL
jpayne@69 23531 switch (ml->ml_flags & (METH_VARARGS | METH_FASTCALL | METH_NOARGS | METH_O | METH_KEYWORDS | METH_METHOD)) {
jpayne@69 23532 case METH_NOARGS:
jpayne@69 23533 __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_NOARGS;
jpayne@69 23534 break;
jpayne@69 23535 case METH_O:
jpayne@69 23536 __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_O;
jpayne@69 23537 break;
jpayne@69 23538 case METH_METHOD | METH_FASTCALL | METH_KEYWORDS:
jpayne@69 23539 __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD;
jpayne@69 23540 break;
jpayne@69 23541 case METH_FASTCALL | METH_KEYWORDS:
jpayne@69 23542 __Pyx_CyFunction_func_vectorcall(op) = __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS;
jpayne@69 23543 break;
jpayne@69 23544 case METH_VARARGS | METH_KEYWORDS:
jpayne@69 23545 __Pyx_CyFunction_func_vectorcall(op) = NULL;
jpayne@69 23546 break;
jpayne@69 23547 default:
jpayne@69 23548 PyErr_SetString(PyExc_SystemError, "Bad call flags for CyFunction");
jpayne@69 23549 Py_DECREF(op);
jpayne@69 23550 return NULL;
jpayne@69 23551 }
jpayne@69 23552 #endif
jpayne@69 23553 return (PyObject *) op;
jpayne@69 23554 }
jpayne@69 23555 static int
jpayne@69 23556 __Pyx_CyFunction_clear(__pyx_CyFunctionObject *m)
jpayne@69 23557 {
jpayne@69 23558 Py_CLEAR(m->func_closure);
jpayne@69 23559 #if CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 23560 Py_CLEAR(m->func);
jpayne@69 23561 #else
jpayne@69 23562 Py_CLEAR(((PyCFunctionObject*)m)->m_module);
jpayne@69 23563 #endif
jpayne@69 23564 Py_CLEAR(m->func_dict);
jpayne@69 23565 Py_CLEAR(m->func_name);
jpayne@69 23566 Py_CLEAR(m->func_qualname);
jpayne@69 23567 Py_CLEAR(m->func_doc);
jpayne@69 23568 Py_CLEAR(m->func_globals);
jpayne@69 23569 Py_CLEAR(m->func_code);
jpayne@69 23570 #if !CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 23571 #if PY_VERSION_HEX < 0x030900B1
jpayne@69 23572 Py_CLEAR(__Pyx_CyFunction_GetClassObj(m));
jpayne@69 23573 #else
jpayne@69 23574 {
jpayne@69 23575 PyObject *cls = (PyObject*) ((PyCMethodObject *) (m))->mm_class;
jpayne@69 23576 ((PyCMethodObject *) (m))->mm_class = NULL;
jpayne@69 23577 Py_XDECREF(cls);
jpayne@69 23578 }
jpayne@69 23579 #endif
jpayne@69 23580 #endif
jpayne@69 23581 Py_CLEAR(m->defaults_tuple);
jpayne@69 23582 Py_CLEAR(m->defaults_kwdict);
jpayne@69 23583 Py_CLEAR(m->func_annotations);
jpayne@69 23584 Py_CLEAR(m->func_is_coroutine);
jpayne@69 23585 if (m->defaults) {
jpayne@69 23586 PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m);
jpayne@69 23587 int i;
jpayne@69 23588 for (i = 0; i < m->defaults_pyobjects; i++)
jpayne@69 23589 Py_XDECREF(pydefaults[i]);
jpayne@69 23590 PyObject_Free(m->defaults);
jpayne@69 23591 m->defaults = NULL;
jpayne@69 23592 }
jpayne@69 23593 return 0;
jpayne@69 23594 }
jpayne@69 23595 static void __Pyx__CyFunction_dealloc(__pyx_CyFunctionObject *m)
jpayne@69 23596 {
jpayne@69 23597 if (__Pyx_CyFunction_weakreflist(m) != NULL)
jpayne@69 23598 PyObject_ClearWeakRefs((PyObject *) m);
jpayne@69 23599 __Pyx_CyFunction_clear(m);
jpayne@69 23600 __Pyx_PyHeapTypeObject_GC_Del(m);
jpayne@69 23601 }
jpayne@69 23602 static void __Pyx_CyFunction_dealloc(__pyx_CyFunctionObject *m)
jpayne@69 23603 {
jpayne@69 23604 PyObject_GC_UnTrack(m);
jpayne@69 23605 __Pyx__CyFunction_dealloc(m);
jpayne@69 23606 }
jpayne@69 23607 static int __Pyx_CyFunction_traverse(__pyx_CyFunctionObject *m, visitproc visit, void *arg)
jpayne@69 23608 {
jpayne@69 23609 Py_VISIT(m->func_closure);
jpayne@69 23610 #if CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 23611 Py_VISIT(m->func);
jpayne@69 23612 #else
jpayne@69 23613 Py_VISIT(((PyCFunctionObject*)m)->m_module);
jpayne@69 23614 #endif
jpayne@69 23615 Py_VISIT(m->func_dict);
jpayne@69 23616 Py_VISIT(m->func_name);
jpayne@69 23617 Py_VISIT(m->func_qualname);
jpayne@69 23618 Py_VISIT(m->func_doc);
jpayne@69 23619 Py_VISIT(m->func_globals);
jpayne@69 23620 Py_VISIT(m->func_code);
jpayne@69 23621 #if !CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 23622 Py_VISIT(__Pyx_CyFunction_GetClassObj(m));
jpayne@69 23623 #endif
jpayne@69 23624 Py_VISIT(m->defaults_tuple);
jpayne@69 23625 Py_VISIT(m->defaults_kwdict);
jpayne@69 23626 Py_VISIT(m->func_is_coroutine);
jpayne@69 23627 if (m->defaults) {
jpayne@69 23628 PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m);
jpayne@69 23629 int i;
jpayne@69 23630 for (i = 0; i < m->defaults_pyobjects; i++)
jpayne@69 23631 Py_VISIT(pydefaults[i]);
jpayne@69 23632 }
jpayne@69 23633 return 0;
jpayne@69 23634 }
jpayne@69 23635 static PyObject*
jpayne@69 23636 __Pyx_CyFunction_repr(__pyx_CyFunctionObject *op)
jpayne@69 23637 {
jpayne@69 23638 #if PY_MAJOR_VERSION >= 3
jpayne@69 23639 return PyUnicode_FromFormat("<cyfunction %U at %p>",
jpayne@69 23640 op->func_qualname, (void *)op);
jpayne@69 23641 #else
jpayne@69 23642 return PyString_FromFormat("<cyfunction %s at %p>",
jpayne@69 23643 PyString_AsString(op->func_qualname), (void *)op);
jpayne@69 23644 #endif
jpayne@69 23645 }
jpayne@69 23646 static PyObject * __Pyx_CyFunction_CallMethod(PyObject *func, PyObject *self, PyObject *arg, PyObject *kw) {
jpayne@69 23647 #if CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 23648 PyObject *f = ((__pyx_CyFunctionObject*)func)->func;
jpayne@69 23649 PyObject *py_name = NULL;
jpayne@69 23650 PyCFunction meth;
jpayne@69 23651 int flags;
jpayne@69 23652 meth = PyCFunction_GetFunction(f);
jpayne@69 23653 if (unlikely(!meth)) return NULL;
jpayne@69 23654 flags = PyCFunction_GetFlags(f);
jpayne@69 23655 if (unlikely(flags < 0)) return NULL;
jpayne@69 23656 #else
jpayne@69 23657 PyCFunctionObject* f = (PyCFunctionObject*)func;
jpayne@69 23658 PyCFunction meth = f->m_ml->ml_meth;
jpayne@69 23659 int flags = f->m_ml->ml_flags;
jpayne@69 23660 #endif
jpayne@69 23661 Py_ssize_t size;
jpayne@69 23662 switch (flags & (METH_VARARGS | METH_KEYWORDS | METH_NOARGS | METH_O)) {
jpayne@69 23663 case METH_VARARGS:
jpayne@69 23664 if (likely(kw == NULL || PyDict_Size(kw) == 0))
jpayne@69 23665 return (*meth)(self, arg);
jpayne@69 23666 break;
jpayne@69 23667 case METH_VARARGS | METH_KEYWORDS:
jpayne@69 23668 return (*(PyCFunctionWithKeywords)(void*)meth)(self, arg, kw);
jpayne@69 23669 case METH_NOARGS:
jpayne@69 23670 if (likely(kw == NULL || PyDict_Size(kw) == 0)) {
jpayne@69 23671 #if CYTHON_ASSUME_SAFE_MACROS
jpayne@69 23672 size = PyTuple_GET_SIZE(arg);
jpayne@69 23673 #else
jpayne@69 23674 size = PyTuple_Size(arg);
jpayne@69 23675 if (unlikely(size < 0)) return NULL;
jpayne@69 23676 #endif
jpayne@69 23677 if (likely(size == 0))
jpayne@69 23678 return (*meth)(self, NULL);
jpayne@69 23679 #if CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 23680 py_name = __Pyx_CyFunction_get_name((__pyx_CyFunctionObject*)func, NULL);
jpayne@69 23681 if (!py_name) return NULL;
jpayne@69 23682 PyErr_Format(PyExc_TypeError,
jpayne@69 23683 "%.200S() takes no arguments (%" CYTHON_FORMAT_SSIZE_T "d given)",
jpayne@69 23684 py_name, size);
jpayne@69 23685 Py_DECREF(py_name);
jpayne@69 23686 #else
jpayne@69 23687 PyErr_Format(PyExc_TypeError,
jpayne@69 23688 "%.200s() takes no arguments (%" CYTHON_FORMAT_SSIZE_T "d given)",
jpayne@69 23689 f->m_ml->ml_name, size);
jpayne@69 23690 #endif
jpayne@69 23691 return NULL;
jpayne@69 23692 }
jpayne@69 23693 break;
jpayne@69 23694 case METH_O:
jpayne@69 23695 if (likely(kw == NULL || PyDict_Size(kw) == 0)) {
jpayne@69 23696 #if CYTHON_ASSUME_SAFE_MACROS
jpayne@69 23697 size = PyTuple_GET_SIZE(arg);
jpayne@69 23698 #else
jpayne@69 23699 size = PyTuple_Size(arg);
jpayne@69 23700 if (unlikely(size < 0)) return NULL;
jpayne@69 23701 #endif
jpayne@69 23702 if (likely(size == 1)) {
jpayne@69 23703 PyObject *result, *arg0;
jpayne@69 23704 #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
jpayne@69 23705 arg0 = PyTuple_GET_ITEM(arg, 0);
jpayne@69 23706 #else
jpayne@69 23707 arg0 = __Pyx_PySequence_ITEM(arg, 0); if (unlikely(!arg0)) return NULL;
jpayne@69 23708 #endif
jpayne@69 23709 result = (*meth)(self, arg0);
jpayne@69 23710 #if !(CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS)
jpayne@69 23711 Py_DECREF(arg0);
jpayne@69 23712 #endif
jpayne@69 23713 return result;
jpayne@69 23714 }
jpayne@69 23715 #if CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 23716 py_name = __Pyx_CyFunction_get_name((__pyx_CyFunctionObject*)func, NULL);
jpayne@69 23717 if (!py_name) return NULL;
jpayne@69 23718 PyErr_Format(PyExc_TypeError,
jpayne@69 23719 "%.200S() takes exactly one argument (%" CYTHON_FORMAT_SSIZE_T "d given)",
jpayne@69 23720 py_name, size);
jpayne@69 23721 Py_DECREF(py_name);
jpayne@69 23722 #else
jpayne@69 23723 PyErr_Format(PyExc_TypeError,
jpayne@69 23724 "%.200s() takes exactly one argument (%" CYTHON_FORMAT_SSIZE_T "d given)",
jpayne@69 23725 f->m_ml->ml_name, size);
jpayne@69 23726 #endif
jpayne@69 23727 return NULL;
jpayne@69 23728 }
jpayne@69 23729 break;
jpayne@69 23730 default:
jpayne@69 23731 PyErr_SetString(PyExc_SystemError, "Bad call flags for CyFunction");
jpayne@69 23732 return NULL;
jpayne@69 23733 }
jpayne@69 23734 #if CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 23735 py_name = __Pyx_CyFunction_get_name((__pyx_CyFunctionObject*)func, NULL);
jpayne@69 23736 if (!py_name) return NULL;
jpayne@69 23737 PyErr_Format(PyExc_TypeError, "%.200S() takes no keyword arguments",
jpayne@69 23738 py_name);
jpayne@69 23739 Py_DECREF(py_name);
jpayne@69 23740 #else
jpayne@69 23741 PyErr_Format(PyExc_TypeError, "%.200s() takes no keyword arguments",
jpayne@69 23742 f->m_ml->ml_name);
jpayne@69 23743 #endif
jpayne@69 23744 return NULL;
jpayne@69 23745 }
jpayne@69 23746 static CYTHON_INLINE PyObject *__Pyx_CyFunction_Call(PyObject *func, PyObject *arg, PyObject *kw) {
jpayne@69 23747 PyObject *self, *result;
jpayne@69 23748 #if CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 23749 self = PyCFunction_GetSelf(((__pyx_CyFunctionObject*)func)->func);
jpayne@69 23750 if (unlikely(!self) && PyErr_Occurred()) return NULL;
jpayne@69 23751 #else
jpayne@69 23752 self = ((PyCFunctionObject*)func)->m_self;
jpayne@69 23753 #endif
jpayne@69 23754 result = __Pyx_CyFunction_CallMethod(func, self, arg, kw);
jpayne@69 23755 return result;
jpayne@69 23756 }
jpayne@69 23757 static PyObject *__Pyx_CyFunction_CallAsMethod(PyObject *func, PyObject *args, PyObject *kw) {
jpayne@69 23758 PyObject *result;
jpayne@69 23759 __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *) func;
jpayne@69 23760 #if CYTHON_METH_FASTCALL
jpayne@69 23761 __pyx_vectorcallfunc vc = __Pyx_CyFunction_func_vectorcall(cyfunc);
jpayne@69 23762 if (vc) {
jpayne@69 23763 #if CYTHON_ASSUME_SAFE_MACROS
jpayne@69 23764 return __Pyx_PyVectorcall_FastCallDict(func, vc, &PyTuple_GET_ITEM(args, 0), (size_t)PyTuple_GET_SIZE(args), kw);
jpayne@69 23765 #else
jpayne@69 23766 (void) &__Pyx_PyVectorcall_FastCallDict;
jpayne@69 23767 return PyVectorcall_Call(func, args, kw);
jpayne@69 23768 #endif
jpayne@69 23769 }
jpayne@69 23770 #endif
jpayne@69 23771 if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) {
jpayne@69 23772 Py_ssize_t argc;
jpayne@69 23773 PyObject *new_args;
jpayne@69 23774 PyObject *self;
jpayne@69 23775 #if CYTHON_ASSUME_SAFE_MACROS
jpayne@69 23776 argc = PyTuple_GET_SIZE(args);
jpayne@69 23777 #else
jpayne@69 23778 argc = PyTuple_Size(args);
jpayne@69 23779 if (unlikely(!argc) < 0) return NULL;
jpayne@69 23780 #endif
jpayne@69 23781 new_args = PyTuple_GetSlice(args, 1, argc);
jpayne@69 23782 if (unlikely(!new_args))
jpayne@69 23783 return NULL;
jpayne@69 23784 self = PyTuple_GetItem(args, 0);
jpayne@69 23785 if (unlikely(!self)) {
jpayne@69 23786 Py_DECREF(new_args);
jpayne@69 23787 #if PY_MAJOR_VERSION > 2
jpayne@69 23788 PyErr_Format(PyExc_TypeError,
jpayne@69 23789 "unbound method %.200S() needs an argument",
jpayne@69 23790 cyfunc->func_qualname);
jpayne@69 23791 #else
jpayne@69 23792 PyErr_SetString(PyExc_TypeError,
jpayne@69 23793 "unbound method needs an argument");
jpayne@69 23794 #endif
jpayne@69 23795 return NULL;
jpayne@69 23796 }
jpayne@69 23797 result = __Pyx_CyFunction_CallMethod(func, self, new_args, kw);
jpayne@69 23798 Py_DECREF(new_args);
jpayne@69 23799 } else {
jpayne@69 23800 result = __Pyx_CyFunction_Call(func, args, kw);
jpayne@69 23801 }
jpayne@69 23802 return result;
jpayne@69 23803 }
jpayne@69 23804 #if CYTHON_METH_FASTCALL
jpayne@69 23805 static CYTHON_INLINE int __Pyx_CyFunction_Vectorcall_CheckArgs(__pyx_CyFunctionObject *cyfunc, Py_ssize_t nargs, PyObject *kwnames)
jpayne@69 23806 {
jpayne@69 23807 int ret = 0;
jpayne@69 23808 if ((cyfunc->flags & __Pyx_CYFUNCTION_CCLASS) && !(cyfunc->flags & __Pyx_CYFUNCTION_STATICMETHOD)) {
jpayne@69 23809 if (unlikely(nargs < 1)) {
jpayne@69 23810 PyErr_Format(PyExc_TypeError, "%.200s() needs an argument",
jpayne@69 23811 ((PyCFunctionObject*)cyfunc)->m_ml->ml_name);
jpayne@69 23812 return -1;
jpayne@69 23813 }
jpayne@69 23814 ret = 1;
jpayne@69 23815 }
jpayne@69 23816 if (unlikely(kwnames) && unlikely(PyTuple_GET_SIZE(kwnames))) {
jpayne@69 23817 PyErr_Format(PyExc_TypeError,
jpayne@69 23818 "%.200s() takes no keyword arguments", ((PyCFunctionObject*)cyfunc)->m_ml->ml_name);
jpayne@69 23819 return -1;
jpayne@69 23820 }
jpayne@69 23821 return ret;
jpayne@69 23822 }
jpayne@69 23823 static PyObject * __Pyx_CyFunction_Vectorcall_NOARGS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames)
jpayne@69 23824 {
jpayne@69 23825 __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func;
jpayne@69 23826 PyMethodDef* def = ((PyCFunctionObject*)cyfunc)->m_ml;
jpayne@69 23827 #if CYTHON_BACKPORT_VECTORCALL
jpayne@69 23828 Py_ssize_t nargs = (Py_ssize_t)nargsf;
jpayne@69 23829 #else
jpayne@69 23830 Py_ssize_t nargs = PyVectorcall_NARGS(nargsf);
jpayne@69 23831 #endif
jpayne@69 23832 PyObject *self;
jpayne@69 23833 switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, kwnames)) {
jpayne@69 23834 case 1:
jpayne@69 23835 self = args[0];
jpayne@69 23836 args += 1;
jpayne@69 23837 nargs -= 1;
jpayne@69 23838 break;
jpayne@69 23839 case 0:
jpayne@69 23840 self = ((PyCFunctionObject*)cyfunc)->m_self;
jpayne@69 23841 break;
jpayne@69 23842 default:
jpayne@69 23843 return NULL;
jpayne@69 23844 }
jpayne@69 23845 if (unlikely(nargs != 0)) {
jpayne@69 23846 PyErr_Format(PyExc_TypeError,
jpayne@69 23847 "%.200s() takes no arguments (%" CYTHON_FORMAT_SSIZE_T "d given)",
jpayne@69 23848 def->ml_name, nargs);
jpayne@69 23849 return NULL;
jpayne@69 23850 }
jpayne@69 23851 return def->ml_meth(self, NULL);
jpayne@69 23852 }
jpayne@69 23853 static PyObject * __Pyx_CyFunction_Vectorcall_O(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames)
jpayne@69 23854 {
jpayne@69 23855 __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func;
jpayne@69 23856 PyMethodDef* def = ((PyCFunctionObject*)cyfunc)->m_ml;
jpayne@69 23857 #if CYTHON_BACKPORT_VECTORCALL
jpayne@69 23858 Py_ssize_t nargs = (Py_ssize_t)nargsf;
jpayne@69 23859 #else
jpayne@69 23860 Py_ssize_t nargs = PyVectorcall_NARGS(nargsf);
jpayne@69 23861 #endif
jpayne@69 23862 PyObject *self;
jpayne@69 23863 switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, kwnames)) {
jpayne@69 23864 case 1:
jpayne@69 23865 self = args[0];
jpayne@69 23866 args += 1;
jpayne@69 23867 nargs -= 1;
jpayne@69 23868 break;
jpayne@69 23869 case 0:
jpayne@69 23870 self = ((PyCFunctionObject*)cyfunc)->m_self;
jpayne@69 23871 break;
jpayne@69 23872 default:
jpayne@69 23873 return NULL;
jpayne@69 23874 }
jpayne@69 23875 if (unlikely(nargs != 1)) {
jpayne@69 23876 PyErr_Format(PyExc_TypeError,
jpayne@69 23877 "%.200s() takes exactly one argument (%" CYTHON_FORMAT_SSIZE_T "d given)",
jpayne@69 23878 def->ml_name, nargs);
jpayne@69 23879 return NULL;
jpayne@69 23880 }
jpayne@69 23881 return def->ml_meth(self, args[0]);
jpayne@69 23882 }
jpayne@69 23883 static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames)
jpayne@69 23884 {
jpayne@69 23885 __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func;
jpayne@69 23886 PyMethodDef* def = ((PyCFunctionObject*)cyfunc)->m_ml;
jpayne@69 23887 #if CYTHON_BACKPORT_VECTORCALL
jpayne@69 23888 Py_ssize_t nargs = (Py_ssize_t)nargsf;
jpayne@69 23889 #else
jpayne@69 23890 Py_ssize_t nargs = PyVectorcall_NARGS(nargsf);
jpayne@69 23891 #endif
jpayne@69 23892 PyObject *self;
jpayne@69 23893 switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, NULL)) {
jpayne@69 23894 case 1:
jpayne@69 23895 self = args[0];
jpayne@69 23896 args += 1;
jpayne@69 23897 nargs -= 1;
jpayne@69 23898 break;
jpayne@69 23899 case 0:
jpayne@69 23900 self = ((PyCFunctionObject*)cyfunc)->m_self;
jpayne@69 23901 break;
jpayne@69 23902 default:
jpayne@69 23903 return NULL;
jpayne@69 23904 }
jpayne@69 23905 return ((__Pyx_PyCFunctionFastWithKeywords)(void(*)(void))def->ml_meth)(self, args, nargs, kwnames);
jpayne@69 23906 }
jpayne@69 23907 static PyObject * __Pyx_CyFunction_Vectorcall_FASTCALL_KEYWORDS_METHOD(PyObject *func, PyObject *const *args, size_t nargsf, PyObject *kwnames)
jpayne@69 23908 {
jpayne@69 23909 __pyx_CyFunctionObject *cyfunc = (__pyx_CyFunctionObject *)func;
jpayne@69 23910 PyMethodDef* def = ((PyCFunctionObject*)cyfunc)->m_ml;
jpayne@69 23911 PyTypeObject *cls = (PyTypeObject *) __Pyx_CyFunction_GetClassObj(cyfunc);
jpayne@69 23912 #if CYTHON_BACKPORT_VECTORCALL
jpayne@69 23913 Py_ssize_t nargs = (Py_ssize_t)nargsf;
jpayne@69 23914 #else
jpayne@69 23915 Py_ssize_t nargs = PyVectorcall_NARGS(nargsf);
jpayne@69 23916 #endif
jpayne@69 23917 PyObject *self;
jpayne@69 23918 switch (__Pyx_CyFunction_Vectorcall_CheckArgs(cyfunc, nargs, NULL)) {
jpayne@69 23919 case 1:
jpayne@69 23920 self = args[0];
jpayne@69 23921 args += 1;
jpayne@69 23922 nargs -= 1;
jpayne@69 23923 break;
jpayne@69 23924 case 0:
jpayne@69 23925 self = ((PyCFunctionObject*)cyfunc)->m_self;
jpayne@69 23926 break;
jpayne@69 23927 default:
jpayne@69 23928 return NULL;
jpayne@69 23929 }
jpayne@69 23930 return ((__Pyx_PyCMethod)(void(*)(void))def->ml_meth)(self, cls, args, (size_t)nargs, kwnames);
jpayne@69 23931 }
jpayne@69 23932 #endif
jpayne@69 23933 #if CYTHON_USE_TYPE_SPECS
jpayne@69 23934 static PyType_Slot __pyx_CyFunctionType_slots[] = {
jpayne@69 23935 {Py_tp_dealloc, (void *)__Pyx_CyFunction_dealloc},
jpayne@69 23936 {Py_tp_repr, (void *)__Pyx_CyFunction_repr},
jpayne@69 23937 {Py_tp_call, (void *)__Pyx_CyFunction_CallAsMethod},
jpayne@69 23938 {Py_tp_traverse, (void *)__Pyx_CyFunction_traverse},
jpayne@69 23939 {Py_tp_clear, (void *)__Pyx_CyFunction_clear},
jpayne@69 23940 {Py_tp_methods, (void *)__pyx_CyFunction_methods},
jpayne@69 23941 {Py_tp_members, (void *)__pyx_CyFunction_members},
jpayne@69 23942 {Py_tp_getset, (void *)__pyx_CyFunction_getsets},
jpayne@69 23943 {Py_tp_descr_get, (void *)__Pyx_PyMethod_New},
jpayne@69 23944 {0, 0},
jpayne@69 23945 };
jpayne@69 23946 static PyType_Spec __pyx_CyFunctionType_spec = {
jpayne@69 23947 __PYX_TYPE_MODULE_PREFIX "cython_function_or_method",
jpayne@69 23948 sizeof(__pyx_CyFunctionObject),
jpayne@69 23949 0,
jpayne@69 23950 #ifdef Py_TPFLAGS_METHOD_DESCRIPTOR
jpayne@69 23951 Py_TPFLAGS_METHOD_DESCRIPTOR |
jpayne@69 23952 #endif
jpayne@69 23953 #if (defined(_Py_TPFLAGS_HAVE_VECTORCALL) && CYTHON_METH_FASTCALL)
jpayne@69 23954 _Py_TPFLAGS_HAVE_VECTORCALL |
jpayne@69 23955 #endif
jpayne@69 23956 Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_BASETYPE,
jpayne@69 23957 __pyx_CyFunctionType_slots
jpayne@69 23958 };
jpayne@69 23959 #else
jpayne@69 23960 static PyTypeObject __pyx_CyFunctionType_type = {
jpayne@69 23961 PyVarObject_HEAD_INIT(0, 0)
jpayne@69 23962 __PYX_TYPE_MODULE_PREFIX "cython_function_or_method",
jpayne@69 23963 sizeof(__pyx_CyFunctionObject),
jpayne@69 23964 0,
jpayne@69 23965 (destructor) __Pyx_CyFunction_dealloc,
jpayne@69 23966 #if !CYTHON_METH_FASTCALL
jpayne@69 23967 0,
jpayne@69 23968 #elif CYTHON_BACKPORT_VECTORCALL
jpayne@69 23969 (printfunc)offsetof(__pyx_CyFunctionObject, func_vectorcall),
jpayne@69 23970 #else
jpayne@69 23971 offsetof(PyCFunctionObject, vectorcall),
jpayne@69 23972 #endif
jpayne@69 23973 0,
jpayne@69 23974 0,
jpayne@69 23975 #if PY_MAJOR_VERSION < 3
jpayne@69 23976 0,
jpayne@69 23977 #else
jpayne@69 23978 0,
jpayne@69 23979 #endif
jpayne@69 23980 (reprfunc) __Pyx_CyFunction_repr,
jpayne@69 23981 0,
jpayne@69 23982 0,
jpayne@69 23983 0,
jpayne@69 23984 0,
jpayne@69 23985 __Pyx_CyFunction_CallAsMethod,
jpayne@69 23986 0,
jpayne@69 23987 0,
jpayne@69 23988 0,
jpayne@69 23989 0,
jpayne@69 23990 #ifdef Py_TPFLAGS_METHOD_DESCRIPTOR
jpayne@69 23991 Py_TPFLAGS_METHOD_DESCRIPTOR |
jpayne@69 23992 #endif
jpayne@69 23993 #if defined(_Py_TPFLAGS_HAVE_VECTORCALL) && CYTHON_METH_FASTCALL
jpayne@69 23994 _Py_TPFLAGS_HAVE_VECTORCALL |
jpayne@69 23995 #endif
jpayne@69 23996 Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_BASETYPE,
jpayne@69 23997 0,
jpayne@69 23998 (traverseproc) __Pyx_CyFunction_traverse,
jpayne@69 23999 (inquiry) __Pyx_CyFunction_clear,
jpayne@69 24000 0,
jpayne@69 24001 #if PY_VERSION_HEX < 0x030500A0
jpayne@69 24002 offsetof(__pyx_CyFunctionObject, func_weakreflist),
jpayne@69 24003 #else
jpayne@69 24004 offsetof(PyCFunctionObject, m_weakreflist),
jpayne@69 24005 #endif
jpayne@69 24006 0,
jpayne@69 24007 0,
jpayne@69 24008 __pyx_CyFunction_methods,
jpayne@69 24009 __pyx_CyFunction_members,
jpayne@69 24010 __pyx_CyFunction_getsets,
jpayne@69 24011 0,
jpayne@69 24012 0,
jpayne@69 24013 __Pyx_PyMethod_New,
jpayne@69 24014 0,
jpayne@69 24015 offsetof(__pyx_CyFunctionObject, func_dict),
jpayne@69 24016 0,
jpayne@69 24017 0,
jpayne@69 24018 0,
jpayne@69 24019 0,
jpayne@69 24020 0,
jpayne@69 24021 0,
jpayne@69 24022 0,
jpayne@69 24023 0,
jpayne@69 24024 0,
jpayne@69 24025 0,
jpayne@69 24026 0,
jpayne@69 24027 0,
jpayne@69 24028 #if PY_VERSION_HEX >= 0x030400a1
jpayne@69 24029 0,
jpayne@69 24030 #endif
jpayne@69 24031 #if PY_VERSION_HEX >= 0x030800b1 && (!CYTHON_COMPILING_IN_PYPY || PYPY_VERSION_NUM >= 0x07030800)
jpayne@69 24032 0,
jpayne@69 24033 #endif
jpayne@69 24034 #if __PYX_NEED_TP_PRINT_SLOT
jpayne@69 24035 0,
jpayne@69 24036 #endif
jpayne@69 24037 #if PY_VERSION_HEX >= 0x030C0000
jpayne@69 24038 0,
jpayne@69 24039 #endif
jpayne@69 24040 #if PY_VERSION_HEX >= 0x030d00A4
jpayne@69 24041 0,
jpayne@69 24042 #endif
jpayne@69 24043 #if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX >= 0x03090000 && PY_VERSION_HEX < 0x030a0000
jpayne@69 24044 0,
jpayne@69 24045 #endif
jpayne@69 24046 };
jpayne@69 24047 #endif
jpayne@69 24048 static int __pyx_CyFunction_init(PyObject *module) {
jpayne@69 24049 #if CYTHON_USE_TYPE_SPECS
jpayne@69 24050 __pyx_CyFunctionType = __Pyx_FetchCommonTypeFromSpec(module, &__pyx_CyFunctionType_spec, NULL);
jpayne@69 24051 #else
jpayne@69 24052 CYTHON_UNUSED_VAR(module);
jpayne@69 24053 __pyx_CyFunctionType = __Pyx_FetchCommonType(&__pyx_CyFunctionType_type);
jpayne@69 24054 #endif
jpayne@69 24055 if (unlikely(__pyx_CyFunctionType == NULL)) {
jpayne@69 24056 return -1;
jpayne@69 24057 }
jpayne@69 24058 return 0;
jpayne@69 24059 }
jpayne@69 24060 static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *func, size_t size, int pyobjects) {
jpayne@69 24061 __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
jpayne@69 24062 m->defaults = PyObject_Malloc(size);
jpayne@69 24063 if (unlikely(!m->defaults))
jpayne@69 24064 return PyErr_NoMemory();
jpayne@69 24065 memset(m->defaults, 0, size);
jpayne@69 24066 m->defaults_pyobjects = pyobjects;
jpayne@69 24067 m->defaults_size = size;
jpayne@69 24068 return m->defaults;
jpayne@69 24069 }
jpayne@69 24070 static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *func, PyObject *tuple) {
jpayne@69 24071 __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
jpayne@69 24072 m->defaults_tuple = tuple;
jpayne@69 24073 Py_INCREF(tuple);
jpayne@69 24074 }
jpayne@69 24075 static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *func, PyObject *dict) {
jpayne@69 24076 __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
jpayne@69 24077 m->defaults_kwdict = dict;
jpayne@69 24078 Py_INCREF(dict);
jpayne@69 24079 }
jpayne@69 24080 static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *func, PyObject *dict) {
jpayne@69 24081 __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func;
jpayne@69 24082 m->func_annotations = dict;
jpayne@69 24083 Py_INCREF(dict);
jpayne@69 24084 }
jpayne@69 24085
jpayne@69 24086 /* CythonFunction */
jpayne@69 24087 static PyObject *__Pyx_CyFunction_New(PyMethodDef *ml, int flags, PyObject* qualname,
jpayne@69 24088 PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) {
jpayne@69 24089 PyObject *op = __Pyx_CyFunction_Init(
jpayne@69 24090 PyObject_GC_New(__pyx_CyFunctionObject, __pyx_CyFunctionType),
jpayne@69 24091 ml, flags, qualname, closure, module, globals, code
jpayne@69 24092 );
jpayne@69 24093 if (likely(op)) {
jpayne@69 24094 PyObject_GC_Track(op);
jpayne@69 24095 }
jpayne@69 24096 return op;
jpayne@69 24097 }
jpayne@69 24098
jpayne@69 24099 /* CLineInTraceback */
jpayne@69 24100 #ifndef CYTHON_CLINE_IN_TRACEBACK
jpayne@69 24101 static int __Pyx_CLineForTraceback(PyThreadState *tstate, int c_line) {
jpayne@69 24102 PyObject *use_cline;
jpayne@69 24103 PyObject *ptype, *pvalue, *ptraceback;
jpayne@69 24104 #if CYTHON_COMPILING_IN_CPYTHON
jpayne@69 24105 PyObject **cython_runtime_dict;
jpayne@69 24106 #endif
jpayne@69 24107 CYTHON_MAYBE_UNUSED_VAR(tstate);
jpayne@69 24108 if (unlikely(!__pyx_cython_runtime)) {
jpayne@69 24109 return c_line;
jpayne@69 24110 }
jpayne@69 24111 __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback);
jpayne@69 24112 #if CYTHON_COMPILING_IN_CPYTHON
jpayne@69 24113 cython_runtime_dict = _PyObject_GetDictPtr(__pyx_cython_runtime);
jpayne@69 24114 if (likely(cython_runtime_dict)) {
jpayne@69 24115 __PYX_PY_DICT_LOOKUP_IF_MODIFIED(
jpayne@69 24116 use_cline, *cython_runtime_dict,
jpayne@69 24117 __Pyx_PyDict_GetItemStr(*cython_runtime_dict, __pyx_n_s_cline_in_traceback))
jpayne@69 24118 } else
jpayne@69 24119 #endif
jpayne@69 24120 {
jpayne@69 24121 PyObject *use_cline_obj = __Pyx_PyObject_GetAttrStrNoError(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback);
jpayne@69 24122 if (use_cline_obj) {
jpayne@69 24123 use_cline = PyObject_Not(use_cline_obj) ? Py_False : Py_True;
jpayne@69 24124 Py_DECREF(use_cline_obj);
jpayne@69 24125 } else {
jpayne@69 24126 PyErr_Clear();
jpayne@69 24127 use_cline = NULL;
jpayne@69 24128 }
jpayne@69 24129 }
jpayne@69 24130 if (!use_cline) {
jpayne@69 24131 c_line = 0;
jpayne@69 24132 (void) PyObject_SetAttr(__pyx_cython_runtime, __pyx_n_s_cline_in_traceback, Py_False);
jpayne@69 24133 }
jpayne@69 24134 else if (use_cline == Py_False || (use_cline != Py_True && PyObject_Not(use_cline) != 0)) {
jpayne@69 24135 c_line = 0;
jpayne@69 24136 }
jpayne@69 24137 __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback);
jpayne@69 24138 return c_line;
jpayne@69 24139 }
jpayne@69 24140 #endif
jpayne@69 24141
jpayne@69 24142 /* CodeObjectCache */
jpayne@69 24143 #if !CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 24144 static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) {
jpayne@69 24145 int start = 0, mid = 0, end = count - 1;
jpayne@69 24146 if (end >= 0 && code_line > entries[end].code_line) {
jpayne@69 24147 return count;
jpayne@69 24148 }
jpayne@69 24149 while (start < end) {
jpayne@69 24150 mid = start + (end - start) / 2;
jpayne@69 24151 if (code_line < entries[mid].code_line) {
jpayne@69 24152 end = mid;
jpayne@69 24153 } else if (code_line > entries[mid].code_line) {
jpayne@69 24154 start = mid + 1;
jpayne@69 24155 } else {
jpayne@69 24156 return mid;
jpayne@69 24157 }
jpayne@69 24158 }
jpayne@69 24159 if (code_line <= entries[mid].code_line) {
jpayne@69 24160 return mid;
jpayne@69 24161 } else {
jpayne@69 24162 return mid + 1;
jpayne@69 24163 }
jpayne@69 24164 }
jpayne@69 24165 static PyCodeObject *__pyx_find_code_object(int code_line) {
jpayne@69 24166 PyCodeObject* code_object;
jpayne@69 24167 int pos;
jpayne@69 24168 if (unlikely(!code_line) || unlikely(!__pyx_code_cache.entries)) {
jpayne@69 24169 return NULL;
jpayne@69 24170 }
jpayne@69 24171 pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
jpayne@69 24172 if (unlikely(pos >= __pyx_code_cache.count) || unlikely(__pyx_code_cache.entries[pos].code_line != code_line)) {
jpayne@69 24173 return NULL;
jpayne@69 24174 }
jpayne@69 24175 code_object = __pyx_code_cache.entries[pos].code_object;
jpayne@69 24176 Py_INCREF(code_object);
jpayne@69 24177 return code_object;
jpayne@69 24178 }
jpayne@69 24179 static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) {
jpayne@69 24180 int pos, i;
jpayne@69 24181 __Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries;
jpayne@69 24182 if (unlikely(!code_line)) {
jpayne@69 24183 return;
jpayne@69 24184 }
jpayne@69 24185 if (unlikely(!entries)) {
jpayne@69 24186 entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry));
jpayne@69 24187 if (likely(entries)) {
jpayne@69 24188 __pyx_code_cache.entries = entries;
jpayne@69 24189 __pyx_code_cache.max_count = 64;
jpayne@69 24190 __pyx_code_cache.count = 1;
jpayne@69 24191 entries[0].code_line = code_line;
jpayne@69 24192 entries[0].code_object = code_object;
jpayne@69 24193 Py_INCREF(code_object);
jpayne@69 24194 }
jpayne@69 24195 return;
jpayne@69 24196 }
jpayne@69 24197 pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
jpayne@69 24198 if ((pos < __pyx_code_cache.count) && unlikely(__pyx_code_cache.entries[pos].code_line == code_line)) {
jpayne@69 24199 PyCodeObject* tmp = entries[pos].code_object;
jpayne@69 24200 entries[pos].code_object = code_object;
jpayne@69 24201 Py_DECREF(tmp);
jpayne@69 24202 return;
jpayne@69 24203 }
jpayne@69 24204 if (__pyx_code_cache.count == __pyx_code_cache.max_count) {
jpayne@69 24205 int new_max = __pyx_code_cache.max_count + 64;
jpayne@69 24206 entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc(
jpayne@69 24207 __pyx_code_cache.entries, ((size_t)new_max) * sizeof(__Pyx_CodeObjectCacheEntry));
jpayne@69 24208 if (unlikely(!entries)) {
jpayne@69 24209 return;
jpayne@69 24210 }
jpayne@69 24211 __pyx_code_cache.entries = entries;
jpayne@69 24212 __pyx_code_cache.max_count = new_max;
jpayne@69 24213 }
jpayne@69 24214 for (i=__pyx_code_cache.count; i>pos; i--) {
jpayne@69 24215 entries[i] = entries[i-1];
jpayne@69 24216 }
jpayne@69 24217 entries[pos].code_line = code_line;
jpayne@69 24218 entries[pos].code_object = code_object;
jpayne@69 24219 __pyx_code_cache.count++;
jpayne@69 24220 Py_INCREF(code_object);
jpayne@69 24221 }
jpayne@69 24222 #endif
jpayne@69 24223
jpayne@69 24224 /* AddTraceback */
jpayne@69 24225 #include "compile.h"
jpayne@69 24226 #include "frameobject.h"
jpayne@69 24227 #include "traceback.h"
jpayne@69 24228 #if PY_VERSION_HEX >= 0x030b00a6 && !CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 24229 #ifndef Py_BUILD_CORE
jpayne@69 24230 #define Py_BUILD_CORE 1
jpayne@69 24231 #endif
jpayne@69 24232 #include "internal/pycore_frame.h"
jpayne@69 24233 #endif
jpayne@69 24234 #if CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 24235 static PyObject *__Pyx_PyCode_Replace_For_AddTraceback(PyObject *code, PyObject *scratch_dict,
jpayne@69 24236 PyObject *firstlineno, PyObject *name) {
jpayne@69 24237 PyObject *replace = NULL;
jpayne@69 24238 if (unlikely(PyDict_SetItemString(scratch_dict, "co_firstlineno", firstlineno))) return NULL;
jpayne@69 24239 if (unlikely(PyDict_SetItemString(scratch_dict, "co_name", name))) return NULL;
jpayne@69 24240 replace = PyObject_GetAttrString(code, "replace");
jpayne@69 24241 if (likely(replace)) {
jpayne@69 24242 PyObject *result;
jpayne@69 24243 result = PyObject_Call(replace, __pyx_empty_tuple, scratch_dict);
jpayne@69 24244 Py_DECREF(replace);
jpayne@69 24245 return result;
jpayne@69 24246 }
jpayne@69 24247 PyErr_Clear();
jpayne@69 24248 #if __PYX_LIMITED_VERSION_HEX < 0x030780000
jpayne@69 24249 {
jpayne@69 24250 PyObject *compiled = NULL, *result = NULL;
jpayne@69 24251 if (unlikely(PyDict_SetItemString(scratch_dict, "code", code))) return NULL;
jpayne@69 24252 if (unlikely(PyDict_SetItemString(scratch_dict, "type", (PyObject*)(&PyType_Type)))) return NULL;
jpayne@69 24253 compiled = Py_CompileString(
jpayne@69 24254 "out = type(code)(\n"
jpayne@69 24255 " code.co_argcount, code.co_kwonlyargcount, code.co_nlocals, code.co_stacksize,\n"
jpayne@69 24256 " code.co_flags, code.co_code, code.co_consts, code.co_names,\n"
jpayne@69 24257 " code.co_varnames, code.co_filename, co_name, co_firstlineno,\n"
jpayne@69 24258 " code.co_lnotab)\n", "<dummy>", Py_file_input);
jpayne@69 24259 if (!compiled) return NULL;
jpayne@69 24260 result = PyEval_EvalCode(compiled, scratch_dict, scratch_dict);
jpayne@69 24261 Py_DECREF(compiled);
jpayne@69 24262 if (!result) PyErr_Print();
jpayne@69 24263 Py_DECREF(result);
jpayne@69 24264 result = PyDict_GetItemString(scratch_dict, "out");
jpayne@69 24265 if (result) Py_INCREF(result);
jpayne@69 24266 return result;
jpayne@69 24267 }
jpayne@69 24268 #else
jpayne@69 24269 return NULL;
jpayne@69 24270 #endif
jpayne@69 24271 }
jpayne@69 24272 static void __Pyx_AddTraceback(const char *funcname, int c_line,
jpayne@69 24273 int py_line, const char *filename) {
jpayne@69 24274 PyObject *code_object = NULL, *py_py_line = NULL, *py_funcname = NULL, *dict = NULL;
jpayne@69 24275 PyObject *replace = NULL, *getframe = NULL, *frame = NULL;
jpayne@69 24276 PyObject *exc_type, *exc_value, *exc_traceback;
jpayne@69 24277 int success = 0;
jpayne@69 24278 if (c_line) {
jpayne@69 24279 (void) __pyx_cfilenm;
jpayne@69 24280 (void) __Pyx_CLineForTraceback(__Pyx_PyThreadState_Current, c_line);
jpayne@69 24281 }
jpayne@69 24282 PyErr_Fetch(&exc_type, &exc_value, &exc_traceback);
jpayne@69 24283 code_object = Py_CompileString("_getframe()", filename, Py_eval_input);
jpayne@69 24284 if (unlikely(!code_object)) goto bad;
jpayne@69 24285 py_py_line = PyLong_FromLong(py_line);
jpayne@69 24286 if (unlikely(!py_py_line)) goto bad;
jpayne@69 24287 py_funcname = PyUnicode_FromString(funcname);
jpayne@69 24288 if (unlikely(!py_funcname)) goto bad;
jpayne@69 24289 dict = PyDict_New();
jpayne@69 24290 if (unlikely(!dict)) goto bad;
jpayne@69 24291 {
jpayne@69 24292 PyObject *old_code_object = code_object;
jpayne@69 24293 code_object = __Pyx_PyCode_Replace_For_AddTraceback(code_object, dict, py_py_line, py_funcname);
jpayne@69 24294 Py_DECREF(old_code_object);
jpayne@69 24295 }
jpayne@69 24296 if (unlikely(!code_object)) goto bad;
jpayne@69 24297 getframe = PySys_GetObject("_getframe");
jpayne@69 24298 if (unlikely(!getframe)) goto bad;
jpayne@69 24299 if (unlikely(PyDict_SetItemString(dict, "_getframe", getframe))) goto bad;
jpayne@69 24300 frame = PyEval_EvalCode(code_object, dict, dict);
jpayne@69 24301 if (unlikely(!frame) || frame == Py_None) goto bad;
jpayne@69 24302 success = 1;
jpayne@69 24303 bad:
jpayne@69 24304 PyErr_Restore(exc_type, exc_value, exc_traceback);
jpayne@69 24305 Py_XDECREF(code_object);
jpayne@69 24306 Py_XDECREF(py_py_line);
jpayne@69 24307 Py_XDECREF(py_funcname);
jpayne@69 24308 Py_XDECREF(dict);
jpayne@69 24309 Py_XDECREF(replace);
jpayne@69 24310 if (success) {
jpayne@69 24311 PyTraceBack_Here(
jpayne@69 24312 (struct _frame*)frame);
jpayne@69 24313 }
jpayne@69 24314 Py_XDECREF(frame);
jpayne@69 24315 }
jpayne@69 24316 #else
jpayne@69 24317 static PyCodeObject* __Pyx_CreateCodeObjectForTraceback(
jpayne@69 24318 const char *funcname, int c_line,
jpayne@69 24319 int py_line, const char *filename) {
jpayne@69 24320 PyCodeObject *py_code = NULL;
jpayne@69 24321 PyObject *py_funcname = NULL;
jpayne@69 24322 #if PY_MAJOR_VERSION < 3
jpayne@69 24323 PyObject *py_srcfile = NULL;
jpayne@69 24324 py_srcfile = PyString_FromString(filename);
jpayne@69 24325 if (!py_srcfile) goto bad;
jpayne@69 24326 #endif
jpayne@69 24327 if (c_line) {
jpayne@69 24328 #if PY_MAJOR_VERSION < 3
jpayne@69 24329 py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
jpayne@69 24330 if (!py_funcname) goto bad;
jpayne@69 24331 #else
jpayne@69 24332 py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
jpayne@69 24333 if (!py_funcname) goto bad;
jpayne@69 24334 funcname = PyUnicode_AsUTF8(py_funcname);
jpayne@69 24335 if (!funcname) goto bad;
jpayne@69 24336 #endif
jpayne@69 24337 }
jpayne@69 24338 else {
jpayne@69 24339 #if PY_MAJOR_VERSION < 3
jpayne@69 24340 py_funcname = PyString_FromString(funcname);
jpayne@69 24341 if (!py_funcname) goto bad;
jpayne@69 24342 #endif
jpayne@69 24343 }
jpayne@69 24344 #if PY_MAJOR_VERSION < 3
jpayne@69 24345 py_code = __Pyx_PyCode_New(
jpayne@69 24346 0,
jpayne@69 24347 0,
jpayne@69 24348 0,
jpayne@69 24349 0,
jpayne@69 24350 0,
jpayne@69 24351 0,
jpayne@69 24352 __pyx_empty_bytes, /*PyObject *code,*/
jpayne@69 24353 __pyx_empty_tuple, /*PyObject *consts,*/
jpayne@69 24354 __pyx_empty_tuple, /*PyObject *names,*/
jpayne@69 24355 __pyx_empty_tuple, /*PyObject *varnames,*/
jpayne@69 24356 __pyx_empty_tuple, /*PyObject *freevars,*/
jpayne@69 24357 __pyx_empty_tuple, /*PyObject *cellvars,*/
jpayne@69 24358 py_srcfile, /*PyObject *filename,*/
jpayne@69 24359 py_funcname, /*PyObject *name,*/
jpayne@69 24360 py_line,
jpayne@69 24361 __pyx_empty_bytes /*PyObject *lnotab*/
jpayne@69 24362 );
jpayne@69 24363 Py_DECREF(py_srcfile);
jpayne@69 24364 #else
jpayne@69 24365 py_code = PyCode_NewEmpty(filename, funcname, py_line);
jpayne@69 24366 #endif
jpayne@69 24367 Py_XDECREF(py_funcname);
jpayne@69 24368 return py_code;
jpayne@69 24369 bad:
jpayne@69 24370 Py_XDECREF(py_funcname);
jpayne@69 24371 #if PY_MAJOR_VERSION < 3
jpayne@69 24372 Py_XDECREF(py_srcfile);
jpayne@69 24373 #endif
jpayne@69 24374 return NULL;
jpayne@69 24375 }
jpayne@69 24376 static void __Pyx_AddTraceback(const char *funcname, int c_line,
jpayne@69 24377 int py_line, const char *filename) {
jpayne@69 24378 PyCodeObject *py_code = 0;
jpayne@69 24379 PyFrameObject *py_frame = 0;
jpayne@69 24380 PyThreadState *tstate = __Pyx_PyThreadState_Current;
jpayne@69 24381 PyObject *ptype, *pvalue, *ptraceback;
jpayne@69 24382 if (c_line) {
jpayne@69 24383 c_line = __Pyx_CLineForTraceback(tstate, c_line);
jpayne@69 24384 }
jpayne@69 24385 py_code = __pyx_find_code_object(c_line ? -c_line : py_line);
jpayne@69 24386 if (!py_code) {
jpayne@69 24387 __Pyx_ErrFetchInState(tstate, &ptype, &pvalue, &ptraceback);
jpayne@69 24388 py_code = __Pyx_CreateCodeObjectForTraceback(
jpayne@69 24389 funcname, c_line, py_line, filename);
jpayne@69 24390 if (!py_code) {
jpayne@69 24391 /* If the code object creation fails, then we should clear the
jpayne@69 24392 fetched exception references and propagate the new exception */
jpayne@69 24393 Py_XDECREF(ptype);
jpayne@69 24394 Py_XDECREF(pvalue);
jpayne@69 24395 Py_XDECREF(ptraceback);
jpayne@69 24396 goto bad;
jpayne@69 24397 }
jpayne@69 24398 __Pyx_ErrRestoreInState(tstate, ptype, pvalue, ptraceback);
jpayne@69 24399 __pyx_insert_code_object(c_line ? -c_line : py_line, py_code);
jpayne@69 24400 }
jpayne@69 24401 py_frame = PyFrame_New(
jpayne@69 24402 tstate, /*PyThreadState *tstate,*/
jpayne@69 24403 py_code, /*PyCodeObject *code,*/
jpayne@69 24404 __pyx_d, /*PyObject *globals,*/
jpayne@69 24405 0 /*PyObject *locals*/
jpayne@69 24406 );
jpayne@69 24407 if (!py_frame) goto bad;
jpayne@69 24408 __Pyx_PyFrame_SetLineNumber(py_frame, py_line);
jpayne@69 24409 PyTraceBack_Here(py_frame);
jpayne@69 24410 bad:
jpayne@69 24411 Py_XDECREF(py_code);
jpayne@69 24412 Py_XDECREF(py_frame);
jpayne@69 24413 }
jpayne@69 24414 #endif
jpayne@69 24415
jpayne@69 24416 /* CIntFromPyVerify */
jpayne@69 24417 #define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\
jpayne@69 24418 __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0)
jpayne@69 24419 #define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\
jpayne@69 24420 __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1)
jpayne@69 24421 #define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\
jpayne@69 24422 {\
jpayne@69 24423 func_type value = func_value;\
jpayne@69 24424 if (sizeof(target_type) < sizeof(func_type)) {\
jpayne@69 24425 if (unlikely(value != (func_type) (target_type) value)) {\
jpayne@69 24426 func_type zero = 0;\
jpayne@69 24427 if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\
jpayne@69 24428 return (target_type) -1;\
jpayne@69 24429 if (is_unsigned && unlikely(value < zero))\
jpayne@69 24430 goto raise_neg_overflow;\
jpayne@69 24431 else\
jpayne@69 24432 goto raise_overflow;\
jpayne@69 24433 }\
jpayne@69 24434 }\
jpayne@69 24435 return (target_type) value;\
jpayne@69 24436 }
jpayne@69 24437
jpayne@69 24438 /* CIntFromPy */
jpayne@69 24439 static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) {
jpayne@69 24440 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
jpayne@69 24441 #pragma GCC diagnostic push
jpayne@69 24442 #pragma GCC diagnostic ignored "-Wconversion"
jpayne@69 24443 #endif
jpayne@69 24444 const int neg_one = (int) -1, const_zero = (int) 0;
jpayne@69 24445 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
jpayne@69 24446 #pragma GCC diagnostic pop
jpayne@69 24447 #endif
jpayne@69 24448 const int is_unsigned = neg_one > const_zero;
jpayne@69 24449 #if PY_MAJOR_VERSION < 3
jpayne@69 24450 if (likely(PyInt_Check(x))) {
jpayne@69 24451 if ((sizeof(int) < sizeof(long))) {
jpayne@69 24452 __PYX_VERIFY_RETURN_INT(int, long, PyInt_AS_LONG(x))
jpayne@69 24453 } else {
jpayne@69 24454 long val = PyInt_AS_LONG(x);
jpayne@69 24455 if (is_unsigned && unlikely(val < 0)) {
jpayne@69 24456 goto raise_neg_overflow;
jpayne@69 24457 }
jpayne@69 24458 return (int) val;
jpayne@69 24459 }
jpayne@69 24460 }
jpayne@69 24461 #endif
jpayne@69 24462 if (unlikely(!PyLong_Check(x))) {
jpayne@69 24463 int val;
jpayne@69 24464 PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
jpayne@69 24465 if (!tmp) return (int) -1;
jpayne@69 24466 val = __Pyx_PyInt_As_int(tmp);
jpayne@69 24467 Py_DECREF(tmp);
jpayne@69 24468 return val;
jpayne@69 24469 }
jpayne@69 24470 if (is_unsigned) {
jpayne@69 24471 #if CYTHON_USE_PYLONG_INTERNALS
jpayne@69 24472 if (unlikely(__Pyx_PyLong_IsNeg(x))) {
jpayne@69 24473 goto raise_neg_overflow;
jpayne@69 24474 } else if (__Pyx_PyLong_IsCompact(x)) {
jpayne@69 24475 __PYX_VERIFY_RETURN_INT(int, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x))
jpayne@69 24476 } else {
jpayne@69 24477 const digit* digits = __Pyx_PyLong_Digits(x);
jpayne@69 24478 assert(__Pyx_PyLong_DigitCount(x) > 1);
jpayne@69 24479 switch (__Pyx_PyLong_DigitCount(x)) {
jpayne@69 24480 case 2:
jpayne@69 24481 if ((8 * sizeof(int) > 1 * PyLong_SHIFT)) {
jpayne@69 24482 if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
jpayne@69 24483 __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
jpayne@69 24484 } else if ((8 * sizeof(int) >= 2 * PyLong_SHIFT)) {
jpayne@69 24485 return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
jpayne@69 24486 }
jpayne@69 24487 }
jpayne@69 24488 break;
jpayne@69 24489 case 3:
jpayne@69 24490 if ((8 * sizeof(int) > 2 * PyLong_SHIFT)) {
jpayne@69 24491 if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
jpayne@69 24492 __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
jpayne@69 24493 } else if ((8 * sizeof(int) >= 3 * PyLong_SHIFT)) {
jpayne@69 24494 return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
jpayne@69 24495 }
jpayne@69 24496 }
jpayne@69 24497 break;
jpayne@69 24498 case 4:
jpayne@69 24499 if ((8 * sizeof(int) > 3 * PyLong_SHIFT)) {
jpayne@69 24500 if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
jpayne@69 24501 __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
jpayne@69 24502 } else if ((8 * sizeof(int) >= 4 * PyLong_SHIFT)) {
jpayne@69 24503 return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
jpayne@69 24504 }
jpayne@69 24505 }
jpayne@69 24506 break;
jpayne@69 24507 }
jpayne@69 24508 }
jpayne@69 24509 #endif
jpayne@69 24510 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7
jpayne@69 24511 if (unlikely(Py_SIZE(x) < 0)) {
jpayne@69 24512 goto raise_neg_overflow;
jpayne@69 24513 }
jpayne@69 24514 #else
jpayne@69 24515 {
jpayne@69 24516 int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
jpayne@69 24517 if (unlikely(result < 0))
jpayne@69 24518 return (int) -1;
jpayne@69 24519 if (unlikely(result == 1))
jpayne@69 24520 goto raise_neg_overflow;
jpayne@69 24521 }
jpayne@69 24522 #endif
jpayne@69 24523 if ((sizeof(int) <= sizeof(unsigned long))) {
jpayne@69 24524 __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x))
jpayne@69 24525 #ifdef HAVE_LONG_LONG
jpayne@69 24526 } else if ((sizeof(int) <= sizeof(unsigned PY_LONG_LONG))) {
jpayne@69 24527 __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
jpayne@69 24528 #endif
jpayne@69 24529 }
jpayne@69 24530 } else {
jpayne@69 24531 #if CYTHON_USE_PYLONG_INTERNALS
jpayne@69 24532 if (__Pyx_PyLong_IsCompact(x)) {
jpayne@69 24533 __PYX_VERIFY_RETURN_INT(int, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x))
jpayne@69 24534 } else {
jpayne@69 24535 const digit* digits = __Pyx_PyLong_Digits(x);
jpayne@69 24536 assert(__Pyx_PyLong_DigitCount(x) > 1);
jpayne@69 24537 switch (__Pyx_PyLong_SignedDigitCount(x)) {
jpayne@69 24538 case -2:
jpayne@69 24539 if ((8 * sizeof(int) - 1 > 1 * PyLong_SHIFT)) {
jpayne@69 24540 if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
jpayne@69 24541 __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
jpayne@69 24542 } else if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) {
jpayne@69 24543 return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
jpayne@69 24544 }
jpayne@69 24545 }
jpayne@69 24546 break;
jpayne@69 24547 case 2:
jpayne@69 24548 if ((8 * sizeof(int) > 1 * PyLong_SHIFT)) {
jpayne@69 24549 if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
jpayne@69 24550 __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
jpayne@69 24551 } else if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) {
jpayne@69 24552 return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
jpayne@69 24553 }
jpayne@69 24554 }
jpayne@69 24555 break;
jpayne@69 24556 case -3:
jpayne@69 24557 if ((8 * sizeof(int) - 1 > 2 * PyLong_SHIFT)) {
jpayne@69 24558 if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
jpayne@69 24559 __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
jpayne@69 24560 } else if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) {
jpayne@69 24561 return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
jpayne@69 24562 }
jpayne@69 24563 }
jpayne@69 24564 break;
jpayne@69 24565 case 3:
jpayne@69 24566 if ((8 * sizeof(int) > 2 * PyLong_SHIFT)) {
jpayne@69 24567 if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
jpayne@69 24568 __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
jpayne@69 24569 } else if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) {
jpayne@69 24570 return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
jpayne@69 24571 }
jpayne@69 24572 }
jpayne@69 24573 break;
jpayne@69 24574 case -4:
jpayne@69 24575 if ((8 * sizeof(int) - 1 > 3 * PyLong_SHIFT)) {
jpayne@69 24576 if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
jpayne@69 24577 __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
jpayne@69 24578 } else if ((8 * sizeof(int) - 1 > 4 * PyLong_SHIFT)) {
jpayne@69 24579 return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
jpayne@69 24580 }
jpayne@69 24581 }
jpayne@69 24582 break;
jpayne@69 24583 case 4:
jpayne@69 24584 if ((8 * sizeof(int) > 3 * PyLong_SHIFT)) {
jpayne@69 24585 if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
jpayne@69 24586 __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
jpayne@69 24587 } else if ((8 * sizeof(int) - 1 > 4 * PyLong_SHIFT)) {
jpayne@69 24588 return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
jpayne@69 24589 }
jpayne@69 24590 }
jpayne@69 24591 break;
jpayne@69 24592 }
jpayne@69 24593 }
jpayne@69 24594 #endif
jpayne@69 24595 if ((sizeof(int) <= sizeof(long))) {
jpayne@69 24596 __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x))
jpayne@69 24597 #ifdef HAVE_LONG_LONG
jpayne@69 24598 } else if ((sizeof(int) <= sizeof(PY_LONG_LONG))) {
jpayne@69 24599 __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x))
jpayne@69 24600 #endif
jpayne@69 24601 }
jpayne@69 24602 }
jpayne@69 24603 {
jpayne@69 24604 int val;
jpayne@69 24605 int ret = -1;
jpayne@69 24606 #if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 24607 Py_ssize_t bytes_copied = PyLong_AsNativeBytes(
jpayne@69 24608 x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0));
jpayne@69 24609 if (unlikely(bytes_copied == -1)) {
jpayne@69 24610 } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) {
jpayne@69 24611 goto raise_overflow;
jpayne@69 24612 } else {
jpayne@69 24613 ret = 0;
jpayne@69 24614 }
jpayne@69 24615 #elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray)
jpayne@69 24616 int one = 1; int is_little = (int)*(unsigned char *)&one;
jpayne@69 24617 unsigned char *bytes = (unsigned char *)&val;
jpayne@69 24618 ret = _PyLong_AsByteArray((PyLongObject *)x,
jpayne@69 24619 bytes, sizeof(val),
jpayne@69 24620 is_little, !is_unsigned);
jpayne@69 24621 #else
jpayne@69 24622 PyObject *v;
jpayne@69 24623 PyObject *stepval = NULL, *mask = NULL, *shift = NULL;
jpayne@69 24624 int bits, remaining_bits, is_negative = 0;
jpayne@69 24625 int chunk_size = (sizeof(long) < 8) ? 30 : 62;
jpayne@69 24626 if (likely(PyLong_CheckExact(x))) {
jpayne@69 24627 v = __Pyx_NewRef(x);
jpayne@69 24628 } else {
jpayne@69 24629 v = PyNumber_Long(x);
jpayne@69 24630 if (unlikely(!v)) return (int) -1;
jpayne@69 24631 assert(PyLong_CheckExact(v));
jpayne@69 24632 }
jpayne@69 24633 {
jpayne@69 24634 int result = PyObject_RichCompareBool(v, Py_False, Py_LT);
jpayne@69 24635 if (unlikely(result < 0)) {
jpayne@69 24636 Py_DECREF(v);
jpayne@69 24637 return (int) -1;
jpayne@69 24638 }
jpayne@69 24639 is_negative = result == 1;
jpayne@69 24640 }
jpayne@69 24641 if (is_unsigned && unlikely(is_negative)) {
jpayne@69 24642 Py_DECREF(v);
jpayne@69 24643 goto raise_neg_overflow;
jpayne@69 24644 } else if (is_negative) {
jpayne@69 24645 stepval = PyNumber_Invert(v);
jpayne@69 24646 Py_DECREF(v);
jpayne@69 24647 if (unlikely(!stepval))
jpayne@69 24648 return (int) -1;
jpayne@69 24649 } else {
jpayne@69 24650 stepval = v;
jpayne@69 24651 }
jpayne@69 24652 v = NULL;
jpayne@69 24653 val = (int) 0;
jpayne@69 24654 mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done;
jpayne@69 24655 shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done;
jpayne@69 24656 for (bits = 0; bits < (int) sizeof(int) * 8 - chunk_size; bits += chunk_size) {
jpayne@69 24657 PyObject *tmp, *digit;
jpayne@69 24658 long idigit;
jpayne@69 24659 digit = PyNumber_And(stepval, mask);
jpayne@69 24660 if (unlikely(!digit)) goto done;
jpayne@69 24661 idigit = PyLong_AsLong(digit);
jpayne@69 24662 Py_DECREF(digit);
jpayne@69 24663 if (unlikely(idigit < 0)) goto done;
jpayne@69 24664 val |= ((int) idigit) << bits;
jpayne@69 24665 tmp = PyNumber_Rshift(stepval, shift);
jpayne@69 24666 if (unlikely(!tmp)) goto done;
jpayne@69 24667 Py_DECREF(stepval); stepval = tmp;
jpayne@69 24668 }
jpayne@69 24669 Py_DECREF(shift); shift = NULL;
jpayne@69 24670 Py_DECREF(mask); mask = NULL;
jpayne@69 24671 {
jpayne@69 24672 long idigit = PyLong_AsLong(stepval);
jpayne@69 24673 if (unlikely(idigit < 0)) goto done;
jpayne@69 24674 remaining_bits = ((int) sizeof(int) * 8) - bits - (is_unsigned ? 0 : 1);
jpayne@69 24675 if (unlikely(idigit >= (1L << remaining_bits)))
jpayne@69 24676 goto raise_overflow;
jpayne@69 24677 val |= ((int) idigit) << bits;
jpayne@69 24678 }
jpayne@69 24679 if (!is_unsigned) {
jpayne@69 24680 if (unlikely(val & (((int) 1) << (sizeof(int) * 8 - 1))))
jpayne@69 24681 goto raise_overflow;
jpayne@69 24682 if (is_negative)
jpayne@69 24683 val = ~val;
jpayne@69 24684 }
jpayne@69 24685 ret = 0;
jpayne@69 24686 done:
jpayne@69 24687 Py_XDECREF(shift);
jpayne@69 24688 Py_XDECREF(mask);
jpayne@69 24689 Py_XDECREF(stepval);
jpayne@69 24690 #endif
jpayne@69 24691 if (unlikely(ret))
jpayne@69 24692 return (int) -1;
jpayne@69 24693 return val;
jpayne@69 24694 }
jpayne@69 24695 raise_overflow:
jpayne@69 24696 PyErr_SetString(PyExc_OverflowError,
jpayne@69 24697 "value too large to convert to int");
jpayne@69 24698 return (int) -1;
jpayne@69 24699 raise_neg_overflow:
jpayne@69 24700 PyErr_SetString(PyExc_OverflowError,
jpayne@69 24701 "can't convert negative value to int");
jpayne@69 24702 return (int) -1;
jpayne@69 24703 }
jpayne@69 24704
jpayne@69 24705 /* CIntFromPy */
jpayne@69 24706 static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) {
jpayne@69 24707 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
jpayne@69 24708 #pragma GCC diagnostic push
jpayne@69 24709 #pragma GCC diagnostic ignored "-Wconversion"
jpayne@69 24710 #endif
jpayne@69 24711 const long neg_one = (long) -1, const_zero = (long) 0;
jpayne@69 24712 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
jpayne@69 24713 #pragma GCC diagnostic pop
jpayne@69 24714 #endif
jpayne@69 24715 const int is_unsigned = neg_one > const_zero;
jpayne@69 24716 #if PY_MAJOR_VERSION < 3
jpayne@69 24717 if (likely(PyInt_Check(x))) {
jpayne@69 24718 if ((sizeof(long) < sizeof(long))) {
jpayne@69 24719 __PYX_VERIFY_RETURN_INT(long, long, PyInt_AS_LONG(x))
jpayne@69 24720 } else {
jpayne@69 24721 long val = PyInt_AS_LONG(x);
jpayne@69 24722 if (is_unsigned && unlikely(val < 0)) {
jpayne@69 24723 goto raise_neg_overflow;
jpayne@69 24724 }
jpayne@69 24725 return (long) val;
jpayne@69 24726 }
jpayne@69 24727 }
jpayne@69 24728 #endif
jpayne@69 24729 if (unlikely(!PyLong_Check(x))) {
jpayne@69 24730 long val;
jpayne@69 24731 PyObject *tmp = __Pyx_PyNumber_IntOrLong(x);
jpayne@69 24732 if (!tmp) return (long) -1;
jpayne@69 24733 val = __Pyx_PyInt_As_long(tmp);
jpayne@69 24734 Py_DECREF(tmp);
jpayne@69 24735 return val;
jpayne@69 24736 }
jpayne@69 24737 if (is_unsigned) {
jpayne@69 24738 #if CYTHON_USE_PYLONG_INTERNALS
jpayne@69 24739 if (unlikely(__Pyx_PyLong_IsNeg(x))) {
jpayne@69 24740 goto raise_neg_overflow;
jpayne@69 24741 } else if (__Pyx_PyLong_IsCompact(x)) {
jpayne@69 24742 __PYX_VERIFY_RETURN_INT(long, __Pyx_compact_upylong, __Pyx_PyLong_CompactValueUnsigned(x))
jpayne@69 24743 } else {
jpayne@69 24744 const digit* digits = __Pyx_PyLong_Digits(x);
jpayne@69 24745 assert(__Pyx_PyLong_DigitCount(x) > 1);
jpayne@69 24746 switch (__Pyx_PyLong_DigitCount(x)) {
jpayne@69 24747 case 2:
jpayne@69 24748 if ((8 * sizeof(long) > 1 * PyLong_SHIFT)) {
jpayne@69 24749 if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
jpayne@69 24750 __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
jpayne@69 24751 } else if ((8 * sizeof(long) >= 2 * PyLong_SHIFT)) {
jpayne@69 24752 return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
jpayne@69 24753 }
jpayne@69 24754 }
jpayne@69 24755 break;
jpayne@69 24756 case 3:
jpayne@69 24757 if ((8 * sizeof(long) > 2 * PyLong_SHIFT)) {
jpayne@69 24758 if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
jpayne@69 24759 __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
jpayne@69 24760 } else if ((8 * sizeof(long) >= 3 * PyLong_SHIFT)) {
jpayne@69 24761 return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
jpayne@69 24762 }
jpayne@69 24763 }
jpayne@69 24764 break;
jpayne@69 24765 case 4:
jpayne@69 24766 if ((8 * sizeof(long) > 3 * PyLong_SHIFT)) {
jpayne@69 24767 if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
jpayne@69 24768 __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
jpayne@69 24769 } else if ((8 * sizeof(long) >= 4 * PyLong_SHIFT)) {
jpayne@69 24770 return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
jpayne@69 24771 }
jpayne@69 24772 }
jpayne@69 24773 break;
jpayne@69 24774 }
jpayne@69 24775 }
jpayne@69 24776 #endif
jpayne@69 24777 #if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7
jpayne@69 24778 if (unlikely(Py_SIZE(x) < 0)) {
jpayne@69 24779 goto raise_neg_overflow;
jpayne@69 24780 }
jpayne@69 24781 #else
jpayne@69 24782 {
jpayne@69 24783 int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
jpayne@69 24784 if (unlikely(result < 0))
jpayne@69 24785 return (long) -1;
jpayne@69 24786 if (unlikely(result == 1))
jpayne@69 24787 goto raise_neg_overflow;
jpayne@69 24788 }
jpayne@69 24789 #endif
jpayne@69 24790 if ((sizeof(long) <= sizeof(unsigned long))) {
jpayne@69 24791 __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x))
jpayne@69 24792 #ifdef HAVE_LONG_LONG
jpayne@69 24793 } else if ((sizeof(long) <= sizeof(unsigned PY_LONG_LONG))) {
jpayne@69 24794 __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
jpayne@69 24795 #endif
jpayne@69 24796 }
jpayne@69 24797 } else {
jpayne@69 24798 #if CYTHON_USE_PYLONG_INTERNALS
jpayne@69 24799 if (__Pyx_PyLong_IsCompact(x)) {
jpayne@69 24800 __PYX_VERIFY_RETURN_INT(long, __Pyx_compact_pylong, __Pyx_PyLong_CompactValue(x))
jpayne@69 24801 } else {
jpayne@69 24802 const digit* digits = __Pyx_PyLong_Digits(x);
jpayne@69 24803 assert(__Pyx_PyLong_DigitCount(x) > 1);
jpayne@69 24804 switch (__Pyx_PyLong_SignedDigitCount(x)) {
jpayne@69 24805 case -2:
jpayne@69 24806 if ((8 * sizeof(long) - 1 > 1 * PyLong_SHIFT)) {
jpayne@69 24807 if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
jpayne@69 24808 __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
jpayne@69 24809 } else if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) {
jpayne@69 24810 return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
jpayne@69 24811 }
jpayne@69 24812 }
jpayne@69 24813 break;
jpayne@69 24814 case 2:
jpayne@69 24815 if ((8 * sizeof(long) > 1 * PyLong_SHIFT)) {
jpayne@69 24816 if ((8 * sizeof(unsigned long) > 2 * PyLong_SHIFT)) {
jpayne@69 24817 __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
jpayne@69 24818 } else if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) {
jpayne@69 24819 return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
jpayne@69 24820 }
jpayne@69 24821 }
jpayne@69 24822 break;
jpayne@69 24823 case -3:
jpayne@69 24824 if ((8 * sizeof(long) - 1 > 2 * PyLong_SHIFT)) {
jpayne@69 24825 if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
jpayne@69 24826 __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
jpayne@69 24827 } else if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) {
jpayne@69 24828 return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
jpayne@69 24829 }
jpayne@69 24830 }
jpayne@69 24831 break;
jpayne@69 24832 case 3:
jpayne@69 24833 if ((8 * sizeof(long) > 2 * PyLong_SHIFT)) {
jpayne@69 24834 if ((8 * sizeof(unsigned long) > 3 * PyLong_SHIFT)) {
jpayne@69 24835 __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
jpayne@69 24836 } else if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) {
jpayne@69 24837 return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
jpayne@69 24838 }
jpayne@69 24839 }
jpayne@69 24840 break;
jpayne@69 24841 case -4:
jpayne@69 24842 if ((8 * sizeof(long) - 1 > 3 * PyLong_SHIFT)) {
jpayne@69 24843 if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
jpayne@69 24844 __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
jpayne@69 24845 } else if ((8 * sizeof(long) - 1 > 4 * PyLong_SHIFT)) {
jpayne@69 24846 return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
jpayne@69 24847 }
jpayne@69 24848 }
jpayne@69 24849 break;
jpayne@69 24850 case 4:
jpayne@69 24851 if ((8 * sizeof(long) > 3 * PyLong_SHIFT)) {
jpayne@69 24852 if ((8 * sizeof(unsigned long) > 4 * PyLong_SHIFT)) {
jpayne@69 24853 __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
jpayne@69 24854 } else if ((8 * sizeof(long) - 1 > 4 * PyLong_SHIFT)) {
jpayne@69 24855 return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
jpayne@69 24856 }
jpayne@69 24857 }
jpayne@69 24858 break;
jpayne@69 24859 }
jpayne@69 24860 }
jpayne@69 24861 #endif
jpayne@69 24862 if ((sizeof(long) <= sizeof(long))) {
jpayne@69 24863 __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x))
jpayne@69 24864 #ifdef HAVE_LONG_LONG
jpayne@69 24865 } else if ((sizeof(long) <= sizeof(PY_LONG_LONG))) {
jpayne@69 24866 __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x))
jpayne@69 24867 #endif
jpayne@69 24868 }
jpayne@69 24869 }
jpayne@69 24870 {
jpayne@69 24871 long val;
jpayne@69 24872 int ret = -1;
jpayne@69 24873 #if PY_VERSION_HEX >= 0x030d00A6 && !CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 24874 Py_ssize_t bytes_copied = PyLong_AsNativeBytes(
jpayne@69 24875 x, &val, sizeof(val), Py_ASNATIVEBYTES_NATIVE_ENDIAN | (is_unsigned ? Py_ASNATIVEBYTES_UNSIGNED_BUFFER | Py_ASNATIVEBYTES_REJECT_NEGATIVE : 0));
jpayne@69 24876 if (unlikely(bytes_copied == -1)) {
jpayne@69 24877 } else if (unlikely(bytes_copied > (Py_ssize_t) sizeof(val))) {
jpayne@69 24878 goto raise_overflow;
jpayne@69 24879 } else {
jpayne@69 24880 ret = 0;
jpayne@69 24881 }
jpayne@69 24882 #elif PY_VERSION_HEX < 0x030d0000 && !(CYTHON_COMPILING_IN_PYPY || CYTHON_COMPILING_IN_LIMITED_API) || defined(_PyLong_AsByteArray)
jpayne@69 24883 int one = 1; int is_little = (int)*(unsigned char *)&one;
jpayne@69 24884 unsigned char *bytes = (unsigned char *)&val;
jpayne@69 24885 ret = _PyLong_AsByteArray((PyLongObject *)x,
jpayne@69 24886 bytes, sizeof(val),
jpayne@69 24887 is_little, !is_unsigned);
jpayne@69 24888 #else
jpayne@69 24889 PyObject *v;
jpayne@69 24890 PyObject *stepval = NULL, *mask = NULL, *shift = NULL;
jpayne@69 24891 int bits, remaining_bits, is_negative = 0;
jpayne@69 24892 int chunk_size = (sizeof(long) < 8) ? 30 : 62;
jpayne@69 24893 if (likely(PyLong_CheckExact(x))) {
jpayne@69 24894 v = __Pyx_NewRef(x);
jpayne@69 24895 } else {
jpayne@69 24896 v = PyNumber_Long(x);
jpayne@69 24897 if (unlikely(!v)) return (long) -1;
jpayne@69 24898 assert(PyLong_CheckExact(v));
jpayne@69 24899 }
jpayne@69 24900 {
jpayne@69 24901 int result = PyObject_RichCompareBool(v, Py_False, Py_LT);
jpayne@69 24902 if (unlikely(result < 0)) {
jpayne@69 24903 Py_DECREF(v);
jpayne@69 24904 return (long) -1;
jpayne@69 24905 }
jpayne@69 24906 is_negative = result == 1;
jpayne@69 24907 }
jpayne@69 24908 if (is_unsigned && unlikely(is_negative)) {
jpayne@69 24909 Py_DECREF(v);
jpayne@69 24910 goto raise_neg_overflow;
jpayne@69 24911 } else if (is_negative) {
jpayne@69 24912 stepval = PyNumber_Invert(v);
jpayne@69 24913 Py_DECREF(v);
jpayne@69 24914 if (unlikely(!stepval))
jpayne@69 24915 return (long) -1;
jpayne@69 24916 } else {
jpayne@69 24917 stepval = v;
jpayne@69 24918 }
jpayne@69 24919 v = NULL;
jpayne@69 24920 val = (long) 0;
jpayne@69 24921 mask = PyLong_FromLong((1L << chunk_size) - 1); if (unlikely(!mask)) goto done;
jpayne@69 24922 shift = PyLong_FromLong(chunk_size); if (unlikely(!shift)) goto done;
jpayne@69 24923 for (bits = 0; bits < (int) sizeof(long) * 8 - chunk_size; bits += chunk_size) {
jpayne@69 24924 PyObject *tmp, *digit;
jpayne@69 24925 long idigit;
jpayne@69 24926 digit = PyNumber_And(stepval, mask);
jpayne@69 24927 if (unlikely(!digit)) goto done;
jpayne@69 24928 idigit = PyLong_AsLong(digit);
jpayne@69 24929 Py_DECREF(digit);
jpayne@69 24930 if (unlikely(idigit < 0)) goto done;
jpayne@69 24931 val |= ((long) idigit) << bits;
jpayne@69 24932 tmp = PyNumber_Rshift(stepval, shift);
jpayne@69 24933 if (unlikely(!tmp)) goto done;
jpayne@69 24934 Py_DECREF(stepval); stepval = tmp;
jpayne@69 24935 }
jpayne@69 24936 Py_DECREF(shift); shift = NULL;
jpayne@69 24937 Py_DECREF(mask); mask = NULL;
jpayne@69 24938 {
jpayne@69 24939 long idigit = PyLong_AsLong(stepval);
jpayne@69 24940 if (unlikely(idigit < 0)) goto done;
jpayne@69 24941 remaining_bits = ((int) sizeof(long) * 8) - bits - (is_unsigned ? 0 : 1);
jpayne@69 24942 if (unlikely(idigit >= (1L << remaining_bits)))
jpayne@69 24943 goto raise_overflow;
jpayne@69 24944 val |= ((long) idigit) << bits;
jpayne@69 24945 }
jpayne@69 24946 if (!is_unsigned) {
jpayne@69 24947 if (unlikely(val & (((long) 1) << (sizeof(long) * 8 - 1))))
jpayne@69 24948 goto raise_overflow;
jpayne@69 24949 if (is_negative)
jpayne@69 24950 val = ~val;
jpayne@69 24951 }
jpayne@69 24952 ret = 0;
jpayne@69 24953 done:
jpayne@69 24954 Py_XDECREF(shift);
jpayne@69 24955 Py_XDECREF(mask);
jpayne@69 24956 Py_XDECREF(stepval);
jpayne@69 24957 #endif
jpayne@69 24958 if (unlikely(ret))
jpayne@69 24959 return (long) -1;
jpayne@69 24960 return val;
jpayne@69 24961 }
jpayne@69 24962 raise_overflow:
jpayne@69 24963 PyErr_SetString(PyExc_OverflowError,
jpayne@69 24964 "value too large to convert to long");
jpayne@69 24965 return (long) -1;
jpayne@69 24966 raise_neg_overflow:
jpayne@69 24967 PyErr_SetString(PyExc_OverflowError,
jpayne@69 24968 "can't convert negative value to long");
jpayne@69 24969 return (long) -1;
jpayne@69 24970 }
jpayne@69 24971
jpayne@69 24972 /* CIntToPy */
jpayne@69 24973 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) {
jpayne@69 24974 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
jpayne@69 24975 #pragma GCC diagnostic push
jpayne@69 24976 #pragma GCC diagnostic ignored "-Wconversion"
jpayne@69 24977 #endif
jpayne@69 24978 const int neg_one = (int) -1, const_zero = (int) 0;
jpayne@69 24979 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
jpayne@69 24980 #pragma GCC diagnostic pop
jpayne@69 24981 #endif
jpayne@69 24982 const int is_unsigned = neg_one > const_zero;
jpayne@69 24983 if (is_unsigned) {
jpayne@69 24984 if (sizeof(int) < sizeof(long)) {
jpayne@69 24985 return PyInt_FromLong((long) value);
jpayne@69 24986 } else if (sizeof(int) <= sizeof(unsigned long)) {
jpayne@69 24987 return PyLong_FromUnsignedLong((unsigned long) value);
jpayne@69 24988 #ifdef HAVE_LONG_LONG
jpayne@69 24989 } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {
jpayne@69 24990 return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
jpayne@69 24991 #endif
jpayne@69 24992 }
jpayne@69 24993 } else {
jpayne@69 24994 if (sizeof(int) <= sizeof(long)) {
jpayne@69 24995 return PyInt_FromLong((long) value);
jpayne@69 24996 #ifdef HAVE_LONG_LONG
jpayne@69 24997 } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {
jpayne@69 24998 return PyLong_FromLongLong((PY_LONG_LONG) value);
jpayne@69 24999 #endif
jpayne@69 25000 }
jpayne@69 25001 }
jpayne@69 25002 {
jpayne@69 25003 unsigned char *bytes = (unsigned char *)&value;
jpayne@69 25004 #if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
jpayne@69 25005 if (is_unsigned) {
jpayne@69 25006 return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1);
jpayne@69 25007 } else {
jpayne@69 25008 return PyLong_FromNativeBytes(bytes, sizeof(value), -1);
jpayne@69 25009 }
jpayne@69 25010 #elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
jpayne@69 25011 int one = 1; int little = (int)*(unsigned char *)&one;
jpayne@69 25012 return _PyLong_FromByteArray(bytes, sizeof(int),
jpayne@69 25013 little, !is_unsigned);
jpayne@69 25014 #else
jpayne@69 25015 int one = 1; int little = (int)*(unsigned char *)&one;
jpayne@69 25016 PyObject *from_bytes, *result = NULL;
jpayne@69 25017 PyObject *py_bytes = NULL, *arg_tuple = NULL, *kwds = NULL, *order_str = NULL;
jpayne@69 25018 from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
jpayne@69 25019 if (!from_bytes) return NULL;
jpayne@69 25020 py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(int));
jpayne@69 25021 if (!py_bytes) goto limited_bad;
jpayne@69 25022 order_str = PyUnicode_FromString(little ? "little" : "big");
jpayne@69 25023 if (!order_str) goto limited_bad;
jpayne@69 25024 arg_tuple = PyTuple_Pack(2, py_bytes, order_str);
jpayne@69 25025 if (!arg_tuple) goto limited_bad;
jpayne@69 25026 if (!is_unsigned) {
jpayne@69 25027 kwds = PyDict_New();
jpayne@69 25028 if (!kwds) goto limited_bad;
jpayne@69 25029 if (PyDict_SetItemString(kwds, "signed", __Pyx_NewRef(Py_True))) goto limited_bad;
jpayne@69 25030 }
jpayne@69 25031 result = PyObject_Call(from_bytes, arg_tuple, kwds);
jpayne@69 25032 limited_bad:
jpayne@69 25033 Py_XDECREF(kwds);
jpayne@69 25034 Py_XDECREF(arg_tuple);
jpayne@69 25035 Py_XDECREF(order_str);
jpayne@69 25036 Py_XDECREF(py_bytes);
jpayne@69 25037 Py_XDECREF(from_bytes);
jpayne@69 25038 return result;
jpayne@69 25039 #endif
jpayne@69 25040 }
jpayne@69 25041 }
jpayne@69 25042
jpayne@69 25043 /* CIntToPy */
jpayne@69 25044 static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) {
jpayne@69 25045 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
jpayne@69 25046 #pragma GCC diagnostic push
jpayne@69 25047 #pragma GCC diagnostic ignored "-Wconversion"
jpayne@69 25048 #endif
jpayne@69 25049 const long neg_one = (long) -1, const_zero = (long) 0;
jpayne@69 25050 #ifdef __Pyx_HAS_GCC_DIAGNOSTIC
jpayne@69 25051 #pragma GCC diagnostic pop
jpayne@69 25052 #endif
jpayne@69 25053 const int is_unsigned = neg_one > const_zero;
jpayne@69 25054 if (is_unsigned) {
jpayne@69 25055 if (sizeof(long) < sizeof(long)) {
jpayne@69 25056 return PyInt_FromLong((long) value);
jpayne@69 25057 } else if (sizeof(long) <= sizeof(unsigned long)) {
jpayne@69 25058 return PyLong_FromUnsignedLong((unsigned long) value);
jpayne@69 25059 #ifdef HAVE_LONG_LONG
jpayne@69 25060 } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
jpayne@69 25061 return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
jpayne@69 25062 #endif
jpayne@69 25063 }
jpayne@69 25064 } else {
jpayne@69 25065 if (sizeof(long) <= sizeof(long)) {
jpayne@69 25066 return PyInt_FromLong((long) value);
jpayne@69 25067 #ifdef HAVE_LONG_LONG
jpayne@69 25068 } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
jpayne@69 25069 return PyLong_FromLongLong((PY_LONG_LONG) value);
jpayne@69 25070 #endif
jpayne@69 25071 }
jpayne@69 25072 }
jpayne@69 25073 {
jpayne@69 25074 unsigned char *bytes = (unsigned char *)&value;
jpayne@69 25075 #if !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX >= 0x030d00A4
jpayne@69 25076 if (is_unsigned) {
jpayne@69 25077 return PyLong_FromUnsignedNativeBytes(bytes, sizeof(value), -1);
jpayne@69 25078 } else {
jpayne@69 25079 return PyLong_FromNativeBytes(bytes, sizeof(value), -1);
jpayne@69 25080 }
jpayne@69 25081 #elif !CYTHON_COMPILING_IN_LIMITED_API && PY_VERSION_HEX < 0x030d0000
jpayne@69 25082 int one = 1; int little = (int)*(unsigned char *)&one;
jpayne@69 25083 return _PyLong_FromByteArray(bytes, sizeof(long),
jpayne@69 25084 little, !is_unsigned);
jpayne@69 25085 #else
jpayne@69 25086 int one = 1; int little = (int)*(unsigned char *)&one;
jpayne@69 25087 PyObject *from_bytes, *result = NULL;
jpayne@69 25088 PyObject *py_bytes = NULL, *arg_tuple = NULL, *kwds = NULL, *order_str = NULL;
jpayne@69 25089 from_bytes = PyObject_GetAttrString((PyObject*)&PyLong_Type, "from_bytes");
jpayne@69 25090 if (!from_bytes) return NULL;
jpayne@69 25091 py_bytes = PyBytes_FromStringAndSize((char*)bytes, sizeof(long));
jpayne@69 25092 if (!py_bytes) goto limited_bad;
jpayne@69 25093 order_str = PyUnicode_FromString(little ? "little" : "big");
jpayne@69 25094 if (!order_str) goto limited_bad;
jpayne@69 25095 arg_tuple = PyTuple_Pack(2, py_bytes, order_str);
jpayne@69 25096 if (!arg_tuple) goto limited_bad;
jpayne@69 25097 if (!is_unsigned) {
jpayne@69 25098 kwds = PyDict_New();
jpayne@69 25099 if (!kwds) goto limited_bad;
jpayne@69 25100 if (PyDict_SetItemString(kwds, "signed", __Pyx_NewRef(Py_True))) goto limited_bad;
jpayne@69 25101 }
jpayne@69 25102 result = PyObject_Call(from_bytes, arg_tuple, kwds);
jpayne@69 25103 limited_bad:
jpayne@69 25104 Py_XDECREF(kwds);
jpayne@69 25105 Py_XDECREF(arg_tuple);
jpayne@69 25106 Py_XDECREF(order_str);
jpayne@69 25107 Py_XDECREF(py_bytes);
jpayne@69 25108 Py_XDECREF(from_bytes);
jpayne@69 25109 return result;
jpayne@69 25110 #endif
jpayne@69 25111 }
jpayne@69 25112 }
jpayne@69 25113
jpayne@69 25114 /* FormatTypeName */
jpayne@69 25115 #if CYTHON_COMPILING_IN_LIMITED_API
jpayne@69 25116 static __Pyx_TypeName
jpayne@69 25117 __Pyx_PyType_GetName(PyTypeObject* tp)
jpayne@69 25118 {
jpayne@69 25119 PyObject *name = __Pyx_PyObject_GetAttrStr((PyObject *)tp,
jpayne@69 25120 __pyx_n_s_name_2);
jpayne@69 25121 if (unlikely(name == NULL) || unlikely(!PyUnicode_Check(name))) {
jpayne@69 25122 PyErr_Clear();
jpayne@69 25123 Py_XDECREF(name);
jpayne@69 25124 name = __Pyx_NewRef(__pyx_n_s__68);
jpayne@69 25125 }
jpayne@69 25126 return name;
jpayne@69 25127 }
jpayne@69 25128 #endif
jpayne@69 25129
jpayne@69 25130 /* FastTypeChecks */
jpayne@69 25131 #if CYTHON_COMPILING_IN_CPYTHON
jpayne@69 25132 static int __Pyx_InBases(PyTypeObject *a, PyTypeObject *b) {
jpayne@69 25133 while (a) {
jpayne@69 25134 a = __Pyx_PyType_GetSlot(a, tp_base, PyTypeObject*);
jpayne@69 25135 if (a == b)
jpayne@69 25136 return 1;
jpayne@69 25137 }
jpayne@69 25138 return b == &PyBaseObject_Type;
jpayne@69 25139 }
jpayne@69 25140 static CYTHON_INLINE int __Pyx_IsSubtype(PyTypeObject *a, PyTypeObject *b) {
jpayne@69 25141 PyObject *mro;
jpayne@69 25142 if (a == b) return 1;
jpayne@69 25143 mro = a->tp_mro;
jpayne@69 25144 if (likely(mro)) {
jpayne@69 25145 Py_ssize_t i, n;
jpayne@69 25146 n = PyTuple_GET_SIZE(mro);
jpayne@69 25147 for (i = 0; i < n; i++) {
jpayne@69 25148 if (PyTuple_GET_ITEM(mro, i) == (PyObject *)b)
jpayne@69 25149 return 1;
jpayne@69 25150 }
jpayne@69 25151 return 0;
jpayne@69 25152 }
jpayne@69 25153 return __Pyx_InBases(a, b);
jpayne@69 25154 }
jpayne@69 25155 static CYTHON_INLINE int __Pyx_IsAnySubtype2(PyTypeObject *cls, PyTypeObject *a, PyTypeObject *b) {
jpayne@69 25156 PyObject *mro;
jpayne@69 25157 if (cls == a || cls == b) return 1;
jpayne@69 25158 mro = cls->tp_mro;
jpayne@69 25159 if (likely(mro)) {
jpayne@69 25160 Py_ssize_t i, n;
jpayne@69 25161 n = PyTuple_GET_SIZE(mro);
jpayne@69 25162 for (i = 0; i < n; i++) {
jpayne@69 25163 PyObject *base = PyTuple_GET_ITEM(mro, i);
jpayne@69 25164 if (base == (PyObject *)a || base == (PyObject *)b)
jpayne@69 25165 return 1;
jpayne@69 25166 }
jpayne@69 25167 return 0;
jpayne@69 25168 }
jpayne@69 25169 return __Pyx_InBases(cls, a) || __Pyx_InBases(cls, b);
jpayne@69 25170 }
jpayne@69 25171 #if PY_MAJOR_VERSION == 2
jpayne@69 25172 static int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject* exc_type2) {
jpayne@69 25173 PyObject *exception, *value, *tb;
jpayne@69 25174 int res;
jpayne@69 25175 __Pyx_PyThreadState_declare
jpayne@69 25176 __Pyx_PyThreadState_assign
jpayne@69 25177 __Pyx_ErrFetch(&exception, &value, &tb);
jpayne@69 25178 res = exc_type1 ? PyObject_IsSubclass(err, exc_type1) : 0;
jpayne@69 25179 if (unlikely(res == -1)) {
jpayne@69 25180 PyErr_WriteUnraisable(err);
jpayne@69 25181 res = 0;
jpayne@69 25182 }
jpayne@69 25183 if (!res) {
jpayne@69 25184 res = PyObject_IsSubclass(err, exc_type2);
jpayne@69 25185 if (unlikely(res == -1)) {
jpayne@69 25186 PyErr_WriteUnraisable(err);
jpayne@69 25187 res = 0;
jpayne@69 25188 }
jpayne@69 25189 }
jpayne@69 25190 __Pyx_ErrRestore(exception, value, tb);
jpayne@69 25191 return res;
jpayne@69 25192 }
jpayne@69 25193 #else
jpayne@69 25194 static CYTHON_INLINE int __Pyx_inner_PyErr_GivenExceptionMatches2(PyObject *err, PyObject* exc_type1, PyObject *exc_type2) {
jpayne@69 25195 if (exc_type1) {
jpayne@69 25196 return __Pyx_IsAnySubtype2((PyTypeObject*)err, (PyTypeObject*)exc_type1, (PyTypeObject*)exc_type2);
jpayne@69 25197 } else {
jpayne@69 25198 return __Pyx_IsSubtype((PyTypeObject*)err, (PyTypeObject*)exc_type2);
jpayne@69 25199 }
jpayne@69 25200 }
jpayne@69 25201 #endif
jpayne@69 25202 static int __Pyx_PyErr_GivenExceptionMatchesTuple(PyObject *exc_type, PyObject *tuple) {
jpayne@69 25203 Py_ssize_t i, n;
jpayne@69 25204 assert(PyExceptionClass_Check(exc_type));
jpayne@69 25205 n = PyTuple_GET_SIZE(tuple);
jpayne@69 25206 #if PY_MAJOR_VERSION >= 3
jpayne@69 25207 for (i=0; i<n; i++) {
jpayne@69 25208 if (exc_type == PyTuple_GET_ITEM(tuple, i)) return 1;
jpayne@69 25209 }
jpayne@69 25210 #endif
jpayne@69 25211 for (i=0; i<n; i++) {
jpayne@69 25212 PyObject *t = PyTuple_GET_ITEM(tuple, i);
jpayne@69 25213 #if PY_MAJOR_VERSION < 3
jpayne@69 25214 if (likely(exc_type == t)) return 1;
jpayne@69 25215 #endif
jpayne@69 25216 if (likely(PyExceptionClass_Check(t))) {
jpayne@69 25217 if (__Pyx_inner_PyErr_GivenExceptionMatches2(exc_type, NULL, t)) return 1;
jpayne@69 25218 } else {
jpayne@69 25219 }
jpayne@69 25220 }
jpayne@69 25221 return 0;
jpayne@69 25222 }
jpayne@69 25223 static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches(PyObject *err, PyObject* exc_type) {
jpayne@69 25224 if (likely(err == exc_type)) return 1;
jpayne@69 25225 if (likely(PyExceptionClass_Check(err))) {
jpayne@69 25226 if (likely(PyExceptionClass_Check(exc_type))) {
jpayne@69 25227 return __Pyx_inner_PyErr_GivenExceptionMatches2(err, NULL, exc_type);
jpayne@69 25228 } else if (likely(PyTuple_Check(exc_type))) {
jpayne@69 25229 return __Pyx_PyErr_GivenExceptionMatchesTuple(err, exc_type);
jpayne@69 25230 } else {
jpayne@69 25231 }
jpayne@69 25232 }
jpayne@69 25233 return PyErr_GivenExceptionMatches(err, exc_type);
jpayne@69 25234 }
jpayne@69 25235 static CYTHON_INLINE int __Pyx_PyErr_GivenExceptionMatches2(PyObject *err, PyObject *exc_type1, PyObject *exc_type2) {
jpayne@69 25236 assert(PyExceptionClass_Check(exc_type1));
jpayne@69 25237 assert(PyExceptionClass_Check(exc_type2));
jpayne@69 25238 if (likely(err == exc_type1 || err == exc_type2)) return 1;
jpayne@69 25239 if (likely(PyExceptionClass_Check(err))) {
jpayne@69 25240 return __Pyx_inner_PyErr_GivenExceptionMatches2(err, exc_type1, exc_type2);
jpayne@69 25241 }
jpayne@69 25242 return (PyErr_GivenExceptionMatches(err, exc_type1) || PyErr_GivenExceptionMatches(err, exc_type2));
jpayne@69 25243 }
jpayne@69 25244 #endif
jpayne@69 25245
jpayne@69 25246 /* CheckBinaryVersion */
jpayne@69 25247 static unsigned long __Pyx_get_runtime_version(void) {
jpayne@69 25248 #if __PYX_LIMITED_VERSION_HEX >= 0x030B00A4
jpayne@69 25249 return Py_Version & ~0xFFUL;
jpayne@69 25250 #else
jpayne@69 25251 const char* rt_version = Py_GetVersion();
jpayne@69 25252 unsigned long version = 0;
jpayne@69 25253 unsigned long factor = 0x01000000UL;
jpayne@69 25254 unsigned int digit = 0;
jpayne@69 25255 int i = 0;
jpayne@69 25256 while (factor) {
jpayne@69 25257 while ('0' <= rt_version[i] && rt_version[i] <= '9') {
jpayne@69 25258 digit = digit * 10 + (unsigned int) (rt_version[i] - '0');
jpayne@69 25259 ++i;
jpayne@69 25260 }
jpayne@69 25261 version += factor * digit;
jpayne@69 25262 if (rt_version[i] != '.')
jpayne@69 25263 break;
jpayne@69 25264 digit = 0;
jpayne@69 25265 factor >>= 8;
jpayne@69 25266 ++i;
jpayne@69 25267 }
jpayne@69 25268 return version;
jpayne@69 25269 #endif
jpayne@69 25270 }
jpayne@69 25271 static int __Pyx_check_binary_version(unsigned long ct_version, unsigned long rt_version, int allow_newer) {
jpayne@69 25272 const unsigned long MAJOR_MINOR = 0xFFFF0000UL;
jpayne@69 25273 if ((rt_version & MAJOR_MINOR) == (ct_version & MAJOR_MINOR))
jpayne@69 25274 return 0;
jpayne@69 25275 if (likely(allow_newer && (rt_version & MAJOR_MINOR) > (ct_version & MAJOR_MINOR)))
jpayne@69 25276 return 1;
jpayne@69 25277 {
jpayne@69 25278 char message[200];
jpayne@69 25279 PyOS_snprintf(message, sizeof(message),
jpayne@69 25280 "compile time Python version %d.%d "
jpayne@69 25281 "of module '%.100s' "
jpayne@69 25282 "%s "
jpayne@69 25283 "runtime version %d.%d",
jpayne@69 25284 (int) (ct_version >> 24), (int) ((ct_version >> 16) & 0xFF),
jpayne@69 25285 __Pyx_MODULE_NAME,
jpayne@69 25286 (allow_newer) ? "was newer than" : "does not match",
jpayne@69 25287 (int) (rt_version >> 24), (int) ((rt_version >> 16) & 0xFF)
jpayne@69 25288 );
jpayne@69 25289 return PyErr_WarnEx(NULL, message, 1);
jpayne@69 25290 }
jpayne@69 25291 }
jpayne@69 25292
jpayne@69 25293 /* FunctionImport */
jpayne@69 25294 #ifndef __PYX_HAVE_RT_ImportFunction_3_0_11
jpayne@69 25295 #define __PYX_HAVE_RT_ImportFunction_3_0_11
jpayne@69 25296 static int __Pyx_ImportFunction_3_0_11(PyObject *module, const char *funcname, void (**f)(void), const char *sig) {
jpayne@69 25297 PyObject *d = 0;
jpayne@69 25298 PyObject *cobj = 0;
jpayne@69 25299 union {
jpayne@69 25300 void (*fp)(void);
jpayne@69 25301 void *p;
jpayne@69 25302 } tmp;
jpayne@69 25303 d = PyObject_GetAttrString(module, (char *)"__pyx_capi__");
jpayne@69 25304 if (!d)
jpayne@69 25305 goto bad;
jpayne@69 25306 cobj = PyDict_GetItemString(d, funcname);
jpayne@69 25307 if (!cobj) {
jpayne@69 25308 PyErr_Format(PyExc_ImportError,
jpayne@69 25309 "%.200s does not export expected C function %.200s",
jpayne@69 25310 PyModule_GetName(module), funcname);
jpayne@69 25311 goto bad;
jpayne@69 25312 }
jpayne@69 25313 if (!PyCapsule_IsValid(cobj, sig)) {
jpayne@69 25314 PyErr_Format(PyExc_TypeError,
jpayne@69 25315 "C function %.200s.%.200s has wrong signature (expected %.500s, got %.500s)",
jpayne@69 25316 PyModule_GetName(module), funcname, sig, PyCapsule_GetName(cobj));
jpayne@69 25317 goto bad;
jpayne@69 25318 }
jpayne@69 25319 tmp.p = PyCapsule_GetPointer(cobj, sig);
jpayne@69 25320 *f = tmp.fp;
jpayne@69 25321 if (!(*f))
jpayne@69 25322 goto bad;
jpayne@69 25323 Py_DECREF(d);
jpayne@69 25324 return 0;
jpayne@69 25325 bad:
jpayne@69 25326 Py_XDECREF(d);
jpayne@69 25327 return -1;
jpayne@69 25328 }
jpayne@69 25329 #endif
jpayne@69 25330
jpayne@69 25331 /* InitStrings */
jpayne@69 25332 #if PY_MAJOR_VERSION >= 3
jpayne@69 25333 static int __Pyx_InitString(__Pyx_StringTabEntry t, PyObject **str) {
jpayne@69 25334 if (t.is_unicode | t.is_str) {
jpayne@69 25335 if (t.intern) {
jpayne@69 25336 *str = PyUnicode_InternFromString(t.s);
jpayne@69 25337 } else if (t.encoding) {
jpayne@69 25338 *str = PyUnicode_Decode(t.s, t.n - 1, t.encoding, NULL);
jpayne@69 25339 } else {
jpayne@69 25340 *str = PyUnicode_FromStringAndSize(t.s, t.n - 1);
jpayne@69 25341 }
jpayne@69 25342 } else {
jpayne@69 25343 *str = PyBytes_FromStringAndSize(t.s, t.n - 1);
jpayne@69 25344 }
jpayne@69 25345 if (!*str)
jpayne@69 25346 return -1;
jpayne@69 25347 if (PyObject_Hash(*str) == -1)
jpayne@69 25348 return -1;
jpayne@69 25349 return 0;
jpayne@69 25350 }
jpayne@69 25351 #endif
jpayne@69 25352 static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) {
jpayne@69 25353 while (t->p) {
jpayne@69 25354 #if PY_MAJOR_VERSION >= 3
jpayne@69 25355 __Pyx_InitString(*t, t->p);
jpayne@69 25356 #else
jpayne@69 25357 if (t->is_unicode) {
jpayne@69 25358 *t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL);
jpayne@69 25359 } else if (t->intern) {
jpayne@69 25360 *t->p = PyString_InternFromString(t->s);
jpayne@69 25361 } else {
jpayne@69 25362 *t->p = PyString_FromStringAndSize(t->s, t->n - 1);
jpayne@69 25363 }
jpayne@69 25364 if (!*t->p)
jpayne@69 25365 return -1;
jpayne@69 25366 if (PyObject_Hash(*t->p) == -1)
jpayne@69 25367 return -1;
jpayne@69 25368 #endif
jpayne@69 25369 ++t;
jpayne@69 25370 }
jpayne@69 25371 return 0;
jpayne@69 25372 }
jpayne@69 25373
jpayne@69 25374 #include <string.h>
jpayne@69 25375 static CYTHON_INLINE Py_ssize_t __Pyx_ssize_strlen(const char *s) {
jpayne@69 25376 size_t len = strlen(s);
jpayne@69 25377 if (unlikely(len > (size_t) PY_SSIZE_T_MAX)) {
jpayne@69 25378 PyErr_SetString(PyExc_OverflowError, "byte string is too long");
jpayne@69 25379 return -1;
jpayne@69 25380 }
jpayne@69 25381 return (Py_ssize_t) len;
jpayne@69 25382 }
jpayne@69 25383 static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) {
jpayne@69 25384 Py_ssize_t len = __Pyx_ssize_strlen(c_str);
jpayne@69 25385 if (unlikely(len < 0)) return NULL;
jpayne@69 25386 return __Pyx_PyUnicode_FromStringAndSize(c_str, len);
jpayne@69 25387 }
jpayne@69 25388 static CYTHON_INLINE PyObject* __Pyx_PyByteArray_FromString(const char* c_str) {
jpayne@69 25389 Py_ssize_t len = __Pyx_ssize_strlen(c_str);
jpayne@69 25390 if (unlikely(len < 0)) return NULL;
jpayne@69 25391 return PyByteArray_FromStringAndSize(c_str, len);
jpayne@69 25392 }
jpayne@69 25393 static CYTHON_INLINE const char* __Pyx_PyObject_AsString(PyObject* o) {
jpayne@69 25394 Py_ssize_t ignore;
jpayne@69 25395 return __Pyx_PyObject_AsStringAndSize(o, &ignore);
jpayne@69 25396 }
jpayne@69 25397 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
jpayne@69 25398 #if !CYTHON_PEP393_ENABLED
jpayne@69 25399 static const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
jpayne@69 25400 char* defenc_c;
jpayne@69 25401 PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL);
jpayne@69 25402 if (!defenc) return NULL;
jpayne@69 25403 defenc_c = PyBytes_AS_STRING(defenc);
jpayne@69 25404 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
jpayne@69 25405 {
jpayne@69 25406 char* end = defenc_c + PyBytes_GET_SIZE(defenc);
jpayne@69 25407 char* c;
jpayne@69 25408 for (c = defenc_c; c < end; c++) {
jpayne@69 25409 if ((unsigned char) (*c) >= 128) {
jpayne@69 25410 PyUnicode_AsASCIIString(o);
jpayne@69 25411 return NULL;
jpayne@69 25412 }
jpayne@69 25413 }
jpayne@69 25414 }
jpayne@69 25415 #endif
jpayne@69 25416 *length = PyBytes_GET_SIZE(defenc);
jpayne@69 25417 return defenc_c;
jpayne@69 25418 }
jpayne@69 25419 #else
jpayne@69 25420 static CYTHON_INLINE const char* __Pyx_PyUnicode_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
jpayne@69 25421 if (unlikely(__Pyx_PyUnicode_READY(o) == -1)) return NULL;
jpayne@69 25422 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
jpayne@69 25423 if (likely(PyUnicode_IS_ASCII(o))) {
jpayne@69 25424 *length = PyUnicode_GET_LENGTH(o);
jpayne@69 25425 return PyUnicode_AsUTF8(o);
jpayne@69 25426 } else {
jpayne@69 25427 PyUnicode_AsASCIIString(o);
jpayne@69 25428 return NULL;
jpayne@69 25429 }
jpayne@69 25430 #else
jpayne@69 25431 return PyUnicode_AsUTF8AndSize(o, length);
jpayne@69 25432 #endif
jpayne@69 25433 }
jpayne@69 25434 #endif
jpayne@69 25435 #endif
jpayne@69 25436 static CYTHON_INLINE const char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
jpayne@69 25437 #if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
jpayne@69 25438 if (
jpayne@69 25439 #if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
jpayne@69 25440 __Pyx_sys_getdefaultencoding_not_ascii &&
jpayne@69 25441 #endif
jpayne@69 25442 PyUnicode_Check(o)) {
jpayne@69 25443 return __Pyx_PyUnicode_AsStringAndSize(o, length);
jpayne@69 25444 } else
jpayne@69 25445 #endif
jpayne@69 25446 #if (!CYTHON_COMPILING_IN_PYPY && !CYTHON_COMPILING_IN_LIMITED_API) || (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE))
jpayne@69 25447 if (PyByteArray_Check(o)) {
jpayne@69 25448 *length = PyByteArray_GET_SIZE(o);
jpayne@69 25449 return PyByteArray_AS_STRING(o);
jpayne@69 25450 } else
jpayne@69 25451 #endif
jpayne@69 25452 {
jpayne@69 25453 char* result;
jpayne@69 25454 int r = PyBytes_AsStringAndSize(o, &result, length);
jpayne@69 25455 if (unlikely(r < 0)) {
jpayne@69 25456 return NULL;
jpayne@69 25457 } else {
jpayne@69 25458 return result;
jpayne@69 25459 }
jpayne@69 25460 }
jpayne@69 25461 }
jpayne@69 25462 static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) {
jpayne@69 25463 int is_true = x == Py_True;
jpayne@69 25464 if (is_true | (x == Py_False) | (x == Py_None)) return is_true;
jpayne@69 25465 else return PyObject_IsTrue(x);
jpayne@69 25466 }
jpayne@69 25467 static CYTHON_INLINE int __Pyx_PyObject_IsTrueAndDecref(PyObject* x) {
jpayne@69 25468 int retval;
jpayne@69 25469 if (unlikely(!x)) return -1;
jpayne@69 25470 retval = __Pyx_PyObject_IsTrue(x);
jpayne@69 25471 Py_DECREF(x);
jpayne@69 25472 return retval;
jpayne@69 25473 }
jpayne@69 25474 static PyObject* __Pyx_PyNumber_IntOrLongWrongResultType(PyObject* result, const char* type_name) {
jpayne@69 25475 __Pyx_TypeName result_type_name = __Pyx_PyType_GetName(Py_TYPE(result));
jpayne@69 25476 #if PY_MAJOR_VERSION >= 3
jpayne@69 25477 if (PyLong_Check(result)) {
jpayne@69 25478 if (PyErr_WarnFormat(PyExc_DeprecationWarning, 1,
jpayne@69 25479 "__int__ returned non-int (type " __Pyx_FMT_TYPENAME "). "
jpayne@69 25480 "The ability to return an instance of a strict subclass of int is deprecated, "
jpayne@69 25481 "and may be removed in a future version of Python.",
jpayne@69 25482 result_type_name)) {
jpayne@69 25483 __Pyx_DECREF_TypeName(result_type_name);
jpayne@69 25484 Py_DECREF(result);
jpayne@69 25485 return NULL;
jpayne@69 25486 }
jpayne@69 25487 __Pyx_DECREF_TypeName(result_type_name);
jpayne@69 25488 return result;
jpayne@69 25489 }
jpayne@69 25490 #endif
jpayne@69 25491 PyErr_Format(PyExc_TypeError,
jpayne@69 25492 "__%.4s__ returned non-%.4s (type " __Pyx_FMT_TYPENAME ")",
jpayne@69 25493 type_name, type_name, result_type_name);
jpayne@69 25494 __Pyx_DECREF_TypeName(result_type_name);
jpayne@69 25495 Py_DECREF(result);
jpayne@69 25496 return NULL;
jpayne@69 25497 }
jpayne@69 25498 static CYTHON_INLINE PyObject* __Pyx_PyNumber_IntOrLong(PyObject* x) {
jpayne@69 25499 #if CYTHON_USE_TYPE_SLOTS
jpayne@69 25500 PyNumberMethods *m;
jpayne@69 25501 #endif
jpayne@69 25502 const char *name = NULL;
jpayne@69 25503 PyObject *res = NULL;
jpayne@69 25504 #if PY_MAJOR_VERSION < 3
jpayne@69 25505 if (likely(PyInt_Check(x) || PyLong_Check(x)))
jpayne@69 25506 #else
jpayne@69 25507 if (likely(PyLong_Check(x)))
jpayne@69 25508 #endif
jpayne@69 25509 return __Pyx_NewRef(x);
jpayne@69 25510 #if CYTHON_USE_TYPE_SLOTS
jpayne@69 25511 m = Py_TYPE(x)->tp_as_number;
jpayne@69 25512 #if PY_MAJOR_VERSION < 3
jpayne@69 25513 if (m && m->nb_int) {
jpayne@69 25514 name = "int";
jpayne@69 25515 res = m->nb_int(x);
jpayne@69 25516 }
jpayne@69 25517 else if (m && m->nb_long) {
jpayne@69 25518 name = "long";
jpayne@69 25519 res = m->nb_long(x);
jpayne@69 25520 }
jpayne@69 25521 #else
jpayne@69 25522 if (likely(m && m->nb_int)) {
jpayne@69 25523 name = "int";
jpayne@69 25524 res = m->nb_int(x);
jpayne@69 25525 }
jpayne@69 25526 #endif
jpayne@69 25527 #else
jpayne@69 25528 if (!PyBytes_CheckExact(x) && !PyUnicode_CheckExact(x)) {
jpayne@69 25529 res = PyNumber_Int(x);
jpayne@69 25530 }
jpayne@69 25531 #endif
jpayne@69 25532 if (likely(res)) {
jpayne@69 25533 #if PY_MAJOR_VERSION < 3
jpayne@69 25534 if (unlikely(!PyInt_Check(res) && !PyLong_Check(res))) {
jpayne@69 25535 #else
jpayne@69 25536 if (unlikely(!PyLong_CheckExact(res))) {
jpayne@69 25537 #endif
jpayne@69 25538 return __Pyx_PyNumber_IntOrLongWrongResultType(res, name);
jpayne@69 25539 }
jpayne@69 25540 }
jpayne@69 25541 else if (!PyErr_Occurred()) {
jpayne@69 25542 PyErr_SetString(PyExc_TypeError,
jpayne@69 25543 "an integer is required");
jpayne@69 25544 }
jpayne@69 25545 return res;
jpayne@69 25546 }
jpayne@69 25547 static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) {
jpayne@69 25548 Py_ssize_t ival;
jpayne@69 25549 PyObject *x;
jpayne@69 25550 #if PY_MAJOR_VERSION < 3
jpayne@69 25551 if (likely(PyInt_CheckExact(b))) {
jpayne@69 25552 if (sizeof(Py_ssize_t) >= sizeof(long))
jpayne@69 25553 return PyInt_AS_LONG(b);
jpayne@69 25554 else
jpayne@69 25555 return PyInt_AsSsize_t(b);
jpayne@69 25556 }
jpayne@69 25557 #endif
jpayne@69 25558 if (likely(PyLong_CheckExact(b))) {
jpayne@69 25559 #if CYTHON_USE_PYLONG_INTERNALS
jpayne@69 25560 if (likely(__Pyx_PyLong_IsCompact(b))) {
jpayne@69 25561 return __Pyx_PyLong_CompactValue(b);
jpayne@69 25562 } else {
jpayne@69 25563 const digit* digits = __Pyx_PyLong_Digits(b);
jpayne@69 25564 const Py_ssize_t size = __Pyx_PyLong_SignedDigitCount(b);
jpayne@69 25565 switch (size) {
jpayne@69 25566 case 2:
jpayne@69 25567 if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
jpayne@69 25568 return (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
jpayne@69 25569 }
jpayne@69 25570 break;
jpayne@69 25571 case -2:
jpayne@69 25572 if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
jpayne@69 25573 return -(Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
jpayne@69 25574 }
jpayne@69 25575 break;
jpayne@69 25576 case 3:
jpayne@69 25577 if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
jpayne@69 25578 return (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
jpayne@69 25579 }
jpayne@69 25580 break;
jpayne@69 25581 case -3:
jpayne@69 25582 if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
jpayne@69 25583 return -(Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
jpayne@69 25584 }
jpayne@69 25585 break;
jpayne@69 25586 case 4:
jpayne@69 25587 if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
jpayne@69 25588 return (Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
jpayne@69 25589 }
jpayne@69 25590 break;
jpayne@69 25591 case -4:
jpayne@69 25592 if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
jpayne@69 25593 return -(Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
jpayne@69 25594 }
jpayne@69 25595 break;
jpayne@69 25596 }
jpayne@69 25597 }
jpayne@69 25598 #endif
jpayne@69 25599 return PyLong_AsSsize_t(b);
jpayne@69 25600 }
jpayne@69 25601 x = PyNumber_Index(b);
jpayne@69 25602 if (!x) return -1;
jpayne@69 25603 ival = PyInt_AsSsize_t(x);
jpayne@69 25604 Py_DECREF(x);
jpayne@69 25605 return ival;
jpayne@69 25606 }
jpayne@69 25607 static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject* o) {
jpayne@69 25608 if (sizeof(Py_hash_t) == sizeof(Py_ssize_t)) {
jpayne@69 25609 return (Py_hash_t) __Pyx_PyIndex_AsSsize_t(o);
jpayne@69 25610 #if PY_MAJOR_VERSION < 3
jpayne@69 25611 } else if (likely(PyInt_CheckExact(o))) {
jpayne@69 25612 return PyInt_AS_LONG(o);
jpayne@69 25613 #endif
jpayne@69 25614 } else {
jpayne@69 25615 Py_ssize_t ival;
jpayne@69 25616 PyObject *x;
jpayne@69 25617 x = PyNumber_Index(o);
jpayne@69 25618 if (!x) return -1;
jpayne@69 25619 ival = PyInt_AsLong(x);
jpayne@69 25620 Py_DECREF(x);
jpayne@69 25621 return ival;
jpayne@69 25622 }
jpayne@69 25623 }
jpayne@69 25624 static CYTHON_INLINE PyObject * __Pyx_PyBool_FromLong(long b) {
jpayne@69 25625 return b ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(Py_False);
jpayne@69 25626 }
jpayne@69 25627 static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) {
jpayne@69 25628 return PyInt_FromSize_t(ival);
jpayne@69 25629 }
jpayne@69 25630
jpayne@69 25631
jpayne@69 25632 /* #### Code section: utility_code_pragmas_end ### */
jpayne@69 25633 #ifdef _MSC_VER
jpayne@69 25634 #pragma warning( pop )
jpayne@69 25635 #endif
jpayne@69 25636
jpayne@69 25637
jpayne@69 25638
jpayne@69 25639 /* #### Code section: end ### */
jpayne@69 25640 #endif /* Py_PYTHON_H */