1 /* Generated by Cython 0.14.1 on Thu Nov 17 22:34:01 2011 */
3 #define PY_SSIZE_T_CLEAN
6 #error Python headers needed to compile C extensions, please install development version of Python.
9 #include <stddef.h> /* For offsetof */
11 #define offsetof(type, member) ( (size_t) & ((type*)0) -> member )
14 #if !defined(WIN32) && !defined(MS_WINDOWS)
27 #define DL_IMPORT(t) t
30 #define DL_EXPORT(t) t
34 #define PY_LONG_LONG LONG_LONG
37 #if PY_VERSION_HEX < 0x02040000
38 #define METH_COEXIST 0
39 #define PyDict_CheckExact(op) (Py_TYPE(op) == &PyDict_Type)
40 #define PyDict_Contains(d,o) PySequence_Contains(d,o)
43 #if PY_VERSION_HEX < 0x02050000
44 typedef int Py_ssize_t;
45 #define PY_SSIZE_T_MAX INT_MAX
46 #define PY_SSIZE_T_MIN INT_MIN
47 #define PY_FORMAT_SIZE_T ""
48 #define PyInt_FromSsize_t(z) PyInt_FromLong(z)
49 #define PyInt_AsSsize_t(o) PyInt_AsLong(o)
50 #define PyNumber_Index(o) PyNumber_Int(o)
51 #define PyIndex_Check(o) PyNumber_Check(o)
52 #define PyErr_WarnEx(category, message, stacklevel) PyErr_Warn(category, message)
55 #if PY_VERSION_HEX < 0x02060000
56 #define Py_REFCNT(ob) (((PyObject*)(ob))->ob_refcnt)
57 #define Py_TYPE(ob) (((PyObject*)(ob))->ob_type)
58 #define Py_SIZE(ob) (((PyVarObject*)(ob))->ob_size)
59 #define PyVarObject_HEAD_INIT(type, size) \
60 PyObject_HEAD_INIT(type) size,
61 #define PyType_Modified(t)
73 Py_ssize_t *suboffsets;
77 #define PyBUF_SIMPLE 0
78 #define PyBUF_WRITABLE 0x0001
79 #define PyBUF_FORMAT 0x0004
80 #define PyBUF_ND 0x0008
81 #define PyBUF_STRIDES (0x0010 | PyBUF_ND)
82 #define PyBUF_C_CONTIGUOUS (0x0020 | PyBUF_STRIDES)
83 #define PyBUF_F_CONTIGUOUS (0x0040 | PyBUF_STRIDES)
84 #define PyBUF_ANY_CONTIGUOUS (0x0080 | PyBUF_STRIDES)
85 #define PyBUF_INDIRECT (0x0100 | PyBUF_STRIDES)
89 #if PY_MAJOR_VERSION < 3
90 #define __Pyx_BUILTIN_MODULE_NAME "__builtin__"
92 #define __Pyx_BUILTIN_MODULE_NAME "builtins"
95 #if PY_MAJOR_VERSION >= 3
96 #define Py_TPFLAGS_CHECKTYPES 0
97 #define Py_TPFLAGS_HAVE_INDEX 0
100 #if (PY_VERSION_HEX < 0x02060000) || (PY_MAJOR_VERSION >= 3)
101 #define Py_TPFLAGS_HAVE_NEWBUFFER 0
104 #if PY_MAJOR_VERSION >= 3
105 #define PyBaseString_Type PyUnicode_Type
106 #define PyStringObject PyUnicodeObject
107 #define PyString_Type PyUnicode_Type
108 #define PyString_Check PyUnicode_Check
109 #define PyString_CheckExact PyUnicode_CheckExact
112 #if PY_VERSION_HEX < 0x02060000
113 #define PyBytesObject PyStringObject
114 #define PyBytes_Type PyString_Type
115 #define PyBytes_Check PyString_Check
116 #define PyBytes_CheckExact PyString_CheckExact
117 #define PyBytes_FromString PyString_FromString
118 #define PyBytes_FromStringAndSize PyString_FromStringAndSize
119 #define PyBytes_FromFormat PyString_FromFormat
120 #define PyBytes_DecodeEscape PyString_DecodeEscape
121 #define PyBytes_AsString PyString_AsString
122 #define PyBytes_AsStringAndSize PyString_AsStringAndSize
123 #define PyBytes_Size PyString_Size
124 #define PyBytes_AS_STRING PyString_AS_STRING
125 #define PyBytes_GET_SIZE PyString_GET_SIZE
126 #define PyBytes_Repr PyString_Repr
127 #define PyBytes_Concat PyString_Concat
128 #define PyBytes_ConcatAndDel PyString_ConcatAndDel
131 #if PY_VERSION_HEX < 0x02060000
132 #define PySet_Check(obj) PyObject_TypeCheck(obj, &PySet_Type)
133 #define PyFrozenSet_Check(obj) PyObject_TypeCheck(obj, &PyFrozenSet_Type)
135 #ifndef PySet_CheckExact
136 #define PySet_CheckExact(obj) (Py_TYPE(obj) == &PySet_Type)
139 #define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type)
141 #if PY_MAJOR_VERSION >= 3
142 #define PyIntObject PyLongObject
143 #define PyInt_Type PyLong_Type
144 #define PyInt_Check(op) PyLong_Check(op)
145 #define PyInt_CheckExact(op) PyLong_CheckExact(op)
146 #define PyInt_FromString PyLong_FromString
147 #define PyInt_FromUnicode PyLong_FromUnicode
148 #define PyInt_FromLong PyLong_FromLong
149 #define PyInt_FromSize_t PyLong_FromSize_t
150 #define PyInt_FromSsize_t PyLong_FromSsize_t
151 #define PyInt_AsLong PyLong_AsLong
152 #define PyInt_AS_LONG PyLong_AS_LONG
153 #define PyInt_AsSsize_t PyLong_AsSsize_t
154 #define PyInt_AsUnsignedLongMask PyLong_AsUnsignedLongMask
155 #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask
158 #if PY_MAJOR_VERSION >= 3
159 #define PyBoolObject PyLongObject
163 #if PY_MAJOR_VERSION >= 3
164 #define __Pyx_PyNumber_Divide(x,y) PyNumber_TrueDivide(x,y)
165 #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceTrueDivide(x,y)
167 #define __Pyx_PyNumber_Divide(x,y) PyNumber_Divide(x,y)
168 #define __Pyx_PyNumber_InPlaceDivide(x,y) PyNumber_InPlaceDivide(x,y)
171 #if (PY_MAJOR_VERSION < 3) || (PY_VERSION_HEX >= 0x03010300)
172 #define __Pyx_PySequence_GetSlice(obj, a, b) PySequence_GetSlice(obj, a, b)
173 #define __Pyx_PySequence_SetSlice(obj, a, b, value) PySequence_SetSlice(obj, a, b, value)
174 #define __Pyx_PySequence_DelSlice(obj, a, b) PySequence_DelSlice(obj, a, b)
176 #define __Pyx_PySequence_GetSlice(obj, a, b) (unlikely(!(obj)) ? \
177 (PyErr_SetString(PyExc_SystemError, "null argument to internal routine"), (PyObject*)0) : \
178 (likely((obj)->ob_type->tp_as_mapping) ? (PySequence_GetSlice(obj, a, b)) : \
179 (PyErr_Format(PyExc_TypeError, "'%.200s' object is unsliceable", (obj)->ob_type->tp_name), (PyObject*)0)))
180 #define __Pyx_PySequence_SetSlice(obj, a, b, value) (unlikely(!(obj)) ? \
181 (PyErr_SetString(PyExc_SystemError, "null argument to internal routine"), -1) : \
182 (likely((obj)->ob_type->tp_as_mapping) ? (PySequence_SetSlice(obj, a, b, value)) : \
183 (PyErr_Format(PyExc_TypeError, "'%.200s' object doesn't support slice assignment", (obj)->ob_type->tp_name), -1)))
184 #define __Pyx_PySequence_DelSlice(obj, a, b) (unlikely(!(obj)) ? \
185 (PyErr_SetString(PyExc_SystemError, "null argument to internal routine"), -1) : \
186 (likely((obj)->ob_type->tp_as_mapping) ? (PySequence_DelSlice(obj, a, b)) : \
187 (PyErr_Format(PyExc_TypeError, "'%.200s' object doesn't support slice deletion", (obj)->ob_type->tp_name), -1)))
190 #if PY_MAJOR_VERSION >= 3
191 #define PyMethod_New(func, self, klass) ((self) ? PyMethod_New(func, self) : PyInstanceMethod_New(func))
194 #if PY_VERSION_HEX < 0x02050000
195 #define __Pyx_GetAttrString(o,n) PyObject_GetAttrString((o),((char *)(n)))
196 #define __Pyx_SetAttrString(o,n,a) PyObject_SetAttrString((o),((char *)(n)),(a))
197 #define __Pyx_DelAttrString(o,n) PyObject_DelAttrString((o),((char *)(n)))
199 #define __Pyx_GetAttrString(o,n) PyObject_GetAttrString((o),(n))
200 #define __Pyx_SetAttrString(o,n,a) PyObject_SetAttrString((o),(n),(a))
201 #define __Pyx_DelAttrString(o,n) PyObject_DelAttrString((o),(n))
204 #if PY_VERSION_HEX < 0x02050000
205 #define __Pyx_NAMESTR(n) ((char *)(n))
206 #define __Pyx_DOCSTR(n) ((char *)(n))
208 #define __Pyx_NAMESTR(n) (n)
209 #define __Pyx_DOCSTR(n) (n)
213 #define __PYX_EXTERN_C extern "C"
215 #define __PYX_EXTERN_C extern
218 #if defined(WIN32) || defined(MS_WINDOWS)
219 #define _USE_MATH_DEFINES
222 #define __PYX_HAVE_API__TabProxies
227 #include "pythread.h"
229 #ifdef PYREX_WITHOUT_ASSERTIONS
230 #define CYTHON_WITHOUT_ASSERTIONS
234 /* inline attribute */
235 #ifndef CYTHON_INLINE
236 #if defined(__GNUC__)
237 #define CYTHON_INLINE __inline__
238 #elif defined(_MSC_VER)
239 #define CYTHON_INLINE __inline
240 #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
241 #define CYTHON_INLINE inline
243 #define CYTHON_INLINE
247 /* unused attribute */
248 #ifndef CYTHON_UNUSED
249 # if defined(__GNUC__)
250 # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
251 # define CYTHON_UNUSED __attribute__ ((__unused__))
253 # define CYTHON_UNUSED
255 # elif defined(__ICC) || defined(__INTEL_COMPILER)
256 # define CYTHON_UNUSED __attribute__ ((__unused__))
258 # define CYTHON_UNUSED
262 typedef struct {PyObject **p; char *s; const long n; const char* encoding; const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry; /*proto*/
265 /* Type Conversion Predeclarations */
267 #define __Pyx_PyBytes_FromUString(s) PyBytes_FromString((char*)s)
268 #define __Pyx_PyBytes_AsUString(s) ((unsigned char*) PyBytes_AsString(s))
270 #define __Pyx_PyBool_FromLong(b) ((b) ? (Py_INCREF(Py_True), Py_True) : (Py_INCREF(Py_False), Py_False))
271 static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*);
272 static CYTHON_INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x);
274 static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*);
275 static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t);
276 static CYTHON_INLINE size_t __Pyx_PyInt_AsSize_t(PyObject*);
278 #define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x))
282 /* Test for GCC > 2.95 */
283 #if __GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95))
284 #define likely(x) __builtin_expect(!!(x), 1)
285 #define unlikely(x) __builtin_expect(!!(x), 0)
286 #else /* __GNUC__ > 2 ... */
287 #define likely(x) (x)
288 #define unlikely(x) (x)
289 #endif /* __GNUC__ > 2 ... */
291 #define likely(x) (x)
292 #define unlikely(x) (x)
293 #endif /* __GNUC__ */
295 static PyObject *__pyx_m;
296 static PyObject *__pyx_b;
297 static PyObject *__pyx_empty_tuple;
298 static PyObject *__pyx_empty_bytes;
299 static int __pyx_lineno;
300 static int __pyx_clineno = 0;
301 static const char * __pyx_cfilenm= __FILE__;
302 static const char *__pyx_filename;
305 static const char *__pyx_f[] = {
311 /* Type declarations */
313 /* "TabProxies.pxd":42
314 * ctypedef int uint64_t
316 * cdef class TupleProxy: # <<<<<<<<<<<<<<
321 struct __pyx_obj_10TabProxies_TupleProxy {
323 struct __pyx_vtabstruct_10TabProxies_TupleProxy *__pyx_vtab;
333 /* "TabProxies.pxd":78
334 * cdef update( self, char * buffer, size_t nbytes )
336 * cdef class NamedTupleProxy( TupleProxy) : # <<<<<<<<<<<<<<
341 struct __pyx_obj_10TabProxies_NamedTupleProxy {
342 struct __pyx_obj_10TabProxies_TupleProxy __pyx_base;
345 /* "TabProxies.pxd":92
346 * cdef update( self, char * buffer, size_t nbytes )
348 * cdef class VCFProxy( NamedTupleProxy) : # <<<<<<<<<<<<<<
353 struct __pyx_obj_10TabProxies_VCFProxy {
354 struct __pyx_obj_10TabProxies_NamedTupleProxy __pyx_base;
359 /* "TabProxies.pxd":61
360 * cdef update( self, char * buffer, size_t nbytes )
362 * cdef class GTFProxy( TupleProxy) : # <<<<<<<<<<<<<<
367 struct __pyx_obj_10TabProxies_GTFProxy {
368 struct __pyx_obj_10TabProxies_TupleProxy __pyx_base;
378 int hasOwnAttributes;
381 /* "TabProxies.pxd":81
384 * cdef class BedProxy( NamedTupleProxy) : # <<<<<<<<<<<<<<
389 struct __pyx_obj_10TabProxies_BedProxy {
390 struct __pyx_obj_10TabProxies_NamedTupleProxy __pyx_base;
398 /* "TabProxies.pyx":20
399 * return not (buffer <= p < buffer + nbytes )
401 * cdef class TupleProxy: # <<<<<<<<<<<<<<
402 * '''Proxy class for access to parsed row as a tuple.
406 struct __pyx_vtabstruct_10TabProxies_TupleProxy {
407 int (*getMaxFields)(struct __pyx_obj_10TabProxies_TupleProxy *, size_t);
408 PyObject *(*take)(struct __pyx_obj_10TabProxies_TupleProxy *, char *, size_t);
409 PyObject *(*present)(struct __pyx_obj_10TabProxies_TupleProxy *, char *, size_t);
410 PyObject *(*copy)(struct __pyx_obj_10TabProxies_TupleProxy *, char *, size_t);
411 PyObject *(*update)(struct __pyx_obj_10TabProxies_TupleProxy *, char *, size_t);
413 static struct __pyx_vtabstruct_10TabProxies_TupleProxy *__pyx_vtabptr_10TabProxies_TupleProxy;
416 /* "TabProxies.pyx":493
419 * cdef class NamedTupleProxy( TupleProxy ): # <<<<<<<<<<<<<<
424 struct __pyx_vtabstruct_10TabProxies_NamedTupleProxy {
425 struct __pyx_vtabstruct_10TabProxies_TupleProxy __pyx_base;
427 static struct __pyx_vtabstruct_10TabProxies_NamedTupleProxy *__pyx_vtabptr_10TabProxies_NamedTupleProxy;
430 /* "TabProxies.pyx":578
431 * TupleProxy._setindex(self, idx, str(value) )
433 * cdef class VCFProxy( NamedTupleProxy ): # <<<<<<<<<<<<<<
434 * '''Proxy class for access to VCF fields.
438 struct __pyx_vtabstruct_10TabProxies_VCFProxy {
439 struct __pyx_vtabstruct_10TabProxies_NamedTupleProxy __pyx_base;
441 static struct __pyx_vtabstruct_10TabProxies_VCFProxy *__pyx_vtabptr_10TabProxies_VCFProxy;
444 /* "TabProxies.pyx":512
445 * return f( self.fields[idx] )
447 * cdef class BedProxy( NamedTupleProxy ): # <<<<<<<<<<<<<<
448 * '''Proxy class for access to Bed fields.
452 struct __pyx_vtabstruct_10TabProxies_BedProxy {
453 struct __pyx_vtabstruct_10TabProxies_NamedTupleProxy __pyx_base;
455 static struct __pyx_vtabstruct_10TabProxies_BedProxy *__pyx_vtabptr_10TabProxies_BedProxy;
458 /* "TabProxies.pyx":240
461 * cdef class GTFProxy( TupleProxy ): # <<<<<<<<<<<<<<
462 * '''Proxy class for access to GTF fields.
466 struct __pyx_vtabstruct_10TabProxies_GTFProxy {
467 struct __pyx_vtabstruct_10TabProxies_TupleProxy __pyx_base;
469 static struct __pyx_vtabstruct_10TabProxies_GTFProxy *__pyx_vtabptr_10TabProxies_GTFProxy;
471 #ifndef CYTHON_REFNANNY
472 #define CYTHON_REFNANNY 0
477 void (*INCREF)(void*, PyObject*, int);
478 void (*DECREF)(void*, PyObject*, int);
479 void (*GOTREF)(void*, PyObject*, int);
480 void (*GIVEREF)(void*, PyObject*, int);
481 void* (*SetupContext)(const char*, int, const char*);
482 void (*FinishContext)(void**);
483 } __Pyx_RefNannyAPIStruct;
484 static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL;
485 static __Pyx_RefNannyAPIStruct * __Pyx_RefNannyImportAPI(const char *modname) {
486 PyObject *m = NULL, *p = NULL;
488 m = PyImport_ImportModule((char *)modname);
490 p = PyObject_GetAttrString(m, (char *)"RefNannyAPI");
492 r = PyLong_AsVoidPtr(p);
496 return (__Pyx_RefNannyAPIStruct *)r;
498 #define __Pyx_RefNannySetupContext(name) void *__pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__)
499 #define __Pyx_RefNannyFinishContext() __Pyx_RefNanny->FinishContext(&__pyx_refnanny)
500 #define __Pyx_INCREF(r) __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
501 #define __Pyx_DECREF(r) __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
502 #define __Pyx_GOTREF(r) __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
503 #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
504 #define __Pyx_XDECREF(r) do { if((r) != NULL) {__Pyx_DECREF(r);} } while(0)
506 #define __Pyx_RefNannySetupContext(name)
507 #define __Pyx_RefNannyFinishContext()
508 #define __Pyx_INCREF(r) Py_INCREF(r)
509 #define __Pyx_DECREF(r) Py_DECREF(r)
510 #define __Pyx_GOTREF(r)
511 #define __Pyx_GIVEREF(r)
512 #define __Pyx_XDECREF(r) Py_XDECREF(r)
513 #endif /* CYTHON_REFNANNY */
514 #define __Pyx_XGIVEREF(r) do { if((r) != NULL) {__Pyx_GIVEREF(r);} } while(0)
515 #define __Pyx_XGOTREF(r) do { if((r) != NULL) {__Pyx_GOTREF(r);} } while(0)
517 static PyObject *__Pyx_GetName(PyObject *dict, PyObject *name); /*proto*/
519 static CYTHON_INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb); /*proto*/
520 static CYTHON_INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb); /*proto*/
522 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb); /*proto*/
524 static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact,
525 Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found); /*proto*/
527 static CYTHON_INLINE int __Pyx_CheckKeywordStrings(PyObject *kwdict,
528 const char* function_name, int kw_allowed); /*proto*/
530 static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index);
532 static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected);
534 static PyObject *__Pyx_UnpackItem(PyObject *, Py_ssize_t index); /*proto*/
535 static int __Pyx_EndUnpack(PyObject *, Py_ssize_t expected); /*proto*/
537 static void __Pyx_RaiseDoubleKeywordsError(
538 const char* func_name, PyObject* kw_name); /*proto*/
540 static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[], PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args, const char* function_name); /*proto*/
542 static CYTHON_INLINE long __Pyx_NegateNonNeg(long b) { return unlikely(b < 0) ? b : !b; }
543 static CYTHON_INLINE PyObject* __Pyx_PyBoolOrNull_FromLong(long b) {
544 return unlikely(b < 0) ? NULL : __Pyx_PyBool_FromLong(b);
548 static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) {
551 r = PyObject_GetItem(o, j);
557 #define __Pyx_GetItemInt_List(o, i, size, to_py_func) (((size) <= sizeof(Py_ssize_t)) ? \
558 __Pyx_GetItemInt_List_Fast(o, i) : \
559 __Pyx_GetItemInt_Generic(o, to_py_func(i)))
561 static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i) {
562 if (likely(o != Py_None)) {
563 if (likely((0 <= i) & (i < PyList_GET_SIZE(o)))) {
564 PyObject *r = PyList_GET_ITEM(o, i);
568 else if ((-PyList_GET_SIZE(o) <= i) & (i < 0)) {
569 PyObject *r = PyList_GET_ITEM(o, PyList_GET_SIZE(o) + i);
574 return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
577 #define __Pyx_GetItemInt_Tuple(o, i, size, to_py_func) (((size) <= sizeof(Py_ssize_t)) ? \
578 __Pyx_GetItemInt_Tuple_Fast(o, i) : \
579 __Pyx_GetItemInt_Generic(o, to_py_func(i)))
581 static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i) {
582 if (likely(o != Py_None)) {
583 if (likely((0 <= i) & (i < PyTuple_GET_SIZE(o)))) {
584 PyObject *r = PyTuple_GET_ITEM(o, i);
588 else if ((-PyTuple_GET_SIZE(o) <= i) & (i < 0)) {
589 PyObject *r = PyTuple_GET_ITEM(o, PyTuple_GET_SIZE(o) + i);
594 return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
598 #define __Pyx_GetItemInt(o, i, size, to_py_func) (((size) <= sizeof(Py_ssize_t)) ? \
599 __Pyx_GetItemInt_Fast(o, i) : \
600 __Pyx_GetItemInt_Generic(o, to_py_func(i)))
602 static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i) {
604 if (PyList_CheckExact(o) && ((0 <= i) & (i < PyList_GET_SIZE(o)))) {
605 r = PyList_GET_ITEM(o, i);
608 else if (PyTuple_CheckExact(o) && ((0 <= i) & (i < PyTuple_GET_SIZE(o)))) {
609 r = PyTuple_GET_ITEM(o, i);
612 else if (Py_TYPE(o)->tp_as_sequence && Py_TYPE(o)->tp_as_sequence->sq_item && (likely(i >= 0))) {
613 r = PySequence_GetItem(o, i);
616 r = __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
621 static double __Pyx__PyObject_AsDouble(PyObject* obj); /* proto */
623 #define __Pyx_PyObject_AsDouble(obj) \
624 ((likely(PyFloat_CheckExact(obj))) ? \
625 PyFloat_AS_DOUBLE(obj) : __Pyx__PyObject_AsDouble(obj))
627 static CYTHON_INLINE void __Pyx_ExceptionSave(PyObject **type, PyObject **value, PyObject **tb); /*proto*/
628 static void __Pyx_ExceptionReset(PyObject *type, PyObject *value, PyObject *tb); /*proto*/
630 static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list); /*proto*/
632 static CYTHON_INLINE PyObject *__Pyx_PyInt_to_py_uint32_t(uint32_t);
634 static CYTHON_INLINE uint32_t __Pyx_PyInt_from_py_uint32_t(PyObject *);
636 static CYTHON_INLINE unsigned char __Pyx_PyInt_AsUnsignedChar(PyObject *);
638 static CYTHON_INLINE unsigned short __Pyx_PyInt_AsUnsignedShort(PyObject *);
640 static CYTHON_INLINE unsigned int __Pyx_PyInt_AsUnsignedInt(PyObject *);
642 static CYTHON_INLINE char __Pyx_PyInt_AsChar(PyObject *);
644 static CYTHON_INLINE short __Pyx_PyInt_AsShort(PyObject *);
646 static CYTHON_INLINE int __Pyx_PyInt_AsInt(PyObject *);
648 static CYTHON_INLINE signed char __Pyx_PyInt_AsSignedChar(PyObject *);
650 static CYTHON_INLINE signed short __Pyx_PyInt_AsSignedShort(PyObject *);
652 static CYTHON_INLINE signed int __Pyx_PyInt_AsSignedInt(PyObject *);
654 static CYTHON_INLINE int __Pyx_PyInt_AsLongDouble(PyObject *);
656 static CYTHON_INLINE unsigned long __Pyx_PyInt_AsUnsignedLong(PyObject *);
658 static CYTHON_INLINE unsigned PY_LONG_LONG __Pyx_PyInt_AsUnsignedLongLong(PyObject *);
660 static CYTHON_INLINE long __Pyx_PyInt_AsLong(PyObject *);
662 static CYTHON_INLINE PY_LONG_LONG __Pyx_PyInt_AsLongLong(PyObject *);
664 static CYTHON_INLINE signed long __Pyx_PyInt_AsSignedLong(PyObject *);
666 static CYTHON_INLINE signed PY_LONG_LONG __Pyx_PyInt_AsSignedLongLong(PyObject *);
668 static void __Pyx_WriteUnraisable(const char *name); /*proto*/
670 static int __Pyx_SetVtable(PyObject *dict, void *vtable); /*proto*/
672 static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class_name, long size, int strict); /*proto*/
674 static PyObject *__Pyx_ImportModule(const char *name); /*proto*/
676 static void __Pyx_AddTraceback(const char *funcname); /*proto*/
678 static int __Pyx_InitStrings(__Pyx_StringTabEntry *t); /*proto*/
679 /* Module declarations from cpython.version */
681 /* Module declarations from cpython.ref */
683 /* Module declarations from cpython.exc */
685 /* Module declarations from cpython.module */
687 /* Module declarations from cpython.mem */
689 /* Module declarations from cpython.tuple */
691 /* Module declarations from cpython.list */
693 /* Module declarations from libc.stdio */
695 /* Module declarations from cpython.object */
697 /* Module declarations from cpython.sequence */
699 /* Module declarations from cpython.mapping */
701 /* Module declarations from cpython.iterator */
703 /* Module declarations from cpython.type */
705 /* Module declarations from cpython.number */
707 /* Module declarations from cpython.int */
709 /* Module declarations from __builtin__ */
711 /* Module declarations from cpython.bool */
713 static PyTypeObject *__pyx_ptype_7cpython_4bool_bool = 0;
714 /* Module declarations from cpython.long */
716 /* Module declarations from cpython.float */
718 /* Module declarations from __builtin__ */
720 /* Module declarations from cpython.complex */
722 static PyTypeObject *__pyx_ptype_7cpython_7complex_complex = 0;
723 /* Module declarations from cpython.string */
725 /* Module declarations from cpython.unicode */
727 /* Module declarations from cpython.dict */
729 /* Module declarations from cpython.instance */
731 /* Module declarations from cpython.function */
733 /* Module declarations from cpython.method */
735 /* Module declarations from cpython.weakref */
737 /* Module declarations from cpython.getargs */
739 /* Module declarations from cpython.pythread */
741 /* Module declarations from cpython.cobject */
743 /* Module declarations from cpython.oldbuffer */
745 /* Module declarations from cpython.set */
747 /* Module declarations from cpython.buffer */
749 /* Module declarations from cpython.bytes */
751 /* Module declarations from cpython.pycapsule */
753 /* Module declarations from cpython */
755 /* Module declarations from TabProxies */
757 static PyTypeObject *__pyx_ptype_10TabProxies_TupleProxy = 0;
758 static PyTypeObject *__pyx_ptype_10TabProxies_GTFProxy = 0;
759 static PyTypeObject *__pyx_ptype_10TabProxies_NamedTupleProxy = 0;
760 static PyTypeObject *__pyx_ptype_10TabProxies_BedProxy = 0;
761 static PyTypeObject *__pyx_ptype_10TabProxies_VCFProxy = 0;
762 static char *__pyx_f_10TabProxies_nextItem(char *); /*proto*/
763 static char *__pyx_f_10TabProxies_StrOrEmpty(char *); /*proto*/
764 static int __pyx_f_10TabProxies_isNew(char *, char *, size_t); /*proto*/
765 #define __Pyx_MODULE_NAME "TabProxies"
766 static int __pyx_module_is_main_TabProxies = 0;
768 /* Implementation of TabProxies */
769 static PyObject *__pyx_builtin_ValueError;
770 static PyObject *__pyx_builtin_IndexError;
771 static PyObject *__pyx_builtin_range;
772 static PyObject *__pyx_builtin_StopIteration;
773 static PyObject *__pyx_builtin_xrange;
774 static PyObject *__pyx_builtin_TypeError;
775 static PyObject *__pyx_builtin_AttributeError;
776 static PyObject *__pyx_builtin_KeyError;
777 static char __pyx_k_1[] = "malformatted entry at %s";
778 static char __pyx_k_2[] = "";
779 static char __pyx_k_3[] = "out of memory";
780 static char __pyx_k_5[] = "incomplete line at %s";
781 static char __pyx_k_7[] = "row too large - more than %i fields";
782 static char __pyx_k_8[] = "list index out of range";
783 static char __pyx_k_10[] = "list index out of range %i >= %i";
784 static char __pyx_k_14[] = "\t";
785 static char __pyx_k_16[] = ".";
786 static char __pyx_k_17[] = "\"%s\"";
787 static char __pyx_k_18[] = ";";
788 static char __pyx_k_20[] = " ";
789 static char __pyx_k_22[] = "\"";
790 static char __pyx_k_23[] = "%s \"%s\"";
791 static char __pyx_k_24[] = "%s %s";
792 static char __pyx_k_25[] = "; ";
793 static char __pyx_k_29[] = "'GTFProxy' has no attribute '%s'";
794 static char __pyx_k_30[] = "field %s not set";
795 static char __pyx_k_31[] = "bed format requires at least three columns";
796 static char __pyx_k_33[] = "contig of feature.";
797 static char __pyx_k_34[] = "feature name.";
798 static char __pyx_k_35[] = "feature source.";
799 static char __pyx_k_36[] = "feature start (in 0-based open/closed coordinates).";
800 static char __pyx_k_37[] = "feature end (in 0-based open/closed coordinates).";
801 static char __pyx_k_38[] = "feature score.";
802 static char __pyx_k_39[] = "feature strand.";
803 static char __pyx_k_40[] = "feature frame.";
804 static char __pyx_k_41[] = "feature attributes (as a string).";
805 static char __pyx_k__id[] = "id";
806 static char __pyx_k__alt[] = "alt";
807 static char __pyx_k__end[] = "end";
808 static char __pyx_k__pos[] = "pos";
809 static char __pyx_k__ref[] = "ref";
810 static char __pyx_k__data[] = "data";
811 static char __pyx_k__info[] = "info";
812 static char __pyx_k__join[] = "join";
813 static char __pyx_k__name[] = "name";
814 static char __pyx_k__qual[] = "qual";
815 static char __pyx_k__frame[] = "frame";
816 static char __pyx_k__index[] = "index";
817 static char __pyx_k__items[] = "items";
818 static char __pyx_k__quote[] = "quote";
819 static char __pyx_k__range[] = "range";
820 static char __pyx_k__score[] = "score";
821 static char __pyx_k__split[] = "split";
822 static char __pyx_k__start[] = "start";
823 static char __pyx_k__strip[] = "strip";
824 static char __pyx_k__toDot[] = "toDot";
825 static char __pyx_k__types[] = "types";
826 static char __pyx_k__value[] = "value";
827 static char __pyx_k__append[] = "append";
828 static char __pyx_k__asDict[] = "asDict";
829 static char __pyx_k__contig[] = "contig";
830 static char __pyx_k__fields[] = "fields";
831 static char __pyx_k__filter[] = "filter";
832 static char __pyx_k__format[] = "format";
833 static char __pyx_k__nbytes[] = "nbytes";
834 static char __pyx_k__offset[] = "offset";
835 static char __pyx_k__source[] = "source";
836 static char __pyx_k__strand[] = "strand";
837 static char __pyx_k__update[] = "update";
838 static char __pyx_k__xrange[] = "xrange";
839 static char __pyx_k____str__[] = "__str__";
840 static char __pyx_k__feature[] = "feature";
841 static char __pyx_k__indices[] = "indices";
842 static char __pyx_k__itemRGB[] = "itemRGB";
843 static char __pyx_k__nfields[] = "nfields";
844 static char __pyx_k__KeyError[] = "KeyError";
845 static char __pyx_k____main__[] = "__main__";
846 static char __pyx_k____test__[] = "__test__";
847 static char __pyx_k__fromDict[] = "fromDict";
848 static char __pyx_k__thickEnd[] = "thickEnd";
849 static char __pyx_k__TypeError[] = "TypeError";
850 static char __pyx_k___getindex[] = "_getindex";
851 static char __pyx_k___setindex[] = "_setindex";
852 static char __pyx_k__bedfields[] = "bedfields";
853 static char __pyx_k__IndexError[] = "IndexError";
854 static char __pyx_k__StringType[] = "StringType";
855 static char __pyx_k__TabProxies[] = "TabProxies";
856 static char __pyx_k__ValueError[] = "ValueError";
857 static char __pyx_k__attributes[] = "attributes";
858 static char __pyx_k__blockCount[] = "blockCount";
859 static char __pyx_k__blockSizes[] = "blockSizes";
860 static char __pyx_k__thickStart[] = "thickStart";
861 static char __pyx_k__StringTypes[] = "StringTypes";
862 static char __pyx_k____getattr__[] = "__getattr__";
863 static char __pyx_k____setitem__[] = "__setitem__";
864 static char __pyx_k__blockStarts[] = "blockStarts";
865 static char __pyx_k__is_modified[] = "is_modified";
866 static char __pyx_k__getMaxFields[] = "getMaxFields";
867 static char __pyx_k__StopIteration[] = "StopIteration";
868 static char __pyx_k__map_key2field[] = "map_key2field";
869 static char __pyx_k__AttributeError[] = "AttributeError";
870 static char __pyx_k__hasOwnAttributes[] = "hasOwnAttributes";
871 static PyObject *__pyx_kp_s_1;
872 static PyObject *__pyx_kp_s_10;
873 static PyObject *__pyx_kp_s_14;
874 static PyObject *__pyx_kp_s_16;
875 static PyObject *__pyx_kp_s_17;
876 static PyObject *__pyx_kp_s_18;
877 static PyObject *__pyx_kp_s_2;
878 static PyObject *__pyx_kp_s_20;
879 static PyObject *__pyx_kp_s_22;
880 static PyObject *__pyx_kp_s_23;
881 static PyObject *__pyx_kp_s_24;
882 static PyObject *__pyx_kp_s_25;
883 static PyObject *__pyx_kp_s_29;
884 static PyObject *__pyx_kp_s_3;
885 static PyObject *__pyx_kp_s_30;
886 static PyObject *__pyx_kp_s_31;
887 static PyObject *__pyx_kp_s_5;
888 static PyObject *__pyx_kp_s_7;
889 static PyObject *__pyx_kp_s_8;
890 static PyObject *__pyx_n_s__AttributeError;
891 static PyObject *__pyx_n_s__IndexError;
892 static PyObject *__pyx_n_s__KeyError;
893 static PyObject *__pyx_n_s__StopIteration;
894 static PyObject *__pyx_n_s__StringType;
895 static PyObject *__pyx_n_s__StringTypes;
896 static PyObject *__pyx_n_s__TabProxies;
897 static PyObject *__pyx_n_s__TypeError;
898 static PyObject *__pyx_n_s__ValueError;
899 static PyObject *__pyx_n_s____getattr__;
900 static PyObject *__pyx_n_s____main__;
901 static PyObject *__pyx_n_s____setitem__;
902 static PyObject *__pyx_n_s____str__;
903 static PyObject *__pyx_n_s____test__;
904 static PyObject *__pyx_n_s___getindex;
905 static PyObject *__pyx_n_s___setindex;
906 static PyObject *__pyx_n_s__alt;
907 static PyObject *__pyx_n_s__append;
908 static PyObject *__pyx_n_s__asDict;
909 static PyObject *__pyx_n_s__attributes;
910 static PyObject *__pyx_n_s__bedfields;
911 static PyObject *__pyx_n_s__blockCount;
912 static PyObject *__pyx_n_s__blockSizes;
913 static PyObject *__pyx_n_s__blockStarts;
914 static PyObject *__pyx_n_s__contig;
915 static PyObject *__pyx_n_s__data;
916 static PyObject *__pyx_n_s__end;
917 static PyObject *__pyx_n_s__feature;
918 static PyObject *__pyx_n_s__fields;
919 static PyObject *__pyx_n_s__filter;
920 static PyObject *__pyx_n_s__format;
921 static PyObject *__pyx_n_s__frame;
922 static PyObject *__pyx_n_s__fromDict;
923 static PyObject *__pyx_n_s__getMaxFields;
924 static PyObject *__pyx_n_s__hasOwnAttributes;
925 static PyObject *__pyx_n_s__id;
926 static PyObject *__pyx_n_s__index;
927 static PyObject *__pyx_n_s__indices;
928 static PyObject *__pyx_n_s__info;
929 static PyObject *__pyx_n_s__is_modified;
930 static PyObject *__pyx_n_s__itemRGB;
931 static PyObject *__pyx_n_s__items;
932 static PyObject *__pyx_n_s__join;
933 static PyObject *__pyx_n_s__map_key2field;
934 static PyObject *__pyx_n_s__name;
935 static PyObject *__pyx_n_s__nbytes;
936 static PyObject *__pyx_n_s__nfields;
937 static PyObject *__pyx_n_s__offset;
938 static PyObject *__pyx_n_s__pos;
939 static PyObject *__pyx_n_s__qual;
940 static PyObject *__pyx_n_s__quote;
941 static PyObject *__pyx_n_s__range;
942 static PyObject *__pyx_n_s__ref;
943 static PyObject *__pyx_n_s__score;
944 static PyObject *__pyx_n_s__source;
945 static PyObject *__pyx_n_s__split;
946 static PyObject *__pyx_n_s__start;
947 static PyObject *__pyx_n_s__strand;
948 static PyObject *__pyx_n_s__strip;
949 static PyObject *__pyx_n_s__thickEnd;
950 static PyObject *__pyx_n_s__thickStart;
951 static PyObject *__pyx_n_s__toDot;
952 static PyObject *__pyx_n_s__types;
953 static PyObject *__pyx_n_s__update;
954 static PyObject *__pyx_n_s__value;
955 static PyObject *__pyx_n_s__xrange;
956 static PyObject *__pyx_int_0;
957 static PyObject *__pyx_int_1;
958 static PyObject *__pyx_int_2;
959 static PyObject *__pyx_int_3;
960 static PyObject *__pyx_int_4;
961 static PyObject *__pyx_int_5;
962 static PyObject *__pyx_int_6;
963 static PyObject *__pyx_int_7;
964 static PyObject *__pyx_int_8;
965 static PyObject *__pyx_int_9;
966 static PyObject *__pyx_int_10;
967 static PyObject *__pyx_int_11;
968 static PyObject *__pyx_k_tuple_4;
969 static PyObject *__pyx_k_tuple_6;
970 static PyObject *__pyx_k_tuple_9;
971 static PyObject *__pyx_k_tuple_11;
972 static PyObject *__pyx_k_tuple_12;
973 static PyObject *__pyx_k_tuple_13;
974 static PyObject *__pyx_k_tuple_15;
975 static PyObject *__pyx_k_tuple_19;
976 static PyObject *__pyx_k_tuple_21;
977 static PyObject *__pyx_k_tuple_26;
978 static PyObject *__pyx_k_tuple_27;
979 static PyObject *__pyx_k_tuple_28;
980 static PyObject *__pyx_k_tuple_32;
982 /* "TabProxies.pyx":4
983 * from cpython cimport PyString_FromStringAndSize, PyString_AsString, PyString_AS_STRING
985 * cdef char * nextItem( char * buffer ): # <<<<<<<<<<<<<<
987 * pos = strchr( buffer, '\t' )
990 static char *__pyx_f_10TabProxies_nextItem(char *__pyx_v_buffer) {
994 PyObject *__pyx_t_2 = NULL;
995 PyObject *__pyx_t_3 = NULL;
996 __Pyx_RefNannySetupContext("nextItem");
998 /* "TabProxies.pyx":6
999 * cdef char * nextItem( char * buffer ):
1001 * pos = strchr( buffer, '\t' ) # <<<<<<<<<<<<<<
1002 * if pos == NULL: raise ValueError( "malformatted entry at %s" % buffer )
1005 __pyx_v_pos = strchr(__pyx_v_buffer, '\t');
1007 /* "TabProxies.pyx":7
1009 * pos = strchr( buffer, '\t' )
1010 * if pos == NULL: raise ValueError( "malformatted entry at %s" % buffer ) # <<<<<<<<<<<<<<
1014 __pyx_t_1 = (__pyx_v_pos == NULL);
1016 __pyx_t_2 = PyBytes_FromString(__pyx_v_buffer); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 7; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1017 __Pyx_GOTREF(((PyObject *)__pyx_t_2));
1018 __pyx_t_3 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_1), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 7; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1019 __Pyx_GOTREF(((PyObject *)__pyx_t_3));
1020 __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
1021 __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 7; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1022 __Pyx_GOTREF(((PyObject *)__pyx_t_2));
1023 PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_t_3));
1024 __Pyx_GIVEREF(((PyObject *)__pyx_t_3));
1026 __pyx_t_3 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 7; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1027 __Pyx_GOTREF(__pyx_t_3);
1028 __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
1029 __Pyx_Raise(__pyx_t_3, 0, 0);
1030 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
1031 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 7; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1036 /* "TabProxies.pyx":8
1037 * pos = strchr( buffer, '\t' )
1038 * if pos == NULL: raise ValueError( "malformatted entry at %s" % buffer )
1039 * pos[0] = '\0' # <<<<<<<<<<<<<<
1043 (__pyx_v_pos[0]) = '\x00';
1045 /* "TabProxies.pyx":9
1046 * if pos == NULL: raise ValueError( "malformatted entry at %s" % buffer )
1048 * pos += 1 # <<<<<<<<<<<<<<
1052 __pyx_v_pos = (__pyx_v_pos + 1);
1054 /* "TabProxies.pyx":10
1057 * return pos # <<<<<<<<<<<<<<
1059 * cdef char *StrOrEmpty( char * buffer ):
1061 __pyx_r = __pyx_v_pos;
1067 __Pyx_XDECREF(__pyx_t_2);
1068 __Pyx_XDECREF(__pyx_t_3);
1069 __Pyx_WriteUnraisable("TabProxies.nextItem");
1072 __Pyx_RefNannyFinishContext();
1076 /* "TabProxies.pyx":12
1079 * cdef char *StrOrEmpty( char * buffer ): # <<<<<<<<<<<<<<
1080 * if buffer == NULL: return ""
1081 * else: return buffer
1084 static char *__pyx_f_10TabProxies_StrOrEmpty(char *__pyx_v_buffer) {
1087 __Pyx_RefNannySetupContext("StrOrEmpty");
1089 /* "TabProxies.pyx":13
1091 * cdef char *StrOrEmpty( char * buffer ):
1092 * if buffer == NULL: return "" # <<<<<<<<<<<<<<
1093 * else: return buffer
1096 __pyx_t_1 = (__pyx_v_buffer == NULL);
1098 __pyx_r = __pyx_k_2;
1104 /* "TabProxies.pyx":14
1105 * cdef char *StrOrEmpty( char * buffer ):
1106 * if buffer == NULL: return ""
1107 * else: return buffer # <<<<<<<<<<<<<<
1109 * cdef int isNew( char * p, char * buffer, size_t nbytes ):
1111 __pyx_r = __pyx_v_buffer;
1118 __Pyx_RefNannyFinishContext();
1122 /* "TabProxies.pyx":16
1123 * else: return buffer
1125 * cdef int isNew( char * p, char * buffer, size_t nbytes ): # <<<<<<<<<<<<<<
1126 * if p == NULL: return 0
1127 * return not (buffer <= p < buffer + nbytes )
1130 static int __pyx_f_10TabProxies_isNew(char *__pyx_v_p, char *__pyx_v_buffer, size_t __pyx_v_nbytes) {
1133 __Pyx_RefNannySetupContext("isNew");
1135 /* "TabProxies.pyx":17
1137 * cdef int isNew( char * p, char * buffer, size_t nbytes ):
1138 * if p == NULL: return 0 # <<<<<<<<<<<<<<
1139 * return not (buffer <= p < buffer + nbytes )
1142 __pyx_t_1 = (__pyx_v_p == NULL);
1150 /* "TabProxies.pyx":18
1151 * cdef int isNew( char * p, char * buffer, size_t nbytes ):
1152 * if p == NULL: return 0
1153 * return not (buffer <= p < buffer + nbytes ) # <<<<<<<<<<<<<<
1155 * cdef class TupleProxy:
1157 __pyx_t_1 = (__pyx_v_buffer <= __pyx_v_p);
1159 __pyx_t_1 = (__pyx_v_p < (__pyx_v_buffer + __pyx_v_nbytes));
1161 __pyx_r = (!__pyx_t_1);
1166 __Pyx_RefNannyFinishContext();
1170 /* "TabProxies.pyx":30
1173 * def __cinit__(self ): # <<<<<<<<<<<<<<
1175 * self.fields = NULL
1178 static int __pyx_pf_10TabProxies_10TupleProxy___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
1179 static int __pyx_pf_10TabProxies_10TupleProxy___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
1181 __Pyx_RefNannySetupContext("__cinit__");
1182 if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
1183 __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;}
1184 if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 0))) return -1;
1186 /* "TabProxies.pyx":31
1188 * def __cinit__(self ):
1189 * self.data = NULL # <<<<<<<<<<<<<<
1190 * self.fields = NULL
1193 ((struct __pyx_obj_10TabProxies_TupleProxy *)__pyx_v_self)->data = NULL;
1195 /* "TabProxies.pyx":32
1196 * def __cinit__(self ):
1198 * self.fields = NULL # <<<<<<<<<<<<<<
1202 ((struct __pyx_obj_10TabProxies_TupleProxy *)__pyx_v_self)->fields = NULL;
1204 /* "TabProxies.pyx":33
1206 * self.fields = NULL
1207 * self.index = 0 # <<<<<<<<<<<<<<
1209 * self.is_modified = 0
1211 ((struct __pyx_obj_10TabProxies_TupleProxy *)__pyx_v_self)->index = 0;
1213 /* "TabProxies.pyx":34
1214 * self.fields = NULL
1216 * self.nbytes = 0 # <<<<<<<<<<<<<<
1217 * self.is_modified = 0
1220 ((struct __pyx_obj_10TabProxies_TupleProxy *)__pyx_v_self)->nbytes = 0;
1222 /* "TabProxies.pyx":35
1225 * self.is_modified = 0 # <<<<<<<<<<<<<<
1227 * # start counting at field offset
1229 ((struct __pyx_obj_10TabProxies_TupleProxy *)__pyx_v_self)->is_modified = 0;
1231 /* "TabProxies.pyx":36
1233 * self.is_modified = 0
1234 * self.nfields = 0 # <<<<<<<<<<<<<<
1235 * # start counting at field offset
1238 ((struct __pyx_obj_10TabProxies_TupleProxy *)__pyx_v_self)->nfields = 0;
1240 /* "TabProxies.pyx":38
1242 * # start counting at field offset
1243 * self.offset = 0 # <<<<<<<<<<<<<<
1245 * def __dealloc__(self):
1247 ((struct __pyx_obj_10TabProxies_TupleProxy *)__pyx_v_self)->offset = 0;
1250 __Pyx_RefNannyFinishContext();
1254 /* "TabProxies.pyx":40
1257 * def __dealloc__(self): # <<<<<<<<<<<<<<
1259 * if self.is_modified:
1262 static void __pyx_pf_10TabProxies_10TupleProxy_1__dealloc__(PyObject *__pyx_v_self); /*proto*/
1263 static void __pyx_pf_10TabProxies_10TupleProxy_1__dealloc__(PyObject *__pyx_v_self) {
1268 __Pyx_RefNannySetupContext("__dealloc__");
1270 /* "TabProxies.pyx":42
1271 * def __dealloc__(self):
1273 * if self.is_modified: # <<<<<<<<<<<<<<
1274 * for x from 0 <= x < self.nfields:
1275 * if isNew( self.fields[x], self.data, self.nbytes ):
1277 if (((struct __pyx_obj_10TabProxies_TupleProxy *)__pyx_v_self)->is_modified) {
1279 /* "TabProxies.pyx":43
1281 * if self.is_modified:
1282 * for x from 0 <= x < self.nfields: # <<<<<<<<<<<<<<
1283 * if isNew( self.fields[x], self.data, self.nbytes ):
1284 * free( self.fields[x] )
1286 __pyx_t_1 = ((struct __pyx_obj_10TabProxies_TupleProxy *)__pyx_v_self)->nfields;
1287 for (__pyx_v_x = 0; __pyx_v_x < __pyx_t_1; __pyx_v_x++) {
1289 /* "TabProxies.pyx":44
1290 * if self.is_modified:
1291 * for x from 0 <= x < self.nfields:
1292 * if isNew( self.fields[x], self.data, self.nbytes ): # <<<<<<<<<<<<<<
1293 * free( self.fields[x] )
1294 * self.fields[x] = NULL
1296 __pyx_t_2 = __pyx_f_10TabProxies_isNew((((struct __pyx_obj_10TabProxies_TupleProxy *)__pyx_v_self)->fields[__pyx_v_x]), ((struct __pyx_obj_10TabProxies_TupleProxy *)__pyx_v_self)->data, ((struct __pyx_obj_10TabProxies_TupleProxy *)__pyx_v_self)->nbytes);
1299 /* "TabProxies.pyx":45
1300 * for x from 0 <= x < self.nfields:
1301 * if isNew( self.fields[x], self.data, self.nbytes ):
1302 * free( self.fields[x] ) # <<<<<<<<<<<<<<
1303 * self.fields[x] = NULL
1306 free((((struct __pyx_obj_10TabProxies_TupleProxy *)__pyx_v_self)->fields[__pyx_v_x]));
1308 /* "TabProxies.pyx":46
1309 * if isNew( self.fields[x], self.data, self.nbytes ):
1310 * free( self.fields[x] )
1311 * self.fields[x] = NULL # <<<<<<<<<<<<<<
1313 * if self.data != NULL: free(self.data)
1315 (((struct __pyx_obj_10TabProxies_TupleProxy *)__pyx_v_self)->fields[__pyx_v_x]) = NULL;
1324 /* "TabProxies.pyx":48
1325 * self.fields[x] = NULL
1327 * if self.data != NULL: free(self.data) # <<<<<<<<<<<<<<
1328 * if self.fields != NULL: free( self.fields )
1331 __pyx_t_3 = (((struct __pyx_obj_10TabProxies_TupleProxy *)__pyx_v_self)->data != NULL);
1333 free(((struct __pyx_obj_10TabProxies_TupleProxy *)__pyx_v_self)->data);
1338 /* "TabProxies.pyx":49
1340 * if self.data != NULL: free(self.data)
1341 * if self.fields != NULL: free( self.fields ) # <<<<<<<<<<<<<<
1343 * cdef take( self, char * buffer, size_t nbytes ):
1345 __pyx_t_3 = (((struct __pyx_obj_10TabProxies_TupleProxy *)__pyx_v_self)->fields != NULL);
1347 free(((struct __pyx_obj_10TabProxies_TupleProxy *)__pyx_v_self)->fields);
1352 __Pyx_RefNannyFinishContext();
1355 /* "TabProxies.pyx":51
1356 * if self.fields != NULL: free( self.fields )
1358 * cdef take( self, char * buffer, size_t nbytes ): # <<<<<<<<<<<<<<
1359 * '''start presenting buffer.
1363 static PyObject *__pyx_f_10TabProxies_10TupleProxy_take(struct __pyx_obj_10TabProxies_TupleProxy *__pyx_v_self, char *__pyx_v_buffer, size_t __pyx_v_nbytes) {
1364 PyObject *__pyx_r = NULL;
1365 PyObject *__pyx_t_1 = NULL;
1366 __Pyx_RefNannySetupContext("take");
1368 /* "TabProxies.pyx":56
1369 * Take ownership of the pointer.
1371 * self.data = buffer # <<<<<<<<<<<<<<
1372 * self.nbytes = nbytes
1373 * self.update( buffer, nbytes )
1375 __pyx_v_self->data = __pyx_v_buffer;
1377 /* "TabProxies.pyx":57
1379 * self.data = buffer
1380 * self.nbytes = nbytes # <<<<<<<<<<<<<<
1381 * self.update( buffer, nbytes )
1384 __pyx_v_self->nbytes = __pyx_v_nbytes;
1386 /* "TabProxies.pyx":58
1387 * self.data = buffer
1388 * self.nbytes = nbytes
1389 * self.update( buffer, nbytes ) # <<<<<<<<<<<<<<
1391 * cdef present( self, char * buffer, size_t nbytes ):
1393 __pyx_t_1 = ((struct __pyx_vtabstruct_10TabProxies_TupleProxy *)__pyx_v_self->__pyx_vtab)->update(__pyx_v_self, __pyx_v_buffer, __pyx_v_nbytes); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1394 __Pyx_GOTREF(__pyx_t_1);
1395 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
1397 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
1400 __Pyx_XDECREF(__pyx_t_1);
1401 __Pyx_AddTraceback("TabProxies.TupleProxy.take");
1404 __Pyx_XGIVEREF(__pyx_r);
1405 __Pyx_RefNannyFinishContext();
1409 /* "TabProxies.pyx":60
1410 * self.update( buffer, nbytes )
1412 * cdef present( self, char * buffer, size_t nbytes ): # <<<<<<<<<<<<<<
1413 * '''start presenting buffer.
1417 static PyObject *__pyx_f_10TabProxies_10TupleProxy_present(struct __pyx_obj_10TabProxies_TupleProxy *__pyx_v_self, char *__pyx_v_buffer, size_t __pyx_v_nbytes) {
1418 PyObject *__pyx_r = NULL;
1419 PyObject *__pyx_t_1 = NULL;
1420 __Pyx_RefNannySetupContext("present");
1422 /* "TabProxies.pyx":65
1423 * Do not take ownership of the pointer.
1425 * self.update( buffer, nbytes ) # <<<<<<<<<<<<<<
1427 * cdef copy( self, char * buffer, size_t nbytes ):
1429 __pyx_t_1 = ((struct __pyx_vtabstruct_10TabProxies_TupleProxy *)__pyx_v_self->__pyx_vtab)->update(__pyx_v_self, __pyx_v_buffer, __pyx_v_nbytes); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1430 __Pyx_GOTREF(__pyx_t_1);
1431 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
1433 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
1436 __Pyx_XDECREF(__pyx_t_1);
1437 __Pyx_AddTraceback("TabProxies.TupleProxy.present");
1440 __Pyx_XGIVEREF(__pyx_r);
1441 __Pyx_RefNannyFinishContext();
1445 /* "TabProxies.pyx":67
1446 * self.update( buffer, nbytes )
1448 * cdef copy( self, char * buffer, size_t nbytes ): # <<<<<<<<<<<<<<
1449 * '''start presenting buffer.
1453 static PyObject *__pyx_f_10TabProxies_10TupleProxy_copy(struct __pyx_obj_10TabProxies_TupleProxy *__pyx_v_self, char *__pyx_v_buffer, size_t __pyx_v_nbytes) {
1455 PyObject *__pyx_r = NULL;
1457 PyObject *__pyx_t_2 = NULL;
1458 __Pyx_RefNannySetupContext("copy");
1460 /* "TabProxies.pyx":74
1463 * s = sizeof(char) * (nbytes + 1) # <<<<<<<<<<<<<<
1464 * self.data = <char*>malloc( s )
1465 * if self.data == NULL:
1467 __pyx_v_s = ((sizeof(char)) * (__pyx_v_nbytes + 1));
1469 /* "TabProxies.pyx":75
1471 * s = sizeof(char) * (nbytes + 1)
1472 * self.data = <char*>malloc( s ) # <<<<<<<<<<<<<<
1473 * if self.data == NULL:
1474 * raise ValueError("out of memory" )
1476 __pyx_v_self->data = ((char *)malloc(__pyx_v_s));
1478 /* "TabProxies.pyx":76
1479 * s = sizeof(char) * (nbytes + 1)
1480 * self.data = <char*>malloc( s )
1481 * if self.data == NULL: # <<<<<<<<<<<<<<
1482 * raise ValueError("out of memory" )
1483 * self.nbytes = nbytes
1485 __pyx_t_1 = (__pyx_v_self->data == NULL);
1488 /* "TabProxies.pyx":77
1489 * self.data = <char*>malloc( s )
1490 * if self.data == NULL:
1491 * raise ValueError("out of memory" ) # <<<<<<<<<<<<<<
1492 * self.nbytes = nbytes
1493 * memcpy( <char*>self.data, buffer, s )
1495 __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_4), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1496 __Pyx_GOTREF(__pyx_t_2);
1497 __Pyx_Raise(__pyx_t_2, 0, 0);
1498 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
1499 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1504 /* "TabProxies.pyx":78
1505 * if self.data == NULL:
1506 * raise ValueError("out of memory" )
1507 * self.nbytes = nbytes # <<<<<<<<<<<<<<
1508 * memcpy( <char*>self.data, buffer, s )
1509 * self.update( self.data, nbytes )
1511 __pyx_v_self->nbytes = __pyx_v_nbytes;
1513 /* "TabProxies.pyx":79
1514 * raise ValueError("out of memory" )
1515 * self.nbytes = nbytes
1516 * memcpy( <char*>self.data, buffer, s ) # <<<<<<<<<<<<<<
1517 * self.update( self.data, nbytes )
1520 memcpy(__pyx_v_self->data, __pyx_v_buffer, __pyx_v_s);
1522 /* "TabProxies.pyx":80
1523 * self.nbytes = nbytes
1524 * memcpy( <char*>self.data, buffer, s )
1525 * self.update( self.data, nbytes ) # <<<<<<<<<<<<<<
1527 * cdef int getMaxFields( self, size_t nbytes ):
1529 __pyx_t_2 = ((struct __pyx_vtabstruct_10TabProxies_TupleProxy *)__pyx_v_self->__pyx_vtab)->update(__pyx_v_self, __pyx_v_self->data, __pyx_v_nbytes); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1530 __Pyx_GOTREF(__pyx_t_2);
1531 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
1533 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
1536 __Pyx_XDECREF(__pyx_t_2);
1537 __Pyx_AddTraceback("TabProxies.TupleProxy.copy");
1540 __Pyx_XGIVEREF(__pyx_r);
1541 __Pyx_RefNannyFinishContext();
1545 /* "TabProxies.pyx":82
1546 * self.update( self.data, nbytes )
1548 * cdef int getMaxFields( self, size_t nbytes ): # <<<<<<<<<<<<<<
1549 * '''initialize fields.'''
1553 static int __pyx_f_10TabProxies_10TupleProxy_getMaxFields(struct __pyx_obj_10TabProxies_TupleProxy *__pyx_v_self, size_t __pyx_v_nbytes) {
1555 __Pyx_RefNannySetupContext("getMaxFields");
1557 /* "TabProxies.pyx":84
1558 * cdef int getMaxFields( self, size_t nbytes ):
1559 * '''initialize fields.'''
1560 * return nbytes / 2 # <<<<<<<<<<<<<<
1562 * cdef update( self, char * buffer, size_t nbytes ):
1564 __pyx_r = (__pyx_v_nbytes / 2);
1569 __Pyx_RefNannyFinishContext();
1573 /* "TabProxies.pyx":86
1576 * cdef update( self, char * buffer, size_t nbytes ): # <<<<<<<<<<<<<<
1577 * '''update internal data.
1581 static PyObject *__pyx_f_10TabProxies_10TupleProxy_update(struct __pyx_obj_10TabProxies_TupleProxy *__pyx_v_self, char *__pyx_v_buffer, size_t __pyx_v_nbytes) {
1583 char *__pyx_v_old_pos;
1585 int __pyx_v_max_fields;
1586 PyObject *__pyx_r = NULL;
1588 PyObject *__pyx_t_2 = NULL;
1589 PyObject *__pyx_t_3 = NULL;
1592 __Pyx_RefNannySetupContext("update");
1594 /* "TabProxies.pyx":101
1595 * cdef int max_fields, x
1597 * if buffer[nbytes] != 0: # <<<<<<<<<<<<<<
1598 * raise ValueError( "incomplete line at %s" % buffer )
1601 __pyx_t_1 = ((__pyx_v_buffer[__pyx_v_nbytes]) != 0);
1604 /* "TabProxies.pyx":102
1606 * if buffer[nbytes] != 0:
1607 * raise ValueError( "incomplete line at %s" % buffer ) # <<<<<<<<<<<<<<
1609 * #################################
1611 __pyx_t_2 = PyBytes_FromString(__pyx_v_buffer); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1612 __Pyx_GOTREF(((PyObject *)__pyx_t_2));
1613 __pyx_t_3 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_5), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1614 __Pyx_GOTREF(((PyObject *)__pyx_t_3));
1615 __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
1616 __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1617 __Pyx_GOTREF(((PyObject *)__pyx_t_2));
1618 PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_t_3));
1619 __Pyx_GIVEREF(((PyObject *)__pyx_t_3));
1621 __pyx_t_3 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1622 __Pyx_GOTREF(__pyx_t_3);
1623 __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
1624 __Pyx_Raise(__pyx_t_3, 0, 0);
1625 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
1626 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 102; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1631 /* "TabProxies.pyx":106
1632 * #################################
1634 * if self.fields != NULL: free(self.fields) # <<<<<<<<<<<<<<
1636 * for field from 0 <= field < self.nfields:
1638 __pyx_t_1 = (__pyx_v_self->fields != NULL);
1640 free(__pyx_v_self->fields);
1645 /* "TabProxies.pyx":108
1646 * if self.fields != NULL: free(self.fields)
1648 * for field from 0 <= field < self.nfields: # <<<<<<<<<<<<<<
1649 * if isNew( self.fields[field], self.data, self.nbytes ):
1650 * free( self.fields[field] )
1652 __pyx_t_4 = __pyx_v_self->nfields;
1653 for (__pyx_v_field = 0; __pyx_v_field < __pyx_t_4; __pyx_v_field++) {
1655 /* "TabProxies.pyx":109
1657 * for field from 0 <= field < self.nfields:
1658 * if isNew( self.fields[field], self.data, self.nbytes ): # <<<<<<<<<<<<<<
1659 * free( self.fields[field] )
1662 __pyx_t_5 = __pyx_f_10TabProxies_isNew((__pyx_v_self->fields[__pyx_v_field]), __pyx_v_self->data, __pyx_v_self->nbytes);
1665 /* "TabProxies.pyx":110
1666 * for field from 0 <= field < self.nfields:
1667 * if isNew( self.fields[field], self.data, self.nbytes ):
1668 * free( self.fields[field] ) # <<<<<<<<<<<<<<
1670 * self.is_modified = self.nfields = 0
1672 free((__pyx_v_self->fields[__pyx_v_field]));
1678 /* "TabProxies.pyx":112
1679 * free( self.fields[field] )
1681 * self.is_modified = self.nfields = 0 # <<<<<<<<<<<<<<
1683 * #################################
1685 __pyx_v_self->is_modified = 0;
1686 __pyx_v_self->nfields = 0;
1688 /* "TabProxies.pyx":116
1689 * #################################
1691 * max_fields = self.getMaxFields( nbytes ) # <<<<<<<<<<<<<<
1692 * self.fields = <char **>calloc( max_fields, sizeof(char *) )
1693 * if self.fields == NULL:
1695 __pyx_v_max_fields = ((struct __pyx_vtabstruct_10TabProxies_TupleProxy *)__pyx_v_self->__pyx_vtab)->getMaxFields(__pyx_v_self, __pyx_v_nbytes);
1697 /* "TabProxies.pyx":117
1699 * max_fields = self.getMaxFields( nbytes )
1700 * self.fields = <char **>calloc( max_fields, sizeof(char *) ) # <<<<<<<<<<<<<<
1701 * if self.fields == NULL:
1702 * raise ValueError("out of memory" )
1704 __pyx_v_self->fields = ((char **)calloc(__pyx_v_max_fields, (sizeof(char *))));
1706 /* "TabProxies.pyx":118
1707 * max_fields = self.getMaxFields( nbytes )
1708 * self.fields = <char **>calloc( max_fields, sizeof(char *) )
1709 * if self.fields == NULL: # <<<<<<<<<<<<<<
1710 * raise ValueError("out of memory" )
1713 __pyx_t_1 = (__pyx_v_self->fields == NULL);
1716 /* "TabProxies.pyx":119
1717 * self.fields = <char **>calloc( max_fields, sizeof(char *) )
1718 * if self.fields == NULL:
1719 * raise ValueError("out of memory" ) # <<<<<<<<<<<<<<
1721 * #################################
1723 __pyx_t_3 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_6), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 119; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1724 __Pyx_GOTREF(__pyx_t_3);
1725 __Pyx_Raise(__pyx_t_3, 0, 0);
1726 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
1727 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 119; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1732 /* "TabProxies.pyx":123
1733 * #################################
1735 * field = 0 # <<<<<<<<<<<<<<
1736 * self.fields[field] = pos = buffer
1741 /* "TabProxies.pyx":124
1744 * self.fields[field] = pos = buffer # <<<<<<<<<<<<<<
1748 (__pyx_v_self->fields[__pyx_v_field]) = __pyx_v_buffer;
1749 __pyx_v_pos = __pyx_v_buffer;
1751 /* "TabProxies.pyx":125
1753 * self.fields[field] = pos = buffer
1754 * field += 1 # <<<<<<<<<<<<<<
1758 __pyx_v_field = (__pyx_v_field + 1);
1760 /* "TabProxies.pyx":126
1761 * self.fields[field] = pos = buffer
1763 * old_pos = pos # <<<<<<<<<<<<<<
1767 __pyx_v_old_pos = __pyx_v_pos;
1769 /* "TabProxies.pyx":128
1772 * while 1: # <<<<<<<<<<<<<<
1774 * pos = <char*>memchr( pos, '\t', nbytes )
1779 /* "TabProxies.pyx":130
1782 * pos = <char*>memchr( pos, '\t', nbytes ) # <<<<<<<<<<<<<<
1783 * if pos == NULL: break
1786 __pyx_v_pos = ((char *)memchr(__pyx_v_pos, '\t', __pyx_v_nbytes));
1788 /* "TabProxies.pyx":131
1790 * pos = <char*>memchr( pos, '\t', nbytes )
1791 * if pos == NULL: break # <<<<<<<<<<<<<<
1795 __pyx_t_1 = (__pyx_v_pos == NULL);
1797 goto __pyx_L10_break;
1802 /* "TabProxies.pyx":132
1803 * pos = <char*>memchr( pos, '\t', nbytes )
1804 * if pos == NULL: break
1805 * pos[0] = '\0' # <<<<<<<<<<<<<<
1807 * self.fields[field] = pos
1809 (__pyx_v_pos[0]) = '\x00';
1811 /* "TabProxies.pyx":133
1812 * if pos == NULL: break
1814 * pos += 1 # <<<<<<<<<<<<<<
1815 * self.fields[field] = pos
1818 __pyx_v_pos = (__pyx_v_pos + 1);
1820 /* "TabProxies.pyx":134
1823 * self.fields[field] = pos # <<<<<<<<<<<<<<
1825 * if field >= max_fields:
1827 (__pyx_v_self->fields[__pyx_v_field]) = __pyx_v_pos;
1829 /* "TabProxies.pyx":135
1831 * self.fields[field] = pos
1832 * field += 1 # <<<<<<<<<<<<<<
1833 * if field >= max_fields:
1834 * raise ValueError("row too large - more than %i fields" % max_fields )
1836 __pyx_v_field = (__pyx_v_field + 1);
1838 /* "TabProxies.pyx":136
1839 * self.fields[field] = pos
1841 * if field >= max_fields: # <<<<<<<<<<<<<<
1842 * raise ValueError("row too large - more than %i fields" % max_fields )
1843 * nbytes -= pos - old_pos
1845 __pyx_t_1 = (__pyx_v_field >= __pyx_v_max_fields);
1848 /* "TabProxies.pyx":137
1850 * if field >= max_fields:
1851 * raise ValueError("row too large - more than %i fields" % max_fields ) # <<<<<<<<<<<<<<
1852 * nbytes -= pos - old_pos
1853 * if nbytes < 0: break
1855 __pyx_t_3 = PyInt_FromLong(__pyx_v_max_fields); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1856 __Pyx_GOTREF(__pyx_t_3);
1857 __pyx_t_2 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_7), __pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1858 __Pyx_GOTREF(((PyObject *)__pyx_t_2));
1859 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
1860 __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1861 __Pyx_GOTREF(((PyObject *)__pyx_t_3));
1862 PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_t_2));
1863 __Pyx_GIVEREF(((PyObject *)__pyx_t_2));
1865 __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1866 __Pyx_GOTREF(__pyx_t_2);
1867 __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
1868 __Pyx_Raise(__pyx_t_2, 0, 0);
1869 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
1870 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1875 /* "TabProxies.pyx":138
1876 * if field >= max_fields:
1877 * raise ValueError("row too large - more than %i fields" % max_fields )
1878 * nbytes -= pos - old_pos # <<<<<<<<<<<<<<
1879 * if nbytes < 0: break
1882 __pyx_v_nbytes = (__pyx_v_nbytes - (__pyx_v_pos - __pyx_v_old_pos));
1884 /* "TabProxies.pyx":139
1885 * raise ValueError("row too large - more than %i fields" % max_fields )
1886 * nbytes -= pos - old_pos
1887 * if nbytes < 0: break # <<<<<<<<<<<<<<
1891 __pyx_t_1 = (__pyx_v_nbytes < 0);
1893 goto __pyx_L10_break;
1898 /* "TabProxies.pyx":140
1899 * nbytes -= pos - old_pos
1900 * if nbytes < 0: break
1901 * old_pos = pos # <<<<<<<<<<<<<<
1903 * self.nfields = field
1905 __pyx_v_old_pos = __pyx_v_pos;
1909 /* "TabProxies.pyx":142
1912 * self.nfields = field # <<<<<<<<<<<<<<
1914 * def _getindex( self, int index ):
1916 __pyx_v_self->nfields = __pyx_v_field;
1918 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
1921 __Pyx_XDECREF(__pyx_t_2);
1922 __Pyx_XDECREF(__pyx_t_3);
1923 __Pyx_AddTraceback("TabProxies.TupleProxy.update");
1926 __Pyx_XGIVEREF(__pyx_r);
1927 __Pyx_RefNannyFinishContext();
1931 /* "TabProxies.pyx":144
1932 * self.nfields = field
1934 * def _getindex( self, int index ): # <<<<<<<<<<<<<<
1935 * '''return item at idx index'''
1936 * cdef int i = index
1939 static PyObject *__pyx_pf_10TabProxies_10TupleProxy_2_getindex(PyObject *__pyx_v_self, PyObject *__pyx_arg_index); /*proto*/
1940 static char __pyx_doc_10TabProxies_10TupleProxy_2_getindex[] = "return item at idx index";
1941 static PyObject *__pyx_pf_10TabProxies_10TupleProxy_2_getindex(PyObject *__pyx_v_self, PyObject *__pyx_arg_index) {
1944 PyObject *__pyx_r = NULL;
1946 PyObject *__pyx_t_2 = NULL;
1947 PyObject *__pyx_t_3 = NULL;
1948 PyObject *__pyx_t_4 = NULL;
1949 __Pyx_RefNannySetupContext("_getindex");
1950 assert(__pyx_arg_index); {
1951 __pyx_v_index = __Pyx_PyInt_AsInt(__pyx_arg_index); if (unlikely((__pyx_v_index == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
1953 goto __pyx_L4_argument_unpacking_done;
1955 __Pyx_AddTraceback("TabProxies.TupleProxy._getindex");
1956 __Pyx_RefNannyFinishContext();
1958 __pyx_L4_argument_unpacking_done:;
1960 /* "TabProxies.pyx":146
1961 * def _getindex( self, int index ):
1962 * '''return item at idx index'''
1963 * cdef int i = index # <<<<<<<<<<<<<<
1964 * if i < 0: i += self.nfields
1965 * if i < 0: raise IndexError( "list index out of range" )
1967 __pyx_v_i = __pyx_v_index;
1969 /* "TabProxies.pyx":147
1970 * '''return item at idx index'''
1971 * cdef int i = index
1972 * if i < 0: i += self.nfields # <<<<<<<<<<<<<<
1973 * if i < 0: raise IndexError( "list index out of range" )
1976 __pyx_t_1 = (__pyx_v_i < 0);
1978 __pyx_v_i = (__pyx_v_i + ((struct __pyx_obj_10TabProxies_TupleProxy *)__pyx_v_self)->nfields);
1983 /* "TabProxies.pyx":148
1984 * cdef int i = index
1985 * if i < 0: i += self.nfields
1986 * if i < 0: raise IndexError( "list index out of range" ) # <<<<<<<<<<<<<<
1988 * if i >= self.nfields:
1990 __pyx_t_1 = (__pyx_v_i < 0);
1992 __pyx_t_2 = PyObject_Call(__pyx_builtin_IndexError, ((PyObject *)__pyx_k_tuple_9), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 148; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
1993 __Pyx_GOTREF(__pyx_t_2);
1994 __Pyx_Raise(__pyx_t_2, 0, 0);
1995 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
1996 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 148; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2001 /* "TabProxies.pyx":149
2002 * if i < 0: i += self.nfields
2003 * if i < 0: raise IndexError( "list index out of range" )
2004 * i += self.offset # <<<<<<<<<<<<<<
2005 * if i >= self.nfields:
2006 * raise IndexError( "list index out of range %i >= %i" % (i, self.nfields ))
2008 __pyx_v_i = (__pyx_v_i + ((struct __pyx_obj_10TabProxies_TupleProxy *)__pyx_v_self)->offset);
2010 /* "TabProxies.pyx":150
2011 * if i < 0: raise IndexError( "list index out of range" )
2013 * if i >= self.nfields: # <<<<<<<<<<<<<<
2014 * raise IndexError( "list index out of range %i >= %i" % (i, self.nfields ))
2015 * return self.fields[i]
2017 __pyx_t_1 = (__pyx_v_i >= ((struct __pyx_obj_10TabProxies_TupleProxy *)__pyx_v_self)->nfields);
2020 /* "TabProxies.pyx":151
2022 * if i >= self.nfields:
2023 * raise IndexError( "list index out of range %i >= %i" % (i, self.nfields )) # <<<<<<<<<<<<<<
2024 * return self.fields[i]
2027 __pyx_t_2 = PyInt_FromLong(__pyx_v_i); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 151; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2028 __Pyx_GOTREF(__pyx_t_2);
2029 __pyx_t_3 = PyInt_FromLong(((struct __pyx_obj_10TabProxies_TupleProxy *)__pyx_v_self)->nfields); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 151; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2030 __Pyx_GOTREF(__pyx_t_3);
2031 __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 151; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2032 __Pyx_GOTREF(((PyObject *)__pyx_t_4));
2033 PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
2034 __Pyx_GIVEREF(__pyx_t_2);
2035 PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3);
2036 __Pyx_GIVEREF(__pyx_t_3);
2039 __pyx_t_3 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_10), ((PyObject *)__pyx_t_4)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 151; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2040 __Pyx_GOTREF(((PyObject *)__pyx_t_3));
2041 __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
2042 __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 151; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2043 __Pyx_GOTREF(((PyObject *)__pyx_t_4));
2044 PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_t_3));
2045 __Pyx_GIVEREF(((PyObject *)__pyx_t_3));
2047 __pyx_t_3 = PyObject_Call(__pyx_builtin_IndexError, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 151; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2048 __Pyx_GOTREF(__pyx_t_3);
2049 __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
2050 __Pyx_Raise(__pyx_t_3, 0, 0);
2051 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
2052 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 151; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2057 /* "TabProxies.pyx":152
2058 * if i >= self.nfields:
2059 * raise IndexError( "list index out of range %i >= %i" % (i, self.nfields ))
2060 * return self.fields[i] # <<<<<<<<<<<<<<
2062 * def __getitem__( self, key ):
2064 __Pyx_XDECREF(__pyx_r);
2065 __pyx_t_3 = PyBytes_FromString((((struct __pyx_obj_10TabProxies_TupleProxy *)__pyx_v_self)->fields[__pyx_v_i])); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 152; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2066 __Pyx_GOTREF(((PyObject *)__pyx_t_3));
2067 __pyx_r = ((PyObject *)__pyx_t_3);
2071 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
2074 __Pyx_XDECREF(__pyx_t_2);
2075 __Pyx_XDECREF(__pyx_t_3);
2076 __Pyx_XDECREF(__pyx_t_4);
2077 __Pyx_AddTraceback("TabProxies.TupleProxy._getindex");
2080 __Pyx_XGIVEREF(__pyx_r);
2081 __Pyx_RefNannyFinishContext();
2085 /* "TabProxies.pyx":154
2086 * return self.fields[i]
2088 * def __getitem__( self, key ): # <<<<<<<<<<<<<<
2089 * if type(key) == int: return self._getindex( key )
2093 static PyObject *__pyx_pf_10TabProxies_10TupleProxy_3__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key); /*proto*/
2094 static PyObject *__pyx_pf_10TabProxies_10TupleProxy_3__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key) {
2095 PyObject *__pyx_v_start;
2096 PyObject *__pyx_v_end;
2097 PyObject *__pyx_v_step;
2098 PyObject *__pyx_v_result;
2099 PyObject *__pyx_v_index;
2100 PyObject *__pyx_r = NULL;
2101 PyObject *__pyx_t_1 = NULL;
2103 PyObject *__pyx_t_3 = NULL;
2104 PyObject *__pyx_t_4 = NULL;
2105 PyObject *__pyx_t_5 = NULL;
2106 PyObject *__pyx_t_6 = NULL;
2107 Py_ssize_t __pyx_t_7;
2109 __Pyx_RefNannySetupContext("__getitem__");
2110 __pyx_v_start = Py_None; __Pyx_INCREF(Py_None);
2111 __pyx_v_end = Py_None; __Pyx_INCREF(Py_None);
2112 __pyx_v_step = Py_None; __Pyx_INCREF(Py_None);
2113 __pyx_v_result = ((PyObject*)Py_None); __Pyx_INCREF(Py_None);
2114 __pyx_v_index = Py_None; __Pyx_INCREF(Py_None);
2116 /* "TabProxies.pyx":155
2118 * def __getitem__( self, key ):
2119 * if type(key) == int: return self._getindex( key ) # <<<<<<<<<<<<<<
2121 * start, end, step = key.indices( self.nfields )
2123 __pyx_t_1 = PyObject_RichCompare(((PyObject *)Py_TYPE(__pyx_v_key)), ((PyObject *)((PyObject*)(&PyInt_Type))), Py_EQ); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 155; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2124 __Pyx_GOTREF(__pyx_t_1);
2125 __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 155; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2126 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
2128 __Pyx_XDECREF(__pyx_r);
2129 __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___getindex); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 155; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2130 __Pyx_GOTREF(__pyx_t_1);
2131 __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 155; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2132 __Pyx_GOTREF(((PyObject *)__pyx_t_3));
2133 __Pyx_INCREF(__pyx_v_key);
2134 PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_key);
2135 __Pyx_GIVEREF(__pyx_v_key);
2136 __pyx_t_4 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 155; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2137 __Pyx_GOTREF(__pyx_t_4);
2138 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
2139 __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
2140 __pyx_r = __pyx_t_4;
2147 /* "TabProxies.pyx":157
2148 * if type(key) == int: return self._getindex( key )
2150 * start, end, step = key.indices( self.nfields ) # <<<<<<<<<<<<<<
2152 * for index in range( start, end, step ):
2154 __pyx_t_4 = PyObject_GetAttr(__pyx_v_key, __pyx_n_s__indices); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2155 __Pyx_GOTREF(__pyx_t_4);
2156 __pyx_t_3 = PyInt_FromLong(((struct __pyx_obj_10TabProxies_TupleProxy *)__pyx_v_self)->nfields); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2157 __Pyx_GOTREF(__pyx_t_3);
2158 __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2159 __Pyx_GOTREF(((PyObject *)__pyx_t_1));
2160 PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_t_3);
2161 __Pyx_GIVEREF(__pyx_t_3);
2163 __pyx_t_3 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2164 __Pyx_GOTREF(__pyx_t_3);
2165 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
2166 __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
2167 if (PyTuple_CheckExact(__pyx_t_3) && likely(PyTuple_GET_SIZE(__pyx_t_3) == 3)) {
2168 PyObject* tuple = __pyx_t_3;
2169 __pyx_t_1 = PyTuple_GET_ITEM(tuple, 0); __Pyx_INCREF(__pyx_t_1);
2170 __pyx_t_4 = PyTuple_GET_ITEM(tuple, 1); __Pyx_INCREF(__pyx_t_4);
2171 __pyx_t_5 = PyTuple_GET_ITEM(tuple, 2); __Pyx_INCREF(__pyx_t_5);
2172 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
2173 __Pyx_DECREF(__pyx_v_start);
2174 __pyx_v_start = __pyx_t_1;
2176 __Pyx_DECREF(__pyx_v_end);
2177 __pyx_v_end = __pyx_t_4;
2179 __Pyx_DECREF(__pyx_v_step);
2180 __pyx_v_step = __pyx_t_5;
2183 __pyx_t_6 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2184 __Pyx_GOTREF(__pyx_t_6);
2185 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
2186 __pyx_t_1 = __Pyx_UnpackItem(__pyx_t_6, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2187 __Pyx_GOTREF(__pyx_t_1);
2188 __pyx_t_4 = __Pyx_UnpackItem(__pyx_t_6, 1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2189 __Pyx_GOTREF(__pyx_t_4);
2190 __pyx_t_5 = __Pyx_UnpackItem(__pyx_t_6, 2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2191 __Pyx_GOTREF(__pyx_t_5);
2192 if (__Pyx_EndUnpack(__pyx_t_6, 3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2193 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
2194 __Pyx_DECREF(__pyx_v_start);
2195 __pyx_v_start = __pyx_t_1;
2197 __Pyx_DECREF(__pyx_v_end);
2198 __pyx_v_end = __pyx_t_4;
2200 __Pyx_DECREF(__pyx_v_step);
2201 __pyx_v_step = __pyx_t_5;
2205 /* "TabProxies.pyx":158
2207 * start, end, step = key.indices( self.nfields )
2208 * result = [] # <<<<<<<<<<<<<<
2209 * for index in range( start, end, step ):
2210 * result.append( self._getindex( index ) )
2212 __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 158; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2213 __Pyx_GOTREF(((PyObject *)__pyx_t_3));
2214 __Pyx_DECREF(((PyObject *)__pyx_v_result));
2215 __pyx_v_result = __pyx_t_3;
2218 /* "TabProxies.pyx":159
2219 * start, end, step = key.indices( self.nfields )
2221 * for index in range( start, end, step ): # <<<<<<<<<<<<<<
2222 * result.append( self._getindex( index ) )
2225 __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 159; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2226 __Pyx_GOTREF(((PyObject *)__pyx_t_3));
2227 __Pyx_INCREF(__pyx_v_start);
2228 PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_start);
2229 __Pyx_GIVEREF(__pyx_v_start);
2230 __Pyx_INCREF(__pyx_v_end);
2231 PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_end);
2232 __Pyx_GIVEREF(__pyx_v_end);
2233 __Pyx_INCREF(__pyx_v_step);
2234 PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_step);
2235 __Pyx_GIVEREF(__pyx_v_step);
2236 __pyx_t_5 = PyObject_Call(__pyx_builtin_range, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 159; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2237 __Pyx_GOTREF(__pyx_t_5);
2238 __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
2239 if (PyList_CheckExact(__pyx_t_5) || PyTuple_CheckExact(__pyx_t_5)) {
2240 __pyx_t_7 = 0; __pyx_t_3 = __pyx_t_5; __Pyx_INCREF(__pyx_t_3);
2242 __pyx_t_7 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_5); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 159; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2243 __Pyx_GOTREF(__pyx_t_3);
2245 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
2247 if (likely(PyList_CheckExact(__pyx_t_3))) {
2248 if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_3)) break;
2249 __pyx_t_5 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_7); __Pyx_INCREF(__pyx_t_5); __pyx_t_7++;
2250 } else if (likely(PyTuple_CheckExact(__pyx_t_3))) {
2251 if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
2252 __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_7); __Pyx_INCREF(__pyx_t_5); __pyx_t_7++;
2254 __pyx_t_5 = PyIter_Next(__pyx_t_3);
2256 if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 159; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2259 __Pyx_GOTREF(__pyx_t_5);
2261 __Pyx_DECREF(__pyx_v_index);
2262 __pyx_v_index = __pyx_t_5;
2265 /* "TabProxies.pyx":160
2267 * for index in range( start, end, step ):
2268 * result.append( self._getindex( index ) ) # <<<<<<<<<<<<<<
2272 if (unlikely(__pyx_v_result == Py_None)) {
2273 PyErr_SetString(PyExc_AttributeError, "'NoneType' object has no attribute 'append'"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 160; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2275 __pyx_t_5 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___getindex); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 160; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2276 __Pyx_GOTREF(__pyx_t_5);
2277 __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 160; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2278 __Pyx_GOTREF(((PyObject *)__pyx_t_4));
2279 __Pyx_INCREF(__pyx_v_index);
2280 PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_index);
2281 __Pyx_GIVEREF(__pyx_v_index);
2282 __pyx_t_1 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 160; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2283 __Pyx_GOTREF(__pyx_t_1);
2284 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
2285 __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
2286 __pyx_t_8 = PyList_Append(__pyx_v_result, __pyx_t_1); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 160; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2287 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
2289 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
2291 /* "TabProxies.pyx":161
2292 * for index in range( start, end, step ):
2293 * result.append( self._getindex( index ) )
2294 * return result # <<<<<<<<<<<<<<
2296 * def _setindex( self, index, value ):
2298 __Pyx_XDECREF(__pyx_r);
2299 __Pyx_INCREF(((PyObject *)__pyx_v_result));
2300 __pyx_r = ((PyObject *)__pyx_v_result);
2303 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
2306 __Pyx_XDECREF(__pyx_t_1);
2307 __Pyx_XDECREF(__pyx_t_3);
2308 __Pyx_XDECREF(__pyx_t_4);
2309 __Pyx_XDECREF(__pyx_t_5);
2310 __Pyx_XDECREF(__pyx_t_6);
2311 __Pyx_AddTraceback("TabProxies.TupleProxy.__getitem__");
2314 __Pyx_DECREF(__pyx_v_start);
2315 __Pyx_DECREF(__pyx_v_end);
2316 __Pyx_DECREF(__pyx_v_step);
2317 __Pyx_DECREF(__pyx_v_result);
2318 __Pyx_DECREF(__pyx_v_index);
2319 __Pyx_XGIVEREF(__pyx_r);
2320 __Pyx_RefNannyFinishContext();
2324 /* "TabProxies.pyx":163
2327 * def _setindex( self, index, value ): # <<<<<<<<<<<<<<
2328 * '''set item at idx index.'''
2329 * cdef int idx = index
2332 static PyObject *__pyx_pf_10TabProxies_10TupleProxy_4_setindex(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
2333 static char __pyx_doc_10TabProxies_10TupleProxy_4_setindex[] = "set item at idx index.";
2334 static PyObject *__pyx_pf_10TabProxies_10TupleProxy_4_setindex(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
2335 PyObject *__pyx_v_index = 0;
2336 PyObject *__pyx_v_value = 0;
2339 PyObject *__pyx_r = NULL;
2342 PyObject *__pyx_t_3 = NULL;
2344 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__index,&__pyx_n_s__value,0};
2345 __Pyx_RefNannySetupContext("_setindex");
2346 if (unlikely(__pyx_kwds)) {
2347 Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
2348 PyObject* values[2] = {0,0};
2349 switch (PyTuple_GET_SIZE(__pyx_args)) {
2350 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
2351 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
2353 default: goto __pyx_L5_argtuple_error;
2355 switch (PyTuple_GET_SIZE(__pyx_args)) {
2357 values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__index);
2358 if (likely(values[0])) kw_args--;
2359 else goto __pyx_L5_argtuple_error;
2361 values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__value);
2362 if (likely(values[1])) kw_args--;
2364 __Pyx_RaiseArgtupleInvalid("_setindex", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 163; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
2367 if (unlikely(kw_args > 0)) {
2368 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "_setindex") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 163; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
2370 __pyx_v_index = values[0];
2371 __pyx_v_value = values[1];
2372 } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
2373 goto __pyx_L5_argtuple_error;
2375 __pyx_v_index = PyTuple_GET_ITEM(__pyx_args, 0);
2376 __pyx_v_value = PyTuple_GET_ITEM(__pyx_args, 1);
2378 goto __pyx_L4_argument_unpacking_done;
2379 __pyx_L5_argtuple_error:;
2380 __Pyx_RaiseArgtupleInvalid("_setindex", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 163; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
2382 __Pyx_AddTraceback("TabProxies.TupleProxy._setindex");
2383 __Pyx_RefNannyFinishContext();
2385 __pyx_L4_argument_unpacking_done:;
2387 /* "TabProxies.pyx":165
2388 * def _setindex( self, index, value ):
2389 * '''set item at idx index.'''
2390 * cdef int idx = index # <<<<<<<<<<<<<<
2391 * if idx < 0: raise IndexError( "list index out of range" )
2392 * if idx >= self.nfields:
2394 __pyx_t_1 = __Pyx_PyInt_AsInt(__pyx_v_index); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 165; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2395 __pyx_v_idx = __pyx_t_1;
2397 /* "TabProxies.pyx":166
2398 * '''set item at idx index.'''
2399 * cdef int idx = index
2400 * if idx < 0: raise IndexError( "list index out of range" ) # <<<<<<<<<<<<<<
2401 * if idx >= self.nfields:
2402 * raise IndexError( "list index out of range" )
2404 __pyx_t_2 = (__pyx_v_idx < 0);
2406 __pyx_t_3 = PyObject_Call(__pyx_builtin_IndexError, ((PyObject *)__pyx_k_tuple_11), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 166; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2407 __Pyx_GOTREF(__pyx_t_3);
2408 __Pyx_Raise(__pyx_t_3, 0, 0);
2409 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
2410 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 166; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2415 /* "TabProxies.pyx":167
2416 * cdef int idx = index
2417 * if idx < 0: raise IndexError( "list index out of range" )
2418 * if idx >= self.nfields: # <<<<<<<<<<<<<<
2419 * raise IndexError( "list index out of range" )
2422 __pyx_t_2 = (__pyx_v_idx >= ((struct __pyx_obj_10TabProxies_TupleProxy *)__pyx_v_self)->nfields);
2425 /* "TabProxies.pyx":168
2426 * if idx < 0: raise IndexError( "list index out of range" )
2427 * if idx >= self.nfields:
2428 * raise IndexError( "list index out of range" ) # <<<<<<<<<<<<<<
2430 * if isNew( self.fields[idx], self.data, self.nbytes ):
2432 __pyx_t_3 = PyObject_Call(__pyx_builtin_IndexError, ((PyObject *)__pyx_k_tuple_12), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2433 __Pyx_GOTREF(__pyx_t_3);
2434 __Pyx_Raise(__pyx_t_3, 0, 0);
2435 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
2436 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2441 /* "TabProxies.pyx":170
2442 * raise IndexError( "list index out of range" )
2444 * if isNew( self.fields[idx], self.data, self.nbytes ): # <<<<<<<<<<<<<<
2445 * free( self.fields[idx] )
2448 __pyx_t_1 = __pyx_f_10TabProxies_isNew((((struct __pyx_obj_10TabProxies_TupleProxy *)__pyx_v_self)->fields[__pyx_v_idx]), ((struct __pyx_obj_10TabProxies_TupleProxy *)__pyx_v_self)->data, ((struct __pyx_obj_10TabProxies_TupleProxy *)__pyx_v_self)->nbytes);
2451 /* "TabProxies.pyx":171
2453 * if isNew( self.fields[idx], self.data, self.nbytes ):
2454 * free( self.fields[idx] ) # <<<<<<<<<<<<<<
2456 * self.is_modified = 1
2458 free((((struct __pyx_obj_10TabProxies_TupleProxy *)__pyx_v_self)->fields[__pyx_v_idx]));
2463 /* "TabProxies.pyx":173
2464 * free( self.fields[idx] )
2466 * self.is_modified = 1 # <<<<<<<<<<<<<<
2470 ((struct __pyx_obj_10TabProxies_TupleProxy *)__pyx_v_self)->is_modified = 1;
2472 /* "TabProxies.pyx":175
2473 * self.is_modified = 1
2475 * if value == None: # <<<<<<<<<<<<<<
2476 * self.fields[idx] = NULL
2479 __pyx_t_3 = PyObject_RichCompare(__pyx_v_value, Py_None, Py_EQ); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2480 __Pyx_GOTREF(__pyx_t_3);
2481 __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2482 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
2485 /* "TabProxies.pyx":176
2488 * self.fields[idx] = NULL # <<<<<<<<<<<<<<
2492 (((struct __pyx_obj_10TabProxies_TupleProxy *)__pyx_v_self)->fields[__pyx_v_idx]) = NULL;
2494 /* "TabProxies.pyx":177
2496 * self.fields[idx] = NULL
2497 * return # <<<<<<<<<<<<<<
2499 * # conversion with error checking
2501 __Pyx_XDECREF(__pyx_r);
2502 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
2508 /* "TabProxies.pyx":180
2510 * # conversion with error checking
2511 * cdef char * tmp = PyString_AsString( value ) # <<<<<<<<<<<<<<
2512 * self.fields[idx] = <char*>malloc( (strlen( tmp ) + 1) * sizeof(char) )
2513 * if self.fields[idx] == NULL:
2515 __pyx_t_4 = PyString_AsString(__pyx_v_value); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2516 __pyx_v_tmp = __pyx_t_4;
2518 /* "TabProxies.pyx":181
2519 * # conversion with error checking
2520 * cdef char * tmp = PyString_AsString( value )
2521 * self.fields[idx] = <char*>malloc( (strlen( tmp ) + 1) * sizeof(char) ) # <<<<<<<<<<<<<<
2522 * if self.fields[idx] == NULL:
2523 * raise ValueError("out of memory" )
2525 (((struct __pyx_obj_10TabProxies_TupleProxy *)__pyx_v_self)->fields[__pyx_v_idx]) = ((char *)malloc(((strlen(__pyx_v_tmp) + 1) * (sizeof(char)))));
2527 /* "TabProxies.pyx":182
2528 * cdef char * tmp = PyString_AsString( value )
2529 * self.fields[idx] = <char*>malloc( (strlen( tmp ) + 1) * sizeof(char) )
2530 * if self.fields[idx] == NULL: # <<<<<<<<<<<<<<
2531 * raise ValueError("out of memory" )
2532 * strcpy( self.fields[idx], tmp )
2534 __pyx_t_2 = ((((struct __pyx_obj_10TabProxies_TupleProxy *)__pyx_v_self)->fields[__pyx_v_idx]) == NULL);
2537 /* "TabProxies.pyx":183
2538 * self.fields[idx] = <char*>malloc( (strlen( tmp ) + 1) * sizeof(char) )
2539 * if self.fields[idx] == NULL:
2540 * raise ValueError("out of memory" ) # <<<<<<<<<<<<<<
2541 * strcpy( self.fields[idx], tmp )
2544 __pyx_t_3 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_13), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 183; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2545 __Pyx_GOTREF(__pyx_t_3);
2546 __Pyx_Raise(__pyx_t_3, 0, 0);
2547 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
2548 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 183; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2553 /* "TabProxies.pyx":184
2554 * if self.fields[idx] == NULL:
2555 * raise ValueError("out of memory" )
2556 * strcpy( self.fields[idx], tmp ) # <<<<<<<<<<<<<<
2558 * def __setitem__(self, index, value ):
2560 strcpy((((struct __pyx_obj_10TabProxies_TupleProxy *)__pyx_v_self)->fields[__pyx_v_idx]), __pyx_v_tmp);
2562 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
2565 __Pyx_XDECREF(__pyx_t_3);
2566 __Pyx_AddTraceback("TabProxies.TupleProxy._setindex");
2569 __Pyx_XGIVEREF(__pyx_r);
2570 __Pyx_RefNannyFinishContext();
2574 /* "TabProxies.pyx":186
2575 * strcpy( self.fields[idx], tmp )
2577 * def __setitem__(self, index, value ): # <<<<<<<<<<<<<<
2578 * '''set item at *index* to *value*'''
2579 * cdef int i = index
2582 static int __pyx_pf_10TabProxies_10TupleProxy_5__setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value); /*proto*/
2583 static char __pyx_doc_10TabProxies_10TupleProxy_5__setitem__[] = "set item at *index* to *value*";
2584 struct wrapperbase __pyx_wrapperbase_10TabProxies_10TupleProxy_5__setitem__;
2585 static int __pyx_pf_10TabProxies_10TupleProxy_5__setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_index, PyObject *__pyx_v_value) {
2590 PyObject *__pyx_t_3 = NULL;
2591 PyObject *__pyx_t_4 = NULL;
2592 PyObject *__pyx_t_5 = NULL;
2593 __Pyx_RefNannySetupContext("__setitem__");
2595 /* "TabProxies.pyx":188
2596 * def __setitem__(self, index, value ):
2597 * '''set item at *index* to *value*'''
2598 * cdef int i = index # <<<<<<<<<<<<<<
2599 * if i < 0: i += self.nfields
2602 __pyx_t_1 = __Pyx_PyInt_AsInt(__pyx_v_index); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 188; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2603 __pyx_v_i = __pyx_t_1;
2605 /* "TabProxies.pyx":189
2606 * '''set item at *index* to *value*'''
2607 * cdef int i = index
2608 * if i < 0: i += self.nfields # <<<<<<<<<<<<<<
2612 __pyx_t_2 = (__pyx_v_i < 0);
2614 __pyx_v_i = (__pyx_v_i + ((struct __pyx_obj_10TabProxies_TupleProxy *)__pyx_v_self)->nfields);
2619 /* "TabProxies.pyx":190
2620 * cdef int i = index
2621 * if i < 0: i += self.nfields
2622 * i += self.offset # <<<<<<<<<<<<<<
2624 * self._setindex( i, value )
2626 __pyx_v_i = (__pyx_v_i + ((struct __pyx_obj_10TabProxies_TupleProxy *)__pyx_v_self)->offset);
2628 /* "TabProxies.pyx":192
2631 * self._setindex( i, value ) # <<<<<<<<<<<<<<
2633 * def __len__(self):
2635 __pyx_t_3 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s___setindex); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 192; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2636 __Pyx_GOTREF(__pyx_t_3);
2637 __pyx_t_4 = PyInt_FromLong(__pyx_v_i); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 192; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2638 __Pyx_GOTREF(__pyx_t_4);
2639 __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 192; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2640 __Pyx_GOTREF(((PyObject *)__pyx_t_5));
2641 PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4);
2642 __Pyx_GIVEREF(__pyx_t_4);
2643 __Pyx_INCREF(__pyx_v_value);
2644 PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_value);
2645 __Pyx_GIVEREF(__pyx_v_value);
2647 __pyx_t_4 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 192; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2648 __Pyx_GOTREF(__pyx_t_4);
2649 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
2650 __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
2651 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
2656 __Pyx_XDECREF(__pyx_t_3);
2657 __Pyx_XDECREF(__pyx_t_4);
2658 __Pyx_XDECREF(__pyx_t_5);
2659 __Pyx_AddTraceback("TabProxies.TupleProxy.__setitem__");
2662 __Pyx_RefNannyFinishContext();
2666 /* "TabProxies.pyx":194
2667 * self._setindex( i, value )
2669 * def __len__(self): # <<<<<<<<<<<<<<
2670 * return self.nfields
2674 static Py_ssize_t __pyx_pf_10TabProxies_10TupleProxy_6__len__(PyObject *__pyx_v_self); /*proto*/
2675 static Py_ssize_t __pyx_pf_10TabProxies_10TupleProxy_6__len__(PyObject *__pyx_v_self) {
2677 __Pyx_RefNannySetupContext("__len__");
2679 /* "TabProxies.pyx":195
2681 * def __len__(self):
2682 * return self.nfields # <<<<<<<<<<<<<<
2684 * def __iter__(self):
2686 __pyx_r = ((struct __pyx_obj_10TabProxies_TupleProxy *)__pyx_v_self)->nfields;
2691 __Pyx_RefNannyFinishContext();
2695 /* "TabProxies.pyx":197
2696 * return self.nfields
2698 * def __iter__(self): # <<<<<<<<<<<<<<
2703 static PyObject *__pyx_pf_10TabProxies_10TupleProxy_7__iter__(PyObject *__pyx_v_self); /*proto*/
2704 static PyObject *__pyx_pf_10TabProxies_10TupleProxy_7__iter__(PyObject *__pyx_v_self) {
2705 PyObject *__pyx_r = NULL;
2706 __Pyx_RefNannySetupContext("__iter__");
2708 /* "TabProxies.pyx":198
2710 * def __iter__(self):
2711 * self.index = 0 # <<<<<<<<<<<<<<
2715 ((struct __pyx_obj_10TabProxies_TupleProxy *)__pyx_v_self)->index = 0;
2717 /* "TabProxies.pyx":199
2718 * def __iter__(self):
2720 * return self # <<<<<<<<<<<<<<
2722 * def __next__(self):
2724 __Pyx_XDECREF(__pyx_r);
2725 __Pyx_INCREF(__pyx_v_self);
2726 __pyx_r = __pyx_v_self;
2729 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
2731 __Pyx_XGIVEREF(__pyx_r);
2732 __Pyx_RefNannyFinishContext();
2736 /* "TabProxies.pyx":201
2739 * def __next__(self): # <<<<<<<<<<<<<<
2740 * """python version of next().
2744 static PyObject *__pyx_pf_10TabProxies_10TupleProxy_8__next__(PyObject *__pyx_v_self); /*proto*/
2745 static char __pyx_doc_10TabProxies_10TupleProxy_8__next__[] = "python version of next().\n ";
2746 struct wrapperbase __pyx_wrapperbase_10TabProxies_10TupleProxy_8__next__;
2747 static PyObject *__pyx_pf_10TabProxies_10TupleProxy_8__next__(PyObject *__pyx_v_self) {
2748 char *__pyx_v_retval;
2749 PyObject *__pyx_r = NULL;
2751 PyObject *__pyx_t_2 = NULL;
2752 __Pyx_RefNannySetupContext("__next__");
2754 /* "TabProxies.pyx":204
2755 * """python version of next().
2757 * if self.index >= self.nfields: # <<<<<<<<<<<<<<
2758 * raise StopIteration
2759 * cdef char * retval = self.fields[self.index]
2761 __pyx_t_1 = (((struct __pyx_obj_10TabProxies_TupleProxy *)__pyx_v_self)->index >= ((struct __pyx_obj_10TabProxies_TupleProxy *)__pyx_v_self)->nfields);
2764 /* "TabProxies.pyx":205
2766 * if self.index >= self.nfields:
2767 * raise StopIteration # <<<<<<<<<<<<<<
2768 * cdef char * retval = self.fields[self.index]
2771 __Pyx_Raise(__pyx_builtin_StopIteration, 0, 0);
2772 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2777 /* "TabProxies.pyx":206
2778 * if self.index >= self.nfields:
2779 * raise StopIteration
2780 * cdef char * retval = self.fields[self.index] # <<<<<<<<<<<<<<
2782 * if retval == NULL: return None
2784 __pyx_v_retval = (((struct __pyx_obj_10TabProxies_TupleProxy *)__pyx_v_self)->fields[((struct __pyx_obj_10TabProxies_TupleProxy *)__pyx_v_self)->index]);
2786 /* "TabProxies.pyx":207
2787 * raise StopIteration
2788 * cdef char * retval = self.fields[self.index]
2789 * self.index += 1 # <<<<<<<<<<<<<<
2790 * if retval == NULL: return None
2791 * else: return retval
2793 ((struct __pyx_obj_10TabProxies_TupleProxy *)__pyx_v_self)->index = (((struct __pyx_obj_10TabProxies_TupleProxy *)__pyx_v_self)->index + 1);
2795 /* "TabProxies.pyx":208
2796 * cdef char * retval = self.fields[self.index]
2798 * if retval == NULL: return None # <<<<<<<<<<<<<<
2799 * else: return retval
2802 __pyx_t_1 = (__pyx_v_retval == NULL);
2804 __Pyx_XDECREF(__pyx_r);
2805 __Pyx_INCREF(Py_None);
2812 /* "TabProxies.pyx":209
2814 * if retval == NULL: return None
2815 * else: return retval # <<<<<<<<<<<<<<
2817 * def __str__(self):
2819 __Pyx_XDECREF(__pyx_r);
2820 __pyx_t_2 = PyBytes_FromString(__pyx_v_retval); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 209; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2821 __Pyx_GOTREF(((PyObject *)__pyx_t_2));
2822 __pyx_r = ((PyObject *)__pyx_t_2);
2828 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
2831 __Pyx_XDECREF(__pyx_t_2);
2832 __Pyx_AddTraceback("TabProxies.TupleProxy.__next__");
2835 __Pyx_XGIVEREF(__pyx_r);
2836 __Pyx_RefNannyFinishContext();
2840 /* "TabProxies.pyx":211
2841 * else: return retval
2843 * def __str__(self): # <<<<<<<<<<<<<<
2844 * '''return original data'''
2845 * # copy and replace \0 bytes with \t characters
2848 static PyObject *__pyx_pf_10TabProxies_10TupleProxy_9__str__(PyObject *__pyx_v_self); /*proto*/
2849 static char __pyx_doc_10TabProxies_10TupleProxy_9__str__[] = "return original data";
2850 struct wrapperbase __pyx_wrapperbase_10TabProxies_10TupleProxy_9__str__;
2851 static PyObject *__pyx_pf_10TabProxies_10TupleProxy_9__str__(PyObject *__pyx_v_self) {
2854 PyObject *__pyx_v_result;
2855 PyObject *__pyx_r = NULL;
2856 PyObject *__pyx_t_1 = NULL;
2857 PyObject *__pyx_t_2 = NULL;
2860 PyObject *__pyx_t_5 = NULL;
2862 __Pyx_RefNannySetupContext("__str__");
2863 __pyx_v_result = Py_None; __Pyx_INCREF(Py_None);
2865 /* "TabProxies.pyx":214
2866 * '''return original data'''
2867 * # copy and replace \0 bytes with \t characters
2868 * if self.is_modified: # <<<<<<<<<<<<<<
2869 * # todo: treat NULL values
2870 * return "\t".join( [StrOrEmpty( self.fields[x]) for x in xrange(0, self.nfields ) ] )
2872 if (((struct __pyx_obj_10TabProxies_TupleProxy *)__pyx_v_self)->is_modified) {
2874 /* "TabProxies.pyx":216
2875 * if self.is_modified:
2876 * # todo: treat NULL values
2877 * return "\t".join( [StrOrEmpty( self.fields[x]) for x in xrange(0, self.nfields ) ] ) # <<<<<<<<<<<<<<
2879 * cpy = <char*>calloc( sizeof(char), self.nbytes+1 )
2881 __Pyx_XDECREF(__pyx_r);
2882 __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_kp_s_14), __pyx_n_s__join); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2883 __Pyx_GOTREF(__pyx_t_1);
2884 __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2885 __Pyx_GOTREF(((PyObject *)__pyx_t_2));
2886 __pyx_t_3 = ((struct __pyx_obj_10TabProxies_TupleProxy *)__pyx_v_self)->nfields;
2887 for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
2888 __pyx_v_x = __pyx_t_4;
2889 __pyx_t_5 = PyBytes_FromString(__pyx_f_10TabProxies_StrOrEmpty((((struct __pyx_obj_10TabProxies_TupleProxy *)__pyx_v_self)->fields[__pyx_v_x]))); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2890 __Pyx_GOTREF(((PyObject *)__pyx_t_5));
2891 if (unlikely(PyList_Append(__pyx_t_2, (PyObject*)__pyx_t_5))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2892 __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
2894 __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2895 __Pyx_GOTREF(((PyObject *)__pyx_t_5));
2896 __Pyx_INCREF(((PyObject *)__pyx_t_2));
2897 PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_t_2));
2898 __Pyx_GIVEREF(((PyObject *)__pyx_t_2));
2899 __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
2900 __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2901 __Pyx_GOTREF(__pyx_t_2);
2902 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
2903 __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
2904 __pyx_r = __pyx_t_2;
2911 /* "TabProxies.pyx":218
2912 * return "\t".join( [StrOrEmpty( self.fields[x]) for x in xrange(0, self.nfields ) ] )
2914 * cpy = <char*>calloc( sizeof(char), self.nbytes+1 ) # <<<<<<<<<<<<<<
2916 * raise ValueError("out of memory" )
2918 __pyx_v_cpy = ((char *)calloc((sizeof(char)), (((struct __pyx_obj_10TabProxies_TupleProxy *)__pyx_v_self)->nbytes + 1)));
2920 /* "TabProxies.pyx":219
2922 * cpy = <char*>calloc( sizeof(char), self.nbytes+1 )
2923 * if cpy == NULL: # <<<<<<<<<<<<<<
2924 * raise ValueError("out of memory" )
2925 * memcpy( cpy, self.data, self.nbytes+1)
2927 __pyx_t_6 = (__pyx_v_cpy == NULL);
2930 /* "TabProxies.pyx":220
2931 * cpy = <char*>calloc( sizeof(char), self.nbytes+1 )
2933 * raise ValueError("out of memory" ) # <<<<<<<<<<<<<<
2934 * memcpy( cpy, self.data, self.nbytes+1)
2935 * for x from 0 <= x < self.nbytes:
2937 __pyx_t_2 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_15), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2938 __Pyx_GOTREF(__pyx_t_2);
2939 __Pyx_Raise(__pyx_t_2, 0, 0);
2940 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
2941 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2946 /* "TabProxies.pyx":221
2948 * raise ValueError("out of memory" )
2949 * memcpy( cpy, self.data, self.nbytes+1) # <<<<<<<<<<<<<<
2950 * for x from 0 <= x < self.nbytes:
2951 * if cpy[x] == '\0': cpy[x] = '\t'
2953 memcpy(__pyx_v_cpy, ((struct __pyx_obj_10TabProxies_TupleProxy *)__pyx_v_self)->data, (((struct __pyx_obj_10TabProxies_TupleProxy *)__pyx_v_self)->nbytes + 1));
2955 /* "TabProxies.pyx":222
2956 * raise ValueError("out of memory" )
2957 * memcpy( cpy, self.data, self.nbytes+1)
2958 * for x from 0 <= x < self.nbytes: # <<<<<<<<<<<<<<
2959 * if cpy[x] == '\0': cpy[x] = '\t'
2960 * result = PyString_FromStringAndSize(cpy, self.nbytes)
2962 __pyx_t_3 = ((struct __pyx_obj_10TabProxies_TupleProxy *)__pyx_v_self)->nbytes;
2963 for (__pyx_v_x = 0; __pyx_v_x < __pyx_t_3; __pyx_v_x++) {
2965 /* "TabProxies.pyx":223
2966 * memcpy( cpy, self.data, self.nbytes+1)
2967 * for x from 0 <= x < self.nbytes:
2968 * if cpy[x] == '\0': cpy[x] = '\t' # <<<<<<<<<<<<<<
2969 * result = PyString_FromStringAndSize(cpy, self.nbytes)
2972 __pyx_t_6 = ((__pyx_v_cpy[__pyx_v_x]) == '\x00');
2974 (__pyx_v_cpy[__pyx_v_x]) = '\t';
2980 /* "TabProxies.pyx":224
2981 * for x from 0 <= x < self.nbytes:
2982 * if cpy[x] == '\0': cpy[x] = '\t'
2983 * result = PyString_FromStringAndSize(cpy, self.nbytes) # <<<<<<<<<<<<<<
2987 __pyx_t_2 = PyString_FromStringAndSize(__pyx_v_cpy, ((struct __pyx_obj_10TabProxies_TupleProxy *)__pyx_v_self)->nbytes); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 224; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
2988 __Pyx_GOTREF(__pyx_t_2);
2989 __Pyx_DECREF(__pyx_v_result);
2990 __pyx_v_result = __pyx_t_2;
2993 /* "TabProxies.pyx":225
2994 * if cpy[x] == '\0': cpy[x] = '\t'
2995 * result = PyString_FromStringAndSize(cpy, self.nbytes)
2996 * free(cpy) # <<<<<<<<<<<<<<
3002 /* "TabProxies.pyx":226
3003 * result = PyString_FromStringAndSize(cpy, self.nbytes)
3005 * return result # <<<<<<<<<<<<<<
3009 __Pyx_XDECREF(__pyx_r);
3010 __Pyx_INCREF(__pyx_v_result);
3011 __pyx_r = __pyx_v_result;
3016 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
3019 __Pyx_XDECREF(__pyx_t_1);
3020 __Pyx_XDECREF(__pyx_t_2);
3021 __Pyx_XDECREF(__pyx_t_5);
3022 __Pyx_AddTraceback("TabProxies.TupleProxy.__str__");
3025 __Pyx_DECREF(__pyx_v_result);
3026 __Pyx_XGIVEREF(__pyx_r);
3027 __Pyx_RefNannyFinishContext();
3031 /* "TabProxies.pyx":228
3034 * def toDot( v ): # <<<<<<<<<<<<<<
3035 * '''convert value to '.' if None'''
3036 * if v == None: return "."
3039 static PyObject *__pyx_pf_10TabProxies_toDot(PyObject *__pyx_self, PyObject *__pyx_v_v); /*proto*/
3040 static char __pyx_doc_10TabProxies_toDot[] = "convert value to '.' if None";
3041 static PyMethodDef __pyx_mdef_10TabProxies_toDot = {__Pyx_NAMESTR("toDot"), (PyCFunction)__pyx_pf_10TabProxies_toDot, METH_O, __Pyx_DOCSTR(__pyx_doc_10TabProxies_toDot)};
3042 static PyObject *__pyx_pf_10TabProxies_toDot(PyObject *__pyx_self, PyObject *__pyx_v_v) {
3043 PyObject *__pyx_r = NULL;
3044 PyObject *__pyx_t_1 = NULL;
3046 PyObject *__pyx_t_3 = NULL;
3047 __Pyx_RefNannySetupContext("toDot");
3048 __pyx_self = __pyx_self;
3050 /* "TabProxies.pyx":230
3052 * '''convert value to '.' if None'''
3053 * if v == None: return "." # <<<<<<<<<<<<<<
3054 * else: return str(v)
3057 __pyx_t_1 = PyObject_RichCompare(__pyx_v_v, Py_None, Py_EQ); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 230; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3058 __Pyx_GOTREF(__pyx_t_1);
3059 __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 230; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3060 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
3062 __Pyx_XDECREF(__pyx_r);
3063 __Pyx_INCREF(((PyObject *)__pyx_kp_s_16));
3064 __pyx_r = ((PyObject *)__pyx_kp_s_16);
3070 /* "TabProxies.pyx":231
3071 * '''convert value to '.' if None'''
3072 * if v == None: return "."
3073 * else: return str(v) # <<<<<<<<<<<<<<
3077 __Pyx_XDECREF(__pyx_r);
3078 __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 231; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3079 __Pyx_GOTREF(((PyObject *)__pyx_t_1));
3080 __Pyx_INCREF(__pyx_v_v);
3081 PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_v);
3082 __Pyx_GIVEREF(__pyx_v_v);
3083 __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 231; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3084 __Pyx_GOTREF(__pyx_t_3);
3085 __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
3086 __pyx_r = __pyx_t_3;
3092 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
3095 __Pyx_XDECREF(__pyx_t_1);
3096 __Pyx_XDECREF(__pyx_t_3);
3097 __Pyx_AddTraceback("TabProxies.toDot");
3100 __Pyx_XGIVEREF(__pyx_r);
3101 __Pyx_RefNannyFinishContext();
3105 /* "TabProxies.pyx":233
3106 * else: return str(v)
3108 * def quote( v ): # <<<<<<<<<<<<<<
3109 * '''return a quoted attribute.'''
3110 * if type(v) in types.StringTypes:
3113 static PyObject *__pyx_pf_10TabProxies_1quote(PyObject *__pyx_self, PyObject *__pyx_v_v); /*proto*/
3114 static char __pyx_doc_10TabProxies_1quote[] = "return a quoted attribute.";
3115 static PyMethodDef __pyx_mdef_10TabProxies_1quote = {__Pyx_NAMESTR("quote"), (PyCFunction)__pyx_pf_10TabProxies_1quote, METH_O, __Pyx_DOCSTR(__pyx_doc_10TabProxies_1quote)};
3116 static PyObject *__pyx_pf_10TabProxies_1quote(PyObject *__pyx_self, PyObject *__pyx_v_v) {
3117 PyObject *__pyx_r = NULL;
3118 PyObject *__pyx_t_1 = NULL;
3119 PyObject *__pyx_t_2 = NULL;
3121 __Pyx_RefNannySetupContext("quote");
3122 __pyx_self = __pyx_self;
3124 /* "TabProxies.pyx":235
3126 * '''return a quoted attribute.'''
3127 * if type(v) in types.StringTypes: # <<<<<<<<<<<<<<
3131 __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__types); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 235; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3132 __Pyx_GOTREF(__pyx_t_1);
3133 __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__StringTypes); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 235; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3134 __Pyx_GOTREF(__pyx_t_2);
3135 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
3136 __pyx_t_3 = ((PySequence_Contains(__pyx_t_2, ((PyObject *)Py_TYPE(__pyx_v_v))))); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 235; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3137 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
3140 /* "TabProxies.pyx":236
3141 * '''return a quoted attribute.'''
3142 * if type(v) in types.StringTypes:
3143 * return '"%s"' % v # <<<<<<<<<<<<<<
3147 __Pyx_XDECREF(__pyx_r);
3148 __pyx_t_2 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_17), __pyx_v_v); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 236; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3149 __Pyx_GOTREF(((PyObject *)__pyx_t_2));
3150 __pyx_r = ((PyObject *)__pyx_t_2);
3157 /* "TabProxies.pyx":238
3160 * return str(v) # <<<<<<<<<<<<<<
3162 * cdef class GTFProxy( TupleProxy ):
3164 __Pyx_XDECREF(__pyx_r);
3165 __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 238; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3166 __Pyx_GOTREF(((PyObject *)__pyx_t_2));
3167 __Pyx_INCREF(__pyx_v_v);
3168 PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_v);
3169 __Pyx_GIVEREF(__pyx_v_v);
3170 __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 238; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3171 __Pyx_GOTREF(__pyx_t_1);
3172 __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
3173 __pyx_r = __pyx_t_1;
3179 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
3182 __Pyx_XDECREF(__pyx_t_1);
3183 __Pyx_XDECREF(__pyx_t_2);
3184 __Pyx_AddTraceback("TabProxies.quote");
3187 __Pyx_XGIVEREF(__pyx_r);
3188 __Pyx_RefNannyFinishContext();
3192 /* "TabProxies.pyx":254
3195 * def __cinit__(self ): # <<<<<<<<<<<<<<
3196 * # automatically calls TupleProxy.__cinit__
3197 * self.hasOwnAttributes = False
3200 static int __pyx_pf_10TabProxies_8GTFProxy___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
3201 static int __pyx_pf_10TabProxies_8GTFProxy___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
3203 __Pyx_RefNannySetupContext("__cinit__");
3204 if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
3205 __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;}
3206 if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 0))) return -1;
3208 /* "TabProxies.pyx":256
3209 * def __cinit__(self ):
3210 * # automatically calls TupleProxy.__cinit__
3211 * self.hasOwnAttributes = False # <<<<<<<<<<<<<<
3213 * def __dealloc__(self):
3215 ((struct __pyx_obj_10TabProxies_GTFProxy *)__pyx_v_self)->hasOwnAttributes = 0;
3218 __Pyx_RefNannyFinishContext();
3222 /* "TabProxies.pyx":258
3223 * self.hasOwnAttributes = False
3225 * def __dealloc__(self): # <<<<<<<<<<<<<<
3226 * # automatically calls TupleProxy.__dealloc__
3227 * if self.hasOwnAttributes:
3230 static void __pyx_pf_10TabProxies_8GTFProxy_1__dealloc__(PyObject *__pyx_v_self); /*proto*/
3231 static void __pyx_pf_10TabProxies_8GTFProxy_1__dealloc__(PyObject *__pyx_v_self) {
3232 __Pyx_RefNannySetupContext("__dealloc__");
3234 /* "TabProxies.pyx":260
3235 * def __dealloc__(self):
3236 * # automatically calls TupleProxy.__dealloc__
3237 * if self.hasOwnAttributes: # <<<<<<<<<<<<<<
3238 * free(self.attributes)
3241 if (((struct __pyx_obj_10TabProxies_GTFProxy *)__pyx_v_self)->hasOwnAttributes) {
3243 /* "TabProxies.pyx":261
3244 * # automatically calls TupleProxy.__dealloc__
3245 * if self.hasOwnAttributes:
3246 * free(self.attributes) # <<<<<<<<<<<<<<
3248 * cdef int getMaxFields( self, size_t nbytes ):
3250 free(((struct __pyx_obj_10TabProxies_GTFProxy *)__pyx_v_self)->attributes);
3255 __Pyx_RefNannyFinishContext();
3258 /* "TabProxies.pyx":263
3259 * free(self.attributes)
3261 * cdef int getMaxFields( self, size_t nbytes ): # <<<<<<<<<<<<<<
3262 * '''return max number of fields.'''
3266 static int __pyx_f_10TabProxies_8GTFProxy_getMaxFields(struct __pyx_obj_10TabProxies_GTFProxy *__pyx_v_self, size_t __pyx_v_nbytes) {
3268 __Pyx_RefNannySetupContext("getMaxFields");
3270 /* "TabProxies.pyx":265
3271 * cdef int getMaxFields( self, size_t nbytes ):
3272 * '''return max number of fields.'''
3273 * return 9 # <<<<<<<<<<<<<<
3275 * cdef update( self, char * buffer, size_t nbytes ):
3282 __Pyx_RefNannyFinishContext();
3286 /* "TabProxies.pyx":267
3289 * cdef update( self, char * buffer, size_t nbytes ): # <<<<<<<<<<<<<<
3290 * '''update internal data.
3294 static PyObject *__pyx_f_10TabProxies_8GTFProxy_update(struct __pyx_obj_10TabProxies_GTFProxy *__pyx_v_self, char *__pyx_v_buffer, size_t __pyx_v_nbytes) {
3295 char *__pyx_v_cstart;
3298 PyObject *__pyx_r = NULL;
3300 PyObject *__pyx_t_2 = NULL;
3301 PyObject *__pyx_t_3 = NULL;
3303 __Pyx_RefNannySetupContext("update");
3305 /* "TabProxies.pyx":274
3307 * cdef char * cstart, * cend, * cscore
3308 * self.contig = buffer # <<<<<<<<<<<<<<
3312 __pyx_v_self->contig = __pyx_v_buffer;
3314 /* "TabProxies.pyx":277
3317 * if buffer[nbytes] != 0: # <<<<<<<<<<<<<<
3318 * raise ValueError( "incomplete line at %s" % buffer )
3321 __pyx_t_1 = ((__pyx_v_buffer[__pyx_v_nbytes]) != 0);
3324 /* "TabProxies.pyx":278
3326 * if buffer[nbytes] != 0:
3327 * raise ValueError( "incomplete line at %s" % buffer ) # <<<<<<<<<<<<<<
3329 * self.source = pos = nextItem( buffer )
3331 __pyx_t_2 = PyBytes_FromString(__pyx_v_buffer); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3332 __Pyx_GOTREF(((PyObject *)__pyx_t_2));
3333 __pyx_t_3 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_5), ((PyObject *)__pyx_t_2)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3334 __Pyx_GOTREF(((PyObject *)__pyx_t_3));
3335 __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
3336 __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3337 __Pyx_GOTREF(((PyObject *)__pyx_t_2));
3338 PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_t_3));
3339 __Pyx_GIVEREF(((PyObject *)__pyx_t_3));
3341 __pyx_t_3 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3342 __Pyx_GOTREF(__pyx_t_3);
3343 __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
3344 __Pyx_Raise(__pyx_t_3, 0, 0);
3345 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
3346 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3351 /* "TabProxies.pyx":280
3352 * raise ValueError( "incomplete line at %s" % buffer )
3354 * self.source = pos = nextItem( buffer ) # <<<<<<<<<<<<<<
3355 * self.feature = pos = nextItem( pos )
3356 * cstart = pos = nextItem( pos )
3358 __pyx_t_4 = __pyx_f_10TabProxies_nextItem(__pyx_v_buffer);
3359 __pyx_v_self->source = __pyx_t_4;
3360 __pyx_v_pos = __pyx_t_4;
3362 /* "TabProxies.pyx":281
3364 * self.source = pos = nextItem( buffer )
3365 * self.feature = pos = nextItem( pos ) # <<<<<<<<<<<<<<
3366 * cstart = pos = nextItem( pos )
3367 * cend = pos = nextItem( pos )
3369 __pyx_t_4 = __pyx_f_10TabProxies_nextItem(__pyx_v_pos);
3370 __pyx_v_self->feature = __pyx_t_4;
3371 __pyx_v_pos = __pyx_t_4;
3373 /* "TabProxies.pyx":282
3374 * self.source = pos = nextItem( buffer )
3375 * self.feature = pos = nextItem( pos )
3376 * cstart = pos = nextItem( pos ) # <<<<<<<<<<<<<<
3377 * cend = pos = nextItem( pos )
3378 * self.score = pos = nextItem( pos )
3380 __pyx_t_4 = __pyx_f_10TabProxies_nextItem(__pyx_v_pos);
3381 __pyx_v_cstart = __pyx_t_4;
3382 __pyx_v_pos = __pyx_t_4;
3384 /* "TabProxies.pyx":283
3385 * self.feature = pos = nextItem( pos )
3386 * cstart = pos = nextItem( pos )
3387 * cend = pos = nextItem( pos ) # <<<<<<<<<<<<<<
3388 * self.score = pos = nextItem( pos )
3389 * self.strand = pos = nextItem( pos )
3391 __pyx_t_4 = __pyx_f_10TabProxies_nextItem(__pyx_v_pos);
3392 __pyx_v_cend = __pyx_t_4;
3393 __pyx_v_pos = __pyx_t_4;
3395 /* "TabProxies.pyx":284
3396 * cstart = pos = nextItem( pos )
3397 * cend = pos = nextItem( pos )
3398 * self.score = pos = nextItem( pos ) # <<<<<<<<<<<<<<
3399 * self.strand = pos = nextItem( pos )
3400 * self.frame = pos = nextItem( pos )
3402 __pyx_t_4 = __pyx_f_10TabProxies_nextItem(__pyx_v_pos);
3403 __pyx_v_self->score = __pyx_t_4;
3404 __pyx_v_pos = __pyx_t_4;
3406 /* "TabProxies.pyx":285
3407 * cend = pos = nextItem( pos )
3408 * self.score = pos = nextItem( pos )
3409 * self.strand = pos = nextItem( pos ) # <<<<<<<<<<<<<<
3410 * self.frame = pos = nextItem( pos )
3411 * self.attributes = pos = nextItem( pos )
3413 __pyx_t_4 = __pyx_f_10TabProxies_nextItem(__pyx_v_pos);
3414 __pyx_v_self->strand = __pyx_t_4;
3415 __pyx_v_pos = __pyx_t_4;
3417 /* "TabProxies.pyx":286
3418 * self.score = pos = nextItem( pos )
3419 * self.strand = pos = nextItem( pos )
3420 * self.frame = pos = nextItem( pos ) # <<<<<<<<<<<<<<
3421 * self.attributes = pos = nextItem( pos )
3424 __pyx_t_4 = __pyx_f_10TabProxies_nextItem(__pyx_v_pos);
3425 __pyx_v_self->frame = __pyx_t_4;
3426 __pyx_v_pos = __pyx_t_4;
3428 /* "TabProxies.pyx":287
3429 * self.strand = pos = nextItem( pos )
3430 * self.frame = pos = nextItem( pos )
3431 * self.attributes = pos = nextItem( pos ) # <<<<<<<<<<<<<<
3433 * self.start = atoi( cstart ) - 1
3435 __pyx_t_4 = __pyx_f_10TabProxies_nextItem(__pyx_v_pos);
3436 __pyx_v_self->attributes = __pyx_t_4;
3437 __pyx_v_pos = __pyx_t_4;
3439 /* "TabProxies.pyx":289
3440 * self.attributes = pos = nextItem( pos )
3442 * self.start = atoi( cstart ) - 1 # <<<<<<<<<<<<<<
3443 * self.end = atoi( cend )
3446 __pyx_v_self->start = (atoi(__pyx_v_cstart) - 1);
3448 /* "TabProxies.pyx":290
3450 * self.start = atoi( cstart ) - 1
3451 * self.end = atoi( cend ) # <<<<<<<<<<<<<<
3455 __pyx_v_self->end = atoi(__pyx_v_cend);
3457 /* "TabProxies.pyx":291
3458 * self.start = atoi( cstart ) - 1
3459 * self.end = atoi( cend )
3460 * self.nfields = 9 # <<<<<<<<<<<<<<
3464 __pyx_v_self->__pyx_base.nfields = 9;
3466 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
3469 __Pyx_XDECREF(__pyx_t_2);
3470 __Pyx_XDECREF(__pyx_t_3);
3471 __Pyx_AddTraceback("TabProxies.GTFProxy.update");
3474 __Pyx_XGIVEREF(__pyx_r);
3475 __Pyx_RefNannyFinishContext();
3479 /* "TabProxies.pyx":295
3481 * '''contig of feature.'''
3482 * def __get__( self ): return self.contig # <<<<<<<<<<<<<<
3483 * def __set__( self, value ):
3484 * self.is_modified = True
3487 static PyObject *__pyx_pf_10TabProxies_8GTFProxy_6contig___get__(PyObject *__pyx_v_self); /*proto*/
3488 static PyObject *__pyx_pf_10TabProxies_8GTFProxy_6contig___get__(PyObject *__pyx_v_self) {
3489 PyObject *__pyx_r = NULL;
3490 PyObject *__pyx_t_1 = NULL;
3491 __Pyx_RefNannySetupContext("__get__");
3492 __Pyx_XDECREF(__pyx_r);
3493 __pyx_t_1 = PyBytes_FromString(((struct __pyx_obj_10TabProxies_GTFProxy *)__pyx_v_self)->contig); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 295; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3494 __Pyx_GOTREF(((PyObject *)__pyx_t_1));
3495 __pyx_r = ((PyObject *)__pyx_t_1);
3499 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
3502 __Pyx_XDECREF(__pyx_t_1);
3503 __Pyx_AddTraceback("TabProxies.GTFProxy.contig.__get__");
3506 __Pyx_XGIVEREF(__pyx_r);
3507 __Pyx_RefNannyFinishContext();
3511 /* "TabProxies.pyx":296
3512 * '''contig of feature.'''
3513 * def __get__( self ): return self.contig
3514 * def __set__( self, value ): # <<<<<<<<<<<<<<
3515 * self.is_modified = True
3516 * self.contig = value
3519 static int __pyx_pf_10TabProxies_8GTFProxy_6contig_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
3520 static int __pyx_pf_10TabProxies_8GTFProxy_6contig_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
3523 __Pyx_RefNannySetupContext("__set__");
3525 /* "TabProxies.pyx":297
3526 * def __get__( self ): return self.contig
3527 * def __set__( self, value ):
3528 * self.is_modified = True # <<<<<<<<<<<<<<
3529 * self.contig = value
3532 ((struct __pyx_obj_10TabProxies_GTFProxy *)__pyx_v_self)->__pyx_base.is_modified = 1;
3534 /* "TabProxies.pyx":298
3535 * def __set__( self, value ):
3536 * self.is_modified = True
3537 * self.contig = value # <<<<<<<<<<<<<<
3541 __pyx_t_1 = PyBytes_AsString(__pyx_v_value); if (unlikely((!__pyx_t_1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 298; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3542 ((struct __pyx_obj_10TabProxies_GTFProxy *)__pyx_v_self)->contig = __pyx_t_1;
3547 __Pyx_AddTraceback("TabProxies.GTFProxy.contig.__set__");
3550 __Pyx_RefNannyFinishContext();
3554 /* "TabProxies.pyx":302
3556 * '''feature name.'''
3557 * def __get__( self ): return self.feature # <<<<<<<<<<<<<<
3558 * def __set__( self, value ):
3559 * self.is_modified = True
3562 static PyObject *__pyx_pf_10TabProxies_8GTFProxy_7feature___get__(PyObject *__pyx_v_self); /*proto*/
3563 static PyObject *__pyx_pf_10TabProxies_8GTFProxy_7feature___get__(PyObject *__pyx_v_self) {
3564 PyObject *__pyx_r = NULL;
3565 PyObject *__pyx_t_1 = NULL;
3566 __Pyx_RefNannySetupContext("__get__");
3567 __Pyx_XDECREF(__pyx_r);
3568 __pyx_t_1 = PyBytes_FromString(((struct __pyx_obj_10TabProxies_GTFProxy *)__pyx_v_self)->feature); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 302; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3569 __Pyx_GOTREF(((PyObject *)__pyx_t_1));
3570 __pyx_r = ((PyObject *)__pyx_t_1);
3574 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
3577 __Pyx_XDECREF(__pyx_t_1);
3578 __Pyx_AddTraceback("TabProxies.GTFProxy.feature.__get__");
3581 __Pyx_XGIVEREF(__pyx_r);
3582 __Pyx_RefNannyFinishContext();
3586 /* "TabProxies.pyx":303
3587 * '''feature name.'''
3588 * def __get__( self ): return self.feature
3589 * def __set__( self, value ): # <<<<<<<<<<<<<<
3590 * self.is_modified = True
3591 * self.feature = value
3594 static int __pyx_pf_10TabProxies_8GTFProxy_7feature_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
3595 static int __pyx_pf_10TabProxies_8GTFProxy_7feature_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
3598 __Pyx_RefNannySetupContext("__set__");
3600 /* "TabProxies.pyx":304
3601 * def __get__( self ): return self.feature
3602 * def __set__( self, value ):
3603 * self.is_modified = True # <<<<<<<<<<<<<<
3604 * self.feature = value
3607 ((struct __pyx_obj_10TabProxies_GTFProxy *)__pyx_v_self)->__pyx_base.is_modified = 1;
3609 /* "TabProxies.pyx":305
3610 * def __set__( self, value ):
3611 * self.is_modified = True
3612 * self.feature = value # <<<<<<<<<<<<<<
3616 __pyx_t_1 = PyBytes_AsString(__pyx_v_value); if (unlikely((!__pyx_t_1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 305; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3617 ((struct __pyx_obj_10TabProxies_GTFProxy *)__pyx_v_self)->feature = __pyx_t_1;
3622 __Pyx_AddTraceback("TabProxies.GTFProxy.feature.__set__");
3625 __Pyx_RefNannyFinishContext();
3629 /* "TabProxies.pyx":309
3631 * '''feature source.'''
3632 * def __get__( self ): return self.source # <<<<<<<<<<<<<<
3633 * def __set__( self, value ):
3634 * self.is_modified = True
3637 static PyObject *__pyx_pf_10TabProxies_8GTFProxy_6source___get__(PyObject *__pyx_v_self); /*proto*/
3638 static PyObject *__pyx_pf_10TabProxies_8GTFProxy_6source___get__(PyObject *__pyx_v_self) {
3639 PyObject *__pyx_r = NULL;
3640 PyObject *__pyx_t_1 = NULL;
3641 __Pyx_RefNannySetupContext("__get__");
3642 __Pyx_XDECREF(__pyx_r);
3643 __pyx_t_1 = PyBytes_FromString(((struct __pyx_obj_10TabProxies_GTFProxy *)__pyx_v_self)->source); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 309; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3644 __Pyx_GOTREF(((PyObject *)__pyx_t_1));
3645 __pyx_r = ((PyObject *)__pyx_t_1);
3649 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
3652 __Pyx_XDECREF(__pyx_t_1);
3653 __Pyx_AddTraceback("TabProxies.GTFProxy.source.__get__");
3656 __Pyx_XGIVEREF(__pyx_r);
3657 __Pyx_RefNannyFinishContext();
3661 /* "TabProxies.pyx":310
3662 * '''feature source.'''
3663 * def __get__( self ): return self.source
3664 * def __set__( self, value ): # <<<<<<<<<<<<<<
3665 * self.is_modified = True
3666 * self.source = value
3669 static int __pyx_pf_10TabProxies_8GTFProxy_6source_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
3670 static int __pyx_pf_10TabProxies_8GTFProxy_6source_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
3673 __Pyx_RefNannySetupContext("__set__");
3675 /* "TabProxies.pyx":311
3676 * def __get__( self ): return self.source
3677 * def __set__( self, value ):
3678 * self.is_modified = True # <<<<<<<<<<<<<<
3679 * self.source = value
3682 ((struct __pyx_obj_10TabProxies_GTFProxy *)__pyx_v_self)->__pyx_base.is_modified = 1;
3684 /* "TabProxies.pyx":312
3685 * def __set__( self, value ):
3686 * self.is_modified = True
3687 * self.source = value # <<<<<<<<<<<<<<
3691 __pyx_t_1 = PyBytes_AsString(__pyx_v_value); if (unlikely((!__pyx_t_1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 312; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3692 ((struct __pyx_obj_10TabProxies_GTFProxy *)__pyx_v_self)->source = __pyx_t_1;
3697 __Pyx_AddTraceback("TabProxies.GTFProxy.source.__set__");
3700 __Pyx_RefNannyFinishContext();
3704 /* "TabProxies.pyx":316
3706 * '''feature start (in 0-based open/closed coordinates).'''
3707 * def __get__( self ): return self.start # <<<<<<<<<<<<<<
3708 * def __set__( self, value ):
3709 * self.is_modified = True
3712 static PyObject *__pyx_pf_10TabProxies_8GTFProxy_5start___get__(PyObject *__pyx_v_self); /*proto*/
3713 static PyObject *__pyx_pf_10TabProxies_8GTFProxy_5start___get__(PyObject *__pyx_v_self) {
3714 PyObject *__pyx_r = NULL;
3715 PyObject *__pyx_t_1 = NULL;
3716 __Pyx_RefNannySetupContext("__get__");
3717 __Pyx_XDECREF(__pyx_r);
3718 __pyx_t_1 = __Pyx_PyInt_to_py_uint32_t(((struct __pyx_obj_10TabProxies_GTFProxy *)__pyx_v_self)->start); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3719 __Pyx_GOTREF(__pyx_t_1);
3720 __pyx_r = __pyx_t_1;
3724 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
3727 __Pyx_XDECREF(__pyx_t_1);
3728 __Pyx_AddTraceback("TabProxies.GTFProxy.start.__get__");
3731 __Pyx_XGIVEREF(__pyx_r);
3732 __Pyx_RefNannyFinishContext();
3736 /* "TabProxies.pyx":317
3737 * '''feature start (in 0-based open/closed coordinates).'''
3738 * def __get__( self ): return self.start
3739 * def __set__( self, value ): # <<<<<<<<<<<<<<
3740 * self.is_modified = True
3741 * self.start = value
3744 static int __pyx_pf_10TabProxies_8GTFProxy_5start_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
3745 static int __pyx_pf_10TabProxies_8GTFProxy_5start_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
3748 __Pyx_RefNannySetupContext("__set__");
3750 /* "TabProxies.pyx":318
3751 * def __get__( self ): return self.start
3752 * def __set__( self, value ):
3753 * self.is_modified = True # <<<<<<<<<<<<<<
3754 * self.start = value
3757 ((struct __pyx_obj_10TabProxies_GTFProxy *)__pyx_v_self)->__pyx_base.is_modified = 1;
3759 /* "TabProxies.pyx":319
3760 * def __set__( self, value ):
3761 * self.is_modified = True
3762 * self.start = value # <<<<<<<<<<<<<<
3766 __pyx_t_1 = __Pyx_PyInt_from_py_uint32_t(__pyx_v_value); if (unlikely((__pyx_t_1 == (uint32_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 319; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3767 ((struct __pyx_obj_10TabProxies_GTFProxy *)__pyx_v_self)->start = __pyx_t_1;
3772 __Pyx_AddTraceback("TabProxies.GTFProxy.start.__set__");
3775 __Pyx_RefNannyFinishContext();
3779 /* "TabProxies.pyx":323
3781 * '''feature end (in 0-based open/closed coordinates).'''
3782 * def __get__( self ): return self.end # <<<<<<<<<<<<<<
3783 * def __set__( self, value ):
3784 * self.is_modified = True
3787 static PyObject *__pyx_pf_10TabProxies_8GTFProxy_3end___get__(PyObject *__pyx_v_self); /*proto*/
3788 static PyObject *__pyx_pf_10TabProxies_8GTFProxy_3end___get__(PyObject *__pyx_v_self) {
3789 PyObject *__pyx_r = NULL;
3790 PyObject *__pyx_t_1 = NULL;
3791 __Pyx_RefNannySetupContext("__get__");
3792 __Pyx_XDECREF(__pyx_r);
3793 __pyx_t_1 = __Pyx_PyInt_to_py_uint32_t(((struct __pyx_obj_10TabProxies_GTFProxy *)__pyx_v_self)->end); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 323; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3794 __Pyx_GOTREF(__pyx_t_1);
3795 __pyx_r = __pyx_t_1;
3799 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
3802 __Pyx_XDECREF(__pyx_t_1);
3803 __Pyx_AddTraceback("TabProxies.GTFProxy.end.__get__");
3806 __Pyx_XGIVEREF(__pyx_r);
3807 __Pyx_RefNannyFinishContext();
3811 /* "TabProxies.pyx":324
3812 * '''feature end (in 0-based open/closed coordinates).'''
3813 * def __get__( self ): return self.end
3814 * def __set__( self, value ): # <<<<<<<<<<<<<<
3815 * self.is_modified = True
3819 static int __pyx_pf_10TabProxies_8GTFProxy_3end_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
3820 static int __pyx_pf_10TabProxies_8GTFProxy_3end_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
3823 __Pyx_RefNannySetupContext("__set__");
3825 /* "TabProxies.pyx":325
3826 * def __get__( self ): return self.end
3827 * def __set__( self, value ):
3828 * self.is_modified = True # <<<<<<<<<<<<<<
3832 ((struct __pyx_obj_10TabProxies_GTFProxy *)__pyx_v_self)->__pyx_base.is_modified = 1;
3834 /* "TabProxies.pyx":326
3835 * def __set__( self, value ):
3836 * self.is_modified = True
3837 * self.end = value # <<<<<<<<<<<<<<
3841 __pyx_t_1 = __Pyx_PyInt_from_py_uint32_t(__pyx_v_value); if (unlikely((__pyx_t_1 == (uint32_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 326; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3842 ((struct __pyx_obj_10TabProxies_GTFProxy *)__pyx_v_self)->end = __pyx_t_1;
3847 __Pyx_AddTraceback("TabProxies.GTFProxy.end.__set__");
3850 __Pyx_RefNannyFinishContext();
3854 /* "TabProxies.pyx":330
3856 * '''feature score.'''
3857 * def __get__( self ): # <<<<<<<<<<<<<<
3858 * if self.score[0] == '.' and self.score[1] == '\0' :
3862 static PyObject *__pyx_pf_10TabProxies_8GTFProxy_5score___get__(PyObject *__pyx_v_self); /*proto*/
3863 static PyObject *__pyx_pf_10TabProxies_8GTFProxy_5score___get__(PyObject *__pyx_v_self) {
3864 PyObject *__pyx_r = NULL;
3868 PyObject *__pyx_t_4 = NULL;
3869 __Pyx_RefNannySetupContext("__get__");
3871 /* "TabProxies.pyx":331
3872 * '''feature score.'''
3873 * def __get__( self ):
3874 * if self.score[0] == '.' and self.score[1] == '\0' : # <<<<<<<<<<<<<<
3878 __pyx_t_1 = ((((struct __pyx_obj_10TabProxies_GTFProxy *)__pyx_v_self)->score[0]) == '.');
3880 __pyx_t_2 = ((((struct __pyx_obj_10TabProxies_GTFProxy *)__pyx_v_self)->score[1]) == '\x00');
3881 __pyx_t_3 = __pyx_t_2;
3883 __pyx_t_3 = __pyx_t_1;
3887 /* "TabProxies.pyx":332
3888 * def __get__( self ):
3889 * if self.score[0] == '.' and self.score[1] == '\0' :
3890 * return None # <<<<<<<<<<<<<<
3892 * return atof(self.score)
3894 __Pyx_XDECREF(__pyx_r);
3895 __Pyx_INCREF(Py_None);
3902 /* "TabProxies.pyx":334
3905 * return atof(self.score) # <<<<<<<<<<<<<<
3906 * def __set__( self, value ):
3907 * self.is_modified = True
3909 __Pyx_XDECREF(__pyx_r);
3910 __pyx_t_4 = PyFloat_FromDouble(atof(((struct __pyx_obj_10TabProxies_GTFProxy *)__pyx_v_self)->score)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 334; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3911 __Pyx_GOTREF(__pyx_t_4);
3912 __pyx_r = __pyx_t_4;
3918 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
3921 __Pyx_XDECREF(__pyx_t_4);
3922 __Pyx_AddTraceback("TabProxies.GTFProxy.score.__get__");
3925 __Pyx_XGIVEREF(__pyx_r);
3926 __Pyx_RefNannyFinishContext();
3930 /* "TabProxies.pyx":335
3932 * return atof(self.score)
3933 * def __set__( self, value ): # <<<<<<<<<<<<<<
3934 * self.is_modified = True
3935 * self.score = value
3938 static int __pyx_pf_10TabProxies_8GTFProxy_5score_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
3939 static int __pyx_pf_10TabProxies_8GTFProxy_5score_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
3942 __Pyx_RefNannySetupContext("__set__");
3944 /* "TabProxies.pyx":336
3945 * return atof(self.score)
3946 * def __set__( self, value ):
3947 * self.is_modified = True # <<<<<<<<<<<<<<
3948 * self.score = value
3951 ((struct __pyx_obj_10TabProxies_GTFProxy *)__pyx_v_self)->__pyx_base.is_modified = 1;
3953 /* "TabProxies.pyx":337
3954 * def __set__( self, value ):
3955 * self.is_modified = True
3956 * self.score = value # <<<<<<<<<<<<<<
3960 __pyx_t_1 = PyBytes_AsString(__pyx_v_value); if (unlikely((!__pyx_t_1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 337; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3961 ((struct __pyx_obj_10TabProxies_GTFProxy *)__pyx_v_self)->score = __pyx_t_1;
3966 __Pyx_AddTraceback("TabProxies.GTFProxy.score.__set__");
3969 __Pyx_RefNannyFinishContext();
3973 /* "TabProxies.pyx":341
3975 * '''feature strand.'''
3976 * def __get__( self ): return self.strand # <<<<<<<<<<<<<<
3977 * def __set__( self, value ):
3978 * self.is_modified = True
3981 static PyObject *__pyx_pf_10TabProxies_8GTFProxy_6strand___get__(PyObject *__pyx_v_self); /*proto*/
3982 static PyObject *__pyx_pf_10TabProxies_8GTFProxy_6strand___get__(PyObject *__pyx_v_self) {
3983 PyObject *__pyx_r = NULL;
3984 PyObject *__pyx_t_1 = NULL;
3985 __Pyx_RefNannySetupContext("__get__");
3986 __Pyx_XDECREF(__pyx_r);
3987 __pyx_t_1 = PyBytes_FromString(((struct __pyx_obj_10TabProxies_GTFProxy *)__pyx_v_self)->strand); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 341; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
3988 __Pyx_GOTREF(((PyObject *)__pyx_t_1));
3989 __pyx_r = ((PyObject *)__pyx_t_1);
3993 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
3996 __Pyx_XDECREF(__pyx_t_1);
3997 __Pyx_AddTraceback("TabProxies.GTFProxy.strand.__get__");
4000 __Pyx_XGIVEREF(__pyx_r);
4001 __Pyx_RefNannyFinishContext();
4005 /* "TabProxies.pyx":342
4006 * '''feature strand.'''
4007 * def __get__( self ): return self.strand
4008 * def __set__( self, value ): # <<<<<<<<<<<<<<
4009 * self.is_modified = True
4010 * self.strand = value
4013 static int __pyx_pf_10TabProxies_8GTFProxy_6strand_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
4014 static int __pyx_pf_10TabProxies_8GTFProxy_6strand_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
4017 __Pyx_RefNannySetupContext("__set__");
4019 /* "TabProxies.pyx":343
4020 * def __get__( self ): return self.strand
4021 * def __set__( self, value ):
4022 * self.is_modified = True # <<<<<<<<<<<<<<
4023 * self.strand = value
4026 ((struct __pyx_obj_10TabProxies_GTFProxy *)__pyx_v_self)->__pyx_base.is_modified = 1;
4028 /* "TabProxies.pyx":344
4029 * def __set__( self, value ):
4030 * self.is_modified = True
4031 * self.strand = value # <<<<<<<<<<<<<<
4035 __pyx_t_1 = PyBytes_AsString(__pyx_v_value); if (unlikely((!__pyx_t_1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 344; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4036 ((struct __pyx_obj_10TabProxies_GTFProxy *)__pyx_v_self)->strand = __pyx_t_1;
4041 __Pyx_AddTraceback("TabProxies.GTFProxy.strand.__set__");
4044 __Pyx_RefNannyFinishContext();
4048 /* "TabProxies.pyx":348
4050 * '''feature frame.'''
4051 * def __get__( self ): return self.frame # <<<<<<<<<<<<<<
4052 * def __set__( self, value ):
4053 * self.is_modified = True
4056 static PyObject *__pyx_pf_10TabProxies_8GTFProxy_5frame___get__(PyObject *__pyx_v_self); /*proto*/
4057 static PyObject *__pyx_pf_10TabProxies_8GTFProxy_5frame___get__(PyObject *__pyx_v_self) {
4058 PyObject *__pyx_r = NULL;
4059 PyObject *__pyx_t_1 = NULL;
4060 __Pyx_RefNannySetupContext("__get__");
4061 __Pyx_XDECREF(__pyx_r);
4062 __pyx_t_1 = PyBytes_FromString(((struct __pyx_obj_10TabProxies_GTFProxy *)__pyx_v_self)->frame); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 348; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4063 __Pyx_GOTREF(((PyObject *)__pyx_t_1));
4064 __pyx_r = ((PyObject *)__pyx_t_1);
4068 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
4071 __Pyx_XDECREF(__pyx_t_1);
4072 __Pyx_AddTraceback("TabProxies.GTFProxy.frame.__get__");
4075 __Pyx_XGIVEREF(__pyx_r);
4076 __Pyx_RefNannyFinishContext();
4080 /* "TabProxies.pyx":349
4081 * '''feature frame.'''
4082 * def __get__( self ): return self.frame
4083 * def __set__( self, value ): # <<<<<<<<<<<<<<
4084 * self.is_modified = True
4085 * self.frame = value
4088 static int __pyx_pf_10TabProxies_8GTFProxy_5frame_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
4089 static int __pyx_pf_10TabProxies_8GTFProxy_5frame_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
4092 __Pyx_RefNannySetupContext("__set__");
4094 /* "TabProxies.pyx":350
4095 * def __get__( self ): return self.frame
4096 * def __set__( self, value ):
4097 * self.is_modified = True # <<<<<<<<<<<<<<
4098 * self.frame = value
4101 ((struct __pyx_obj_10TabProxies_GTFProxy *)__pyx_v_self)->__pyx_base.is_modified = 1;
4103 /* "TabProxies.pyx":351
4104 * def __set__( self, value ):
4105 * self.is_modified = True
4106 * self.frame = value # <<<<<<<<<<<<<<
4108 * property attributes:
4110 __pyx_t_1 = PyBytes_AsString(__pyx_v_value); if (unlikely((!__pyx_t_1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 351; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4111 ((struct __pyx_obj_10TabProxies_GTFProxy *)__pyx_v_self)->frame = __pyx_t_1;
4116 __Pyx_AddTraceback("TabProxies.GTFProxy.frame.__set__");
4119 __Pyx_RefNannyFinishContext();
4123 /* "TabProxies.pyx":355
4124 * property attributes:
4125 * '''feature attributes (as a string).'''
4126 * def __get__( self ): return self.attributes # <<<<<<<<<<<<<<
4127 * def __set__( self, value ):
4128 * self.is_modified = True
4131 static PyObject *__pyx_pf_10TabProxies_8GTFProxy_10attributes___get__(PyObject *__pyx_v_self); /*proto*/
4132 static PyObject *__pyx_pf_10TabProxies_8GTFProxy_10attributes___get__(PyObject *__pyx_v_self) {
4133 PyObject *__pyx_r = NULL;
4134 PyObject *__pyx_t_1 = NULL;
4135 __Pyx_RefNannySetupContext("__get__");
4136 __Pyx_XDECREF(__pyx_r);
4137 __pyx_t_1 = PyBytes_FromString(((struct __pyx_obj_10TabProxies_GTFProxy *)__pyx_v_self)->attributes); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 355; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4138 __Pyx_GOTREF(((PyObject *)__pyx_t_1));
4139 __pyx_r = ((PyObject *)__pyx_t_1);
4143 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
4146 __Pyx_XDECREF(__pyx_t_1);
4147 __Pyx_AddTraceback("TabProxies.GTFProxy.attributes.__get__");
4150 __Pyx_XGIVEREF(__pyx_r);
4151 __Pyx_RefNannyFinishContext();
4155 /* "TabProxies.pyx":356
4156 * '''feature attributes (as a string).'''
4157 * def __get__( self ): return self.attributes
4158 * def __set__( self, value ): # <<<<<<<<<<<<<<
4159 * self.is_modified = True
4160 * self.attributes = value
4163 static int __pyx_pf_10TabProxies_8GTFProxy_10attributes_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value); /*proto*/
4164 static int __pyx_pf_10TabProxies_8GTFProxy_10attributes_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_value) {
4167 __Pyx_RefNannySetupContext("__set__");
4169 /* "TabProxies.pyx":357
4170 * def __get__( self ): return self.attributes
4171 * def __set__( self, value ):
4172 * self.is_modified = True # <<<<<<<<<<<<<<
4173 * self.attributes = value
4176 ((struct __pyx_obj_10TabProxies_GTFProxy *)__pyx_v_self)->__pyx_base.is_modified = 1;
4178 /* "TabProxies.pyx":358
4179 * def __set__( self, value ):
4180 * self.is_modified = True
4181 * self.attributes = value # <<<<<<<<<<<<<<
4183 * def asDict( self ):
4185 __pyx_t_1 = PyBytes_AsString(__pyx_v_value); if (unlikely((!__pyx_t_1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 358; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4186 ((struct __pyx_obj_10TabProxies_GTFProxy *)__pyx_v_self)->attributes = __pyx_t_1;
4191 __Pyx_AddTraceback("TabProxies.GTFProxy.attributes.__set__");
4194 __Pyx_RefNannyFinishContext();
4198 /* "TabProxies.pyx":360
4199 * self.attributes = value
4201 * def asDict( self ): # <<<<<<<<<<<<<<
4202 * """parse attributes - return as dict
4206 static PyObject *__pyx_pf_10TabProxies_8GTFProxy_2asDict(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
4207 static char __pyx_doc_10TabProxies_8GTFProxy_2asDict[] = "parse attributes - return as dict\n ";
4208 static PyObject *__pyx_pf_10TabProxies_8GTFProxy_2asDict(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
4209 char *__pyx_v_attributes;
4210 PyObject *__pyx_v_fields;
4211 PyObject *__pyx_v_result;
4212 PyObject *__pyx_v_f;
4213 PyObject *__pyx_v_d;
4214 PyObject *__pyx_v_n;
4215 PyObject *__pyx_v_v;
4216 PyObject *__pyx_v_x;
4217 PyObject *__pyx_r = NULL;
4218 PyObject *__pyx_t_1 = NULL;
4219 Py_ssize_t __pyx_t_2;
4220 PyObject *__pyx_t_3 = NULL;
4221 PyObject *__pyx_t_4 = NULL;
4222 PyObject *__pyx_t_5 = NULL;
4223 Py_ssize_t __pyx_t_6;
4224 PyObject *__pyx_t_7 = NULL;
4230 __Pyx_RefNannySetupContext("asDict");
4231 __pyx_v_fields = ((PyObject*)Py_None); __Pyx_INCREF(Py_None);
4232 __pyx_v_result = ((PyObject*)Py_None); __Pyx_INCREF(Py_None);
4233 __pyx_v_f = Py_None; __Pyx_INCREF(Py_None);
4234 __pyx_v_d = ((PyObject*)Py_None); __Pyx_INCREF(Py_None);
4235 __pyx_v_n = Py_None; __Pyx_INCREF(Py_None);
4236 __pyx_v_v = Py_None; __Pyx_INCREF(Py_None);
4237 __pyx_v_x = Py_None; __Pyx_INCREF(Py_None);
4239 /* "TabProxies.pyx":365
4242 * attributes = self.attributes # <<<<<<<<<<<<<<
4244 * # separate into fields
4246 __pyx_v_attributes = ((struct __pyx_obj_10TabProxies_GTFProxy *)__pyx_v_self)->attributes;
4248 /* "TabProxies.pyx":368
4250 * # separate into fields
4251 * fields = [ x.strip() for x in attributes.split(";")[:-1]] # <<<<<<<<<<<<<<
4255 __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 368; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4256 __Pyx_GOTREF(((PyObject *)__pyx_t_1));
4257 __pyx_t_3 = PyBytes_FromString(__pyx_v_attributes); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 368; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4258 __Pyx_GOTREF(((PyObject *)__pyx_t_3));
4259 __pyx_t_4 = PyObject_GetAttr(((PyObject *)__pyx_t_3), __pyx_n_s__split); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 368; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4260 __Pyx_GOTREF(__pyx_t_4);
4261 __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
4262 __pyx_t_3 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_k_tuple_19), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 368; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4263 __Pyx_GOTREF(__pyx_t_3);
4264 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
4265 __pyx_t_4 = __Pyx_PySequence_GetSlice(__pyx_t_3, 0, -1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 368; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4266 __Pyx_GOTREF(__pyx_t_4);
4267 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4268 if (PyList_CheckExact(__pyx_t_4) || PyTuple_CheckExact(__pyx_t_4)) {
4269 __pyx_t_2 = 0; __pyx_t_3 = __pyx_t_4; __Pyx_INCREF(__pyx_t_3);
4271 __pyx_t_2 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 368; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4272 __Pyx_GOTREF(__pyx_t_3);
4274 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
4276 if (likely(PyList_CheckExact(__pyx_t_3))) {
4277 if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_3)) break;
4278 __pyx_t_4 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++;
4279 } else if (likely(PyTuple_CheckExact(__pyx_t_3))) {
4280 if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
4281 __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++;
4283 __pyx_t_4 = PyIter_Next(__pyx_t_3);
4285 if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 368; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4288 __Pyx_GOTREF(__pyx_t_4);
4290 __Pyx_DECREF(__pyx_v_x);
4291 __pyx_v_x = __pyx_t_4;
4293 __pyx_t_4 = PyObject_GetAttr(__pyx_v_x, __pyx_n_s__strip); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 368; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4294 __Pyx_GOTREF(__pyx_t_4);
4295 __pyx_t_5 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 368; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4296 __Pyx_GOTREF(__pyx_t_5);
4297 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
4298 if (unlikely(PyList_Append(__pyx_t_1, (PyObject*)__pyx_t_5))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 368; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4299 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
4301 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4302 __Pyx_INCREF(((PyObject *)__pyx_t_1));
4303 __Pyx_DECREF(((PyObject *)__pyx_v_fields));
4304 __pyx_v_fields = __pyx_t_1;
4305 __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
4307 /* "TabProxies.pyx":370
4308 * fields = [ x.strip() for x in attributes.split(";")[:-1]]
4310 * result = {} # <<<<<<<<<<<<<<
4314 __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 370; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4315 __Pyx_GOTREF(((PyObject *)__pyx_t_1));
4316 __Pyx_DECREF(((PyObject *)__pyx_v_result));
4317 __pyx_v_result = __pyx_t_1;
4320 /* "TabProxies.pyx":372
4323 * for f in fields: # <<<<<<<<<<<<<<
4325 * d = [ x.strip() for x in f.split(" ")]
4327 if (unlikely(__pyx_v_fields == Py_None)) {
4328 PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 372; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4330 __pyx_t_2 = 0; __pyx_t_1 = ((PyObject *)__pyx_v_fields); __Pyx_INCREF(__pyx_t_1);
4332 if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
4333 __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++;
4334 __Pyx_DECREF(__pyx_v_f);
4335 __pyx_v_f = __pyx_t_3;
4338 /* "TabProxies.pyx":374
4341 * d = [ x.strip() for x in f.split(" ")] # <<<<<<<<<<<<<<
4345 __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 374; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4346 __Pyx_GOTREF(((PyObject *)__pyx_t_3));
4347 __pyx_t_5 = PyObject_GetAttr(__pyx_v_f, __pyx_n_s__split); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 374; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4348 __Pyx_GOTREF(__pyx_t_5);
4349 __pyx_t_4 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_k_tuple_21), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 374; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4350 __Pyx_GOTREF(__pyx_t_4);
4351 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
4352 if (PyList_CheckExact(__pyx_t_4) || PyTuple_CheckExact(__pyx_t_4)) {
4353 __pyx_t_6 = 0; __pyx_t_5 = __pyx_t_4; __Pyx_INCREF(__pyx_t_5);
4355 __pyx_t_6 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 374; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4356 __Pyx_GOTREF(__pyx_t_5);
4358 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
4360 if (likely(PyList_CheckExact(__pyx_t_5))) {
4361 if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_5)) break;
4362 __pyx_t_4 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_6); __Pyx_INCREF(__pyx_t_4); __pyx_t_6++;
4363 } else if (likely(PyTuple_CheckExact(__pyx_t_5))) {
4364 if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_5)) break;
4365 __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_6); __Pyx_INCREF(__pyx_t_4); __pyx_t_6++;
4367 __pyx_t_4 = PyIter_Next(__pyx_t_5);
4369 if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 374; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4372 __Pyx_GOTREF(__pyx_t_4);
4374 __Pyx_DECREF(__pyx_v_x);
4375 __pyx_v_x = __pyx_t_4;
4377 __pyx_t_4 = PyObject_GetAttr(__pyx_v_x, __pyx_n_s__strip); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 374; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4378 __Pyx_GOTREF(__pyx_t_4);
4379 __pyx_t_7 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 374; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4380 __Pyx_GOTREF(__pyx_t_7);
4381 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
4382 if (unlikely(PyList_Append(__pyx_t_3, (PyObject*)__pyx_t_7))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 374; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4383 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
4385 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
4386 __Pyx_INCREF(((PyObject *)__pyx_t_3));
4387 __Pyx_DECREF(((PyObject *)__pyx_v_d));
4388 __pyx_v_d = __pyx_t_3;
4389 __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
4391 /* "TabProxies.pyx":376
4392 * d = [ x.strip() for x in f.split(" ")]
4394 * n,v = d[0], d[1] # <<<<<<<<<<<<<<
4395 * if len(d) > 2: v = d[1:]
4398 __pyx_t_3 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_d), 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 376; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4399 __Pyx_GOTREF(__pyx_t_3);
4400 __pyx_t_5 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_d), 1, sizeof(long), PyInt_FromLong); if (!__pyx_t_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 376; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4401 __Pyx_GOTREF(__pyx_t_5);
4402 __Pyx_DECREF(__pyx_v_n);
4403 __pyx_v_n = __pyx_t_3;
4405 __Pyx_DECREF(__pyx_v_v);
4406 __pyx_v_v = __pyx_t_5;
4409 /* "TabProxies.pyx":377
4412 * if len(d) > 2: v = d[1:] # <<<<<<<<<<<<<<
4414 * if v[0] == '"' and v[-1] == '"':
4416 if (unlikely(__pyx_v_d == Py_None)) {
4417 PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 377; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4419 __pyx_t_6 = PyList_GET_SIZE(((PyObject *)__pyx_v_d));
4420 __pyx_t_8 = (__pyx_t_6 > 2);
4422 __pyx_t_5 = __Pyx_PySequence_GetSlice(((PyObject *)__pyx_v_d), 1, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 377; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4423 __Pyx_GOTREF(((PyObject *)__pyx_t_5));
4424 __Pyx_DECREF(__pyx_v_v);
4425 __pyx_v_v = ((PyObject *)__pyx_t_5);
4431 /* "TabProxies.pyx":379
4432 * if len(d) > 2: v = d[1:]
4434 * if v[0] == '"' and v[-1] == '"': # <<<<<<<<<<<<<<
4438 __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_v, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_5) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 379; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4439 __Pyx_GOTREF(__pyx_t_5);
4440 __pyx_t_3 = PyObject_RichCompare(__pyx_t_5, ((PyObject *)__pyx_kp_s_22), Py_EQ); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 379; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4441 __Pyx_GOTREF(__pyx_t_3);
4442 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
4443 __pyx_t_8 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_8 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 379; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4444 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4446 __pyx_t_3 = __Pyx_GetItemInt(__pyx_v_v, -1, sizeof(long), PyInt_FromLong); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 379; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4447 __Pyx_GOTREF(__pyx_t_3);
4448 __pyx_t_5 = PyObject_RichCompare(__pyx_t_3, ((PyObject *)__pyx_kp_s_22), Py_EQ); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 379; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4449 __Pyx_GOTREF(__pyx_t_5);
4450 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4451 __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 379; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4452 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
4453 __pyx_t_10 = __pyx_t_9;
4455 __pyx_t_10 = __pyx_t_8;
4459 /* "TabProxies.pyx":380
4461 * if v[0] == '"' and v[-1] == '"':
4462 * v = v[1:-1] # <<<<<<<<<<<<<<
4464 * ## try to convert to a value
4466 __pyx_t_5 = __Pyx_PySequence_GetSlice(__pyx_v_v, 1, -1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 380; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4467 __Pyx_GOTREF(__pyx_t_5);
4468 __Pyx_DECREF(__pyx_v_v);
4469 __pyx_v_v = __pyx_t_5;
4475 /* "TabProxies.pyx":383
4477 * ## try to convert to a value
4478 * try: # <<<<<<<<<<<<<<
4483 PyObject *__pyx_save_exc_type, *__pyx_save_exc_value, *__pyx_save_exc_tb;
4484 __Pyx_ExceptionSave(&__pyx_save_exc_type, &__pyx_save_exc_value, &__pyx_save_exc_tb);
4485 __Pyx_XGOTREF(__pyx_save_exc_type);
4486 __Pyx_XGOTREF(__pyx_save_exc_value);
4487 __Pyx_XGOTREF(__pyx_save_exc_tb);
4490 /* "TabProxies.pyx":384
4491 * ## try to convert to a value
4493 * v = float( v ) # <<<<<<<<<<<<<<
4495 * except ValueError:
4497 __pyx_t_11 = __Pyx_PyObject_AsDouble(__pyx_v_v); if (unlikely(__pyx_t_11 == ((double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 384; __pyx_clineno = __LINE__; goto __pyx_L13_error;}
4498 __pyx_t_5 = PyFloat_FromDouble(__pyx_t_11); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 384; __pyx_clineno = __LINE__; goto __pyx_L13_error;}
4499 __Pyx_GOTREF(__pyx_t_5);
4500 __Pyx_DECREF(__pyx_v_v);
4501 __pyx_v_v = __pyx_t_5;
4504 /* "TabProxies.pyx":385
4507 * v = int( v ) # <<<<<<<<<<<<<<
4508 * except ValueError:
4511 __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 385; __pyx_clineno = __LINE__; goto __pyx_L13_error;}
4512 __Pyx_GOTREF(((PyObject *)__pyx_t_5));
4513 __Pyx_INCREF(__pyx_v_v);
4514 PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_v);
4515 __Pyx_GIVEREF(__pyx_v_v);
4516 __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 385; __pyx_clineno = __LINE__; goto __pyx_L13_error;}
4517 __Pyx_GOTREF(__pyx_t_3);
4518 __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
4519 __Pyx_DECREF(__pyx_v_v);
4520 __pyx_v_v = __pyx_t_3;
4523 __Pyx_XDECREF(__pyx_save_exc_type); __pyx_save_exc_type = 0;
4524 __Pyx_XDECREF(__pyx_save_exc_value); __pyx_save_exc_value = 0;
4525 __Pyx_XDECREF(__pyx_save_exc_tb); __pyx_save_exc_tb = 0;
4526 goto __pyx_L20_try_end;
4528 __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
4529 __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
4530 __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
4531 __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
4533 /* "TabProxies.pyx":386
4536 * except ValueError: # <<<<<<<<<<<<<<
4540 __pyx_t_12 = PyErr_ExceptionMatches(__pyx_builtin_ValueError);
4542 PyErr_Restore(0,0,0);
4543 goto __pyx_L14_exception_handled;
4546 /* "TabProxies.pyx":388
4547 * except ValueError:
4549 * except TypeError: # <<<<<<<<<<<<<<
4553 __pyx_t_12 = PyErr_ExceptionMatches(__pyx_builtin_TypeError);
4555 PyErr_Restore(0,0,0);
4556 goto __pyx_L14_exception_handled;
4558 __Pyx_XGIVEREF(__pyx_save_exc_type);
4559 __Pyx_XGIVEREF(__pyx_save_exc_value);
4560 __Pyx_XGIVEREF(__pyx_save_exc_tb);
4561 __Pyx_ExceptionReset(__pyx_save_exc_type, __pyx_save_exc_value, __pyx_save_exc_tb);
4562 goto __pyx_L1_error;
4563 __pyx_L14_exception_handled:;
4564 __Pyx_XGIVEREF(__pyx_save_exc_type);
4565 __Pyx_XGIVEREF(__pyx_save_exc_value);
4566 __Pyx_XGIVEREF(__pyx_save_exc_tb);
4567 __Pyx_ExceptionReset(__pyx_save_exc_type, __pyx_save_exc_value, __pyx_save_exc_tb);
4573 /* "TabProxies.pyx":391
4576 * result[n] = v # <<<<<<<<<<<<<<
4580 if (PyDict_SetItem(((PyObject *)__pyx_v_result), __pyx_v_n, __pyx_v_v) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 391; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4582 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4584 /* "TabProxies.pyx":393
4587 * return result # <<<<<<<<<<<<<<
4589 * def fromDict( self, d ):
4591 __Pyx_XDECREF(__pyx_r);
4592 __Pyx_INCREF(((PyObject *)__pyx_v_result));
4593 __pyx_r = ((PyObject *)__pyx_v_result);
4596 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
4599 __Pyx_XDECREF(__pyx_t_1);
4600 __Pyx_XDECREF(__pyx_t_3);
4601 __Pyx_XDECREF(__pyx_t_4);
4602 __Pyx_XDECREF(__pyx_t_5);
4603 __Pyx_XDECREF(__pyx_t_7);
4604 __Pyx_AddTraceback("TabProxies.GTFProxy.asDict");
4607 __Pyx_DECREF(__pyx_v_fields);
4608 __Pyx_DECREF(__pyx_v_result);
4609 __Pyx_DECREF(__pyx_v_f);
4610 __Pyx_DECREF(__pyx_v_d);
4611 __Pyx_DECREF(__pyx_v_n);
4612 __Pyx_DECREF(__pyx_v_v);
4613 __Pyx_DECREF(__pyx_v_x);
4614 __Pyx_XGIVEREF(__pyx_r);
4615 __Pyx_RefNannyFinishContext();
4619 /* "TabProxies.pyx":395
4622 * def fromDict( self, d ): # <<<<<<<<<<<<<<
4623 * '''set attributes from a dictionary.'''
4627 static PyObject *__pyx_pf_10TabProxies_8GTFProxy_3fromDict(PyObject *__pyx_v_self, PyObject *__pyx_v_d); /*proto*/
4628 static char __pyx_doc_10TabProxies_8GTFProxy_3fromDict[] = "set attributes from a dictionary.";
4629 static PyObject *__pyx_pf_10TabProxies_8GTFProxy_3fromDict(PyObject *__pyx_v_self, PyObject *__pyx_v_d) {
4632 PyObject *__pyx_v_aa;
4633 PyObject *__pyx_v_k;
4634 PyObject *__pyx_v_v;
4635 PyObject *__pyx_v_a;
4636 PyObject *__pyx_r = NULL;
4637 PyObject *__pyx_t_1 = NULL;
4638 Py_ssize_t __pyx_t_2;
4639 PyObject *__pyx_t_3 = NULL;
4640 PyObject *__pyx_t_4 = NULL;
4641 PyObject *__pyx_t_5 = NULL;
4642 PyObject *__pyx_t_6 = NULL;
4646 __Pyx_RefNannySetupContext("fromDict");
4647 __pyx_v_aa = ((PyObject*)Py_None); __Pyx_INCREF(Py_None);
4648 __pyx_v_k = Py_None; __Pyx_INCREF(Py_None);
4649 __pyx_v_v = Py_None; __Pyx_INCREF(Py_None);
4650 __pyx_v_a = Py_None; __Pyx_INCREF(Py_None);
4652 /* "TabProxies.pyx":401
4654 * # clean up if this field is set twice
4655 * if self.hasOwnAttributes: # <<<<<<<<<<<<<<
4656 * free(self.attributes)
4659 if (((struct __pyx_obj_10TabProxies_GTFProxy *)__pyx_v_self)->hasOwnAttributes) {
4661 /* "TabProxies.pyx":402
4662 * # clean up if this field is set twice
4663 * if self.hasOwnAttributes:
4664 * free(self.attributes) # <<<<<<<<<<<<<<
4668 free(((struct __pyx_obj_10TabProxies_GTFProxy *)__pyx_v_self)->attributes);
4673 /* "TabProxies.pyx":404
4674 * free(self.attributes)
4676 * aa = [] # <<<<<<<<<<<<<<
4677 * for k,v in d.items():
4678 * if type(v) == types.StringType:
4680 __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 404; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4681 __Pyx_GOTREF(((PyObject *)__pyx_t_1));
4682 __Pyx_DECREF(((PyObject *)__pyx_v_aa));
4683 __pyx_v_aa = __pyx_t_1;
4686 /* "TabProxies.pyx":405
4689 * for k,v in d.items(): # <<<<<<<<<<<<<<
4690 * if type(v) == types.StringType:
4691 * aa.append( '%s "%s"' % (k,v) )
4693 __pyx_t_1 = PyObject_GetAttr(__pyx_v_d, __pyx_n_s__items); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 405; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4694 __Pyx_GOTREF(__pyx_t_1);
4695 __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 405; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4696 __Pyx_GOTREF(__pyx_t_3);
4697 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4698 if (PyList_CheckExact(__pyx_t_3) || PyTuple_CheckExact(__pyx_t_3)) {
4699 __pyx_t_2 = 0; __pyx_t_1 = __pyx_t_3; __Pyx_INCREF(__pyx_t_1);
4701 __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 405; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4702 __Pyx_GOTREF(__pyx_t_1);
4704 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4706 if (likely(PyList_CheckExact(__pyx_t_1))) {
4707 if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
4708 __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++;
4709 } else if (likely(PyTuple_CheckExact(__pyx_t_1))) {
4710 if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
4711 __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++;
4713 __pyx_t_3 = PyIter_Next(__pyx_t_1);
4715 if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 405; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4718 __Pyx_GOTREF(__pyx_t_3);
4720 if (PyTuple_CheckExact(__pyx_t_3) && likely(PyTuple_GET_SIZE(__pyx_t_3) == 2)) {
4721 PyObject* tuple = __pyx_t_3;
4722 __pyx_t_4 = PyTuple_GET_ITEM(tuple, 0); __Pyx_INCREF(__pyx_t_4);
4723 __pyx_t_5 = PyTuple_GET_ITEM(tuple, 1); __Pyx_INCREF(__pyx_t_5);
4724 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4725 __Pyx_DECREF(__pyx_v_k);
4726 __pyx_v_k = __pyx_t_4;
4728 __Pyx_DECREF(__pyx_v_v);
4729 __pyx_v_v = __pyx_t_5;
4732 __pyx_t_6 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 405; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4733 __Pyx_GOTREF(__pyx_t_6);
4734 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4735 __pyx_t_4 = __Pyx_UnpackItem(__pyx_t_6, 0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 405; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4736 __Pyx_GOTREF(__pyx_t_4);
4737 __pyx_t_5 = __Pyx_UnpackItem(__pyx_t_6, 1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 405; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4738 __Pyx_GOTREF(__pyx_t_5);
4739 if (__Pyx_EndUnpack(__pyx_t_6, 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 405; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4740 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
4741 __Pyx_DECREF(__pyx_v_k);
4742 __pyx_v_k = __pyx_t_4;
4744 __Pyx_DECREF(__pyx_v_v);
4745 __pyx_v_v = __pyx_t_5;
4749 /* "TabProxies.pyx":406
4751 * for k,v in d.items():
4752 * if type(v) == types.StringType: # <<<<<<<<<<<<<<
4753 * aa.append( '%s "%s"' % (k,v) )
4756 __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__types); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 406; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4757 __Pyx_GOTREF(__pyx_t_3);
4758 __pyx_t_5 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__StringType); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 406; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4759 __Pyx_GOTREF(__pyx_t_5);
4760 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4761 __pyx_t_3 = PyObject_RichCompare(((PyObject *)Py_TYPE(__pyx_v_v)), __pyx_t_5, Py_EQ); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 406; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4762 __Pyx_GOTREF(__pyx_t_3);
4763 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
4764 __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 406; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4765 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4768 /* "TabProxies.pyx":407
4769 * for k,v in d.items():
4770 * if type(v) == types.StringType:
4771 * aa.append( '%s "%s"' % (k,v) ) # <<<<<<<<<<<<<<
4773 * aa.append( '%s %s' % (k,str(v)) )
4775 if (unlikely(__pyx_v_aa == Py_None)) {
4776 PyErr_SetString(PyExc_AttributeError, "'NoneType' object has no attribute 'append'"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 407; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4778 __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 407; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4779 __Pyx_GOTREF(((PyObject *)__pyx_t_3));
4780 __Pyx_INCREF(__pyx_v_k);
4781 PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_k);
4782 __Pyx_GIVEREF(__pyx_v_k);
4783 __Pyx_INCREF(__pyx_v_v);
4784 PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_v);
4785 __Pyx_GIVEREF(__pyx_v_v);
4786 __pyx_t_5 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_23), ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 407; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4787 __Pyx_GOTREF(((PyObject *)__pyx_t_5));
4788 __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
4789 __pyx_t_8 = PyList_Append(__pyx_v_aa, ((PyObject *)__pyx_t_5)); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 407; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4790 __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
4795 /* "TabProxies.pyx":409
4796 * aa.append( '%s "%s"' % (k,v) )
4798 * aa.append( '%s %s' % (k,str(v)) ) # <<<<<<<<<<<<<<
4800 * a = "; ".join( aa ) + ";"
4802 if (unlikely(__pyx_v_aa == Py_None)) {
4803 PyErr_SetString(PyExc_AttributeError, "'NoneType' object has no attribute 'append'"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 409; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4805 __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 409; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4806 __Pyx_GOTREF(((PyObject *)__pyx_t_5));
4807 __Pyx_INCREF(__pyx_v_v);
4808 PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_v);
4809 __Pyx_GIVEREF(__pyx_v_v);
4810 __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 409; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4811 __Pyx_GOTREF(__pyx_t_3);
4812 __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
4813 __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 409; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4814 __Pyx_GOTREF(((PyObject *)__pyx_t_5));
4815 __Pyx_INCREF(__pyx_v_k);
4816 PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_k);
4817 __Pyx_GIVEREF(__pyx_v_k);
4818 PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_3);
4819 __Pyx_GIVEREF(__pyx_t_3);
4821 __pyx_t_3 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_24), ((PyObject *)__pyx_t_5)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 409; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4822 __Pyx_GOTREF(((PyObject *)__pyx_t_3));
4823 __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
4824 __pyx_t_8 = PyList_Append(__pyx_v_aa, ((PyObject *)__pyx_t_3)); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 409; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4825 __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
4829 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4831 /* "TabProxies.pyx":411
4832 * aa.append( '%s %s' % (k,str(v)) )
4834 * a = "; ".join( aa ) + ";" # <<<<<<<<<<<<<<
4838 __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_kp_s_25), __pyx_n_s__join); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 411; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4839 __Pyx_GOTREF(__pyx_t_1);
4840 __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 411; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4841 __Pyx_GOTREF(((PyObject *)__pyx_t_3));
4842 __Pyx_INCREF(((PyObject *)__pyx_v_aa));
4843 PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_aa));
4844 __Pyx_GIVEREF(((PyObject *)__pyx_v_aa));
4845 __pyx_t_5 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 411; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4846 __Pyx_GOTREF(__pyx_t_5);
4847 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
4848 __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
4849 __pyx_t_3 = PyNumber_Add(__pyx_t_5, ((PyObject *)__pyx_kp_s_18)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 411; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4850 __Pyx_GOTREF(__pyx_t_3);
4851 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
4852 __Pyx_DECREF(__pyx_v_a);
4853 __pyx_v_a = __pyx_t_3;
4856 /* "TabProxies.pyx":412
4858 * a = "; ".join( aa ) + ";"
4859 * p = a # <<<<<<<<<<<<<<
4861 * self.attributes = <char *>calloc( l + 1, sizeof(char) )
4863 __pyx_t_9 = PyBytes_AsString(__pyx_v_a); if (unlikely((!__pyx_t_9) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 412; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4864 __pyx_v_p = __pyx_t_9;
4866 /* "TabProxies.pyx":413
4867 * a = "; ".join( aa ) + ";"
4869 * l = len(a) # <<<<<<<<<<<<<<
4870 * self.attributes = <char *>calloc( l + 1, sizeof(char) )
4871 * if self.attributes == NULL:
4873 __pyx_t_2 = PyObject_Length(__pyx_v_a); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 413; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4874 __pyx_v_l = __pyx_t_2;
4876 /* "TabProxies.pyx":414
4879 * self.attributes = <char *>calloc( l + 1, sizeof(char) ) # <<<<<<<<<<<<<<
4880 * if self.attributes == NULL:
4881 * raise ValueError("out of memory" )
4883 ((struct __pyx_obj_10TabProxies_GTFProxy *)__pyx_v_self)->attributes = ((char *)calloc((__pyx_v_l + 1), (sizeof(char))));
4885 /* "TabProxies.pyx":415
4887 * self.attributes = <char *>calloc( l + 1, sizeof(char) )
4888 * if self.attributes == NULL: # <<<<<<<<<<<<<<
4889 * raise ValueError("out of memory" )
4890 * memcpy( self.attributes, p, l )
4892 __pyx_t_7 = (((struct __pyx_obj_10TabProxies_GTFProxy *)__pyx_v_self)->attributes == NULL);
4895 /* "TabProxies.pyx":416
4896 * self.attributes = <char *>calloc( l + 1, sizeof(char) )
4897 * if self.attributes == NULL:
4898 * raise ValueError("out of memory" ) # <<<<<<<<<<<<<<
4899 * memcpy( self.attributes, p, l )
4902 __pyx_t_3 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_26), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 416; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4903 __Pyx_GOTREF(__pyx_t_3);
4904 __Pyx_Raise(__pyx_t_3, 0, 0);
4905 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
4906 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 416; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
4911 /* "TabProxies.pyx":417
4912 * if self.attributes == NULL:
4913 * raise ValueError("out of memory" )
4914 * memcpy( self.attributes, p, l ) # <<<<<<<<<<<<<<
4916 * self.hasOwnAttributes = True
4918 memcpy(((struct __pyx_obj_10TabProxies_GTFProxy *)__pyx_v_self)->attributes, __pyx_v_p, __pyx_v_l);
4920 /* "TabProxies.pyx":419
4921 * memcpy( self.attributes, p, l )
4923 * self.hasOwnAttributes = True # <<<<<<<<<<<<<<
4924 * self.is_modified = True
4927 ((struct __pyx_obj_10TabProxies_GTFProxy *)__pyx_v_self)->hasOwnAttributes = 1;
4929 /* "TabProxies.pyx":420
4931 * self.hasOwnAttributes = True
4932 * self.is_modified = True # <<<<<<<<<<<<<<
4934 * def __str__(self):
4936 ((struct __pyx_obj_10TabProxies_GTFProxy *)__pyx_v_self)->__pyx_base.is_modified = 1;
4938 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
4941 __Pyx_XDECREF(__pyx_t_1);
4942 __Pyx_XDECREF(__pyx_t_3);
4943 __Pyx_XDECREF(__pyx_t_4);
4944 __Pyx_XDECREF(__pyx_t_5);
4945 __Pyx_XDECREF(__pyx_t_6);
4946 __Pyx_AddTraceback("TabProxies.GTFProxy.fromDict");
4949 __Pyx_DECREF(__pyx_v_aa);
4950 __Pyx_DECREF(__pyx_v_k);
4951 __Pyx_DECREF(__pyx_v_v);
4952 __Pyx_DECREF(__pyx_v_a);
4953 __Pyx_XGIVEREF(__pyx_r);
4954 __Pyx_RefNannyFinishContext();
4958 /* "TabProxies.pyx":422
4959 * self.is_modified = True
4961 * def __str__(self): # <<<<<<<<<<<<<<
4966 static PyObject *__pyx_pf_10TabProxies_8GTFProxy_4__str__(PyObject *__pyx_v_self); /*proto*/
4967 static PyObject *__pyx_pf_10TabProxies_8GTFProxy_4__str__(PyObject *__pyx_v_self) {
4968 PyObject *__pyx_r = NULL;
4969 PyObject *__pyx_t_1 = NULL;
4970 PyObject *__pyx_t_2 = NULL;
4971 PyObject *__pyx_t_3 = NULL;
4972 PyObject *__pyx_t_4 = NULL;
4973 PyObject *__pyx_t_5 = NULL;
4974 PyObject *__pyx_t_6 = NULL;
4975 PyObject *__pyx_t_7 = NULL;
4976 PyObject *__pyx_t_8 = NULL;
4977 PyObject *__pyx_t_9 = NULL;
4978 PyObject *__pyx_t_10 = NULL;
4979 PyObject *__pyx_t_11 = NULL;
4980 __Pyx_RefNannySetupContext("__str__");
4982 /* "TabProxies.pyx":426
4985 * if self.is_modified: # <<<<<<<<<<<<<<
4989 if (((struct __pyx_obj_10TabProxies_GTFProxy *)__pyx_v_self)->__pyx_base.is_modified) {
4991 /* "TabProxies.pyx":427
4993 * if self.is_modified:
4994 * return "\t".join( # <<<<<<<<<<<<<<
4998 __Pyx_XDECREF(__pyx_r);
4999 __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_kp_s_14), __pyx_n_s__join); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 427; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5000 __Pyx_GOTREF(__pyx_t_1);
5002 /* "TabProxies.pyx":428
5003 * if self.is_modified:
5005 * (self.contig, # <<<<<<<<<<<<<<
5009 __pyx_t_2 = PyBytes_FromString(((struct __pyx_obj_10TabProxies_GTFProxy *)__pyx_v_self)->contig); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 428; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5010 __Pyx_GOTREF(((PyObject *)__pyx_t_2));
5012 /* "TabProxies.pyx":429
5015 * self.source, # <<<<<<<<<<<<<<
5017 * str(self.start+1),
5019 __pyx_t_3 = PyBytes_FromString(((struct __pyx_obj_10TabProxies_GTFProxy *)__pyx_v_self)->source); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 429; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5020 __Pyx_GOTREF(((PyObject *)__pyx_t_3));
5022 /* "TabProxies.pyx":430
5025 * self.feature, # <<<<<<<<<<<<<<
5026 * str(self.start+1),
5029 __pyx_t_4 = PyBytes_FromString(((struct __pyx_obj_10TabProxies_GTFProxy *)__pyx_v_self)->feature); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 430; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5030 __Pyx_GOTREF(((PyObject *)__pyx_t_4));
5032 /* "TabProxies.pyx":431
5035 * str(self.start+1), # <<<<<<<<<<<<<<
5037 * toDot(self.score),
5039 __pyx_t_5 = PyInt_FromLong((((struct __pyx_obj_10TabProxies_GTFProxy *)__pyx_v_self)->start + 1)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 431; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5040 __Pyx_GOTREF(__pyx_t_5);
5041 __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 431; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5042 __Pyx_GOTREF(((PyObject *)__pyx_t_6));
5043 PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5);
5044 __Pyx_GIVEREF(__pyx_t_5);
5046 __pyx_t_5 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 431; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5047 __Pyx_GOTREF(__pyx_t_5);
5048 __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
5050 /* "TabProxies.pyx":432
5052 * str(self.start+1),
5053 * str(self.end), # <<<<<<<<<<<<<<
5054 * toDot(self.score),
5057 __pyx_t_6 = __Pyx_PyInt_to_py_uint32_t(((struct __pyx_obj_10TabProxies_GTFProxy *)__pyx_v_self)->end); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 432; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5058 __Pyx_GOTREF(__pyx_t_6);
5059 __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 432; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5060 __Pyx_GOTREF(((PyObject *)__pyx_t_7));
5061 PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_6);
5062 __Pyx_GIVEREF(__pyx_t_6);
5064 __pyx_t_6 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 432; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5065 __Pyx_GOTREF(__pyx_t_6);
5066 __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0;
5068 /* "TabProxies.pyx":433
5069 * str(self.start+1),
5071 * toDot(self.score), # <<<<<<<<<<<<<<
5075 __pyx_t_7 = __Pyx_GetName(__pyx_m, __pyx_n_s__toDot); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 433; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5076 __Pyx_GOTREF(__pyx_t_7);
5077 __pyx_t_8 = PyBytes_FromString(((struct __pyx_obj_10TabProxies_GTFProxy *)__pyx_v_self)->score); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 433; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5078 __Pyx_GOTREF(((PyObject *)__pyx_t_8));
5079 __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 433; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5080 __Pyx_GOTREF(((PyObject *)__pyx_t_9));
5081 PyTuple_SET_ITEM(__pyx_t_9, 0, ((PyObject *)__pyx_t_8));
5082 __Pyx_GIVEREF(((PyObject *)__pyx_t_8));
5084 __pyx_t_8 = PyObject_Call(__pyx_t_7, ((PyObject *)__pyx_t_9), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 433; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5085 __Pyx_GOTREF(__pyx_t_8);
5086 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
5087 __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0;
5089 /* "TabProxies.pyx":434
5091 * toDot(self.score),
5092 * self.strand, # <<<<<<<<<<<<<<
5094 * self.attributes ) )
5096 __pyx_t_9 = PyBytes_FromString(((struct __pyx_obj_10TabProxies_GTFProxy *)__pyx_v_self)->strand); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 434; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5097 __Pyx_GOTREF(((PyObject *)__pyx_t_9));
5099 /* "TabProxies.pyx":435
5100 * toDot(self.score),
5102 * self.frame, # <<<<<<<<<<<<<<
5103 * self.attributes ) )
5106 __pyx_t_7 = PyBytes_FromString(((struct __pyx_obj_10TabProxies_GTFProxy *)__pyx_v_self)->frame); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 435; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5107 __Pyx_GOTREF(((PyObject *)__pyx_t_7));
5109 /* "TabProxies.pyx":436
5112 * self.attributes ) ) # <<<<<<<<<<<<<<
5114 * return TupleProxy.__str__(self)
5116 __pyx_t_10 = PyBytes_FromString(((struct __pyx_obj_10TabProxies_GTFProxy *)__pyx_v_self)->attributes); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 436; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5117 __Pyx_GOTREF(((PyObject *)__pyx_t_10));
5118 __pyx_t_11 = PyTuple_New(9); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 428; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5119 __Pyx_GOTREF(((PyObject *)__pyx_t_11));
5120 PyTuple_SET_ITEM(__pyx_t_11, 0, ((PyObject *)__pyx_t_2));
5121 __Pyx_GIVEREF(((PyObject *)__pyx_t_2));
5122 PyTuple_SET_ITEM(__pyx_t_11, 1, ((PyObject *)__pyx_t_3));
5123 __Pyx_GIVEREF(((PyObject *)__pyx_t_3));
5124 PyTuple_SET_ITEM(__pyx_t_11, 2, ((PyObject *)__pyx_t_4));
5125 __Pyx_GIVEREF(((PyObject *)__pyx_t_4));
5126 PyTuple_SET_ITEM(__pyx_t_11, 3, __pyx_t_5);
5127 __Pyx_GIVEREF(__pyx_t_5);
5128 PyTuple_SET_ITEM(__pyx_t_11, 4, __pyx_t_6);
5129 __Pyx_GIVEREF(__pyx_t_6);
5130 PyTuple_SET_ITEM(__pyx_t_11, 5, __pyx_t_8);
5131 __Pyx_GIVEREF(__pyx_t_8);
5132 PyTuple_SET_ITEM(__pyx_t_11, 6, ((PyObject *)__pyx_t_9));
5133 __Pyx_GIVEREF(((PyObject *)__pyx_t_9));
5134 PyTuple_SET_ITEM(__pyx_t_11, 7, ((PyObject *)__pyx_t_7));
5135 __Pyx_GIVEREF(((PyObject *)__pyx_t_7));
5136 PyTuple_SET_ITEM(__pyx_t_11, 8, ((PyObject *)__pyx_t_10));
5137 __Pyx_GIVEREF(((PyObject *)__pyx_t_10));
5147 __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 427; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5148 __Pyx_GOTREF(((PyObject *)__pyx_t_10));
5149 PyTuple_SET_ITEM(__pyx_t_10, 0, ((PyObject *)__pyx_t_11));
5150 __Pyx_GIVEREF(((PyObject *)__pyx_t_11));
5152 __pyx_t_11 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_10), NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 427; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5153 __Pyx_GOTREF(__pyx_t_11);
5154 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5155 __Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0;
5156 __pyx_r = __pyx_t_11;
5163 /* "TabProxies.pyx":438
5164 * self.attributes ) )
5166 * return TupleProxy.__str__(self) # <<<<<<<<<<<<<<
5168 * def invert( self, int lcontig ):
5170 __Pyx_XDECREF(__pyx_r);
5171 __pyx_t_11 = PyObject_GetAttr(((PyObject *)((PyObject*)__pyx_ptype_10TabProxies_TupleProxy)), __pyx_n_s____str__); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 438; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5172 __Pyx_GOTREF(__pyx_t_11);
5173 __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 438; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5174 __Pyx_GOTREF(((PyObject *)__pyx_t_10));
5175 __Pyx_INCREF(__pyx_v_self);
5176 PyTuple_SET_ITEM(__pyx_t_10, 0, __pyx_v_self);
5177 __Pyx_GIVEREF(__pyx_v_self);
5178 __pyx_t_1 = PyObject_Call(__pyx_t_11, ((PyObject *)__pyx_t_10), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 438; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5179 __Pyx_GOTREF(__pyx_t_1);
5180 __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
5181 __Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0;
5182 __pyx_r = __pyx_t_1;
5188 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
5191 __Pyx_XDECREF(__pyx_t_1);
5192 __Pyx_XDECREF(__pyx_t_2);
5193 __Pyx_XDECREF(__pyx_t_3);
5194 __Pyx_XDECREF(__pyx_t_4);
5195 __Pyx_XDECREF(__pyx_t_5);
5196 __Pyx_XDECREF(__pyx_t_6);
5197 __Pyx_XDECREF(__pyx_t_7);
5198 __Pyx_XDECREF(__pyx_t_8);
5199 __Pyx_XDECREF(__pyx_t_9);
5200 __Pyx_XDECREF(__pyx_t_10);
5201 __Pyx_XDECREF(__pyx_t_11);
5202 __Pyx_AddTraceback("TabProxies.GTFProxy.__str__");
5205 __Pyx_XGIVEREF(__pyx_r);
5206 __Pyx_RefNannyFinishContext();
5210 /* "TabProxies.pyx":440
5211 * return TupleProxy.__str__(self)
5213 * def invert( self, int lcontig ): # <<<<<<<<<<<<<<
5214 * '''invert coordinates to negative strand coordinates
5218 static PyObject *__pyx_pf_10TabProxies_8GTFProxy_5invert(PyObject *__pyx_v_self, PyObject *__pyx_arg_lcontig); /*proto*/
5219 static char __pyx_doc_10TabProxies_8GTFProxy_5invert[] = "invert coordinates to negative strand coordinates\n \n This method will only act if the feature is on the\n negative strand.";
5220 static PyObject *__pyx_pf_10TabProxies_8GTFProxy_5invert(PyObject *__pyx_v_self, PyObject *__pyx_arg_lcontig) {
5221 int __pyx_v_lcontig;
5222 PyObject *__pyx_v_start;
5223 PyObject *__pyx_v_end;
5224 PyObject *__pyx_r = NULL;
5229 PyObject *__pyx_t_5 = NULL;
5230 PyObject *__pyx_t_6 = NULL;
5231 __Pyx_RefNannySetupContext("invert");
5232 assert(__pyx_arg_lcontig); {
5233 __pyx_v_lcontig = __Pyx_PyInt_AsInt(__pyx_arg_lcontig); if (unlikely((__pyx_v_lcontig == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 440; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
5235 goto __pyx_L4_argument_unpacking_done;
5237 __Pyx_AddTraceback("TabProxies.GTFProxy.invert");
5238 __Pyx_RefNannyFinishContext();
5240 __pyx_L4_argument_unpacking_done:;
5241 __pyx_v_start = Py_None; __Pyx_INCREF(Py_None);
5242 __pyx_v_end = Py_None; __Pyx_INCREF(Py_None);
5244 /* "TabProxies.pyx":446
5245 * negative strand.'''
5247 * if self.strand[0] == '-': # <<<<<<<<<<<<<<
5248 * start = min(self.start, self.end)
5249 * end = max(self.start, self.end)
5251 __pyx_t_1 = ((((struct __pyx_obj_10TabProxies_GTFProxy *)__pyx_v_self)->strand[0]) == '-');
5254 /* "TabProxies.pyx":447
5256 * if self.strand[0] == '-':
5257 * start = min(self.start, self.end) # <<<<<<<<<<<<<<
5258 * end = max(self.start, self.end)
5259 * self.start, self.end = lcontig - end, lcontig - start
5261 __pyx_t_2 = ((struct __pyx_obj_10TabProxies_GTFProxy *)__pyx_v_self)->end;
5262 __pyx_t_3 = ((struct __pyx_obj_10TabProxies_GTFProxy *)__pyx_v_self)->start;
5263 if ((__pyx_t_2 < __pyx_t_3)) {
5264 __pyx_t_4 = __pyx_t_2;
5266 __pyx_t_4 = __pyx_t_3;
5268 __pyx_t_5 = __Pyx_PyInt_to_py_uint32_t(__pyx_t_4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 447; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5269 __Pyx_GOTREF(__pyx_t_5);
5270 __Pyx_DECREF(__pyx_v_start);
5271 __pyx_v_start = __pyx_t_5;
5274 /* "TabProxies.pyx":448
5275 * if self.strand[0] == '-':
5276 * start = min(self.start, self.end)
5277 * end = max(self.start, self.end) # <<<<<<<<<<<<<<
5278 * self.start, self.end = lcontig - end, lcontig - start
5281 __pyx_t_4 = ((struct __pyx_obj_10TabProxies_GTFProxy *)__pyx_v_self)->end;
5282 __pyx_t_2 = ((struct __pyx_obj_10TabProxies_GTFProxy *)__pyx_v_self)->start;
5283 if ((__pyx_t_4 > __pyx_t_2)) {
5284 __pyx_t_3 = __pyx_t_4;
5286 __pyx_t_3 = __pyx_t_2;
5288 __pyx_t_5 = __Pyx_PyInt_to_py_uint32_t(__pyx_t_3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 448; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5289 __Pyx_GOTREF(__pyx_t_5);
5290 __Pyx_DECREF(__pyx_v_end);
5291 __pyx_v_end = __pyx_t_5;
5294 /* "TabProxies.pyx":449
5295 * start = min(self.start, self.end)
5296 * end = max(self.start, self.end)
5297 * self.start, self.end = lcontig - end, lcontig - start # <<<<<<<<<<<<<<
5301 __pyx_t_5 = PyInt_FromLong(__pyx_v_lcontig); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 449; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5302 __Pyx_GOTREF(__pyx_t_5);
5303 __pyx_t_6 = PyNumber_Subtract(__pyx_t_5, __pyx_v_end); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 449; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5304 __Pyx_GOTREF(__pyx_t_6);
5305 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
5306 __pyx_t_3 = __Pyx_PyInt_from_py_uint32_t(__pyx_t_6); if (unlikely((__pyx_t_3 == (uint32_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 449; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5307 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
5308 __pyx_t_6 = PyInt_FromLong(__pyx_v_lcontig); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 449; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5309 __Pyx_GOTREF(__pyx_t_6);
5310 __pyx_t_5 = PyNumber_Subtract(__pyx_t_6, __pyx_v_start); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 449; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5311 __Pyx_GOTREF(__pyx_t_5);
5312 __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
5313 __pyx_t_4 = __Pyx_PyInt_from_py_uint32_t(__pyx_t_5); if (unlikely((__pyx_t_4 == (uint32_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 449; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5314 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
5315 ((struct __pyx_obj_10TabProxies_GTFProxy *)__pyx_v_self)->start = __pyx_t_3;
5316 ((struct __pyx_obj_10TabProxies_GTFProxy *)__pyx_v_self)->end = __pyx_t_4;
5321 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
5324 __Pyx_XDECREF(__pyx_t_5);
5325 __Pyx_XDECREF(__pyx_t_6);
5326 __Pyx_AddTraceback("TabProxies.GTFProxy.invert");
5329 __Pyx_DECREF(__pyx_v_start);
5330 __Pyx_DECREF(__pyx_v_end);
5331 __Pyx_XGIVEREF(__pyx_r);
5332 __Pyx_RefNannyFinishContext();
5336 /* "TabProxies.pyx":451
5337 * self.start, self.end = lcontig - end, lcontig - start
5339 * def keys( self ): # <<<<<<<<<<<<<<
5340 * '''return a list of attributes defined in this entry.'''
5341 * r = self.attributes
5344 static PyObject *__pyx_pf_10TabProxies_8GTFProxy_6keys(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
5345 static char __pyx_doc_10TabProxies_8GTFProxy_6keys[] = "return a list of attributes defined in this entry.";
5346 static PyObject *__pyx_pf_10TabProxies_8GTFProxy_6keys(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
5348 PyObject *__pyx_v_x;
5349 PyObject *__pyx_r = NULL;
5350 PyObject *__pyx_t_1 = NULL;
5351 Py_ssize_t __pyx_t_2;
5352 PyObject *__pyx_t_3 = NULL;
5353 PyObject *__pyx_t_4 = NULL;
5354 PyObject *__pyx_t_5 = NULL;
5356 __Pyx_RefNannySetupContext("keys");
5357 __pyx_v_x = Py_None; __Pyx_INCREF(Py_None);
5359 /* "TabProxies.pyx":453
5361 * '''return a list of attributes defined in this entry.'''
5362 * r = self.attributes # <<<<<<<<<<<<<<
5363 * return [ x.strip().split(" ")[0] for x in r.split(";") if x.strip() != '' ]
5366 __pyx_v_r = ((struct __pyx_obj_10TabProxies_GTFProxy *)__pyx_v_self)->attributes;
5368 /* "TabProxies.pyx":454
5369 * '''return a list of attributes defined in this entry.'''
5370 * r = self.attributes
5371 * return [ x.strip().split(" ")[0] for x in r.split(";") if x.strip() != '' ] # <<<<<<<<<<<<<<
5373 * def __getitem__(self, key):
5375 __Pyx_XDECREF(__pyx_r);
5376 __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 454; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5377 __Pyx_GOTREF(((PyObject *)__pyx_t_1));
5378 __pyx_t_3 = PyBytes_FromString(__pyx_v_r); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 454; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5379 __Pyx_GOTREF(((PyObject *)__pyx_t_3));
5380 __pyx_t_4 = PyObject_GetAttr(((PyObject *)__pyx_t_3), __pyx_n_s__split); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 454; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5381 __Pyx_GOTREF(__pyx_t_4);
5382 __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
5383 __pyx_t_3 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_k_tuple_27), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 454; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5384 __Pyx_GOTREF(__pyx_t_3);
5385 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
5386 if (PyList_CheckExact(__pyx_t_3) || PyTuple_CheckExact(__pyx_t_3)) {
5387 __pyx_t_2 = 0; __pyx_t_4 = __pyx_t_3; __Pyx_INCREF(__pyx_t_4);
5389 __pyx_t_2 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 454; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5390 __Pyx_GOTREF(__pyx_t_4);
5392 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
5394 if (likely(PyList_CheckExact(__pyx_t_4))) {
5395 if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_4)) break;
5396 __pyx_t_3 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++;
5397 } else if (likely(PyTuple_CheckExact(__pyx_t_4))) {
5398 if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
5399 __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++;
5401 __pyx_t_3 = PyIter_Next(__pyx_t_4);
5403 if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 454; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5406 __Pyx_GOTREF(__pyx_t_3);
5408 __Pyx_DECREF(__pyx_v_x);
5409 __pyx_v_x = __pyx_t_3;
5411 __pyx_t_3 = PyObject_GetAttr(__pyx_v_x, __pyx_n_s__strip); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 454; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5412 __Pyx_GOTREF(__pyx_t_3);
5413 __pyx_t_5 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 454; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5414 __Pyx_GOTREF(__pyx_t_5);
5415 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
5416 __pyx_t_3 = PyObject_RichCompare(__pyx_t_5, ((PyObject *)__pyx_kp_s_2), Py_NE); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 454; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5417 __Pyx_GOTREF(__pyx_t_3);
5418 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
5419 __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 454; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5420 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
5422 __pyx_t_3 = PyObject_GetAttr(__pyx_v_x, __pyx_n_s__strip); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 454; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5423 __Pyx_GOTREF(__pyx_t_3);
5424 __pyx_t_5 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 454; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5425 __Pyx_GOTREF(__pyx_t_5);
5426 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
5427 __pyx_t_3 = PyObject_GetAttr(__pyx_t_5, __pyx_n_s__split); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 454; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5428 __Pyx_GOTREF(__pyx_t_3);
5429 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
5430 __pyx_t_5 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_k_tuple_28), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 454; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5431 __Pyx_GOTREF(__pyx_t_5);
5432 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
5433 __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_5, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 454; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5434 __Pyx_GOTREF(__pyx_t_3);
5435 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
5436 if (unlikely(PyList_Append(__pyx_t_1, (PyObject*)__pyx_t_3))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 454; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5437 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
5442 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
5443 __Pyx_INCREF(((PyObject *)__pyx_t_1));
5444 __pyx_r = ((PyObject *)__pyx_t_1);
5445 __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
5448 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
5451 __Pyx_XDECREF(__pyx_t_1);
5452 __Pyx_XDECREF(__pyx_t_3);
5453 __Pyx_XDECREF(__pyx_t_4);
5454 __Pyx_XDECREF(__pyx_t_5);
5455 __Pyx_AddTraceback("TabProxies.GTFProxy.keys");
5458 __Pyx_DECREF(__pyx_v_x);
5459 __Pyx_XGIVEREF(__pyx_r);
5460 __Pyx_RefNannyFinishContext();
5464 /* "TabProxies.pyx":456
5465 * return [ x.strip().split(" ")[0] for x in r.split(";") if x.strip() != '' ]
5467 * def __getitem__(self, key): # <<<<<<<<<<<<<<
5468 * return self.__getattr__( key )
5472 static PyObject *__pyx_pf_10TabProxies_8GTFProxy_7__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key); /*proto*/
5473 static PyObject *__pyx_pf_10TabProxies_8GTFProxy_7__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key) {
5474 PyObject *__pyx_r = NULL;
5475 PyObject *__pyx_t_1 = NULL;
5476 PyObject *__pyx_t_2 = NULL;
5477 PyObject *__pyx_t_3 = NULL;
5478 __Pyx_RefNannySetupContext("__getitem__");
5480 /* "TabProxies.pyx":457
5482 * def __getitem__(self, key):
5483 * return self.__getattr__( key ) # <<<<<<<<<<<<<<
5485 * def __getattr__(self, item ):
5487 __Pyx_XDECREF(__pyx_r);
5488 __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s____getattr__); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 457; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5489 __Pyx_GOTREF(__pyx_t_1);
5490 __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 457; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5491 __Pyx_GOTREF(((PyObject *)__pyx_t_2));
5492 __Pyx_INCREF(__pyx_v_key);
5493 PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_key);
5494 __Pyx_GIVEREF(__pyx_v_key);
5495 __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 457; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5496 __Pyx_GOTREF(__pyx_t_3);
5497 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5498 __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
5499 __pyx_r = __pyx_t_3;
5503 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
5506 __Pyx_XDECREF(__pyx_t_1);
5507 __Pyx_XDECREF(__pyx_t_2);
5508 __Pyx_XDECREF(__pyx_t_3);
5509 __Pyx_AddTraceback("TabProxies.GTFProxy.__getitem__");
5512 __Pyx_XGIVEREF(__pyx_r);
5513 __Pyx_RefNannyFinishContext();
5517 /* "TabProxies.pyx":459
5518 * return self.__getattr__( key )
5520 * def __getattr__(self, item ): # <<<<<<<<<<<<<<
5521 * """Generic lookup of attribute from GFF/GTF attributes
5522 * Only called if there *isn't* an attribute with this name
5525 static PyObject *__pyx_pf_10TabProxies_8GTFProxy_8__getattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_item); /*proto*/
5526 static char __pyx_doc_10TabProxies_8GTFProxy_8__getattr__[] = "Generic lookup of attribute from GFF/GTF attributes \n Only called if there *isn't* an attribute with this name\n ";
5527 struct wrapperbase __pyx_wrapperbase_10TabProxies_8GTFProxy_8__getattr__;
5528 static PyObject *__pyx_pf_10TabProxies_8GTFProxy_8__getattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_item) {
5529 char *__pyx_v_start;
5530 char *__pyx_v_query;
5533 PyObject *__pyx_v_result;
5534 PyObject *__pyx_r = NULL;
5537 PyObject *__pyx_t_3 = NULL;
5538 PyObject *__pyx_t_4 = NULL;
5541 __Pyx_RefNannySetupContext("__getattr__");
5542 __pyx_v_result = Py_None; __Pyx_INCREF(Py_None);
5544 /* "TabProxies.pyx":468
5547 * query = item # <<<<<<<<<<<<<<
5549 * start = strstr( self.attributes, query)
5551 __pyx_t_1 = PyBytes_AsString(__pyx_v_item); if (unlikely((!__pyx_t_1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 468; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5552 __pyx_v_query = __pyx_t_1;
5554 /* "TabProxies.pyx":470
5557 * start = strstr( self.attributes, query) # <<<<<<<<<<<<<<
5559 * raise AttributeError("'GTFProxy' has no attribute '%s'" % item )
5561 __pyx_v_start = strstr(((struct __pyx_obj_10TabProxies_GTFProxy *)__pyx_v_self)->attributes, __pyx_v_query);
5563 /* "TabProxies.pyx":471
5565 * start = strstr( self.attributes, query)
5566 * if start == NULL: # <<<<<<<<<<<<<<
5567 * raise AttributeError("'GTFProxy' has no attribute '%s'" % item )
5570 __pyx_t_2 = (__pyx_v_start == NULL);
5573 /* "TabProxies.pyx":472
5574 * start = strstr( self.attributes, query)
5576 * raise AttributeError("'GTFProxy' has no attribute '%s'" % item ) # <<<<<<<<<<<<<<
5578 * start += strlen(query) + 1
5580 __pyx_t_3 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_29), __pyx_v_item); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 472; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5581 __Pyx_GOTREF(((PyObject *)__pyx_t_3));
5582 __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 472; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5583 __Pyx_GOTREF(((PyObject *)__pyx_t_4));
5584 PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_t_3));
5585 __Pyx_GIVEREF(((PyObject *)__pyx_t_3));
5587 __pyx_t_3 = PyObject_Call(__pyx_builtin_AttributeError, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 472; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5588 __Pyx_GOTREF(__pyx_t_3);
5589 __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
5590 __Pyx_Raise(__pyx_t_3, 0, 0);
5591 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
5592 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 472; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5597 /* "TabProxies.pyx":474
5598 * raise AttributeError("'GTFProxy' has no attribute '%s'" % item )
5600 * start += strlen(query) + 1 # <<<<<<<<<<<<<<
5601 * # skip gaps before
5602 * while start[0] == ' ': start += 1
5604 __pyx_v_start = (__pyx_v_start + (strlen(__pyx_v_query) + 1));
5606 /* "TabProxies.pyx":476
5607 * start += strlen(query) + 1
5608 * # skip gaps before
5609 * while start[0] == ' ': start += 1 # <<<<<<<<<<<<<<
5610 * if start[0] == '"':
5614 __pyx_t_2 = ((__pyx_v_start[0]) == ' ');
5615 if (!__pyx_t_2) break;
5616 __pyx_v_start = (__pyx_v_start + 1);
5619 /* "TabProxies.pyx":477
5620 * # skip gaps before
5621 * while start[0] == ' ': start += 1
5622 * if start[0] == '"': # <<<<<<<<<<<<<<
5626 __pyx_t_2 = ((__pyx_v_start[0]) == '"');
5629 /* "TabProxies.pyx":478
5630 * while start[0] == ' ': start += 1
5631 * if start[0] == '"':
5632 * start += 1 # <<<<<<<<<<<<<<
5634 * while end[0] != '\0' and end[0] != '"': end += 1
5636 __pyx_v_start = (__pyx_v_start + 1);
5638 /* "TabProxies.pyx":479
5639 * if start[0] == '"':
5641 * end = start # <<<<<<<<<<<<<<
5642 * while end[0] != '\0' and end[0] != '"': end += 1
5645 __pyx_v_end = __pyx_v_start;
5647 /* "TabProxies.pyx":480
5650 * while end[0] != '\0' and end[0] != '"': end += 1 # <<<<<<<<<<<<<<
5652 * result = PyString_FromStringAndSize( start, l )
5655 __pyx_t_2 = ((__pyx_v_end[0]) != '\x00');
5657 __pyx_t_5 = ((__pyx_v_end[0]) != '"');
5658 __pyx_t_6 = __pyx_t_5;
5660 __pyx_t_6 = __pyx_t_2;
5662 if (!__pyx_t_6) break;
5663 __pyx_v_end = (__pyx_v_end + 1);
5666 /* "TabProxies.pyx":481
5668 * while end[0] != '\0' and end[0] != '"': end += 1
5669 * l = end - start # <<<<<<<<<<<<<<
5670 * result = PyString_FromStringAndSize( start, l )
5673 __pyx_v_l = (__pyx_v_end - __pyx_v_start);
5675 /* "TabProxies.pyx":482
5676 * while end[0] != '\0' and end[0] != '"': end += 1
5678 * result = PyString_FromStringAndSize( start, l ) # <<<<<<<<<<<<<<
5682 __pyx_t_3 = PyString_FromStringAndSize(__pyx_v_start, __pyx_v_l); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 482; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5683 __Pyx_GOTREF(__pyx_t_3);
5684 __Pyx_DECREF(__pyx_v_result);
5685 __pyx_v_result = __pyx_t_3;
5688 /* "TabProxies.pyx":483
5690 * result = PyString_FromStringAndSize( start, l )
5691 * return result # <<<<<<<<<<<<<<
5695 __Pyx_XDECREF(__pyx_r);
5696 __Pyx_INCREF(__pyx_v_result);
5697 __pyx_r = __pyx_v_result;
5703 /* "TabProxies.pyx":485
5706 * return start # <<<<<<<<<<<<<<
5708 * def setAttribute( self, name, value ):
5710 __Pyx_XDECREF(__pyx_r);
5711 __pyx_t_3 = PyBytes_FromString(__pyx_v_start); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 485; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5712 __Pyx_GOTREF(((PyObject *)__pyx_t_3));
5713 __pyx_r = ((PyObject *)__pyx_t_3);
5719 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
5722 __Pyx_XDECREF(__pyx_t_3);
5723 __Pyx_XDECREF(__pyx_t_4);
5724 __Pyx_AddTraceback("TabProxies.GTFProxy.__getattr__");
5727 __Pyx_DECREF(__pyx_v_result);
5728 __Pyx_XGIVEREF(__pyx_r);
5729 __Pyx_RefNannyFinishContext();
5733 /* "TabProxies.pyx":487
5736 * def setAttribute( self, name, value ): # <<<<<<<<<<<<<<
5737 * '''convenience method to set an attribute.'''
5741 static PyObject *__pyx_pf_10TabProxies_8GTFProxy_9setAttribute(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
5742 static char __pyx_doc_10TabProxies_8GTFProxy_9setAttribute[] = "convenience method to set an attribute.";
5743 static PyObject *__pyx_pf_10TabProxies_8GTFProxy_9setAttribute(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
5744 PyObject *__pyx_v_name = 0;
5745 PyObject *__pyx_v_value = 0;
5746 PyObject *__pyx_v_r;
5747 PyObject *__pyx_r = NULL;
5748 PyObject *__pyx_t_1 = NULL;
5749 PyObject *__pyx_t_2 = NULL;
5750 PyObject *__pyx_t_3 = NULL;
5751 static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__name,&__pyx_n_s__value,0};
5752 __Pyx_RefNannySetupContext("setAttribute");
5753 if (unlikely(__pyx_kwds)) {
5754 Py_ssize_t kw_args = PyDict_Size(__pyx_kwds);
5755 PyObject* values[2] = {0,0};
5756 switch (PyTuple_GET_SIZE(__pyx_args)) {
5757 case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
5758 case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
5760 default: goto __pyx_L5_argtuple_error;
5762 switch (PyTuple_GET_SIZE(__pyx_args)) {
5764 values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__name);
5765 if (likely(values[0])) kw_args--;
5766 else goto __pyx_L5_argtuple_error;
5768 values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__value);
5769 if (likely(values[1])) kw_args--;
5771 __Pyx_RaiseArgtupleInvalid("setAttribute", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 487; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
5774 if (unlikely(kw_args > 0)) {
5775 if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "setAttribute") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 487; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
5777 __pyx_v_name = values[0];
5778 __pyx_v_value = values[1];
5779 } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
5780 goto __pyx_L5_argtuple_error;
5782 __pyx_v_name = PyTuple_GET_ITEM(__pyx_args, 0);
5783 __pyx_v_value = PyTuple_GET_ITEM(__pyx_args, 1);
5785 goto __pyx_L4_argument_unpacking_done;
5786 __pyx_L5_argtuple_error:;
5787 __Pyx_RaiseArgtupleInvalid("setAttribute", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 487; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
5789 __Pyx_AddTraceback("TabProxies.GTFProxy.setAttribute");
5790 __Pyx_RefNannyFinishContext();
5792 __pyx_L4_argument_unpacking_done:;
5793 __pyx_v_r = Py_None; __Pyx_INCREF(Py_None);
5795 /* "TabProxies.pyx":489
5796 * def setAttribute( self, name, value ):
5797 * '''convenience method to set an attribute.'''
5798 * r = self.asDict() # <<<<<<<<<<<<<<
5800 * self.fromDict( r )
5802 __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__asDict); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 489; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5803 __Pyx_GOTREF(__pyx_t_1);
5804 __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 489; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5805 __Pyx_GOTREF(__pyx_t_2);
5806 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5807 __Pyx_DECREF(__pyx_v_r);
5808 __pyx_v_r = __pyx_t_2;
5811 /* "TabProxies.pyx":490
5812 * '''convenience method to set an attribute.'''
5814 * r[name] = value # <<<<<<<<<<<<<<
5815 * self.fromDict( r )
5818 if (PyObject_SetItem(__pyx_v_r, __pyx_v_name, __pyx_v_value) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 490; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5820 /* "TabProxies.pyx":491
5823 * self.fromDict( r ) # <<<<<<<<<<<<<<
5825 * cdef class NamedTupleProxy( TupleProxy ):
5827 __pyx_t_2 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__fromDict); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 491; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5828 __Pyx_GOTREF(__pyx_t_2);
5829 __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 491; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5830 __Pyx_GOTREF(((PyObject *)__pyx_t_1));
5831 __Pyx_INCREF(__pyx_v_r);
5832 PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_r);
5833 __Pyx_GIVEREF(__pyx_v_r);
5834 __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 491; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5835 __Pyx_GOTREF(__pyx_t_3);
5836 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5837 __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
5838 __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
5840 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
5843 __Pyx_XDECREF(__pyx_t_1);
5844 __Pyx_XDECREF(__pyx_t_2);
5845 __Pyx_XDECREF(__pyx_t_3);
5846 __Pyx_AddTraceback("TabProxies.GTFProxy.setAttribute");
5849 __Pyx_DECREF(__pyx_v_r);
5850 __Pyx_XGIVEREF(__pyx_r);
5851 __Pyx_RefNannyFinishContext();
5855 /* "TabProxies.pyx":497
5856 * map_key2field = {}
5858 * def __setattr__(self, key, value ): # <<<<<<<<<<<<<<
5859 * '''set attribute.'''
5863 static int __pyx_pf_10TabProxies_15NamedTupleProxy___setattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_value); /*proto*/
5864 static char __pyx_doc_10TabProxies_15NamedTupleProxy___setattr__[] = "set attribute.";
5865 struct wrapperbase __pyx_wrapperbase_10TabProxies_15NamedTupleProxy___setattr__;
5866 static int __pyx_pf_10TabProxies_15NamedTupleProxy___setattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_value) {
5868 PyObject *__pyx_v_f;
5870 PyObject *__pyx_t_1 = NULL;
5871 PyObject *__pyx_t_2 = NULL;
5872 PyObject *__pyx_t_3 = NULL;
5874 PyObject *__pyx_t_5 = NULL;
5876 __Pyx_RefNannySetupContext("__setattr__");
5877 __pyx_v_f = Py_None; __Pyx_INCREF(Py_None);
5879 /* "TabProxies.pyx":500
5880 * '''set attribute.'''
5882 * idx, f = self.map_key2field[key] # <<<<<<<<<<<<<<
5883 * if self.nfields < idx:
5884 * raise KeyError( "field %s not set" % key )
5886 __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__map_key2field); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 500; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5887 __Pyx_GOTREF(__pyx_t_1);
5888 __pyx_t_2 = PyObject_GetItem(__pyx_t_1, __pyx_v_key); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 500; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5889 __Pyx_GOTREF(__pyx_t_2);
5890 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5891 if (PyTuple_CheckExact(__pyx_t_2) && likely(PyTuple_GET_SIZE(__pyx_t_2) == 2)) {
5892 PyObject* tuple = __pyx_t_2;
5893 __pyx_t_1 = PyTuple_GET_ITEM(tuple, 0); __Pyx_INCREF(__pyx_t_1);
5894 __pyx_t_4 = __Pyx_PyInt_AsInt(__pyx_t_1); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 500; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5895 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5896 __pyx_t_3 = PyTuple_GET_ITEM(tuple, 1); __Pyx_INCREF(__pyx_t_3);
5897 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5898 __pyx_v_idx = __pyx_t_4;
5899 __Pyx_DECREF(__pyx_v_f);
5900 __pyx_v_f = __pyx_t_3;
5903 __pyx_t_5 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 500; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5904 __Pyx_GOTREF(__pyx_t_5);
5905 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5906 __pyx_t_1 = __Pyx_UnpackItem(__pyx_t_5, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 500; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5907 __Pyx_GOTREF(__pyx_t_1);
5908 __pyx_t_4 = __Pyx_PyInt_AsInt(__pyx_t_1); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 500; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5909 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
5910 __pyx_t_3 = __Pyx_UnpackItem(__pyx_t_5, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 500; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5911 __Pyx_GOTREF(__pyx_t_3);
5912 if (__Pyx_EndUnpack(__pyx_t_5, 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 500; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5913 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
5914 __pyx_v_idx = __pyx_t_4;
5915 __Pyx_DECREF(__pyx_v_f);
5916 __pyx_v_f = __pyx_t_3;
5920 /* "TabProxies.pyx":501
5922 * idx, f = self.map_key2field[key]
5923 * if self.nfields < idx: # <<<<<<<<<<<<<<
5924 * raise KeyError( "field %s not set" % key )
5925 * TupleProxy.__setitem__(self, idx, str(value) )
5927 __pyx_t_6 = (((struct __pyx_obj_10TabProxies_NamedTupleProxy *)__pyx_v_self)->__pyx_base.nfields < __pyx_v_idx);
5930 /* "TabProxies.pyx":502
5931 * idx, f = self.map_key2field[key]
5932 * if self.nfields < idx:
5933 * raise KeyError( "field %s not set" % key ) # <<<<<<<<<<<<<<
5934 * TupleProxy.__setitem__(self, idx, str(value) )
5937 __pyx_t_2 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_30), __pyx_v_key); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 502; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5938 __Pyx_GOTREF(((PyObject *)__pyx_t_2));
5939 __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 502; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5940 __Pyx_GOTREF(((PyObject *)__pyx_t_3));
5941 PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_t_2));
5942 __Pyx_GIVEREF(((PyObject *)__pyx_t_2));
5944 __pyx_t_2 = PyObject_Call(__pyx_builtin_KeyError, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 502; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5945 __Pyx_GOTREF(__pyx_t_2);
5946 __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
5947 __Pyx_Raise(__pyx_t_2, 0, 0);
5948 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5949 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 502; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5954 /* "TabProxies.pyx":503
5955 * if self.nfields < idx:
5956 * raise KeyError( "field %s not set" % key )
5957 * TupleProxy.__setitem__(self, idx, str(value) ) # <<<<<<<<<<<<<<
5959 * def __getattr__(self, key ):
5961 __pyx_t_2 = PyObject_GetAttr(((PyObject *)((PyObject*)__pyx_ptype_10TabProxies_TupleProxy)), __pyx_n_s____setitem__); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 503; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5962 __Pyx_GOTREF(__pyx_t_2);
5963 __pyx_t_3 = PyInt_FromLong(__pyx_v_idx); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 503; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5964 __Pyx_GOTREF(__pyx_t_3);
5965 __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 503; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5966 __Pyx_GOTREF(((PyObject *)__pyx_t_1));
5967 __Pyx_INCREF(__pyx_v_value);
5968 PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_value);
5969 __Pyx_GIVEREF(__pyx_v_value);
5970 __pyx_t_5 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 503; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5971 __Pyx_GOTREF(__pyx_t_5);
5972 __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
5973 __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 503; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5974 __Pyx_GOTREF(((PyObject *)__pyx_t_1));
5975 __Pyx_INCREF(__pyx_v_self);
5976 PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self);
5977 __Pyx_GIVEREF(__pyx_v_self);
5978 PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_3);
5979 __Pyx_GIVEREF(__pyx_t_3);
5980 PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_t_5);
5981 __Pyx_GIVEREF(__pyx_t_5);
5984 __pyx_t_5 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 503; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
5985 __Pyx_GOTREF(__pyx_t_5);
5986 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
5987 __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
5988 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
5993 __Pyx_XDECREF(__pyx_t_1);
5994 __Pyx_XDECREF(__pyx_t_2);
5995 __Pyx_XDECREF(__pyx_t_3);
5996 __Pyx_XDECREF(__pyx_t_5);
5997 __Pyx_AddTraceback("TabProxies.NamedTupleProxy.__setattr__");
6000 __Pyx_DECREF(__pyx_v_f);
6001 __Pyx_RefNannyFinishContext();
6005 /* "TabProxies.pyx":505
6006 * TupleProxy.__setitem__(self, idx, str(value) )
6008 * def __getattr__(self, key ): # <<<<<<<<<<<<<<
6010 * idx, f = self.map_key2field[key]
6013 static PyObject *__pyx_pf_10TabProxies_15NamedTupleProxy_1__getattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_key); /*proto*/
6014 static PyObject *__pyx_pf_10TabProxies_15NamedTupleProxy_1__getattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_key) {
6016 PyObject *__pyx_v_f;
6017 PyObject *__pyx_r = NULL;
6018 PyObject *__pyx_t_1 = NULL;
6019 PyObject *__pyx_t_2 = NULL;
6020 PyObject *__pyx_t_3 = NULL;
6022 PyObject *__pyx_t_5 = NULL;
6024 __Pyx_RefNannySetupContext("__getattr__");
6025 __pyx_v_f = Py_None; __Pyx_INCREF(Py_None);
6027 /* "TabProxies.pyx":507
6028 * def __getattr__(self, key ):
6030 * idx, f = self.map_key2field[key] # <<<<<<<<<<<<<<
6031 * if self.nfields < idx:
6032 * raise KeyError( "field %s not set" % key )
6034 __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__map_key2field); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 507; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6035 __Pyx_GOTREF(__pyx_t_1);
6036 __pyx_t_2 = PyObject_GetItem(__pyx_t_1, __pyx_v_key); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 507; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6037 __Pyx_GOTREF(__pyx_t_2);
6038 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6039 if (PyTuple_CheckExact(__pyx_t_2) && likely(PyTuple_GET_SIZE(__pyx_t_2) == 2)) {
6040 PyObject* tuple = __pyx_t_2;
6041 __pyx_t_1 = PyTuple_GET_ITEM(tuple, 0); __Pyx_INCREF(__pyx_t_1);
6042 __pyx_t_4 = __Pyx_PyInt_AsInt(__pyx_t_1); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 507; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6043 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6044 __pyx_t_3 = PyTuple_GET_ITEM(tuple, 1); __Pyx_INCREF(__pyx_t_3);
6045 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
6046 __pyx_v_idx = __pyx_t_4;
6047 __Pyx_DECREF(__pyx_v_f);
6048 __pyx_v_f = __pyx_t_3;
6051 __pyx_t_5 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 507; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6052 __Pyx_GOTREF(__pyx_t_5);
6053 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
6054 __pyx_t_1 = __Pyx_UnpackItem(__pyx_t_5, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 507; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6055 __Pyx_GOTREF(__pyx_t_1);
6056 __pyx_t_4 = __Pyx_PyInt_AsInt(__pyx_t_1); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 507; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6057 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6058 __pyx_t_3 = __Pyx_UnpackItem(__pyx_t_5, 1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 507; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6059 __Pyx_GOTREF(__pyx_t_3);
6060 if (__Pyx_EndUnpack(__pyx_t_5, 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 507; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6061 __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
6062 __pyx_v_idx = __pyx_t_4;
6063 __Pyx_DECREF(__pyx_v_f);
6064 __pyx_v_f = __pyx_t_3;
6068 /* "TabProxies.pyx":508
6070 * idx, f = self.map_key2field[key]
6071 * if self.nfields < idx: # <<<<<<<<<<<<<<
6072 * raise KeyError( "field %s not set" % key )
6073 * return f( self.fields[idx] )
6075 __pyx_t_6 = (((struct __pyx_obj_10TabProxies_NamedTupleProxy *)__pyx_v_self)->__pyx_base.nfields < __pyx_v_idx);
6078 /* "TabProxies.pyx":509
6079 * idx, f = self.map_key2field[key]
6080 * if self.nfields < idx:
6081 * raise KeyError( "field %s not set" % key ) # <<<<<<<<<<<<<<
6082 * return f( self.fields[idx] )
6085 __pyx_t_2 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_30), __pyx_v_key); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 509; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6086 __Pyx_GOTREF(((PyObject *)__pyx_t_2));
6087 __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 509; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6088 __Pyx_GOTREF(((PyObject *)__pyx_t_3));
6089 PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_t_2));
6090 __Pyx_GIVEREF(((PyObject *)__pyx_t_2));
6092 __pyx_t_2 = PyObject_Call(__pyx_builtin_KeyError, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 509; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6093 __Pyx_GOTREF(__pyx_t_2);
6094 __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
6095 __Pyx_Raise(__pyx_t_2, 0, 0);
6096 __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
6097 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 509; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6102 /* "TabProxies.pyx":510
6103 * if self.nfields < idx:
6104 * raise KeyError( "field %s not set" % key )
6105 * return f( self.fields[idx] ) # <<<<<<<<<<<<<<
6107 * cdef class BedProxy( NamedTupleProxy ):
6109 __Pyx_XDECREF(__pyx_r);
6110 __pyx_t_2 = PyBytes_FromString((((struct __pyx_obj_10TabProxies_NamedTupleProxy *)__pyx_v_self)->__pyx_base.fields[__pyx_v_idx])); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 510; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6111 __Pyx_GOTREF(((PyObject *)__pyx_t_2));
6112 __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 510; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6113 __Pyx_GOTREF(((PyObject *)__pyx_t_3));
6114 PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_t_2));
6115 __Pyx_GIVEREF(((PyObject *)__pyx_t_2));
6117 __pyx_t_2 = PyObject_Call(__pyx_v_f, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 510; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6118 __Pyx_GOTREF(__pyx_t_2);
6119 __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
6120 __pyx_r = __pyx_t_2;
6124 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
6127 __Pyx_XDECREF(__pyx_t_1);
6128 __Pyx_XDECREF(__pyx_t_2);
6129 __Pyx_XDECREF(__pyx_t_3);
6130 __Pyx_XDECREF(__pyx_t_5);
6131 __Pyx_AddTraceback("TabProxies.NamedTupleProxy.__getattr__");
6134 __Pyx_DECREF(__pyx_v_f);
6135 __Pyx_XGIVEREF(__pyx_r);
6136 __Pyx_RefNannyFinishContext();
6140 /* "TabProxies.pyx":531
6141 * 'blockStarts': (11,str), }
6143 * cdef int getMaxFields( self, size_t nbytes ): # <<<<<<<<<<<<<<
6144 * '''return max number of fields.'''
6148 static int __pyx_f_10TabProxies_8BedProxy_getMaxFields(struct __pyx_obj_10TabProxies_BedProxy *__pyx_v_self, size_t __pyx_v_nbytes) {
6150 __Pyx_RefNannySetupContext("getMaxFields");
6152 /* "TabProxies.pyx":533
6153 * cdef int getMaxFields( self, size_t nbytes ):
6154 * '''return max number of fields.'''
6155 * return 12 # <<<<<<<<<<<<<<
6157 * cdef update( self, char * buffer, size_t nbytes ):
6164 __Pyx_RefNannyFinishContext();
6168 /* "TabProxies.pyx":535
6171 * cdef update( self, char * buffer, size_t nbytes ): # <<<<<<<<<<<<<<
6172 * '''update internal data.
6176 static PyObject *__pyx_f_10TabProxies_8BedProxy_update(struct __pyx_obj_10TabProxies_BedProxy *__pyx_v_self, char *__pyx_v_buffer, size_t __pyx_v_nbytes) {
6177 PyObject *__pyx_r = NULL;
6178 PyObject *__pyx_t_1 = NULL;
6180 __Pyx_RefNannySetupContext("update");
6182 /* "TabProxies.pyx":540
6183 * nbytes does not include the terminal '\0'.
6185 * TupleProxy.update( self, buffer, nbytes ) # <<<<<<<<<<<<<<
6187 * if self.nfields < 3:
6189 __pyx_t_1 = __pyx_vtabptr_10TabProxies_TupleProxy->update(((struct __pyx_obj_10TabProxies_TupleProxy *)__pyx_v_self), __pyx_v_buffer, __pyx_v_nbytes); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 540; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6190 __Pyx_GOTREF(__pyx_t_1);
6191 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6193 /* "TabProxies.pyx":542
6194 * TupleProxy.update( self, buffer, nbytes )
6196 * if self.nfields < 3: # <<<<<<<<<<<<<<
6197 * raise ValueError( "bed format requires at least three columns" )
6200 __pyx_t_2 = (__pyx_v_self->__pyx_base.__pyx_base.nfields < 3);
6203 /* "TabProxies.pyx":543
6205 * if self.nfields < 3:
6206 * raise ValueError( "bed format requires at least three columns" ) # <<<<<<<<<<<<<<
6208 * # determines bed format
6210 __pyx_t_1 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_32), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 543; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6211 __Pyx_GOTREF(__pyx_t_1);
6212 __Pyx_Raise(__pyx_t_1, 0, 0);
6213 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6214 {__pyx_filename = __pyx_f[0]; __pyx_lineno = 543; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6219 /* "TabProxies.pyx":546
6221 * # determines bed format
6222 * self.bedfields = self.nfields # <<<<<<<<<<<<<<
6224 * # do automatic conversion
6226 __pyx_v_self->bedfields = __pyx_v_self->__pyx_base.__pyx_base.nfields;
6228 /* "TabProxies.pyx":549
6230 * # do automatic conversion
6231 * self.contig = self.fields[0] # <<<<<<<<<<<<<<
6232 * self.start = atoi( self.fields[1] )
6233 * self.end = atoi( self.fields[2] )
6235 __pyx_v_self->contig = (__pyx_v_self->__pyx_base.__pyx_base.fields[0]);
6237 /* "TabProxies.pyx":550
6238 * # do automatic conversion
6239 * self.contig = self.fields[0]
6240 * self.start = atoi( self.fields[1] ) # <<<<<<<<<<<<<<
6241 * self.end = atoi( self.fields[2] )
6244 __pyx_v_self->start = atoi((__pyx_v_self->__pyx_base.__pyx_base.fields[1]));
6246 /* "TabProxies.pyx":551
6247 * self.contig = self.fields[0]
6248 * self.start = atoi( self.fields[1] )
6249 * self.end = atoi( self.fields[2] ) # <<<<<<<<<<<<<<
6251 * # __setattr__ in base class seems to take precedence
6253 __pyx_v_self->end = atoi((__pyx_v_self->__pyx_base.__pyx_base.fields[2]));
6255 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
6258 __Pyx_XDECREF(__pyx_t_1);
6259 __Pyx_AddTraceback("TabProxies.BedProxy.update");
6262 __Pyx_XGIVEREF(__pyx_r);
6263 __Pyx_RefNannyFinishContext();
6267 /* "TabProxies.pyx":560
6268 * # def __get__( self ): return self.end
6270 * def __str__(self): # <<<<<<<<<<<<<<
6272 * cdef int save_fields = self.nfields
6275 static PyObject *__pyx_pf_10TabProxies_8BedProxy___str__(PyObject *__pyx_v_self); /*proto*/
6276 static PyObject *__pyx_pf_10TabProxies_8BedProxy___str__(PyObject *__pyx_v_self) {
6277 int __pyx_v_save_fields;
6278 PyObject *__pyx_v_retval;
6279 PyObject *__pyx_r = NULL;
6280 PyObject *__pyx_t_1 = NULL;
6281 PyObject *__pyx_t_2 = NULL;
6282 PyObject *__pyx_t_3 = NULL;
6283 __Pyx_RefNannySetupContext("__str__");
6284 __pyx_v_retval = Py_None; __Pyx_INCREF(Py_None);
6286 /* "TabProxies.pyx":562
6287 * def __str__(self):
6289 * cdef int save_fields = self.nfields # <<<<<<<<<<<<<<
6290 * # ensure fields to use correct format
6291 * self.nfields = self.bedfields
6293 __pyx_v_save_fields = ((struct __pyx_obj_10TabProxies_BedProxy *)__pyx_v_self)->__pyx_base.__pyx_base.nfields;
6295 /* "TabProxies.pyx":564
6296 * cdef int save_fields = self.nfields
6297 * # ensure fields to use correct format
6298 * self.nfields = self.bedfields # <<<<<<<<<<<<<<
6299 * retval = TupleProxy.__str__( self )
6300 * self.nfields = save_fields
6302 ((struct __pyx_obj_10TabProxies_BedProxy *)__pyx_v_self)->__pyx_base.__pyx_base.nfields = ((struct __pyx_obj_10TabProxies_BedProxy *)__pyx_v_self)->bedfields;
6304 /* "TabProxies.pyx":565
6305 * # ensure fields to use correct format
6306 * self.nfields = self.bedfields
6307 * retval = TupleProxy.__str__( self ) # <<<<<<<<<<<<<<
6308 * self.nfields = save_fields
6311 __pyx_t_1 = PyObject_GetAttr(((PyObject *)((PyObject*)__pyx_ptype_10TabProxies_TupleProxy)), __pyx_n_s____str__); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 565; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6312 __Pyx_GOTREF(__pyx_t_1);
6313 __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 565; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6314 __Pyx_GOTREF(((PyObject *)__pyx_t_2));
6315 __Pyx_INCREF(__pyx_v_self);
6316 PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_self);
6317 __Pyx_GIVEREF(__pyx_v_self);
6318 __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 565; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6319 __Pyx_GOTREF(__pyx_t_3);
6320 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6321 __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
6322 __Pyx_DECREF(__pyx_v_retval);
6323 __pyx_v_retval = __pyx_t_3;
6326 /* "TabProxies.pyx":566
6327 * self.nfields = self.bedfields
6328 * retval = TupleProxy.__str__( self )
6329 * self.nfields = save_fields # <<<<<<<<<<<<<<
6333 ((struct __pyx_obj_10TabProxies_BedProxy *)__pyx_v_self)->__pyx_base.__pyx_base.nfields = __pyx_v_save_fields;
6335 /* "TabProxies.pyx":567
6336 * retval = TupleProxy.__str__( self )
6337 * self.nfields = save_fields
6338 * return retval # <<<<<<<<<<<<<<
6340 * def __setattr__(self, key, value ):
6342 __Pyx_XDECREF(__pyx_r);
6343 __Pyx_INCREF(__pyx_v_retval);
6344 __pyx_r = __pyx_v_retval;
6347 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
6350 __Pyx_XDECREF(__pyx_t_1);
6351 __Pyx_XDECREF(__pyx_t_2);
6352 __Pyx_XDECREF(__pyx_t_3);
6353 __Pyx_AddTraceback("TabProxies.BedProxy.__str__");
6356 __Pyx_DECREF(__pyx_v_retval);
6357 __Pyx_XGIVEREF(__pyx_r);
6358 __Pyx_RefNannyFinishContext();
6362 /* "TabProxies.pyx":569
6365 * def __setattr__(self, key, value ): # <<<<<<<<<<<<<<
6366 * '''set attribute.'''
6367 * if key == "start": self.start = value
6370 static int __pyx_pf_10TabProxies_8BedProxy_1__setattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_value); /*proto*/
6371 static char __pyx_doc_10TabProxies_8BedProxy_1__setattr__[] = "set attribute.";
6372 struct wrapperbase __pyx_wrapperbase_10TabProxies_8BedProxy_1__setattr__;
6373 static int __pyx_pf_10TabProxies_8BedProxy_1__setattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_value) {
6375 PyObject *__pyx_v_f;
6377 PyObject *__pyx_t_1 = NULL;
6380 PyObject *__pyx_t_4 = NULL;
6381 PyObject *__pyx_t_5 = NULL;
6383 PyObject *__pyx_t_7 = NULL;
6384 __Pyx_RefNannySetupContext("__setattr__");
6385 __pyx_v_f = Py_None; __Pyx_INCREF(Py_None);
6387 /* "TabProxies.pyx":571
6388 * def __setattr__(self, key, value ):
6389 * '''set attribute.'''
6390 * if key == "start": self.start = value # <<<<<<<<<<<<<<
6391 * elif key == "end": self.end = value
6394 __pyx_t_1 = PyObject_RichCompare(__pyx_v_key, ((PyObject *)__pyx_n_s__start), Py_EQ); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 571; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6395 __Pyx_GOTREF(__pyx_t_1);
6396 __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 571; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6397 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6399 __pyx_t_3 = __Pyx_PyInt_from_py_uint32_t(__pyx_v_value); if (unlikely((__pyx_t_3 == (uint32_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 571; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6400 ((struct __pyx_obj_10TabProxies_BedProxy *)__pyx_v_self)->start = __pyx_t_3;
6404 /* "TabProxies.pyx":572
6405 * '''set attribute.'''
6406 * if key == "start": self.start = value
6407 * elif key == "end": self.end = value # <<<<<<<<<<<<<<
6411 __pyx_t_1 = PyObject_RichCompare(__pyx_v_key, ((PyObject *)__pyx_n_s__end), Py_EQ); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 572; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6412 __Pyx_GOTREF(__pyx_t_1);
6413 __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 572; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6414 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6416 __pyx_t_3 = __Pyx_PyInt_from_py_uint32_t(__pyx_v_value); if (unlikely((__pyx_t_3 == (uint32_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 572; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6417 ((struct __pyx_obj_10TabProxies_BedProxy *)__pyx_v_self)->end = __pyx_t_3;
6422 /* "TabProxies.pyx":575
6425 * idx, f = self.map_key2field[key] # <<<<<<<<<<<<<<
6426 * TupleProxy._setindex(self, idx, str(value) )
6429 __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__map_key2field); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 575; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6430 __Pyx_GOTREF(__pyx_t_1);
6431 __pyx_t_4 = PyObject_GetItem(__pyx_t_1, __pyx_v_key); if (!__pyx_t_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 575; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6432 __Pyx_GOTREF(__pyx_t_4);
6433 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6434 if (PyTuple_CheckExact(__pyx_t_4) && likely(PyTuple_GET_SIZE(__pyx_t_4) == 2)) {
6435 PyObject* tuple = __pyx_t_4;
6436 __pyx_t_1 = PyTuple_GET_ITEM(tuple, 0); __Pyx_INCREF(__pyx_t_1);
6437 __pyx_t_6 = __Pyx_PyInt_AsInt(__pyx_t_1); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 575; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6438 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6439 __pyx_t_5 = PyTuple_GET_ITEM(tuple, 1); __Pyx_INCREF(__pyx_t_5);
6440 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
6441 __pyx_v_idx = __pyx_t_6;
6442 __Pyx_DECREF(__pyx_v_f);
6443 __pyx_v_f = __pyx_t_5;
6446 __pyx_t_7 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 575; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6447 __Pyx_GOTREF(__pyx_t_7);
6448 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
6449 __pyx_t_1 = __Pyx_UnpackItem(__pyx_t_7, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 575; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6450 __Pyx_GOTREF(__pyx_t_1);
6451 __pyx_t_6 = __Pyx_PyInt_AsInt(__pyx_t_1); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 575; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6452 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6453 __pyx_t_5 = __Pyx_UnpackItem(__pyx_t_7, 1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 575; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6454 __Pyx_GOTREF(__pyx_t_5);
6455 if (__Pyx_EndUnpack(__pyx_t_7, 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 575; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6456 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6457 __pyx_v_idx = __pyx_t_6;
6458 __Pyx_DECREF(__pyx_v_f);
6459 __pyx_v_f = __pyx_t_5;
6463 /* "TabProxies.pyx":576
6465 * idx, f = self.map_key2field[key]
6466 * TupleProxy._setindex(self, idx, str(value) ) # <<<<<<<<<<<<<<
6468 * cdef class VCFProxy( NamedTupleProxy ):
6470 __pyx_t_4 = PyObject_GetAttr(((PyObject *)((PyObject*)__pyx_ptype_10TabProxies_TupleProxy)), __pyx_n_s___setindex); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 576; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6471 __Pyx_GOTREF(__pyx_t_4);
6472 __pyx_t_5 = PyInt_FromLong(__pyx_v_idx); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 576; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6473 __Pyx_GOTREF(__pyx_t_5);
6474 __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 576; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6475 __Pyx_GOTREF(((PyObject *)__pyx_t_1));
6476 __Pyx_INCREF(__pyx_v_value);
6477 PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_value);
6478 __Pyx_GIVEREF(__pyx_v_value);
6479 __pyx_t_7 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 576; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6480 __Pyx_GOTREF(__pyx_t_7);
6481 __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
6482 __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 576; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6483 __Pyx_GOTREF(((PyObject *)__pyx_t_1));
6484 __Pyx_INCREF(__pyx_v_self);
6485 PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self);
6486 __Pyx_GIVEREF(__pyx_v_self);
6487 PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_5);
6488 __Pyx_GIVEREF(__pyx_t_5);
6489 PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_t_7);
6490 __Pyx_GIVEREF(__pyx_t_7);
6493 __pyx_t_7 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 576; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6494 __Pyx_GOTREF(__pyx_t_7);
6495 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
6496 __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
6497 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6502 __Pyx_XDECREF(__pyx_t_1);
6503 __Pyx_XDECREF(__pyx_t_4);
6504 __Pyx_XDECREF(__pyx_t_5);
6505 __Pyx_XDECREF(__pyx_t_7);
6506 __Pyx_AddTraceback("TabProxies.BedProxy.__setattr__");
6509 __Pyx_DECREF(__pyx_v_f);
6510 __Pyx_RefNannyFinishContext();
6514 /* "TabProxies.pyx":594
6515 * 'format' : (8,str) }
6517 * def __cinit__(self ): # <<<<<<<<<<<<<<
6518 * # automatically calls TupleProxy.__cinit__
6519 * # start indexed access at genotypes
6522 static int __pyx_pf_10TabProxies_8VCFProxy___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
6523 static int __pyx_pf_10TabProxies_8VCFProxy___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
6525 __Pyx_RefNannySetupContext("__cinit__");
6526 if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
6527 __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;}
6528 if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 0))) return -1;
6530 /* "TabProxies.pyx":597
6531 * # automatically calls TupleProxy.__cinit__
6532 * # start indexed access at genotypes
6533 * self.offset = 9 # <<<<<<<<<<<<<<
6535 * cdef update( self, char * buffer, size_t nbytes ):
6537 ((struct __pyx_obj_10TabProxies_VCFProxy *)__pyx_v_self)->__pyx_base.__pyx_base.offset = 9;
6540 __Pyx_RefNannyFinishContext();
6544 /* "TabProxies.pyx":599
6547 * cdef update( self, char * buffer, size_t nbytes ): # <<<<<<<<<<<<<<
6548 * '''update internal data.
6552 static PyObject *__pyx_f_10TabProxies_8VCFProxy_update(struct __pyx_obj_10TabProxies_VCFProxy *__pyx_v_self, char *__pyx_v_buffer, size_t __pyx_v_nbytes) {
6553 PyObject *__pyx_r = NULL;
6554 PyObject *__pyx_t_1 = NULL;
6555 __Pyx_RefNannySetupContext("update");
6557 /* "TabProxies.pyx":604
6558 * nbytes does not include the terminal '\0'.
6560 * TupleProxy.update( self, buffer, nbytes ) # <<<<<<<<<<<<<<
6562 * self.contig = self.fields[0]
6564 __pyx_t_1 = __pyx_vtabptr_10TabProxies_TupleProxy->update(((struct __pyx_obj_10TabProxies_TupleProxy *)__pyx_v_self), __pyx_v_buffer, __pyx_v_nbytes); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 604; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6565 __Pyx_GOTREF(__pyx_t_1);
6566 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6568 /* "TabProxies.pyx":606
6569 * TupleProxy.update( self, buffer, nbytes )
6571 * self.contig = self.fields[0] # <<<<<<<<<<<<<<
6572 * # vcf counts from 1 - correct here
6573 * self.pos = atoi( self.fields[1] ) - 1
6575 __pyx_v_self->contig = (__pyx_v_self->__pyx_base.__pyx_base.fields[0]);
6577 /* "TabProxies.pyx":608
6578 * self.contig = self.fields[0]
6579 * # vcf counts from 1 - correct here
6580 * self.pos = atoi( self.fields[1] ) - 1 # <<<<<<<<<<<<<<
6582 * def __len__(self):
6584 __pyx_v_self->pos = (atoi((__pyx_v_self->__pyx_base.__pyx_base.fields[1])) - 1);
6586 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
6589 __Pyx_XDECREF(__pyx_t_1);
6590 __Pyx_AddTraceback("TabProxies.VCFProxy.update");
6593 __Pyx_XGIVEREF(__pyx_r);
6594 __Pyx_RefNannyFinishContext();
6598 /* "TabProxies.pyx":610
6599 * self.pos = atoi( self.fields[1] ) - 1
6601 * def __len__(self): # <<<<<<<<<<<<<<
6602 * return max(0, self.nfields - 9)
6606 static Py_ssize_t __pyx_pf_10TabProxies_8VCFProxy_1__len__(PyObject *__pyx_v_self); /*proto*/
6607 static Py_ssize_t __pyx_pf_10TabProxies_8VCFProxy_1__len__(PyObject *__pyx_v_self) {
6612 __Pyx_RefNannySetupContext("__len__");
6614 /* "TabProxies.pyx":611
6616 * def __len__(self):
6617 * return max(0, self.nfields - 9) # <<<<<<<<<<<<<<
6621 __pyx_t_1 = (((struct __pyx_obj_10TabProxies_VCFProxy *)__pyx_v_self)->__pyx_base.__pyx_base.nfields - 9);
6623 if ((__pyx_t_1 > __pyx_t_2)) {
6624 __pyx_t_3 = __pyx_t_1;
6626 __pyx_t_3 = __pyx_t_2;
6628 __pyx_r = __pyx_t_3;
6633 __Pyx_RefNannyFinishContext();
6637 /* "TabProxies.pyx":615
6639 * '''feature end (in 0-based open/closed coordinates).'''
6640 * def __get__( self ): # <<<<<<<<<<<<<<
6645 static PyObject *__pyx_pf_10TabProxies_8VCFProxy_3pos___get__(PyObject *__pyx_v_self); /*proto*/
6646 static PyObject *__pyx_pf_10TabProxies_8VCFProxy_3pos___get__(PyObject *__pyx_v_self) {
6647 PyObject *__pyx_r = NULL;
6648 PyObject *__pyx_t_1 = NULL;
6649 __Pyx_RefNannySetupContext("__get__");
6651 /* "TabProxies.pyx":616
6652 * '''feature end (in 0-based open/closed coordinates).'''
6653 * def __get__( self ):
6654 * return self.pos # <<<<<<<<<<<<<<
6656 * def __setattr__(self, key, value ):
6658 __Pyx_XDECREF(__pyx_r);
6659 __pyx_t_1 = __Pyx_PyInt_to_py_uint32_t(((struct __pyx_obj_10TabProxies_VCFProxy *)__pyx_v_self)->pos); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 616; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6660 __Pyx_GOTREF(__pyx_t_1);
6661 __pyx_r = __pyx_t_1;
6665 __pyx_r = Py_None; __Pyx_INCREF(Py_None);
6668 __Pyx_XDECREF(__pyx_t_1);
6669 __Pyx_AddTraceback("TabProxies.VCFProxy.pos.__get__");
6672 __Pyx_XGIVEREF(__pyx_r);
6673 __Pyx_RefNannyFinishContext();
6677 /* "TabProxies.pyx":618
6680 * def __setattr__(self, key, value ): # <<<<<<<<<<<<<<
6681 * '''set attribute.'''
6685 static int __pyx_pf_10TabProxies_8VCFProxy_2__setattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_value); /*proto*/
6686 static char __pyx_doc_10TabProxies_8VCFProxy_2__setattr__[] = "set attribute.";
6687 struct wrapperbase __pyx_wrapperbase_10TabProxies_8VCFProxy_2__setattr__;
6688 static int __pyx_pf_10TabProxies_8VCFProxy_2__setattr__(PyObject *__pyx_v_self, PyObject *__pyx_v_key, PyObject *__pyx_v_value) {
6690 PyObject *__pyx_v_f;
6692 PyObject *__pyx_t_1 = NULL;
6695 PyObject *__pyx_t_4 = NULL;
6696 PyObject *__pyx_t_5 = NULL;
6698 PyObject *__pyx_t_7 = NULL;
6699 __Pyx_RefNannySetupContext("__setattr__");
6700 __Pyx_INCREF(__pyx_v_value);
6701 __pyx_v_f = Py_None; __Pyx_INCREF(Py_None);
6703 /* "TabProxies.pyx":620
6704 * def __setattr__(self, key, value ):
6705 * '''set attribute.'''
6706 * if key == "pos": # <<<<<<<<<<<<<<
6710 __pyx_t_1 = PyObject_RichCompare(__pyx_v_key, ((PyObject *)__pyx_n_s__pos), Py_EQ); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 620; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6711 __Pyx_GOTREF(__pyx_t_1);
6712 __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 620; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6713 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6716 /* "TabProxies.pyx":621
6717 * '''set attribute.'''
6719 * self.pos = value # <<<<<<<<<<<<<<
6723 __pyx_t_3 = __Pyx_PyInt_from_py_uint32_t(__pyx_v_value); if (unlikely((__pyx_t_3 == (uint32_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 621; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6724 ((struct __pyx_obj_10TabProxies_VCFProxy *)__pyx_v_self)->pos = __pyx_t_3;
6726 /* "TabProxies.pyx":622
6729 * value += 1 # <<<<<<<<<<<<<<
6733 __pyx_t_1 = PyNumber_InPlaceAdd(__pyx_v_value, __pyx_int_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 622; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6734 __Pyx_GOTREF(__pyx_t_1);
6735 __Pyx_DECREF(__pyx_v_value);
6736 __pyx_v_value = __pyx_t_1;
6742 /* "TabProxies.pyx":625
6745 * idx, f = self.map_key2field[key] # <<<<<<<<<<<<<<
6746 * TupleProxy._setindex(self, idx, str(value) )
6749 __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__map_key2field); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 625; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6750 __Pyx_GOTREF(__pyx_t_1);
6751 __pyx_t_4 = PyObject_GetItem(__pyx_t_1, __pyx_v_key); if (!__pyx_t_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 625; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6752 __Pyx_GOTREF(__pyx_t_4);
6753 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6754 if (PyTuple_CheckExact(__pyx_t_4) && likely(PyTuple_GET_SIZE(__pyx_t_4) == 2)) {
6755 PyObject* tuple = __pyx_t_4;
6756 __pyx_t_1 = PyTuple_GET_ITEM(tuple, 0); __Pyx_INCREF(__pyx_t_1);
6757 __pyx_t_6 = __Pyx_PyInt_AsInt(__pyx_t_1); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 625; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6758 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6759 __pyx_t_5 = PyTuple_GET_ITEM(tuple, 1); __Pyx_INCREF(__pyx_t_5);
6760 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
6761 __pyx_v_idx = __pyx_t_6;
6762 __Pyx_DECREF(__pyx_v_f);
6763 __pyx_v_f = __pyx_t_5;
6766 __pyx_t_7 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 625; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6767 __Pyx_GOTREF(__pyx_t_7);
6768 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
6769 __pyx_t_1 = __Pyx_UnpackItem(__pyx_t_7, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 625; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6770 __Pyx_GOTREF(__pyx_t_1);
6771 __pyx_t_6 = __Pyx_PyInt_AsInt(__pyx_t_1); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 625; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6772 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
6773 __pyx_t_5 = __Pyx_UnpackItem(__pyx_t_7, 1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 625; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6774 __Pyx_GOTREF(__pyx_t_5);
6775 if (__Pyx_EndUnpack(__pyx_t_7, 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 625; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6776 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6777 __pyx_v_idx = __pyx_t_6;
6778 __Pyx_DECREF(__pyx_v_f);
6779 __pyx_v_f = __pyx_t_5;
6783 /* "TabProxies.pyx":626
6785 * idx, f = self.map_key2field[key]
6786 * TupleProxy._setindex(self, idx, str(value) ) # <<<<<<<<<<<<<<
6789 __pyx_t_4 = PyObject_GetAttr(((PyObject *)((PyObject*)__pyx_ptype_10TabProxies_TupleProxy)), __pyx_n_s___setindex); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 626; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6790 __Pyx_GOTREF(__pyx_t_4);
6791 __pyx_t_5 = PyInt_FromLong(__pyx_v_idx); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 626; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6792 __Pyx_GOTREF(__pyx_t_5);
6793 __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 626; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6794 __Pyx_GOTREF(((PyObject *)__pyx_t_1));
6795 __Pyx_INCREF(__pyx_v_value);
6796 PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_value);
6797 __Pyx_GIVEREF(__pyx_v_value);
6798 __pyx_t_7 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 626; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6799 __Pyx_GOTREF(__pyx_t_7);
6800 __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
6801 __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 626; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6802 __Pyx_GOTREF(((PyObject *)__pyx_t_1));
6803 __Pyx_INCREF(__pyx_v_self);
6804 PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self);
6805 __Pyx_GIVEREF(__pyx_v_self);
6806 PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_5);
6807 __Pyx_GIVEREF(__pyx_t_5);
6808 PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_t_7);
6809 __Pyx_GIVEREF(__pyx_t_7);
6812 __pyx_t_7 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 626; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
6813 __Pyx_GOTREF(__pyx_t_7);
6814 __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
6815 __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
6816 __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
6821 __Pyx_XDECREF(__pyx_t_1);
6822 __Pyx_XDECREF(__pyx_t_4);
6823 __Pyx_XDECREF(__pyx_t_5);
6824 __Pyx_XDECREF(__pyx_t_7);
6825 __Pyx_AddTraceback("TabProxies.VCFProxy.__setattr__");
6828 __Pyx_DECREF(__pyx_v_f);
6829 __Pyx_DECREF(__pyx_v_value);
6830 __Pyx_RefNannyFinishContext();
6833 static struct __pyx_vtabstruct_10TabProxies_TupleProxy __pyx_vtable_10TabProxies_TupleProxy;
6835 static PyObject *__pyx_tp_new_10TabProxies_TupleProxy(PyTypeObject *t, PyObject *a, PyObject *k) {
6836 struct __pyx_obj_10TabProxies_TupleProxy *p;
6837 PyObject *o = (*t->tp_alloc)(t, 0);
6839 p = ((struct __pyx_obj_10TabProxies_TupleProxy *)o);
6840 p->__pyx_vtab = __pyx_vtabptr_10TabProxies_TupleProxy;
6841 if (__pyx_pf_10TabProxies_10TupleProxy___cinit__(o, __pyx_empty_tuple, NULL) < 0) {
6842 Py_DECREF(o); o = 0;
6847 static void __pyx_tp_dealloc_10TabProxies_TupleProxy(PyObject *o) {
6849 PyObject *etype, *eval, *etb;
6850 PyErr_Fetch(&etype, &eval, &etb);
6852 __pyx_pf_10TabProxies_10TupleProxy_1__dealloc__(o);
6853 if (PyErr_Occurred()) PyErr_WriteUnraisable(o);
6855 PyErr_Restore(etype, eval, etb);
6857 (*Py_TYPE(o)->tp_free)(o);
6859 static PyObject *__pyx_sq_item_10TabProxies_TupleProxy(PyObject *o, Py_ssize_t i) {
6861 PyObject *x = PyInt_FromSsize_t(i); if(!x) return 0;
6862 r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x);
6867 static int __pyx_mp_ass_subscript_10TabProxies_TupleProxy(PyObject *o, PyObject *i, PyObject *v) {
6869 return __pyx_pf_10TabProxies_10TupleProxy_5__setitem__(o, i, v);
6872 PyErr_Format(PyExc_NotImplementedError,
6873 "Subscript deletion not supported by %s", Py_TYPE(o)->tp_name);
6878 static PyMethodDef __pyx_methods_10TabProxies_TupleProxy[] = {
6879 {__Pyx_NAMESTR("_getindex"), (PyCFunction)__pyx_pf_10TabProxies_10TupleProxy_2_getindex, METH_O, __Pyx_DOCSTR(__pyx_doc_10TabProxies_10TupleProxy_2_getindex)},
6880 {__Pyx_NAMESTR("_setindex"), (PyCFunction)__pyx_pf_10TabProxies_10TupleProxy_4_setindex, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_10TabProxies_10TupleProxy_4_setindex)},
6881 {__Pyx_NAMESTR("__next__"), (PyCFunction)__pyx_pf_10TabProxies_10TupleProxy_8__next__, METH_NOARGS|METH_COEXIST, __Pyx_DOCSTR(__pyx_doc_10TabProxies_10TupleProxy_8__next__)},
6885 static PyNumberMethods __pyx_tp_as_number_TupleProxy = {
6889 #if PY_MAJOR_VERSION < 3
6905 #if PY_MAJOR_VERSION < 3
6909 #if PY_MAJOR_VERSION < 3
6915 #if PY_MAJOR_VERSION < 3
6918 #if PY_MAJOR_VERSION < 3
6921 0, /*nb_inplace_add*/
6922 0, /*nb_inplace_subtract*/
6923 0, /*nb_inplace_multiply*/
6924 #if PY_MAJOR_VERSION < 3
6925 0, /*nb_inplace_divide*/
6927 0, /*nb_inplace_remainder*/
6928 0, /*nb_inplace_power*/
6929 0, /*nb_inplace_lshift*/
6930 0, /*nb_inplace_rshift*/
6931 0, /*nb_inplace_and*/
6932 0, /*nb_inplace_xor*/
6933 0, /*nb_inplace_or*/
6934 0, /*nb_floor_divide*/
6935 0, /*nb_true_divide*/
6936 0, /*nb_inplace_floor_divide*/
6937 0, /*nb_inplace_true_divide*/
6938 #if PY_VERSION_HEX >= 0x02050000
6943 static PySequenceMethods __pyx_tp_as_sequence_TupleProxy = {
6944 __pyx_pf_10TabProxies_10TupleProxy_6__len__, /*sq_length*/
6947 __pyx_sq_item_10TabProxies_TupleProxy, /*sq_item*/
6952 0, /*sq_inplace_concat*/
6953 0, /*sq_inplace_repeat*/
6956 static PyMappingMethods __pyx_tp_as_mapping_TupleProxy = {
6957 __pyx_pf_10TabProxies_10TupleProxy_6__len__, /*mp_length*/
6958 __pyx_pf_10TabProxies_10TupleProxy_3__getitem__, /*mp_subscript*/
6959 __pyx_mp_ass_subscript_10TabProxies_TupleProxy, /*mp_ass_subscript*/
6962 static PyBufferProcs __pyx_tp_as_buffer_TupleProxy = {
6963 #if PY_MAJOR_VERSION < 3
6964 0, /*bf_getreadbuffer*/
6966 #if PY_MAJOR_VERSION < 3
6967 0, /*bf_getwritebuffer*/
6969 #if PY_MAJOR_VERSION < 3
6970 0, /*bf_getsegcount*/
6972 #if PY_MAJOR_VERSION < 3
6973 0, /*bf_getcharbuffer*/
6975 #if PY_VERSION_HEX >= 0x02060000
6978 #if PY_VERSION_HEX >= 0x02060000
6979 0, /*bf_releasebuffer*/
6983 static PyTypeObject __pyx_type_10TabProxies_TupleProxy = {
6984 PyVarObject_HEAD_INIT(0, 0)
6985 __Pyx_NAMESTR("TabProxies.TupleProxy"), /*tp_name*/
6986 sizeof(struct __pyx_obj_10TabProxies_TupleProxy), /*tp_basicsize*/
6988 __pyx_tp_dealloc_10TabProxies_TupleProxy, /*tp_dealloc*/
6992 #if PY_MAJOR_VERSION < 3
6998 &__pyx_tp_as_number_TupleProxy, /*tp_as_number*/
6999 &__pyx_tp_as_sequence_TupleProxy, /*tp_as_sequence*/
7000 &__pyx_tp_as_mapping_TupleProxy, /*tp_as_mapping*/
7003 __pyx_pf_10TabProxies_10TupleProxy_9__str__, /*tp_str*/
7006 &__pyx_tp_as_buffer_TupleProxy, /*tp_as_buffer*/
7007 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
7008 __Pyx_DOCSTR("Proxy class for access to parsed row as a tuple.\n\n This class represents a table row for fast read-access.\n\n Access to individual fields is via the [] operator.\n \n Only read-only access is implemented.\n "), /*tp_doc*/
7011 0, /*tp_richcompare*/
7012 0, /*tp_weaklistoffset*/
7013 __pyx_pf_10TabProxies_10TupleProxy_7__iter__, /*tp_iter*/
7014 __pyx_pf_10TabProxies_10TupleProxy_8__next__, /*tp_iternext*/
7015 __pyx_methods_10TabProxies_TupleProxy, /*tp_methods*/
7022 0, /*tp_dictoffset*/
7025 __pyx_tp_new_10TabProxies_TupleProxy, /*tp_new*/
7031 0, /*tp_subclasses*/
7034 #if PY_VERSION_HEX >= 0x02060000
7035 0, /*tp_version_tag*/
7038 static struct __pyx_vtabstruct_10TabProxies_GTFProxy __pyx_vtable_10TabProxies_GTFProxy;
7040 static PyObject *__pyx_tp_new_10TabProxies_GTFProxy(PyTypeObject *t, PyObject *a, PyObject *k) {
7041 struct __pyx_obj_10TabProxies_GTFProxy *p;
7042 PyObject *o = __pyx_tp_new_10TabProxies_TupleProxy(t, a, k);
7044 p = ((struct __pyx_obj_10TabProxies_GTFProxy *)o);
7045 p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_10TabProxies_TupleProxy*)__pyx_vtabptr_10TabProxies_GTFProxy;
7046 if (__pyx_pf_10TabProxies_8GTFProxy___cinit__(o, __pyx_empty_tuple, NULL) < 0) {
7047 Py_DECREF(o); o = 0;
7052 static void __pyx_tp_dealloc_10TabProxies_GTFProxy(PyObject *o) {
7054 PyObject *etype, *eval, *etb;
7055 PyErr_Fetch(&etype, &eval, &etb);
7057 __pyx_pf_10TabProxies_8GTFProxy_1__dealloc__(o);
7058 if (PyErr_Occurred()) PyErr_WriteUnraisable(o);
7060 PyErr_Restore(etype, eval, etb);
7062 __pyx_tp_dealloc_10TabProxies_TupleProxy(o);
7064 static PyObject *__pyx_sq_item_10TabProxies_GTFProxy(PyObject *o, Py_ssize_t i) {
7066 PyObject *x = PyInt_FromSsize_t(i); if(!x) return 0;
7067 r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x);
7072 static PyObject *__pyx_tp_getattro_10TabProxies_GTFProxy(PyObject *o, PyObject *n) {
7073 PyObject *v = PyObject_GenericGetAttr(o, n);
7074 if (!v && PyErr_ExceptionMatches(PyExc_AttributeError)) {
7076 v = __pyx_pf_10TabProxies_8GTFProxy_8__getattr__(o, n);
7081 static PyObject *__pyx_getprop_10TabProxies_8GTFProxy_contig(PyObject *o, void *x) {
7082 return __pyx_pf_10TabProxies_8GTFProxy_6contig___get__(o);
7085 static int __pyx_setprop_10TabProxies_8GTFProxy_contig(PyObject *o, PyObject *v, void *x) {
7087 return __pyx_pf_10TabProxies_8GTFProxy_6contig_1__set__(o, v);
7090 PyErr_SetString(PyExc_NotImplementedError, "__del__");
7095 static PyObject *__pyx_getprop_10TabProxies_8GTFProxy_feature(PyObject *o, void *x) {
7096 return __pyx_pf_10TabProxies_8GTFProxy_7feature___get__(o);
7099 static int __pyx_setprop_10TabProxies_8GTFProxy_feature(PyObject *o, PyObject *v, void *x) {
7101 return __pyx_pf_10TabProxies_8GTFProxy_7feature_1__set__(o, v);
7104 PyErr_SetString(PyExc_NotImplementedError, "__del__");
7109 static PyObject *__pyx_getprop_10TabProxies_8GTFProxy_source(PyObject *o, void *x) {
7110 return __pyx_pf_10TabProxies_8GTFProxy_6source___get__(o);
7113 static int __pyx_setprop_10TabProxies_8GTFProxy_source(PyObject *o, PyObject *v, void *x) {
7115 return __pyx_pf_10TabProxies_8GTFProxy_6source_1__set__(o, v);
7118 PyErr_SetString(PyExc_NotImplementedError, "__del__");
7123 static PyObject *__pyx_getprop_10TabProxies_8GTFProxy_start(PyObject *o, void *x) {
7124 return __pyx_pf_10TabProxies_8GTFProxy_5start___get__(o);
7127 static int __pyx_setprop_10TabProxies_8GTFProxy_start(PyObject *o, PyObject *v, void *x) {
7129 return __pyx_pf_10TabProxies_8GTFProxy_5start_1__set__(o, v);
7132 PyErr_SetString(PyExc_NotImplementedError, "__del__");
7137 static PyObject *__pyx_getprop_10TabProxies_8GTFProxy_end(PyObject *o, void *x) {
7138 return __pyx_pf_10TabProxies_8GTFProxy_3end___get__(o);
7141 static int __pyx_setprop_10TabProxies_8GTFProxy_end(PyObject *o, PyObject *v, void *x) {
7143 return __pyx_pf_10TabProxies_8GTFProxy_3end_1__set__(o, v);
7146 PyErr_SetString(PyExc_NotImplementedError, "__del__");
7151 static PyObject *__pyx_getprop_10TabProxies_8GTFProxy_score(PyObject *o, void *x) {
7152 return __pyx_pf_10TabProxies_8GTFProxy_5score___get__(o);
7155 static int __pyx_setprop_10TabProxies_8GTFProxy_score(PyObject *o, PyObject *v, void *x) {
7157 return __pyx_pf_10TabProxies_8GTFProxy_5score_1__set__(o, v);
7160 PyErr_SetString(PyExc_NotImplementedError, "__del__");
7165 static PyObject *__pyx_getprop_10TabProxies_8GTFProxy_strand(PyObject *o, void *x) {
7166 return __pyx_pf_10TabProxies_8GTFProxy_6strand___get__(o);
7169 static int __pyx_setprop_10TabProxies_8GTFProxy_strand(PyObject *o, PyObject *v, void *x) {
7171 return __pyx_pf_10TabProxies_8GTFProxy_6strand_1__set__(o, v);
7174 PyErr_SetString(PyExc_NotImplementedError, "__del__");
7179 static PyObject *__pyx_getprop_10TabProxies_8GTFProxy_frame(PyObject *o, void *x) {
7180 return __pyx_pf_10TabProxies_8GTFProxy_5frame___get__(o);
7183 static int __pyx_setprop_10TabProxies_8GTFProxy_frame(PyObject *o, PyObject *v, void *x) {
7185 return __pyx_pf_10TabProxies_8GTFProxy_5frame_1__set__(o, v);
7188 PyErr_SetString(PyExc_NotImplementedError, "__del__");
7193 static PyObject *__pyx_getprop_10TabProxies_8GTFProxy_attributes(PyObject *o, void *x) {
7194 return __pyx_pf_10TabProxies_8GTFProxy_10attributes___get__(o);
7197 static int __pyx_setprop_10TabProxies_8GTFProxy_attributes(PyObject *o, PyObject *v, void *x) {
7199 return __pyx_pf_10TabProxies_8GTFProxy_10attributes_1__set__(o, v);
7202 PyErr_SetString(PyExc_NotImplementedError, "__del__");
7207 static PyMethodDef __pyx_methods_10TabProxies_GTFProxy[] = {
7208 {__Pyx_NAMESTR("asDict"), (PyCFunction)__pyx_pf_10TabProxies_8GTFProxy_2asDict, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_10TabProxies_8GTFProxy_2asDict)},
7209 {__Pyx_NAMESTR("fromDict"), (PyCFunction)__pyx_pf_10TabProxies_8GTFProxy_3fromDict, METH_O, __Pyx_DOCSTR(__pyx_doc_10TabProxies_8GTFProxy_3fromDict)},
7210 {__Pyx_NAMESTR("invert"), (PyCFunction)__pyx_pf_10TabProxies_8GTFProxy_5invert, METH_O, __Pyx_DOCSTR(__pyx_doc_10TabProxies_8GTFProxy_5invert)},
7211 {__Pyx_NAMESTR("keys"), (PyCFunction)__pyx_pf_10TabProxies_8GTFProxy_6keys, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_10TabProxies_8GTFProxy_6keys)},
7212 {__Pyx_NAMESTR("__getattr__"), (PyCFunction)__pyx_pf_10TabProxies_8GTFProxy_8__getattr__, METH_O|METH_COEXIST, __Pyx_DOCSTR(__pyx_doc_10TabProxies_8GTFProxy_8__getattr__)},
7213 {__Pyx_NAMESTR("setAttribute"), (PyCFunction)__pyx_pf_10TabProxies_8GTFProxy_9setAttribute, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_10TabProxies_8GTFProxy_9setAttribute)},
7217 static struct PyGetSetDef __pyx_getsets_10TabProxies_GTFProxy[] = {
7218 {(char *)"contig", __pyx_getprop_10TabProxies_8GTFProxy_contig, __pyx_setprop_10TabProxies_8GTFProxy_contig, __Pyx_DOCSTR(__pyx_k_33), 0},
7219 {(char *)"feature", __pyx_getprop_10TabProxies_8GTFProxy_feature, __pyx_setprop_10TabProxies_8GTFProxy_feature, __Pyx_DOCSTR(__pyx_k_34), 0},
7220 {(char *)"source", __pyx_getprop_10TabProxies_8GTFProxy_source, __pyx_setprop_10TabProxies_8GTFProxy_source, __Pyx_DOCSTR(__pyx_k_35), 0},
7221 {(char *)"start", __pyx_getprop_10TabProxies_8GTFProxy_start, __pyx_setprop_10TabProxies_8GTFProxy_start, __Pyx_DOCSTR(__pyx_k_36), 0},
7222 {(char *)"end", __pyx_getprop_10TabProxies_8GTFProxy_end, __pyx_setprop_10TabProxies_8GTFProxy_end, __Pyx_DOCSTR(__pyx_k_37), 0},
7223 {(char *)"score", __pyx_getprop_10TabProxies_8GTFProxy_score, __pyx_setprop_10TabProxies_8GTFProxy_score, __Pyx_DOCSTR(__pyx_k_38), 0},
7224 {(char *)"strand", __pyx_getprop_10TabProxies_8GTFProxy_strand, __pyx_setprop_10TabProxies_8GTFProxy_strand, __Pyx_DOCSTR(__pyx_k_39), 0},
7225 {(char *)"frame", __pyx_getprop_10TabProxies_8GTFProxy_frame, __pyx_setprop_10TabProxies_8GTFProxy_frame, __Pyx_DOCSTR(__pyx_k_40), 0},
7226 {(char *)"attributes", __pyx_getprop_10TabProxies_8GTFProxy_attributes, __pyx_setprop_10TabProxies_8GTFProxy_attributes, __Pyx_DOCSTR(__pyx_k_41), 0},
7230 static PyNumberMethods __pyx_tp_as_number_GTFProxy = {
7234 #if PY_MAJOR_VERSION < 3
7250 #if PY_MAJOR_VERSION < 3
7254 #if PY_MAJOR_VERSION < 3
7260 #if PY_MAJOR_VERSION < 3
7263 #if PY_MAJOR_VERSION < 3
7266 0, /*nb_inplace_add*/
7267 0, /*nb_inplace_subtract*/
7268 0, /*nb_inplace_multiply*/
7269 #if PY_MAJOR_VERSION < 3
7270 0, /*nb_inplace_divide*/
7272 0, /*nb_inplace_remainder*/
7273 0, /*nb_inplace_power*/
7274 0, /*nb_inplace_lshift*/
7275 0, /*nb_inplace_rshift*/
7276 0, /*nb_inplace_and*/
7277 0, /*nb_inplace_xor*/
7278 0, /*nb_inplace_or*/
7279 0, /*nb_floor_divide*/
7280 0, /*nb_true_divide*/
7281 0, /*nb_inplace_floor_divide*/
7282 0, /*nb_inplace_true_divide*/
7283 #if PY_VERSION_HEX >= 0x02050000
7288 static PySequenceMethods __pyx_tp_as_sequence_GTFProxy = {
7292 __pyx_sq_item_10TabProxies_GTFProxy, /*sq_item*/
7297 0, /*sq_inplace_concat*/
7298 0, /*sq_inplace_repeat*/
7301 static PyMappingMethods __pyx_tp_as_mapping_GTFProxy = {
7303 __pyx_pf_10TabProxies_8GTFProxy_7__getitem__, /*mp_subscript*/
7304 0, /*mp_ass_subscript*/
7307 static PyBufferProcs __pyx_tp_as_buffer_GTFProxy = {
7308 #if PY_MAJOR_VERSION < 3
7309 0, /*bf_getreadbuffer*/
7311 #if PY_MAJOR_VERSION < 3
7312 0, /*bf_getwritebuffer*/
7314 #if PY_MAJOR_VERSION < 3
7315 0, /*bf_getsegcount*/
7317 #if PY_MAJOR_VERSION < 3
7318 0, /*bf_getcharbuffer*/
7320 #if PY_VERSION_HEX >= 0x02060000
7323 #if PY_VERSION_HEX >= 0x02060000
7324 0, /*bf_releasebuffer*/
7328 static PyTypeObject __pyx_type_10TabProxies_GTFProxy = {
7329 PyVarObject_HEAD_INIT(0, 0)
7330 __Pyx_NAMESTR("TabProxies.GTFProxy"), /*tp_name*/
7331 sizeof(struct __pyx_obj_10TabProxies_GTFProxy), /*tp_basicsize*/
7333 __pyx_tp_dealloc_10TabProxies_GTFProxy, /*tp_dealloc*/
7337 #if PY_MAJOR_VERSION < 3
7343 &__pyx_tp_as_number_GTFProxy, /*tp_as_number*/
7344 &__pyx_tp_as_sequence_GTFProxy, /*tp_as_sequence*/
7345 &__pyx_tp_as_mapping_GTFProxy, /*tp_as_mapping*/
7348 __pyx_pf_10TabProxies_8GTFProxy_4__str__, /*tp_str*/
7349 __pyx_tp_getattro_10TabProxies_GTFProxy, /*tp_getattro*/
7351 &__pyx_tp_as_buffer_GTFProxy, /*tp_as_buffer*/
7352 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
7353 __Pyx_DOCSTR("Proxy class for access to GTF fields.\n\n This class represents a GTF entry for fast read-access.\n Write-access has been added as well, though some care must\n be taken. If any of the string fields (contig, source, ...)\n are set, the new value is tied to the lifetime of the\n argument that was supplied.\n\n The only exception is the attributes field when set from\n a dictionary - this field will manage its own memory.\n\n "), /*tp_doc*/
7356 0, /*tp_richcompare*/
7357 0, /*tp_weaklistoffset*/
7360 __pyx_methods_10TabProxies_GTFProxy, /*tp_methods*/
7362 __pyx_getsets_10TabProxies_GTFProxy, /*tp_getset*/
7367 0, /*tp_dictoffset*/
7370 __pyx_tp_new_10TabProxies_GTFProxy, /*tp_new*/
7376 0, /*tp_subclasses*/
7379 #if PY_VERSION_HEX >= 0x02060000
7380 0, /*tp_version_tag*/
7383 static struct __pyx_vtabstruct_10TabProxies_NamedTupleProxy __pyx_vtable_10TabProxies_NamedTupleProxy;
7385 static PyObject *__pyx_tp_new_10TabProxies_NamedTupleProxy(PyTypeObject *t, PyObject *a, PyObject *k) {
7386 struct __pyx_obj_10TabProxies_NamedTupleProxy *p;
7387 PyObject *o = __pyx_tp_new_10TabProxies_TupleProxy(t, a, k);
7389 p = ((struct __pyx_obj_10TabProxies_NamedTupleProxy *)o);
7390 p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_10TabProxies_TupleProxy*)__pyx_vtabptr_10TabProxies_NamedTupleProxy;
7394 static PyObject *__pyx_tp_getattro_10TabProxies_NamedTupleProxy(PyObject *o, PyObject *n) {
7395 PyObject *v = PyObject_GenericGetAttr(o, n);
7396 if (!v && PyErr_ExceptionMatches(PyExc_AttributeError)) {
7398 v = __pyx_pf_10TabProxies_15NamedTupleProxy_1__getattr__(o, n);
7403 static int __pyx_tp_setattro_10TabProxies_NamedTupleProxy(PyObject *o, PyObject *n, PyObject *v) {
7405 return __pyx_pf_10TabProxies_15NamedTupleProxy___setattr__(o, n, v);
7408 if (__pyx_ptype_10TabProxies_TupleProxy->tp_setattro)
7409 return __pyx_ptype_10TabProxies_TupleProxy->tp_setattro(o, n, v);
7410 return PyObject_GenericSetAttr(o, n, 0);
7414 static PyMethodDef __pyx_methods_10TabProxies_NamedTupleProxy[] = {
7415 {__Pyx_NAMESTR("__getattr__"), (PyCFunction)__pyx_pf_10TabProxies_15NamedTupleProxy_1__getattr__, METH_O|METH_COEXIST, __Pyx_DOCSTR(0)},
7419 static PyNumberMethods __pyx_tp_as_number_NamedTupleProxy = {
7423 #if PY_MAJOR_VERSION < 3
7439 #if PY_MAJOR_VERSION < 3
7443 #if PY_MAJOR_VERSION < 3
7449 #if PY_MAJOR_VERSION < 3
7452 #if PY_MAJOR_VERSION < 3
7455 0, /*nb_inplace_add*/
7456 0, /*nb_inplace_subtract*/
7457 0, /*nb_inplace_multiply*/
7458 #if PY_MAJOR_VERSION < 3
7459 0, /*nb_inplace_divide*/
7461 0, /*nb_inplace_remainder*/
7462 0, /*nb_inplace_power*/
7463 0, /*nb_inplace_lshift*/
7464 0, /*nb_inplace_rshift*/
7465 0, /*nb_inplace_and*/
7466 0, /*nb_inplace_xor*/
7467 0, /*nb_inplace_or*/
7468 0, /*nb_floor_divide*/
7469 0, /*nb_true_divide*/
7470 0, /*nb_inplace_floor_divide*/
7471 0, /*nb_inplace_true_divide*/
7472 #if PY_VERSION_HEX >= 0x02050000
7477 static PySequenceMethods __pyx_tp_as_sequence_NamedTupleProxy = {
7486 0, /*sq_inplace_concat*/
7487 0, /*sq_inplace_repeat*/
7490 static PyMappingMethods __pyx_tp_as_mapping_NamedTupleProxy = {
7493 0, /*mp_ass_subscript*/
7496 static PyBufferProcs __pyx_tp_as_buffer_NamedTupleProxy = {
7497 #if PY_MAJOR_VERSION < 3
7498 0, /*bf_getreadbuffer*/
7500 #if PY_MAJOR_VERSION < 3
7501 0, /*bf_getwritebuffer*/
7503 #if PY_MAJOR_VERSION < 3
7504 0, /*bf_getsegcount*/
7506 #if PY_MAJOR_VERSION < 3
7507 0, /*bf_getcharbuffer*/
7509 #if PY_VERSION_HEX >= 0x02060000
7512 #if PY_VERSION_HEX >= 0x02060000
7513 0, /*bf_releasebuffer*/
7517 static PyTypeObject __pyx_type_10TabProxies_NamedTupleProxy = {
7518 PyVarObject_HEAD_INIT(0, 0)
7519 __Pyx_NAMESTR("TabProxies.NamedTupleProxy"), /*tp_name*/
7520 sizeof(struct __pyx_obj_10TabProxies_NamedTupleProxy), /*tp_basicsize*/
7522 __pyx_tp_dealloc_10TabProxies_TupleProxy, /*tp_dealloc*/
7526 #if PY_MAJOR_VERSION < 3
7532 &__pyx_tp_as_number_NamedTupleProxy, /*tp_as_number*/
7533 &__pyx_tp_as_sequence_NamedTupleProxy, /*tp_as_sequence*/
7534 &__pyx_tp_as_mapping_NamedTupleProxy, /*tp_as_mapping*/
7538 __pyx_tp_getattro_10TabProxies_NamedTupleProxy, /*tp_getattro*/
7539 __pyx_tp_setattro_10TabProxies_NamedTupleProxy, /*tp_setattro*/
7540 &__pyx_tp_as_buffer_NamedTupleProxy, /*tp_as_buffer*/
7541 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
7545 0, /*tp_richcompare*/
7546 0, /*tp_weaklistoffset*/
7549 __pyx_methods_10TabProxies_NamedTupleProxy, /*tp_methods*/
7556 0, /*tp_dictoffset*/
7559 __pyx_tp_new_10TabProxies_NamedTupleProxy, /*tp_new*/
7565 0, /*tp_subclasses*/
7568 #if PY_VERSION_HEX >= 0x02060000
7569 0, /*tp_version_tag*/
7572 static struct __pyx_vtabstruct_10TabProxies_BedProxy __pyx_vtable_10TabProxies_BedProxy;
7574 static PyObject *__pyx_tp_new_10TabProxies_BedProxy(PyTypeObject *t, PyObject *a, PyObject *k) {
7575 struct __pyx_obj_10TabProxies_BedProxy *p;
7576 PyObject *o = __pyx_tp_new_10TabProxies_TupleProxy(t, a, k);
7578 p = ((struct __pyx_obj_10TabProxies_BedProxy *)o);
7579 p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_10TabProxies_TupleProxy*)__pyx_vtabptr_10TabProxies_BedProxy;
7583 static int __pyx_tp_setattro_10TabProxies_BedProxy(PyObject *o, PyObject *n, PyObject *v) {
7585 return __pyx_pf_10TabProxies_8BedProxy_1__setattr__(o, n, v);
7588 if (__pyx_ptype_10TabProxies_NamedTupleProxy->tp_setattro)
7589 return __pyx_ptype_10TabProxies_NamedTupleProxy->tp_setattro(o, n, v);
7590 return PyObject_GenericSetAttr(o, n, 0);
7594 static PyMethodDef __pyx_methods_10TabProxies_BedProxy[] = {
7598 static PyNumberMethods __pyx_tp_as_number_BedProxy = {
7602 #if PY_MAJOR_VERSION < 3
7618 #if PY_MAJOR_VERSION < 3
7622 #if PY_MAJOR_VERSION < 3
7628 #if PY_MAJOR_VERSION < 3
7631 #if PY_MAJOR_VERSION < 3
7634 0, /*nb_inplace_add*/
7635 0, /*nb_inplace_subtract*/
7636 0, /*nb_inplace_multiply*/
7637 #if PY_MAJOR_VERSION < 3
7638 0, /*nb_inplace_divide*/
7640 0, /*nb_inplace_remainder*/
7641 0, /*nb_inplace_power*/
7642 0, /*nb_inplace_lshift*/
7643 0, /*nb_inplace_rshift*/
7644 0, /*nb_inplace_and*/
7645 0, /*nb_inplace_xor*/
7646 0, /*nb_inplace_or*/
7647 0, /*nb_floor_divide*/
7648 0, /*nb_true_divide*/
7649 0, /*nb_inplace_floor_divide*/
7650 0, /*nb_inplace_true_divide*/
7651 #if PY_VERSION_HEX >= 0x02050000
7656 static PySequenceMethods __pyx_tp_as_sequence_BedProxy = {
7665 0, /*sq_inplace_concat*/
7666 0, /*sq_inplace_repeat*/
7669 static PyMappingMethods __pyx_tp_as_mapping_BedProxy = {
7672 0, /*mp_ass_subscript*/
7675 static PyBufferProcs __pyx_tp_as_buffer_BedProxy = {
7676 #if PY_MAJOR_VERSION < 3
7677 0, /*bf_getreadbuffer*/
7679 #if PY_MAJOR_VERSION < 3
7680 0, /*bf_getwritebuffer*/
7682 #if PY_MAJOR_VERSION < 3
7683 0, /*bf_getsegcount*/
7685 #if PY_MAJOR_VERSION < 3
7686 0, /*bf_getcharbuffer*/
7688 #if PY_VERSION_HEX >= 0x02060000
7691 #if PY_VERSION_HEX >= 0x02060000
7692 0, /*bf_releasebuffer*/
7696 static PyTypeObject __pyx_type_10TabProxies_BedProxy = {
7697 PyVarObject_HEAD_INIT(0, 0)
7698 __Pyx_NAMESTR("TabProxies.BedProxy"), /*tp_name*/
7699 sizeof(struct __pyx_obj_10TabProxies_BedProxy), /*tp_basicsize*/
7701 __pyx_tp_dealloc_10TabProxies_TupleProxy, /*tp_dealloc*/
7705 #if PY_MAJOR_VERSION < 3
7711 &__pyx_tp_as_number_BedProxy, /*tp_as_number*/
7712 &__pyx_tp_as_sequence_BedProxy, /*tp_as_sequence*/
7713 &__pyx_tp_as_mapping_BedProxy, /*tp_as_mapping*/
7716 __pyx_pf_10TabProxies_8BedProxy___str__, /*tp_str*/
7718 __pyx_tp_setattro_10TabProxies_BedProxy, /*tp_setattro*/
7719 &__pyx_tp_as_buffer_BedProxy, /*tp_as_buffer*/
7720 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
7721 __Pyx_DOCSTR("Proxy class for access to Bed fields.\n\n This class represents a GTF entry for fast read-access.\n "), /*tp_doc*/
7724 0, /*tp_richcompare*/
7725 0, /*tp_weaklistoffset*/
7728 __pyx_methods_10TabProxies_BedProxy, /*tp_methods*/
7735 0, /*tp_dictoffset*/
7738 __pyx_tp_new_10TabProxies_BedProxy, /*tp_new*/
7744 0, /*tp_subclasses*/
7747 #if PY_VERSION_HEX >= 0x02060000
7748 0, /*tp_version_tag*/
7751 static struct __pyx_vtabstruct_10TabProxies_VCFProxy __pyx_vtable_10TabProxies_VCFProxy;
7753 static PyObject *__pyx_tp_new_10TabProxies_VCFProxy(PyTypeObject *t, PyObject *a, PyObject *k) {
7754 struct __pyx_obj_10TabProxies_VCFProxy *p;
7755 PyObject *o = __pyx_tp_new_10TabProxies_TupleProxy(t, a, k);
7757 p = ((struct __pyx_obj_10TabProxies_VCFProxy *)o);
7758 p->__pyx_base.__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_10TabProxies_TupleProxy*)__pyx_vtabptr_10TabProxies_VCFProxy;
7759 if (__pyx_pf_10TabProxies_8VCFProxy___cinit__(o, __pyx_empty_tuple, NULL) < 0) {
7760 Py_DECREF(o); o = 0;
7765 static int __pyx_tp_setattro_10TabProxies_VCFProxy(PyObject *o, PyObject *n, PyObject *v) {
7767 return __pyx_pf_10TabProxies_8VCFProxy_2__setattr__(o, n, v);
7770 if (__pyx_ptype_10TabProxies_NamedTupleProxy->tp_setattro)
7771 return __pyx_ptype_10TabProxies_NamedTupleProxy->tp_setattro(o, n, v);
7772 return PyObject_GenericSetAttr(o, n, 0);
7776 static PyObject *__pyx_getprop_10TabProxies_8VCFProxy_pos(PyObject *o, void *x) {
7777 return __pyx_pf_10TabProxies_8VCFProxy_3pos___get__(o);
7780 static PyMethodDef __pyx_methods_10TabProxies_VCFProxy[] = {
7784 static struct PyGetSetDef __pyx_getsets_10TabProxies_VCFProxy[] = {
7785 {(char *)"pos", __pyx_getprop_10TabProxies_8VCFProxy_pos, 0, __Pyx_DOCSTR(__pyx_k_37), 0},
7789 static PyNumberMethods __pyx_tp_as_number_VCFProxy = {
7793 #if PY_MAJOR_VERSION < 3
7809 #if PY_MAJOR_VERSION < 3
7813 #if PY_MAJOR_VERSION < 3
7819 #if PY_MAJOR_VERSION < 3
7822 #if PY_MAJOR_VERSION < 3
7825 0, /*nb_inplace_add*/
7826 0, /*nb_inplace_subtract*/
7827 0, /*nb_inplace_multiply*/
7828 #if PY_MAJOR_VERSION < 3
7829 0, /*nb_inplace_divide*/
7831 0, /*nb_inplace_remainder*/
7832 0, /*nb_inplace_power*/
7833 0, /*nb_inplace_lshift*/
7834 0, /*nb_inplace_rshift*/
7835 0, /*nb_inplace_and*/
7836 0, /*nb_inplace_xor*/
7837 0, /*nb_inplace_or*/
7838 0, /*nb_floor_divide*/
7839 0, /*nb_true_divide*/
7840 0, /*nb_inplace_floor_divide*/
7841 0, /*nb_inplace_true_divide*/
7842 #if PY_VERSION_HEX >= 0x02050000
7847 static PySequenceMethods __pyx_tp_as_sequence_VCFProxy = {
7848 __pyx_pf_10TabProxies_8VCFProxy_1__len__, /*sq_length*/
7856 0, /*sq_inplace_concat*/
7857 0, /*sq_inplace_repeat*/
7860 static PyMappingMethods __pyx_tp_as_mapping_VCFProxy = {
7861 __pyx_pf_10TabProxies_8VCFProxy_1__len__, /*mp_length*/
7863 0, /*mp_ass_subscript*/
7866 static PyBufferProcs __pyx_tp_as_buffer_VCFProxy = {
7867 #if PY_MAJOR_VERSION < 3
7868 0, /*bf_getreadbuffer*/
7870 #if PY_MAJOR_VERSION < 3
7871 0, /*bf_getwritebuffer*/
7873 #if PY_MAJOR_VERSION < 3
7874 0, /*bf_getsegcount*/
7876 #if PY_MAJOR_VERSION < 3
7877 0, /*bf_getcharbuffer*/
7879 #if PY_VERSION_HEX >= 0x02060000
7882 #if PY_VERSION_HEX >= 0x02060000
7883 0, /*bf_releasebuffer*/
7887 static PyTypeObject __pyx_type_10TabProxies_VCFProxy = {
7888 PyVarObject_HEAD_INIT(0, 0)
7889 __Pyx_NAMESTR("TabProxies.VCFProxy"), /*tp_name*/
7890 sizeof(struct __pyx_obj_10TabProxies_VCFProxy), /*tp_basicsize*/
7892 __pyx_tp_dealloc_10TabProxies_TupleProxy, /*tp_dealloc*/
7896 #if PY_MAJOR_VERSION < 3
7902 &__pyx_tp_as_number_VCFProxy, /*tp_as_number*/
7903 &__pyx_tp_as_sequence_VCFProxy, /*tp_as_sequence*/
7904 &__pyx_tp_as_mapping_VCFProxy, /*tp_as_mapping*/
7909 __pyx_tp_setattro_10TabProxies_VCFProxy, /*tp_setattro*/
7910 &__pyx_tp_as_buffer_VCFProxy, /*tp_as_buffer*/
7911 Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
7912 __Pyx_DOCSTR("Proxy class for access to VCF fields.\n\n The genotypes are accessed via index.\n "), /*tp_doc*/
7915 0, /*tp_richcompare*/
7916 0, /*tp_weaklistoffset*/
7919 __pyx_methods_10TabProxies_VCFProxy, /*tp_methods*/
7921 __pyx_getsets_10TabProxies_VCFProxy, /*tp_getset*/
7926 0, /*tp_dictoffset*/
7929 __pyx_tp_new_10TabProxies_VCFProxy, /*tp_new*/
7935 0, /*tp_subclasses*/
7938 #if PY_VERSION_HEX >= 0x02060000
7939 0, /*tp_version_tag*/
7943 static PyMethodDef __pyx_methods[] = {
7947 #if PY_MAJOR_VERSION >= 3
7948 static struct PyModuleDef __pyx_moduledef = {
7949 PyModuleDef_HEAD_INIT,
7950 __Pyx_NAMESTR("TabProxies"),
7953 __pyx_methods /* m_methods */,
7954 NULL, /* m_reload */
7955 NULL, /* m_traverse */
7961 static __Pyx_StringTabEntry __pyx_string_tab[] = {
7962 {&__pyx_kp_s_1, __pyx_k_1, sizeof(__pyx_k_1), 0, 0, 1, 0},
7963 {&__pyx_kp_s_10, __pyx_k_10, sizeof(__pyx_k_10), 0, 0, 1, 0},
7964 {&__pyx_kp_s_14, __pyx_k_14, sizeof(__pyx_k_14), 0, 0, 1, 0},
7965 {&__pyx_kp_s_16, __pyx_k_16, sizeof(__pyx_k_16), 0, 0, 1, 0},
7966 {&__pyx_kp_s_17, __pyx_k_17, sizeof(__pyx_k_17), 0, 0, 1, 0},
7967 {&__pyx_kp_s_18, __pyx_k_18, sizeof(__pyx_k_18), 0, 0, 1, 0},
7968 {&__pyx_kp_s_2, __pyx_k_2, sizeof(__pyx_k_2), 0, 0, 1, 0},
7969 {&__pyx_kp_s_20, __pyx_k_20, sizeof(__pyx_k_20), 0, 0, 1, 0},
7970 {&__pyx_kp_s_22, __pyx_k_22, sizeof(__pyx_k_22), 0, 0, 1, 0},
7971 {&__pyx_kp_s_23, __pyx_k_23, sizeof(__pyx_k_23), 0, 0, 1, 0},
7972 {&__pyx_kp_s_24, __pyx_k_24, sizeof(__pyx_k_24), 0, 0, 1, 0},
7973 {&__pyx_kp_s_25, __pyx_k_25, sizeof(__pyx_k_25), 0, 0, 1, 0},
7974 {&__pyx_kp_s_29, __pyx_k_29, sizeof(__pyx_k_29), 0, 0, 1, 0},
7975 {&__pyx_kp_s_3, __pyx_k_3, sizeof(__pyx_k_3), 0, 0, 1, 0},
7976 {&__pyx_kp_s_30, __pyx_k_30, sizeof(__pyx_k_30), 0, 0, 1, 0},
7977 {&__pyx_kp_s_31, __pyx_k_31, sizeof(__pyx_k_31), 0, 0, 1, 0},
7978 {&__pyx_kp_s_5, __pyx_k_5, sizeof(__pyx_k_5), 0, 0, 1, 0},
7979 {&__pyx_kp_s_7, __pyx_k_7, sizeof(__pyx_k_7), 0, 0, 1, 0},
7980 {&__pyx_kp_s_8, __pyx_k_8, sizeof(__pyx_k_8), 0, 0, 1, 0},
7981 {&__pyx_n_s__AttributeError, __pyx_k__AttributeError, sizeof(__pyx_k__AttributeError), 0, 0, 1, 1},
7982 {&__pyx_n_s__IndexError, __pyx_k__IndexError, sizeof(__pyx_k__IndexError), 0, 0, 1, 1},
7983 {&__pyx_n_s__KeyError, __pyx_k__KeyError, sizeof(__pyx_k__KeyError), 0, 0, 1, 1},
7984 {&__pyx_n_s__StopIteration, __pyx_k__StopIteration, sizeof(__pyx_k__StopIteration), 0, 0, 1, 1},
7985 {&__pyx_n_s__StringType, __pyx_k__StringType, sizeof(__pyx_k__StringType), 0, 0, 1, 1},
7986 {&__pyx_n_s__StringTypes, __pyx_k__StringTypes, sizeof(__pyx_k__StringTypes), 0, 0, 1, 1},
7987 {&__pyx_n_s__TabProxies, __pyx_k__TabProxies, sizeof(__pyx_k__TabProxies), 0, 0, 1, 1},
7988 {&__pyx_n_s__TypeError, __pyx_k__TypeError, sizeof(__pyx_k__TypeError), 0, 0, 1, 1},
7989 {&__pyx_n_s__ValueError, __pyx_k__ValueError, sizeof(__pyx_k__ValueError), 0, 0, 1, 1},
7990 {&__pyx_n_s____getattr__, __pyx_k____getattr__, sizeof(__pyx_k____getattr__), 0, 0, 1, 1},
7991 {&__pyx_n_s____main__, __pyx_k____main__, sizeof(__pyx_k____main__), 0, 0, 1, 1},
7992 {&__pyx_n_s____setitem__, __pyx_k____setitem__, sizeof(__pyx_k____setitem__), 0, 0, 1, 1},
7993 {&__pyx_n_s____str__, __pyx_k____str__, sizeof(__pyx_k____str__), 0, 0, 1, 1},
7994 {&__pyx_n_s____test__, __pyx_k____test__, sizeof(__pyx_k____test__), 0, 0, 1, 1},
7995 {&__pyx_n_s___getindex, __pyx_k___getindex, sizeof(__pyx_k___getindex), 0, 0, 1, 1},
7996 {&__pyx_n_s___setindex, __pyx_k___setindex, sizeof(__pyx_k___setindex), 0, 0, 1, 1},
7997 {&__pyx_n_s__alt, __pyx_k__alt, sizeof(__pyx_k__alt), 0, 0, 1, 1},
7998 {&__pyx_n_s__append, __pyx_k__append, sizeof(__pyx_k__append), 0, 0, 1, 1},
7999 {&__pyx_n_s__asDict, __pyx_k__asDict, sizeof(__pyx_k__asDict), 0, 0, 1, 1},
8000 {&__pyx_n_s__attributes, __pyx_k__attributes, sizeof(__pyx_k__attributes), 0, 0, 1, 1},
8001 {&__pyx_n_s__bedfields, __pyx_k__bedfields, sizeof(__pyx_k__bedfields), 0, 0, 1, 1},
8002 {&__pyx_n_s__blockCount, __pyx_k__blockCount, sizeof(__pyx_k__blockCount), 0, 0, 1, 1},
8003 {&__pyx_n_s__blockSizes, __pyx_k__blockSizes, sizeof(__pyx_k__blockSizes), 0, 0, 1, 1},
8004 {&__pyx_n_s__blockStarts, __pyx_k__blockStarts, sizeof(__pyx_k__blockStarts), 0, 0, 1, 1},
8005 {&__pyx_n_s__contig, __pyx_k__contig, sizeof(__pyx_k__contig), 0, 0, 1, 1},
8006 {&__pyx_n_s__data, __pyx_k__data, sizeof(__pyx_k__data), 0, 0, 1, 1},
8007 {&__pyx_n_s__end, __pyx_k__end, sizeof(__pyx_k__end), 0, 0, 1, 1},
8008 {&__pyx_n_s__feature, __pyx_k__feature, sizeof(__pyx_k__feature), 0, 0, 1, 1},
8009 {&__pyx_n_s__fields, __pyx_k__fields, sizeof(__pyx_k__fields), 0, 0, 1, 1},
8010 {&__pyx_n_s__filter, __pyx_k__filter, sizeof(__pyx_k__filter), 0, 0, 1, 1},
8011 {&__pyx_n_s__format, __pyx_k__format, sizeof(__pyx_k__format), 0, 0, 1, 1},
8012 {&__pyx_n_s__frame, __pyx_k__frame, sizeof(__pyx_k__frame), 0, 0, 1, 1},
8013 {&__pyx_n_s__fromDict, __pyx_k__fromDict, sizeof(__pyx_k__fromDict), 0, 0, 1, 1},
8014 {&__pyx_n_s__getMaxFields, __pyx_k__getMaxFields, sizeof(__pyx_k__getMaxFields), 0, 0, 1, 1},
8015 {&__pyx_n_s__hasOwnAttributes, __pyx_k__hasOwnAttributes, sizeof(__pyx_k__hasOwnAttributes), 0, 0, 1, 1},
8016 {&__pyx_n_s__id, __pyx_k__id, sizeof(__pyx_k__id), 0, 0, 1, 1},
8017 {&__pyx_n_s__index, __pyx_k__index, sizeof(__pyx_k__index), 0, 0, 1, 1},
8018 {&__pyx_n_s__indices, __pyx_k__indices, sizeof(__pyx_k__indices), 0, 0, 1, 1},
8019 {&__pyx_n_s__info, __pyx_k__info, sizeof(__pyx_k__info), 0, 0, 1, 1},
8020 {&__pyx_n_s__is_modified, __pyx_k__is_modified, sizeof(__pyx_k__is_modified), 0, 0, 1, 1},
8021 {&__pyx_n_s__itemRGB, __pyx_k__itemRGB, sizeof(__pyx_k__itemRGB), 0, 0, 1, 1},
8022 {&__pyx_n_s__items, __pyx_k__items, sizeof(__pyx_k__items), 0, 0, 1, 1},
8023 {&__pyx_n_s__join, __pyx_k__join, sizeof(__pyx_k__join), 0, 0, 1, 1},
8024 {&__pyx_n_s__map_key2field, __pyx_k__map_key2field, sizeof(__pyx_k__map_key2field), 0, 0, 1, 1},
8025 {&__pyx_n_s__name, __pyx_k__name, sizeof(__pyx_k__name), 0, 0, 1, 1},
8026 {&__pyx_n_s__nbytes, __pyx_k__nbytes, sizeof(__pyx_k__nbytes), 0, 0, 1, 1},
8027 {&__pyx_n_s__nfields, __pyx_k__nfields, sizeof(__pyx_k__nfields), 0, 0, 1, 1},
8028 {&__pyx_n_s__offset, __pyx_k__offset, sizeof(__pyx_k__offset), 0, 0, 1, 1},
8029 {&__pyx_n_s__pos, __pyx_k__pos, sizeof(__pyx_k__pos), 0, 0, 1, 1},
8030 {&__pyx_n_s__qual, __pyx_k__qual, sizeof(__pyx_k__qual), 0, 0, 1, 1},
8031 {&__pyx_n_s__quote, __pyx_k__quote, sizeof(__pyx_k__quote), 0, 0, 1, 1},
8032 {&__pyx_n_s__range, __pyx_k__range, sizeof(__pyx_k__range), 0, 0, 1, 1},
8033 {&__pyx_n_s__ref, __pyx_k__ref, sizeof(__pyx_k__ref), 0, 0, 1, 1},
8034 {&__pyx_n_s__score, __pyx_k__score, sizeof(__pyx_k__score), 0, 0, 1, 1},
8035 {&__pyx_n_s__source, __pyx_k__source, sizeof(__pyx_k__source), 0, 0, 1, 1},
8036 {&__pyx_n_s__split, __pyx_k__split, sizeof(__pyx_k__split), 0, 0, 1, 1},
8037 {&__pyx_n_s__start, __pyx_k__start, sizeof(__pyx_k__start), 0, 0, 1, 1},
8038 {&__pyx_n_s__strand, __pyx_k__strand, sizeof(__pyx_k__strand), 0, 0, 1, 1},
8039 {&__pyx_n_s__strip, __pyx_k__strip, sizeof(__pyx_k__strip), 0, 0, 1, 1},
8040 {&__pyx_n_s__thickEnd, __pyx_k__thickEnd, sizeof(__pyx_k__thickEnd), 0, 0, 1, 1},
8041 {&__pyx_n_s__thickStart, __pyx_k__thickStart, sizeof(__pyx_k__thickStart), 0, 0, 1, 1},
8042 {&__pyx_n_s__toDot, __pyx_k__toDot, sizeof(__pyx_k__toDot), 0, 0, 1, 1},
8043 {&__pyx_n_s__types, __pyx_k__types, sizeof(__pyx_k__types), 0, 0, 1, 1},
8044 {&__pyx_n_s__update, __pyx_k__update, sizeof(__pyx_k__update), 0, 0, 1, 1},
8045 {&__pyx_n_s__value, __pyx_k__value, sizeof(__pyx_k__value), 0, 0, 1, 1},
8046 {&__pyx_n_s__xrange, __pyx_k__xrange, sizeof(__pyx_k__xrange), 0, 0, 1, 1},
8047 {0, 0, 0, 0, 0, 0, 0}
8049 static int __Pyx_InitCachedBuiltins(void) {
8050 __pyx_builtin_ValueError = __Pyx_GetName(__pyx_b, __pyx_n_s__ValueError); if (!__pyx_builtin_ValueError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 7; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8051 __pyx_builtin_IndexError = __Pyx_GetName(__pyx_b, __pyx_n_s__IndexError); if (!__pyx_builtin_IndexError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 148; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8052 __pyx_builtin_range = __Pyx_GetName(__pyx_b, __pyx_n_s__range); if (!__pyx_builtin_range) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 159; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8053 __pyx_builtin_StopIteration = __Pyx_GetName(__pyx_b, __pyx_n_s__StopIteration); if (!__pyx_builtin_StopIteration) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8054 #if PY_MAJOR_VERSION >= 3
8055 __pyx_builtin_xrange = __Pyx_GetName(__pyx_b, __pyx_n_s__range); if (!__pyx_builtin_xrange) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8057 __pyx_builtin_xrange = __Pyx_GetName(__pyx_b, __pyx_n_s__xrange); if (!__pyx_builtin_xrange) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8059 __pyx_builtin_TypeError = __Pyx_GetName(__pyx_b, __pyx_n_s__TypeError); if (!__pyx_builtin_TypeError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8060 __pyx_builtin_AttributeError = __Pyx_GetName(__pyx_b, __pyx_n_s__AttributeError); if (!__pyx_builtin_AttributeError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 472; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8061 __pyx_builtin_KeyError = __Pyx_GetName(__pyx_b, __pyx_n_s__KeyError); if (!__pyx_builtin_KeyError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 502; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8067 static int __Pyx_InitCachedConstants(void) {
8068 __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants");
8070 /* "TabProxies.pyx":77
8071 * self.data = <char*>malloc( s )
8072 * if self.data == NULL:
8073 * raise ValueError("out of memory" ) # <<<<<<<<<<<<<<
8074 * self.nbytes = nbytes
8075 * memcpy( <char*>self.data, buffer, s )
8077 __pyx_k_tuple_4 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8078 __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_4));
8079 __Pyx_INCREF(((PyObject *)__pyx_kp_s_3));
8080 PyTuple_SET_ITEM(__pyx_k_tuple_4, 0, ((PyObject *)__pyx_kp_s_3));
8081 __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_3));
8082 __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_4));
8084 /* "TabProxies.pyx":119
8085 * self.fields = <char **>calloc( max_fields, sizeof(char *) )
8086 * if self.fields == NULL:
8087 * raise ValueError("out of memory" ) # <<<<<<<<<<<<<<
8089 * #################################
8091 __pyx_k_tuple_6 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 119; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8092 __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_6));
8093 __Pyx_INCREF(((PyObject *)__pyx_kp_s_3));
8094 PyTuple_SET_ITEM(__pyx_k_tuple_6, 0, ((PyObject *)__pyx_kp_s_3));
8095 __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_3));
8096 __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_6));
8098 /* "TabProxies.pyx":148
8099 * cdef int i = index
8100 * if i < 0: i += self.nfields
8101 * if i < 0: raise IndexError( "list index out of range" ) # <<<<<<<<<<<<<<
8103 * if i >= self.nfields:
8105 __pyx_k_tuple_9 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 148; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8106 __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_9));
8107 __Pyx_INCREF(((PyObject *)__pyx_kp_s_8));
8108 PyTuple_SET_ITEM(__pyx_k_tuple_9, 0, ((PyObject *)__pyx_kp_s_8));
8109 __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_8));
8110 __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_9));
8112 /* "TabProxies.pyx":166
8113 * '''set item at idx index.'''
8114 * cdef int idx = index
8115 * if idx < 0: raise IndexError( "list index out of range" ) # <<<<<<<<<<<<<<
8116 * if idx >= self.nfields:
8117 * raise IndexError( "list index out of range" )
8119 __pyx_k_tuple_11 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 166; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8120 __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_11));
8121 __Pyx_INCREF(((PyObject *)__pyx_kp_s_8));
8122 PyTuple_SET_ITEM(__pyx_k_tuple_11, 0, ((PyObject *)__pyx_kp_s_8));
8123 __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_8));
8124 __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_11));
8126 /* "TabProxies.pyx":168
8127 * if idx < 0: raise IndexError( "list index out of range" )
8128 * if idx >= self.nfields:
8129 * raise IndexError( "list index out of range" ) # <<<<<<<<<<<<<<
8131 * if isNew( self.fields[idx], self.data, self.nbytes ):
8133 __pyx_k_tuple_12 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8134 __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_12));
8135 __Pyx_INCREF(((PyObject *)__pyx_kp_s_8));
8136 PyTuple_SET_ITEM(__pyx_k_tuple_12, 0, ((PyObject *)__pyx_kp_s_8));
8137 __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_8));
8138 __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_12));
8140 /* "TabProxies.pyx":183
8141 * self.fields[idx] = <char*>malloc( (strlen( tmp ) + 1) * sizeof(char) )
8142 * if self.fields[idx] == NULL:
8143 * raise ValueError("out of memory" ) # <<<<<<<<<<<<<<
8144 * strcpy( self.fields[idx], tmp )
8147 __pyx_k_tuple_13 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 183; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8148 __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_13));
8149 __Pyx_INCREF(((PyObject *)__pyx_kp_s_3));
8150 PyTuple_SET_ITEM(__pyx_k_tuple_13, 0, ((PyObject *)__pyx_kp_s_3));
8151 __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_3));
8152 __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_13));
8154 /* "TabProxies.pyx":220
8155 * cpy = <char*>calloc( sizeof(char), self.nbytes+1 )
8157 * raise ValueError("out of memory" ) # <<<<<<<<<<<<<<
8158 * memcpy( cpy, self.data, self.nbytes+1)
8159 * for x from 0 <= x < self.nbytes:
8161 __pyx_k_tuple_15 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 220; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8162 __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_15));
8163 __Pyx_INCREF(((PyObject *)__pyx_kp_s_3));
8164 PyTuple_SET_ITEM(__pyx_k_tuple_15, 0, ((PyObject *)__pyx_kp_s_3));
8165 __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_3));
8166 __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_15));
8168 /* "TabProxies.pyx":368
8170 * # separate into fields
8171 * fields = [ x.strip() for x in attributes.split(";")[:-1]] # <<<<<<<<<<<<<<
8175 __pyx_k_tuple_19 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 368; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8176 __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_19));
8177 __Pyx_INCREF(((PyObject *)__pyx_kp_s_18));
8178 PyTuple_SET_ITEM(__pyx_k_tuple_19, 0, ((PyObject *)__pyx_kp_s_18));
8179 __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_18));
8180 __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_19));
8182 /* "TabProxies.pyx":374
8185 * d = [ x.strip() for x in f.split(" ")] # <<<<<<<<<<<<<<
8189 __pyx_k_tuple_21 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_21)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 374; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8190 __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_21));
8191 __Pyx_INCREF(((PyObject *)__pyx_kp_s_20));
8192 PyTuple_SET_ITEM(__pyx_k_tuple_21, 0, ((PyObject *)__pyx_kp_s_20));
8193 __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_20));
8194 __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_21));
8196 /* "TabProxies.pyx":416
8197 * self.attributes = <char *>calloc( l + 1, sizeof(char) )
8198 * if self.attributes == NULL:
8199 * raise ValueError("out of memory" ) # <<<<<<<<<<<<<<
8200 * memcpy( self.attributes, p, l )
8203 __pyx_k_tuple_26 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_26)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 416; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8204 __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_26));
8205 __Pyx_INCREF(((PyObject *)__pyx_kp_s_3));
8206 PyTuple_SET_ITEM(__pyx_k_tuple_26, 0, ((PyObject *)__pyx_kp_s_3));
8207 __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_3));
8208 __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_26));
8210 /* "TabProxies.pyx":454
8211 * '''return a list of attributes defined in this entry.'''
8212 * r = self.attributes
8213 * return [ x.strip().split(" ")[0] for x in r.split(";") if x.strip() != '' ] # <<<<<<<<<<<<<<
8215 * def __getitem__(self, key):
8217 __pyx_k_tuple_27 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_27)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 454; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8218 __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_27));
8219 __Pyx_INCREF(((PyObject *)__pyx_kp_s_18));
8220 PyTuple_SET_ITEM(__pyx_k_tuple_27, 0, ((PyObject *)__pyx_kp_s_18));
8221 __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_18));
8222 __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_27));
8223 __pyx_k_tuple_28 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_28)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 454; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8224 __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_28));
8225 __Pyx_INCREF(((PyObject *)__pyx_kp_s_20));
8226 PyTuple_SET_ITEM(__pyx_k_tuple_28, 0, ((PyObject *)__pyx_kp_s_20));
8227 __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_20));
8228 __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_28));
8230 /* "TabProxies.pyx":543
8232 * if self.nfields < 3:
8233 * raise ValueError( "bed format requires at least three columns" ) # <<<<<<<<<<<<<<
8235 * # determines bed format
8237 __pyx_k_tuple_32 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_32)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 543; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8238 __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_32));
8239 __Pyx_INCREF(((PyObject *)__pyx_kp_s_31));
8240 PyTuple_SET_ITEM(__pyx_k_tuple_32, 0, ((PyObject *)__pyx_kp_s_31));
8241 __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_31));
8242 __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_32));
8243 __Pyx_RefNannyFinishContext();
8246 __Pyx_RefNannyFinishContext();
8250 static int __Pyx_InitGlobals(void) {
8251 if (__Pyx_InitStrings(__pyx_string_tab) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
8252 __pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
8253 __pyx_int_1 = PyInt_FromLong(1); if (unlikely(!__pyx_int_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
8254 __pyx_int_2 = PyInt_FromLong(2); if (unlikely(!__pyx_int_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
8255 __pyx_int_3 = PyInt_FromLong(3); if (unlikely(!__pyx_int_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
8256 __pyx_int_4 = PyInt_FromLong(4); if (unlikely(!__pyx_int_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
8257 __pyx_int_5 = PyInt_FromLong(5); if (unlikely(!__pyx_int_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
8258 __pyx_int_6 = PyInt_FromLong(6); if (unlikely(!__pyx_int_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
8259 __pyx_int_7 = PyInt_FromLong(7); if (unlikely(!__pyx_int_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
8260 __pyx_int_8 = PyInt_FromLong(8); if (unlikely(!__pyx_int_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
8261 __pyx_int_9 = PyInt_FromLong(9); if (unlikely(!__pyx_int_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
8262 __pyx_int_10 = PyInt_FromLong(10); if (unlikely(!__pyx_int_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
8263 __pyx_int_11 = PyInt_FromLong(11); if (unlikely(!__pyx_int_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
8269 #if PY_MAJOR_VERSION < 3
8270 PyMODINIT_FUNC initTabProxies(void); /*proto*/
8271 PyMODINIT_FUNC initTabProxies(void)
8273 PyMODINIT_FUNC PyInit_TabProxies(void); /*proto*/
8274 PyMODINIT_FUNC PyInit_TabProxies(void)
8277 PyObject *__pyx_t_1 = NULL;
8278 PyObject *__pyx_t_2 = NULL;
8280 void* __pyx_refnanny = NULL;
8281 __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny");
8282 if (!__Pyx_RefNanny) {
8284 __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny");
8285 if (!__Pyx_RefNanny)
8286 Py_FatalError("failed to import 'refnanny' module");
8288 __pyx_refnanny = __Pyx_RefNanny->SetupContext("PyMODINIT_FUNC PyInit_TabProxies(void)", __LINE__, __FILE__);
8290 __pyx_empty_tuple = PyTuple_New(0); if (unlikely(!__pyx_empty_tuple)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8291 __pyx_empty_bytes = PyBytes_FromStringAndSize("", 0); if (unlikely(!__pyx_empty_bytes)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8292 #ifdef __pyx_binding_PyCFunctionType_USED
8293 if (__pyx_binding_PyCFunctionType_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8295 /*--- Library function declarations ---*/
8296 /*--- Threads initialization code ---*/
8297 #if defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS
8298 #ifdef WITH_THREAD /* Python build with threading support? */
8299 PyEval_InitThreads();
8302 /*--- Module creation code ---*/
8303 #if PY_MAJOR_VERSION < 3
8304 __pyx_m = Py_InitModule4(__Pyx_NAMESTR("TabProxies"), __pyx_methods, 0, 0, PYTHON_API_VERSION);
8306 __pyx_m = PyModule_Create(&__pyx_moduledef);
8308 if (!__pyx_m) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
8309 #if PY_MAJOR_VERSION < 3
8312 __pyx_b = PyImport_AddModule(__Pyx_NAMESTR(__Pyx_BUILTIN_MODULE_NAME));
8313 if (!__pyx_b) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
8314 if (__Pyx_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
8315 /*--- Initialize various global constants etc. ---*/
8316 if (unlikely(__Pyx_InitGlobals() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8317 if (__pyx_module_is_main_TabProxies) {
8318 if (__Pyx_SetAttrString(__pyx_m, "__name__", __pyx_n_s____main__) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
8320 /*--- Builtin init code ---*/
8321 if (unlikely(__Pyx_InitCachedBuiltins() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8322 /*--- Constants init code ---*/
8323 if (unlikely(__Pyx_InitCachedConstants() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8324 /*--- Global init code ---*/
8325 /*--- Function export code ---*/
8326 /*--- Type init code ---*/
8327 __pyx_vtabptr_10TabProxies_TupleProxy = &__pyx_vtable_10TabProxies_TupleProxy;
8328 __pyx_vtable_10TabProxies_TupleProxy.getMaxFields = (int (*)(struct __pyx_obj_10TabProxies_TupleProxy *, size_t))__pyx_f_10TabProxies_10TupleProxy_getMaxFields;
8329 __pyx_vtable_10TabProxies_TupleProxy.take = (PyObject *(*)(struct __pyx_obj_10TabProxies_TupleProxy *, char *, size_t))__pyx_f_10TabProxies_10TupleProxy_take;
8330 __pyx_vtable_10TabProxies_TupleProxy.present = (PyObject *(*)(struct __pyx_obj_10TabProxies_TupleProxy *, char *, size_t))__pyx_f_10TabProxies_10TupleProxy_present;
8331 __pyx_vtable_10TabProxies_TupleProxy.copy = (PyObject *(*)(struct __pyx_obj_10TabProxies_TupleProxy *, char *, size_t))__pyx_f_10TabProxies_10TupleProxy_copy;
8332 __pyx_vtable_10TabProxies_TupleProxy.update = (PyObject *(*)(struct __pyx_obj_10TabProxies_TupleProxy *, char *, size_t))__pyx_f_10TabProxies_10TupleProxy_update;
8333 if (PyType_Ready(&__pyx_type_10TabProxies_TupleProxy) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 20; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8335 PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_10TabProxies_TupleProxy, "__setitem__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 20; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8336 if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
8337 __pyx_wrapperbase_10TabProxies_10TupleProxy_5__setitem__ = *((PyWrapperDescrObject *)wrapper)->d_base;
8338 __pyx_wrapperbase_10TabProxies_10TupleProxy_5__setitem__.doc = __pyx_doc_10TabProxies_10TupleProxy_5__setitem__;
8339 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_10TabProxies_10TupleProxy_5__setitem__;
8343 PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_10TabProxies_TupleProxy, "__next__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 20; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8344 if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
8345 __pyx_wrapperbase_10TabProxies_10TupleProxy_8__next__ = *((PyWrapperDescrObject *)wrapper)->d_base;
8346 __pyx_wrapperbase_10TabProxies_10TupleProxy_8__next__.doc = __pyx_doc_10TabProxies_10TupleProxy_8__next__;
8347 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_10TabProxies_10TupleProxy_8__next__;
8351 PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_10TabProxies_TupleProxy, "__str__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 20; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8352 if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
8353 __pyx_wrapperbase_10TabProxies_10TupleProxy_9__str__ = *((PyWrapperDescrObject *)wrapper)->d_base;
8354 __pyx_wrapperbase_10TabProxies_10TupleProxy_9__str__.doc = __pyx_doc_10TabProxies_10TupleProxy_9__str__;
8355 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_10TabProxies_10TupleProxy_9__str__;
8358 if (__Pyx_SetVtable(__pyx_type_10TabProxies_TupleProxy.tp_dict, __pyx_vtabptr_10TabProxies_TupleProxy) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 20; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8359 if (__Pyx_SetAttrString(__pyx_m, "TupleProxy", (PyObject *)&__pyx_type_10TabProxies_TupleProxy) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 20; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8360 __pyx_ptype_10TabProxies_TupleProxy = &__pyx_type_10TabProxies_TupleProxy;
8361 __pyx_vtabptr_10TabProxies_GTFProxy = &__pyx_vtable_10TabProxies_GTFProxy;
8362 __pyx_vtable_10TabProxies_GTFProxy.__pyx_base = *__pyx_vtabptr_10TabProxies_TupleProxy;
8363 __pyx_vtable_10TabProxies_GTFProxy.__pyx_base.getMaxFields = (int (*)(struct __pyx_obj_10TabProxies_TupleProxy *, size_t))__pyx_f_10TabProxies_8GTFProxy_getMaxFields;
8364 __pyx_vtable_10TabProxies_GTFProxy.__pyx_base.update = (PyObject *(*)(struct __pyx_obj_10TabProxies_TupleProxy *, char *, size_t))__pyx_f_10TabProxies_8GTFProxy_update;
8365 __pyx_type_10TabProxies_GTFProxy.tp_base = __pyx_ptype_10TabProxies_TupleProxy;
8366 if (PyType_Ready(&__pyx_type_10TabProxies_GTFProxy) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 240; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8368 PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_10TabProxies_GTFProxy, "__getattr__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 240; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8369 if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
8370 __pyx_wrapperbase_10TabProxies_8GTFProxy_8__getattr__ = *((PyWrapperDescrObject *)wrapper)->d_base;
8371 __pyx_wrapperbase_10TabProxies_8GTFProxy_8__getattr__.doc = __pyx_doc_10TabProxies_8GTFProxy_8__getattr__;
8372 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_10TabProxies_8GTFProxy_8__getattr__;
8375 if (__Pyx_SetVtable(__pyx_type_10TabProxies_GTFProxy.tp_dict, __pyx_vtabptr_10TabProxies_GTFProxy) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 240; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8376 if (__Pyx_SetAttrString(__pyx_m, "GTFProxy", (PyObject *)&__pyx_type_10TabProxies_GTFProxy) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 240; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8377 __pyx_ptype_10TabProxies_GTFProxy = &__pyx_type_10TabProxies_GTFProxy;
8378 __pyx_vtabptr_10TabProxies_NamedTupleProxy = &__pyx_vtable_10TabProxies_NamedTupleProxy;
8379 __pyx_vtable_10TabProxies_NamedTupleProxy.__pyx_base = *__pyx_vtabptr_10TabProxies_TupleProxy;
8380 __pyx_type_10TabProxies_NamedTupleProxy.tp_base = __pyx_ptype_10TabProxies_TupleProxy;
8381 if (PyType_Ready(&__pyx_type_10TabProxies_NamedTupleProxy) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 493; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8383 PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_10TabProxies_NamedTupleProxy, "__setattr__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 493; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8384 if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
8385 __pyx_wrapperbase_10TabProxies_15NamedTupleProxy___setattr__ = *((PyWrapperDescrObject *)wrapper)->d_base;
8386 __pyx_wrapperbase_10TabProxies_15NamedTupleProxy___setattr__.doc = __pyx_doc_10TabProxies_15NamedTupleProxy___setattr__;
8387 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_10TabProxies_15NamedTupleProxy___setattr__;
8390 if (__Pyx_SetVtable(__pyx_type_10TabProxies_NamedTupleProxy.tp_dict, __pyx_vtabptr_10TabProxies_NamedTupleProxy) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 493; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8391 if (__Pyx_SetAttrString(__pyx_m, "NamedTupleProxy", (PyObject *)&__pyx_type_10TabProxies_NamedTupleProxy) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 493; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8392 __pyx_ptype_10TabProxies_NamedTupleProxy = &__pyx_type_10TabProxies_NamedTupleProxy;
8393 __pyx_vtabptr_10TabProxies_BedProxy = &__pyx_vtable_10TabProxies_BedProxy;
8394 __pyx_vtable_10TabProxies_BedProxy.__pyx_base = *__pyx_vtabptr_10TabProxies_NamedTupleProxy;
8395 __pyx_vtable_10TabProxies_BedProxy.__pyx_base.__pyx_base.getMaxFields = (int (*)(struct __pyx_obj_10TabProxies_TupleProxy *, size_t))__pyx_f_10TabProxies_8BedProxy_getMaxFields;
8396 __pyx_vtable_10TabProxies_BedProxy.__pyx_base.__pyx_base.update = (PyObject *(*)(struct __pyx_obj_10TabProxies_TupleProxy *, char *, size_t))__pyx_f_10TabProxies_8BedProxy_update;
8397 __pyx_type_10TabProxies_BedProxy.tp_base = __pyx_ptype_10TabProxies_NamedTupleProxy;
8398 if (PyType_Ready(&__pyx_type_10TabProxies_BedProxy) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 512; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8400 PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_10TabProxies_BedProxy, "__setattr__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 512; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8401 if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
8402 __pyx_wrapperbase_10TabProxies_8BedProxy_1__setattr__ = *((PyWrapperDescrObject *)wrapper)->d_base;
8403 __pyx_wrapperbase_10TabProxies_8BedProxy_1__setattr__.doc = __pyx_doc_10TabProxies_8BedProxy_1__setattr__;
8404 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_10TabProxies_8BedProxy_1__setattr__;
8407 if (__Pyx_SetVtable(__pyx_type_10TabProxies_BedProxy.tp_dict, __pyx_vtabptr_10TabProxies_BedProxy) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 512; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8408 if (__Pyx_SetAttrString(__pyx_m, "BedProxy", (PyObject *)&__pyx_type_10TabProxies_BedProxy) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 512; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8409 __pyx_ptype_10TabProxies_BedProxy = &__pyx_type_10TabProxies_BedProxy;
8410 __pyx_vtabptr_10TabProxies_VCFProxy = &__pyx_vtable_10TabProxies_VCFProxy;
8411 __pyx_vtable_10TabProxies_VCFProxy.__pyx_base = *__pyx_vtabptr_10TabProxies_NamedTupleProxy;
8412 __pyx_vtable_10TabProxies_VCFProxy.__pyx_base.__pyx_base.update = (PyObject *(*)(struct __pyx_obj_10TabProxies_TupleProxy *, char *, size_t))__pyx_f_10TabProxies_8VCFProxy_update;
8413 __pyx_type_10TabProxies_VCFProxy.tp_base = __pyx_ptype_10TabProxies_NamedTupleProxy;
8414 if (PyType_Ready(&__pyx_type_10TabProxies_VCFProxy) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 578; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8416 PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_10TabProxies_VCFProxy, "__setattr__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 578; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8417 if (Py_TYPE(wrapper) == &PyWrapperDescr_Type) {
8418 __pyx_wrapperbase_10TabProxies_8VCFProxy_2__setattr__ = *((PyWrapperDescrObject *)wrapper)->d_base;
8419 __pyx_wrapperbase_10TabProxies_8VCFProxy_2__setattr__.doc = __pyx_doc_10TabProxies_8VCFProxy_2__setattr__;
8420 ((PyWrapperDescrObject *)wrapper)->d_base = &__pyx_wrapperbase_10TabProxies_8VCFProxy_2__setattr__;
8423 if (__Pyx_SetVtable(__pyx_type_10TabProxies_VCFProxy.tp_dict, __pyx_vtabptr_10TabProxies_VCFProxy) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 578; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8424 if (__Pyx_SetAttrString(__pyx_m, "VCFProxy", (PyObject *)&__pyx_type_10TabProxies_VCFProxy) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 578; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8425 __pyx_ptype_10TabProxies_VCFProxy = &__pyx_type_10TabProxies_VCFProxy;
8426 /*--- Type import code ---*/
8427 __pyx_ptype_7cpython_4bool_bool = __Pyx_ImportType(__Pyx_BUILTIN_MODULE_NAME, "bool", sizeof(PyBoolObject), 0); if (unlikely(!__pyx_ptype_7cpython_4bool_bool)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 8; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8428 __pyx_ptype_7cpython_7complex_complex = __Pyx_ImportType(__Pyx_BUILTIN_MODULE_NAME, "complex", sizeof(PyComplexObject), 0); if (unlikely(!__pyx_ptype_7cpython_7complex_complex)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 15; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8429 /*--- Function import code ---*/
8430 /*--- Execution code ---*/
8432 /* "TabProxies.pyx":1
8433 * import types # <<<<<<<<<<<<<<
8434 * from cpython cimport PyString_FromStringAndSize, PyString_AsString, PyString_AS_STRING
8437 __pyx_t_1 = __Pyx_Import(((PyObject *)__pyx_n_s__types), 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8438 __Pyx_GOTREF(__pyx_t_1);
8439 if (PyObject_SetAttr(__pyx_m, __pyx_n_s__types, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8440 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8442 /* "TabProxies.pyx":228
8445 * def toDot( v ): # <<<<<<<<<<<<<<
8446 * '''convert value to '.' if None'''
8447 * if v == None: return "."
8449 __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_10TabProxies_toDot, NULL, __pyx_n_s__TabProxies); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 228; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8450 __Pyx_GOTREF(__pyx_t_1);
8451 if (PyObject_SetAttr(__pyx_m, __pyx_n_s__toDot, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 228; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8452 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8454 /* "TabProxies.pyx":233
8455 * else: return str(v)
8457 * def quote( v ): # <<<<<<<<<<<<<<
8458 * '''return a quoted attribute.'''
8459 * if type(v) in types.StringTypes:
8461 __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_10TabProxies_1quote, NULL, __pyx_n_s__TabProxies); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 233; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8462 __Pyx_GOTREF(__pyx_t_1);
8463 if (PyObject_SetAttr(__pyx_m, __pyx_n_s__quote, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 233; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8464 __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
8466 /* "TabProxies.pyx":495
8467 * cdef class NamedTupleProxy( TupleProxy ):
8469 * map_key2field = {} # <<<<<<<<<<<<<<
8471 * def __setattr__(self, key, value ):
8473 __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 495; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8474 __Pyx_GOTREF(((PyObject *)__pyx_t_1));
8475 if (PyDict_SetItem((PyObject *)__pyx_ptype_10TabProxies_NamedTupleProxy->tp_dict, __pyx_n_s__map_key2field, ((PyObject *)__pyx_t_1)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 495; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8476 __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
8477 PyType_Modified(__pyx_ptype_10TabProxies_NamedTupleProxy);
8479 /* "TabProxies.pyx":517
8480 * This class represents a GTF entry for fast read-access.
8482 * map_key2field = { # <<<<<<<<<<<<<<
8483 * 'contig' : (0, str),
8484 * 'start' : (1, int),
8486 __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 517; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8487 __Pyx_GOTREF(((PyObject *)__pyx_t_1));
8489 /* "TabProxies.pyx":518
8492 * 'contig' : (0, str), # <<<<<<<<<<<<<<
8493 * 'start' : (1, int),
8496 __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 518; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8497 __Pyx_GOTREF(((PyObject *)__pyx_t_2));
8498 __Pyx_INCREF(__pyx_int_0);
8499 PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_int_0);
8500 __Pyx_GIVEREF(__pyx_int_0);
8501 __Pyx_INCREF(((PyObject *)((PyObject*)(&PyString_Type))));
8502 PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)((PyObject*)(&PyString_Type))));
8503 __Pyx_GIVEREF(((PyObject *)((PyObject*)(&PyString_Type))));
8504 if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__contig), ((PyObject *)__pyx_t_2)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 517; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8505 __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
8507 /* "TabProxies.pyx":519
8509 * 'contig' : (0, str),
8510 * 'start' : (1, int), # <<<<<<<<<<<<<<
8512 * 'name' : (3, str),
8514 __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 519; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8515 __Pyx_GOTREF(((PyObject *)__pyx_t_2));
8516 __Pyx_INCREF(__pyx_int_1);
8517 PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_int_1);
8518 __Pyx_GIVEREF(__pyx_int_1);
8519 __Pyx_INCREF(((PyObject *)((PyObject*)(&PyInt_Type))));
8520 PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)((PyObject*)(&PyInt_Type))));
8521 __Pyx_GIVEREF(((PyObject *)((PyObject*)(&PyInt_Type))));
8522 if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__start), ((PyObject *)__pyx_t_2)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 517; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8523 __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
8525 /* "TabProxies.pyx":520
8526 * 'contig' : (0, str),
8527 * 'start' : (1, int),
8528 * 'end' : (2, int), # <<<<<<<<<<<<<<
8529 * 'name' : (3, str),
8530 * 'score' : (4, float),
8532 __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 520; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8533 __Pyx_GOTREF(((PyObject *)__pyx_t_2));
8534 __Pyx_INCREF(__pyx_int_2);
8535 PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_int_2);
8536 __Pyx_GIVEREF(__pyx_int_2);
8537 __Pyx_INCREF(((PyObject *)((PyObject*)(&PyInt_Type))));
8538 PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)((PyObject*)(&PyInt_Type))));
8539 __Pyx_GIVEREF(((PyObject *)((PyObject*)(&PyInt_Type))));
8540 if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__end), ((PyObject *)__pyx_t_2)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 517; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8541 __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
8543 /* "TabProxies.pyx":521
8544 * 'start' : (1, int),
8546 * 'name' : (3, str), # <<<<<<<<<<<<<<
8547 * 'score' : (4, float),
8548 * 'strand' : (5, str),
8550 __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 521; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8551 __Pyx_GOTREF(((PyObject *)__pyx_t_2));
8552 __Pyx_INCREF(__pyx_int_3);
8553 PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_int_3);
8554 __Pyx_GIVEREF(__pyx_int_3);
8555 __Pyx_INCREF(((PyObject *)((PyObject*)(&PyString_Type))));
8556 PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)((PyObject*)(&PyString_Type))));
8557 __Pyx_GIVEREF(((PyObject *)((PyObject*)(&PyString_Type))));
8558 if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__name), ((PyObject *)__pyx_t_2)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 517; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8559 __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
8561 /* "TabProxies.pyx":522
8563 * 'name' : (3, str),
8564 * 'score' : (4, float), # <<<<<<<<<<<<<<
8565 * 'strand' : (5, str),
8566 * 'thickStart' : (6,int ),
8568 __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 522; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8569 __Pyx_GOTREF(((PyObject *)__pyx_t_2));
8570 __Pyx_INCREF(__pyx_int_4);
8571 PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_int_4);
8572 __Pyx_GIVEREF(__pyx_int_4);
8573 __Pyx_INCREF(((PyObject *)((PyObject*)(&PyFloat_Type))));
8574 PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)((PyObject*)(&PyFloat_Type))));
8575 __Pyx_GIVEREF(((PyObject *)((PyObject*)(&PyFloat_Type))));
8576 if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__score), ((PyObject *)__pyx_t_2)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 517; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8577 __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
8579 /* "TabProxies.pyx":523
8580 * 'name' : (3, str),
8581 * 'score' : (4, float),
8582 * 'strand' : (5, str), # <<<<<<<<<<<<<<
8583 * 'thickStart' : (6,int ),
8584 * 'thickEnd' : (7,int),
8586 __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 523; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8587 __Pyx_GOTREF(((PyObject *)__pyx_t_2));
8588 __Pyx_INCREF(__pyx_int_5);
8589 PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_int_5);
8590 __Pyx_GIVEREF(__pyx_int_5);
8591 __Pyx_INCREF(((PyObject *)((PyObject*)(&PyString_Type))));
8592 PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)((PyObject*)(&PyString_Type))));
8593 __Pyx_GIVEREF(((PyObject *)((PyObject*)(&PyString_Type))));
8594 if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__strand), ((PyObject *)__pyx_t_2)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 517; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8595 __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
8597 /* "TabProxies.pyx":524
8598 * 'score' : (4, float),
8599 * 'strand' : (5, str),
8600 * 'thickStart' : (6,int ), # <<<<<<<<<<<<<<
8601 * 'thickEnd' : (7,int),
8602 * 'itemRGB' : (8,str),
8604 __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 524; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8605 __Pyx_GOTREF(((PyObject *)__pyx_t_2));
8606 __Pyx_INCREF(__pyx_int_6);
8607 PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_int_6);
8608 __Pyx_GIVEREF(__pyx_int_6);
8609 __Pyx_INCREF(((PyObject *)((PyObject*)(&PyInt_Type))));
8610 PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)((PyObject*)(&PyInt_Type))));
8611 __Pyx_GIVEREF(((PyObject *)((PyObject*)(&PyInt_Type))));
8612 if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__thickStart), ((PyObject *)__pyx_t_2)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 517; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8613 __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
8615 /* "TabProxies.pyx":525
8616 * 'strand' : (5, str),
8617 * 'thickStart' : (6,int ),
8618 * 'thickEnd' : (7,int), # <<<<<<<<<<<<<<
8619 * 'itemRGB' : (8,str),
8620 * 'blockCount': (9,int),
8622 __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 525; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8623 __Pyx_GOTREF(((PyObject *)__pyx_t_2));
8624 __Pyx_INCREF(__pyx_int_7);
8625 PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_int_7);
8626 __Pyx_GIVEREF(__pyx_int_7);
8627 __Pyx_INCREF(((PyObject *)((PyObject*)(&PyInt_Type))));
8628 PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)((PyObject*)(&PyInt_Type))));
8629 __Pyx_GIVEREF(((PyObject *)((PyObject*)(&PyInt_Type))));
8630 if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__thickEnd), ((PyObject *)__pyx_t_2)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 517; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8631 __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
8633 /* "TabProxies.pyx":526
8634 * 'thickStart' : (6,int ),
8635 * 'thickEnd' : (7,int),
8636 * 'itemRGB' : (8,str), # <<<<<<<<<<<<<<
8637 * 'blockCount': (9,int),
8638 * 'blockSizes': (10,str),
8640 __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 526; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8641 __Pyx_GOTREF(((PyObject *)__pyx_t_2));
8642 __Pyx_INCREF(__pyx_int_8);
8643 PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_int_8);
8644 __Pyx_GIVEREF(__pyx_int_8);
8645 __Pyx_INCREF(((PyObject *)((PyObject*)(&PyString_Type))));
8646 PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)((PyObject*)(&PyString_Type))));
8647 __Pyx_GIVEREF(((PyObject *)((PyObject*)(&PyString_Type))));
8648 if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__itemRGB), ((PyObject *)__pyx_t_2)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 517; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8649 __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
8651 /* "TabProxies.pyx":527
8652 * 'thickEnd' : (7,int),
8653 * 'itemRGB' : (8,str),
8654 * 'blockCount': (9,int), # <<<<<<<<<<<<<<
8655 * 'blockSizes': (10,str),
8656 * 'blockStarts': (11,str), }
8658 __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 527; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8659 __Pyx_GOTREF(((PyObject *)__pyx_t_2));
8660 __Pyx_INCREF(__pyx_int_9);
8661 PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_int_9);
8662 __Pyx_GIVEREF(__pyx_int_9);
8663 __Pyx_INCREF(((PyObject *)((PyObject*)(&PyInt_Type))));
8664 PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)((PyObject*)(&PyInt_Type))));
8665 __Pyx_GIVEREF(((PyObject *)((PyObject*)(&PyInt_Type))));
8666 if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__blockCount), ((PyObject *)__pyx_t_2)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 517; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8667 __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
8669 /* "TabProxies.pyx":528
8670 * 'itemRGB' : (8,str),
8671 * 'blockCount': (9,int),
8672 * 'blockSizes': (10,str), # <<<<<<<<<<<<<<
8673 * 'blockStarts': (11,str), }
8676 __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 528; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8677 __Pyx_GOTREF(((PyObject *)__pyx_t_2));
8678 __Pyx_INCREF(__pyx_int_10);
8679 PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_int_10);
8680 __Pyx_GIVEREF(__pyx_int_10);
8681 __Pyx_INCREF(((PyObject *)((PyObject*)(&PyString_Type))));
8682 PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)((PyObject*)(&PyString_Type))));
8683 __Pyx_GIVEREF(((PyObject *)((PyObject*)(&PyString_Type))));
8684 if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__blockSizes), ((PyObject *)__pyx_t_2)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 517; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8685 __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
8687 /* "TabProxies.pyx":529
8688 * 'blockCount': (9,int),
8689 * 'blockSizes': (10,str),
8690 * 'blockStarts': (11,str), } # <<<<<<<<<<<<<<
8692 * cdef int getMaxFields( self, size_t nbytes ):
8694 __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 529; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8695 __Pyx_GOTREF(((PyObject *)__pyx_t_2));
8696 __Pyx_INCREF(__pyx_int_11);
8697 PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_int_11);
8698 __Pyx_GIVEREF(__pyx_int_11);
8699 __Pyx_INCREF(((PyObject *)((PyObject*)(&PyString_Type))));
8700 PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)((PyObject*)(&PyString_Type))));
8701 __Pyx_GIVEREF(((PyObject *)((PyObject*)(&PyString_Type))));
8702 if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__blockStarts), ((PyObject *)__pyx_t_2)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 517; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8703 __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
8704 if (PyDict_SetItem((PyObject *)__pyx_ptype_10TabProxies_BedProxy->tp_dict, __pyx_n_s__map_key2field, ((PyObject *)__pyx_t_1)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 517; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8705 __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
8706 PyType_Modified(__pyx_ptype_10TabProxies_BedProxy);
8708 /* "TabProxies.pyx":583
8709 * The genotypes are accessed via index.
8711 * map_key2field = { # <<<<<<<<<<<<<<
8712 * 'contig' : (0, str),
8715 __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 583; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8716 __Pyx_GOTREF(((PyObject *)__pyx_t_1));
8718 /* "TabProxies.pyx":584
8721 * 'contig' : (0, str), # <<<<<<<<<<<<<<
8725 __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 584; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8726 __Pyx_GOTREF(((PyObject *)__pyx_t_2));
8727 __Pyx_INCREF(__pyx_int_0);
8728 PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_int_0);
8729 __Pyx_GIVEREF(__pyx_int_0);
8730 __Pyx_INCREF(((PyObject *)((PyObject*)(&PyString_Type))));
8731 PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)((PyObject*)(&PyString_Type))));
8732 __Pyx_GIVEREF(((PyObject *)((PyObject*)(&PyString_Type))));
8733 if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__contig), ((PyObject *)__pyx_t_2)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 583; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8734 __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
8736 /* "TabProxies.pyx":585
8738 * 'contig' : (0, str),
8739 * 'pos' : (1, int), # <<<<<<<<<<<<<<
8743 __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 585; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8744 __Pyx_GOTREF(((PyObject *)__pyx_t_2));
8745 __Pyx_INCREF(__pyx_int_1);
8746 PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_int_1);
8747 __Pyx_GIVEREF(__pyx_int_1);
8748 __Pyx_INCREF(((PyObject *)((PyObject*)(&PyInt_Type))));
8749 PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)((PyObject*)(&PyInt_Type))));
8750 __Pyx_GIVEREF(((PyObject *)((PyObject*)(&PyInt_Type))));
8751 if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__pos), ((PyObject *)__pyx_t_2)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 583; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8752 __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
8754 /* "TabProxies.pyx":586
8755 * 'contig' : (0, str),
8757 * 'id' : (2, str), # <<<<<<<<<<<<<<
8761 __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 586; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8762 __Pyx_GOTREF(((PyObject *)__pyx_t_2));
8763 __Pyx_INCREF(__pyx_int_2);
8764 PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_int_2);
8765 __Pyx_GIVEREF(__pyx_int_2);
8766 __Pyx_INCREF(((PyObject *)((PyObject*)(&PyString_Type))));
8767 PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)((PyObject*)(&PyString_Type))));
8768 __Pyx_GIVEREF(((PyObject *)((PyObject*)(&PyString_Type))));
8769 if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__id), ((PyObject *)__pyx_t_2)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 583; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8770 __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
8772 /* "TabProxies.pyx":587
8775 * 'ref' : (3, str), # <<<<<<<<<<<<<<
8777 * 'qual' : (5, str),
8779 __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 587; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8780 __Pyx_GOTREF(((PyObject *)__pyx_t_2));
8781 __Pyx_INCREF(__pyx_int_3);
8782 PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_int_3);
8783 __Pyx_GIVEREF(__pyx_int_3);
8784 __Pyx_INCREF(((PyObject *)((PyObject*)(&PyString_Type))));
8785 PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)((PyObject*)(&PyString_Type))));
8786 __Pyx_GIVEREF(((PyObject *)((PyObject*)(&PyString_Type))));
8787 if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__ref), ((PyObject *)__pyx_t_2)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 583; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8788 __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
8790 /* "TabProxies.pyx":588
8793 * 'alt' : (4, str), # <<<<<<<<<<<<<<
8794 * 'qual' : (5, str),
8795 * 'filter' : (6,str),
8797 __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 588; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8798 __Pyx_GOTREF(((PyObject *)__pyx_t_2));
8799 __Pyx_INCREF(__pyx_int_4);
8800 PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_int_4);
8801 __Pyx_GIVEREF(__pyx_int_4);
8802 __Pyx_INCREF(((PyObject *)((PyObject*)(&PyString_Type))));
8803 PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)((PyObject*)(&PyString_Type))));
8804 __Pyx_GIVEREF(((PyObject *)((PyObject*)(&PyString_Type))));
8805 if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__alt), ((PyObject *)__pyx_t_2)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 583; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8806 __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
8808 /* "TabProxies.pyx":589
8811 * 'qual' : (5, str), # <<<<<<<<<<<<<<
8812 * 'filter' : (6,str),
8815 __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 589; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8816 __Pyx_GOTREF(((PyObject *)__pyx_t_2));
8817 __Pyx_INCREF(__pyx_int_5);
8818 PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_int_5);
8819 __Pyx_GIVEREF(__pyx_int_5);
8820 __Pyx_INCREF(((PyObject *)((PyObject*)(&PyString_Type))));
8821 PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)((PyObject*)(&PyString_Type))));
8822 __Pyx_GIVEREF(((PyObject *)((PyObject*)(&PyString_Type))));
8823 if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__qual), ((PyObject *)__pyx_t_2)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 583; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8824 __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
8826 /* "TabProxies.pyx":590
8828 * 'qual' : (5, str),
8829 * 'filter' : (6,str), # <<<<<<<<<<<<<<
8831 * 'format' : (8,str) }
8833 __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 590; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8834 __Pyx_GOTREF(((PyObject *)__pyx_t_2));
8835 __Pyx_INCREF(__pyx_int_6);
8836 PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_int_6);
8837 __Pyx_GIVEREF(__pyx_int_6);
8838 __Pyx_INCREF(((PyObject *)((PyObject*)(&PyString_Type))));
8839 PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)((PyObject*)(&PyString_Type))));
8840 __Pyx_GIVEREF(((PyObject *)((PyObject*)(&PyString_Type))));
8841 if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__filter), ((PyObject *)__pyx_t_2)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 583; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8842 __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
8844 /* "TabProxies.pyx":591
8845 * 'qual' : (5, str),
8846 * 'filter' : (6,str),
8847 * 'info' : (7,str), # <<<<<<<<<<<<<<
8848 * 'format' : (8,str) }
8851 __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 591; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8852 __Pyx_GOTREF(((PyObject *)__pyx_t_2));
8853 __Pyx_INCREF(__pyx_int_7);
8854 PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_int_7);
8855 __Pyx_GIVEREF(__pyx_int_7);
8856 __Pyx_INCREF(((PyObject *)((PyObject*)(&PyString_Type))));
8857 PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)((PyObject*)(&PyString_Type))));
8858 __Pyx_GIVEREF(((PyObject *)((PyObject*)(&PyString_Type))));
8859 if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__info), ((PyObject *)__pyx_t_2)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 583; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8860 __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
8862 /* "TabProxies.pyx":592
8863 * 'filter' : (6,str),
8865 * 'format' : (8,str) } # <<<<<<<<<<<<<<
8867 * def __cinit__(self ):
8869 __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 592; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8870 __Pyx_GOTREF(((PyObject *)__pyx_t_2));
8871 __Pyx_INCREF(__pyx_int_8);
8872 PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_int_8);
8873 __Pyx_GIVEREF(__pyx_int_8);
8874 __Pyx_INCREF(((PyObject *)((PyObject*)(&PyString_Type))));
8875 PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)((PyObject*)(&PyString_Type))));
8876 __Pyx_GIVEREF(((PyObject *)((PyObject*)(&PyString_Type))));
8877 if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__format), ((PyObject *)__pyx_t_2)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 583; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8878 __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
8879 if (PyDict_SetItem((PyObject *)__pyx_ptype_10TabProxies_VCFProxy->tp_dict, __pyx_n_s__map_key2field, ((PyObject *)__pyx_t_1)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 583; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8880 __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
8881 PyType_Modified(__pyx_ptype_10TabProxies_VCFProxy);
8883 /* "TabProxies.pyx":1
8884 * import types # <<<<<<<<<<<<<<
8885 * from cpython cimport PyString_FromStringAndSize, PyString_AsString, PyString_AS_STRING
8888 __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8889 __Pyx_GOTREF(((PyObject *)__pyx_t_1));
8890 if (PyObject_SetAttr(__pyx_m, __pyx_n_s____test__, ((PyObject *)__pyx_t_1)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
8891 __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
8893 /* "cpython/type.pxd":2
8895 * cdef extern from "Python.h": # <<<<<<<<<<<<<<
8896 * # The C structure of the objects used to describe built-in types.
8901 __Pyx_XDECREF(__pyx_t_1);
8902 __Pyx_XDECREF(__pyx_t_2);
8904 __Pyx_AddTraceback("init TabProxies");
8905 Py_DECREF(__pyx_m); __pyx_m = 0;
8906 } else if (!PyErr_Occurred()) {
8907 PyErr_SetString(PyExc_ImportError, "init TabProxies");
8910 __Pyx_RefNannyFinishContext();
8911 #if PY_MAJOR_VERSION < 3
8918 /* Runtime support code */
8920 static PyObject *__Pyx_GetName(PyObject *dict, PyObject *name) {
8922 result = PyObject_GetAttr(dict, name);
8924 PyErr_SetObject(PyExc_NameError, name);
8928 static CYTHON_INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb) {
8929 PyObject *tmp_type, *tmp_value, *tmp_tb;
8930 PyThreadState *tstate = PyThreadState_GET();
8932 tmp_type = tstate->curexc_type;
8933 tmp_value = tstate->curexc_value;
8934 tmp_tb = tstate->curexc_traceback;
8935 tstate->curexc_type = type;
8936 tstate->curexc_value = value;
8937 tstate->curexc_traceback = tb;
8938 Py_XDECREF(tmp_type);
8939 Py_XDECREF(tmp_value);
8943 static CYTHON_INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb) {
8944 PyThreadState *tstate = PyThreadState_GET();
8945 *type = tstate->curexc_type;
8946 *value = tstate->curexc_value;
8947 *tb = tstate->curexc_traceback;
8949 tstate->curexc_type = 0;
8950 tstate->curexc_value = 0;
8951 tstate->curexc_traceback = 0;
8955 #if PY_MAJOR_VERSION < 3
8956 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb) {
8960 /* First, check the traceback argument, replacing None with NULL. */
8961 if (tb == Py_None) {
8965 else if (tb != NULL && !PyTraceBack_Check(tb)) {
8966 PyErr_SetString(PyExc_TypeError,
8967 "raise: arg 3 must be a traceback or None");
8970 /* Next, replace a missing value with None */
8971 if (value == NULL) {
8975 #if PY_VERSION_HEX < 0x02050000
8976 if (!PyClass_Check(type))
8978 if (!PyType_Check(type))
8981 /* Raising an instance. The value should be a dummy. */
8982 if (value != Py_None) {
8983 PyErr_SetString(PyExc_TypeError,
8984 "instance exception may not have a separate value");
8987 /* Normalize to raise <class>, <instance> */
8990 #if PY_VERSION_HEX < 0x02050000
8991 if (PyInstance_Check(type)) {
8992 type = (PyObject*) ((PyInstanceObject*)type)->in_class;
8997 PyErr_SetString(PyExc_TypeError,
8998 "raise: exception must be an old-style class or instance");
9002 type = (PyObject*) Py_TYPE(type);
9004 if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) {
9005 PyErr_SetString(PyExc_TypeError,
9006 "raise: exception class must be a subclass of BaseException");
9012 __Pyx_ErrRestore(type, value, tb);
9021 #else /* Python 3+ */
9023 static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb) {
9024 if (tb == Py_None) {
9026 } else if (tb && !PyTraceBack_Check(tb)) {
9027 PyErr_SetString(PyExc_TypeError,
9028 "raise: arg 3 must be a traceback or None");
9031 if (value == Py_None)
9034 if (PyExceptionInstance_Check(type)) {
9036 PyErr_SetString(PyExc_TypeError,
9037 "instance exception may not have a separate value");
9041 type = (PyObject*) Py_TYPE(value);
9042 } else if (!PyExceptionClass_Check(type)) {
9043 PyErr_SetString(PyExc_TypeError,
9044 "raise: exception class must be a subclass of BaseException");
9048 PyErr_SetObject(type, value);
9051 PyThreadState *tstate = PyThreadState_GET();
9052 PyObject* tmp_tb = tstate->curexc_traceback;
9055 tstate->curexc_traceback = tb;
9065 static void __Pyx_RaiseArgtupleInvalid(
9066 const char* func_name,
9070 Py_ssize_t num_found)
9072 Py_ssize_t num_expected;
9073 const char *number, *more_or_less;
9075 if (num_found < num_min) {
9076 num_expected = num_min;
9077 more_or_less = "at least";
9079 num_expected = num_max;
9080 more_or_less = "at most";
9083 more_or_less = "exactly";
9085 number = (num_expected == 1) ? "" : "s";
9086 PyErr_Format(PyExc_TypeError,
9087 #if PY_VERSION_HEX < 0x02050000
9088 "%s() takes %s %d positional argument%s (%d given)",
9090 "%s() takes %s %zd positional argument%s (%zd given)",
9092 func_name, more_or_less, num_expected, number, num_found);
9095 static CYTHON_INLINE int __Pyx_CheckKeywordStrings(
9097 const char* function_name,
9102 while (PyDict_Next(kwdict, &pos, &key, 0)) {
9103 #if PY_MAJOR_VERSION < 3
9104 if (unlikely(!PyString_CheckExact(key)) && unlikely(!PyString_Check(key)))
9106 if (unlikely(!PyUnicode_CheckExact(key)) && unlikely(!PyUnicode_Check(key)))
9108 goto invalid_keyword_type;
9110 if ((!kw_allowed) && unlikely(key))
9111 goto invalid_keyword;
9113 invalid_keyword_type:
9114 PyErr_Format(PyExc_TypeError,
9115 "%s() keywords must be strings", function_name);
9118 PyErr_Format(PyExc_TypeError,
9119 #if PY_MAJOR_VERSION < 3
9120 "%s() got an unexpected keyword argument '%s'",
9121 function_name, PyString_AsString(key));
9123 "%s() got an unexpected keyword argument '%U'",
9124 function_name, key);
9129 static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) {
9130 PyErr_Format(PyExc_ValueError,
9131 #if PY_VERSION_HEX < 0x02050000
9132 "need more than %d value%s to unpack", (int)index,
9134 "need more than %zd value%s to unpack", index,
9136 (index == 1) ? "" : "s");
9139 static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) {
9140 PyErr_Format(PyExc_ValueError,
9141 #if PY_VERSION_HEX < 0x02050000
9142 "too many values to unpack (expected %d)", (int)expected);
9144 "too many values to unpack (expected %zd)", expected);
9148 static PyObject *__Pyx_UnpackItem(PyObject *iter, Py_ssize_t index) {
9150 if (!(item = PyIter_Next(iter))) {
9151 if (!PyErr_Occurred()) {
9152 __Pyx_RaiseNeedMoreValuesError(index);
9158 static int __Pyx_EndUnpack(PyObject *iter, Py_ssize_t expected) {
9160 if ((item = PyIter_Next(iter))) {
9162 __Pyx_RaiseTooManyValuesError(expected);
9165 else if (!PyErr_Occurred())
9171 static void __Pyx_RaiseDoubleKeywordsError(
9172 const char* func_name,
9175 PyErr_Format(PyExc_TypeError,
9176 #if PY_MAJOR_VERSION >= 3
9177 "%s() got multiple values for keyword argument '%U'", func_name, kw_name);
9179 "%s() got multiple values for keyword argument '%s'", func_name,
9180 PyString_AS_STRING(kw_name));
9184 static int __Pyx_ParseOptionalKeywords(
9186 PyObject **argnames[],
9189 Py_ssize_t num_pos_args,
9190 const char* function_name)
9192 PyObject *key = 0, *value = 0;
9195 PyObject*** first_kw_arg = argnames + num_pos_args;
9197 while (PyDict_Next(kwds, &pos, &key, &value)) {
9198 name = first_kw_arg;
9199 while (*name && (**name != key)) name++;
9201 values[name-argnames] = value;
9203 #if PY_MAJOR_VERSION < 3
9204 if (unlikely(!PyString_CheckExact(key)) && unlikely(!PyString_Check(key))) {
9206 if (unlikely(!PyUnicode_CheckExact(key)) && unlikely(!PyUnicode_Check(key))) {
9208 goto invalid_keyword_type;
9210 for (name = first_kw_arg; *name; name++) {
9211 #if PY_MAJOR_VERSION >= 3
9212 if (PyUnicode_GET_SIZE(**name) == PyUnicode_GET_SIZE(key) &&
9213 PyUnicode_Compare(**name, key) == 0) break;
9215 if (PyString_GET_SIZE(**name) == PyString_GET_SIZE(key) &&
9216 _PyString_Eq(**name, key)) break;
9220 values[name-argnames] = value;
9222 /* unexpected keyword found */
9223 for (name=argnames; name != first_kw_arg; name++) {
9224 if (**name == key) goto arg_passed_twice;
9225 #if PY_MAJOR_VERSION >= 3
9226 if (PyUnicode_GET_SIZE(**name) == PyUnicode_GET_SIZE(key) &&
9227 PyUnicode_Compare(**name, key) == 0) goto arg_passed_twice;
9229 if (PyString_GET_SIZE(**name) == PyString_GET_SIZE(key) &&
9230 _PyString_Eq(**name, key)) goto arg_passed_twice;
9234 if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad;
9236 goto invalid_keyword;
9244 __Pyx_RaiseDoubleKeywordsError(function_name, **name);
9246 invalid_keyword_type:
9247 PyErr_Format(PyExc_TypeError,
9248 "%s() keywords must be strings", function_name);
9251 PyErr_Format(PyExc_TypeError,
9252 #if PY_MAJOR_VERSION < 3
9253 "%s() got an unexpected keyword argument '%s'",
9254 function_name, PyString_AsString(key));
9256 "%s() got an unexpected keyword argument '%U'",
9257 function_name, key);
9264 static double __Pyx__PyObject_AsDouble(PyObject* obj) {
9265 PyObject* float_value;
9266 if (Py_TYPE(obj)->tp_as_number && Py_TYPE(obj)->tp_as_number->nb_float) {
9267 return PyFloat_AsDouble(obj);
9268 } else if (PyUnicode_CheckExact(obj) || PyBytes_CheckExact(obj)) {
9269 #if PY_MAJOR_VERSION >= 3
9270 float_value = PyFloat_FromString(obj);
9272 float_value = PyFloat_FromString(obj, 0);
9275 PyObject* args = PyTuple_New(1);
9276 if (unlikely(!args)) goto bad;
9277 PyTuple_SET_ITEM(args, 0, obj);
9278 float_value = PyObject_Call((PyObject*)&PyFloat_Type, args, 0);
9279 PyTuple_SET_ITEM(args, 0, 0);
9282 if (likely(float_value)) {
9283 double value = PyFloat_AS_DOUBLE(float_value);
9284 Py_DECREF(float_value);
9291 static CYTHON_INLINE void __Pyx_ExceptionSave(PyObject **type, PyObject **value, PyObject **tb) {
9292 PyThreadState *tstate = PyThreadState_GET();
9293 *type = tstate->exc_type;
9294 *value = tstate->exc_value;
9295 *tb = tstate->exc_traceback;
9301 static void __Pyx_ExceptionReset(PyObject *type, PyObject *value, PyObject *tb) {
9302 PyObject *tmp_type, *tmp_value, *tmp_tb;
9303 PyThreadState *tstate = PyThreadState_GET();
9304 tmp_type = tstate->exc_type;
9305 tmp_value = tstate->exc_value;
9306 tmp_tb = tstate->exc_traceback;
9307 tstate->exc_type = type;
9308 tstate->exc_value = value;
9309 tstate->exc_traceback = tb;
9310 Py_XDECREF(tmp_type);
9311 Py_XDECREF(tmp_value);
9315 static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list) {
9316 PyObject *py_import = 0;
9317 PyObject *empty_list = 0;
9318 PyObject *module = 0;
9319 PyObject *global_dict = 0;
9320 PyObject *empty_dict = 0;
9322 py_import = __Pyx_GetAttrString(__pyx_b, "__import__");
9328 empty_list = PyList_New(0);
9333 global_dict = PyModule_GetDict(__pyx_m);
9336 empty_dict = PyDict_New();
9339 module = PyObject_CallFunctionObjArgs(py_import,
9340 name, global_dict, empty_dict, list, NULL);
9342 Py_XDECREF(empty_list);
9343 Py_XDECREF(py_import);
9344 Py_XDECREF(empty_dict);
9348 static CYTHON_INLINE PyObject *__Pyx_PyInt_to_py_uint32_t(uint32_t val) {
9349 const uint32_t neg_one = (uint32_t)-1, const_zero = (uint32_t)0;
9350 const int is_unsigned = const_zero < neg_one;
9351 if ((sizeof(uint32_t) == sizeof(char)) ||
9352 (sizeof(uint32_t) == sizeof(short))) {
9353 return PyInt_FromLong((long)val);
9354 } else if ((sizeof(uint32_t) == sizeof(int)) ||
9355 (sizeof(uint32_t) == sizeof(long))) {
9357 return PyLong_FromUnsignedLong((unsigned long)val);
9359 return PyInt_FromLong((long)val);
9360 } else if (sizeof(uint32_t) == sizeof(PY_LONG_LONG)) {
9362 return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG)val);
9364 return PyLong_FromLongLong((PY_LONG_LONG)val);
9366 int one = 1; int little = (int)*(unsigned char *)&one;
9367 unsigned char *bytes = (unsigned char *)&val;
9368 return _PyLong_FromByteArray(bytes, sizeof(uint32_t),
9369 little, !is_unsigned);
9373 static CYTHON_INLINE uint32_t __Pyx_PyInt_from_py_uint32_t(PyObject* x) {
9374 const uint32_t neg_one = (uint32_t)-1, const_zero = (uint32_t)0;
9375 const int is_unsigned = const_zero < neg_one;
9376 if (sizeof(uint32_t) == sizeof(char)) {
9378 return (uint32_t)__Pyx_PyInt_AsUnsignedChar(x);
9380 return (uint32_t)__Pyx_PyInt_AsSignedChar(x);
9381 } else if (sizeof(uint32_t) == sizeof(short)) {
9383 return (uint32_t)__Pyx_PyInt_AsUnsignedShort(x);
9385 return (uint32_t)__Pyx_PyInt_AsSignedShort(x);
9386 } else if (sizeof(uint32_t) == sizeof(int)) {
9388 return (uint32_t)__Pyx_PyInt_AsUnsignedInt(x);
9390 return (uint32_t)__Pyx_PyInt_AsSignedInt(x);
9391 } else if (sizeof(uint32_t) == sizeof(long)) {
9393 return (uint32_t)__Pyx_PyInt_AsUnsignedLong(x);
9395 return (uint32_t)__Pyx_PyInt_AsSignedLong(x);
9396 } else if (sizeof(uint32_t) == sizeof(PY_LONG_LONG)) {
9398 return (uint32_t)__Pyx_PyInt_AsUnsignedLongLong(x);
9400 return (uint32_t)__Pyx_PyInt_AsSignedLongLong(x);
9403 PyObject *v = __Pyx_PyNumber_Int(x);
9404 #if PY_VERSION_HEX < 0x03000000
9405 if (likely(v) && !PyLong_Check(v)) {
9407 v = PyNumber_Long(tmp);
9412 int one = 1; int is_little = (int)*(unsigned char *)&one;
9413 unsigned char *bytes = (unsigned char *)&val;
9414 int ret = _PyLong_AsByteArray((PyLongObject *)v,
9416 is_little, !is_unsigned);
9421 return (uint32_t)-1;
9425 static CYTHON_INLINE unsigned char __Pyx_PyInt_AsUnsignedChar(PyObject* x) {
9426 const unsigned char neg_one = (unsigned char)-1, const_zero = 0;
9427 const int is_unsigned = neg_one > const_zero;
9428 if (sizeof(unsigned char) < sizeof(long)) {
9429 long val = __Pyx_PyInt_AsLong(x);
9430 if (unlikely(val != (long)(unsigned char)val)) {
9431 if (!unlikely(val == -1 && PyErr_Occurred())) {
9432 PyErr_SetString(PyExc_OverflowError,
9433 (is_unsigned && unlikely(val < 0)) ?
9434 "can't convert negative value to unsigned char" :
9435 "value too large to convert to unsigned char");
9437 return (unsigned char)-1;
9439 return (unsigned char)val;
9441 return (unsigned char)__Pyx_PyInt_AsUnsignedLong(x);
9444 static CYTHON_INLINE unsigned short __Pyx_PyInt_AsUnsignedShort(PyObject* x) {
9445 const unsigned short neg_one = (unsigned short)-1, const_zero = 0;
9446 const int is_unsigned = neg_one > const_zero;
9447 if (sizeof(unsigned short) < sizeof(long)) {
9448 long val = __Pyx_PyInt_AsLong(x);
9449 if (unlikely(val != (long)(unsigned short)val)) {
9450 if (!unlikely(val == -1 && PyErr_Occurred())) {
9451 PyErr_SetString(PyExc_OverflowError,
9452 (is_unsigned && unlikely(val < 0)) ?
9453 "can't convert negative value to unsigned short" :
9454 "value too large to convert to unsigned short");
9456 return (unsigned short)-1;
9458 return (unsigned short)val;
9460 return (unsigned short)__Pyx_PyInt_AsUnsignedLong(x);
9463 static CYTHON_INLINE unsigned int __Pyx_PyInt_AsUnsignedInt(PyObject* x) {
9464 const unsigned int neg_one = (unsigned int)-1, const_zero = 0;
9465 const int is_unsigned = neg_one > const_zero;
9466 if (sizeof(unsigned int) < sizeof(long)) {
9467 long val = __Pyx_PyInt_AsLong(x);
9468 if (unlikely(val != (long)(unsigned int)val)) {
9469 if (!unlikely(val == -1 && PyErr_Occurred())) {
9470 PyErr_SetString(PyExc_OverflowError,
9471 (is_unsigned && unlikely(val < 0)) ?
9472 "can't convert negative value to unsigned int" :
9473 "value too large to convert to unsigned int");
9475 return (unsigned int)-1;
9477 return (unsigned int)val;
9479 return (unsigned int)__Pyx_PyInt_AsUnsignedLong(x);
9482 static CYTHON_INLINE char __Pyx_PyInt_AsChar(PyObject* x) {
9483 const char neg_one = (char)-1, const_zero = 0;
9484 const int is_unsigned = neg_one > const_zero;
9485 if (sizeof(char) < sizeof(long)) {
9486 long val = __Pyx_PyInt_AsLong(x);
9487 if (unlikely(val != (long)(char)val)) {
9488 if (!unlikely(val == -1 && PyErr_Occurred())) {
9489 PyErr_SetString(PyExc_OverflowError,
9490 (is_unsigned && unlikely(val < 0)) ?
9491 "can't convert negative value to char" :
9492 "value too large to convert to char");
9498 return (char)__Pyx_PyInt_AsLong(x);
9501 static CYTHON_INLINE short __Pyx_PyInt_AsShort(PyObject* x) {
9502 const short neg_one = (short)-1, const_zero = 0;
9503 const int is_unsigned = neg_one > const_zero;
9504 if (sizeof(short) < sizeof(long)) {
9505 long val = __Pyx_PyInt_AsLong(x);
9506 if (unlikely(val != (long)(short)val)) {
9507 if (!unlikely(val == -1 && PyErr_Occurred())) {
9508 PyErr_SetString(PyExc_OverflowError,
9509 (is_unsigned && unlikely(val < 0)) ?
9510 "can't convert negative value to short" :
9511 "value too large to convert to short");
9517 return (short)__Pyx_PyInt_AsLong(x);
9520 static CYTHON_INLINE int __Pyx_PyInt_AsInt(PyObject* x) {
9521 const int neg_one = (int)-1, const_zero = 0;
9522 const int is_unsigned = neg_one > const_zero;
9523 if (sizeof(int) < sizeof(long)) {
9524 long val = __Pyx_PyInt_AsLong(x);
9525 if (unlikely(val != (long)(int)val)) {
9526 if (!unlikely(val == -1 && PyErr_Occurred())) {
9527 PyErr_SetString(PyExc_OverflowError,
9528 (is_unsigned && unlikely(val < 0)) ?
9529 "can't convert negative value to int" :
9530 "value too large to convert to int");
9536 return (int)__Pyx_PyInt_AsLong(x);
9539 static CYTHON_INLINE signed char __Pyx_PyInt_AsSignedChar(PyObject* x) {
9540 const signed char neg_one = (signed char)-1, const_zero = 0;
9541 const int is_unsigned = neg_one > const_zero;
9542 if (sizeof(signed char) < sizeof(long)) {
9543 long val = __Pyx_PyInt_AsLong(x);
9544 if (unlikely(val != (long)(signed char)val)) {
9545 if (!unlikely(val == -1 && PyErr_Occurred())) {
9546 PyErr_SetString(PyExc_OverflowError,
9547 (is_unsigned && unlikely(val < 0)) ?
9548 "can't convert negative value to signed char" :
9549 "value too large to convert to signed char");
9551 return (signed char)-1;
9553 return (signed char)val;
9555 return (signed char)__Pyx_PyInt_AsSignedLong(x);
9558 static CYTHON_INLINE signed short __Pyx_PyInt_AsSignedShort(PyObject* x) {
9559 const signed short neg_one = (signed short)-1, const_zero = 0;
9560 const int is_unsigned = neg_one > const_zero;
9561 if (sizeof(signed short) < sizeof(long)) {
9562 long val = __Pyx_PyInt_AsLong(x);
9563 if (unlikely(val != (long)(signed short)val)) {
9564 if (!unlikely(val == -1 && PyErr_Occurred())) {
9565 PyErr_SetString(PyExc_OverflowError,
9566 (is_unsigned && unlikely(val < 0)) ?
9567 "can't convert negative value to signed short" :
9568 "value too large to convert to signed short");
9570 return (signed short)-1;
9572 return (signed short)val;
9574 return (signed short)__Pyx_PyInt_AsSignedLong(x);
9577 static CYTHON_INLINE signed int __Pyx_PyInt_AsSignedInt(PyObject* x) {
9578 const signed int neg_one = (signed int)-1, const_zero = 0;
9579 const int is_unsigned = neg_one > const_zero;
9580 if (sizeof(signed int) < sizeof(long)) {
9581 long val = __Pyx_PyInt_AsLong(x);
9582 if (unlikely(val != (long)(signed int)val)) {
9583 if (!unlikely(val == -1 && PyErr_Occurred())) {
9584 PyErr_SetString(PyExc_OverflowError,
9585 (is_unsigned && unlikely(val < 0)) ?
9586 "can't convert negative value to signed int" :
9587 "value too large to convert to signed int");
9589 return (signed int)-1;
9591 return (signed int)val;
9593 return (signed int)__Pyx_PyInt_AsSignedLong(x);
9596 static CYTHON_INLINE int __Pyx_PyInt_AsLongDouble(PyObject* x) {
9597 const int neg_one = (int)-1, const_zero = 0;
9598 const int is_unsigned = neg_one > const_zero;
9599 if (sizeof(int) < sizeof(long)) {
9600 long val = __Pyx_PyInt_AsLong(x);
9601 if (unlikely(val != (long)(int)val)) {
9602 if (!unlikely(val == -1 && PyErr_Occurred())) {
9603 PyErr_SetString(PyExc_OverflowError,
9604 (is_unsigned && unlikely(val < 0)) ?
9605 "can't convert negative value to int" :
9606 "value too large to convert to int");
9612 return (int)__Pyx_PyInt_AsLong(x);
9615 static CYTHON_INLINE unsigned long __Pyx_PyInt_AsUnsignedLong(PyObject* x) {
9616 const unsigned long neg_one = (unsigned long)-1, const_zero = 0;
9617 const int is_unsigned = neg_one > const_zero;
9618 #if PY_VERSION_HEX < 0x03000000
9619 if (likely(PyInt_Check(x))) {
9620 long val = PyInt_AS_LONG(x);
9621 if (is_unsigned && unlikely(val < 0)) {
9622 PyErr_SetString(PyExc_OverflowError,
9623 "can't convert negative value to unsigned long");
9624 return (unsigned long)-1;
9626 return (unsigned long)val;
9629 if (likely(PyLong_Check(x))) {
9631 if (unlikely(Py_SIZE(x) < 0)) {
9632 PyErr_SetString(PyExc_OverflowError,
9633 "can't convert negative value to unsigned long");
9634 return (unsigned long)-1;
9636 return PyLong_AsUnsignedLong(x);
9638 return PyLong_AsLong(x);
9642 PyObject *tmp = __Pyx_PyNumber_Int(x);
9643 if (!tmp) return (unsigned long)-1;
9644 val = __Pyx_PyInt_AsUnsignedLong(tmp);
9650 static CYTHON_INLINE unsigned PY_LONG_LONG __Pyx_PyInt_AsUnsignedLongLong(PyObject* x) {
9651 const unsigned PY_LONG_LONG neg_one = (unsigned PY_LONG_LONG)-1, const_zero = 0;
9652 const int is_unsigned = neg_one > const_zero;
9653 #if PY_VERSION_HEX < 0x03000000
9654 if (likely(PyInt_Check(x))) {
9655 long val = PyInt_AS_LONG(x);
9656 if (is_unsigned && unlikely(val < 0)) {
9657 PyErr_SetString(PyExc_OverflowError,
9658 "can't convert negative value to unsigned PY_LONG_LONG");
9659 return (unsigned PY_LONG_LONG)-1;
9661 return (unsigned PY_LONG_LONG)val;
9664 if (likely(PyLong_Check(x))) {
9666 if (unlikely(Py_SIZE(x) < 0)) {
9667 PyErr_SetString(PyExc_OverflowError,
9668 "can't convert negative value to unsigned PY_LONG_LONG");
9669 return (unsigned PY_LONG_LONG)-1;
9671 return PyLong_AsUnsignedLongLong(x);
9673 return PyLong_AsLongLong(x);
9676 unsigned PY_LONG_LONG val;
9677 PyObject *tmp = __Pyx_PyNumber_Int(x);
9678 if (!tmp) return (unsigned PY_LONG_LONG)-1;
9679 val = __Pyx_PyInt_AsUnsignedLongLong(tmp);
9685 static CYTHON_INLINE long __Pyx_PyInt_AsLong(PyObject* x) {
9686 const long neg_one = (long)-1, const_zero = 0;
9687 const int is_unsigned = neg_one > const_zero;
9688 #if PY_VERSION_HEX < 0x03000000
9689 if (likely(PyInt_Check(x))) {
9690 long val = PyInt_AS_LONG(x);
9691 if (is_unsigned && unlikely(val < 0)) {
9692 PyErr_SetString(PyExc_OverflowError,
9693 "can't convert negative value to long");
9699 if (likely(PyLong_Check(x))) {
9701 if (unlikely(Py_SIZE(x) < 0)) {
9702 PyErr_SetString(PyExc_OverflowError,
9703 "can't convert negative value to long");
9706 return PyLong_AsUnsignedLong(x);
9708 return PyLong_AsLong(x);
9712 PyObject *tmp = __Pyx_PyNumber_Int(x);
9713 if (!tmp) return (long)-1;
9714 val = __Pyx_PyInt_AsLong(tmp);
9720 static CYTHON_INLINE PY_LONG_LONG __Pyx_PyInt_AsLongLong(PyObject* x) {
9721 const PY_LONG_LONG neg_one = (PY_LONG_LONG)-1, const_zero = 0;
9722 const int is_unsigned = neg_one > const_zero;
9723 #if PY_VERSION_HEX < 0x03000000
9724 if (likely(PyInt_Check(x))) {
9725 long val = PyInt_AS_LONG(x);
9726 if (is_unsigned && unlikely(val < 0)) {
9727 PyErr_SetString(PyExc_OverflowError,
9728 "can't convert negative value to PY_LONG_LONG");
9729 return (PY_LONG_LONG)-1;
9731 return (PY_LONG_LONG)val;
9734 if (likely(PyLong_Check(x))) {
9736 if (unlikely(Py_SIZE(x) < 0)) {
9737 PyErr_SetString(PyExc_OverflowError,
9738 "can't convert negative value to PY_LONG_LONG");
9739 return (PY_LONG_LONG)-1;
9741 return PyLong_AsUnsignedLongLong(x);
9743 return PyLong_AsLongLong(x);
9747 PyObject *tmp = __Pyx_PyNumber_Int(x);
9748 if (!tmp) return (PY_LONG_LONG)-1;
9749 val = __Pyx_PyInt_AsLongLong(tmp);
9755 static CYTHON_INLINE signed long __Pyx_PyInt_AsSignedLong(PyObject* x) {
9756 const signed long neg_one = (signed long)-1, const_zero = 0;
9757 const int is_unsigned = neg_one > const_zero;
9758 #if PY_VERSION_HEX < 0x03000000
9759 if (likely(PyInt_Check(x))) {
9760 long val = PyInt_AS_LONG(x);
9761 if (is_unsigned && unlikely(val < 0)) {
9762 PyErr_SetString(PyExc_OverflowError,
9763 "can't convert negative value to signed long");
9764 return (signed long)-1;
9766 return (signed long)val;
9769 if (likely(PyLong_Check(x))) {
9771 if (unlikely(Py_SIZE(x) < 0)) {
9772 PyErr_SetString(PyExc_OverflowError,
9773 "can't convert negative value to signed long");
9774 return (signed long)-1;
9776 return PyLong_AsUnsignedLong(x);
9778 return PyLong_AsLong(x);
9782 PyObject *tmp = __Pyx_PyNumber_Int(x);
9783 if (!tmp) return (signed long)-1;
9784 val = __Pyx_PyInt_AsSignedLong(tmp);
9790 static CYTHON_INLINE signed PY_LONG_LONG __Pyx_PyInt_AsSignedLongLong(PyObject* x) {
9791 const signed PY_LONG_LONG neg_one = (signed PY_LONG_LONG)-1, const_zero = 0;
9792 const int is_unsigned = neg_one > const_zero;
9793 #if PY_VERSION_HEX < 0x03000000
9794 if (likely(PyInt_Check(x))) {
9795 long val = PyInt_AS_LONG(x);
9796 if (is_unsigned && unlikely(val < 0)) {
9797 PyErr_SetString(PyExc_OverflowError,
9798 "can't convert negative value to signed PY_LONG_LONG");
9799 return (signed PY_LONG_LONG)-1;
9801 return (signed PY_LONG_LONG)val;
9804 if (likely(PyLong_Check(x))) {
9806 if (unlikely(Py_SIZE(x) < 0)) {
9807 PyErr_SetString(PyExc_OverflowError,
9808 "can't convert negative value to signed PY_LONG_LONG");
9809 return (signed PY_LONG_LONG)-1;
9811 return PyLong_AsUnsignedLongLong(x);
9813 return PyLong_AsLongLong(x);
9816 signed PY_LONG_LONG val;
9817 PyObject *tmp = __Pyx_PyNumber_Int(x);
9818 if (!tmp) return (signed PY_LONG_LONG)-1;
9819 val = __Pyx_PyInt_AsSignedLongLong(tmp);
9825 static void __Pyx_WriteUnraisable(const char *name) {
9826 PyObject *old_exc, *old_val, *old_tb;
9828 __Pyx_ErrFetch(&old_exc, &old_val, &old_tb);
9829 #if PY_MAJOR_VERSION < 3
9830 ctx = PyString_FromString(name);
9832 ctx = PyUnicode_FromString(name);
9834 __Pyx_ErrRestore(old_exc, old_val, old_tb);
9836 PyErr_WriteUnraisable(Py_None);
9838 PyErr_WriteUnraisable(ctx);
9843 static int __Pyx_SetVtable(PyObject *dict, void *vtable) {
9844 #if PY_VERSION_HEX >= 0x02070000 && !(PY_MAJOR_VERSION==3&&PY_MINOR_VERSION==0)
9845 PyObject *ob = PyCapsule_New(vtable, 0, 0);
9847 PyObject *ob = PyCObject_FromVoidPtr(vtable, 0);
9851 if (PyDict_SetItemString(dict, "__pyx_vtable__", ob) < 0)
9860 #ifndef __PYX_HAVE_RT_ImportType
9861 #define __PYX_HAVE_RT_ImportType
9862 static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class_name,
9863 long size, int strict)
9865 PyObject *py_module = 0;
9866 PyObject *result = 0;
9867 PyObject *py_name = 0;
9870 py_module = __Pyx_ImportModule(module_name);
9873 #if PY_MAJOR_VERSION < 3
9874 py_name = PyString_FromString(class_name);
9876 py_name = PyUnicode_FromString(class_name);
9880 result = PyObject_GetAttr(py_module, py_name);
9883 Py_DECREF(py_module);
9887 if (!PyType_Check(result)) {
9888 PyErr_Format(PyExc_TypeError,
9889 "%s.%s is not a type object",
9890 module_name, class_name);
9893 if (!strict && ((PyTypeObject *)result)->tp_basicsize > size) {
9894 PyOS_snprintf(warning, sizeof(warning),
9895 "%s.%s size changed, may indicate binary incompatibility",
9896 module_name, class_name);
9897 #if PY_VERSION_HEX < 0x02050000
9898 PyErr_Warn(NULL, warning);
9900 PyErr_WarnEx(NULL, warning, 0);
9903 else if (((PyTypeObject *)result)->tp_basicsize != size) {
9904 PyErr_Format(PyExc_ValueError,
9905 "%s.%s has the wrong size, try recompiling",
9906 module_name, class_name);
9909 return (PyTypeObject *)result;
9911 Py_XDECREF(py_module);
9917 #ifndef __PYX_HAVE_RT_ImportModule
9918 #define __PYX_HAVE_RT_ImportModule
9919 static PyObject *__Pyx_ImportModule(const char *name) {
9920 PyObject *py_name = 0;
9921 PyObject *py_module = 0;
9923 #if PY_MAJOR_VERSION < 3
9924 py_name = PyString_FromString(name);
9926 py_name = PyUnicode_FromString(name);
9930 py_module = PyImport_Import(py_name);
9934 Py_XDECREF(py_name);
9939 #include "compile.h"
9940 #include "frameobject.h"
9941 #include "traceback.h"
9943 static void __Pyx_AddTraceback(const char *funcname) {
9944 PyObject *py_srcfile = 0;
9945 PyObject *py_funcname = 0;
9946 PyObject *py_globals = 0;
9947 PyCodeObject *py_code = 0;
9948 PyFrameObject *py_frame = 0;
9950 #if PY_MAJOR_VERSION < 3
9951 py_srcfile = PyString_FromString(__pyx_filename);
9953 py_srcfile = PyUnicode_FromString(__pyx_filename);
9955 if (!py_srcfile) goto bad;
9956 if (__pyx_clineno) {
9957 #if PY_MAJOR_VERSION < 3
9958 py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, __pyx_clineno);
9960 py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, __pyx_clineno);
9964 #if PY_MAJOR_VERSION < 3
9965 py_funcname = PyString_FromString(funcname);
9967 py_funcname = PyUnicode_FromString(funcname);
9970 if (!py_funcname) goto bad;
9971 py_globals = PyModule_GetDict(__pyx_m);
9972 if (!py_globals) goto bad;
9973 py_code = PyCode_New(
9974 0, /*int argcount,*/
9975 #if PY_MAJOR_VERSION >= 3
9976 0, /*int kwonlyargcount,*/
9979 0, /*int stacksize,*/
9981 __pyx_empty_bytes, /*PyObject *code,*/
9982 __pyx_empty_tuple, /*PyObject *consts,*/
9983 __pyx_empty_tuple, /*PyObject *names,*/
9984 __pyx_empty_tuple, /*PyObject *varnames,*/
9985 __pyx_empty_tuple, /*PyObject *freevars,*/
9986 __pyx_empty_tuple, /*PyObject *cellvars,*/
9987 py_srcfile, /*PyObject *filename,*/
9988 py_funcname, /*PyObject *name,*/
9989 __pyx_lineno, /*int firstlineno,*/
9990 __pyx_empty_bytes /*PyObject *lnotab*/
9992 if (!py_code) goto bad;
9993 py_frame = PyFrame_New(
9994 PyThreadState_GET(), /*PyThreadState *tstate,*/
9995 py_code, /*PyCodeObject *code,*/
9996 py_globals, /*PyObject *globals,*/
9997 0 /*PyObject *locals*/
9999 if (!py_frame) goto bad;
10000 py_frame->f_lineno = __pyx_lineno;
10001 PyTraceBack_Here(py_frame);
10003 Py_XDECREF(py_srcfile);
10004 Py_XDECREF(py_funcname);
10005 Py_XDECREF(py_code);
10006 Py_XDECREF(py_frame);
10009 static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) {
10011 #if PY_MAJOR_VERSION < 3
10012 if (t->is_unicode) {
10013 *t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL);
10014 } else if (t->intern) {
10015 *t->p = PyString_InternFromString(t->s);
10017 *t->p = PyString_FromStringAndSize(t->s, t->n - 1);
10019 #else /* Python 3+ has unicode identifiers */
10020 if (t->is_unicode | t->is_str) {
10022 *t->p = PyUnicode_InternFromString(t->s);
10023 } else if (t->encoding) {
10024 *t->p = PyUnicode_Decode(t->s, t->n - 1, t->encoding, NULL);
10026 *t->p = PyUnicode_FromStringAndSize(t->s, t->n - 1);
10029 *t->p = PyBytes_FromStringAndSize(t->s, t->n - 1);
10039 /* Type Conversion Functions */
10041 static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) {
10042 int is_true = x == Py_True;
10043 if (is_true | (x == Py_False) | (x == Py_None)) return is_true;
10044 else return PyObject_IsTrue(x);
10047 static CYTHON_INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x) {
10048 PyNumberMethods *m;
10049 const char *name = NULL;
10050 PyObject *res = NULL;
10051 #if PY_VERSION_HEX < 0x03000000
10052 if (PyInt_Check(x) || PyLong_Check(x))
10054 if (PyLong_Check(x))
10056 return Py_INCREF(x), x;
10057 m = Py_TYPE(x)->tp_as_number;
10058 #if PY_VERSION_HEX < 0x03000000
10059 if (m && m->nb_int) {
10061 res = PyNumber_Int(x);
10063 else if (m && m->nb_long) {
10065 res = PyNumber_Long(x);
10068 if (m && m->nb_int) {
10070 res = PyNumber_Long(x);
10074 #if PY_VERSION_HEX < 0x03000000
10075 if (!PyInt_Check(res) && !PyLong_Check(res)) {
10077 if (!PyLong_Check(res)) {
10079 PyErr_Format(PyExc_TypeError,
10080 "__%s__ returned non-%s (type %.200s)",
10081 name, name, Py_TYPE(res)->tp_name);
10086 else if (!PyErr_Occurred()) {
10087 PyErr_SetString(PyExc_TypeError,
10088 "an integer is required");
10093 static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) {
10095 PyObject* x = PyNumber_Index(b);
10097 ival = PyInt_AsSsize_t(x);
10102 static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) {
10103 #if PY_VERSION_HEX < 0x02050000
10104 if (ival <= LONG_MAX)
10105 return PyInt_FromLong((long)ival);
10107 unsigned char *bytes = (unsigned char *) &ival;
10108 int one = 1; int little = (int)*(unsigned char*)&one;
10109 return _PyLong_FromByteArray(bytes, sizeof(size_t), little, 0);
10112 return PyInt_FromSize_t(ival);
10116 static CYTHON_INLINE size_t __Pyx_PyInt_AsSize_t(PyObject* x) {
10117 unsigned PY_LONG_LONG val = __Pyx_PyInt_AsUnsignedLongLong(x);
10118 if (unlikely(val == (unsigned PY_LONG_LONG)-1 && PyErr_Occurred())) {
10120 } else if (unlikely(val != (unsigned PY_LONG_LONG)(size_t)val)) {
10121 PyErr_SetString(PyExc_OverflowError,
10122 "value too large to convert to size_t");
10125 return (size_t)val;
10129 #endif /* Py_PYTHON_H */