/* Generated by Cython 0.15.1 */

#define PY_SSIZE_T_CLEAN
#include "Python.h"
#ifndef Py_PYTHON_H
    #error Python headers needed to compile C extensions, please install development version of Python.
#else

#include <stddef.h> /* For offsetof */
#ifndef offsetof
#define offsetof(type, member) ( (size_t) & ((type*)0) -> member )
#endif

#if !defined(WIN32) && !defined(MS_WINDOWS)
  #ifndef __stdcall
    #define __stdcall
  #endif
  #ifndef __cdecl
    #define __cdecl
  #endif
  #ifndef __fastcall
    #define __fastcall
  #endif
#endif

#ifndef DL_IMPORT
  #define DL_IMPORT(t) t
#endif
#ifndef DL_EXPORT
  #define DL_EXPORT(t) t
#endif

#ifndef PY_LONG_LONG
  #define PY_LONG_LONG LONG_LONG
#endif

#if PY_VERSION_HEX < 0x02040000
  #define METH_COEXIST 0
  #define PyDict_CheckExact(op) (Py_TYPE(op) == &PyDict_Type)
  #define PyDict_Contains(d,o)   PySequence_Contains(d,o)
#endif

#if PY_VERSION_HEX < 0x02050000
  typedef int Py_ssize_t;
  #define PY_SSIZE_T_MAX INT_MAX
  #define PY_SSIZE_T_MIN INT_MIN
  #define PY_FORMAT_SIZE_T ""
  #define PyInt_FromSsize_t(z) PyInt_FromLong(z)
  #define PyInt_AsSsize_t(o)   __Pyx_PyInt_AsInt(o)
  #define PyNumber_Index(o)    PyNumber_Int(o)
  #define PyIndex_Check(o)     PyNumber_Check(o)
  #define PyErr_WarnEx(category, message, stacklevel) PyErr_Warn(category, message)
#endif

#if PY_VERSION_HEX < 0x02060000
  #define Py_REFCNT(ob) (((PyObject*)(ob))->ob_refcnt)
  #define Py_TYPE(ob)   (((PyObject*)(ob))->ob_type)
  #define Py_SIZE(ob)   (((PyVarObject*)(ob))->ob_size)
  #define PyVarObject_HEAD_INIT(type, size) \
          PyObject_HEAD_INIT(type) size,
  #define PyType_Modified(t)

  typedef struct {
     void *buf;
     PyObject *obj;
     Py_ssize_t len;
     Py_ssize_t itemsize;
     int readonly;
     int ndim;
     char *format;
     Py_ssize_t *shape;
     Py_ssize_t *strides;
     Py_ssize_t *suboffsets;
     void *internal;
  } Py_buffer;

  #define PyBUF_SIMPLE 0
  #define PyBUF_WRITABLE 0x0001
  #define PyBUF_FORMAT 0x0004
  #define PyBUF_ND 0x0008
  #define PyBUF_STRIDES (0x0010 | PyBUF_ND)
  #define PyBUF_C_CONTIGUOUS (0x0020 | PyBUF_STRIDES)
  #define PyBUF_F_CONTIGUOUS (0x0040 | PyBUF_STRIDES)
  #define PyBUF_ANY_CONTIGUOUS (0x0080 | PyBUF_STRIDES)
  #define PyBUF_INDIRECT (0x0100 | PyBUF_STRIDES)

#endif

#if PY_MAJOR_VERSION < 3
  #define __Pyx_BUILTIN_MODULE_NAME "__builtin__"
#else
  #define __Pyx_BUILTIN_MODULE_NAME "builtins"
#endif

#if PY_MAJOR_VERSION >= 3
  #define Py_TPFLAGS_CHECKTYPES 0
  #define Py_TPFLAGS_HAVE_INDEX 0
#endif

#if (PY_VERSION_HEX < 0x02060000) || (PY_MAJOR_VERSION >= 3)
  #define Py_TPFLAGS_HAVE_NEWBUFFER 0
#endif

#if PY_MAJOR_VERSION >= 3
  #define PyBaseString_Type            PyUnicode_Type
  #define PyStringObject               PyUnicodeObject
  #define PyString_Type                PyUnicode_Type
  #define PyString_Check               PyUnicode_Check
  #define PyString_CheckExact          PyUnicode_CheckExact
#endif

#if PY_VERSION_HEX < 0x02060000
  #define PyBytesObject                PyStringObject
  #define PyBytes_Type                 PyString_Type
  #define PyBytes_Check                PyString_Check
  #define PyBytes_CheckExact           PyString_CheckExact
  #define PyBytes_FromString           PyString_FromString
  #define PyBytes_FromStringAndSize    PyString_FromStringAndSize
  #define PyBytes_FromFormat           PyString_FromFormat
  #define PyBytes_DecodeEscape         PyString_DecodeEscape
  #define PyBytes_AsString             PyString_AsString
  #define PyBytes_AsStringAndSize      PyString_AsStringAndSize
  #define PyBytes_Size                 PyString_Size
  #define PyBytes_AS_STRING            PyString_AS_STRING
  #define PyBytes_GET_SIZE             PyString_GET_SIZE
  #define PyBytes_Repr                 PyString_Repr
  #define PyBytes_Concat               PyString_Concat
  #define PyBytes_ConcatAndDel         PyString_ConcatAndDel
#endif

#if PY_VERSION_HEX < 0x02060000
  #define PySet_Check(obj)             PyObject_TypeCheck(obj, &PySet_Type)
  #define PyFrozenSet_Check(obj)       PyObject_TypeCheck(obj, &PyFrozenSet_Type)
#endif
#ifndef PySet_CheckExact
  #define PySet_CheckExact(obj)        (Py_TYPE(obj) == &PySet_Type)
#endif

#define __Pyx_TypeCheck(obj, type) PyObject_TypeCheck(obj, (PyTypeObject *)type)

#if PY_MAJOR_VERSION >= 3
  #define PyIntObject                  PyLongObject
  #define PyInt_Type                   PyLong_Type
  #define PyInt_Check(op)              PyLong_Check(op)
  #define PyInt_CheckExact(op)         PyLong_CheckExact(op)
  #define PyInt_FromString             PyLong_FromString
  #define PyInt_FromUnicode            PyLong_FromUnicode
  #define PyInt_FromLong               PyLong_FromLong
  #define PyInt_FromSize_t             PyLong_FromSize_t
  #define PyInt_FromSsize_t            PyLong_FromSsize_t
  #define PyInt_AsLong                 PyLong_AsLong
  #define PyInt_AS_LONG                PyLong_AS_LONG
  #define PyInt_AsSsize_t              PyLong_AsSsize_t
  #define PyInt_AsUnsignedLongMask     PyLong_AsUnsignedLongMask
  #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask
#endif

#if PY_MAJOR_VERSION >= 3
  #define PyBoolObject                 PyLongObject
#endif

#if PY_VERSION_HEX < 0x03020000
  typedef long Py_hash_t;
  #define __Pyx_PyInt_FromHash_t PyInt_FromLong
  #define __Pyx_PyInt_AsHash_t   PyInt_AsLong
#else
  #define __Pyx_PyInt_FromHash_t PyInt_FromSsize_t
  #define __Pyx_PyInt_AsHash_t   PyInt_AsSsize_t
#endif


#if PY_MAJOR_VERSION >= 3
  #define __Pyx_PyNumber_Divide(x,y)         PyNumber_TrueDivide(x,y)
  #define __Pyx_PyNumber_InPlaceDivide(x,y)  PyNumber_InPlaceTrueDivide(x,y)
#else
  #define __Pyx_PyNumber_Divide(x,y)         PyNumber_Divide(x,y)
  #define __Pyx_PyNumber_InPlaceDivide(x,y)  PyNumber_InPlaceDivide(x,y)
#endif

#if (PY_MAJOR_VERSION < 3) || (PY_VERSION_HEX >= 0x03010300)
  #define __Pyx_PySequence_GetSlice(obj, a, b) PySequence_GetSlice(obj, a, b)
  #define __Pyx_PySequence_SetSlice(obj, a, b, value) PySequence_SetSlice(obj, a, b, value)
  #define __Pyx_PySequence_DelSlice(obj, a, b) PySequence_DelSlice(obj, a, b)
#else
  #define __Pyx_PySequence_GetSlice(obj, a, b) (unlikely(!(obj)) ? \
        (PyErr_SetString(PyExc_SystemError, "null argument to internal routine"), (PyObject*)0) : \
        (likely((obj)->ob_type->tp_as_mapping) ? (PySequence_GetSlice(obj, a, b)) : \
            (PyErr_Format(PyExc_TypeError, "'%.200s' object is unsliceable", (obj)->ob_type->tp_name), (PyObject*)0)))
  #define __Pyx_PySequence_SetSlice(obj, a, b, value) (unlikely(!(obj)) ? \
        (PyErr_SetString(PyExc_SystemError, "null argument to internal routine"), -1) : \
        (likely((obj)->ob_type->tp_as_mapping) ? (PySequence_SetSlice(obj, a, b, value)) : \
            (PyErr_Format(PyExc_TypeError, "'%.200s' object doesn't support slice assignment", (obj)->ob_type->tp_name), -1)))
  #define __Pyx_PySequence_DelSlice(obj, a, b) (unlikely(!(obj)) ? \
        (PyErr_SetString(PyExc_SystemError, "null argument to internal routine"), -1) : \
        (likely((obj)->ob_type->tp_as_mapping) ? (PySequence_DelSlice(obj, a, b)) : \
            (PyErr_Format(PyExc_TypeError, "'%.200s' object doesn't support slice deletion", (obj)->ob_type->tp_name), -1)))
#endif

#if PY_MAJOR_VERSION >= 3
  #define PyMethod_New(func, self, klass) ((self) ? PyMethod_New(func, self) : PyInstanceMethod_New(func))
#endif

#if PY_VERSION_HEX < 0x02050000
  #define __Pyx_GetAttrString(o,n)   PyObject_GetAttrString((o),((char *)(n)))
  #define __Pyx_SetAttrString(o,n,a) PyObject_SetAttrString((o),((char *)(n)),(a))
  #define __Pyx_DelAttrString(o,n)   PyObject_DelAttrString((o),((char *)(n)))
#else
  #define __Pyx_GetAttrString(o,n)   PyObject_GetAttrString((o),(n))
  #define __Pyx_SetAttrString(o,n,a) PyObject_SetAttrString((o),(n),(a))
  #define __Pyx_DelAttrString(o,n)   PyObject_DelAttrString((o),(n))
#endif

#if PY_VERSION_HEX < 0x02050000
  #define __Pyx_NAMESTR(n) ((char *)(n))
  #define __Pyx_DOCSTR(n)  ((char *)(n))
#else
  #define __Pyx_NAMESTR(n) (n)
  #define __Pyx_DOCSTR(n)  (n)
#endif

#ifndef __PYX_EXTERN_C
  #ifdef __cplusplus
    #define __PYX_EXTERN_C extern "C"
  #else
    #define __PYX_EXTERN_C extern
  #endif
#endif

#if defined(WIN32) || defined(MS_WINDOWS)
#define _USE_MATH_DEFINES
#endif
#include <math.h>
#define __PYX_HAVE__xmmsvalue
#define __PYX_HAVE_API__xmmsvalue
#include "xmmsc/xmmsv.h"
#include "xmmsc/xmmsc_idnumbers.h"
#include "xmmsclient/xmmsclient.h"
#ifdef _OPENMP
#include <omp.h>
#endif /* _OPENMP */

#ifdef PYREX_WITHOUT_ASSERTIONS
#define CYTHON_WITHOUT_ASSERTIONS
#endif


/* inline attribute */
#ifndef CYTHON_INLINE
  #if defined(__GNUC__)
    #define CYTHON_INLINE __inline__
  #elif defined(_MSC_VER)
    #define CYTHON_INLINE __inline
  #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
    #define CYTHON_INLINE inline
  #else
    #define CYTHON_INLINE
  #endif
#endif

/* unused attribute */
#ifndef CYTHON_UNUSED
# if defined(__GNUC__)
#   if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
#     define CYTHON_UNUSED __attribute__ ((__unused__))
#   else
#     define CYTHON_UNUSED
#   endif
# elif defined(__ICC) || defined(__INTEL_COMPILER)
#   define CYTHON_UNUSED __attribute__ ((__unused__))
# else
#   define CYTHON_UNUSED
# endif
#endif

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*/


/* Type Conversion Predeclarations */

#define __Pyx_PyBytes_FromUString(s) PyBytes_FromString((char*)s)
#define __Pyx_PyBytes_AsUString(s)   ((unsigned char*) PyBytes_AsString(s))

#define __Pyx_Owned_Py_None(b) (Py_INCREF(Py_None), Py_None)
#define __Pyx_PyBool_FromLong(b) ((b) ? (Py_INCREF(Py_True), Py_True) : (Py_INCREF(Py_False), Py_False))
static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*);
static CYTHON_INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x);

static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*);
static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t);
static CYTHON_INLINE size_t __Pyx_PyInt_AsSize_t(PyObject*);

#define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x))


#ifdef __GNUC__
  /* Test for GCC > 2.95 */
  #if __GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95))
    #define likely(x)   __builtin_expect(!!(x), 1)
    #define unlikely(x) __builtin_expect(!!(x), 0)
  #else /* __GNUC__ > 2 ... */
    #define likely(x)   (x)
    #define unlikely(x) (x)
  #endif /* __GNUC__ > 2 ... */
#else /* __GNUC__ */
  #define likely(x)   (x)
  #define unlikely(x) (x)
#endif /* __GNUC__ */
    
static PyObject *__pyx_m;
static PyObject *__pyx_b;
static PyObject *__pyx_empty_tuple;
static PyObject *__pyx_empty_bytes;
static int __pyx_lineno;
static int __pyx_clineno = 0;
static const char * __pyx_cfilenm= __FILE__;
static const char *__pyx_filename;


static const char *__pyx_f[] = {
  "xmmsvalue.pyx",
  "xmmsutils.pxd",
};

/*--- Type declarations ---*/
struct __pyx_obj_9xmmsvalue_CollectionRef;
struct __pyx_obj_9xmmsvalue_CollectionIDList;
struct __pyx_obj_9xmmsvalue_CollectionOperands;
struct __pyx_obj_9xmmsvalue_AttributesIterator;
struct __pyx_obj_9xmmsvalue_XmmsListIter;
struct __pyx_obj_9xmmsvalue_XmmsValue;
struct __pyx_obj_9xmmsvalue_CollectionAttributes;
struct __pyx_obj_9xmmsvalue_XmmsDictIter;
struct __pyx_obj_9xmmsvalue_Collection;
struct __pyx_opt_args_9xmmsvalue_9XmmsValue_set_value;

/* "xmmsvalue.pxd":65
 * 	cpdef clear(self)
 * 
 * cdef enum AttributesIterType:             # <<<<<<<<<<<<<<
 * 	ITER_KEYS = 1
 * 	ITER_VALUES = 2
 */
enum __pyx_t_9xmmsvalue_AttributesIterType {
  __pyx_e_9xmmsvalue_ITER_KEYS = 1,
  __pyx_e_9xmmsvalue_ITER_VALUES = 2,
  __pyx_e_9xmmsvalue_ITER_ITEMS = 3
};

/* "xmmsvalue.pxd":14
 * 	cdef int ispropdict
 * 
 * 	cdef  set_value(self, xmmsv_t *value, int ispropdict=*)             # <<<<<<<<<<<<<<
 * 	cpdef set_pyval(self, pyval)
 * 	cpdef get_type(self)
 */
struct __pyx_opt_args_9xmmsvalue_9XmmsValue_set_value {
  int __pyx_n;
  int ispropdict;
};

/* "xmmsvalue.pxd":41
 * 	cdef xmmsv_dict_iter_t *it
 * 
 * cdef class CollectionRef:             # <<<<<<<<<<<<<<
 * 	cdef xmmsv_coll_t *coll
 * 
 */
struct __pyx_obj_9xmmsvalue_CollectionRef {
  PyObject_HEAD
  struct __pyx_vtabstruct_9xmmsvalue_CollectionRef *__pyx_vtab;
  xmmsv_coll_t *coll;
};


/* "xmmsvalue.pxd":88
 * 
 * 
 * cdef class CollectionIDList(CollectionRef):             # <<<<<<<<<<<<<<
 * 	cpdef list(self)
 * 	cpdef append(self, int v)
 */
struct __pyx_obj_9xmmsvalue_CollectionIDList {
  struct __pyx_obj_9xmmsvalue_CollectionRef __pyx_base;
};


/* "xmmsvalue.pxd":77
 * 
 * 
 * cdef class CollectionOperands(CollectionRef):             # <<<<<<<<<<<<<<
 * 	cdef object pylist
 * 	cdef init_pylist(self)
 */
struct __pyx_obj_9xmmsvalue_CollectionOperands {
  struct __pyx_obj_9xmmsvalue_CollectionRef __pyx_base;
  PyObject *pylist;
};


/* "xmmsvalue.pxd":69
 * 	ITER_VALUES = 2
 * 	ITER_ITEMS = 3
 * cdef class AttributesIterator:             # <<<<<<<<<<<<<<
 * 	cdef xmmsv_dict_iter_t *diter
 * 	cdef int itertype
 */
struct __pyx_obj_9xmmsvalue_AttributesIterator {
  PyObject_HEAD
  struct __pyx_vtabstruct_9xmmsvalue_AttributesIterator *__pyx_vtab;
  xmmsv_dict_iter_t *diter;
  int itertype;
  struct __pyx_obj_9xmmsvalue_CollectionAttributes *attr;
};


/* "xmmsvalue.pxd":31
 * 	cpdef value(self)
 * 
 * cdef class XmmsListIter:             # <<<<<<<<<<<<<<
 * 	cdef object sourcepref
 * 	cdef xmmsv_t *val
 */
struct __pyx_obj_9xmmsvalue_XmmsListIter {
  PyObject_HEAD
  PyObject *sourcepref;
  xmmsv_t *val;
  xmmsv_list_iter_t *it;
};


/* "xmmsvalue.pxd":9
 * 	ctypedef struct xmmsv_list_iter_t
 * 
 * cdef class XmmsValue:             # <<<<<<<<<<<<<<
 * 	cdef object sourcepref
 * 	cdef xmmsv_t *val
 */
struct __pyx_obj_9xmmsvalue_XmmsValue {
  PyObject_HEAD
  struct __pyx_vtabstruct_9xmmsvalue_XmmsValue *__pyx_vtab;
  PyObject *sourcepref;
  xmmsv_t *val;
  int ispropdict;
};


/* "xmmsvalue.pxd":55
 * 	cdef init_operands(self)
 * 
 * cdef class CollectionAttributes(CollectionRef):             # <<<<<<<<<<<<<<
 * 	cpdef get_dict(self)
 * 	cpdef iterkeys(self)
 */
struct __pyx_obj_9xmmsvalue_CollectionAttributes {
  struct __pyx_obj_9xmmsvalue_CollectionRef __pyx_base;
};


/* "xmmsvalue.pxd":36
 * 	cdef xmmsv_list_iter_t *it
 * 
 * cdef class XmmsDictIter:             # <<<<<<<<<<<<<<
 * 	cdef object sourcepref
 * 	cdef xmmsv_t *val
 */
struct __pyx_obj_9xmmsvalue_XmmsDictIter {
  PyObject_HEAD
  PyObject *sourcepref;
  xmmsv_t *val;
  xmmsv_dict_iter_t *it;
};


/* "xmmsvalue.pxd":46
 * 	cdef set_collection(self, xmmsv_coll_t *coll)
 * 
 * cdef class Collection(CollectionRef):             # <<<<<<<<<<<<<<
 * 	cdef object _attributes
 * 	cdef object _operands
 */
struct __pyx_obj_9xmmsvalue_Collection {
  struct __pyx_obj_9xmmsvalue_CollectionRef __pyx_base;
  PyObject *_attributes;
  PyObject *_operands;
  PyObject *_idlist;
};



/* "xmmsvalue.pyx":326
 * 
 * 
 * cdef class CollectionRef:             # <<<<<<<<<<<<<<
 * 	def __cinit__(self):
 * 		self.coll = NULL
 */

struct __pyx_vtabstruct_9xmmsvalue_CollectionRef {
  PyObject *(*set_collection)(struct __pyx_obj_9xmmsvalue_CollectionRef *, xmmsv_coll_t *);
};
static struct __pyx_vtabstruct_9xmmsvalue_CollectionRef *__pyx_vtabptr_9xmmsvalue_CollectionRef;


/* "xmmsvalue.pyx":469
 * 
 * 
 * cdef class CollectionAttributes(CollectionRef):             # <<<<<<<<<<<<<<
 * 	def __init__(self, Collection c):
 * 		if c.coll == NULL:
 */

struct __pyx_vtabstruct_9xmmsvalue_CollectionAttributes {
  struct __pyx_vtabstruct_9xmmsvalue_CollectionRef __pyx_base;
  PyObject *(*get_dict)(struct __pyx_obj_9xmmsvalue_CollectionAttributes *, int __pyx_skip_dispatch);
  PyObject *(*iterkeys)(struct __pyx_obj_9xmmsvalue_CollectionAttributes *, int __pyx_skip_dispatch);
  PyObject *(*keys)(struct __pyx_obj_9xmmsvalue_CollectionAttributes *, int __pyx_skip_dispatch);
  PyObject *(*itervalues)(struct __pyx_obj_9xmmsvalue_CollectionAttributes *, int __pyx_skip_dispatch);
  PyObject *(*values)(struct __pyx_obj_9xmmsvalue_CollectionAttributes *, int __pyx_skip_dispatch);
  PyObject *(*iteritems)(struct __pyx_obj_9xmmsvalue_CollectionAttributes *, int __pyx_skip_dispatch);
  PyObject *(*items)(struct __pyx_obj_9xmmsvalue_CollectionAttributes *, int __pyx_skip_dispatch);
  PyObject *(*clear)(struct __pyx_obj_9xmmsvalue_CollectionAttributes *, int __pyx_skip_dispatch);
};
static struct __pyx_vtabstruct_9xmmsvalue_CollectionAttributes *__pyx_vtabptr_9xmmsvalue_CollectionAttributes;


/* "xmmsvalue.pyx":69
 * 
 * 
 * cdef class XmmsValue:             # <<<<<<<<<<<<<<
 * 	#cdef object sourcepref
 * 	#cdef xmmsv_t *val
 */

struct __pyx_vtabstruct_9xmmsvalue_XmmsValue {
  PyObject *(*set_value)(struct __pyx_obj_9xmmsvalue_XmmsValue *, xmmsv_t *, struct __pyx_opt_args_9xmmsvalue_9XmmsValue_set_value *__pyx_optional_args);
  PyObject *(*set_pyval)(struct __pyx_obj_9xmmsvalue_XmmsValue *, PyObject *, int __pyx_skip_dispatch);
  PyObject *(*get_type)(struct __pyx_obj_9xmmsvalue_XmmsValue *, int __pyx_skip_dispatch);
  PyObject *(*iserror)(struct __pyx_obj_9xmmsvalue_XmmsValue *, int __pyx_skip_dispatch);
  PyObject *(*is_error)(struct __pyx_obj_9xmmsvalue_XmmsValue *, int __pyx_skip_dispatch);
  PyObject *(*get_error)(struct __pyx_obj_9xmmsvalue_XmmsValue *, int __pyx_skip_dispatch);
  PyObject *(*get_int)(struct __pyx_obj_9xmmsvalue_XmmsValue *, int __pyx_skip_dispatch);
  PyObject *(*get_string)(struct __pyx_obj_9xmmsvalue_XmmsValue *, int __pyx_skip_dispatch);
  PyObject *(*get_bin)(struct __pyx_obj_9xmmsvalue_XmmsValue *, int __pyx_skip_dispatch);
  PyObject *(*get_coll)(struct __pyx_obj_9xmmsvalue_XmmsValue *, int __pyx_skip_dispatch);
  PyObject *(*get_dict)(struct __pyx_obj_9xmmsvalue_XmmsValue *, int __pyx_skip_dispatch);
  PyObject *(*get_dict_iter)(struct __pyx_obj_9xmmsvalue_XmmsValue *, int __pyx_skip_dispatch);
  PyObject *(*get_propdict)(struct __pyx_obj_9xmmsvalue_XmmsValue *, int __pyx_skip_dispatch);
  PyObject *(*get_list)(struct __pyx_obj_9xmmsvalue_XmmsValue *, int __pyx_skip_dispatch);
  PyObject *(*get_list_iter)(struct __pyx_obj_9xmmsvalue_XmmsValue *, int __pyx_skip_dispatch);
  PyObject *(*value)(struct __pyx_obj_9xmmsvalue_XmmsValue *, int __pyx_skip_dispatch);
};
static struct __pyx_vtabstruct_9xmmsvalue_XmmsValue *__pyx_vtabptr_9xmmsvalue_XmmsValue;


/* "xmmsvalue.pyx":424
 * 
 * 
 * cdef class AttributesIterator:             # <<<<<<<<<<<<<<
 * 	#cdef xmmsv_dict_iter_t *diter
 * 	#cdef int itertype
 */

struct __pyx_vtabstruct_9xmmsvalue_AttributesIterator {
  PyObject *(*reset)(struct __pyx_obj_9xmmsvalue_AttributesIterator *, int __pyx_skip_dispatch);
};
static struct __pyx_vtabstruct_9xmmsvalue_AttributesIterator *__pyx_vtabptr_9xmmsvalue_AttributesIterator;



/* "xmmsvalue.pyx":603
 * 
 * 
 * cdef class CollectionIDList(CollectionRef):             # <<<<<<<<<<<<<<
 * 	def __init__(self, Collection c):
 * 		if c.coll == NULL:
 */

struct __pyx_vtabstruct_9xmmsvalue_CollectionIDList {
  struct __pyx_vtabstruct_9xmmsvalue_CollectionRef __pyx_base;
  PyObject *(*list)(struct __pyx_obj_9xmmsvalue_CollectionIDList *, int __pyx_skip_dispatch);
  PyObject *(*append)(struct __pyx_obj_9xmmsvalue_CollectionIDList *, int, int __pyx_skip_dispatch);
  PyObject *(*extend)(struct __pyx_obj_9xmmsvalue_CollectionIDList *, PyObject *, int __pyx_skip_dispatch);
  PyObject *(*insert)(struct __pyx_obj_9xmmsvalue_CollectionIDList *, int, int, int __pyx_skip_dispatch);
  PyObject *(*remove)(struct __pyx_obj_9xmmsvalue_CollectionIDList *, int, int __pyx_skip_dispatch);
  PyObject *(*clear)(struct __pyx_obj_9xmmsvalue_CollectionIDList *, int __pyx_skip_dispatch);
};
static struct __pyx_vtabstruct_9xmmsvalue_CollectionIDList *__pyx_vtabptr_9xmmsvalue_CollectionIDList;


/* "xmmsvalue.pyx":343
 * 
 * cdef _idlist_types = [XMMS_COLLECTION_TYPE_IDLIST, XMMS_COLLECTION_TYPE_QUEUE, XMMS_COLLECTION_TYPE_PARTYSHUFFLE]
 * cdef class Collection(CollectionRef):             # <<<<<<<<<<<<<<
 * 	#cdef object _attributes
 * 	#cdef object _operands
 */

struct __pyx_vtabstruct_9xmmsvalue_Collection {
  struct __pyx_vtabstruct_9xmmsvalue_CollectionRef __pyx_base;
  PyObject *(*init_idlist)(struct __pyx_obj_9xmmsvalue_Collection *);
  PyObject *(*init_attributes)(struct __pyx_obj_9xmmsvalue_Collection *);
  PyObject *(*init_operands)(struct __pyx_obj_9xmmsvalue_Collection *);
};
static struct __pyx_vtabstruct_9xmmsvalue_Collection *__pyx_vtabptr_9xmmsvalue_Collection;


/* "xmmsvalue.pyx":542
 * 		return xmmsv_coll_attribute_get(self.coll, name, &value)
 * 
 * cdef class CollectionOperands(CollectionRef):             # <<<<<<<<<<<<<<
 * 	#cdef object pylist
 * 
 */

struct __pyx_vtabstruct_9xmmsvalue_CollectionOperands {
  struct __pyx_vtabstruct_9xmmsvalue_CollectionRef __pyx_base;
  PyObject *(*init_pylist)(struct __pyx_obj_9xmmsvalue_CollectionOperands *);
  PyObject *(*append)(struct __pyx_obj_9xmmsvalue_CollectionOperands *, struct __pyx_obj_9xmmsvalue_Collection *, int __pyx_skip_dispatch);
  PyObject *(*extend)(struct __pyx_obj_9xmmsvalue_CollectionOperands *, PyObject *, int __pyx_skip_dispatch);
  PyObject *(*remove)(struct __pyx_obj_9xmmsvalue_CollectionOperands *, struct __pyx_obj_9xmmsvalue_Collection *, int __pyx_skip_dispatch);
  PyObject *(*clear)(struct __pyx_obj_9xmmsvalue_CollectionOperands *, int __pyx_skip_dispatch);
  PyObject *(*list)(struct __pyx_obj_9xmmsvalue_CollectionOperands *, int __pyx_skip_dispatch);
};
static struct __pyx_vtabstruct_9xmmsvalue_CollectionOperands *__pyx_vtabptr_9xmmsvalue_CollectionOperands;

#ifndef CYTHON_REFNANNY
  #define CYTHON_REFNANNY 0
#endif

#if CYTHON_REFNANNY
  typedef struct {
    void (*INCREF)(void*, PyObject*, int);
    void (*DECREF)(void*, PyObject*, int);
    void (*GOTREF)(void*, PyObject*, int);
    void (*GIVEREF)(void*, PyObject*, int);
    void* (*SetupContext)(const char*, int, const char*);
    void (*FinishContext)(void**);
  } __Pyx_RefNannyAPIStruct;
  static __Pyx_RefNannyAPIStruct *__Pyx_RefNanny = NULL;
  static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname); /*proto*/
  #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL;
  #define __Pyx_RefNannySetupContext(name)           __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__)
  #define __Pyx_RefNannyFinishContext()           __Pyx_RefNanny->FinishContext(&__pyx_refnanny)
  #define __Pyx_INCREF(r)  __Pyx_RefNanny->INCREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
  #define __Pyx_DECREF(r)  __Pyx_RefNanny->DECREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
  #define __Pyx_GOTREF(r)  __Pyx_RefNanny->GOTREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
  #define __Pyx_GIVEREF(r) __Pyx_RefNanny->GIVEREF(__pyx_refnanny, (PyObject *)(r), __LINE__)
  #define __Pyx_XINCREF(r)  do { if((r) != NULL) {__Pyx_INCREF(r); }} while(0)
  #define __Pyx_XDECREF(r)  do { if((r) != NULL) {__Pyx_DECREF(r); }} while(0)
  #define __Pyx_XGOTREF(r)  do { if((r) != NULL) {__Pyx_GOTREF(r); }} while(0)
  #define __Pyx_XGIVEREF(r) do { if((r) != NULL) {__Pyx_GIVEREF(r);}} while(0)
#else
  #define __Pyx_RefNannyDeclarations
  #define __Pyx_RefNannySetupContext(name)
  #define __Pyx_RefNannyFinishContext()
  #define __Pyx_INCREF(r) Py_INCREF(r)
  #define __Pyx_DECREF(r) Py_DECREF(r)
  #define __Pyx_GOTREF(r)
  #define __Pyx_GIVEREF(r)
  #define __Pyx_XINCREF(r) Py_XINCREF(r)
  #define __Pyx_XDECREF(r) Py_XDECREF(r)
  #define __Pyx_XGOTREF(r)
  #define __Pyx_XGIVEREF(r)
#endif /* CYTHON_REFNANNY */

static PyObject *__Pyx_GetName(PyObject *dict, PyObject *name); /*proto*/

static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb); /*proto*/

static CYTHON_INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb); /*proto*/
static CYTHON_INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb); /*proto*/

static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause); /*proto*/

static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact,
    Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found); /*proto*/

static CYTHON_INLINE int __Pyx_CheckKeywordStrings(PyObject *kwdict,
    const char* function_name, int kw_allowed); /*proto*/

static void __Pyx_RaiseDoubleKeywordsError(
    const char* func_name, PyObject* kw_name); /*proto*/

static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[],     PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args,     const char* function_name); /*proto*/

static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index);

static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected);

static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected); /*proto*/

static int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed,
    const char *name, int exact); /*proto*/

static CYTHON_INLINE int __Pyx_NegateNonNeg(int b) { 
    return unlikely(b < 0) ? b : !b; 
}
static CYTHON_INLINE PyObject* __Pyx_PyBoolOrNull_FromLong(long b) {
    return unlikely(b < 0) ? NULL : __Pyx_PyBool_FromLong(b);
}

static CYTHON_INLINE void __Pyx_RaiseNoneIndexingError(void);

#if PY_MAJOR_VERSION >= 3
static PyObject *__Pyx_PyDict_GetItem(PyObject *d, PyObject* key) {
    PyObject *value;
    if (unlikely(d == Py_None)) {
        __Pyx_RaiseNoneIndexingError();
        return NULL;
    }
    value = PyDict_GetItemWithError(d, key);
    if (unlikely(!value)) {
        if (!PyErr_Occurred())
            PyErr_SetObject(PyExc_KeyError, key);
        return NULL;
    }
    Py_INCREF(value);
    return value;
}
#else
    #define __Pyx_PyDict_GetItem(d, key) PyObject_GetItem(d, key)
#endif

static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type); /*proto*/

static CYTHON_INLINE void __Pyx_RaiseNoneAttributeError(const char* attrname);

static CYTHON_INLINE PyObject* __Pyx_PyObject_Append(PyObject* L, PyObject* x) {
    if (likely(PyList_CheckExact(L))) {
        if (PyList_Append(L, x) < 0) return NULL;
        Py_INCREF(Py_None);
        return Py_None; /* this is just to have an accurate signature */
    }
    else {
        PyObject *r, *m;
        m = __Pyx_GetAttrString(L, "append");
        if (!m) return NULL;
        r = PyObject_CallFunctionObjArgs(m, x, NULL);
        Py_DECREF(m);
        return r;
    }
}

#include <string.h>

static CYTHON_INLINE void __Pyx_ExceptionSave(PyObject **type, PyObject **value, PyObject **tb); /*proto*/
static void __Pyx_ExceptionReset(PyObject *type, PyObject *value, PyObject *tb); /*proto*/

static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, long level); /*proto*/

static PyObject *__Pyx_FindPy2Metaclass(PyObject *bases); /*proto*/

static PyObject *__Pyx_CreateClass(PyObject *bases, PyObject *dict, PyObject *name,
                                   PyObject *modname); /*proto*/

#define __pyx_binding_PyCFunctionType_USED 1

typedef struct {
    PyCFunctionObject func;
} __pyx_binding_PyCFunctionType_object;

static PyTypeObject __pyx_binding_PyCFunctionType_type;
static PyTypeObject *__pyx_binding_PyCFunctionType = NULL;

static PyObject *__pyx_binding_PyCFunctionType_NewEx(PyMethodDef *ml, PyObject *self, PyObject *module); /* proto */
#define __pyx_binding_PyCFunctionType_New(ml, self) __pyx_binding_PyCFunctionType_NewEx(ml, self, NULL)

static int __pyx_binding_PyCFunctionType_init(void); /* proto */

static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals); /*proto*/

static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals); /*proto*/

#if PY_MAJOR_VERSION >= 3
#define __Pyx_PyString_Equals __Pyx_PyUnicode_Equals
#else
#define __Pyx_PyString_Equals __Pyx_PyBytes_Equals
#endif

static CYTHON_INLINE unsigned char __Pyx_PyInt_AsUnsignedChar(PyObject *);

static CYTHON_INLINE unsigned short __Pyx_PyInt_AsUnsignedShort(PyObject *);

static CYTHON_INLINE unsigned int __Pyx_PyInt_AsUnsignedInt(PyObject *);

static CYTHON_INLINE char __Pyx_PyInt_AsChar(PyObject *);

static CYTHON_INLINE short __Pyx_PyInt_AsShort(PyObject *);

static CYTHON_INLINE int __Pyx_PyInt_AsInt(PyObject *);

static CYTHON_INLINE signed char __Pyx_PyInt_AsSignedChar(PyObject *);

static CYTHON_INLINE signed short __Pyx_PyInt_AsSignedShort(PyObject *);

static CYTHON_INLINE signed int __Pyx_PyInt_AsSignedInt(PyObject *);

static CYTHON_INLINE int __Pyx_PyInt_AsLongDouble(PyObject *);

static CYTHON_INLINE unsigned long __Pyx_PyInt_AsUnsignedLong(PyObject *);

static CYTHON_INLINE unsigned PY_LONG_LONG __Pyx_PyInt_AsUnsignedLongLong(PyObject *);

static CYTHON_INLINE long __Pyx_PyInt_AsLong(PyObject *);

static CYTHON_INLINE PY_LONG_LONG __Pyx_PyInt_AsLongLong(PyObject *);

static CYTHON_INLINE signed long __Pyx_PyInt_AsSignedLong(PyObject *);

static CYTHON_INLINE signed PY_LONG_LONG __Pyx_PyInt_AsSignedLongLong(PyObject *);

static int __Pyx_check_binary_version(void);

static int __Pyx_ExportFunction(const char *name, void (*f)(void), const char *sig); /*proto*/

static int __Pyx_SetVtable(PyObject *dict, void *vtable); /*proto*/

static void __Pyx_AddTraceback(const char *funcname, int __pyx_clineno,
                               int __pyx_lineno, const char *__pyx_filename); /*proto*/

static int __Pyx_InitStrings(__Pyx_StringTabEntry *t); /*proto*/

/* Module declarations from 'cpython.unicode' */

/* Module declarations from 'xmmsutils' */
static CYTHON_INLINE PyObject *__pyx_f_9xmmsutils_to_unicode(char *); /*proto*/
static CYTHON_INLINE PyObject *__pyx_f_9xmmsutils_from_unicode(PyObject *); /*proto*/

/* Module declarations from 'cpython.ref' */

/* Module declarations from 'cpython.bytes' */

/* Module declarations from 'cython.cython.view' */

/* Module declarations from 'cython' */

/* Module declarations from 'cxmmsvalue' */

/* Module declarations from 'xmmsvalue' */
static PyTypeObject *__pyx_ptype_9xmmsvalue_XmmsValue = 0;
static PyTypeObject *__pyx_ptype_9xmmsvalue_XmmsListIter = 0;
static PyTypeObject *__pyx_ptype_9xmmsvalue_XmmsDictIter = 0;
static PyTypeObject *__pyx_ptype_9xmmsvalue_CollectionRef = 0;
static PyTypeObject *__pyx_ptype_9xmmsvalue_Collection = 0;
static PyTypeObject *__pyx_ptype_9xmmsvalue_CollectionAttributes = 0;
static PyTypeObject *__pyx_ptype_9xmmsvalue_AttributesIterator = 0;
static PyTypeObject *__pyx_ptype_9xmmsvalue_CollectionOperands = 0;
static PyTypeObject *__pyx_ptype_9xmmsvalue_CollectionIDList = 0;
static PyObject *__pyx_v_9xmmsvalue__idlist_types = 0;
static PyObject *__pyx_f_9xmmsvalue_create_coll(xmmsv_coll_t *); /*proto*/
static xmmsv_t *__pyx_f_9xmmsvalue_create_native_value(PyObject *); /*proto*/
#define __Pyx_MODULE_NAME "xmmsvalue"
int __pyx_module_is_main_xmmsvalue = 0;

/* Implementation of 'xmmsvalue' */
static PyObject *__pyx_builtin_TypeError;
static PyObject *__pyx_builtin_ValueError;
static PyObject *__pyx_builtin_RuntimeError;
static PyObject *__pyx_builtin_StopIteration;
static PyObject *__pyx_builtin_NotImplemented;
static PyObject *__pyx_builtin_KeyError;
static PyObject *__pyx_builtin_IndexError;
static char __pyx_k_1[] = "Type '%s' has no corresponding native value type";
static char __pyx_k_2[] = "Failed to retrieve value";
static char __pyx_k_8[] = "Unknown value type from the server: %d";
static char __pyx_k_9[] = "The value is not a list.";
static char __pyx_k_11[] = "Failed to initialize the iterator.";
static char __pyx_k_13[] = "Failed to retrieve list entry.";
static char __pyx_k_15[] = "The value is not a dict.";
static char __pyx_k_18[] = "Failed to retrieve dict item";
static char __pyx_k_20[] = "Can't set idlist for this type of collection";
static char __pyx_k_22[] = "%s=%s";
static char __pyx_k_23[] = "%s(%s)";
static char __pyx_k_24[] = ", ";
static char __pyx_k_25[] = "__init__() argument must not be None";
static char __pyx_k_27[] = "Failed to get fict iterator";
static char __pyx_k_29[] = "Uninitialized collection";
static char __pyx_k_31[] = "The attribute '%s' doesn't exist";
static char __pyx_k_33[] = "Index out of range";
static char __pyx_k_40[] = "Bad collection";
static char __pyx_k_44[] = "All Media";
static char __pyx_k_45[] = "Unkown collection type";
static char __pyx_k_47[] = "";
static char __pyx_k_49[] = "Unable to parse the pattern";
static char __pyx_k_51[] = "\nPython bindings for xmmsv manipulations.\n";
static char __pyx_k_52[] = "COLLECTION_TYPE_REFERENCE";
static char __pyx_k_53[] = "COLLECTION_TYPE_UNION";
static char __pyx_k_54[] = "COLLECTION_TYPE_INTERSECTION";
static char __pyx_k_55[] = "COLLECTION_TYPE_COMPLEMENT";
static char __pyx_k_56[] = "COLLECTION_TYPE_EQUALS";
static char __pyx_k_57[] = "COLLECTION_TYPE_MATCH";
static char __pyx_k_58[] = "COLLECTION_TYPE_SMALLER";
static char __pyx_k_59[] = "COLLECTION_TYPE_GREATER";
static char __pyx_k_60[] = "COLLECTION_TYPE_IDLIST";
static char __pyx_k_61[] = "COLLECTION_TYPE_QUEUE";
static char __pyx_k_62[] = "COLLECTION_TYPE_PARTYSHUFFLE";
static char __pyx_k__c[] = "c";
static char __pyx_k__d[] = "d";
static char __pyx_k__i[] = "i";
static char __pyx_k__v[] = "v";
static char __pyx_k__ns[] = "ns";
static char __pyx_k__op[] = "op";
static char __pyx_k__Has[] = "Has";
static char __pyx_k__get[] = "get";
static char __pyx_k__ids[] = "ids";
static char __pyx_k__pop[] = "pop";
static char __pyx_k__ref[] = "ref";
static char __pyx_k__join[] = "join";
static char __pyx_k__keys[] = "keys";
static char __pyx_k__list[] = "list";
static char __pyx_k__name[] = "name";
static char __pyx_k__self[] = "self";
static char __pyx_k__Match[] = "Match";
static char __pyx_k__Queue[] = "Queue";
static char __pyx_k__Union[] = "Union";
static char __pyx_k__clear[] = "clear";
static char __pyx_k__items[] = "items";
static char __pyx_k__pyval[] = "pyval";
static char __pyx_k__reset[] = "reset";
static char __pyx_k__value[] = "value";
static char __pyx_k__Equals[] = "Equals";
static char __pyx_k__IDList[] = "IDList";
static char __pyx_k__append[] = "append";
static char __pyx_k__extend[] = "extend";
static char __pyx_k__insert[] = "insert";
static char __pyx_k__parent[] = "parent";
static char __pyx_k__remove[] = "remove";
static char __pyx_k__update[] = "update";
static char __pyx_k__values[] = "values";
static char __pyx_k__Greater[] = "Greater";
static char __pyx_k__Smaller[] = "Smaller";
static char __pyx_k__default[] = "default";
static char __pyx_k__get_bin[] = "get_bin";
static char __pyx_k__get_int[] = "get_int";
static char __pyx_k__iserror[] = "iserror";
static char __pyx_k__KeyError[] = "KeyError";
static char __pyx_k__PShuffle[] = "PShuffle";
static char __pyx_k__PropDict[] = "PropDict";
static char __pyx_k__Universe[] = "Universe";
static char __pyx_k____call__[] = "__call__";
static char __pyx_k____init__[] = "__init__";
static char __pyx_k____main__[] = "__main__";
static char __pyx_k____name__[] = "__name__";
static char __pyx_k____test__[] = "__test__";
static char __pyx_k__get_coll[] = "get_coll";
static char __pyx_k__get_dict[] = "get_dict";
static char __pyx_k__get_list[] = "get_list";
static char __pyx_k__get_type[] = "get_type";
static char __pyx_k__is_error[] = "is_error";
static char __pyx_k__iterkeys[] = "iterkeys";
static char __pyx_k__itertype[] = "itertype";
static char __pyx_k__operands[] = "operands";
static char __pyx_k__propdict[] = "propdict";
static char __pyx_k__Reference[] = "Reference";
static char __pyx_k__TypeError[] = "TypeError";
static char __pyx_k__XMMSValue[] = "XMMSValue";
static char __pyx_k____class__[] = "__class__";
static char __pyx_k___colltype[] = "_colltype";
static char __pyx_k__get_error[] = "get_error";
static char __pyx_k__iteritems[] = "iteritems";
static char __pyx_k__namespace[] = "namespace";
static char __pyx_k__operation[] = "operation";
static char __pyx_k__reference[] = "reference";
static char __pyx_k__set_pyval[] = "set_pyval";
static char __pyx_k__xmmsvalue[] = "xmmsvalue";
static char __pyx_k__Complement[] = "Complement";
static char __pyx_k__IndexError[] = "IndexError";
static char __pyx_k__ValueError[] = "ValueError";
static char __pyx_k__attributes[] = "attributes";
static char __pyx_k__coll_parse[] = "coll_parse";
static char __pyx_k__get_string[] = "get_string";
static char __pyx_k__itervalues[] = "itervalues";
static char __pyx_k__sourcepref[] = "sourcepref";
static char __pyx_k__Collections[] = "Collections";
static char __pyx_k__Intersection[] = "Intersection";
static char __pyx_k__RuntimeError[] = "RuntimeError";
static char __pyx_k__get_propdict[] = "get_propdict";
static char __pyx_k__StopIteration[] = "StopIteration";
static char __pyx_k__get_dict_iter[] = "get_dict_iter";
static char __pyx_k__get_list_iter[] = "get_list_iter";
static char __pyx_k__BaseCollection[] = "BaseCollection";
static char __pyx_k__NotImplemented[] = "NotImplemented";
static char __pyx_k__VALUE_TYPE_BIN[] = "VALUE_TYPE_BIN";
static char __pyx_k__VALUE_TYPE_COLL[] = "VALUE_TYPE_COLL";
static char __pyx_k__VALUE_TYPE_DICT[] = "VALUE_TYPE_DICT";
static char __pyx_k__VALUE_TYPE_LIST[] = "VALUE_TYPE_LIST";
static char __pyx_k__VALUE_TYPE_NONE[] = "VALUE_TYPE_NONE";
static char __pyx_k__FilterCollection[] = "FilterCollection";
static char __pyx_k__VALUE_TYPE_ERROR[] = "VALUE_TYPE_ERROR";
static char __pyx_k__VALUE_TYPE_INT32[] = "VALUE_TYPE_INT32";
static char __pyx_k__CollectionWrapper[] = "CollectionWrapper";
static char __pyx_k__VALUE_TYPE_STRING[] = "VALUE_TYPE_STRING";
static char __pyx_k__COLLECTION_TYPE_HAS[] = "COLLECTION_TYPE_HAS";
static PyObject *__pyx_kp_s_1;
static PyObject *__pyx_kp_s_11;
static PyObject *__pyx_kp_s_13;
static PyObject *__pyx_kp_s_15;
static PyObject *__pyx_kp_s_18;
static PyObject *__pyx_kp_s_2;
static PyObject *__pyx_kp_s_20;
static PyObject *__pyx_kp_s_22;
static PyObject *__pyx_kp_s_23;
static PyObject *__pyx_kp_s_24;
static PyObject *__pyx_kp_s_25;
static PyObject *__pyx_kp_s_27;
static PyObject *__pyx_kp_s_29;
static PyObject *__pyx_kp_s_31;
static PyObject *__pyx_kp_s_33;
static PyObject *__pyx_kp_s_40;
static PyObject *__pyx_kp_s_44;
static PyObject *__pyx_kp_s_45;
static PyObject *__pyx_kp_s_47;
static PyObject *__pyx_kp_s_49;
static PyObject *__pyx_n_s_52;
static PyObject *__pyx_n_s_53;
static PyObject *__pyx_n_s_54;
static PyObject *__pyx_n_s_55;
static PyObject *__pyx_n_s_56;
static PyObject *__pyx_n_s_57;
static PyObject *__pyx_n_s_58;
static PyObject *__pyx_n_s_59;
static PyObject *__pyx_n_s_60;
static PyObject *__pyx_n_s_61;
static PyObject *__pyx_n_s_62;
static PyObject *__pyx_kp_s_8;
static PyObject *__pyx_kp_s_9;
static PyObject *__pyx_n_s__BaseCollection;
static PyObject *__pyx_n_s__COLLECTION_TYPE_HAS;
static PyObject *__pyx_n_s__CollectionWrapper;
static PyObject *__pyx_n_s__Collections;
static PyObject *__pyx_n_s__Complement;
static PyObject *__pyx_n_s__Equals;
static PyObject *__pyx_n_s__FilterCollection;
static PyObject *__pyx_n_s__Greater;
static PyObject *__pyx_n_s__Has;
static PyObject *__pyx_n_s__IDList;
static PyObject *__pyx_n_s__IndexError;
static PyObject *__pyx_n_s__Intersection;
static PyObject *__pyx_n_s__KeyError;
static PyObject *__pyx_n_s__Match;
static PyObject *__pyx_n_s__NotImplemented;
static PyObject *__pyx_n_s__PShuffle;
static PyObject *__pyx_n_s__PropDict;
static PyObject *__pyx_n_s__Queue;
static PyObject *__pyx_n_s__Reference;
static PyObject *__pyx_n_s__RuntimeError;
static PyObject *__pyx_n_s__Smaller;
static PyObject *__pyx_n_s__StopIteration;
static PyObject *__pyx_n_s__TypeError;
static PyObject *__pyx_n_s__Union;
static PyObject *__pyx_n_s__Universe;
static PyObject *__pyx_n_s__VALUE_TYPE_BIN;
static PyObject *__pyx_n_s__VALUE_TYPE_COLL;
static PyObject *__pyx_n_s__VALUE_TYPE_DICT;
static PyObject *__pyx_n_s__VALUE_TYPE_ERROR;
static PyObject *__pyx_n_s__VALUE_TYPE_INT32;
static PyObject *__pyx_n_s__VALUE_TYPE_LIST;
static PyObject *__pyx_n_s__VALUE_TYPE_NONE;
static PyObject *__pyx_n_s__VALUE_TYPE_STRING;
static PyObject *__pyx_n_s__ValueError;
static PyObject *__pyx_n_s__XMMSValue;
static PyObject *__pyx_n_s____call__;
static PyObject *__pyx_n_s____class__;
static PyObject *__pyx_n_s____init__;
static PyObject *__pyx_n_s____main__;
static PyObject *__pyx_n_s____name__;
static PyObject *__pyx_n_s____test__;
static PyObject *__pyx_n_s___colltype;
static PyObject *__pyx_n_s__append;
static PyObject *__pyx_n_s__attributes;
static PyObject *__pyx_n_s__c;
static PyObject *__pyx_n_s__clear;
static PyObject *__pyx_n_s__coll_parse;
static PyObject *__pyx_n_s__d;
static PyObject *__pyx_n_s__default;
static PyObject *__pyx_n_s__extend;
static PyObject *__pyx_n_s__get;
static PyObject *__pyx_n_s__get_bin;
static PyObject *__pyx_n_s__get_coll;
static PyObject *__pyx_n_s__get_dict;
static PyObject *__pyx_n_s__get_dict_iter;
static PyObject *__pyx_n_s__get_error;
static PyObject *__pyx_n_s__get_int;
static PyObject *__pyx_n_s__get_list;
static PyObject *__pyx_n_s__get_list_iter;
static PyObject *__pyx_n_s__get_propdict;
static PyObject *__pyx_n_s__get_string;
static PyObject *__pyx_n_s__get_type;
static PyObject *__pyx_n_s__i;
static PyObject *__pyx_n_s__ids;
static PyObject *__pyx_n_s__insert;
static PyObject *__pyx_n_s__is_error;
static PyObject *__pyx_n_s__iserror;
static PyObject *__pyx_n_s__items;
static PyObject *__pyx_n_s__iteritems;
static PyObject *__pyx_n_s__iterkeys;
static PyObject *__pyx_n_s__itertype;
static PyObject *__pyx_n_s__itervalues;
static PyObject *__pyx_n_s__join;
static PyObject *__pyx_n_s__keys;
static PyObject *__pyx_n_s__list;
static PyObject *__pyx_n_s__name;
static PyObject *__pyx_n_s__namespace;
static PyObject *__pyx_n_s__ns;
static PyObject *__pyx_n_s__op;
static PyObject *__pyx_n_s__operands;
static PyObject *__pyx_n_s__operation;
static PyObject *__pyx_n_s__parent;
static PyObject *__pyx_n_s__pop;
static PyObject *__pyx_n_s__propdict;
static PyObject *__pyx_n_s__pyval;
static PyObject *__pyx_n_s__ref;
static PyObject *__pyx_n_s__reference;
static PyObject *__pyx_n_s__remove;
static PyObject *__pyx_n_s__reset;
static PyObject *__pyx_n_s__self;
static PyObject *__pyx_n_s__set_pyval;
static PyObject *__pyx_n_s__sourcepref;
static PyObject *__pyx_n_s__update;
static PyObject *__pyx_n_s__v;
static PyObject *__pyx_n_s__value;
static PyObject *__pyx_n_s__values;
static PyObject *__pyx_n_s__xmmsvalue;
static PyObject *__pyx_k_tuple_3;
static PyObject *__pyx_k_tuple_4;
static PyObject *__pyx_k_tuple_5;
static PyObject *__pyx_k_tuple_6;
static PyObject *__pyx_k_tuple_7;
static PyObject *__pyx_k_tuple_10;
static PyObject *__pyx_k_tuple_12;
static PyObject *__pyx_k_tuple_14;
static PyObject *__pyx_k_tuple_16;
static PyObject *__pyx_k_tuple_17;
static PyObject *__pyx_k_tuple_19;
static PyObject *__pyx_k_tuple_21;
static PyObject *__pyx_k_tuple_26;
static PyObject *__pyx_k_tuple_28;
static PyObject *__pyx_k_tuple_30;
static PyObject *__pyx_k_tuple_32;
static PyObject *__pyx_k_tuple_34;
static PyObject *__pyx_k_tuple_35;
static PyObject *__pyx_k_tuple_36;
static PyObject *__pyx_k_tuple_37;
static PyObject *__pyx_k_tuple_38;
static PyObject *__pyx_k_tuple_39;
static PyObject *__pyx_k_tuple_41;
static PyObject *__pyx_k_tuple_42;
static PyObject *__pyx_k_tuple_43;
static PyObject *__pyx_k_tuple_46;
static PyObject *__pyx_k_tuple_48;
static PyObject *__pyx_k_tuple_50;

/* "xmmsvalue.pyx":36
 * 
 * 
 * cdef xmmsv_t *create_native_value(value) except NULL:             # <<<<<<<<<<<<<<
 * 	cdef xmmsv_t *ret=NULL
 * 	cdef xmmsv_t *v
 */

static xmmsv_t *__pyx_f_9xmmsvalue_create_native_value(PyObject *__pyx_v_value) {
  xmmsv_t *__pyx_v_ret;
  xmmsv_t *__pyx_v_v;
  PyObject *__pyx_v_s = NULL;
  PyObject *__pyx_v_key = NULL;
  PyObject *__pyx_v_k = NULL;
  PyObject *__pyx_v_it = NULL;
  PyObject *__pyx_v_item = NULL;
  xmmsv_t *__pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  int __pyx_t_4;
  int __pyx_t_5;
  char *__pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  Py_ssize_t __pyx_t_8;
  PyObject *(*__pyx_t_9)(PyObject *);
  xmmsv_t *__pyx_t_10;
  PyObject *__pyx_t_11 = NULL;
  PyObject *__pyx_t_12 = NULL;
  PyObject *__pyx_t_13 = NULL;
  PyObject *__pyx_t_14 = NULL;
  PyObject *__pyx_t_15 = NULL;
  PyObject *__pyx_t_16 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_native_value");

  /* "xmmsvalue.pyx":37
 * 
 * cdef xmmsv_t *create_native_value(value) except NULL:
 * 	cdef xmmsv_t *ret=NULL             # <<<<<<<<<<<<<<
 * 	cdef xmmsv_t *v
 * 
 */
  __pyx_v_ret = NULL;

  /* "xmmsvalue.pyx":40
 * 	cdef xmmsv_t *v
 * 
 * 	if value is None:             # <<<<<<<<<<<<<<
 * 		ret = xmmsv_new_none()
 * 	elif isinstance(value, int):
 */
  __pyx_t_1 = (__pyx_v_value == Py_None);
  if (__pyx_t_1) {

    /* "xmmsvalue.pyx":41
 * 
 * 	if value is None:
 * 		ret = xmmsv_new_none()             # <<<<<<<<<<<<<<
 * 	elif isinstance(value, int):
 * 		ret = xmmsv_new_int(value)
 */
    __pyx_v_ret = xmmsv_new_none();
    goto __pyx_L3;
  }

  /* "xmmsvalue.pyx":42
 * 	if value is None:
 * 		ret = xmmsv_new_none()
 * 	elif isinstance(value, int):             # <<<<<<<<<<<<<<
 * 		ret = xmmsv_new_int(value)
 * 	elif isinstance(value, (unicode, str)):
 */
  __pyx_t_2 = ((PyObject *)((PyObject*)(&PyInt_Type)));
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_1 = __Pyx_TypeCheck(__pyx_v_value, __pyx_t_2); 
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_1) {

    /* "xmmsvalue.pyx":43
 * 		ret = xmmsv_new_none()
 * 	elif isinstance(value, int):
 * 		ret = xmmsv_new_int(value)             # <<<<<<<<<<<<<<
 * 	elif isinstance(value, (unicode, str)):
 * 		s = from_unicode(value)
 */
    __pyx_t_3 = __Pyx_PyInt_AsInt(__pyx_v_value); if (unlikely((__pyx_t_3 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 43; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_v_ret = xmmsv_new_int(__pyx_t_3);
    goto __pyx_L3;
  }

  /* "xmmsvalue.pyx":44
 * 	elif isinstance(value, int):
 * 		ret = xmmsv_new_int(value)
 * 	elif isinstance(value, (unicode, str)):             # <<<<<<<<<<<<<<
 * 		s = from_unicode(value)
 * 		ret = xmmsv_new_string(s)
 */
  __Pyx_INCREF(__pyx_v_value);
  __pyx_t_2 = __pyx_v_value;
  __pyx_t_1 = PyUnicode_Check(__pyx_t_2); 
  if (!__pyx_t_1) {
    __pyx_t_4 = PyString_Check(__pyx_t_2); 
    __pyx_t_5 = __pyx_t_4;
  } else {
    __pyx_t_5 = __pyx_t_1;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_5) {

    /* "xmmsvalue.pyx":45
 * 		ret = xmmsv_new_int(value)
 * 	elif isinstance(value, (unicode, str)):
 * 		s = from_unicode(value)             # <<<<<<<<<<<<<<
 * 		ret = xmmsv_new_string(s)
 * 	elif hasattr(value, "keys"):
 */
    __pyx_t_2 = __pyx_f_9xmmsutils_from_unicode(__pyx_v_value); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_s = __pyx_t_2;
    __pyx_t_2 = 0;

    /* "xmmsvalue.pyx":46
 * 	elif isinstance(value, (unicode, str)):
 * 		s = from_unicode(value)
 * 		ret = xmmsv_new_string(s)             # <<<<<<<<<<<<<<
 * 	elif hasattr(value, "keys"):
 * 		ret = xmmsv_new_dict()
 */
    __pyx_t_6 = PyBytes_AsString(__pyx_v_s); if (unlikely((!__pyx_t_6) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_v_ret = xmmsv_new_string(__pyx_t_6);
    goto __pyx_L3;
  }

  /* "xmmsvalue.pyx":47
 * 		s = from_unicode(value)
 * 		ret = xmmsv_new_string(s)
 * 	elif hasattr(value, "keys"):             # <<<<<<<<<<<<<<
 * 		ret = xmmsv_new_dict()
 * 		for key in value.keys():
 */
  __pyx_t_2 = ((PyObject *)__pyx_n_s__keys);
  __Pyx_INCREF(__pyx_t_2);
  __pyx_t_5 = PyObject_HasAttr(__pyx_v_value, __pyx_t_2); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  if (__pyx_t_5) {

    /* "xmmsvalue.pyx":48
 * 		ret = xmmsv_new_string(s)
 * 	elif hasattr(value, "keys"):
 * 		ret = xmmsv_new_dict()             # <<<<<<<<<<<<<<
 * 		for key in value.keys():
 * 			k = from_unicode(key)
 */
    __pyx_v_ret = xmmsv_new_dict();

    /* "xmmsvalue.pyx":49
 * 	elif hasattr(value, "keys"):
 * 		ret = xmmsv_new_dict()
 * 		for key in value.keys():             # <<<<<<<<<<<<<<
 * 			k = from_unicode(key)
 * 			v = create_native_value(value[key])
 */
    __pyx_t_2 = PyObject_GetAttr(__pyx_v_value, __pyx_n_s__keys); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_7 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (PyList_CheckExact(__pyx_t_7) || PyTuple_CheckExact(__pyx_t_7)) {
      __pyx_t_2 = __pyx_t_7; __Pyx_INCREF(__pyx_t_2); __pyx_t_8 = 0;
      __pyx_t_9 = NULL;
    } else {
      __pyx_t_8 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_9 = Py_TYPE(__pyx_t_2)->tp_iternext;
    }
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    for (;;) {
      if (PyList_CheckExact(__pyx_t_2)) {
        if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_2)) break;
        __pyx_t_7 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_8); __Pyx_INCREF(__pyx_t_7); __pyx_t_8++;
      } else if (PyTuple_CheckExact(__pyx_t_2)) {
        if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
        __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_8); __Pyx_INCREF(__pyx_t_7); __pyx_t_8++;
      } else {
        __pyx_t_7 = __pyx_t_9(__pyx_t_2);
        if (unlikely(!__pyx_t_7)) {
          if (PyErr_Occurred()) {
            if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
            else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_7);
      }
      __Pyx_XDECREF(__pyx_v_key);
      __pyx_v_key = __pyx_t_7;
      __pyx_t_7 = 0;

      /* "xmmsvalue.pyx":50
 * 		ret = xmmsv_new_dict()
 * 		for key in value.keys():
 * 			k = from_unicode(key)             # <<<<<<<<<<<<<<
 * 			v = create_native_value(value[key])
 * 			xmmsv_dict_set(ret, k, v)
 */
      __pyx_t_7 = __pyx_f_9xmmsutils_from_unicode(__pyx_v_key); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 50; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_XDECREF(__pyx_v_k);
      __pyx_v_k = __pyx_t_7;
      __pyx_t_7 = 0;

      /* "xmmsvalue.pyx":51
 * 		for key in value.keys():
 * 			k = from_unicode(key)
 * 			v = create_native_value(value[key])             # <<<<<<<<<<<<<<
 * 			xmmsv_dict_set(ret, k, v)
 * 			xmmsv_unref(v)
 */
      __pyx_t_7 = PyObject_GetItem(__pyx_v_value, __pyx_v_key); if (!__pyx_t_7) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_7);
      __pyx_t_10 = __pyx_f_9xmmsvalue_create_native_value(__pyx_t_7); if (unlikely(__pyx_t_10 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_v_v = __pyx_t_10;

      /* "xmmsvalue.pyx":52
 * 			k = from_unicode(key)
 * 			v = create_native_value(value[key])
 * 			xmmsv_dict_set(ret, k, v)             # <<<<<<<<<<<<<<
 * 			xmmsv_unref(v)
 * 	else:
 */
      __pyx_t_6 = PyBytes_AsString(__pyx_v_k); if (unlikely((!__pyx_t_6) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 52; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      xmmsv_dict_set(__pyx_v_ret, __pyx_t_6, __pyx_v_v);

      /* "xmmsvalue.pyx":53
 * 			v = create_native_value(value[key])
 * 			xmmsv_dict_set(ret, k, v)
 * 			xmmsv_unref(v)             # <<<<<<<<<<<<<<
 * 	else:
 * 		try:
 */
      xmmsv_unref(__pyx_v_v);
    }
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    goto __pyx_L3;
  }
  /*else*/ {

    /* "xmmsvalue.pyx":55
 * 			xmmsv_unref(v)
 * 	else:
 * 		try:             # <<<<<<<<<<<<<<
 * 			it = iter(value)
 * 		except TypeError:
 */
    {
      __Pyx_ExceptionSave(&__pyx_t_11, &__pyx_t_12, &__pyx_t_13);
      __Pyx_XGOTREF(__pyx_t_11);
      __Pyx_XGOTREF(__pyx_t_12);
      __Pyx_XGOTREF(__pyx_t_13);
      /*try:*/ {

        /* "xmmsvalue.pyx":56
 * 	else:
 * 		try:
 * 			it = iter(value)             # <<<<<<<<<<<<<<
 * 		except TypeError:
 * 			raise TypeError("Type '%s' has no corresponding native value type"
 */
        __pyx_t_2 = PyObject_GetIter(__pyx_v_value); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L6_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_v_it = __pyx_t_2;
        __pyx_t_2 = 0;
      }
      /*else:*/ {

        /* "xmmsvalue.pyx":61
 * 					% value.__class__.__name__)
 * 		else:
 * 			ret = xmmsv_new_list()             # <<<<<<<<<<<<<<
 * 			for item in value:
 * 				v = create_native_value(item)
 */
        __pyx_v_ret = xmmsv_new_list();

        /* "xmmsvalue.pyx":62
 * 		else:
 * 			ret = xmmsv_new_list()
 * 			for item in value:             # <<<<<<<<<<<<<<
 * 				v = create_native_value(item)
 * 				xmmsv_list_append(ret, v)
 */
        if (PyList_CheckExact(__pyx_v_value) || PyTuple_CheckExact(__pyx_v_value)) {
          __pyx_t_2 = __pyx_v_value; __Pyx_INCREF(__pyx_t_2); __pyx_t_8 = 0;
          __pyx_t_9 = NULL;
        } else {
          __pyx_t_8 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_value); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L8_except_error;}
          __Pyx_GOTREF(__pyx_t_2);
          __pyx_t_9 = Py_TYPE(__pyx_t_2)->tp_iternext;
        }
        for (;;) {
          if (PyList_CheckExact(__pyx_t_2)) {
            if (__pyx_t_8 >= PyList_GET_SIZE(__pyx_t_2)) break;
            __pyx_t_7 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_8); __Pyx_INCREF(__pyx_t_7); __pyx_t_8++;
          } else if (PyTuple_CheckExact(__pyx_t_2)) {
            if (__pyx_t_8 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
            __pyx_t_7 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_8); __Pyx_INCREF(__pyx_t_7); __pyx_t_8++;
          } else {
            __pyx_t_7 = __pyx_t_9(__pyx_t_2);
            if (unlikely(!__pyx_t_7)) {
              if (PyErr_Occurred()) {
                if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
                else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 62; __pyx_clineno = __LINE__; goto __pyx_L8_except_error;}
              }
              break;
            }
            __Pyx_GOTREF(__pyx_t_7);
          }
          __Pyx_XDECREF(__pyx_v_item);
          __pyx_v_item = __pyx_t_7;
          __pyx_t_7 = 0;

          /* "xmmsvalue.pyx":63
 * 			ret = xmmsv_new_list()
 * 			for item in value:
 * 				v = create_native_value(item)             # <<<<<<<<<<<<<<
 * 				xmmsv_list_append(ret, v)
 * 				xmmsv_unref(v) # the list took its own reference
 */
          __pyx_t_10 = __pyx_f_9xmmsvalue_create_native_value(__pyx_v_item); if (unlikely(__pyx_t_10 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 63; __pyx_clineno = __LINE__; goto __pyx_L8_except_error;}
          __pyx_v_v = __pyx_t_10;

          /* "xmmsvalue.pyx":64
 * 			for item in value:
 * 				v = create_native_value(item)
 * 				xmmsv_list_append(ret, v)             # <<<<<<<<<<<<<<
 * 				xmmsv_unref(v) # the list took its own reference
 * 	return ret
 */
          xmmsv_list_append(__pyx_v_ret, __pyx_v_v);

          /* "xmmsvalue.pyx":65
 * 				v = create_native_value(item)
 * 				xmmsv_list_append(ret, v)
 * 				xmmsv_unref(v) # the list took its own reference             # <<<<<<<<<<<<<<
 * 	return ret
 * 
 */
          xmmsv_unref(__pyx_v_v);
        }
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      }
      __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
      __Pyx_XDECREF(__pyx_t_12); __pyx_t_12 = 0;
      __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
      goto __pyx_L13_try_end;
      __pyx_L6_error:;
      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "xmmsvalue.pyx":57
 * 		try:
 * 			it = iter(value)
 * 		except TypeError:             # <<<<<<<<<<<<<<
 * 			raise TypeError("Type '%s' has no corresponding native value type"
 * 					% value.__class__.__name__)
 */
      __pyx_t_3 = PyErr_ExceptionMatches(__pyx_builtin_TypeError);
      if (__pyx_t_3) {
        __Pyx_AddTraceback("xmmsvalue.create_native_value", __pyx_clineno, __pyx_lineno, __pyx_filename);
        if (__Pyx_GetException(&__pyx_t_2, &__pyx_t_7, &__pyx_t_14) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L8_except_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_GOTREF(__pyx_t_7);
        __Pyx_GOTREF(__pyx_t_14);

        /* "xmmsvalue.pyx":59
 * 		except TypeError:
 * 			raise TypeError("Type '%s' has no corresponding native value type"
 * 					% value.__class__.__name__)             # <<<<<<<<<<<<<<
 * 		else:
 * 			ret = xmmsv_new_list()
 */
        __pyx_t_15 = PyObject_GetAttr(__pyx_v_value, __pyx_n_s____class__); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L8_except_error;}
        __Pyx_GOTREF(__pyx_t_15);
        __pyx_t_16 = PyObject_GetAttr(__pyx_t_15, __pyx_n_s____name__); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L8_except_error;}
        __Pyx_GOTREF(__pyx_t_16);
        __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
        __pyx_t_15 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_1), __pyx_t_16); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L8_except_error;}
        __Pyx_GOTREF(((PyObject *)__pyx_t_15));
        __Pyx_DECREF(__pyx_t_16); __pyx_t_16 = 0;
        __pyx_t_16 = PyTuple_New(1); if (unlikely(!__pyx_t_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L8_except_error;}
        __Pyx_GOTREF(((PyObject *)__pyx_t_16));
        PyTuple_SET_ITEM(__pyx_t_16, 0, ((PyObject *)__pyx_t_15));
        __Pyx_GIVEREF(((PyObject *)__pyx_t_15));
        __pyx_t_15 = 0;
        __pyx_t_15 = PyObject_Call(__pyx_builtin_TypeError, ((PyObject *)__pyx_t_16), NULL); if (unlikely(!__pyx_t_15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L8_except_error;}
        __Pyx_GOTREF(__pyx_t_15);
        __Pyx_DECREF(((PyObject *)__pyx_t_16)); __pyx_t_16 = 0;
        __Pyx_Raise(__pyx_t_15, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L8_except_error;}
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0;
        goto __pyx_L7_exception_handled;
      }
      __pyx_L8_except_error:;
      __Pyx_XGIVEREF(__pyx_t_11);
      __Pyx_XGIVEREF(__pyx_t_12);
      __Pyx_XGIVEREF(__pyx_t_13);
      __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_12, __pyx_t_13);
      goto __pyx_L1_error;
      __pyx_L7_exception_handled:;
      __Pyx_XGIVEREF(__pyx_t_11);
      __Pyx_XGIVEREF(__pyx_t_12);
      __Pyx_XGIVEREF(__pyx_t_13);
      __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_12, __pyx_t_13);
      __pyx_L13_try_end:;
    }
  }
  __pyx_L3:;

  /* "xmmsvalue.pyx":66
 * 				xmmsv_list_append(ret, v)
 * 				xmmsv_unref(v) # the list took its own reference
 * 	return ret             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_r = __pyx_v_ret;
  goto __pyx_L0;

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_14);
  __Pyx_XDECREF(__pyx_t_15);
  __Pyx_XDECREF(__pyx_t_16);
  __Pyx_AddTraceback("xmmsvalue.create_native_value", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_s);
  __Pyx_XDECREF(__pyx_v_key);
  __Pyx_XDECREF(__pyx_v_k);
  __Pyx_XDECREF(__pyx_v_it);
  __Pyx_XDECREF(__pyx_v_item);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsvalue.pyx":74
 * 	#cdef int ispropdict
 * 
 * 	def __cinit__(self):             # <<<<<<<<<<<<<<
 * 		# Prevent stupid segfault from user missuse.
 * 		self.val = xmmsv_new_none()
 */

static int __pyx_pf_9xmmsvalue_9XmmsValue___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pf_9xmmsvalue_9XmmsValue___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__");
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 0))) return -1;

  /* "xmmsvalue.pyx":76
 * 	def __cinit__(self):
 * 		# Prevent stupid segfault from user missuse.
 * 		self.val = xmmsv_new_none()             # <<<<<<<<<<<<<<
 * 		self.ispropdict = 0
 * 
 */
  ((struct __pyx_obj_9xmmsvalue_XmmsValue *)__pyx_v_self)->val = xmmsv_new_none();

  /* "xmmsvalue.pyx":77
 * 		# Prevent stupid segfault from user missuse.
 * 		self.val = xmmsv_new_none()
 * 		self.ispropdict = 0             # <<<<<<<<<<<<<<
 * 
 * 	def __init__(self, sourcepref=None, pyval=None):
 */
  ((struct __pyx_obj_9xmmsvalue_XmmsValue *)__pyx_v_self)->ispropdict = 0;

  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsvalue.pyx":79
 * 		self.ispropdict = 0
 * 
 * 	def __init__(self, sourcepref=None, pyval=None):             # <<<<<<<<<<<<<<
 * 		cdef xmmsv_t *v
 * 		self.sourcepref = sourcepref
 */

static int __pyx_pf_9xmmsvalue_9XmmsValue_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pf_9xmmsvalue_9XmmsValue_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_sourcepref = 0;
  PyObject *__pyx_v_pyval = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__sourcepref,&__pyx_n_s__pyval,0};
  __Pyx_RefNannySetupContext("__init__");
  {
    PyObject* values[2] = {0,0};
    values[0] = ((PyObject *)Py_None);
    values[1] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__sourcepref);
          if (value) { values[0] = value; kw_args--; }
        }
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__pyval);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_sourcepref = values[0];
    __pyx_v_pyval = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 79; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("xmmsvalue.XmmsValue.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;

  /* "xmmsvalue.pyx":81
 * 	def __init__(self, sourcepref=None, pyval=None):
 * 		cdef xmmsv_t *v
 * 		self.sourcepref = sourcepref             # <<<<<<<<<<<<<<
 * 
 * 		if pyval is not None: # None value already created.
 */
  __Pyx_INCREF(__pyx_v_sourcepref);
  __Pyx_GIVEREF(__pyx_v_sourcepref);
  __Pyx_GOTREF(((struct __pyx_obj_9xmmsvalue_XmmsValue *)__pyx_v_self)->sourcepref);
  __Pyx_DECREF(((struct __pyx_obj_9xmmsvalue_XmmsValue *)__pyx_v_self)->sourcepref);
  ((struct __pyx_obj_9xmmsvalue_XmmsValue *)__pyx_v_self)->sourcepref = __pyx_v_sourcepref;

  /* "xmmsvalue.pyx":83
 * 		self.sourcepref = sourcepref
 * 
 * 		if pyval is not None: # None value already created.             # <<<<<<<<<<<<<<
 * 			XmmsValue.set_pyval(self, pyval) # Use cdef version of the function
 * 
 */
  __pyx_t_1 = (__pyx_v_pyval != Py_None);
  if (__pyx_t_1) {

    /* "xmmsvalue.pyx":84
 * 
 * 		if pyval is not None: # None value already created.
 * 			XmmsValue.set_pyval(self, pyval) # Use cdef version of the function             # <<<<<<<<<<<<<<
 * 
 * 	def __dealloc__(self):
 */
    __pyx_t_2 = __pyx_vtabptr_9xmmsvalue_XmmsValue->set_pyval(((struct __pyx_obj_9xmmsvalue_XmmsValue *)__pyx_v_self), __pyx_v_pyval, 1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 84; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    goto __pyx_L6;
  }
  __pyx_L6:;

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("xmmsvalue.XmmsValue.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsvalue.pyx":86
 * 			XmmsValue.set_pyval(self, pyval) # Use cdef version of the function
 * 
 * 	def __dealloc__(self):             # <<<<<<<<<<<<<<
 * 		if self.val != NULL:
 * 			xmmsv_unref(self.val)
 */

static void __pyx_pf_9xmmsvalue_9XmmsValue_2__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pf_9xmmsvalue_9XmmsValue_2__dealloc__(PyObject *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("__dealloc__");

  /* "xmmsvalue.pyx":87
 * 
 * 	def __dealloc__(self):
 * 		if self.val != NULL:             # <<<<<<<<<<<<<<
 * 			xmmsv_unref(self.val)
 * 			self.val = NULL
 */
  __pyx_t_1 = (((struct __pyx_obj_9xmmsvalue_XmmsValue *)__pyx_v_self)->val != NULL);
  if (__pyx_t_1) {

    /* "xmmsvalue.pyx":88
 * 	def __dealloc__(self):
 * 		if self.val != NULL:
 * 			xmmsv_unref(self.val)             # <<<<<<<<<<<<<<
 * 			self.val = NULL
 * 
 */
    xmmsv_unref(((struct __pyx_obj_9xmmsvalue_XmmsValue *)__pyx_v_self)->val);

    /* "xmmsvalue.pyx":89
 * 		if self.val != NULL:
 * 			xmmsv_unref(self.val)
 * 			self.val = NULL             # <<<<<<<<<<<<<<
 * 
 * 	cdef set_value(self, xmmsv_t *value, int ispropdict=-1):
 */
    ((struct __pyx_obj_9xmmsvalue_XmmsValue *)__pyx_v_self)->val = NULL;
    goto __pyx_L5;
  }
  __pyx_L5:;

  __Pyx_RefNannyFinishContext();
}

/* "xmmsvalue.pyx":91
 * 			self.val = NULL
 * 
 * 	cdef set_value(self, xmmsv_t *value, int ispropdict=-1):             # <<<<<<<<<<<<<<
 * 		if self.val != NULL:
 * 			xmmsv_unref(self.val)
 */

static PyObject *__pyx_f_9xmmsvalue_9XmmsValue_set_value(struct __pyx_obj_9xmmsvalue_XmmsValue *__pyx_v_self, xmmsv_t *__pyx_v_value, struct __pyx_opt_args_9xmmsvalue_9XmmsValue_set_value *__pyx_optional_args) {
  int __pyx_v_ispropdict = ((int)-1);
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("set_value");
  if (__pyx_optional_args) {
    if (__pyx_optional_args->__pyx_n > 0) {
      __pyx_v_ispropdict = __pyx_optional_args->ispropdict;
    }
  }

  /* "xmmsvalue.pyx":92
 * 
 * 	cdef set_value(self, xmmsv_t *value, int ispropdict=-1):
 * 		if self.val != NULL:             # <<<<<<<<<<<<<<
 * 			xmmsv_unref(self.val)
 * 		xmmsv_ref(value)
 */
  __pyx_t_1 = (__pyx_v_self->val != NULL);
  if (__pyx_t_1) {

    /* "xmmsvalue.pyx":93
 * 	cdef set_value(self, xmmsv_t *value, int ispropdict=-1):
 * 		if self.val != NULL:
 * 			xmmsv_unref(self.val)             # <<<<<<<<<<<<<<
 * 		xmmsv_ref(value)
 * 		self.val = value
 */
    xmmsv_unref(__pyx_v_self->val);
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "xmmsvalue.pyx":94
 * 		if self.val != NULL:
 * 			xmmsv_unref(self.val)
 * 		xmmsv_ref(value)             # <<<<<<<<<<<<<<
 * 		self.val = value
 * 		if ispropdict >= 0:
 */
  xmmsv_ref(__pyx_v_value);

  /* "xmmsvalue.pyx":95
 * 			xmmsv_unref(self.val)
 * 		xmmsv_ref(value)
 * 		self.val = value             # <<<<<<<<<<<<<<
 * 		if ispropdict >= 0:
 * 			self.ispropdict = ispropdict
 */
  __pyx_v_self->val = __pyx_v_value;

  /* "xmmsvalue.pyx":96
 * 		xmmsv_ref(value)
 * 		self.val = value
 * 		if ispropdict >= 0:             # <<<<<<<<<<<<<<
 * 			self.ispropdict = ispropdict
 * 
 */
  __pyx_t_1 = (__pyx_v_ispropdict >= 0);
  if (__pyx_t_1) {

    /* "xmmsvalue.pyx":97
 * 		self.val = value
 * 		if ispropdict >= 0:
 * 			self.ispropdict = ispropdict             # <<<<<<<<<<<<<<
 * 
 * 	cpdef set_pyval(self, pyval):
 */
    __pyx_v_self->ispropdict = __pyx_v_ispropdict;
    goto __pyx_L4;
  }
  __pyx_L4:;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsvalue.pyx":99
 * 			self.ispropdict = ispropdict
 * 
 * 	cpdef set_pyval(self, pyval):             # <<<<<<<<<<<<<<
 * 		v = create_native_value(pyval)
 * 		self.set_value(v)
 */

static PyObject *__pyx_pf_9xmmsvalue_9XmmsValue_3set_pyval(PyObject *__pyx_v_self, PyObject *__pyx_v_pyval); /*proto*/
static PyObject *__pyx_f_9xmmsvalue_9XmmsValue_set_pyval(struct __pyx_obj_9xmmsvalue_XmmsValue *__pyx_v_self, PyObject *__pyx_v_pyval, int __pyx_skip_dispatch) {
  xmmsv_t *__pyx_v_v;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  xmmsv_t *__pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("set_pyval");
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overriden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__set_pyval); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (void *)&__pyx_pf_9xmmsvalue_9XmmsValue_3set_pyval)) {
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_2));
      __Pyx_INCREF(__pyx_v_pyval);
      PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_pyval);
      __Pyx_GIVEREF(__pyx_v_pyval);
      __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 = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
      __pyx_r = __pyx_t_3;
      __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "xmmsvalue.pyx":100
 * 
 * 	cpdef set_pyval(self, pyval):
 * 		v = create_native_value(pyval)             # <<<<<<<<<<<<<<
 * 		self.set_value(v)
 * 		xmmsv_unref(v)
 */
  __pyx_t_4 = __pyx_f_9xmmsvalue_create_native_value(__pyx_v_pyval); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 100; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_v = __pyx_t_4;

  /* "xmmsvalue.pyx":101
 * 	cpdef set_pyval(self, pyval):
 * 		v = create_native_value(pyval)
 * 		self.set_value(v)             # <<<<<<<<<<<<<<
 * 		xmmsv_unref(v)
 * 
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_9xmmsvalue_XmmsValue *)__pyx_v_self->__pyx_vtab)->set_value(__pyx_v_self, __pyx_v_v, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "xmmsvalue.pyx":102
 * 		v = create_native_value(pyval)
 * 		self.set_value(v)
 * 		xmmsv_unref(v)             # <<<<<<<<<<<<<<
 * 
 * 	cpdef get_type(self):
 */
  xmmsv_unref(__pyx_v_v);

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("xmmsvalue.XmmsValue.set_pyval", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsvalue.pyx":99
 * 			self.ispropdict = ispropdict
 * 
 * 	cpdef set_pyval(self, pyval):             # <<<<<<<<<<<<<<
 * 		v = create_native_value(pyval)
 * 		self.set_value(v)
 */

static PyObject *__pyx_pf_9xmmsvalue_9XmmsValue_3set_pyval(PyObject *__pyx_v_self, PyObject *__pyx_v_pyval); /*proto*/
static PyObject *__pyx_pf_9xmmsvalue_9XmmsValue_3set_pyval(PyObject *__pyx_v_self, PyObject *__pyx_v_pyval) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("set_pyval");
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((struct __pyx_vtabstruct_9xmmsvalue_XmmsValue *)((struct __pyx_obj_9xmmsvalue_XmmsValue *)__pyx_v_self)->__pyx_vtab)->set_pyval(((struct __pyx_obj_9xmmsvalue_XmmsValue *)__pyx_v_self), __pyx_v_pyval, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("xmmsvalue.XmmsValue.set_pyval", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsvalue.pyx":104
 * 		xmmsv_unref(v)
 * 
 * 	cpdef get_type(self):             # <<<<<<<<<<<<<<
 * 		"""
 * 		Return the type of the value.
 */

static PyObject *__pyx_pf_9xmmsvalue_9XmmsValue_4get_type(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_f_9xmmsvalue_9XmmsValue_get_type(struct __pyx_obj_9xmmsvalue_XmmsValue *__pyx_v_self, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_type");
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overriden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__get_type); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (void *)&__pyx_pf_9xmmsvalue_9XmmsValue_4get_type)) {
      __Pyx_XDECREF(__pyx_r);
      __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 = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "xmmsvalue.pyx":109
 * 		The return value is one of the VALUE_TYPE_* constants.
 * 		"""
 * 		return xmmsv_get_type(self.val)             # <<<<<<<<<<<<<<
 * 
 * 	cpdef iserror(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyInt_FromLong(xmmsv_get_type(__pyx_v_self->val)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 109; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("xmmsvalue.XmmsValue.get_type", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsvalue.pyx":104
 * 		xmmsv_unref(v)
 * 
 * 	cpdef get_type(self):             # <<<<<<<<<<<<<<
 * 		"""
 * 		Return the type of the value.
 */

static PyObject *__pyx_pf_9xmmsvalue_9XmmsValue_4get_type(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_9xmmsvalue_9XmmsValue_4get_type[] = "\n\t\tReturn the type of the value.\n\t\tThe return value is one of the VALUE_TYPE_* constants.\n\t\t";
static PyObject *__pyx_pf_9xmmsvalue_9XmmsValue_4get_type(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_type");
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((struct __pyx_vtabstruct_9xmmsvalue_XmmsValue *)((struct __pyx_obj_9xmmsvalue_XmmsValue *)__pyx_v_self)->__pyx_vtab)->get_type(((struct __pyx_obj_9xmmsvalue_XmmsValue *)__pyx_v_self), 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("xmmsvalue.XmmsValue.get_type", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsvalue.pyx":111
 * 		return xmmsv_get_type(self.val)
 * 
 * 	cpdef iserror(self):             # <<<<<<<<<<<<<<
 * 		"""
 * 		@deprecated
 */

static PyObject *__pyx_pf_9xmmsvalue_9XmmsValue_5iserror(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_f_9xmmsvalue_9XmmsValue_iserror(struct __pyx_obj_9xmmsvalue_XmmsValue *__pyx_v_self, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("iserror");
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overriden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__iserror); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (void *)&__pyx_pf_9xmmsvalue_9XmmsValue_5iserror)) {
      __Pyx_XDECREF(__pyx_r);
      __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 = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "xmmsvalue.pyx":117
 * 		@rtype: Boolean
 * 		"""
 * 		return self.is_error()             # <<<<<<<<<<<<<<
 * 
 * 	cpdef is_error(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((struct __pyx_vtabstruct_9xmmsvalue_XmmsValue *)__pyx_v_self->__pyx_vtab)->is_error(__pyx_v_self, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 117; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("xmmsvalue.XmmsValue.iserror", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsvalue.pyx":111
 * 		return xmmsv_get_type(self.val)
 * 
 * 	cpdef iserror(self):             # <<<<<<<<<<<<<<
 * 		"""
 * 		@deprecated
 */

static PyObject *__pyx_pf_9xmmsvalue_9XmmsValue_5iserror(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_9xmmsvalue_9XmmsValue_5iserror[] = "\n\t\t@deprecated\n\t\t@return: Whether the value represents an error or not.\n\t\t@rtype: Boolean\n\t\t";
static PyObject *__pyx_pf_9xmmsvalue_9XmmsValue_5iserror(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("iserror");
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((struct __pyx_vtabstruct_9xmmsvalue_XmmsValue *)((struct __pyx_obj_9xmmsvalue_XmmsValue *)__pyx_v_self)->__pyx_vtab)->iserror(((struct __pyx_obj_9xmmsvalue_XmmsValue *)__pyx_v_self), 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 111; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("xmmsvalue.XmmsValue.iserror", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsvalue.pyx":119
 * 		return self.is_error()
 * 
 * 	cpdef is_error(self):             # <<<<<<<<<<<<<<
 * 		"""
 * 		@return: Whether the value represents an error or not.
 */

static PyObject *__pyx_pf_9xmmsvalue_9XmmsValue_6is_error(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_f_9xmmsvalue_9XmmsValue_is_error(struct __pyx_obj_9xmmsvalue_XmmsValue *__pyx_v_self, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_error");
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overriden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__is_error); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 119; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (void *)&__pyx_pf_9xmmsvalue_9XmmsValue_6is_error)) {
      __Pyx_XDECREF(__pyx_r);
      __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 = 119; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "xmmsvalue.pyx":124
 * 		@rtype: Boolean
 * 		"""
 * 		return xmmsv_is_error(self.val)             # <<<<<<<<<<<<<<
 * 
 * 	cpdef get_error(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyBool_FromLong(xmmsv_is_error(__pyx_v_self->val)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("xmmsvalue.XmmsValue.is_error", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsvalue.pyx":119
 * 		return self.is_error()
 * 
 * 	cpdef is_error(self):             # <<<<<<<<<<<<<<
 * 		"""
 * 		@return: Whether the value represents an error or not.
 */

static PyObject *__pyx_pf_9xmmsvalue_9XmmsValue_6is_error(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_9xmmsvalue_9XmmsValue_6is_error[] = "\n\t\t@return: Whether the value represents an error or not.\n\t\t@rtype: Boolean\n\t\t";
static PyObject *__pyx_pf_9xmmsvalue_9XmmsValue_6is_error(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("is_error");
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((struct __pyx_vtabstruct_9xmmsvalue_XmmsValue *)((struct __pyx_obj_9xmmsvalue_XmmsValue *)__pyx_v_self)->__pyx_vtab)->is_error(((struct __pyx_obj_9xmmsvalue_XmmsValue *)__pyx_v_self), 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 119; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("xmmsvalue.XmmsValue.is_error", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsvalue.pyx":126
 * 		return xmmsv_is_error(self.val)
 * 
 * 	cpdef get_error(self):             # <<<<<<<<<<<<<<
 * 		"""
 * 		@return: Error string from the result.
 */

static PyObject *__pyx_pf_9xmmsvalue_9XmmsValue_7get_error(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_f_9xmmsvalue_9XmmsValue_get_error(struct __pyx_obj_9xmmsvalue_XmmsValue *__pyx_v_self, int __pyx_skip_dispatch) {
  char *__pyx_v_ret;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_error");
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overriden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__get_error); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (void *)&__pyx_pf_9xmmsvalue_9XmmsValue_7get_error)) {
      __Pyx_XDECREF(__pyx_r);
      __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 = 126; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "xmmsvalue.pyx":131
 * 		@rtype: String
 * 		"""
 * 		cdef char *ret = NULL             # <<<<<<<<<<<<<<
 * 		if not xmmsv_get_error(self.val, <const_char **>&ret):
 * 			raise ValueError("Failed to retrieve value")
 */
  __pyx_v_ret = NULL;

  /* "xmmsvalue.pyx":132
 * 		"""
 * 		cdef char *ret = NULL
 * 		if not xmmsv_get_error(self.val, <const_char **>&ret):             # <<<<<<<<<<<<<<
 * 			raise ValueError("Failed to retrieve value")
 * 		return to_unicode(ret)
 */
  __pyx_t_3 = (!xmmsv_get_error(__pyx_v_self->val, ((const char **)(&__pyx_v_ret))));
  if (__pyx_t_3) {

    /* "xmmsvalue.pyx":133
 * 		cdef char *ret = NULL
 * 		if not xmmsv_get_error(self.val, <const_char **>&ret):
 * 			raise ValueError("Failed to retrieve value")             # <<<<<<<<<<<<<<
 * 		return to_unicode(ret)
 * 
 */
    __pyx_t_1 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_3), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 133; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 133; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "xmmsvalue.pyx":134
 * 		if not xmmsv_get_error(self.val, <const_char **>&ret):
 * 			raise ValueError("Failed to retrieve value")
 * 		return to_unicode(ret)             # <<<<<<<<<<<<<<
 * 
 * 	cpdef get_int(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_9xmmsutils_to_unicode(__pyx_v_ret); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 134; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("xmmsvalue.XmmsValue.get_error", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsvalue.pyx":126
 * 		return xmmsv_is_error(self.val)
 * 
 * 	cpdef get_error(self):             # <<<<<<<<<<<<<<
 * 		"""
 * 		@return: Error string from the result.
 */

static PyObject *__pyx_pf_9xmmsvalue_9XmmsValue_7get_error(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_9xmmsvalue_9XmmsValue_7get_error[] = "\n\t\t@return: Error string from the result.\n\t\t@rtype: String\n\t\t";
static PyObject *__pyx_pf_9xmmsvalue_9XmmsValue_7get_error(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_error");
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((struct __pyx_vtabstruct_9xmmsvalue_XmmsValue *)((struct __pyx_obj_9xmmsvalue_XmmsValue *)__pyx_v_self)->__pyx_vtab)->get_error(((struct __pyx_obj_9xmmsvalue_XmmsValue *)__pyx_v_self), 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 126; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("xmmsvalue.XmmsValue.get_error", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsvalue.pyx":136
 * 		return to_unicode(ret)
 * 
 * 	cpdef get_int(self):             # <<<<<<<<<<<<<<
 * 		"""
 * 		Get data from the result structure as an int.
 */

static PyObject *__pyx_pf_9xmmsvalue_9XmmsValue_8get_int(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_f_9xmmsvalue_9XmmsValue_get_int(struct __pyx_obj_9xmmsvalue_XmmsValue *__pyx_v_self, int __pyx_skip_dispatch) {
  int __pyx_v_ret;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_int");
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overriden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__get_int); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 136; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (void *)&__pyx_pf_9xmmsvalue_9XmmsValue_8get_int)) {
      __Pyx_XDECREF(__pyx_r);
      __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 = 136; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "xmmsvalue.pyx":141
 * 		@rtype: int
 * 		"""
 * 		cdef int ret = 0             # <<<<<<<<<<<<<<
 * 		if not xmmsv_get_int(self.val, &ret):
 * 			raise ValueError("Failed to retrieve value")
 */
  __pyx_v_ret = 0;

  /* "xmmsvalue.pyx":142
 * 		"""
 * 		cdef int ret = 0
 * 		if not xmmsv_get_int(self.val, &ret):             # <<<<<<<<<<<<<<
 * 			raise ValueError("Failed to retrieve value")
 * 		return ret
 */
  __pyx_t_3 = (!xmmsv_get_int(__pyx_v_self->val, (&__pyx_v_ret)));
  if (__pyx_t_3) {

    /* "xmmsvalue.pyx":143
 * 		cdef int ret = 0
 * 		if not xmmsv_get_int(self.val, &ret):
 * 			raise ValueError("Failed to retrieve value")             # <<<<<<<<<<<<<<
 * 		return ret
 * 
 */
    __pyx_t_1 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_4), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "xmmsvalue.pyx":144
 * 		if not xmmsv_get_int(self.val, &ret):
 * 			raise ValueError("Failed to retrieve value")
 * 		return ret             # <<<<<<<<<<<<<<
 * 
 * 	cpdef get_string(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyInt_FromLong(__pyx_v_ret); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("xmmsvalue.XmmsValue.get_int", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsvalue.pyx":136
 * 		return to_unicode(ret)
 * 
 * 	cpdef get_int(self):             # <<<<<<<<<<<<<<
 * 		"""
 * 		Get data from the result structure as an int.
 */

static PyObject *__pyx_pf_9xmmsvalue_9XmmsValue_8get_int(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_9xmmsvalue_9XmmsValue_8get_int[] = "\n\t\tGet data from the result structure as an int.\n\t\t@rtype: int\n\t\t";
static PyObject *__pyx_pf_9xmmsvalue_9XmmsValue_8get_int(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_int");
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((struct __pyx_vtabstruct_9xmmsvalue_XmmsValue *)((struct __pyx_obj_9xmmsvalue_XmmsValue *)__pyx_v_self)->__pyx_vtab)->get_int(((struct __pyx_obj_9xmmsvalue_XmmsValue *)__pyx_v_self), 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 136; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("xmmsvalue.XmmsValue.get_int", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsvalue.pyx":146
 * 		return ret
 * 
 * 	cpdef get_string(self):             # <<<<<<<<<<<<<<
 * 		"""
 * 		Get data from the result structure as a string.
 */

static PyObject *__pyx_pf_9xmmsvalue_9XmmsValue_9get_string(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_f_9xmmsvalue_9XmmsValue_get_string(struct __pyx_obj_9xmmsvalue_XmmsValue *__pyx_v_self, int __pyx_skip_dispatch) {
  char *__pyx_v_ret;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_string");
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overriden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__get_string); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 146; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (void *)&__pyx_pf_9xmmsvalue_9XmmsValue_9get_string)) {
      __Pyx_XDECREF(__pyx_r);
      __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 = 146; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "xmmsvalue.pyx":151
 * 		@rtype: string
 * 		"""
 * 		cdef char *ret = NULL             # <<<<<<<<<<<<<<
 * 		if not xmmsv_get_string(self.val, <const_char **>&ret):
 * 			raise ValueError("Failed to retrieve value")
 */
  __pyx_v_ret = NULL;

  /* "xmmsvalue.pyx":152
 * 		"""
 * 		cdef char *ret = NULL
 * 		if not xmmsv_get_string(self.val, <const_char **>&ret):             # <<<<<<<<<<<<<<
 * 			raise ValueError("Failed to retrieve value")
 * 		return to_unicode(ret)
 */
  __pyx_t_3 = (!xmmsv_get_string(__pyx_v_self->val, ((const char **)(&__pyx_v_ret))));
  if (__pyx_t_3) {

    /* "xmmsvalue.pyx":153
 * 		cdef char *ret = NULL
 * 		if not xmmsv_get_string(self.val, <const_char **>&ret):
 * 			raise ValueError("Failed to retrieve value")             # <<<<<<<<<<<<<<
 * 		return to_unicode(ret)
 * 
 */
    __pyx_t_1 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_5), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 153; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 153; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "xmmsvalue.pyx":154
 * 		if not xmmsv_get_string(self.val, <const_char **>&ret):
 * 			raise ValueError("Failed to retrieve value")
 * 		return to_unicode(ret)             # <<<<<<<<<<<<<<
 * 
 * 	cpdef get_bin(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_9xmmsutils_to_unicode(__pyx_v_ret); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 154; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("xmmsvalue.XmmsValue.get_string", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsvalue.pyx":146
 * 		return ret
 * 
 * 	cpdef get_string(self):             # <<<<<<<<<<<<<<
 * 		"""
 * 		Get data from the result structure as a string.
 */

static PyObject *__pyx_pf_9xmmsvalue_9XmmsValue_9get_string(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_9xmmsvalue_9XmmsValue_9get_string[] = "\n\t\tGet data from the result structure as a string.\n\t\t@rtype: string\n\t\t";
static PyObject *__pyx_pf_9xmmsvalue_9XmmsValue_9get_string(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_string");
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((struct __pyx_vtabstruct_9xmmsvalue_XmmsValue *)((struct __pyx_obj_9xmmsvalue_XmmsValue *)__pyx_v_self)->__pyx_vtab)->get_string(((struct __pyx_obj_9xmmsvalue_XmmsValue *)__pyx_v_self), 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 146; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("xmmsvalue.XmmsValue.get_string", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsvalue.pyx":156
 * 		return to_unicode(ret)
 * 
 * 	cpdef get_bin(self):             # <<<<<<<<<<<<<<
 * 		"""
 * 		Get data from the result structure as binary data.
 */

static PyObject *__pyx_pf_9xmmsvalue_9XmmsValue_10get_bin(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_f_9xmmsvalue_9XmmsValue_get_bin(struct __pyx_obj_9xmmsvalue_XmmsValue *__pyx_v_self, int __pyx_skip_dispatch) {
  char *__pyx_v_ret;
  unsigned int __pyx_v_rlen;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_bin");
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overriden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__get_bin); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 156; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (void *)&__pyx_pf_9xmmsvalue_9XmmsValue_10get_bin)) {
      __Pyx_XDECREF(__pyx_r);
      __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 = 156; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "xmmsvalue.pyx":161
 * 		@rtype: string
 * 		"""
 * 		cdef char *ret = NULL             # <<<<<<<<<<<<<<
 * 		cdef unsigned int rlen = 0
 * 		if not xmmsv_get_bin(self.val, <const_uchar **>&ret, &rlen):
 */
  __pyx_v_ret = NULL;

  /* "xmmsvalue.pyx":162
 * 		"""
 * 		cdef char *ret = NULL
 * 		cdef unsigned int rlen = 0             # <<<<<<<<<<<<<<
 * 		if not xmmsv_get_bin(self.val, <const_uchar **>&ret, &rlen):
 * 			raise ValueError("Failed to retrieve value")
 */
  __pyx_v_rlen = 0;

  /* "xmmsvalue.pyx":163
 * 		cdef char *ret = NULL
 * 		cdef unsigned int rlen = 0
 * 		if not xmmsv_get_bin(self.val, <const_uchar **>&ret, &rlen):             # <<<<<<<<<<<<<<
 * 			raise ValueError("Failed to retrieve value")
 * 		return PyBytes_FromStringAndSize(<char *>ret, rlen)
 */
  __pyx_t_3 = (!xmmsv_get_bin(__pyx_v_self->val, ((const unsigned char **)(&__pyx_v_ret)), (&__pyx_v_rlen)));
  if (__pyx_t_3) {

    /* "xmmsvalue.pyx":164
 * 		cdef unsigned int rlen = 0
 * 		if not xmmsv_get_bin(self.val, <const_uchar **>&ret, &rlen):
 * 			raise ValueError("Failed to retrieve value")             # <<<<<<<<<<<<<<
 * 		return PyBytes_FromStringAndSize(<char *>ret, rlen)
 * 
 */
    __pyx_t_1 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_6), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 164; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 164; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "xmmsvalue.pyx":165
 * 		if not xmmsv_get_bin(self.val, <const_uchar **>&ret, &rlen):
 * 			raise ValueError("Failed to retrieve value")
 * 		return PyBytes_FromStringAndSize(<char *>ret, rlen)             # <<<<<<<<<<<<<<
 * 
 * 	cpdef get_coll(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((PyObject *)PyBytes_FromStringAndSize(((char *)__pyx_v_ret), __pyx_v_rlen)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 165; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("xmmsvalue.XmmsValue.get_bin", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsvalue.pyx":156
 * 		return to_unicode(ret)
 * 
 * 	cpdef get_bin(self):             # <<<<<<<<<<<<<<
 * 		"""
 * 		Get data from the result structure as binary data.
 */

static PyObject *__pyx_pf_9xmmsvalue_9XmmsValue_10get_bin(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_9xmmsvalue_9XmmsValue_10get_bin[] = "\n\t\tGet data from the result structure as binary data.\n\t\t@rtype: string\n\t\t";
static PyObject *__pyx_pf_9xmmsvalue_9XmmsValue_10get_bin(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_bin");
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((struct __pyx_vtabstruct_9xmmsvalue_XmmsValue *)((struct __pyx_obj_9xmmsvalue_XmmsValue *)__pyx_v_self)->__pyx_vtab)->get_bin(((struct __pyx_obj_9xmmsvalue_XmmsValue *)__pyx_v_self), 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 156; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("xmmsvalue.XmmsValue.get_bin", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsvalue.pyx":167
 * 		return PyBytes_FromStringAndSize(<char *>ret, rlen)
 * 
 * 	cpdef get_coll(self):             # <<<<<<<<<<<<<<
 * 		"""
 * 		Get data from the result structure as a Collection.
 */

static PyObject *__pyx_pf_9xmmsvalue_9XmmsValue_11get_coll(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_f_9xmmsvalue_9XmmsValue_get_coll(struct __pyx_obj_9xmmsvalue_XmmsValue *__pyx_v_self, int __pyx_skip_dispatch) {
  xmmsv_coll_t *__pyx_v_coll;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_coll");
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overriden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__get_coll); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (void *)&__pyx_pf_9xmmsvalue_9XmmsValue_11get_coll)) {
      __Pyx_XDECREF(__pyx_r);
      __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 = 167; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "xmmsvalue.pyx":172
 * 		@rtype: Collection
 * 		"""
 * 		cdef xmmsv_coll_t *coll = NULL             # <<<<<<<<<<<<<<
 * 		if not xmmsv_get_coll(self.val, &coll):
 * 			raise ValueError("Failed to retrieve value")
 */
  __pyx_v_coll = NULL;

  /* "xmmsvalue.pyx":173
 * 		"""
 * 		cdef xmmsv_coll_t *coll = NULL
 * 		if not xmmsv_get_coll(self.val, &coll):             # <<<<<<<<<<<<<<
 * 			raise ValueError("Failed to retrieve value")
 * 		return create_coll(coll)
 */
  __pyx_t_3 = (!xmmsv_get_coll(__pyx_v_self->val, (&__pyx_v_coll)));
  if (__pyx_t_3) {

    /* "xmmsvalue.pyx":174
 * 		cdef xmmsv_coll_t *coll = NULL
 * 		if not xmmsv_get_coll(self.val, &coll):
 * 			raise ValueError("Failed to retrieve value")             # <<<<<<<<<<<<<<
 * 		return create_coll(coll)
 * 
 */
    __pyx_t_1 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_7), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 174; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 174; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "xmmsvalue.pyx":175
 * 		if not xmmsv_get_coll(self.val, &coll):
 * 			raise ValueError("Failed to retrieve value")
 * 		return create_coll(coll)             # <<<<<<<<<<<<<<
 * 
 * 	cpdef get_dict(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_9xmmsvalue_create_coll(__pyx_v_coll); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("xmmsvalue.XmmsValue.get_coll", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsvalue.pyx":167
 * 		return PyBytes_FromStringAndSize(<char *>ret, rlen)
 * 
 * 	cpdef get_coll(self):             # <<<<<<<<<<<<<<
 * 		"""
 * 		Get data from the result structure as a Collection.
 */

static PyObject *__pyx_pf_9xmmsvalue_9XmmsValue_11get_coll(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_9xmmsvalue_9XmmsValue_11get_coll[] = "\n\t\tGet data from the result structure as a Collection.\n\t\t@rtype: Collection\n\t\t";
static PyObject *__pyx_pf_9xmmsvalue_9XmmsValue_11get_coll(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_coll");
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((struct __pyx_vtabstruct_9xmmsvalue_XmmsValue *)((struct __pyx_obj_9xmmsvalue_XmmsValue *)__pyx_v_self)->__pyx_vtab)->get_coll(((struct __pyx_obj_9xmmsvalue_XmmsValue *)__pyx_v_self), 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("xmmsvalue.XmmsValue.get_coll", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsvalue.pyx":177
 * 		return create_coll(coll)
 * 
 * 	cpdef get_dict(self):             # <<<<<<<<<<<<<<
 * 		"""
 * 		@return: A dictionary containing media info.
 */

static PyObject *__pyx_pf_9xmmsvalue_9XmmsValue_12get_dict(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_f_9xmmsvalue_9XmmsValue_get_dict(struct __pyx_obj_9xmmsvalue_XmmsValue *__pyx_v_self, int __pyx_skip_dispatch) {
  PyObject *__pyx_v_k = NULL;
  PyObject *__pyx_v_v = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  Py_ssize_t __pyx_t_4;
  PyObject *(*__pyx_t_5)(PyObject *);
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *(*__pyx_t_9)(PyObject *);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_dict");
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overriden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__get_dict); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 177; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (void *)&__pyx_pf_9xmmsvalue_9XmmsValue_12get_dict)) {
      __Pyx_XDECREF(__pyx_r);
      __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 = 177; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "xmmsvalue.pyx":181
 * 		@return: A dictionary containing media info.
 * 		"""
 * 		return dict([(k, v.value()) for k,v in self.get_dict_iter()])             # <<<<<<<<<<<<<<
 * 
 * 	cpdef get_dict_iter(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  __pyx_t_2 = ((struct __pyx_vtabstruct_9xmmsvalue_XmmsValue *)__pyx_v_self->__pyx_vtab)->get_dict_iter(__pyx_v_self, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyList_CheckExact(__pyx_t_2) || PyTuple_CheckExact(__pyx_t_2)) {
    __pyx_t_3 = __pyx_t_2; __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = 0;
    __pyx_t_5 = NULL;
  } else {
    __pyx_t_4 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = Py_TYPE(__pyx_t_3)->tp_iternext;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  for (;;) {
    if (PyList_CheckExact(__pyx_t_3)) {
      if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_3)) break;
      __pyx_t_2 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++;
    } else if (PyTuple_CheckExact(__pyx_t_3)) {
      if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
      __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++;
    } else {
      __pyx_t_2 = __pyx_t_5(__pyx_t_3);
      if (unlikely(!__pyx_t_2)) {
        if (PyErr_Occurred()) {
          if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_2);
    }
    if ((likely(PyTuple_CheckExact(__pyx_t_2))) || (PyList_CheckExact(__pyx_t_2))) {
      PyObject* sequence = __pyx_t_2;
      if (likely(PyTuple_CheckExact(sequence))) {
        if (unlikely(PyTuple_GET_SIZE(sequence) != 2)) {
          if (PyTuple_GET_SIZE(sequence) > 2) __Pyx_RaiseTooManyValuesError(2);
          else __Pyx_RaiseNeedMoreValuesError(PyTuple_GET_SIZE(sequence));
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        __pyx_t_6 = PyTuple_GET_ITEM(sequence, 0); 
        __pyx_t_7 = PyTuple_GET_ITEM(sequence, 1); 
      } else {
        if (unlikely(PyList_GET_SIZE(sequence) != 2)) {
          if (PyList_GET_SIZE(sequence) > 2) __Pyx_RaiseTooManyValuesError(2);
          else __Pyx_RaiseNeedMoreValuesError(PyList_GET_SIZE(sequence));
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        __pyx_t_6 = PyList_GET_ITEM(sequence, 0); 
        __pyx_t_7 = PyList_GET_ITEM(sequence, 1); 
      }
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    } else {
      Py_ssize_t index = -1;
      __pyx_t_8 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __pyx_t_9 = Py_TYPE(__pyx_t_8)->tp_iternext;
      index = 0; __pyx_t_6 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_6)) goto __pyx_L5_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_6);
      index = 1; __pyx_t_7 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_7)) goto __pyx_L5_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_7);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_8), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      goto __pyx_L6_unpacking_done;
      __pyx_L5_unpacking_failed:;
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      if (PyErr_Occurred() && PyErr_ExceptionMatches(PyExc_StopIteration)) PyErr_Clear();
      if (!PyErr_Occurred()) __Pyx_RaiseNeedMoreValuesError(index);
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_L6_unpacking_done:;
    }
    __Pyx_XDECREF(__pyx_v_k);
    __pyx_v_k = __pyx_t_6;
    __pyx_t_6 = 0;
    __Pyx_XDECREF(__pyx_v_v);
    __pyx_v_v = __pyx_t_7;
    __pyx_t_7 = 0;
    __pyx_t_2 = PyObject_GetAttr(__pyx_v_v, __pyx_n_s__value); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_7 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_2));
    __Pyx_INCREF(__pyx_v_k);
    PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_k);
    __Pyx_GIVEREF(__pyx_v_k);
    PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_7);
    __Pyx_GIVEREF(__pyx_t_7);
    __pyx_t_7 = 0;
    if (unlikely(PyList_Append(__pyx_t_1, (PyObject*)__pyx_t_2))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_3));
  __Pyx_INCREF(((PyObject *)__pyx_t_1));
  PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_t_1));
  __Pyx_GIVEREF(((PyObject *)__pyx_t_1));
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)(&PyDict_Type))), ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("xmmsvalue.XmmsValue.get_dict", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_k);
  __Pyx_XDECREF(__pyx_v_v);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsvalue.pyx":177
 * 		return create_coll(coll)
 * 
 * 	cpdef get_dict(self):             # <<<<<<<<<<<<<<
 * 		"""
 * 		@return: A dictionary containing media info.
 */

static PyObject *__pyx_pf_9xmmsvalue_9XmmsValue_12get_dict(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_9xmmsvalue_9XmmsValue_12get_dict[] = "\n\t\t@return: A dictionary containing media info.\n\t\t";
static PyObject *__pyx_pf_9xmmsvalue_9XmmsValue_12get_dict(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_dict");
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((struct __pyx_vtabstruct_9xmmsvalue_XmmsValue *)((struct __pyx_obj_9xmmsvalue_XmmsValue *)__pyx_v_self)->__pyx_vtab)->get_dict(((struct __pyx_obj_9xmmsvalue_XmmsValue *)__pyx_v_self), 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 177; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("xmmsvalue.XmmsValue.get_dict", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsvalue.pyx":183
 * 		return dict([(k, v.value()) for k,v in self.get_dict_iter()])
 * 
 * 	cpdef get_dict_iter(self):             # <<<<<<<<<<<<<<
 * 		"""
 * 		@return: An iterator on dict items ((key, value) pairs).
 */

static PyObject *__pyx_pf_9xmmsvalue_9XmmsValue_13get_dict_iter(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_f_9xmmsvalue_9XmmsValue_get_dict_iter(struct __pyx_obj_9xmmsvalue_XmmsValue *__pyx_v_self, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_dict_iter");
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overriden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__get_dict_iter); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 183; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (void *)&__pyx_pf_9xmmsvalue_9XmmsValue_13get_dict_iter)) {
      __Pyx_XDECREF(__pyx_r);
      __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 = 183; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "xmmsvalue.pyx":187
 * 		@return: An iterator on dict items ((key, value) pairs).
 * 		"""
 * 		return XmmsDictIter(self)             # <<<<<<<<<<<<<<
 * 
 * 	cpdef get_propdict(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 187; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  __Pyx_INCREF(((PyObject *)__pyx_v_self));
  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
  __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_9xmmsvalue_XmmsDictIter)), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 187; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("xmmsvalue.XmmsValue.get_dict_iter", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsvalue.pyx":183
 * 		return dict([(k, v.value()) for k,v in self.get_dict_iter()])
 * 
 * 	cpdef get_dict_iter(self):             # <<<<<<<<<<<<<<
 * 		"""
 * 		@return: An iterator on dict items ((key, value) pairs).
 */

static PyObject *__pyx_pf_9xmmsvalue_9XmmsValue_13get_dict_iter(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_9xmmsvalue_9XmmsValue_13get_dict_iter[] = "\n\t\t@return: An iterator on dict items ((key, value) pairs).\n\t\t";
static PyObject *__pyx_pf_9xmmsvalue_9XmmsValue_13get_dict_iter(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_dict_iter");
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((struct __pyx_vtabstruct_9xmmsvalue_XmmsValue *)((struct __pyx_obj_9xmmsvalue_XmmsValue *)__pyx_v_self)->__pyx_vtab)->get_dict_iter(((struct __pyx_obj_9xmmsvalue_XmmsValue *)__pyx_v_self), 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 183; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("xmmsvalue.XmmsValue.get_dict_iter", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsvalue.pyx":189
 * 		return XmmsDictIter(self)
 * 
 * 	cpdef get_propdict(self):             # <<<<<<<<<<<<<<
 * 		"""
 * 		@return: A source dict.
 */

static PyObject *__pyx_pf_9xmmsvalue_9XmmsValue_14get_propdict(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_f_9xmmsvalue_9XmmsValue_get_propdict(struct __pyx_obj_9xmmsvalue_XmmsValue *__pyx_v_self, int __pyx_skip_dispatch) {
  PyObject *__pyx_v_ret = NULL;
  PyObject *__pyx_v_key = NULL;
  PyObject *__pyx_v_values = NULL;
  PyObject *__pyx_v_source = NULL;
  PyObject *__pyx_v_value = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  Py_ssize_t __pyx_t_4;
  PyObject *(*__pyx_t_5)(PyObject *);
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *(*__pyx_t_8)(PyObject *);
  Py_ssize_t __pyx_t_9;
  PyObject *(*__pyx_t_10)(PyObject *);
  PyObject *__pyx_t_11 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_propdict");
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overriden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__get_propdict); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 189; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (void *)&__pyx_pf_9xmmsvalue_9XmmsValue_14get_propdict)) {
      __Pyx_XDECREF(__pyx_r);
      __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 = 189; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "xmmsvalue.pyx":193
 * 		@return: A source dict.
 * 		"""
 * 		ret = PropDict(self.sourcepref)             # <<<<<<<<<<<<<<
 * 		for key, values in self.get_dict_iter():
 * 			for source, value in values.get_dict_iter():
 */
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__PropDict); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 193; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 193; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  __Pyx_INCREF(__pyx_v_self->sourcepref);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_self->sourcepref);
  __Pyx_GIVEREF(__pyx_v_self->sourcepref);
  __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 = 193; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  __pyx_v_ret = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "xmmsvalue.pyx":194
 * 		"""
 * 		ret = PropDict(self.sourcepref)
 * 		for key, values in self.get_dict_iter():             # <<<<<<<<<<<<<<
 * 			for source, value in values.get_dict_iter():
 * 				ret[(source, key)] = value.value()
 */
  __pyx_t_3 = ((struct __pyx_vtabstruct_9xmmsvalue_XmmsValue *)__pyx_v_self->__pyx_vtab)->get_dict_iter(__pyx_v_self, 0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 194; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  if (PyList_CheckExact(__pyx_t_3) || PyTuple_CheckExact(__pyx_t_3)) {
    __pyx_t_2 = __pyx_t_3; __Pyx_INCREF(__pyx_t_2); __pyx_t_4 = 0;
    __pyx_t_5 = NULL;
  } else {
    __pyx_t_4 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 194; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_5 = Py_TYPE(__pyx_t_2)->tp_iternext;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  for (;;) {
    if (PyList_CheckExact(__pyx_t_2)) {
      if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_2)) break;
      __pyx_t_3 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_3); __pyx_t_4++;
    } else if (PyTuple_CheckExact(__pyx_t_2)) {
      if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
      __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_3); __pyx_t_4++;
    } else {
      __pyx_t_3 = __pyx_t_5(__pyx_t_2);
      if (unlikely(!__pyx_t_3)) {
        if (PyErr_Occurred()) {
          if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 194; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_3);
    }
    if ((likely(PyTuple_CheckExact(__pyx_t_3))) || (PyList_CheckExact(__pyx_t_3))) {
      PyObject* sequence = __pyx_t_3;
      if (likely(PyTuple_CheckExact(sequence))) {
        if (unlikely(PyTuple_GET_SIZE(sequence) != 2)) {
          if (PyTuple_GET_SIZE(sequence) > 2) __Pyx_RaiseTooManyValuesError(2);
          else __Pyx_RaiseNeedMoreValuesError(PyTuple_GET_SIZE(sequence));
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 194; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        __pyx_t_1 = PyTuple_GET_ITEM(sequence, 0); 
        __pyx_t_6 = PyTuple_GET_ITEM(sequence, 1); 
      } else {
        if (unlikely(PyList_GET_SIZE(sequence) != 2)) {
          if (PyList_GET_SIZE(sequence) > 2) __Pyx_RaiseTooManyValuesError(2);
          else __Pyx_RaiseNeedMoreValuesError(PyList_GET_SIZE(sequence));
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 194; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        __pyx_t_1 = PyList_GET_ITEM(sequence, 0); 
        __pyx_t_6 = PyList_GET_ITEM(sequence, 1); 
      }
      __Pyx_INCREF(__pyx_t_1);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    } else {
      Py_ssize_t index = -1;
      __pyx_t_7 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 194; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_8 = Py_TYPE(__pyx_t_7)->tp_iternext;
      index = 0; __pyx_t_1 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_1)) goto __pyx_L5_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_1);
      index = 1; __pyx_t_6 = __pyx_t_8(__pyx_t_7); if (unlikely(!__pyx_t_6)) goto __pyx_L5_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_6);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_7), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 194; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      goto __pyx_L6_unpacking_done;
      __pyx_L5_unpacking_failed:;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      if (PyErr_Occurred() && PyErr_ExceptionMatches(PyExc_StopIteration)) PyErr_Clear();
      if (!PyErr_Occurred()) __Pyx_RaiseNeedMoreValuesError(index);
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 194; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_L6_unpacking_done:;
    }
    __Pyx_XDECREF(__pyx_v_key);
    __pyx_v_key = __pyx_t_1;
    __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_v_values);
    __pyx_v_values = __pyx_t_6;
    __pyx_t_6 = 0;

    /* "xmmsvalue.pyx":195
 * 		ret = PropDict(self.sourcepref)
 * 		for key, values in self.get_dict_iter():
 * 			for source, value in values.get_dict_iter():             # <<<<<<<<<<<<<<
 * 				ret[(source, key)] = value.value()
 * 		return ret
 */
    __pyx_t_3 = PyObject_GetAttr(__pyx_v_values, __pyx_n_s__get_dict_iter); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 195; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_6 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 195; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (PyList_CheckExact(__pyx_t_6) || PyTuple_CheckExact(__pyx_t_6)) {
      __pyx_t_3 = __pyx_t_6; __Pyx_INCREF(__pyx_t_3); __pyx_t_9 = 0;
      __pyx_t_10 = NULL;
    } else {
      __pyx_t_9 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 195; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_10 = Py_TYPE(__pyx_t_3)->tp_iternext;
    }
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    for (;;) {
      if (PyList_CheckExact(__pyx_t_3)) {
        if (__pyx_t_9 >= PyList_GET_SIZE(__pyx_t_3)) break;
        __pyx_t_6 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_9); __Pyx_INCREF(__pyx_t_6); __pyx_t_9++;
      } else if (PyTuple_CheckExact(__pyx_t_3)) {
        if (__pyx_t_9 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
        __pyx_t_6 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_9); __Pyx_INCREF(__pyx_t_6); __pyx_t_9++;
      } else {
        __pyx_t_6 = __pyx_t_10(__pyx_t_3);
        if (unlikely(!__pyx_t_6)) {
          if (PyErr_Occurred()) {
            if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
            else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 195; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_6);
      }
      if ((likely(PyTuple_CheckExact(__pyx_t_6))) || (PyList_CheckExact(__pyx_t_6))) {
        PyObject* sequence = __pyx_t_6;
        if (likely(PyTuple_CheckExact(sequence))) {
          if (unlikely(PyTuple_GET_SIZE(sequence) != 2)) {
            if (PyTuple_GET_SIZE(sequence) > 2) __Pyx_RaiseTooManyValuesError(2);
            else __Pyx_RaiseNeedMoreValuesError(PyTuple_GET_SIZE(sequence));
            {__pyx_filename = __pyx_f[0]; __pyx_lineno = 195; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          }
          __pyx_t_1 = PyTuple_GET_ITEM(sequence, 0); 
          __pyx_t_7 = PyTuple_GET_ITEM(sequence, 1); 
        } else {
          if (unlikely(PyList_GET_SIZE(sequence) != 2)) {
            if (PyList_GET_SIZE(sequence) > 2) __Pyx_RaiseTooManyValuesError(2);
            else __Pyx_RaiseNeedMoreValuesError(PyList_GET_SIZE(sequence));
            {__pyx_filename = __pyx_f[0]; __pyx_lineno = 195; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          }
          __pyx_t_1 = PyList_GET_ITEM(sequence, 0); 
          __pyx_t_7 = PyList_GET_ITEM(sequence, 1); 
        }
        __Pyx_INCREF(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      } else {
        Py_ssize_t index = -1;
        __pyx_t_11 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 195; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_11);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __pyx_t_8 = Py_TYPE(__pyx_t_11)->tp_iternext;
        index = 0; __pyx_t_1 = __pyx_t_8(__pyx_t_11); if (unlikely(!__pyx_t_1)) goto __pyx_L9_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_1);
        index = 1; __pyx_t_7 = __pyx_t_8(__pyx_t_11); if (unlikely(!__pyx_t_7)) goto __pyx_L9_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_7);
        if (__Pyx_IternextUnpackEndCheck(__pyx_t_8(__pyx_t_11), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 195; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        goto __pyx_L10_unpacking_done;
        __pyx_L9_unpacking_failed:;
        __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0;
        if (PyErr_Occurred() && PyErr_ExceptionMatches(PyExc_StopIteration)) PyErr_Clear();
        if (!PyErr_Occurred()) __Pyx_RaiseNeedMoreValuesError(index);
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 195; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __pyx_L10_unpacking_done:;
      }
      __Pyx_XDECREF(__pyx_v_source);
      __pyx_v_source = __pyx_t_1;
      __pyx_t_1 = 0;
      __Pyx_XDECREF(__pyx_v_value);
      __pyx_v_value = __pyx_t_7;
      __pyx_t_7 = 0;

      /* "xmmsvalue.pyx":196
 * 		for key, values in self.get_dict_iter():
 * 			for source, value in values.get_dict_iter():
 * 				ret[(source, key)] = value.value()             # <<<<<<<<<<<<<<
 * 		return ret
 * 
 */
      __pyx_t_6 = PyObject_GetAttr(__pyx_v_value, __pyx_n_s__value); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 196; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __pyx_t_7 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 196; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 196; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_6));
      __Pyx_INCREF(__pyx_v_source);
      PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_source);
      __Pyx_GIVEREF(__pyx_v_source);
      __Pyx_INCREF(__pyx_v_key);
      PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_v_key);
      __Pyx_GIVEREF(__pyx_v_key);
      if (PyObject_SetItem(__pyx_v_ret, ((PyObject *)__pyx_t_6), __pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 196; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "xmmsvalue.pyx":197
 * 			for source, value in values.get_dict_iter():
 * 				ret[(source, key)] = value.value()
 * 		return ret             # <<<<<<<<<<<<<<
 * 
 * 	cpdef get_list(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_ret);
  __pyx_r = __pyx_v_ret;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_11);
  __Pyx_AddTraceback("xmmsvalue.XmmsValue.get_propdict", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_ret);
  __Pyx_XDECREF(__pyx_v_key);
  __Pyx_XDECREF(__pyx_v_values);
  __Pyx_XDECREF(__pyx_v_source);
  __Pyx_XDECREF(__pyx_v_value);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsvalue.pyx":189
 * 		return XmmsDictIter(self)
 * 
 * 	cpdef get_propdict(self):             # <<<<<<<<<<<<<<
 * 		"""
 * 		@return: A source dict.
 */

static PyObject *__pyx_pf_9xmmsvalue_9XmmsValue_14get_propdict(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_9xmmsvalue_9XmmsValue_14get_propdict[] = "\n\t\t@return: A source dict.\n\t\t";
static PyObject *__pyx_pf_9xmmsvalue_9XmmsValue_14get_propdict(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_propdict");
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((struct __pyx_vtabstruct_9xmmsvalue_XmmsValue *)((struct __pyx_obj_9xmmsvalue_XmmsValue *)__pyx_v_self)->__pyx_vtab)->get_propdict(((struct __pyx_obj_9xmmsvalue_XmmsValue *)__pyx_v_self), 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 189; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("xmmsvalue.XmmsValue.get_propdict", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsvalue.pyx":199
 * 		return ret
 * 
 * 	cpdef get_list(self):             # <<<<<<<<<<<<<<
 * 		"""
 * 		@return: A list of dicts from the result structure.
 */

static PyObject *__pyx_pf_9xmmsvalue_9XmmsValue_15get_list(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_f_9xmmsvalue_9XmmsValue_get_list(struct __pyx_obj_9xmmsvalue_XmmsValue *__pyx_v_self, int __pyx_skip_dispatch) {
  PyObject *__pyx_v_v = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  Py_ssize_t __pyx_t_4;
  PyObject *(*__pyx_t_5)(PyObject *);
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_list");
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overriden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__get_list); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 199; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (void *)&__pyx_pf_9xmmsvalue_9XmmsValue_15get_list)) {
      __Pyx_XDECREF(__pyx_r);
      __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 = 199; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "xmmsvalue.pyx":203
 * 		@return: A list of dicts from the result structure.
 * 		"""
 * 		return [v.value() for v in self.get_list_iter()]             # <<<<<<<<<<<<<<
 * 
 * 	cpdef get_list_iter(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 203; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  __pyx_t_2 = ((struct __pyx_vtabstruct_9xmmsvalue_XmmsValue *)__pyx_v_self->__pyx_vtab)->get_list_iter(__pyx_v_self, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 203; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyList_CheckExact(__pyx_t_2) || PyTuple_CheckExact(__pyx_t_2)) {
    __pyx_t_3 = __pyx_t_2; __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = 0;
    __pyx_t_5 = NULL;
  } else {
    __pyx_t_4 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 203; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = Py_TYPE(__pyx_t_3)->tp_iternext;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  for (;;) {
    if (PyList_CheckExact(__pyx_t_3)) {
      if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_3)) break;
      __pyx_t_2 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++;
    } else if (PyTuple_CheckExact(__pyx_t_3)) {
      if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
      __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++;
    } else {
      __pyx_t_2 = __pyx_t_5(__pyx_t_3);
      if (unlikely(!__pyx_t_2)) {
        if (PyErr_Occurred()) {
          if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 203; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_2);
    }
    __Pyx_XDECREF(__pyx_v_v);
    __pyx_v_v = __pyx_t_2;
    __pyx_t_2 = 0;
    __pyx_t_2 = PyObject_GetAttr(__pyx_v_v, __pyx_n_s__value); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 203; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_6 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 203; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (unlikely(PyList_Append(__pyx_t_1, (PyObject*)__pyx_t_6))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 203; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_INCREF(((PyObject *)__pyx_t_1));
  __pyx_r = ((PyObject *)__pyx_t_1);
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("xmmsvalue.XmmsValue.get_list", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsvalue.pyx":199
 * 		return ret
 * 
 * 	cpdef get_list(self):             # <<<<<<<<<<<<<<
 * 		"""
 * 		@return: A list of dicts from the result structure.
 */

static PyObject *__pyx_pf_9xmmsvalue_9XmmsValue_15get_list(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_9xmmsvalue_9XmmsValue_15get_list[] = "\n\t\t@return: A list of dicts from the result structure.\n\t\t";
static PyObject *__pyx_pf_9xmmsvalue_9XmmsValue_15get_list(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_list");
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((struct __pyx_vtabstruct_9xmmsvalue_XmmsValue *)((struct __pyx_obj_9xmmsvalue_XmmsValue *)__pyx_v_self)->__pyx_vtab)->get_list(((struct __pyx_obj_9xmmsvalue_XmmsValue *)__pyx_v_self), 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 199; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("xmmsvalue.XmmsValue.get_list", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsvalue.pyx":205
 * 		return [v.value() for v in self.get_list_iter()]
 * 
 * 	cpdef get_list_iter(self):             # <<<<<<<<<<<<<<
 * 		"""
 * 		@return: An iterator on a list.
 */

static PyObject *__pyx_pf_9xmmsvalue_9XmmsValue_16get_list_iter(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_f_9xmmsvalue_9XmmsValue_get_list_iter(struct __pyx_obj_9xmmsvalue_XmmsValue *__pyx_v_self, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_list_iter");
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overriden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__get_list_iter); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (void *)&__pyx_pf_9xmmsvalue_9XmmsValue_16get_list_iter)) {
      __Pyx_XDECREF(__pyx_r);
      __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 = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "xmmsvalue.pyx":209
 * 		@return: An iterator on a list.
 * 		"""
 * 		return XmmsListIter(self)             # <<<<<<<<<<<<<<
 * 
 * 	cpdef value(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 209; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  __Pyx_INCREF(((PyObject *)__pyx_v_self));
  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
  __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_9xmmsvalue_XmmsListIter)), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 209; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("xmmsvalue.XmmsValue.get_list_iter", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsvalue.pyx":205
 * 		return [v.value() for v in self.get_list_iter()]
 * 
 * 	cpdef get_list_iter(self):             # <<<<<<<<<<<<<<
 * 		"""
 * 		@return: An iterator on a list.
 */

static PyObject *__pyx_pf_9xmmsvalue_9XmmsValue_16get_list_iter(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_9xmmsvalue_9XmmsValue_16get_list_iter[] = "\n\t\t@return: An iterator on a list.\n\t\t";
static PyObject *__pyx_pf_9xmmsvalue_9XmmsValue_16get_list_iter(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_list_iter");
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((struct __pyx_vtabstruct_9xmmsvalue_XmmsValue *)((struct __pyx_obj_9xmmsvalue_XmmsValue *)__pyx_v_self)->__pyx_vtab)->get_list_iter(((struct __pyx_obj_9xmmsvalue_XmmsValue *)__pyx_v_self), 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("xmmsvalue.XmmsValue.get_list_iter", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsvalue.pyx":211
 * 		return XmmsListIter(self)
 * 
 * 	cpdef value(self):             # <<<<<<<<<<<<<<
 * 		"""
 * 		Return value of appropriate data type contained in this result.
 */

static PyObject *__pyx_pf_9xmmsvalue_9XmmsValue_17value(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_f_9xmmsvalue_9XmmsValue_value(struct __pyx_obj_9xmmsvalue_XmmsValue *__pyx_v_self, int __pyx_skip_dispatch) {
  xmmsv_type_t __pyx_v_vtype;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  xmmsv_type_t __pyx_t_3;
  int __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("value");
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overriden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__value); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 211; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (void *)&__pyx_pf_9xmmsvalue_9XmmsValue_17value)) {
      __Pyx_XDECREF(__pyx_r);
      __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 = 211; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "xmmsvalue.pyx":217
 * 		"""
 * 		cdef xmmsv_type_t vtype
 * 		vtype = self.get_type()             # <<<<<<<<<<<<<<
 * 
 * 		if vtype == XMMSV_TYPE_NONE:
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_9xmmsvalue_XmmsValue *)__pyx_v_self->__pyx_vtab)->get_type(__pyx_v_self, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 217; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = ((xmmsv_type_t)PyInt_AsLong(__pyx_t_1)); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 217; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_v_vtype = __pyx_t_3;

  /* "xmmsvalue.pyx":219
 * 		vtype = self.get_type()
 * 
 * 		if vtype == XMMSV_TYPE_NONE:             # <<<<<<<<<<<<<<
 * 			return None
 * 		elif vtype == XMMSV_TYPE_ERROR:
 */
  __pyx_t_4 = (__pyx_v_vtype == XMMSV_TYPE_NONE);
  if (__pyx_t_4) {

    /* "xmmsvalue.pyx":220
 * 
 * 		if vtype == XMMSV_TYPE_NONE:
 * 			return None             # <<<<<<<<<<<<<<
 * 		elif vtype == XMMSV_TYPE_ERROR:
 * 			return self.get_error()
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(Py_None);
    __pyx_r = Py_None;
    goto __pyx_L0;
    goto __pyx_L3;
  }

  /* "xmmsvalue.pyx":221
 * 		if vtype == XMMSV_TYPE_NONE:
 * 			return None
 * 		elif vtype == XMMSV_TYPE_ERROR:             # <<<<<<<<<<<<<<
 * 			return self.get_error()
 * 		elif vtype == XMMSV_TYPE_INT32:
 */
  __pyx_t_4 = (__pyx_v_vtype == XMMSV_TYPE_ERROR);
  if (__pyx_t_4) {

    /* "xmmsvalue.pyx":222
 * 			return None
 * 		elif vtype == XMMSV_TYPE_ERROR:
 * 			return self.get_error()             # <<<<<<<<<<<<<<
 * 		elif vtype == XMMSV_TYPE_INT32:
 * 			return self.get_int()
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = ((struct __pyx_vtabstruct_9xmmsvalue_XmmsValue *)__pyx_v_self->__pyx_vtab)->get_error(__pyx_v_self, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;
    goto __pyx_L3;
  }

  /* "xmmsvalue.pyx":223
 * 		elif vtype == XMMSV_TYPE_ERROR:
 * 			return self.get_error()
 * 		elif vtype == XMMSV_TYPE_INT32:             # <<<<<<<<<<<<<<
 * 			return self.get_int()
 * 		elif vtype == XMMSV_TYPE_STRING:
 */
  __pyx_t_4 = (__pyx_v_vtype == XMMSV_TYPE_INT32);
  if (__pyx_t_4) {

    /* "xmmsvalue.pyx":224
 * 			return self.get_error()
 * 		elif vtype == XMMSV_TYPE_INT32:
 * 			return self.get_int()             # <<<<<<<<<<<<<<
 * 		elif vtype == XMMSV_TYPE_STRING:
 * 			return self.get_string()
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = ((struct __pyx_vtabstruct_9xmmsvalue_XmmsValue *)__pyx_v_self->__pyx_vtab)->get_int(__pyx_v_self, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 224; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;
    goto __pyx_L3;
  }

  /* "xmmsvalue.pyx":225
 * 		elif vtype == XMMSV_TYPE_INT32:
 * 			return self.get_int()
 * 		elif vtype == XMMSV_TYPE_STRING:             # <<<<<<<<<<<<<<
 * 			return self.get_string()
 * 		elif vtype == XMMSV_TYPE_COLL:
 */
  __pyx_t_4 = (__pyx_v_vtype == XMMSV_TYPE_STRING);
  if (__pyx_t_4) {

    /* "xmmsvalue.pyx":226
 * 			return self.get_int()
 * 		elif vtype == XMMSV_TYPE_STRING:
 * 			return self.get_string()             # <<<<<<<<<<<<<<
 * 		elif vtype == XMMSV_TYPE_COLL:
 * 			return self.get_coll()
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = ((struct __pyx_vtabstruct_9xmmsvalue_XmmsValue *)__pyx_v_self->__pyx_vtab)->get_string(__pyx_v_self, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 226; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;
    goto __pyx_L3;
  }

  /* "xmmsvalue.pyx":227
 * 		elif vtype == XMMSV_TYPE_STRING:
 * 			return self.get_string()
 * 		elif vtype == XMMSV_TYPE_COLL:             # <<<<<<<<<<<<<<
 * 			return self.get_coll()
 * 		elif vtype == XMMSV_TYPE_BIN:
 */
  __pyx_t_4 = (__pyx_v_vtype == XMMSV_TYPE_COLL);
  if (__pyx_t_4) {

    /* "xmmsvalue.pyx":228
 * 			return self.get_string()
 * 		elif vtype == XMMSV_TYPE_COLL:
 * 			return self.get_coll()             # <<<<<<<<<<<<<<
 * 		elif vtype == XMMSV_TYPE_BIN:
 * 			return self.get_bin()
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = ((struct __pyx_vtabstruct_9xmmsvalue_XmmsValue *)__pyx_v_self->__pyx_vtab)->get_coll(__pyx_v_self, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 228; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;
    goto __pyx_L3;
  }

  /* "xmmsvalue.pyx":229
 * 		elif vtype == XMMSV_TYPE_COLL:
 * 			return self.get_coll()
 * 		elif vtype == XMMSV_TYPE_BIN:             # <<<<<<<<<<<<<<
 * 			return self.get_bin()
 * 		elif vtype == XMMSV_TYPE_LIST:
 */
  __pyx_t_4 = (__pyx_v_vtype == XMMSV_TYPE_BIN);
  if (__pyx_t_4) {

    /* "xmmsvalue.pyx":230
 * 			return self.get_coll()
 * 		elif vtype == XMMSV_TYPE_BIN:
 * 			return self.get_bin()             # <<<<<<<<<<<<<<
 * 		elif vtype == XMMSV_TYPE_LIST:
 * 			return self.get_list()
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = ((struct __pyx_vtabstruct_9xmmsvalue_XmmsValue *)__pyx_v_self->__pyx_vtab)->get_bin(__pyx_v_self, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 230; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;
    goto __pyx_L3;
  }

  /* "xmmsvalue.pyx":231
 * 		elif vtype == XMMSV_TYPE_BIN:
 * 			return self.get_bin()
 * 		elif vtype == XMMSV_TYPE_LIST:             # <<<<<<<<<<<<<<
 * 			return self.get_list()
 * 		elif vtype == XMMSV_TYPE_DICT:
 */
  __pyx_t_4 = (__pyx_v_vtype == XMMSV_TYPE_LIST);
  if (__pyx_t_4) {

    /* "xmmsvalue.pyx":232
 * 			return self.get_bin()
 * 		elif vtype == XMMSV_TYPE_LIST:
 * 			return self.get_list()             # <<<<<<<<<<<<<<
 * 		elif vtype == XMMSV_TYPE_DICT:
 * 			if self.ispropdict:
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = ((struct __pyx_vtabstruct_9xmmsvalue_XmmsValue *)__pyx_v_self->__pyx_vtab)->get_list(__pyx_v_self, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 232; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;
    goto __pyx_L3;
  }

  /* "xmmsvalue.pyx":233
 * 		elif vtype == XMMSV_TYPE_LIST:
 * 			return self.get_list()
 * 		elif vtype == XMMSV_TYPE_DICT:             # <<<<<<<<<<<<<<
 * 			if self.ispropdict:
 * 				return self.get_propdict()
 */
  __pyx_t_4 = (__pyx_v_vtype == XMMSV_TYPE_DICT);
  if (__pyx_t_4) {

    /* "xmmsvalue.pyx":234
 * 			return self.get_list()
 * 		elif vtype == XMMSV_TYPE_DICT:
 * 			if self.ispropdict:             # <<<<<<<<<<<<<<
 * 				return self.get_propdict()
 * 			return self.get_dict()
 */
    if (__pyx_v_self->ispropdict) {

      /* "xmmsvalue.pyx":235
 * 		elif vtype == XMMSV_TYPE_DICT:
 * 			if self.ispropdict:
 * 				return self.get_propdict()             # <<<<<<<<<<<<<<
 * 			return self.get_dict()
 * 		else:
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = ((struct __pyx_vtabstruct_9xmmsvalue_XmmsValue *)__pyx_v_self->__pyx_vtab)->get_propdict(__pyx_v_self, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 235; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;
      goto __pyx_L4;
    }
    __pyx_L4:;

    /* "xmmsvalue.pyx":236
 * 			if self.ispropdict:
 * 				return self.get_propdict()
 * 			return self.get_dict()             # <<<<<<<<<<<<<<
 * 		else:
 * 			raise TypeError("Unknown value type from the server: %d" % vtype)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = ((struct __pyx_vtabstruct_9xmmsvalue_XmmsValue *)__pyx_v_self->__pyx_vtab)->get_dict(__pyx_v_self, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 236; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;
    goto __pyx_L3;
  }
  /*else*/ {

    /* "xmmsvalue.pyx":238
 * 			return self.get_dict()
 * 		else:
 * 			raise TypeError("Unknown value type from the server: %d" % vtype)             # <<<<<<<<<<<<<<
 * 
 * 
 */
    __pyx_t_1 = PyInt_FromLong(__pyx_v_vtype); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 238; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_2 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_8), __pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 238; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_2));
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 238; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_1));
    PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_t_2));
    __Pyx_GIVEREF(((PyObject *)__pyx_t_2));
    __pyx_t_2 = 0;
    __pyx_t_2 = PyObject_Call(__pyx_builtin_TypeError, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 238; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 238; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_L3:;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("xmmsvalue.XmmsValue.value", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsvalue.pyx":211
 * 		return XmmsListIter(self)
 * 
 * 	cpdef value(self):             # <<<<<<<<<<<<<<
 * 		"""
 * 		Return value of appropriate data type contained in this result.
 */

static PyObject *__pyx_pf_9xmmsvalue_9XmmsValue_17value(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_9xmmsvalue_9XmmsValue_17value[] = "\n\t\tReturn value of appropriate data type contained in this result.\n\t\tThis can be used instead of most get_* functions in this class.\n\t\t";
static PyObject *__pyx_pf_9xmmsvalue_9XmmsValue_17value(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("value");
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((struct __pyx_vtabstruct_9xmmsvalue_XmmsValue *)((struct __pyx_obj_9xmmsvalue_XmmsValue *)__pyx_v_self)->__pyx_vtab)->value(((struct __pyx_obj_9xmmsvalue_XmmsValue *)__pyx_v_self), 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 211; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("xmmsvalue.XmmsValue.value", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsvalue.pyx":246
 * 	#cdef xmmsv_list_iter_t *it
 * 
 * 	def __cinit__(self):             # <<<<<<<<<<<<<<
 * 		self.val = NULL
 * 		self.it = NULL
 */

static int __pyx_pf_9xmmsvalue_12XmmsListIter___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pf_9xmmsvalue_12XmmsListIter___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__");
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 0))) return -1;

  /* "xmmsvalue.pyx":247
 * 
 * 	def __cinit__(self):
 * 		self.val = NULL             # <<<<<<<<<<<<<<
 * 		self.it = NULL
 * 
 */
  ((struct __pyx_obj_9xmmsvalue_XmmsListIter *)__pyx_v_self)->val = NULL;

  /* "xmmsvalue.pyx":248
 * 	def __cinit__(self):
 * 		self.val = NULL
 * 		self.it = NULL             # <<<<<<<<<<<<<<
 * 
 * 	def __dealloc__(self):
 */
  ((struct __pyx_obj_9xmmsvalue_XmmsListIter *)__pyx_v_self)->it = NULL;

  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsvalue.pyx":250
 * 		self.it = NULL
 * 
 * 	def __dealloc__(self):             # <<<<<<<<<<<<<<
 * 		if self.it != NULL:
 * 			xmmsv_list_iter_explicit_destroy(self.it)
 */

static void __pyx_pf_9xmmsvalue_12XmmsListIter_1__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pf_9xmmsvalue_12XmmsListIter_1__dealloc__(PyObject *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("__dealloc__");

  /* "xmmsvalue.pyx":251
 * 
 * 	def __dealloc__(self):
 * 		if self.it != NULL:             # <<<<<<<<<<<<<<
 * 			xmmsv_list_iter_explicit_destroy(self.it)
 * 		if self.val != NULL:
 */
  __pyx_t_1 = (((struct __pyx_obj_9xmmsvalue_XmmsListIter *)__pyx_v_self)->it != NULL);
  if (__pyx_t_1) {

    /* "xmmsvalue.pyx":252
 * 	def __dealloc__(self):
 * 		if self.it != NULL:
 * 			xmmsv_list_iter_explicit_destroy(self.it)             # <<<<<<<<<<<<<<
 * 		if self.val != NULL:
 * 			xmmsv_unref(self.val)
 */
    xmmsv_list_iter_explicit_destroy(((struct __pyx_obj_9xmmsvalue_XmmsListIter *)__pyx_v_self)->it);
    goto __pyx_L5;
  }
  __pyx_L5:;

  /* "xmmsvalue.pyx":253
 * 		if self.it != NULL:
 * 			xmmsv_list_iter_explicit_destroy(self.it)
 * 		if self.val != NULL:             # <<<<<<<<<<<<<<
 * 			xmmsv_unref(self.val)
 * 
 */
  __pyx_t_1 = (((struct __pyx_obj_9xmmsvalue_XmmsListIter *)__pyx_v_self)->val != NULL);
  if (__pyx_t_1) {

    /* "xmmsvalue.pyx":254
 * 			xmmsv_list_iter_explicit_destroy(self.it)
 * 		if self.val != NULL:
 * 			xmmsv_unref(self.val)             # <<<<<<<<<<<<<<
 * 
 * 	def __init__(self, XmmsValue value):
 */
    xmmsv_unref(((struct __pyx_obj_9xmmsvalue_XmmsListIter *)__pyx_v_self)->val);
    goto __pyx_L6;
  }
  __pyx_L6:;

  __Pyx_RefNannyFinishContext();
}

/* "xmmsvalue.pyx":256
 * 			xmmsv_unref(self.val)
 * 
 * 	def __init__(self, XmmsValue value):             # <<<<<<<<<<<<<<
 * 		if value.get_type() != XMMSV_TYPE_LIST:
 * 			raise TypeError("The value is not a list.")
 */

static int __pyx_pf_9xmmsvalue_12XmmsListIter_2__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pf_9xmmsvalue_12XmmsListIter_2__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct __pyx_obj_9xmmsvalue_XmmsValue *__pyx_v_value = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__value,0};
  __Pyx_RefNannySetupContext("__init__");
  {
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__value);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 256; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_value = ((struct __pyx_obj_9xmmsvalue_XmmsValue *)values[0]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 256; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("xmmsvalue.XmmsListIter.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_value), __pyx_ptype_9xmmsvalue_XmmsValue, 1, "value", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 256; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "xmmsvalue.pyx":257
 * 
 * 	def __init__(self, XmmsValue value):
 * 		if value.get_type() != XMMSV_TYPE_LIST:             # <<<<<<<<<<<<<<
 * 			raise TypeError("The value is not a list.")
 * 		self.val = xmmsv_ref(value.val)
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_9xmmsvalue_XmmsValue *)__pyx_v_value->__pyx_vtab)->get_type(__pyx_v_value, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 257; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyInt_FromLong(XMMSV_TYPE_LIST); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 257; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_NE); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 257; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 257; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_4) {

    /* "xmmsvalue.pyx":258
 * 	def __init__(self, XmmsValue value):
 * 		if value.get_type() != XMMSV_TYPE_LIST:
 * 			raise TypeError("The value is not a list.")             # <<<<<<<<<<<<<<
 * 		self.val = xmmsv_ref(value.val)
 * 		if not xmmsv_get_list_iter(self.val, &self.it):
 */
    __pyx_t_3 = PyObject_Call(__pyx_builtin_TypeError, ((PyObject *)__pyx_k_tuple_10), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 258; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 258; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    goto __pyx_L6;
  }
  __pyx_L6:;

  /* "xmmsvalue.pyx":259
 * 		if value.get_type() != XMMSV_TYPE_LIST:
 * 			raise TypeError("The value is not a list.")
 * 		self.val = xmmsv_ref(value.val)             # <<<<<<<<<<<<<<
 * 		if not xmmsv_get_list_iter(self.val, &self.it):
 * 			raise RuntimeError("Failed to initialize the iterator.")
 */
  ((struct __pyx_obj_9xmmsvalue_XmmsListIter *)__pyx_v_self)->val = xmmsv_ref(__pyx_v_value->val);

  /* "xmmsvalue.pyx":260
 * 			raise TypeError("The value is not a list.")
 * 		self.val = xmmsv_ref(value.val)
 * 		if not xmmsv_get_list_iter(self.val, &self.it):             # <<<<<<<<<<<<<<
 * 			raise RuntimeError("Failed to initialize the iterator.")
 * 		self.sourcepref = value.sourcepref
 */
  __pyx_t_4 = (!xmmsv_get_list_iter(((struct __pyx_obj_9xmmsvalue_XmmsListIter *)__pyx_v_self)->val, (&((struct __pyx_obj_9xmmsvalue_XmmsListIter *)__pyx_v_self)->it)));
  if (__pyx_t_4) {

    /* "xmmsvalue.pyx":261
 * 		self.val = xmmsv_ref(value.val)
 * 		if not xmmsv_get_list_iter(self.val, &self.it):
 * 			raise RuntimeError("Failed to initialize the iterator.")             # <<<<<<<<<<<<<<
 * 		self.sourcepref = value.sourcepref
 * 
 */
    __pyx_t_3 = PyObject_Call(__pyx_builtin_RuntimeError, ((PyObject *)__pyx_k_tuple_12), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 261; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 261; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    goto __pyx_L7;
  }
  __pyx_L7:;

  /* "xmmsvalue.pyx":262
 * 		if not xmmsv_get_list_iter(self.val, &self.it):
 * 			raise RuntimeError("Failed to initialize the iterator.")
 * 		self.sourcepref = value.sourcepref             # <<<<<<<<<<<<<<
 * 
 * 	def __iter__(self):
 */
  __Pyx_INCREF(__pyx_v_value->sourcepref);
  __Pyx_GIVEREF(__pyx_v_value->sourcepref);
  __Pyx_GOTREF(((struct __pyx_obj_9xmmsvalue_XmmsListIter *)__pyx_v_self)->sourcepref);
  __Pyx_DECREF(((struct __pyx_obj_9xmmsvalue_XmmsListIter *)__pyx_v_self)->sourcepref);
  ((struct __pyx_obj_9xmmsvalue_XmmsListIter *)__pyx_v_self)->sourcepref = __pyx_v_value->sourcepref;

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("xmmsvalue.XmmsListIter.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsvalue.pyx":264
 * 		self.sourcepref = value.sourcepref
 * 
 * 	def __iter__(self):             # <<<<<<<<<<<<<<
 * 		return self
 * 
 */

static PyObject *__pyx_pf_9xmmsvalue_12XmmsListIter_3__iter__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pf_9xmmsvalue_12XmmsListIter_3__iter__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__iter__");

  /* "xmmsvalue.pyx":265
 * 
 * 	def __iter__(self):
 * 		return self             # <<<<<<<<<<<<<<
 * 
 * 	def __next__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self);
  __pyx_r = __pyx_v_self;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsvalue.pyx":267
 * 		return self
 * 
 * 	def __next__(self):             # <<<<<<<<<<<<<<
 * 		cdef xmmsv_t *val = NULL
 * 		cdef XmmsValue v
 */

static PyObject *__pyx_pf_9xmmsvalue_12XmmsListIter_4__next__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pf_9xmmsvalue_12XmmsListIter_4__next__(PyObject *__pyx_v_self) {
  xmmsv_t *__pyx_v_val;
  struct __pyx_obj_9xmmsvalue_XmmsValue *__pyx_v_v = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__next__");

  /* "xmmsvalue.pyx":268
 * 
 * 	def __next__(self):
 * 		cdef xmmsv_t *val = NULL             # <<<<<<<<<<<<<<
 * 		cdef XmmsValue v
 * 
 */
  __pyx_v_val = NULL;

  /* "xmmsvalue.pyx":271
 * 		cdef XmmsValue v
 * 
 * 		if not xmmsv_list_iter_valid(self.it):             # <<<<<<<<<<<<<<
 * 			raise StopIteration()
 * 
 */
  __pyx_t_1 = (!xmmsv_list_iter_valid(((struct __pyx_obj_9xmmsvalue_XmmsListIter *)__pyx_v_self)->it));
  if (__pyx_t_1) {

    /* "xmmsvalue.pyx":272
 * 
 * 		if not xmmsv_list_iter_valid(self.it):
 * 			raise StopIteration()             # <<<<<<<<<<<<<<
 * 
 * 		if not xmmsv_list_iter_entry(self.it, &val):
 */
    __pyx_t_2 = PyObject_Call(__pyx_builtin_StopIteration, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 272; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 272; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    goto __pyx_L5;
  }
  __pyx_L5:;

  /* "xmmsvalue.pyx":274
 * 			raise StopIteration()
 * 
 * 		if not xmmsv_list_iter_entry(self.it, &val):             # <<<<<<<<<<<<<<
 * 			raise RuntimeError("Failed to retrieve list entry.")
 * 		v = XmmsValue(self.sourcepref)
 */
  __pyx_t_1 = (!xmmsv_list_iter_entry(((struct __pyx_obj_9xmmsvalue_XmmsListIter *)__pyx_v_self)->it, (&__pyx_v_val)));
  if (__pyx_t_1) {

    /* "xmmsvalue.pyx":275
 * 
 * 		if not xmmsv_list_iter_entry(self.it, &val):
 * 			raise RuntimeError("Failed to retrieve list entry.")             # <<<<<<<<<<<<<<
 * 		v = XmmsValue(self.sourcepref)
 * 		v.set_value(val)
 */
    __pyx_t_2 = PyObject_Call(__pyx_builtin_RuntimeError, ((PyObject *)__pyx_k_tuple_14), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 275; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 275; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    goto __pyx_L6;
  }
  __pyx_L6:;

  /* "xmmsvalue.pyx":276
 * 		if not xmmsv_list_iter_entry(self.it, &val):
 * 			raise RuntimeError("Failed to retrieve list entry.")
 * 		v = XmmsValue(self.sourcepref)             # <<<<<<<<<<<<<<
 * 		v.set_value(val)
 * 
 */
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 276; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  __Pyx_INCREF(((struct __pyx_obj_9xmmsvalue_XmmsListIter *)__pyx_v_self)->sourcepref);
  PyTuple_SET_ITEM(__pyx_t_2, 0, ((struct __pyx_obj_9xmmsvalue_XmmsListIter *)__pyx_v_self)->sourcepref);
  __Pyx_GIVEREF(((struct __pyx_obj_9xmmsvalue_XmmsListIter *)__pyx_v_self)->sourcepref);
  __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_9xmmsvalue_XmmsValue)), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 276; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  __pyx_v_v = ((struct __pyx_obj_9xmmsvalue_XmmsValue *)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "xmmsvalue.pyx":277
 * 			raise RuntimeError("Failed to retrieve list entry.")
 * 		v = XmmsValue(self.sourcepref)
 * 		v.set_value(val)             # <<<<<<<<<<<<<<
 * 
 * 		xmmsv_list_iter_next(self.it)
 */
  __pyx_t_3 = ((struct __pyx_vtabstruct_9xmmsvalue_XmmsValue *)__pyx_v_v->__pyx_vtab)->set_value(__pyx_v_v, __pyx_v_val, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 277; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "xmmsvalue.pyx":279
 * 		v.set_value(val)
 * 
 * 		xmmsv_list_iter_next(self.it)             # <<<<<<<<<<<<<<
 * 		return v
 * 
 */
  xmmsv_list_iter_next(((struct __pyx_obj_9xmmsvalue_XmmsListIter *)__pyx_v_self)->it);

  /* "xmmsvalue.pyx":280
 * 
 * 		xmmsv_list_iter_next(self.it)
 * 		return v             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_v));
  __pyx_r = ((PyObject *)__pyx_v_v);
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("xmmsvalue.XmmsListIter.__next__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_v);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsvalue.pyx":288
 * 	#cdef xmmsv_dict_iter_t *it
 * 
 * 	def __cinit__(self):             # <<<<<<<<<<<<<<
 * 		self.val = NULL
 * 		self.it = NULL
 */

static int __pyx_pf_9xmmsvalue_12XmmsDictIter___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pf_9xmmsvalue_12XmmsDictIter___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__");
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 0))) return -1;

  /* "xmmsvalue.pyx":289
 * 
 * 	def __cinit__(self):
 * 		self.val = NULL             # <<<<<<<<<<<<<<
 * 		self.it = NULL
 * 
 */
  ((struct __pyx_obj_9xmmsvalue_XmmsDictIter *)__pyx_v_self)->val = NULL;

  /* "xmmsvalue.pyx":290
 * 	def __cinit__(self):
 * 		self.val = NULL
 * 		self.it = NULL             # <<<<<<<<<<<<<<
 * 
 * 	def __dealloc__(self):
 */
  ((struct __pyx_obj_9xmmsvalue_XmmsDictIter *)__pyx_v_self)->it = NULL;

  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsvalue.pyx":292
 * 		self.it = NULL
 * 
 * 	def __dealloc__(self):             # <<<<<<<<<<<<<<
 * 		if self.it != NULL:
 * 			xmmsv_dict_iter_explicit_destroy(self.it)
 */

static void __pyx_pf_9xmmsvalue_12XmmsDictIter_1__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pf_9xmmsvalue_12XmmsDictIter_1__dealloc__(PyObject *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("__dealloc__");

  /* "xmmsvalue.pyx":293
 * 
 * 	def __dealloc__(self):
 * 		if self.it != NULL:             # <<<<<<<<<<<<<<
 * 			xmmsv_dict_iter_explicit_destroy(self.it)
 * 		if self.val != NULL:
 */
  __pyx_t_1 = (((struct __pyx_obj_9xmmsvalue_XmmsDictIter *)__pyx_v_self)->it != NULL);
  if (__pyx_t_1) {

    /* "xmmsvalue.pyx":294
 * 	def __dealloc__(self):
 * 		if self.it != NULL:
 * 			xmmsv_dict_iter_explicit_destroy(self.it)             # <<<<<<<<<<<<<<
 * 		if self.val != NULL:
 * 			xmmsv_unref(self.val)
 */
    xmmsv_dict_iter_explicit_destroy(((struct __pyx_obj_9xmmsvalue_XmmsDictIter *)__pyx_v_self)->it);
    goto __pyx_L5;
  }
  __pyx_L5:;

  /* "xmmsvalue.pyx":295
 * 		if self.it != NULL:
 * 			xmmsv_dict_iter_explicit_destroy(self.it)
 * 		if self.val != NULL:             # <<<<<<<<<<<<<<
 * 			xmmsv_unref(self.val)
 * 
 */
  __pyx_t_1 = (((struct __pyx_obj_9xmmsvalue_XmmsDictIter *)__pyx_v_self)->val != NULL);
  if (__pyx_t_1) {

    /* "xmmsvalue.pyx":296
 * 			xmmsv_dict_iter_explicit_destroy(self.it)
 * 		if self.val != NULL:
 * 			xmmsv_unref(self.val)             # <<<<<<<<<<<<<<
 * 
 * 	def __init__(self, XmmsValue value):
 */
    xmmsv_unref(((struct __pyx_obj_9xmmsvalue_XmmsDictIter *)__pyx_v_self)->val);
    goto __pyx_L6;
  }
  __pyx_L6:;

  __Pyx_RefNannyFinishContext();
}

/* "xmmsvalue.pyx":298
 * 			xmmsv_unref(self.val)
 * 
 * 	def __init__(self, XmmsValue value):             # <<<<<<<<<<<<<<
 * 		if value.get_type() != XMMSV_TYPE_DICT:
 * 			raise TypeError("The value is not a dict.")
 */

static int __pyx_pf_9xmmsvalue_12XmmsDictIter_2__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pf_9xmmsvalue_12XmmsDictIter_2__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct __pyx_obj_9xmmsvalue_XmmsValue *__pyx_v_value = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__value,0};
  __Pyx_RefNannySetupContext("__init__");
  {
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__value);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 298; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_value = ((struct __pyx_obj_9xmmsvalue_XmmsValue *)values[0]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 298; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("xmmsvalue.XmmsDictIter.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_value), __pyx_ptype_9xmmsvalue_XmmsValue, 1, "value", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 298; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "xmmsvalue.pyx":299
 * 
 * 	def __init__(self, XmmsValue value):
 * 		if value.get_type() != XMMSV_TYPE_DICT:             # <<<<<<<<<<<<<<
 * 			raise TypeError("The value is not a dict.")
 * 		self.val = xmmsv_ref(value.val)
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_9xmmsvalue_XmmsValue *)__pyx_v_value->__pyx_vtab)->get_type(__pyx_v_value, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 299; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyInt_FromLong(XMMSV_TYPE_DICT); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 299; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_RichCompare(__pyx_t_1, __pyx_t_2, Py_NE); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 299; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 299; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  if (__pyx_t_4) {

    /* "xmmsvalue.pyx":300
 * 	def __init__(self, XmmsValue value):
 * 		if value.get_type() != XMMSV_TYPE_DICT:
 * 			raise TypeError("The value is not a dict.")             # <<<<<<<<<<<<<<
 * 		self.val = xmmsv_ref(value.val)
 * 		if not xmmsv_get_dict_iter(self.val, &self.it):
 */
    __pyx_t_3 = PyObject_Call(__pyx_builtin_TypeError, ((PyObject *)__pyx_k_tuple_16), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 300; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 300; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    goto __pyx_L6;
  }
  __pyx_L6:;

  /* "xmmsvalue.pyx":301
 * 		if value.get_type() != XMMSV_TYPE_DICT:
 * 			raise TypeError("The value is not a dict.")
 * 		self.val = xmmsv_ref(value.val)             # <<<<<<<<<<<<<<
 * 		if not xmmsv_get_dict_iter(self.val, &self.it):
 * 			raise RuntimeError("Failed to initialize the iterator.")
 */
  ((struct __pyx_obj_9xmmsvalue_XmmsDictIter *)__pyx_v_self)->val = xmmsv_ref(__pyx_v_value->val);

  /* "xmmsvalue.pyx":302
 * 			raise TypeError("The value is not a dict.")
 * 		self.val = xmmsv_ref(value.val)
 * 		if not xmmsv_get_dict_iter(self.val, &self.it):             # <<<<<<<<<<<<<<
 * 			raise RuntimeError("Failed to initialize the iterator.")
 * 		self.sourcepref = value.sourcepref
 */
  __pyx_t_4 = (!xmmsv_get_dict_iter(((struct __pyx_obj_9xmmsvalue_XmmsDictIter *)__pyx_v_self)->val, (&((struct __pyx_obj_9xmmsvalue_XmmsDictIter *)__pyx_v_self)->it)));
  if (__pyx_t_4) {

    /* "xmmsvalue.pyx":303
 * 		self.val = xmmsv_ref(value.val)
 * 		if not xmmsv_get_dict_iter(self.val, &self.it):
 * 			raise RuntimeError("Failed to initialize the iterator.")             # <<<<<<<<<<<<<<
 * 		self.sourcepref = value.sourcepref
 * 
 */
    __pyx_t_3 = PyObject_Call(__pyx_builtin_RuntimeError, ((PyObject *)__pyx_k_tuple_17), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 303; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 303; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    goto __pyx_L7;
  }
  __pyx_L7:;

  /* "xmmsvalue.pyx":304
 * 		if not xmmsv_get_dict_iter(self.val, &self.it):
 * 			raise RuntimeError("Failed to initialize the iterator.")
 * 		self.sourcepref = value.sourcepref             # <<<<<<<<<<<<<<
 * 
 * 	def __iter__(self):
 */
  __Pyx_INCREF(__pyx_v_value->sourcepref);
  __Pyx_GIVEREF(__pyx_v_value->sourcepref);
  __Pyx_GOTREF(((struct __pyx_obj_9xmmsvalue_XmmsDictIter *)__pyx_v_self)->sourcepref);
  __Pyx_DECREF(((struct __pyx_obj_9xmmsvalue_XmmsDictIter *)__pyx_v_self)->sourcepref);
  ((struct __pyx_obj_9xmmsvalue_XmmsDictIter *)__pyx_v_self)->sourcepref = __pyx_v_value->sourcepref;

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("xmmsvalue.XmmsDictIter.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsvalue.pyx":306
 * 		self.sourcepref = value.sourcepref
 * 
 * 	def __iter__(self):             # <<<<<<<<<<<<<<
 * 		return self
 * 
 */

static PyObject *__pyx_pf_9xmmsvalue_12XmmsDictIter_3__iter__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pf_9xmmsvalue_12XmmsDictIter_3__iter__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__iter__");

  /* "xmmsvalue.pyx":307
 * 
 * 	def __iter__(self):
 * 		return self             # <<<<<<<<<<<<<<
 * 
 * 	def __next__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self);
  __pyx_r = __pyx_v_self;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsvalue.pyx":309
 * 		return self
 * 
 * 	def __next__(self):             # <<<<<<<<<<<<<<
 * 		cdef char *key = NULL
 * 		cdef xmmsv_t *val = NULL
 */

static PyObject *__pyx_pf_9xmmsvalue_12XmmsDictIter_4__next__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pf_9xmmsvalue_12XmmsDictIter_4__next__(PyObject *__pyx_v_self) {
  char *__pyx_v_key;
  xmmsv_t *__pyx_v_val;
  struct __pyx_obj_9xmmsvalue_XmmsValue *__pyx_v_v = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__next__");

  /* "xmmsvalue.pyx":310
 * 
 * 	def __next__(self):
 * 		cdef char *key = NULL             # <<<<<<<<<<<<<<
 * 		cdef xmmsv_t *val = NULL
 * 		cdef XmmsValue v
 */
  __pyx_v_key = NULL;

  /* "xmmsvalue.pyx":311
 * 	def __next__(self):
 * 		cdef char *key = NULL
 * 		cdef xmmsv_t *val = NULL             # <<<<<<<<<<<<<<
 * 		cdef XmmsValue v
 * 
 */
  __pyx_v_val = NULL;

  /* "xmmsvalue.pyx":314
 * 		cdef XmmsValue v
 * 
 * 		if not xmmsv_dict_iter_valid(self.it):             # <<<<<<<<<<<<<<
 * 			raise StopIteration()
 * 
 */
  __pyx_t_1 = (!xmmsv_dict_iter_valid(((struct __pyx_obj_9xmmsvalue_XmmsDictIter *)__pyx_v_self)->it));
  if (__pyx_t_1) {

    /* "xmmsvalue.pyx":315
 * 
 * 		if not xmmsv_dict_iter_valid(self.it):
 * 			raise StopIteration()             # <<<<<<<<<<<<<<
 * 
 * 		if not xmmsv_dict_iter_pair(self.it, <const_char **>&key, &val):
 */
    __pyx_t_2 = PyObject_Call(__pyx_builtin_StopIteration, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 315; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 315; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    goto __pyx_L5;
  }
  __pyx_L5:;

  /* "xmmsvalue.pyx":317
 * 			raise StopIteration()
 * 
 * 		if not xmmsv_dict_iter_pair(self.it, <const_char **>&key, &val):             # <<<<<<<<<<<<<<
 * 			raise RuntimeError("Failed to retrieve dict item")
 * 		v = XmmsValue(self.sourcepref)
 */
  __pyx_t_1 = (!xmmsv_dict_iter_pair(((struct __pyx_obj_9xmmsvalue_XmmsDictIter *)__pyx_v_self)->it, ((const char **)(&__pyx_v_key)), (&__pyx_v_val)));
  if (__pyx_t_1) {

    /* "xmmsvalue.pyx":318
 * 
 * 		if not xmmsv_dict_iter_pair(self.it, <const_char **>&key, &val):
 * 			raise RuntimeError("Failed to retrieve dict item")             # <<<<<<<<<<<<<<
 * 		v = XmmsValue(self.sourcepref)
 * 		v.set_value(val)
 */
    __pyx_t_2 = PyObject_Call(__pyx_builtin_RuntimeError, ((PyObject *)__pyx_k_tuple_19), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 318; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 318; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    goto __pyx_L6;
  }
  __pyx_L6:;

  /* "xmmsvalue.pyx":319
 * 		if not xmmsv_dict_iter_pair(self.it, <const_char **>&key, &val):
 * 			raise RuntimeError("Failed to retrieve dict item")
 * 		v = XmmsValue(self.sourcepref)             # <<<<<<<<<<<<<<
 * 		v.set_value(val)
 * 
 */
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 319; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  __Pyx_INCREF(((struct __pyx_obj_9xmmsvalue_XmmsDictIter *)__pyx_v_self)->sourcepref);
  PyTuple_SET_ITEM(__pyx_t_2, 0, ((struct __pyx_obj_9xmmsvalue_XmmsDictIter *)__pyx_v_self)->sourcepref);
  __Pyx_GIVEREF(((struct __pyx_obj_9xmmsvalue_XmmsDictIter *)__pyx_v_self)->sourcepref);
  __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_9xmmsvalue_XmmsValue)), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 319; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  __pyx_v_v = ((struct __pyx_obj_9xmmsvalue_XmmsValue *)__pyx_t_3);
  __pyx_t_3 = 0;

  /* "xmmsvalue.pyx":320
 * 			raise RuntimeError("Failed to retrieve dict item")
 * 		v = XmmsValue(self.sourcepref)
 * 		v.set_value(val)             # <<<<<<<<<<<<<<
 * 
 * 		xmmsv_dict_iter_next(self.it)
 */
  __pyx_t_3 = ((struct __pyx_vtabstruct_9xmmsvalue_XmmsValue *)__pyx_v_v->__pyx_vtab)->set_value(__pyx_v_v, __pyx_v_val, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 320; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  /* "xmmsvalue.pyx":322
 * 		v.set_value(val)
 * 
 * 		xmmsv_dict_iter_next(self.it)             # <<<<<<<<<<<<<<
 * 		return (to_unicode(key), v)
 * 
 */
  xmmsv_dict_iter_next(((struct __pyx_obj_9xmmsvalue_XmmsDictIter *)__pyx_v_self)->it);

  /* "xmmsvalue.pyx":323
 * 
 * 		xmmsv_dict_iter_next(self.it)
 * 		return (to_unicode(key), v)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = __pyx_f_9xmmsutils_to_unicode(__pyx_v_key); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 323; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 323; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_3);
  __Pyx_INCREF(((PyObject *)__pyx_v_v));
  PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_v_v));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_v));
  __pyx_t_3 = 0;
  __pyx_r = ((PyObject *)__pyx_t_2);
  __pyx_t_2 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("xmmsvalue.XmmsDictIter.__next__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_v);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsvalue.pyx":327
 * 
 * cdef class CollectionRef:
 * 	def __cinit__(self):             # <<<<<<<<<<<<<<
 * 		self.coll = NULL
 * 
 */

static int __pyx_pf_9xmmsvalue_13CollectionRef___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pf_9xmmsvalue_13CollectionRef___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__");
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 0))) return -1;

  /* "xmmsvalue.pyx":328
 * cdef class CollectionRef:
 * 	def __cinit__(self):
 * 		self.coll = NULL             # <<<<<<<<<<<<<<
 * 
 * 	def __dealloc__(self):
 */
  ((struct __pyx_obj_9xmmsvalue_CollectionRef *)__pyx_v_self)->coll = NULL;

  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsvalue.pyx":330
 * 		self.coll = NULL
 * 
 * 	def __dealloc__(self):             # <<<<<<<<<<<<<<
 * 		if self.coll != NULL:
 * 			xmmsv_coll_unref(self.coll)
 */

static void __pyx_pf_9xmmsvalue_13CollectionRef_1__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pf_9xmmsvalue_13CollectionRef_1__dealloc__(PyObject *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("__dealloc__");

  /* "xmmsvalue.pyx":331
 * 
 * 	def __dealloc__(self):
 * 		if self.coll != NULL:             # <<<<<<<<<<<<<<
 * 			xmmsv_coll_unref(self.coll)
 * 		self.coll = NULL
 */
  __pyx_t_1 = (((struct __pyx_obj_9xmmsvalue_CollectionRef *)__pyx_v_self)->coll != NULL);
  if (__pyx_t_1) {

    /* "xmmsvalue.pyx":332
 * 	def __dealloc__(self):
 * 		if self.coll != NULL:
 * 			xmmsv_coll_unref(self.coll)             # <<<<<<<<<<<<<<
 * 		self.coll = NULL
 * 
 */
    xmmsv_coll_unref(((struct __pyx_obj_9xmmsvalue_CollectionRef *)__pyx_v_self)->coll);
    goto __pyx_L5;
  }
  __pyx_L5:;

  /* "xmmsvalue.pyx":333
 * 		if self.coll != NULL:
 * 			xmmsv_coll_unref(self.coll)
 * 		self.coll = NULL             # <<<<<<<<<<<<<<
 * 
 * 	cdef set_collection(self, xmmsv_coll_t *coll):
 */
  ((struct __pyx_obj_9xmmsvalue_CollectionRef *)__pyx_v_self)->coll = NULL;

  __Pyx_RefNannyFinishContext();
}

/* "xmmsvalue.pyx":335
 * 		self.coll = NULL
 * 
 * 	cdef set_collection(self, xmmsv_coll_t *coll):             # <<<<<<<<<<<<<<
 * 		if self.coll != NULL:
 * 			xmmsv_coll_unref(self.coll)
 */

static PyObject *__pyx_f_9xmmsvalue_13CollectionRef_set_collection(struct __pyx_obj_9xmmsvalue_CollectionRef *__pyx_v_self, xmmsv_coll_t *__pyx_v_coll) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("set_collection");

  /* "xmmsvalue.pyx":336
 * 
 * 	cdef set_collection(self, xmmsv_coll_t *coll):
 * 		if self.coll != NULL:             # <<<<<<<<<<<<<<
 * 			xmmsv_coll_unref(self.coll)
 * 		xmmsv_coll_ref(coll)
 */
  __pyx_t_1 = (__pyx_v_self->coll != NULL);
  if (__pyx_t_1) {

    /* "xmmsvalue.pyx":337
 * 	cdef set_collection(self, xmmsv_coll_t *coll):
 * 		if self.coll != NULL:
 * 			xmmsv_coll_unref(self.coll)             # <<<<<<<<<<<<<<
 * 		xmmsv_coll_ref(coll)
 * 		self.coll = coll
 */
    xmmsv_coll_unref(__pyx_v_self->coll);
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "xmmsvalue.pyx":338
 * 		if self.coll != NULL:
 * 			xmmsv_coll_unref(self.coll)
 * 		xmmsv_coll_ref(coll)             # <<<<<<<<<<<<<<
 * 		self.coll = coll
 * 
 */
  xmmsv_coll_ref(__pyx_v_coll);

  /* "xmmsvalue.pyx":339
 * 			xmmsv_coll_unref(self.coll)
 * 		xmmsv_coll_ref(coll)
 * 		self.coll = coll             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_v_self->coll = __pyx_v_coll;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsvalue.pyx":348
 * 	#cdef object _idlist
 * 
 * 	cdef init_idlist(self):             # <<<<<<<<<<<<<<
 * 		if self._idlist is None and self.coll != NULL and xmmsv_coll_get_type(self.coll) in _idlist_types:
 * 			self._idlist = CollectionIDList(self)
 */

static PyObject *__pyx_f_9xmmsvalue_10Collection_init_idlist(struct __pyx_obj_9xmmsvalue_Collection *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("init_idlist");

  /* "xmmsvalue.pyx":349
 * 
 * 	cdef init_idlist(self):
 * 		if self._idlist is None and self.coll != NULL and xmmsv_coll_get_type(self.coll) in _idlist_types:             # <<<<<<<<<<<<<<
 * 			self._idlist = CollectionIDList(self)
 * 
 */
  __pyx_t_1 = (__pyx_v_self->_idlist == Py_None);
  if (__pyx_t_1) {
    __pyx_t_2 = (__pyx_v_self->__pyx_base.coll != NULL);
    if (__pyx_t_2) {
      __pyx_t_3 = PyInt_FromLong(xmmsv_coll_get_type(__pyx_v_self->__pyx_base.coll)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 349; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = ((PySequence_Contains(__pyx_v_9xmmsvalue__idlist_types, __pyx_t_3))); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 349; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_5 = __pyx_t_4;
    } else {
      __pyx_t_5 = __pyx_t_2;
    }
    __pyx_t_2 = __pyx_t_5;
  } else {
    __pyx_t_2 = __pyx_t_1;
  }
  if (__pyx_t_2) {

    /* "xmmsvalue.pyx":350
 * 	cdef init_idlist(self):
 * 		if self._idlist is None and self.coll != NULL and xmmsv_coll_get_type(self.coll) in _idlist_types:
 * 			self._idlist = CollectionIDList(self)             # <<<<<<<<<<<<<<
 * 
 * 	cdef init_attributes(self):
 */
    __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 350; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_3));
    __Pyx_INCREF(((PyObject *)__pyx_v_self));
    PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_self));
    __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
    __pyx_t_6 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_9xmmsvalue_CollectionIDList)), ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 350; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
    __Pyx_GIVEREF(__pyx_t_6);
    __Pyx_GOTREF(__pyx_v_self->_idlist);
    __Pyx_DECREF(__pyx_v_self->_idlist);
    __pyx_v_self->_idlist = __pyx_t_6;
    __pyx_t_6 = 0;
    goto __pyx_L3;
  }
  __pyx_L3:;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("xmmsvalue.Collection.init_idlist", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsvalue.pyx":352
 * 			self._idlist = CollectionIDList(self)
 * 
 * 	cdef init_attributes(self):             # <<<<<<<<<<<<<<
 * 		if self._attributes is None and self.coll != NULL:
 * 			self._attributes = CollectionAttributes(self)
 */

static PyObject *__pyx_f_9xmmsvalue_10Collection_init_attributes(struct __pyx_obj_9xmmsvalue_Collection *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("init_attributes");

  /* "xmmsvalue.pyx":353
 * 
 * 	cdef init_attributes(self):
 * 		if self._attributes is None and self.coll != NULL:             # <<<<<<<<<<<<<<
 * 			self._attributes = CollectionAttributes(self)
 * 
 */
  __pyx_t_1 = (__pyx_v_self->_attributes == Py_None);
  if (__pyx_t_1) {
    __pyx_t_2 = (__pyx_v_self->__pyx_base.coll != NULL);
    __pyx_t_3 = __pyx_t_2;
  } else {
    __pyx_t_3 = __pyx_t_1;
  }
  if (__pyx_t_3) {

    /* "xmmsvalue.pyx":354
 * 	cdef init_attributes(self):
 * 		if self._attributes is None and self.coll != NULL:
 * 			self._attributes = CollectionAttributes(self)             # <<<<<<<<<<<<<<
 * 
 * 	cdef init_operands(self):
 */
    __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 354; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_4));
    __Pyx_INCREF(((PyObject *)__pyx_v_self));
    PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_v_self));
    __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
    __pyx_t_5 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_9xmmsvalue_CollectionAttributes)), ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 354; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
    __Pyx_GIVEREF(__pyx_t_5);
    __Pyx_GOTREF(__pyx_v_self->_attributes);
    __Pyx_DECREF(__pyx_v_self->_attributes);
    __pyx_v_self->_attributes = __pyx_t_5;
    __pyx_t_5 = 0;
    goto __pyx_L3;
  }
  __pyx_L3:;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("xmmsvalue.Collection.init_attributes", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsvalue.pyx":356
 * 			self._attributes = CollectionAttributes(self)
 * 
 * 	cdef init_operands(self):             # <<<<<<<<<<<<<<
 * 		if self._operands is None and self.coll != NULL:
 * 			self._operands = CollectionOperands(self)
 */

static PyObject *__pyx_f_9xmmsvalue_10Collection_init_operands(struct __pyx_obj_9xmmsvalue_Collection *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("init_operands");

  /* "xmmsvalue.pyx":357
 * 
 * 	cdef init_operands(self):
 * 		if self._operands is None and self.coll != NULL:             # <<<<<<<<<<<<<<
 * 			self._operands = CollectionOperands(self)
 * 
 */
  __pyx_t_1 = (__pyx_v_self->_operands == Py_None);
  if (__pyx_t_1) {
    __pyx_t_2 = (__pyx_v_self->__pyx_base.coll != NULL);
    __pyx_t_3 = __pyx_t_2;
  } else {
    __pyx_t_3 = __pyx_t_1;
  }
  if (__pyx_t_3) {

    /* "xmmsvalue.pyx":358
 * 	cdef init_operands(self):
 * 		if self._operands is None and self.coll != NULL:
 * 			self._operands = CollectionOperands(self)             # <<<<<<<<<<<<<<
 * 
 * 	# Define read-only properties so that thoses appear in dir().
 */
    __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 358; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_4));
    __Pyx_INCREF(((PyObject *)__pyx_v_self));
    PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_v_self));
    __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
    __pyx_t_5 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_9xmmsvalue_CollectionOperands)), ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 358; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
    __Pyx_GIVEREF(__pyx_t_5);
    __Pyx_GOTREF(__pyx_v_self->_operands);
    __Pyx_DECREF(__pyx_v_self->_operands);
    __pyx_v_self->_operands = __pyx_t_5;
    __pyx_t_5 = 0;
    goto __pyx_L3;
  }
  __pyx_L3:;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("xmmsvalue.Collection.init_operands", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsvalue.pyx":362
 * 	# Define read-only properties so that thoses appear in dir().
 * 	property attributes:
 * 		def __get__(self):             # <<<<<<<<<<<<<<
 * 			self.init_attributes()
 * 			return self._attributes
 */

static PyObject *__pyx_pf_9xmmsvalue_10Collection_10attributes___get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pf_9xmmsvalue_10Collection_10attributes___get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__");

  /* "xmmsvalue.pyx":363
 * 	property attributes:
 * 		def __get__(self):
 * 			self.init_attributes()             # <<<<<<<<<<<<<<
 * 			return self._attributes
 * 		def __set__(self, attrs):
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_9xmmsvalue_Collection *)((struct __pyx_obj_9xmmsvalue_Collection *)__pyx_v_self)->__pyx_base.__pyx_vtab)->init_attributes(((struct __pyx_obj_9xmmsvalue_Collection *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 363; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "xmmsvalue.pyx":364
 * 		def __get__(self):
 * 			self.init_attributes()
 * 			return self._attributes             # <<<<<<<<<<<<<<
 * 		def __set__(self, attrs):
 * 			self.init_attributes()
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((struct __pyx_obj_9xmmsvalue_Collection *)__pyx_v_self)->_attributes);
  __pyx_r = ((struct __pyx_obj_9xmmsvalue_Collection *)__pyx_v_self)->_attributes;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("xmmsvalue.Collection.attributes.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsvalue.pyx":365
 * 			self.init_attributes()
 * 			return self._attributes
 * 		def __set__(self, attrs):             # <<<<<<<<<<<<<<
 * 			self.init_attributes()
 * 			if self._attributes is attrs:
 */

static int __pyx_pf_9xmmsvalue_10Collection_10attributes_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_attrs); /*proto*/
static int __pyx_pf_9xmmsvalue_10Collection_10attributes_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_attrs) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__");

  /* "xmmsvalue.pyx":366
 * 			return self._attributes
 * 		def __set__(self, attrs):
 * 			self.init_attributes()             # <<<<<<<<<<<<<<
 * 			if self._attributes is attrs:
 * 				pass
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_9xmmsvalue_Collection *)((struct __pyx_obj_9xmmsvalue_Collection *)__pyx_v_self)->__pyx_base.__pyx_vtab)->init_attributes(((struct __pyx_obj_9xmmsvalue_Collection *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 366; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "xmmsvalue.pyx":367
 * 		def __set__(self, attrs):
 * 			self.init_attributes()
 * 			if self._attributes is attrs:             # <<<<<<<<<<<<<<
 * 				pass
 * 			else:
 */
  __pyx_t_2 = (((struct __pyx_obj_9xmmsvalue_Collection *)__pyx_v_self)->_attributes == __pyx_v_attrs);
  if (__pyx_t_2) {
    goto __pyx_L5;
  }
  /*else*/ {

    /* "xmmsvalue.pyx":370
 * 				pass
 * 			else:
 * 				self._attributes.clear()             # <<<<<<<<<<<<<<
 * 				self._attributes.update(attrs)
 * 	property operands:
 */
    __pyx_t_1 = PyObject_GetAttr(((struct __pyx_obj_9xmmsvalue_Collection *)__pyx_v_self)->_attributes, __pyx_n_s__clear); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 370; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __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 = 370; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "xmmsvalue.pyx":371
 * 			else:
 * 				self._attributes.clear()
 * 				self._attributes.update(attrs)             # <<<<<<<<<<<<<<
 * 	property operands:
 * 		def __get__(self):
 */
    __pyx_t_3 = PyObject_GetAttr(((struct __pyx_obj_9xmmsvalue_Collection *)__pyx_v_self)->_attributes, __pyx_n_s__update); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 371; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 371; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_1));
    __Pyx_INCREF(__pyx_v_attrs);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_attrs);
    __Pyx_GIVEREF(__pyx_v_attrs);
    __pyx_t_4 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 371; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __pyx_L5:;

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("xmmsvalue.Collection.attributes.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsvalue.pyx":373
 * 				self._attributes.update(attrs)
 * 	property operands:
 * 		def __get__(self):             # <<<<<<<<<<<<<<
 * 			self.init_operands()
 * 			return self._operands
 */

static PyObject *__pyx_pf_9xmmsvalue_10Collection_8operands___get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pf_9xmmsvalue_10Collection_8operands___get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__");

  /* "xmmsvalue.pyx":374
 * 	property operands:
 * 		def __get__(self):
 * 			self.init_operands()             # <<<<<<<<<<<<<<
 * 			return self._operands
 * 		def __set__(self, ops):
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_9xmmsvalue_Collection *)((struct __pyx_obj_9xmmsvalue_Collection *)__pyx_v_self)->__pyx_base.__pyx_vtab)->init_operands(((struct __pyx_obj_9xmmsvalue_Collection *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 374; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "xmmsvalue.pyx":375
 * 		def __get__(self):
 * 			self.init_operands()
 * 			return self._operands             # <<<<<<<<<<<<<<
 * 		def __set__(self, ops):
 * 			self.init_operands()
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((struct __pyx_obj_9xmmsvalue_Collection *)__pyx_v_self)->_operands);
  __pyx_r = ((struct __pyx_obj_9xmmsvalue_Collection *)__pyx_v_self)->_operands;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("xmmsvalue.Collection.operands.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsvalue.pyx":376
 * 			self.init_operands()
 * 			return self._operands
 * 		def __set__(self, ops):             # <<<<<<<<<<<<<<
 * 			self.init_operands()
 * 			if self._operands is ops:
 */

static int __pyx_pf_9xmmsvalue_10Collection_8operands_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_ops); /*proto*/
static int __pyx_pf_9xmmsvalue_10Collection_8operands_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_ops) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__");

  /* "xmmsvalue.pyx":377
 * 			return self._operands
 * 		def __set__(self, ops):
 * 			self.init_operands()             # <<<<<<<<<<<<<<
 * 			if self._operands is ops:
 * 				pass
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_9xmmsvalue_Collection *)((struct __pyx_obj_9xmmsvalue_Collection *)__pyx_v_self)->__pyx_base.__pyx_vtab)->init_operands(((struct __pyx_obj_9xmmsvalue_Collection *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 377; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "xmmsvalue.pyx":378
 * 		def __set__(self, ops):
 * 			self.init_operands()
 * 			if self._operands is ops:             # <<<<<<<<<<<<<<
 * 				pass
 * 			else:
 */
  __pyx_t_2 = (((struct __pyx_obj_9xmmsvalue_Collection *)__pyx_v_self)->_operands == __pyx_v_ops);
  if (__pyx_t_2) {
    goto __pyx_L5;
  }
  /*else*/ {

    /* "xmmsvalue.pyx":381
 * 				pass
 * 			else:
 * 				self._operands.clear()             # <<<<<<<<<<<<<<
 * 				self._operands.extend(ops)
 * 	property ids:
 */
    __pyx_t_1 = PyObject_GetAttr(((struct __pyx_obj_9xmmsvalue_Collection *)__pyx_v_self)->_operands, __pyx_n_s__clear); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 381; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __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 = 381; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "xmmsvalue.pyx":382
 * 			else:
 * 				self._operands.clear()
 * 				self._operands.extend(ops)             # <<<<<<<<<<<<<<
 * 	property ids:
 * 		def __get__(self):
 */
    __pyx_t_3 = PyObject_GetAttr(((struct __pyx_obj_9xmmsvalue_Collection *)__pyx_v_self)->_operands, __pyx_n_s__extend); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 382; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 382; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_1));
    __Pyx_INCREF(__pyx_v_ops);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_ops);
    __Pyx_GIVEREF(__pyx_v_ops);
    __pyx_t_4 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 382; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __pyx_L5:;

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("xmmsvalue.Collection.operands.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsvalue.pyx":384
 * 				self._operands.extend(ops)
 * 	property ids:
 * 		def __get__(self):             # <<<<<<<<<<<<<<
 * 			self.init_idlist()
 * 			return self._idlist
 */

static PyObject *__pyx_pf_9xmmsvalue_10Collection_3ids___get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pf_9xmmsvalue_10Collection_3ids___get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__get__");

  /* "xmmsvalue.pyx":385
 * 	property ids:
 * 		def __get__(self):
 * 			self.init_idlist()             # <<<<<<<<<<<<<<
 * 			return self._idlist
 * 		def __set__(self, ids):
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_9xmmsvalue_Collection *)((struct __pyx_obj_9xmmsvalue_Collection *)__pyx_v_self)->__pyx_base.__pyx_vtab)->init_idlist(((struct __pyx_obj_9xmmsvalue_Collection *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 385; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "xmmsvalue.pyx":386
 * 		def __get__(self):
 * 			self.init_idlist()
 * 			return self._idlist             # <<<<<<<<<<<<<<
 * 		def __set__(self, ids):
 * 			self.init_idlist()
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((struct __pyx_obj_9xmmsvalue_Collection *)__pyx_v_self)->_idlist);
  __pyx_r = ((struct __pyx_obj_9xmmsvalue_Collection *)__pyx_v_self)->_idlist;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("xmmsvalue.Collection.ids.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsvalue.pyx":387
 * 			self.init_idlist()
 * 			return self._idlist
 * 		def __set__(self, ids):             # <<<<<<<<<<<<<<
 * 			self.init_idlist()
 * 			if self._idlist is None:
 */

static int __pyx_pf_9xmmsvalue_10Collection_3ids_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_ids); /*proto*/
static int __pyx_pf_9xmmsvalue_10Collection_3ids_1__set__(PyObject *__pyx_v_self, PyObject *__pyx_v_ids) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__set__");

  /* "xmmsvalue.pyx":388
 * 			return self._idlist
 * 		def __set__(self, ids):
 * 			self.init_idlist()             # <<<<<<<<<<<<<<
 * 			if self._idlist is None:
 * 				raise TypeError("Can't set idlist for this type of collection")
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_9xmmsvalue_Collection *)((struct __pyx_obj_9xmmsvalue_Collection *)__pyx_v_self)->__pyx_base.__pyx_vtab)->init_idlist(((struct __pyx_obj_9xmmsvalue_Collection *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 388; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "xmmsvalue.pyx":389
 * 		def __set__(self, ids):
 * 			self.init_idlist()
 * 			if self._idlist is None:             # <<<<<<<<<<<<<<
 * 				raise TypeError("Can't set idlist for this type of collection")
 * 			elif self._idlist is ids:
 */
  __pyx_t_2 = (((struct __pyx_obj_9xmmsvalue_Collection *)__pyx_v_self)->_idlist == Py_None);
  if (__pyx_t_2) {

    /* "xmmsvalue.pyx":390
 * 			self.init_idlist()
 * 			if self._idlist is None:
 * 				raise TypeError("Can't set idlist for this type of collection")             # <<<<<<<<<<<<<<
 * 			elif self._idlist is ids:
 * 				pass
 */
    __pyx_t_1 = PyObject_Call(__pyx_builtin_TypeError, ((PyObject *)__pyx_k_tuple_21), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 390; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 390; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    goto __pyx_L5;
  }

  /* "xmmsvalue.pyx":391
 * 			if self._idlist is None:
 * 				raise TypeError("Can't set idlist for this type of collection")
 * 			elif self._idlist is ids:             # <<<<<<<<<<<<<<
 * 				pass
 * 			else:
 */
  __pyx_t_2 = (((struct __pyx_obj_9xmmsvalue_Collection *)__pyx_v_self)->_idlist == __pyx_v_ids);
  if (__pyx_t_2) {
    goto __pyx_L5;
  }
  /*else*/ {

    /* "xmmsvalue.pyx":394
 * 				pass
 * 			else:
 * 				self._idlist.clear()             # <<<<<<<<<<<<<<
 * 				self._idlist.extend(ids)
 * 
 */
    __pyx_t_1 = PyObject_GetAttr(((struct __pyx_obj_9xmmsvalue_Collection *)__pyx_v_self)->_idlist, __pyx_n_s__clear); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 394; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __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 = 394; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "xmmsvalue.pyx":395
 * 			else:
 * 				self._idlist.clear()
 * 				self._idlist.extend(ids)             # <<<<<<<<<<<<<<
 * 
 * 	def __repr__(self):
 */
    __pyx_t_3 = PyObject_GetAttr(((struct __pyx_obj_9xmmsvalue_Collection *)__pyx_v_self)->_idlist, __pyx_n_s__extend); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 395; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 395; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_1));
    __Pyx_INCREF(__pyx_v_ids);
    PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_ids);
    __Pyx_GIVEREF(__pyx_v_ids);
    __pyx_t_4 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 395; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  }
  __pyx_L5:;

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("xmmsvalue.Collection.ids.__set__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsvalue.pyx":397
 * 				self._idlist.extend(ids)
 * 
 * 	def __repr__(self):             # <<<<<<<<<<<<<<
 * 		atr = []
 * 		if self.ids is not None:
 */

static PyObject *__pyx_pf_9xmmsvalue_10Collection___repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pf_9xmmsvalue_10Collection___repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_v_atr = NULL;
  PyObject *__pyx_v_k = NULL;
  PyObject *__pyx_v_v = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  Py_ssize_t __pyx_t_5;
  PyObject *(*__pyx_t_6)(PyObject *);
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *(*__pyx_t_10)(PyObject *);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__");

  /* "xmmsvalue.pyx":398
 * 
 * 	def __repr__(self):
 * 		atr = []             # <<<<<<<<<<<<<<
 * 		if self.ids is not None:
 * 			atr.append(repr(self.ids))
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 398; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  __pyx_v_atr = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "xmmsvalue.pyx":399
 * 	def __repr__(self):
 * 		atr = []
 * 		if self.ids is not None:             # <<<<<<<<<<<<<<
 * 			atr.append(repr(self.ids))
 * 		for k,v in self.attributes.iteritems():
 */
  __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__ids); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 399; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = (__pyx_t_1 != Py_None);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "xmmsvalue.pyx":400
 * 		atr = []
 * 		if self.ids is not None:
 * 			atr.append(repr(self.ids))             # <<<<<<<<<<<<<<
 * 		for k,v in self.attributes.iteritems():
 * 			atr.append("%s=%s" % (k, repr(v)))
 */
    if (unlikely(((PyObject *)__pyx_v_atr) == Py_None)) {
      PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "append"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 400; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
    }
    __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__ids); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 400; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = PyObject_Repr(__pyx_t_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 400; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_4 = PyList_Append(__pyx_v_atr, __pyx_t_3); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 400; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    goto __pyx_L5;
  }
  __pyx_L5:;

  /* "xmmsvalue.pyx":401
 * 		if self.ids is not None:
 * 			atr.append(repr(self.ids))
 * 		for k,v in self.attributes.iteritems():             # <<<<<<<<<<<<<<
 * 			atr.append("%s=%s" % (k, repr(v)))
 * 		return "%s(%s)" % (self.__class__.__name__, ", ".join(atr))
 */
  __pyx_t_3 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__attributes); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 401; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__iteritems); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 401; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __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 = 401; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (PyList_CheckExact(__pyx_t_3) || PyTuple_CheckExact(__pyx_t_3)) {
    __pyx_t_1 = __pyx_t_3; __Pyx_INCREF(__pyx_t_1); __pyx_t_5 = 0;
    __pyx_t_6 = NULL;
  } else {
    __pyx_t_5 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 401; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_6 = Py_TYPE(__pyx_t_1)->tp_iternext;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  for (;;) {
    if (PyList_CheckExact(__pyx_t_1)) {
      if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_1)) break;
      __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++;
    } else if (PyTuple_CheckExact(__pyx_t_1)) {
      if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
      __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_5); __Pyx_INCREF(__pyx_t_3); __pyx_t_5++;
    } else {
      __pyx_t_3 = __pyx_t_6(__pyx_t_1);
      if (unlikely(!__pyx_t_3)) {
        if (PyErr_Occurred()) {
          if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 401; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_3);
    }
    if ((likely(PyTuple_CheckExact(__pyx_t_3))) || (PyList_CheckExact(__pyx_t_3))) {
      PyObject* sequence = __pyx_t_3;
      if (likely(PyTuple_CheckExact(sequence))) {
        if (unlikely(PyTuple_GET_SIZE(sequence) != 2)) {
          if (PyTuple_GET_SIZE(sequence) > 2) __Pyx_RaiseTooManyValuesError(2);
          else __Pyx_RaiseNeedMoreValuesError(PyTuple_GET_SIZE(sequence));
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 401; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        __pyx_t_7 = PyTuple_GET_ITEM(sequence, 0); 
        __pyx_t_8 = PyTuple_GET_ITEM(sequence, 1); 
      } else {
        if (unlikely(PyList_GET_SIZE(sequence) != 2)) {
          if (PyList_GET_SIZE(sequence) > 2) __Pyx_RaiseTooManyValuesError(2);
          else __Pyx_RaiseNeedMoreValuesError(PyList_GET_SIZE(sequence));
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 401; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        __pyx_t_7 = PyList_GET_ITEM(sequence, 0); 
        __pyx_t_8 = PyList_GET_ITEM(sequence, 1); 
      }
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    } else {
      Py_ssize_t index = -1;
      __pyx_t_9 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 401; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __pyx_t_10 = Py_TYPE(__pyx_t_9)->tp_iternext;
      index = 0; __pyx_t_7 = __pyx_t_10(__pyx_t_9); if (unlikely(!__pyx_t_7)) goto __pyx_L8_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_7);
      index = 1; __pyx_t_8 = __pyx_t_10(__pyx_t_9); if (unlikely(!__pyx_t_8)) goto __pyx_L8_unpacking_failed;
      __Pyx_GOTREF(__pyx_t_8);
      if (__Pyx_IternextUnpackEndCheck(__pyx_t_10(__pyx_t_9), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 401; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      goto __pyx_L9_unpacking_done;
      __pyx_L8_unpacking_failed:;
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      if (PyErr_Occurred() && PyErr_ExceptionMatches(PyExc_StopIteration)) PyErr_Clear();
      if (!PyErr_Occurred()) __Pyx_RaiseNeedMoreValuesError(index);
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 401; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_L9_unpacking_done:;
    }
    __Pyx_XDECREF(__pyx_v_k);
    __pyx_v_k = __pyx_t_7;
    __pyx_t_7 = 0;
    __Pyx_XDECREF(__pyx_v_v);
    __pyx_v_v = __pyx_t_8;
    __pyx_t_8 = 0;

    /* "xmmsvalue.pyx":402
 * 			atr.append(repr(self.ids))
 * 		for k,v in self.attributes.iteritems():
 * 			atr.append("%s=%s" % (k, repr(v)))             # <<<<<<<<<<<<<<
 * 		return "%s(%s)" % (self.__class__.__name__, ", ".join(atr))
 * 
 */
    if (unlikely(((PyObject *)__pyx_v_atr) == Py_None)) {
      PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "append"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 402; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
    }
    __pyx_t_3 = PyObject_Repr(__pyx_v_v); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 402; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 402; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_8));
    __Pyx_INCREF(__pyx_v_k);
    PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_k);
    __Pyx_GIVEREF(__pyx_v_k);
    PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_3);
    __pyx_t_3 = 0;
    __pyx_t_3 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_22), ((PyObject *)__pyx_t_8)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 402; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_3));
    __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
    __pyx_t_4 = PyList_Append(__pyx_v_atr, ((PyObject *)__pyx_t_3)); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 402; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "xmmsvalue.pyx":403
 * 		for k,v in self.attributes.iteritems():
 * 			atr.append("%s=%s" % (k, repr(v)))
 * 		return "%s(%s)" % (self.__class__.__name__, ", ".join(atr))             # <<<<<<<<<<<<<<
 * 
 * 	def __or__(self, other): # |
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s____class__); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 403; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s____name__); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 403; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_kp_s_24), __pyx_n_s__join); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 403; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 403; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_8));
  __Pyx_INCREF(((PyObject *)__pyx_v_atr));
  PyTuple_SET_ITEM(__pyx_t_8, 0, ((PyObject *)__pyx_v_atr));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_atr));
  __pyx_t_7 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_8), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 403; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
  __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 403; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_8));
  PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_3);
  PyTuple_SET_ITEM(__pyx_t_8, 1, __pyx_t_7);
  __Pyx_GIVEREF(__pyx_t_7);
  __pyx_t_3 = 0;
  __pyx_t_7 = 0;
  __pyx_t_7 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_23), ((PyObject *)__pyx_t_8)); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 403; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_7));
  __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0;
  __pyx_r = ((PyObject *)__pyx_t_7);
  __pyx_t_7 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("xmmsvalue.Collection.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_atr);
  __Pyx_XDECREF(__pyx_v_k);
  __Pyx_XDECREF(__pyx_v_v);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsvalue.pyx":405
 * 		return "%s(%s)" % (self.__class__.__name__, ", ".join(atr))
 * 
 * 	def __or__(self, other): # |             # <<<<<<<<<<<<<<
 * 		if not (isinstance(self, Collection) and isinstance(self, Collection)):
 * 			raise NotImplemented()
 */

static PyObject *__pyx_pf_9xmmsvalue_10Collection_1__or__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
static PyObject *__pyx_pf_9xmmsvalue_10Collection_1__or__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__or__");

  /* "xmmsvalue.pyx":406
 * 
 * 	def __or__(self, other): # |
 * 		if not (isinstance(self, Collection) and isinstance(self, Collection)):             # <<<<<<<<<<<<<<
 * 			raise NotImplemented()
 * 		# TODO: merge union (e.g. a|b|c -> Union(a, b, c)
 */
  __pyx_t_1 = ((PyObject *)((PyObject*)__pyx_ptype_9xmmsvalue_Collection));
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_self, __pyx_t_1); 
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {
    __pyx_t_1 = ((PyObject *)((PyObject*)__pyx_ptype_9xmmsvalue_Collection));
    __Pyx_INCREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_TypeCheck(__pyx_v_self, __pyx_t_1); 
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_4 = __pyx_t_3;
  } else {
    __pyx_t_4 = __pyx_t_2;
  }
  __pyx_t_2 = (!__pyx_t_4);
  if (__pyx_t_2) {

    /* "xmmsvalue.pyx":407
 * 	def __or__(self, other): # |
 * 		if not (isinstance(self, Collection) and isinstance(self, Collection)):
 * 			raise NotImplemented()             # <<<<<<<<<<<<<<
 * 		# TODO: merge union (e.g. a|b|c -> Union(a, b, c)
 * 		return Union(self, other)
 */
    __pyx_t_1 = PyObject_Call(__pyx_builtin_NotImplemented, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 407; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 407; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    goto __pyx_L5;
  }
  __pyx_L5:;

  /* "xmmsvalue.pyx":409
 * 			raise NotImplemented()
 * 		# TODO: merge union (e.g. a|b|c -> Union(a, b, c)
 * 		return Union(self, other)             # <<<<<<<<<<<<<<
 * 
 * 	def __and__(self, other): # &
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__Union); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 409; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __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;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_5));
  __Pyx_INCREF(__pyx_v_self);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_self);
  __Pyx_GIVEREF(__pyx_v_self);
  __Pyx_INCREF(__pyx_v_other);
  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_other);
  __Pyx_GIVEREF(__pyx_v_other);
  __pyx_t_6 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 409; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
  __pyx_r = __pyx_t_6;
  __pyx_t_6 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("xmmsvalue.Collection.__or__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsvalue.pyx":411
 * 		return Union(self, other)
 * 
 * 	def __and__(self, other): # &             # <<<<<<<<<<<<<<
 * 		if not (isinstance(self, Collection) and isinstance(self, Collection)):
 * 			raise NotImplemented()
 */

static PyObject *__pyx_pf_9xmmsvalue_10Collection_2__and__(PyObject *__pyx_v_self, PyObject *__pyx_v_other); /*proto*/
static PyObject *__pyx_pf_9xmmsvalue_10Collection_2__and__(PyObject *__pyx_v_self, PyObject *__pyx_v_other) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__and__");

  /* "xmmsvalue.pyx":412
 * 
 * 	def __and__(self, other): # &
 * 		if not (isinstance(self, Collection) and isinstance(self, Collection)):             # <<<<<<<<<<<<<<
 * 			raise NotImplemented()
 * 		# TODO: merge intersection (e.g. a&b&c -> Intersection(a, b, c)
 */
  __pyx_t_1 = ((PyObject *)((PyObject*)__pyx_ptype_9xmmsvalue_Collection));
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_self, __pyx_t_1); 
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {
    __pyx_t_1 = ((PyObject *)((PyObject*)__pyx_ptype_9xmmsvalue_Collection));
    __Pyx_INCREF(__pyx_t_1);
    __pyx_t_3 = __Pyx_TypeCheck(__pyx_v_self, __pyx_t_1); 
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_4 = __pyx_t_3;
  } else {
    __pyx_t_4 = __pyx_t_2;
  }
  __pyx_t_2 = (!__pyx_t_4);
  if (__pyx_t_2) {

    /* "xmmsvalue.pyx":413
 * 	def __and__(self, other): # &
 * 		if not (isinstance(self, Collection) and isinstance(self, Collection)):
 * 			raise NotImplemented()             # <<<<<<<<<<<<<<
 * 		# TODO: merge intersection (e.g. a&b&c -> Intersection(a, b, c)
 * 		return Intersection(self, other)
 */
    __pyx_t_1 = PyObject_Call(__pyx_builtin_NotImplemented, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 413; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 413; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    goto __pyx_L5;
  }
  __pyx_L5:;

  /* "xmmsvalue.pyx":415
 * 			raise NotImplemented()
 * 		# TODO: merge intersection (e.g. a&b&c -> Intersection(a, b, c)
 * 		return Intersection(self, other)             # <<<<<<<<<<<<<<
 * 
 * 	def __invert__(self): #~
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__Intersection); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 415; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 415; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_5));
  __Pyx_INCREF(__pyx_v_self);
  PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_self);
  __Pyx_GIVEREF(__pyx_v_self);
  __Pyx_INCREF(__pyx_v_other);
  PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_v_other);
  __Pyx_GIVEREF(__pyx_v_other);
  __pyx_t_6 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 415; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
  __pyx_r = __pyx_t_6;
  __pyx_t_6 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("xmmsvalue.Collection.__and__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsvalue.pyx":417
 * 		return Intersection(self, other)
 * 
 * 	def __invert__(self): #~             # <<<<<<<<<<<<<<
 * 		if not isinstance(self, Collection):
 * 			return NotImplemented()
 */

static PyObject *__pyx_pf_9xmmsvalue_10Collection_3__invert__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pf_9xmmsvalue_10Collection_3__invert__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__invert__");

  /* "xmmsvalue.pyx":418
 * 
 * 	def __invert__(self): #~
 * 		if not isinstance(self, Collection):             # <<<<<<<<<<<<<<
 * 			return NotImplemented()
 * 		# TODO: Unpack redundant complement (e.g. ~~a is a)
 */
  __pyx_t_1 = ((PyObject *)((PyObject*)__pyx_ptype_9xmmsvalue_Collection));
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_self, __pyx_t_1); 
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_3 = (!__pyx_t_2);
  if (__pyx_t_3) {

    /* "xmmsvalue.pyx":419
 * 	def __invert__(self): #~
 * 		if not isinstance(self, Collection):
 * 			return NotImplemented()             # <<<<<<<<<<<<<<
 * 		# TODO: Unpack redundant complement (e.g. ~~a is a)
 * 		return Complement(self)
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = PyObject_Call(__pyx_builtin_NotImplemented, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 419; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;
    goto __pyx_L5;
  }
  __pyx_L5:;

  /* "xmmsvalue.pyx":421
 * 			return NotImplemented()
 * 		# TODO: Unpack redundant complement (e.g. ~~a is a)
 * 		return Complement(self)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__Complement); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 421; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 421; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_4));
  __Pyx_INCREF(__pyx_v_self);
  PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_self);
  __Pyx_GIVEREF(__pyx_v_self);
  __pyx_t_5 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 421; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  __pyx_r = __pyx_t_5;
  __pyx_t_5 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("xmmsvalue.Collection.__invert__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsvalue.pyx":429
 * 	#cdef CollectionAttributes attr
 * 
 * 	def __cinit__(self):             # <<<<<<<<<<<<<<
 * 		self.diter = NULL
 * 		self.itertype = 0
 */

static int __pyx_pf_9xmmsvalue_18AttributesIterator___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pf_9xmmsvalue_18AttributesIterator___cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__");
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("__cinit__", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return -1;}
  if (unlikely(__pyx_kwds) && unlikely(PyDict_Size(__pyx_kwds) > 0) && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "__cinit__", 0))) return -1;

  /* "xmmsvalue.pyx":430
 * 
 * 	def __cinit__(self):
 * 		self.diter = NULL             # <<<<<<<<<<<<<<
 * 		self.itertype = 0
 * 
 */
  ((struct __pyx_obj_9xmmsvalue_AttributesIterator *)__pyx_v_self)->diter = NULL;

  /* "xmmsvalue.pyx":431
 * 	def __cinit__(self):
 * 		self.diter = NULL
 * 		self.itertype = 0             # <<<<<<<<<<<<<<
 * 
 * 	def __dealloc__(self):
 */
  ((struct __pyx_obj_9xmmsvalue_AttributesIterator *)__pyx_v_self)->itertype = 0;

  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsvalue.pyx":433
 * 		self.itertype = 0
 * 
 * 	def __dealloc__(self):             # <<<<<<<<<<<<<<
 * 		if self.diter != NULL:
 * 			xmmsv_dict_iter_explicit_destroy(self.diter)
 */

static void __pyx_pf_9xmmsvalue_18AttributesIterator_1__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pf_9xmmsvalue_18AttributesIterator_1__dealloc__(PyObject *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  __Pyx_RefNannySetupContext("__dealloc__");

  /* "xmmsvalue.pyx":434
 * 
 * 	def __dealloc__(self):
 * 		if self.diter != NULL:             # <<<<<<<<<<<<<<
 * 			xmmsv_dict_iter_explicit_destroy(self.diter)
 * 
 */
  __pyx_t_1 = (((struct __pyx_obj_9xmmsvalue_AttributesIterator *)__pyx_v_self)->diter != NULL);
  if (__pyx_t_1) {

    /* "xmmsvalue.pyx":435
 * 	def __dealloc__(self):
 * 		if self.diter != NULL:
 * 			xmmsv_dict_iter_explicit_destroy(self.diter)             # <<<<<<<<<<<<<<
 * 
 * 	def __init__(self, CollectionAttributes attributes, AttributesIterType itertype):
 */
    xmmsv_dict_iter_explicit_destroy(((struct __pyx_obj_9xmmsvalue_AttributesIterator *)__pyx_v_self)->diter);
    goto __pyx_L5;
  }
  __pyx_L5:;

  __Pyx_RefNannyFinishContext();
}

/* "xmmsvalue.pyx":437
 * 			xmmsv_dict_iter_explicit_destroy(self.diter)
 * 
 * 	def __init__(self, CollectionAttributes attributes, AttributesIterType itertype):             # <<<<<<<<<<<<<<
 * 		cdef xmmsv_dict_iter_t *it = NULL
 * 		if attributes is None:
 */

static int __pyx_pf_9xmmsvalue_18AttributesIterator_2__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pf_9xmmsvalue_18AttributesIterator_2__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct __pyx_obj_9xmmsvalue_CollectionAttributes *__pyx_v_attributes = 0;
  enum __pyx_t_9xmmsvalue_AttributesIterType __pyx_v_itertype;
  xmmsv_dict_iter_t *__pyx_v_it;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__attributes,&__pyx_n_s__itertype,0};
  __Pyx_RefNannySetupContext("__init__");
  {
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__attributes);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__itertype);
        if (likely(values[1])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 437; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 437; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_attributes = ((struct __pyx_obj_9xmmsvalue_CollectionAttributes *)values[0]);
    __pyx_v_itertype = PyInt_AsLong(values[1]); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 437; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 437; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("xmmsvalue.AttributesIterator.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_attributes), __pyx_ptype_9xmmsvalue_CollectionAttributes, 1, "attributes", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 437; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "xmmsvalue.pyx":438
 * 
 * 	def __init__(self, CollectionAttributes attributes, AttributesIterType itertype):
 * 		cdef xmmsv_dict_iter_t *it = NULL             # <<<<<<<<<<<<<<
 * 		if attributes is None:
 * 			raise TypeError("__init__() argument must not be None")
 */
  __pyx_v_it = NULL;

  /* "xmmsvalue.pyx":439
 * 	def __init__(self, CollectionAttributes attributes, AttributesIterType itertype):
 * 		cdef xmmsv_dict_iter_t *it = NULL
 * 		if attributes is None:             # <<<<<<<<<<<<<<
 * 			raise TypeError("__init__() argument must not be None")
 * 		if not xmmsv_get_dict_iter(xmmsv_coll_attributes_get(attributes.coll), &it):
 */
  __pyx_t_1 = (((PyObject *)__pyx_v_attributes) == Py_None);
  if (__pyx_t_1) {

    /* "xmmsvalue.pyx":440
 * 		cdef xmmsv_dict_iter_t *it = NULL
 * 		if attributes is None:
 * 			raise TypeError("__init__() argument must not be None")             # <<<<<<<<<<<<<<
 * 		if not xmmsv_get_dict_iter(xmmsv_coll_attributes_get(attributes.coll), &it):
 * 			raise RuntimeError("Failed to get fict iterator")
 */
    __pyx_t_2 = PyObject_Call(__pyx_builtin_TypeError, ((PyObject *)__pyx_k_tuple_26), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 440; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 440; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    goto __pyx_L6;
  }
  __pyx_L6:;

  /* "xmmsvalue.pyx":441
 * 		if attributes is None:
 * 			raise TypeError("__init__() argument must not be None")
 * 		if not xmmsv_get_dict_iter(xmmsv_coll_attributes_get(attributes.coll), &it):             # <<<<<<<<<<<<<<
 * 			raise RuntimeError("Failed to get fict iterator")
 * 		xmmsv_dict_iter_first(it)
 */
  __pyx_t_1 = (!xmmsv_get_dict_iter(xmmsv_coll_attributes_get(__pyx_v_attributes->__pyx_base.coll), (&__pyx_v_it)));
  if (__pyx_t_1) {

    /* "xmmsvalue.pyx":442
 * 			raise TypeError("__init__() argument must not be None")
 * 		if not xmmsv_get_dict_iter(xmmsv_coll_attributes_get(attributes.coll), &it):
 * 			raise RuntimeError("Failed to get fict iterator")             # <<<<<<<<<<<<<<
 * 		xmmsv_dict_iter_first(it)
 * 		self.diter = it
 */
    __pyx_t_2 = PyObject_Call(__pyx_builtin_RuntimeError, ((PyObject *)__pyx_k_tuple_28), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 442; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 442; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    goto __pyx_L7;
  }
  __pyx_L7:;

  /* "xmmsvalue.pyx":443
 * 		if not xmmsv_get_dict_iter(xmmsv_coll_attributes_get(attributes.coll), &it):
 * 			raise RuntimeError("Failed to get fict iterator")
 * 		xmmsv_dict_iter_first(it)             # <<<<<<<<<<<<<<
 * 		self.diter = it
 * 		self.itertype = itertype
 */
  xmmsv_dict_iter_first(__pyx_v_it);

  /* "xmmsvalue.pyx":444
 * 			raise RuntimeError("Failed to get fict iterator")
 * 		xmmsv_dict_iter_first(it)
 * 		self.diter = it             # <<<<<<<<<<<<<<
 * 		self.itertype = itertype
 * 
 */
  ((struct __pyx_obj_9xmmsvalue_AttributesIterator *)__pyx_v_self)->diter = __pyx_v_it;

  /* "xmmsvalue.pyx":445
 * 		xmmsv_dict_iter_first(it)
 * 		self.diter = it
 * 		self.itertype = itertype             # <<<<<<<<<<<<<<
 * 
 * 	def __iter__(self):
 */
  ((struct __pyx_obj_9xmmsvalue_AttributesIterator *)__pyx_v_self)->itertype = __pyx_v_itertype;

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("xmmsvalue.AttributesIterator.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsvalue.pyx":447
 * 		self.itertype = itertype
 * 
 * 	def __iter__(self):             # <<<<<<<<<<<<<<
 * 		return self
 * 
 */

static PyObject *__pyx_pf_9xmmsvalue_18AttributesIterator_3__iter__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pf_9xmmsvalue_18AttributesIterator_3__iter__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__iter__");

  /* "xmmsvalue.pyx":448
 * 
 * 	def __iter__(self):
 * 		return self             # <<<<<<<<<<<<<<
 * 
 * 	def __next__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self);
  __pyx_r = __pyx_v_self;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsvalue.pyx":450
 * 		return self
 * 
 * 	def __next__(self):             # <<<<<<<<<<<<<<
 * 		cdef char *key = NULL
 * 		cdef char *value = NULL
 */

static PyObject *__pyx_pf_9xmmsvalue_18AttributesIterator_4__next__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pf_9xmmsvalue_18AttributesIterator_4__next__(PyObject *__pyx_v_self) {
  char *__pyx_v_key;
  char *__pyx_v_value;
  PyObject *__pyx_v_ret = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__next__");

  /* "xmmsvalue.pyx":451
 * 
 * 	def __next__(self):
 * 		cdef char *key = NULL             # <<<<<<<<<<<<<<
 * 		cdef char *value = NULL
 * 		if self.diter != NULL and xmmsv_dict_iter_valid(self.diter):
 */
  __pyx_v_key = NULL;

  /* "xmmsvalue.pyx":452
 * 	def __next__(self):
 * 		cdef char *key = NULL
 * 		cdef char *value = NULL             # <<<<<<<<<<<<<<
 * 		if self.diter != NULL and xmmsv_dict_iter_valid(self.diter):
 * 			xmmsv_dict_iter_pair_string(self.diter, <const_char **>&key, <const_char **>&value)
 */
  __pyx_v_value = NULL;

  /* "xmmsvalue.pyx":453
 * 		cdef char *key = NULL
 * 		cdef char *value = NULL
 * 		if self.diter != NULL and xmmsv_dict_iter_valid(self.diter):             # <<<<<<<<<<<<<<
 * 			xmmsv_dict_iter_pair_string(self.diter, <const_char **>&key, <const_char **>&value)
 * 			if self.itertype == ITER_VALUES:
 */
  __pyx_t_1 = (((struct __pyx_obj_9xmmsvalue_AttributesIterator *)__pyx_v_self)->diter != NULL);
  if (__pyx_t_1) {
    __pyx_t_2 = xmmsv_dict_iter_valid(((struct __pyx_obj_9xmmsvalue_AttributesIterator *)__pyx_v_self)->diter);
    __pyx_t_3 = __pyx_t_2;
  } else {
    __pyx_t_3 = __pyx_t_1;
  }
  if (__pyx_t_3) {

    /* "xmmsvalue.pyx":454
 * 		cdef char *value = NULL
 * 		if self.diter != NULL and xmmsv_dict_iter_valid(self.diter):
 * 			xmmsv_dict_iter_pair_string(self.diter, <const_char **>&key, <const_char **>&value)             # <<<<<<<<<<<<<<
 * 			if self.itertype == ITER_VALUES:
 * 				ret = to_unicode(value)
 */
    xmmsv_dict_iter_pair_string(((struct __pyx_obj_9xmmsvalue_AttributesIterator *)__pyx_v_self)->diter, ((const char **)(&__pyx_v_key)), ((const char **)(&__pyx_v_value)));

    /* "xmmsvalue.pyx":455
 * 		if self.diter != NULL and xmmsv_dict_iter_valid(self.diter):
 * 			xmmsv_dict_iter_pair_string(self.diter, <const_char **>&key, <const_char **>&value)
 * 			if self.itertype == ITER_VALUES:             # <<<<<<<<<<<<<<
 * 				ret = to_unicode(value)
 * 			elif self.itertype == ITER_ITEMS:
 */
    __pyx_t_3 = (((struct __pyx_obj_9xmmsvalue_AttributesIterator *)__pyx_v_self)->itertype == __pyx_e_9xmmsvalue_ITER_VALUES);
    if (__pyx_t_3) {

      /* "xmmsvalue.pyx":456
 * 			xmmsv_dict_iter_pair_string(self.diter, <const_char **>&key, <const_char **>&value)
 * 			if self.itertype == ITER_VALUES:
 * 				ret = to_unicode(value)             # <<<<<<<<<<<<<<
 * 			elif self.itertype == ITER_ITEMS:
 * 				ret = (key, to_unicode(value))
 */
      __pyx_t_4 = __pyx_f_9xmmsutils_to_unicode(__pyx_v_value); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 456; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_v_ret = __pyx_t_4;
      __pyx_t_4 = 0;
      goto __pyx_L6;
    }

    /* "xmmsvalue.pyx":457
 * 			if self.itertype == ITER_VALUES:
 * 				ret = to_unicode(value)
 * 			elif self.itertype == ITER_ITEMS:             # <<<<<<<<<<<<<<
 * 				ret = (key, to_unicode(value))
 * 			else: # ITER_KEYS is the default
 */
    __pyx_t_3 = (((struct __pyx_obj_9xmmsvalue_AttributesIterator *)__pyx_v_self)->itertype == __pyx_e_9xmmsvalue_ITER_ITEMS);
    if (__pyx_t_3) {

      /* "xmmsvalue.pyx":458
 * 				ret = to_unicode(value)
 * 			elif self.itertype == ITER_ITEMS:
 * 				ret = (key, to_unicode(value))             # <<<<<<<<<<<<<<
 * 			else: # ITER_KEYS is the default
 * 				ret = key
 */
      __pyx_t_4 = PyBytes_FromString(__pyx_v_key); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 458; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_4));
      __pyx_t_5 = __pyx_f_9xmmsutils_to_unicode(__pyx_v_value); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 458; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 458; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_6));
      PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_t_4));
      __Pyx_GIVEREF(((PyObject *)__pyx_t_4));
      PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_5);
      __Pyx_GIVEREF(__pyx_t_5);
      __pyx_t_4 = 0;
      __pyx_t_5 = 0;
      __pyx_v_ret = ((PyObject *)__pyx_t_6);
      __pyx_t_6 = 0;
      goto __pyx_L6;
    }
    /*else*/ {

      /* "xmmsvalue.pyx":460
 * 				ret = (key, to_unicode(value))
 * 			else: # ITER_KEYS is the default
 * 				ret = key             # <<<<<<<<<<<<<<
 * 			xmmsv_dict_iter_next(self.diter)
 * 			return ret
 */
      __pyx_t_6 = PyBytes_FromString(__pyx_v_key); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 460; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_6));
      __pyx_v_ret = ((PyObject *)__pyx_t_6);
      __pyx_t_6 = 0;
    }
    __pyx_L6:;

    /* "xmmsvalue.pyx":461
 * 			else: # ITER_KEYS is the default
 * 				ret = key
 * 			xmmsv_dict_iter_next(self.diter)             # <<<<<<<<<<<<<<
 * 			return ret
 * 		raise StopIteration()
 */
    xmmsv_dict_iter_next(((struct __pyx_obj_9xmmsvalue_AttributesIterator *)__pyx_v_self)->diter);

    /* "xmmsvalue.pyx":462
 * 				ret = key
 * 			xmmsv_dict_iter_next(self.diter)
 * 			return ret             # <<<<<<<<<<<<<<
 * 		raise StopIteration()
 * 
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_ret);
    __pyx_r = __pyx_v_ret;
    goto __pyx_L0;
    goto __pyx_L5;
  }
  __pyx_L5:;

  /* "xmmsvalue.pyx":463
 * 			xmmsv_dict_iter_next(self.diter)
 * 			return ret
 * 		raise StopIteration()             # <<<<<<<<<<<<<<
 * 
 * 	cpdef reset(self):
 */
  __pyx_t_6 = PyObject_Call(__pyx_builtin_StopIteration, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 463; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_Raise(__pyx_t_6, 0, 0, 0);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  {__pyx_filename = __pyx_f[0]; __pyx_lineno = 463; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("xmmsvalue.AttributesIterator.__next__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_ret);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsvalue.pyx":465
 * 		raise StopIteration()
 * 
 * 	cpdef reset(self):             # <<<<<<<<<<<<<<
 * 		xmmsv_dict_iter_first(self.diter)
 * 
 */

static PyObject *__pyx_pf_9xmmsvalue_18AttributesIterator_5reset(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_f_9xmmsvalue_18AttributesIterator_reset(struct __pyx_obj_9xmmsvalue_AttributesIterator *__pyx_v_self, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("reset");
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overriden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__reset); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 465; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (void *)&__pyx_pf_9xmmsvalue_18AttributesIterator_5reset)) {
      __Pyx_XDECREF(__pyx_r);
      __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 = 465; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "xmmsvalue.pyx":466
 * 
 * 	cpdef reset(self):
 * 		xmmsv_dict_iter_first(self.diter)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  xmmsv_dict_iter_first(__pyx_v_self->diter);

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("xmmsvalue.AttributesIterator.reset", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsvalue.pyx":465
 * 		raise StopIteration()
 * 
 * 	cpdef reset(self):             # <<<<<<<<<<<<<<
 * 		xmmsv_dict_iter_first(self.diter)
 * 
 */

static PyObject *__pyx_pf_9xmmsvalue_18AttributesIterator_5reset(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pf_9xmmsvalue_18AttributesIterator_5reset(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("reset");
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((struct __pyx_vtabstruct_9xmmsvalue_AttributesIterator *)((struct __pyx_obj_9xmmsvalue_AttributesIterator *)__pyx_v_self)->__pyx_vtab)->reset(((struct __pyx_obj_9xmmsvalue_AttributesIterator *)__pyx_v_self), 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 465; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("xmmsvalue.AttributesIterator.reset", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsvalue.pyx":470
 * 
 * cdef class CollectionAttributes(CollectionRef):
 * 	def __init__(self, Collection c):             # <<<<<<<<<<<<<<
 * 		if c.coll == NULL:
 * 			raise RuntimeError("Uninitialized collection")
 */

static int __pyx_pf_9xmmsvalue_20CollectionAttributes___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pf_9xmmsvalue_20CollectionAttributes___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct __pyx_obj_9xmmsvalue_Collection *__pyx_v_c = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__c,0};
  __Pyx_RefNannySetupContext("__init__");
  {
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__c);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 470; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_c = ((struct __pyx_obj_9xmmsvalue_Collection *)values[0]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 470; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("xmmsvalue.CollectionAttributes.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_c), __pyx_ptype_9xmmsvalue_Collection, 1, "c", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 470; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "xmmsvalue.pyx":471
 * cdef class CollectionAttributes(CollectionRef):
 * 	def __init__(self, Collection c):
 * 		if c.coll == NULL:             # <<<<<<<<<<<<<<
 * 			raise RuntimeError("Uninitialized collection")
 * 		self.set_collection(c.coll)
 */
  __pyx_t_1 = (__pyx_v_c->__pyx_base.coll == NULL);
  if (__pyx_t_1) {

    /* "xmmsvalue.pyx":472
 * 	def __init__(self, Collection c):
 * 		if c.coll == NULL:
 * 			raise RuntimeError("Uninitialized collection")             # <<<<<<<<<<<<<<
 * 		self.set_collection(c.coll)
 * 
 */
    __pyx_t_2 = PyObject_Call(__pyx_builtin_RuntimeError, ((PyObject *)__pyx_k_tuple_30), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 472; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 472; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    goto __pyx_L6;
  }
  __pyx_L6:;

  /* "xmmsvalue.pyx":473
 * 		if c.coll == NULL:
 * 			raise RuntimeError("Uninitialized collection")
 * 		self.set_collection(c.coll)             # <<<<<<<<<<<<<<
 * 
 * 	cpdef get_dict(self):
 */
  __pyx_t_2 = ((struct __pyx_vtabstruct_9xmmsvalue_CollectionAttributes *)((struct __pyx_obj_9xmmsvalue_CollectionAttributes *)__pyx_v_self)->__pyx_base.__pyx_vtab)->__pyx_base.set_collection(((struct __pyx_obj_9xmmsvalue_CollectionRef *)__pyx_v_self), __pyx_v_c->__pyx_base.coll); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 473; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("xmmsvalue.CollectionAttributes.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsvalue.pyx":475
 * 		self.set_collection(c.coll)
 * 
 * 	cpdef get_dict(self):             # <<<<<<<<<<<<<<
 * 		"""Get a copy of attributes dict"""
 * 		return dict(self.iteritems())
 */

static PyObject *__pyx_pf_9xmmsvalue_20CollectionAttributes_1get_dict(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_f_9xmmsvalue_20CollectionAttributes_get_dict(struct __pyx_obj_9xmmsvalue_CollectionAttributes *__pyx_v_self, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_dict");
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overriden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__get_dict); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 475; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (void *)&__pyx_pf_9xmmsvalue_20CollectionAttributes_1get_dict)) {
      __Pyx_XDECREF(__pyx_r);
      __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 = 475; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "xmmsvalue.pyx":477
 * 	cpdef get_dict(self):
 * 		"""Get a copy of attributes dict"""
 * 		return dict(self.iteritems())             # <<<<<<<<<<<<<<
 * 
 * 	cpdef iterkeys(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((struct __pyx_vtabstruct_9xmmsvalue_CollectionAttributes *)__pyx_v_self->__pyx_base.__pyx_vtab)->iteritems(__pyx_v_self, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 477; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 477; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)(&PyDict_Type))), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 477; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("xmmsvalue.CollectionAttributes.get_dict", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsvalue.pyx":475
 * 		self.set_collection(c.coll)
 * 
 * 	cpdef get_dict(self):             # <<<<<<<<<<<<<<
 * 		"""Get a copy of attributes dict"""
 * 		return dict(self.iteritems())
 */

static PyObject *__pyx_pf_9xmmsvalue_20CollectionAttributes_1get_dict(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_9xmmsvalue_20CollectionAttributes_1get_dict[] = "Get a copy of attributes dict";
static PyObject *__pyx_pf_9xmmsvalue_20CollectionAttributes_1get_dict(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("get_dict");
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((struct __pyx_vtabstruct_9xmmsvalue_CollectionAttributes *)((struct __pyx_obj_9xmmsvalue_CollectionAttributes *)__pyx_v_self)->__pyx_base.__pyx_vtab)->get_dict(((struct __pyx_obj_9xmmsvalue_CollectionAttributes *)__pyx_v_self), 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 475; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("xmmsvalue.CollectionAttributes.get_dict", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsvalue.pyx":479
 * 		return dict(self.iteritems())
 * 
 * 	cpdef iterkeys(self):             # <<<<<<<<<<<<<<
 * 		return AttributesIterator(self, ITER_KEYS)
 * 
 */

static PyObject *__pyx_pf_9xmmsvalue_20CollectionAttributes_2iterkeys(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_f_9xmmsvalue_20CollectionAttributes_iterkeys(struct __pyx_obj_9xmmsvalue_CollectionAttributes *__pyx_v_self, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("iterkeys");
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overriden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__iterkeys); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 479; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (void *)&__pyx_pf_9xmmsvalue_20CollectionAttributes_2iterkeys)) {
      __Pyx_XDECREF(__pyx_r);
      __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 = 479; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "xmmsvalue.pyx":480
 * 
 * 	cpdef iterkeys(self):
 * 		return AttributesIterator(self, ITER_KEYS)             # <<<<<<<<<<<<<<
 * 
 * 	cpdef keys(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyInt_FromLong(__pyx_e_9xmmsvalue_ITER_KEYS); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 480; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 480; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  __Pyx_INCREF(((PyObject *)__pyx_v_self));
  PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_self));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_9xmmsvalue_AttributesIterator)), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 480; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("xmmsvalue.CollectionAttributes.iterkeys", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsvalue.pyx":479
 * 		return dict(self.iteritems())
 * 
 * 	cpdef iterkeys(self):             # <<<<<<<<<<<<<<
 * 		return AttributesIterator(self, ITER_KEYS)
 * 
 */

static PyObject *__pyx_pf_9xmmsvalue_20CollectionAttributes_2iterkeys(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pf_9xmmsvalue_20CollectionAttributes_2iterkeys(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("iterkeys");
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((struct __pyx_vtabstruct_9xmmsvalue_CollectionAttributes *)((struct __pyx_obj_9xmmsvalue_CollectionAttributes *)__pyx_v_self)->__pyx_base.__pyx_vtab)->iterkeys(((struct __pyx_obj_9xmmsvalue_CollectionAttributes *)__pyx_v_self), 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 479; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("xmmsvalue.CollectionAttributes.iterkeys", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsvalue.pyx":482
 * 		return AttributesIterator(self, ITER_KEYS)
 * 
 * 	cpdef keys(self):             # <<<<<<<<<<<<<<
 * 		return [k for k in self.iterkeys()]
 * 
 */

static PyObject *__pyx_pf_9xmmsvalue_20CollectionAttributes_3keys(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_f_9xmmsvalue_20CollectionAttributes_keys(struct __pyx_obj_9xmmsvalue_CollectionAttributes *__pyx_v_self, int __pyx_skip_dispatch) {
  PyObject *__pyx_v_k = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  Py_ssize_t __pyx_t_4;
  PyObject *(*__pyx_t_5)(PyObject *);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("keys");
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overriden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__keys); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 482; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (void *)&__pyx_pf_9xmmsvalue_20CollectionAttributes_3keys)) {
      __Pyx_XDECREF(__pyx_r);
      __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 = 482; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "xmmsvalue.pyx":483
 * 
 * 	cpdef keys(self):
 * 		return [k for k in self.iterkeys()]             # <<<<<<<<<<<<<<
 * 
 * 	cpdef itervalues(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 483; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  __pyx_t_2 = ((struct __pyx_vtabstruct_9xmmsvalue_CollectionAttributes *)__pyx_v_self->__pyx_base.__pyx_vtab)->iterkeys(__pyx_v_self, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 483; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyList_CheckExact(__pyx_t_2) || PyTuple_CheckExact(__pyx_t_2)) {
    __pyx_t_3 = __pyx_t_2; __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = 0;
    __pyx_t_5 = NULL;
  } else {
    __pyx_t_4 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 483; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = Py_TYPE(__pyx_t_3)->tp_iternext;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  for (;;) {
    if (PyList_CheckExact(__pyx_t_3)) {
      if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_3)) break;
      __pyx_t_2 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++;
    } else if (PyTuple_CheckExact(__pyx_t_3)) {
      if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
      __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++;
    } else {
      __pyx_t_2 = __pyx_t_5(__pyx_t_3);
      if (unlikely(!__pyx_t_2)) {
        if (PyErr_Occurred()) {
          if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 483; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_2);
    }
    __Pyx_XDECREF(__pyx_v_k);
    __pyx_v_k = __pyx_t_2;
    __pyx_t_2 = 0;
    if (unlikely(PyList_Append(__pyx_t_1, (PyObject*)__pyx_v_k))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 483; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_INCREF(((PyObject *)__pyx_t_1));
  __pyx_r = ((PyObject *)__pyx_t_1);
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("xmmsvalue.CollectionAttributes.keys", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_k);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsvalue.pyx":482
 * 		return AttributesIterator(self, ITER_KEYS)
 * 
 * 	cpdef keys(self):             # <<<<<<<<<<<<<<
 * 		return [k for k in self.iterkeys()]
 * 
 */

static PyObject *__pyx_pf_9xmmsvalue_20CollectionAttributes_3keys(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pf_9xmmsvalue_20CollectionAttributes_3keys(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("keys");
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((struct __pyx_vtabstruct_9xmmsvalue_CollectionAttributes *)((struct __pyx_obj_9xmmsvalue_CollectionAttributes *)__pyx_v_self)->__pyx_base.__pyx_vtab)->keys(((struct __pyx_obj_9xmmsvalue_CollectionAttributes *)__pyx_v_self), 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 482; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("xmmsvalue.CollectionAttributes.keys", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsvalue.pyx":485
 * 		return [k for k in self.iterkeys()]
 * 
 * 	cpdef itervalues(self):             # <<<<<<<<<<<<<<
 * 		return AttributesIterator(self, ITER_VALUES)
 * 
 */

static PyObject *__pyx_pf_9xmmsvalue_20CollectionAttributes_4itervalues(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_f_9xmmsvalue_20CollectionAttributes_itervalues(struct __pyx_obj_9xmmsvalue_CollectionAttributes *__pyx_v_self, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("itervalues");
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overriden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__itervalues); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 485; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (void *)&__pyx_pf_9xmmsvalue_20CollectionAttributes_4itervalues)) {
      __Pyx_XDECREF(__pyx_r);
      __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 = 485; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "xmmsvalue.pyx":486
 * 
 * 	cpdef itervalues(self):
 * 		return AttributesIterator(self, ITER_VALUES)             # <<<<<<<<<<<<<<
 * 
 * 	cpdef values(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyInt_FromLong(__pyx_e_9xmmsvalue_ITER_VALUES); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 486; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 486; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  __Pyx_INCREF(((PyObject *)__pyx_v_self));
  PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_self));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_9xmmsvalue_AttributesIterator)), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 486; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("xmmsvalue.CollectionAttributes.itervalues", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsvalue.pyx":485
 * 		return [k for k in self.iterkeys()]
 * 
 * 	cpdef itervalues(self):             # <<<<<<<<<<<<<<
 * 		return AttributesIterator(self, ITER_VALUES)
 * 
 */

static PyObject *__pyx_pf_9xmmsvalue_20CollectionAttributes_4itervalues(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pf_9xmmsvalue_20CollectionAttributes_4itervalues(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("itervalues");
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((struct __pyx_vtabstruct_9xmmsvalue_CollectionAttributes *)((struct __pyx_obj_9xmmsvalue_CollectionAttributes *)__pyx_v_self)->__pyx_base.__pyx_vtab)->itervalues(((struct __pyx_obj_9xmmsvalue_CollectionAttributes *)__pyx_v_self), 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 485; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("xmmsvalue.CollectionAttributes.itervalues", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsvalue.pyx":488
 * 		return AttributesIterator(self, ITER_VALUES)
 * 
 * 	cpdef values(self):             # <<<<<<<<<<<<<<
 * 		return [v for v in self.itervalues()]
 * 
 */

static PyObject *__pyx_pf_9xmmsvalue_20CollectionAttributes_5values(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_f_9xmmsvalue_20CollectionAttributes_values(struct __pyx_obj_9xmmsvalue_CollectionAttributes *__pyx_v_self, int __pyx_skip_dispatch) {
  PyObject *__pyx_v_v = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  Py_ssize_t __pyx_t_4;
  PyObject *(*__pyx_t_5)(PyObject *);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("values");
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overriden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__values); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 488; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (void *)&__pyx_pf_9xmmsvalue_20CollectionAttributes_5values)) {
      __Pyx_XDECREF(__pyx_r);
      __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 = 488; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "xmmsvalue.pyx":489
 * 
 * 	cpdef values(self):
 * 		return [v for v in self.itervalues()]             # <<<<<<<<<<<<<<
 * 
 * 	cpdef iteritems(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 489; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  __pyx_t_2 = ((struct __pyx_vtabstruct_9xmmsvalue_CollectionAttributes *)__pyx_v_self->__pyx_base.__pyx_vtab)->itervalues(__pyx_v_self, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 489; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyList_CheckExact(__pyx_t_2) || PyTuple_CheckExact(__pyx_t_2)) {
    __pyx_t_3 = __pyx_t_2; __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = 0;
    __pyx_t_5 = NULL;
  } else {
    __pyx_t_4 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 489; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = Py_TYPE(__pyx_t_3)->tp_iternext;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  for (;;) {
    if (PyList_CheckExact(__pyx_t_3)) {
      if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_3)) break;
      __pyx_t_2 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++;
    } else if (PyTuple_CheckExact(__pyx_t_3)) {
      if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
      __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++;
    } else {
      __pyx_t_2 = __pyx_t_5(__pyx_t_3);
      if (unlikely(!__pyx_t_2)) {
        if (PyErr_Occurred()) {
          if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 489; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_2);
    }
    __Pyx_XDECREF(__pyx_v_v);
    __pyx_v_v = __pyx_t_2;
    __pyx_t_2 = 0;
    if (unlikely(PyList_Append(__pyx_t_1, (PyObject*)__pyx_v_v))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 489; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_INCREF(((PyObject *)__pyx_t_1));
  __pyx_r = ((PyObject *)__pyx_t_1);
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("xmmsvalue.CollectionAttributes.values", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_v);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsvalue.pyx":488
 * 		return AttributesIterator(self, ITER_VALUES)
 * 
 * 	cpdef values(self):             # <<<<<<<<<<<<<<
 * 		return [v for v in self.itervalues()]
 * 
 */

static PyObject *__pyx_pf_9xmmsvalue_20CollectionAttributes_5values(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pf_9xmmsvalue_20CollectionAttributes_5values(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("values");
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((struct __pyx_vtabstruct_9xmmsvalue_CollectionAttributes *)((struct __pyx_obj_9xmmsvalue_CollectionAttributes *)__pyx_v_self)->__pyx_base.__pyx_vtab)->values(((struct __pyx_obj_9xmmsvalue_CollectionAttributes *)__pyx_v_self), 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 488; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("xmmsvalue.CollectionAttributes.values", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsvalue.pyx":491
 * 		return [v for v in self.itervalues()]
 * 
 * 	cpdef iteritems(self):             # <<<<<<<<<<<<<<
 * 		return AttributesIterator(self, ITER_ITEMS)
 * 
 */

static PyObject *__pyx_pf_9xmmsvalue_20CollectionAttributes_6iteritems(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_f_9xmmsvalue_20CollectionAttributes_iteritems(struct __pyx_obj_9xmmsvalue_CollectionAttributes *__pyx_v_self, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("iteritems");
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overriden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__iteritems); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 491; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (void *)&__pyx_pf_9xmmsvalue_20CollectionAttributes_6iteritems)) {
      __Pyx_XDECREF(__pyx_r);
      __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 = 491; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "xmmsvalue.pyx":492
 * 
 * 	cpdef iteritems(self):
 * 		return AttributesIterator(self, ITER_ITEMS)             # <<<<<<<<<<<<<<
 * 
 * 	cpdef items(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyInt_FromLong(__pyx_e_9xmmsvalue_ITER_ITEMS); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 492; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 492; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  __Pyx_INCREF(((PyObject *)__pyx_v_self));
  PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_self));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
  PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_9xmmsvalue_AttributesIterator)), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 492; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("xmmsvalue.CollectionAttributes.iteritems", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsvalue.pyx":491
 * 		return [v for v in self.itervalues()]
 * 
 * 	cpdef iteritems(self):             # <<<<<<<<<<<<<<
 * 		return AttributesIterator(self, ITER_ITEMS)
 * 
 */

static PyObject *__pyx_pf_9xmmsvalue_20CollectionAttributes_6iteritems(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pf_9xmmsvalue_20CollectionAttributes_6iteritems(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("iteritems");
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((struct __pyx_vtabstruct_9xmmsvalue_CollectionAttributes *)((struct __pyx_obj_9xmmsvalue_CollectionAttributes *)__pyx_v_self)->__pyx_base.__pyx_vtab)->iteritems(((struct __pyx_obj_9xmmsvalue_CollectionAttributes *)__pyx_v_self), 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 491; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("xmmsvalue.CollectionAttributes.iteritems", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsvalue.pyx":494
 * 		return AttributesIterator(self, ITER_ITEMS)
 * 
 * 	cpdef items(self):             # <<<<<<<<<<<<<<
 * 		return [i for i in self.iteritems()]
 * 
 */

static PyObject *__pyx_pf_9xmmsvalue_20CollectionAttributes_7items(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_f_9xmmsvalue_20CollectionAttributes_items(struct __pyx_obj_9xmmsvalue_CollectionAttributes *__pyx_v_self, int __pyx_skip_dispatch) {
  PyObject *__pyx_v_i = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  Py_ssize_t __pyx_t_4;
  PyObject *(*__pyx_t_5)(PyObject *);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("items");
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overriden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__items); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 494; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (void *)&__pyx_pf_9xmmsvalue_20CollectionAttributes_7items)) {
      __Pyx_XDECREF(__pyx_r);
      __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 = 494; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "xmmsvalue.pyx":495
 * 
 * 	cpdef items(self):
 * 		return [i for i in self.iteritems()]             # <<<<<<<<<<<<<<
 * 
 * 	def __iter__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 495; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  __pyx_t_2 = ((struct __pyx_vtabstruct_9xmmsvalue_CollectionAttributes *)__pyx_v_self->__pyx_base.__pyx_vtab)->iteritems(__pyx_v_self, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 495; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  if (PyList_CheckExact(__pyx_t_2) || PyTuple_CheckExact(__pyx_t_2)) {
    __pyx_t_3 = __pyx_t_2; __Pyx_INCREF(__pyx_t_3); __pyx_t_4 = 0;
    __pyx_t_5 = NULL;
  } else {
    __pyx_t_4 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 495; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_5 = Py_TYPE(__pyx_t_3)->tp_iternext;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  for (;;) {
    if (PyList_CheckExact(__pyx_t_3)) {
      if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_3)) break;
      __pyx_t_2 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++;
    } else if (PyTuple_CheckExact(__pyx_t_3)) {
      if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
      __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_4); __Pyx_INCREF(__pyx_t_2); __pyx_t_4++;
    } else {
      __pyx_t_2 = __pyx_t_5(__pyx_t_3);
      if (unlikely(!__pyx_t_2)) {
        if (PyErr_Occurred()) {
          if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 495; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_2);
    }
    __Pyx_XDECREF(__pyx_v_i);
    __pyx_v_i = __pyx_t_2;
    __pyx_t_2 = 0;
    if (unlikely(PyList_Append(__pyx_t_1, (PyObject*)__pyx_v_i))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 495; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __Pyx_INCREF(((PyObject *)__pyx_t_1));
  __pyx_r = ((PyObject *)__pyx_t_1);
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("xmmsvalue.CollectionAttributes.items", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_i);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsvalue.pyx":494
 * 		return AttributesIterator(self, ITER_ITEMS)
 * 
 * 	cpdef items(self):             # <<<<<<<<<<<<<<
 * 		return [i for i in self.iteritems()]
 * 
 */

static PyObject *__pyx_pf_9xmmsvalue_20CollectionAttributes_7items(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pf_9xmmsvalue_20CollectionAttributes_7items(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("items");
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((struct __pyx_vtabstruct_9xmmsvalue_CollectionAttributes *)((struct __pyx_obj_9xmmsvalue_CollectionAttributes *)__pyx_v_self)->__pyx_base.__pyx_vtab)->items(((struct __pyx_obj_9xmmsvalue_CollectionAttributes *)__pyx_v_self), 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 494; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("xmmsvalue.CollectionAttributes.items", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsvalue.pyx":497
 * 		return [i for i in self.iteritems()]
 * 
 * 	def __iter__(self):             # <<<<<<<<<<<<<<
 * 		return self.iterkeys()
 * 
 */

static PyObject *__pyx_pf_9xmmsvalue_20CollectionAttributes_8__iter__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pf_9xmmsvalue_20CollectionAttributes_8__iter__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__iter__");

  /* "xmmsvalue.pyx":498
 * 
 * 	def __iter__(self):
 * 		return self.iterkeys()             # <<<<<<<<<<<<<<
 * 
 * 	def __repr__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((struct __pyx_vtabstruct_9xmmsvalue_CollectionAttributes *)((struct __pyx_obj_9xmmsvalue_CollectionAttributes *)__pyx_v_self)->__pyx_base.__pyx_vtab)->iterkeys(((struct __pyx_obj_9xmmsvalue_CollectionAttributes *)__pyx_v_self), 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 498; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("xmmsvalue.CollectionAttributes.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsvalue.pyx":500
 * 		return self.iterkeys()
 * 
 * 	def __repr__(self):             # <<<<<<<<<<<<<<
 * 		return repr(self.get_dict())
 * 
 */

static PyObject *__pyx_pf_9xmmsvalue_20CollectionAttributes_9__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pf_9xmmsvalue_20CollectionAttributes_9__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__");

  /* "xmmsvalue.pyx":501
 * 
 * 	def __repr__(self):
 * 		return repr(self.get_dict())             # <<<<<<<<<<<<<<
 * 
 * 	def __str__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((struct __pyx_vtabstruct_9xmmsvalue_CollectionAttributes *)((struct __pyx_obj_9xmmsvalue_CollectionAttributes *)__pyx_v_self)->__pyx_base.__pyx_vtab)->get_dict(((struct __pyx_obj_9xmmsvalue_CollectionAttributes *)__pyx_v_self), 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 501; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Repr(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 501; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("xmmsvalue.CollectionAttributes.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsvalue.pyx":503
 * 		return repr(self.get_dict())
 * 
 * 	def __str__(self):             # <<<<<<<<<<<<<<
 * 		return str(self.get_dict())
 * 
 */

static PyObject *__pyx_pf_9xmmsvalue_20CollectionAttributes_10__str__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pf_9xmmsvalue_20CollectionAttributes_10__str__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__str__");

  /* "xmmsvalue.pyx":504
 * 
 * 	def __str__(self):
 * 		return str(self.get_dict())             # <<<<<<<<<<<<<<
 * 
 * 	def __getitem__(self, name):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((struct __pyx_vtabstruct_9xmmsvalue_CollectionAttributes *)((struct __pyx_obj_9xmmsvalue_CollectionAttributes *)__pyx_v_self)->__pyx_base.__pyx_vtab)->get_dict(((struct __pyx_obj_9xmmsvalue_CollectionAttributes *)__pyx_v_self), 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 504; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 504; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_2));
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;
  __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 = 504; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("xmmsvalue.CollectionAttributes.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsvalue.pyx":506
 * 		return str(self.get_dict())
 * 
 * 	def __getitem__(self, name):             # <<<<<<<<<<<<<<
 * 		cdef char *value = NULL
 * 		nam = from_unicode(name)
 */

static PyObject *__pyx_pf_9xmmsvalue_20CollectionAttributes_11__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_name); /*proto*/
static PyObject *__pyx_pf_9xmmsvalue_20CollectionAttributes_11__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_name) {
  char *__pyx_v_value;
  PyObject *__pyx_v_nam = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  char *__pyx_t_2;
  int __pyx_t_3;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__getitem__");

  /* "xmmsvalue.pyx":507
 * 
 * 	def __getitem__(self, name):
 * 		cdef char *value = NULL             # <<<<<<<<<<<<<<
 * 		nam = from_unicode(name)
 * 		if not xmmsv_coll_attribute_get(self.coll, <char *>nam, &value):
 */
  __pyx_v_value = NULL;

  /* "xmmsvalue.pyx":508
 * 	def __getitem__(self, name):
 * 		cdef char *value = NULL
 * 		nam = from_unicode(name)             # <<<<<<<<<<<<<<
 * 		if not xmmsv_coll_attribute_get(self.coll, <char *>nam, &value):
 * 			raise KeyError("The attribute '%s' doesn't exist" % name)
 */
  __pyx_t_1 = __pyx_f_9xmmsutils_from_unicode(__pyx_v_name); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 508; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_nam = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "xmmsvalue.pyx":509
 * 		cdef char *value = NULL
 * 		nam = from_unicode(name)
 * 		if not xmmsv_coll_attribute_get(self.coll, <char *>nam, &value):             # <<<<<<<<<<<<<<
 * 			raise KeyError("The attribute '%s' doesn't exist" % name)
 * 		return to_unicode(value)
 */
  __pyx_t_2 = PyBytes_AsString(__pyx_v_nam); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 509; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_3 = (!xmmsv_coll_attribute_get(((struct __pyx_obj_9xmmsvalue_CollectionAttributes *)__pyx_v_self)->__pyx_base.coll, ((char *)__pyx_t_2), (&__pyx_v_value)));
  if (__pyx_t_3) {

    /* "xmmsvalue.pyx":510
 * 		nam = from_unicode(name)
 * 		if not xmmsv_coll_attribute_get(self.coll, <char *>nam, &value):
 * 			raise KeyError("The attribute '%s' doesn't exist" % name)             # <<<<<<<<<<<<<<
 * 		return to_unicode(value)
 * 
 */
    __pyx_t_1 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_31), __pyx_v_name); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 510; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_1));
    __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 510; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(((PyObject *)__pyx_t_4));
    PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_t_1));
    __Pyx_GIVEREF(((PyObject *)__pyx_t_1));
    __pyx_t_1 = 0;
    __pyx_t_1 = PyObject_Call(__pyx_builtin_KeyError, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 510; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 510; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    goto __pyx_L5;
  }
  __pyx_L5:;

  /* "xmmsvalue.pyx":511
 * 		if not xmmsv_coll_attribute_get(self.coll, <char *>nam, &value):
 * 			raise KeyError("The attribute '%s' doesn't exist" % name)
 * 		return to_unicode(value)             # <<<<<<<<<<<<<<
 * 
 * 	def __setitem__(self, name, value):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_9xmmsutils_to_unicode(__pyx_v_value); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 511; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("xmmsvalue.CollectionAttributes.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_nam);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsvalue.pyx":513
 * 		return to_unicode(value)
 * 
 * 	def __setitem__(self, name, value):             # <<<<<<<<<<<<<<
 * 		n = from_unicode(name)
 * 		v = from_unicode(value)
 */

static int __pyx_pf_9xmmsvalue_20CollectionAttributes_12__setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_value); /*proto*/
static int __pyx_pf_9xmmsvalue_20CollectionAttributes_12__setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_name, PyObject *__pyx_v_value) {
  PyObject *__pyx_v_n = NULL;
  PyObject *__pyx_v_v = NULL;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  char *__pyx_t_2;
  char *__pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setitem__");

  /* "xmmsvalue.pyx":514
 * 
 * 	def __setitem__(self, name, value):
 * 		n = from_unicode(name)             # <<<<<<<<<<<<<<
 * 		v = from_unicode(value)
 * 		xmmsv_coll_attribute_set(self.coll, <char *>n, <char *>v)
 */
  __pyx_t_1 = __pyx_f_9xmmsutils_from_unicode(__pyx_v_name); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 514; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_n = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "xmmsvalue.pyx":515
 * 	def __setitem__(self, name, value):
 * 		n = from_unicode(name)
 * 		v = from_unicode(value)             # <<<<<<<<<<<<<<
 * 		xmmsv_coll_attribute_set(self.coll, <char *>n, <char *>v)
 * 
 */
  __pyx_t_1 = __pyx_f_9xmmsutils_from_unicode(__pyx_v_value); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 515; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_v = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "xmmsvalue.pyx":516
 * 		n = from_unicode(name)
 * 		v = from_unicode(value)
 * 		xmmsv_coll_attribute_set(self.coll, <char *>n, <char *>v)             # <<<<<<<<<<<<<<
 * 
 * 	def get(self, name, default=None):
 */
  __pyx_t_2 = PyBytes_AsString(__pyx_v_n); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 516; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_3 = PyBytes_AsString(__pyx_v_v); if (unlikely((!__pyx_t_3) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 516; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  xmmsv_coll_attribute_set(((struct __pyx_obj_9xmmsvalue_CollectionAttributes *)__pyx_v_self)->__pyx_base.coll, ((char *)__pyx_t_2), ((char *)__pyx_t_3));

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("xmmsvalue.CollectionAttributes.__setitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_n);
  __Pyx_XDECREF(__pyx_v_v);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsvalue.pyx":518
 * 		xmmsv_coll_attribute_set(self.coll, <char *>n, <char *>v)
 * 
 * 	def get(self, name, default=None):             # <<<<<<<<<<<<<<
 * 		try:
 * 			return self[name]
 */

static PyObject *__pyx_pf_9xmmsvalue_20CollectionAttributes_13get(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pf_9xmmsvalue_20CollectionAttributes_13get(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_name = 0;
  PyObject *__pyx_v_default = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__name,&__pyx_n_s__default,0};
  __Pyx_RefNannySetupContext("get");
  {
    PyObject* values[2] = {0,0};
    values[1] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__name);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__default);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "get") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 518; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_name = values[0];
    __pyx_v_default = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("get", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 518; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("xmmsvalue.CollectionAttributes.get", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;

  /* "xmmsvalue.pyx":519
 * 
 * 	def get(self, name, default=None):
 * 		try:             # <<<<<<<<<<<<<<
 * 			return self[name]
 * 		except KeyError:
 */
  {
    __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_1);
    __Pyx_XGOTREF(__pyx_t_2);
    __Pyx_XGOTREF(__pyx_t_3);
    /*try:*/ {

      /* "xmmsvalue.pyx":520
 * 	def get(self, name, default=None):
 * 		try:
 * 			return self[name]             # <<<<<<<<<<<<<<
 * 		except KeyError:
 * 			return default
 */
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_4 = PyObject_GetItem(__pyx_v_self, __pyx_v_name); if (!__pyx_t_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 520; __pyx_clineno = __LINE__; goto __pyx_L6_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_r = __pyx_t_4;
      __pyx_t_4 = 0;
      goto __pyx_L10_try_return;
    }
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    goto __pyx_L13_try_end;
    __pyx_L10_try_return:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L0;
    __pyx_L6_error:;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "xmmsvalue.pyx":521
 * 		try:
 * 			return self[name]
 * 		except KeyError:             # <<<<<<<<<<<<<<
 * 			return default
 * 
 */
    __pyx_t_5 = PyErr_ExceptionMatches(__pyx_builtin_KeyError);
    if (__pyx_t_5) {
      __Pyx_AddTraceback("xmmsvalue.CollectionAttributes.get", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_6, &__pyx_t_7) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 521; __pyx_clineno = __LINE__; goto __pyx_L8_except_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_GOTREF(__pyx_t_7);

      /* "xmmsvalue.pyx":522
 * 			return self[name]
 * 		except KeyError:
 * 			return default             # <<<<<<<<<<<<<<
 * 
 * 	cpdef clear(self):
 */
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_v_default);
      __pyx_r = __pyx_v_default;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      goto __pyx_L9_except_return;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      goto __pyx_L7_exception_handled;
    }
    __pyx_L8_except_error:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L1_error;
    __pyx_L9_except_return:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L0;
    __pyx_L7_exception_handled:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    __pyx_L13_try_end:;
  }

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("xmmsvalue.CollectionAttributes.get", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsvalue.pyx":524
 * 			return default
 * 
 * 	cpdef clear(self):             # <<<<<<<<<<<<<<
 * 		for k in self.keys():
 * 			xmmsv_coll_attribute_remove(self.coll, k)
 */

static PyObject *__pyx_pf_9xmmsvalue_20CollectionAttributes_14clear(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_f_9xmmsvalue_20CollectionAttributes_clear(struct __pyx_obj_9xmmsvalue_CollectionAttributes *__pyx_v_self, int __pyx_skip_dispatch) {
  PyObject *__pyx_v_k = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *(*__pyx_t_4)(PyObject *);
  char *__pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("clear");
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overriden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__clear); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 524; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (void *)&__pyx_pf_9xmmsvalue_20CollectionAttributes_14clear)) {
      __Pyx_XDECREF(__pyx_r);
      __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 = 524; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "xmmsvalue.pyx":525
 * 
 * 	cpdef clear(self):
 * 		for k in self.keys():             # <<<<<<<<<<<<<<
 * 			xmmsv_coll_attribute_remove(self.coll, k)
 * 
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_9xmmsvalue_CollectionAttributes *)__pyx_v_self->__pyx_base.__pyx_vtab)->keys(__pyx_v_self, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 525; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyList_CheckExact(__pyx_t_1) || PyTuple_CheckExact(__pyx_t_1)) {
    __pyx_t_2 = __pyx_t_1; __Pyx_INCREF(__pyx_t_2); __pyx_t_3 = 0;
    __pyx_t_4 = NULL;
  } else {
    __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 525; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = Py_TYPE(__pyx_t_2)->tp_iternext;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  for (;;) {
    if (PyList_CheckExact(__pyx_t_2)) {
      if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_2)) break;
      __pyx_t_1 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++;
    } else if (PyTuple_CheckExact(__pyx_t_2)) {
      if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_2)) break;
      __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3); __Pyx_INCREF(__pyx_t_1); __pyx_t_3++;
    } else {
      __pyx_t_1 = __pyx_t_4(__pyx_t_2);
      if (unlikely(!__pyx_t_1)) {
        if (PyErr_Occurred()) {
          if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 525; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_1);
    }
    __Pyx_XDECREF(__pyx_v_k);
    __pyx_v_k = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "xmmsvalue.pyx":526
 * 	cpdef clear(self):
 * 		for k in self.keys():
 * 			xmmsv_coll_attribute_remove(self.coll, k)             # <<<<<<<<<<<<<<
 * 
 * 	def update(self, d, **kargs):
 */
    __pyx_t_5 = PyBytes_AsString(__pyx_v_k); if (unlikely((!__pyx_t_5) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 526; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    xmmsv_coll_attribute_remove(__pyx_v_self->__pyx_base.coll, __pyx_t_5);
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("xmmsvalue.CollectionAttributes.clear", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_k);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsvalue.pyx":524
 * 			return default
 * 
 * 	cpdef clear(self):             # <<<<<<<<<<<<<<
 * 		for k in self.keys():
 * 			xmmsv_coll_attribute_remove(self.coll, k)
 */

static PyObject *__pyx_pf_9xmmsvalue_20CollectionAttributes_14clear(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pf_9xmmsvalue_20CollectionAttributes_14clear(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("clear");
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((struct __pyx_vtabstruct_9xmmsvalue_CollectionAttributes *)((struct __pyx_obj_9xmmsvalue_CollectionAttributes *)__pyx_v_self)->__pyx_base.__pyx_vtab)->clear(((struct __pyx_obj_9xmmsvalue_CollectionAttributes *)__pyx_v_self), 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 524; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("xmmsvalue.CollectionAttributes.clear", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsvalue.pyx":528
 * 			xmmsv_coll_attribute_remove(self.coll, k)
 * 
 * 	def update(self, d, **kargs):             # <<<<<<<<<<<<<<
 * 		if hasattr(d, 'keys') and hasattr(d.keys, '__call__'):
 * 			for k in d.keys():
 */

static PyObject *__pyx_pf_9xmmsvalue_20CollectionAttributes_15update(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pf_9xmmsvalue_20CollectionAttributes_15update(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_d = 0;
  PyObject *__pyx_v_kargs = 0;
  PyObject *__pyx_v_k = NULL;
  PyObject *__pyx_v_v = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  int __pyx_t_5;
  Py_ssize_t __pyx_t_6;
  PyObject *(*__pyx_t_7)(PyObject *);
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  PyObject *__pyx_t_10 = NULL;
  PyObject *(*__pyx_t_11)(PyObject *);
  Py_ssize_t __pyx_t_12;
  PyObject *__pyx_t_13 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__d,0};
  __Pyx_RefNannySetupContext("update");
  __pyx_v_kargs = PyDict_New(); if (unlikely(!__pyx_v_kargs)) return NULL;
  __Pyx_GOTREF(__pyx_v_kargs);
  {
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__d);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kargs, values, PyTuple_GET_SIZE(__pyx_args), "update") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 528; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_d = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("update", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 528; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_DECREF(__pyx_v_kargs); __pyx_v_kargs = 0;
  __Pyx_AddTraceback("xmmsvalue.CollectionAttributes.update", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;

  /* "xmmsvalue.pyx":529
 * 
 * 	def update(self, d, **kargs):
 * 		if hasattr(d, 'keys') and hasattr(d.keys, '__call__'):             # <<<<<<<<<<<<<<
 * 			for k in d.keys():
 * 				self[k] = d[k]
 */
  __pyx_t_1 = ((PyObject *)__pyx_n_s__keys);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_HasAttr(__pyx_v_d, __pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 529; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {
    __pyx_t_1 = PyObject_GetAttr(__pyx_v_d, __pyx_n_s__keys); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 529; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = ((PyObject *)__pyx_n_s____call__);
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_4 = PyObject_HasAttr(__pyx_t_1, __pyx_t_3); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 529; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __pyx_t_5 = __pyx_t_4;
  } else {
    __pyx_t_5 = __pyx_t_2;
  }
  if (__pyx_t_5) {

    /* "xmmsvalue.pyx":530
 * 	def update(self, d, **kargs):
 * 		if hasattr(d, 'keys') and hasattr(d.keys, '__call__'):
 * 			for k in d.keys():             # <<<<<<<<<<<<<<
 * 				self[k] = d[k]
 * 		else:
 */
    __pyx_t_3 = PyObject_GetAttr(__pyx_v_d, __pyx_n_s__keys); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 530; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_1 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 530; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (PyList_CheckExact(__pyx_t_1) || PyTuple_CheckExact(__pyx_t_1)) {
      __pyx_t_3 = __pyx_t_1; __Pyx_INCREF(__pyx_t_3); __pyx_t_6 = 0;
      __pyx_t_7 = NULL;
    } else {
      __pyx_t_6 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 530; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_7 = Py_TYPE(__pyx_t_3)->tp_iternext;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    for (;;) {
      if (PyList_CheckExact(__pyx_t_3)) {
        if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_3)) break;
        __pyx_t_1 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_6); __Pyx_INCREF(__pyx_t_1); __pyx_t_6++;
      } else if (PyTuple_CheckExact(__pyx_t_3)) {
        if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
        __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_6); __Pyx_INCREF(__pyx_t_1); __pyx_t_6++;
      } else {
        __pyx_t_1 = __pyx_t_7(__pyx_t_3);
        if (unlikely(!__pyx_t_1)) {
          if (PyErr_Occurred()) {
            if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
            else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 530; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_1);
      }
      __Pyx_XDECREF(__pyx_v_k);
      __pyx_v_k = __pyx_t_1;
      __pyx_t_1 = 0;

      /* "xmmsvalue.pyx":531
 * 		if hasattr(d, 'keys') and hasattr(d.keys, '__call__'):
 * 			for k in d.keys():
 * 				self[k] = d[k]             # <<<<<<<<<<<<<<
 * 		else:
 * 			for k, v in d:
 */
      __pyx_t_1 = PyObject_GetItem(__pyx_v_d, __pyx_v_k); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 531; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_1);
      if (PyObject_SetItem(__pyx_v_self, __pyx_v_k, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 531; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    goto __pyx_L6;
  }
  /*else*/ {

    /* "xmmsvalue.pyx":533
 * 				self[k] = d[k]
 * 		else:
 * 			for k, v in d:             # <<<<<<<<<<<<<<
 * 				self[k] = v
 * 		for k in kargs:
 */
    if (PyList_CheckExact(__pyx_v_d) || PyTuple_CheckExact(__pyx_v_d)) {
      __pyx_t_3 = __pyx_v_d; __Pyx_INCREF(__pyx_t_3); __pyx_t_6 = 0;
      __pyx_t_7 = NULL;
    } else {
      __pyx_t_6 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_v_d); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 533; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_7 = Py_TYPE(__pyx_t_3)->tp_iternext;
    }
    for (;;) {
      if (PyList_CheckExact(__pyx_t_3)) {
        if (__pyx_t_6 >= PyList_GET_SIZE(__pyx_t_3)) break;
        __pyx_t_1 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_6); __Pyx_INCREF(__pyx_t_1); __pyx_t_6++;
      } else if (PyTuple_CheckExact(__pyx_t_3)) {
        if (__pyx_t_6 >= PyTuple_GET_SIZE(__pyx_t_3)) break;
        __pyx_t_1 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_6); __Pyx_INCREF(__pyx_t_1); __pyx_t_6++;
      } else {
        __pyx_t_1 = __pyx_t_7(__pyx_t_3);
        if (unlikely(!__pyx_t_1)) {
          if (PyErr_Occurred()) {
            if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
            else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 533; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_1);
      }
      if ((likely(PyTuple_CheckExact(__pyx_t_1))) || (PyList_CheckExact(__pyx_t_1))) {
        PyObject* sequence = __pyx_t_1;
        if (likely(PyTuple_CheckExact(sequence))) {
          if (unlikely(PyTuple_GET_SIZE(sequence) != 2)) {
            if (PyTuple_GET_SIZE(sequence) > 2) __Pyx_RaiseTooManyValuesError(2);
            else __Pyx_RaiseNeedMoreValuesError(PyTuple_GET_SIZE(sequence));
            {__pyx_filename = __pyx_f[0]; __pyx_lineno = 533; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          }
          __pyx_t_8 = PyTuple_GET_ITEM(sequence, 0); 
          __pyx_t_9 = PyTuple_GET_ITEM(sequence, 1); 
        } else {
          if (unlikely(PyList_GET_SIZE(sequence) != 2)) {
            if (PyList_GET_SIZE(sequence) > 2) __Pyx_RaiseTooManyValuesError(2);
            else __Pyx_RaiseNeedMoreValuesError(PyList_GET_SIZE(sequence));
            {__pyx_filename = __pyx_f[0]; __pyx_lineno = 533; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          }
          __pyx_t_8 = PyList_GET_ITEM(sequence, 0); 
          __pyx_t_9 = PyList_GET_ITEM(sequence, 1); 
        }
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(__pyx_t_9);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      } else {
        Py_ssize_t index = -1;
        __pyx_t_10 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 533; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_10);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_11 = Py_TYPE(__pyx_t_10)->tp_iternext;
        index = 0; __pyx_t_8 = __pyx_t_11(__pyx_t_10); if (unlikely(!__pyx_t_8)) goto __pyx_L11_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_8);
        index = 1; __pyx_t_9 = __pyx_t_11(__pyx_t_10); if (unlikely(!__pyx_t_9)) goto __pyx_L11_unpacking_failed;
        __Pyx_GOTREF(__pyx_t_9);
        if (__Pyx_IternextUnpackEndCheck(__pyx_t_11(__pyx_t_10), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 533; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        goto __pyx_L12_unpacking_done;
        __pyx_L11_unpacking_failed:;
        __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
        if (PyErr_Occurred() && PyErr_ExceptionMatches(PyExc_StopIteration)) PyErr_Clear();
        if (!PyErr_Occurred()) __Pyx_RaiseNeedMoreValuesError(index);
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 533; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __pyx_L12_unpacking_done:;
      }
      __Pyx_XDECREF(__pyx_v_k);
      __pyx_v_k = __pyx_t_8;
      __pyx_t_8 = 0;
      __Pyx_XDECREF(__pyx_v_v);
      __pyx_v_v = __pyx_t_9;
      __pyx_t_9 = 0;

      /* "xmmsvalue.pyx":534
 * 		else:
 * 			for k, v in d:
 * 				self[k] = v             # <<<<<<<<<<<<<<
 * 		for k in kargs:
 * 			self[k] = kargs[k]
 */
      if (PyObject_SetItem(__pyx_v_self, __pyx_v_k, __pyx_v_v) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 534; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __pyx_L6:;

  /* "xmmsvalue.pyx":535
 * 			for k, v in d:
 * 				self[k] = v
 * 		for k in kargs:             # <<<<<<<<<<<<<<
 * 			self[k] = kargs[k]
 * 
 */
  __Pyx_INCREF(((PyObject *)__pyx_v_kargs));
  __Pyx_XDECREF(__pyx_t_3);
  __pyx_t_3 = ((PyObject *)__pyx_v_kargs);
  __pyx_t_6 = 0;
  __pyx_t_12 = PyDict_Size(__pyx_t_3);
  while (1) {
    if (unlikely(__pyx_t_12 != PyDict_Size(__pyx_t_3))) {
      PyErr_SetString(PyExc_RuntimeError, "dictionary changed size during iteration"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 535; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    if (!PyDict_Next(__pyx_t_3, (&__pyx_t_6), (&__pyx_t_13), NULL)) break;
    __Pyx_INCREF(((PyObject *)__pyx_t_13));
    __Pyx_XDECREF(__pyx_v_k);
    __pyx_v_k = __pyx_t_13;

    /* "xmmsvalue.pyx":536
 * 				self[k] = v
 * 		for k in kargs:
 * 			self[k] = kargs[k]             # <<<<<<<<<<<<<<
 * 
 * 	def __contains__(self, name):
 */
    __pyx_t_1 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_kargs), __pyx_v_k); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 536; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (PyObject_SetItem(__pyx_v_self, __pyx_v_k, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 536; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("xmmsvalue.CollectionAttributes.update", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_kargs);
  __Pyx_XDECREF(__pyx_v_k);
  __Pyx_XDECREF(__pyx_v_v);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsvalue.pyx":538
 * 			self[k] = kargs[k]
 * 
 * 	def __contains__(self, name):             # <<<<<<<<<<<<<<
 * 		cdef char *value = NULL
 * 		return xmmsv_coll_attribute_get(self.coll, name, &value)
 */

static int __pyx_pf_9xmmsvalue_20CollectionAttributes_16__contains__(PyObject *__pyx_v_self, PyObject *__pyx_v_name); /*proto*/
static int __pyx_pf_9xmmsvalue_20CollectionAttributes_16__contains__(PyObject *__pyx_v_self, PyObject *__pyx_v_name) {
  char *__pyx_v_value;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  char *__pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__contains__");

  /* "xmmsvalue.pyx":539
 * 
 * 	def __contains__(self, name):
 * 		cdef char *value = NULL             # <<<<<<<<<<<<<<
 * 		return xmmsv_coll_attribute_get(self.coll, name, &value)
 * 
 */
  __pyx_v_value = NULL;

  /* "xmmsvalue.pyx":540
 * 	def __contains__(self, name):
 * 		cdef char *value = NULL
 * 		return xmmsv_coll_attribute_get(self.coll, name, &value)             # <<<<<<<<<<<<<<
 * 
 * cdef class CollectionOperands(CollectionRef):
 */
  __pyx_t_1 = PyBytes_AsString(__pyx_v_name); if (unlikely((!__pyx_t_1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 540; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = xmmsv_coll_attribute_get(((struct __pyx_obj_9xmmsvalue_CollectionAttributes *)__pyx_v_self)->__pyx_base.coll, __pyx_t_1, (&__pyx_v_value));
  goto __pyx_L0;

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("xmmsvalue.CollectionAttributes.__contains__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsvalue.pyx":545
 * 	#cdef object pylist
 * 
 * 	def __init__(self, Collection c):             # <<<<<<<<<<<<<<
 * 		if c.coll == NULL:
 * 			raise RuntimeError("Uninitialized collection")
 */

static int __pyx_pf_9xmmsvalue_18CollectionOperands___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pf_9xmmsvalue_18CollectionOperands___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct __pyx_obj_9xmmsvalue_Collection *__pyx_v_c = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__c,0};
  __Pyx_RefNannySetupContext("__init__");
  {
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__c);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 545; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_c = ((struct __pyx_obj_9xmmsvalue_Collection *)values[0]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 545; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("xmmsvalue.CollectionOperands.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_c), __pyx_ptype_9xmmsvalue_Collection, 1, "c", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 545; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "xmmsvalue.pyx":546
 * 
 * 	def __init__(self, Collection c):
 * 		if c.coll == NULL:             # <<<<<<<<<<<<<<
 * 			raise RuntimeError("Uninitialized collection")
 * 		self.set_collection(c.coll)
 */
  __pyx_t_1 = (__pyx_v_c->__pyx_base.coll == NULL);
  if (__pyx_t_1) {

    /* "xmmsvalue.pyx":547
 * 	def __init__(self, Collection c):
 * 		if c.coll == NULL:
 * 			raise RuntimeError("Uninitialized collection")             # <<<<<<<<<<<<<<
 * 		self.set_collection(c.coll)
 * 		self.init_pylist()
 */
    __pyx_t_2 = PyObject_Call(__pyx_builtin_RuntimeError, ((PyObject *)__pyx_k_tuple_32), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 547; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 547; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    goto __pyx_L6;
  }
  __pyx_L6:;

  /* "xmmsvalue.pyx":548
 * 		if c.coll == NULL:
 * 			raise RuntimeError("Uninitialized collection")
 * 		self.set_collection(c.coll)             # <<<<<<<<<<<<<<
 * 		self.init_pylist()
 * 
 */
  __pyx_t_2 = ((struct __pyx_vtabstruct_9xmmsvalue_CollectionOperands *)((struct __pyx_obj_9xmmsvalue_CollectionOperands *)__pyx_v_self)->__pyx_base.__pyx_vtab)->__pyx_base.set_collection(((struct __pyx_obj_9xmmsvalue_CollectionRef *)__pyx_v_self), __pyx_v_c->__pyx_base.coll); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 548; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "xmmsvalue.pyx":549
 * 			raise RuntimeError("Uninitialized collection")
 * 		self.set_collection(c.coll)
 * 		self.init_pylist()             # <<<<<<<<<<<<<<
 * 
 * 	cdef init_pylist(self):
 */
  __pyx_t_2 = ((struct __pyx_vtabstruct_9xmmsvalue_CollectionOperands *)((struct __pyx_obj_9xmmsvalue_CollectionOperands *)__pyx_v_self)->__pyx_base.__pyx_vtab)->init_pylist(((struct __pyx_obj_9xmmsvalue_CollectionOperands *)__pyx_v_self)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 549; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("xmmsvalue.CollectionOperands.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsvalue.pyx":551
 * 		self.init_pylist()
 * 
 * 	cdef init_pylist(self):             # <<<<<<<<<<<<<<
 * 		cdef XmmsValue v
 * 		if self.pylist is None:
 */

static PyObject *__pyx_f_9xmmsvalue_18CollectionOperands_init_pylist(struct __pyx_obj_9xmmsvalue_CollectionOperands *__pyx_v_self) {
  struct __pyx_obj_9xmmsvalue_XmmsValue *__pyx_v_v = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("init_pylist");

  /* "xmmsvalue.pyx":553
 * 	cdef init_pylist(self):
 * 		cdef XmmsValue v
 * 		if self.pylist is None:             # <<<<<<<<<<<<<<
 * 			v = XmmsValue()
 * 			v.set_value(xmmsv_coll_operands_get(self.coll))
 */
  __pyx_t_1 = (__pyx_v_self->pylist == Py_None);
  if (__pyx_t_1) {

    /* "xmmsvalue.pyx":554
 * 		cdef XmmsValue v
 * 		if self.pylist is None:
 * 			v = XmmsValue()             # <<<<<<<<<<<<<<
 * 			v.set_value(xmmsv_coll_operands_get(self.coll))
 * 			self.pylist = v.value()
 */
    __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_9xmmsvalue_XmmsValue)), ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 554; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_v_v = ((struct __pyx_obj_9xmmsvalue_XmmsValue *)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "xmmsvalue.pyx":555
 * 		if self.pylist is None:
 * 			v = XmmsValue()
 * 			v.set_value(xmmsv_coll_operands_get(self.coll))             # <<<<<<<<<<<<<<
 * 			self.pylist = v.value()
 * 
 */
    __pyx_t_2 = ((struct __pyx_vtabstruct_9xmmsvalue_XmmsValue *)__pyx_v_v->__pyx_vtab)->set_value(__pyx_v_v, xmmsv_coll_operands_get(__pyx_v_self->__pyx_base.coll), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 555; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "xmmsvalue.pyx":556
 * 			v = XmmsValue()
 * 			v.set_value(xmmsv_coll_operands_get(self.coll))
 * 			self.pylist = v.value()             # <<<<<<<<<<<<<<
 * 
 * 	def __repr__(self):
 */
    __pyx_t_2 = ((struct __pyx_vtabstruct_9xmmsvalue_XmmsValue *)__pyx_v_v->__pyx_vtab)->value(__pyx_v_v, 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 556; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_GIVEREF(__pyx_t_2);
    __Pyx_GOTREF(__pyx_v_self->pylist);
    __Pyx_DECREF(__pyx_v_self->pylist);
    __pyx_v_self->pylist = __pyx_t_2;
    __pyx_t_2 = 0;
    goto __pyx_L3;
  }
  __pyx_L3:;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("xmmsvalue.CollectionOperands.init_pylist", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_v);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsvalue.pyx":558
 * 			self.pylist = v.value()
 * 
 * 	def __repr__(self):             # <<<<<<<<<<<<<<
 * 		return repr(self.pylist)
 * 	def __str__(self):
 */

static PyObject *__pyx_pf_9xmmsvalue_18CollectionOperands_1__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pf_9xmmsvalue_18CollectionOperands_1__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__");

  /* "xmmsvalue.pyx":559
 * 
 * 	def __repr__(self):
 * 		return repr(self.pylist)             # <<<<<<<<<<<<<<
 * 	def __str__(self):
 * 		return str(self.pylist)
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((struct __pyx_obj_9xmmsvalue_CollectionOperands *)__pyx_v_self)->pylist;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Repr(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 559; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("xmmsvalue.CollectionOperands.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsvalue.pyx":560
 * 	def __repr__(self):
 * 		return repr(self.pylist)
 * 	def __str__(self):             # <<<<<<<<<<<<<<
 * 		return str(self.pylist)
 * 	def __len__(self):
 */

static PyObject *__pyx_pf_9xmmsvalue_18CollectionOperands_2__str__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pf_9xmmsvalue_18CollectionOperands_2__str__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__str__");

  /* "xmmsvalue.pyx":561
 * 		return repr(self.pylist)
 * 	def __str__(self):
 * 		return str(self.pylist)             # <<<<<<<<<<<<<<
 * 	def __len__(self):
 * 		return len(self.pylist)
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 561; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  __Pyx_INCREF(((struct __pyx_obj_9xmmsvalue_CollectionOperands *)__pyx_v_self)->pylist);
  PyTuple_SET_ITEM(__pyx_t_1, 0, ((struct __pyx_obj_9xmmsvalue_CollectionOperands *)__pyx_v_self)->pylist);
  __Pyx_GIVEREF(((struct __pyx_obj_9xmmsvalue_CollectionOperands *)__pyx_v_self)->pylist);
  __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 561; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("xmmsvalue.CollectionOperands.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsvalue.pyx":562
 * 	def __str__(self):
 * 		return str(self.pylist)
 * 	def __len__(self):             # <<<<<<<<<<<<<<
 * 		return len(self.pylist)
 * 	def __getitem__(self, i):
 */

static Py_ssize_t __pyx_pf_9xmmsvalue_18CollectionOperands_3__len__(PyObject *__pyx_v_self); /*proto*/
static Py_ssize_t __pyx_pf_9xmmsvalue_18CollectionOperands_3__len__(PyObject *__pyx_v_self) {
  Py_ssize_t __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__len__");

  /* "xmmsvalue.pyx":563
 * 		return str(self.pylist)
 * 	def __len__(self):
 * 		return len(self.pylist)             # <<<<<<<<<<<<<<
 * 	def __getitem__(self, i):
 * 		return self.pylist[i]
 */
  __pyx_t_1 = ((struct __pyx_obj_9xmmsvalue_CollectionOperands *)__pyx_v_self)->pylist;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Length(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 563; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  goto __pyx_L0;

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("xmmsvalue.CollectionOperands.__len__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsvalue.pyx":564
 * 	def __len__(self):
 * 		return len(self.pylist)
 * 	def __getitem__(self, i):             # <<<<<<<<<<<<<<
 * 		return self.pylist[i]
 * 	def __delitem__(self, i):
 */

static PyObject *__pyx_pf_9xmmsvalue_18CollectionOperands_4__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_i); /*proto*/
static PyObject *__pyx_pf_9xmmsvalue_18CollectionOperands_4__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_i) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__getitem__");

  /* "xmmsvalue.pyx":565
 * 		return len(self.pylist)
 * 	def __getitem__(self, i):
 * 		return self.pylist[i]             # <<<<<<<<<<<<<<
 * 	def __delitem__(self, i):
 * 		cdef Collection op
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyObject_GetItem(((struct __pyx_obj_9xmmsvalue_CollectionOperands *)__pyx_v_self)->pylist, __pyx_v_i); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 565; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("xmmsvalue.CollectionOperands.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsvalue.pyx":566
 * 	def __getitem__(self, i):
 * 		return self.pylist[i]
 * 	def __delitem__(self, i):             # <<<<<<<<<<<<<<
 * 		cdef Collection op
 * 		try:
 */

static int __pyx_pf_9xmmsvalue_18CollectionOperands_5__delitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_i); /*proto*/
static int __pyx_pf_9xmmsvalue_18CollectionOperands_5__delitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_i) {
  struct __pyx_obj_9xmmsvalue_Collection *__pyx_v_op = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__delitem__");

  /* "xmmsvalue.pyx":568
 * 	def __delitem__(self, i):
 * 		cdef Collection op
 * 		try:             # <<<<<<<<<<<<<<
 * 			op = self.pylist.pop(i)
 * 			xmmsv_coll_remove_operand(self.coll, op.coll)
 */
  {
    __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_1);
    __Pyx_XGOTREF(__pyx_t_2);
    __Pyx_XGOTREF(__pyx_t_3);
    /*try:*/ {

      /* "xmmsvalue.pyx":569
 * 		cdef Collection op
 * 		try:
 * 			op = self.pylist.pop(i)             # <<<<<<<<<<<<<<
 * 			xmmsv_coll_remove_operand(self.coll, op.coll)
 * 		except IndexError:
 */
      __pyx_t_4 = PyObject_GetAttr(((struct __pyx_obj_9xmmsvalue_CollectionOperands *)__pyx_v_self)->pylist, __pyx_n_s__pop); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 569; __pyx_clineno = __LINE__; goto __pyx_L5_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 569; __pyx_clineno = __LINE__; goto __pyx_L5_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_5));
      __Pyx_INCREF(__pyx_v_i);
      PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_i);
      __Pyx_GIVEREF(__pyx_v_i);
      __pyx_t_6 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 569; __pyx_clineno = __LINE__; goto __pyx_L5_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
      if (!(likely(((__pyx_t_6) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_6, __pyx_ptype_9xmmsvalue_Collection))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 569; __pyx_clineno = __LINE__; goto __pyx_L5_error;}
      __pyx_v_op = ((struct __pyx_obj_9xmmsvalue_Collection *)__pyx_t_6);
      __pyx_t_6 = 0;

      /* "xmmsvalue.pyx":570
 * 		try:
 * 			op = self.pylist.pop(i)
 * 			xmmsv_coll_remove_operand(self.coll, op.coll)             # <<<<<<<<<<<<<<
 * 		except IndexError:
 * 			raise IndexError("Index out of range")
 */
      xmmsv_coll_remove_operand(((struct __pyx_obj_9xmmsvalue_CollectionOperands *)__pyx_v_self)->__pyx_base.coll, __pyx_v_op->__pyx_base.coll);
    }
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    goto __pyx_L12_try_end;
    __pyx_L5_error:;
    __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "xmmsvalue.pyx":571
 * 			op = self.pylist.pop(i)
 * 			xmmsv_coll_remove_operand(self.coll, op.coll)
 * 		except IndexError:             # <<<<<<<<<<<<<<
 * 			raise IndexError("Index out of range")
 * 	def __iter__(self):
 */
    __pyx_t_7 = PyErr_ExceptionMatches(__pyx_builtin_IndexError);
    if (__pyx_t_7) {
      __Pyx_AddTraceback("xmmsvalue.CollectionOperands.__delitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_5, &__pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 571; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GOTREF(__pyx_t_4);

      /* "xmmsvalue.pyx":572
 * 			xmmsv_coll_remove_operand(self.coll, op.coll)
 * 		except IndexError:
 * 			raise IndexError("Index out of range")             # <<<<<<<<<<<<<<
 * 	def __iter__(self):
 * 		return iter(self.pylist)
 */
      __pyx_t_8 = PyObject_Call(__pyx_builtin_IndexError, ((PyObject *)__pyx_k_tuple_34), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 572; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;}
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_Raise(__pyx_t_8, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 572; __pyx_clineno = __LINE__; goto __pyx_L7_except_error;}
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      goto __pyx_L6_exception_handled;
    }
    __pyx_L7_except_error:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L1_error;
    __pyx_L6_exception_handled:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    __pyx_L12_try_end:;
  }

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("xmmsvalue.CollectionOperands.__delitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_op);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsvalue.pyx":573
 * 		except IndexError:
 * 			raise IndexError("Index out of range")
 * 	def __iter__(self):             # <<<<<<<<<<<<<<
 * 		return iter(self.pylist)
 * 
 */

static PyObject *__pyx_pf_9xmmsvalue_18CollectionOperands_6__iter__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pf_9xmmsvalue_18CollectionOperands_6__iter__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__iter__");

  /* "xmmsvalue.pyx":574
 * 			raise IndexError("Index out of range")
 * 	def __iter__(self):
 * 		return iter(self.pylist)             # <<<<<<<<<<<<<<
 * 
 * 	cpdef append(self, Collection op):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((struct __pyx_obj_9xmmsvalue_CollectionOperands *)__pyx_v_self)->pylist;
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 574; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("xmmsvalue.CollectionOperands.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsvalue.pyx":576
 * 		return iter(self.pylist)
 * 
 * 	cpdef append(self, Collection op):             # <<<<<<<<<<<<<<
 * 		"""Append an operand"""
 * 		with cython.nonecheck(True):
 */

static PyObject *__pyx_pf_9xmmsvalue_18CollectionOperands_7append(PyObject *__pyx_v_self, PyObject *__pyx_v_op); /*proto*/
static PyObject *__pyx_f_9xmmsvalue_18CollectionOperands_append(struct __pyx_obj_9xmmsvalue_CollectionOperands *__pyx_v_self, struct __pyx_obj_9xmmsvalue_Collection *__pyx_v_op, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("append");
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overriden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__append); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 576; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (void *)&__pyx_pf_9xmmsvalue_18CollectionOperands_7append)) {
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 576; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_2));
      __Pyx_INCREF(((PyObject *)__pyx_v_op));
      PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_op));
      __Pyx_GIVEREF(((PyObject *)__pyx_v_op));
      __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 = 576; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
      __pyx_r = __pyx_t_3;
      __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "xmmsvalue.pyx":579
 * 		"""Append an operand"""
 * 		with cython.nonecheck(True):
 * 			xmmsv_coll_add_operand(self.coll, op.coll)             # <<<<<<<<<<<<<<
 * 			self.pylist.append(op)
 * 
 */
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    __Pyx_RaiseNoneAttributeError("coll");
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 579; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  if (unlikely(((PyObject *)__pyx_v_op) == Py_None)) {
    __Pyx_RaiseNoneAttributeError("coll");
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 579; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  xmmsv_coll_add_operand(__pyx_v_self->__pyx_base.coll, __pyx_v_op->__pyx_base.coll);

  /* "xmmsvalue.pyx":580
 * 		with cython.nonecheck(True):
 * 			xmmsv_coll_add_operand(self.coll, op.coll)
 * 			self.pylist.append(op)             # <<<<<<<<<<<<<<
 * 
 * 	cpdef extend(self, ops):
 */
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    __Pyx_RaiseNoneAttributeError("pylist");
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 580; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_1 = __Pyx_PyObject_Append(__pyx_v_self->pylist, ((PyObject *)__pyx_v_op)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 580; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("xmmsvalue.CollectionOperands.append", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsvalue.pyx":576
 * 		return iter(self.pylist)
 * 
 * 	cpdef append(self, Collection op):             # <<<<<<<<<<<<<<
 * 		"""Append an operand"""
 * 		with cython.nonecheck(True):
 */

static PyObject *__pyx_pf_9xmmsvalue_18CollectionOperands_7append(PyObject *__pyx_v_self, PyObject *__pyx_v_op); /*proto*/
static char __pyx_doc_9xmmsvalue_18CollectionOperands_7append[] = "Append an operand";
static PyObject *__pyx_pf_9xmmsvalue_18CollectionOperands_7append(PyObject *__pyx_v_self, PyObject *__pyx_v_op) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("append");
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_op), __pyx_ptype_9xmmsvalue_Collection, 1, "op", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 576; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((struct __pyx_vtabstruct_9xmmsvalue_CollectionOperands *)((struct __pyx_obj_9xmmsvalue_CollectionOperands *)__pyx_v_self)->__pyx_base.__pyx_vtab)->append(((struct __pyx_obj_9xmmsvalue_CollectionOperands *)__pyx_v_self), ((struct __pyx_obj_9xmmsvalue_Collection *)__pyx_v_op), 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 576; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("xmmsvalue.CollectionOperands.append", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsvalue.pyx":582
 * 			self.pylist.append(op)
 * 
 * 	cpdef extend(self, ops):             # <<<<<<<<<<<<<<
 * 		for o in ops:
 * 			self.append(o)
 */

static PyObject *__pyx_pf_9xmmsvalue_18CollectionOperands_8extend(PyObject *__pyx_v_self, PyObject *__pyx_v_ops); /*proto*/
static PyObject *__pyx_f_9xmmsvalue_18CollectionOperands_extend(struct __pyx_obj_9xmmsvalue_CollectionOperands *__pyx_v_self, PyObject *__pyx_v_ops, int __pyx_skip_dispatch) {
  PyObject *__pyx_v_o = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  Py_ssize_t __pyx_t_4;
  PyObject *(*__pyx_t_5)(PyObject *);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("extend");
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overriden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__extend); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 582; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (void *)&__pyx_pf_9xmmsvalue_18CollectionOperands_8extend)) {
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 582; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_2));
      __Pyx_INCREF(__pyx_v_ops);
      PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_ops);
      __Pyx_GIVEREF(__pyx_v_ops);
      __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 = 582; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
      __pyx_r = __pyx_t_3;
      __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "xmmsvalue.pyx":583
 * 
 * 	cpdef extend(self, ops):
 * 		for o in ops:             # <<<<<<<<<<<<<<
 * 			self.append(o)
 * 
 */
  if (PyList_CheckExact(__pyx_v_ops) || PyTuple_CheckExact(__pyx_v_ops)) {
    __pyx_t_1 = __pyx_v_ops; __Pyx_INCREF(__pyx_t_1); __pyx_t_4 = 0;
    __pyx_t_5 = NULL;
  } else {
    __pyx_t_4 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_ops); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 583; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = Py_TYPE(__pyx_t_1)->tp_iternext;
  }
  for (;;) {
    if (PyList_CheckExact(__pyx_t_1)) {
      if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_1)) break;
      __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_3); __pyx_t_4++;
    } else if (PyTuple_CheckExact(__pyx_t_1)) {
      if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
      __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_3); __pyx_t_4++;
    } else {
      __pyx_t_3 = __pyx_t_5(__pyx_t_1);
      if (unlikely(!__pyx_t_3)) {
        if (PyErr_Occurred()) {
          if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 583; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_3);
    }
    __Pyx_XDECREF(__pyx_v_o);
    __pyx_v_o = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "xmmsvalue.pyx":584
 * 	cpdef extend(self, ops):
 * 		for o in ops:
 * 			self.append(o)             # <<<<<<<<<<<<<<
 * 
 * 	cpdef remove(self, Collection op):
 */
    if (!(likely(((__pyx_v_o) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_o, __pyx_ptype_9xmmsvalue_Collection))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 584; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_3 = __pyx_v_o;
    __Pyx_INCREF(__pyx_t_3);
    __pyx_t_2 = ((struct __pyx_vtabstruct_9xmmsvalue_CollectionOperands *)__pyx_v_self->__pyx_base.__pyx_vtab)->append(__pyx_v_self, ((struct __pyx_obj_9xmmsvalue_Collection *)__pyx_t_3), 0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 584; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("xmmsvalue.CollectionOperands.extend", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_o);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsvalue.pyx":582
 * 			self.pylist.append(op)
 * 
 * 	cpdef extend(self, ops):             # <<<<<<<<<<<<<<
 * 		for o in ops:
 * 			self.append(o)
 */

static PyObject *__pyx_pf_9xmmsvalue_18CollectionOperands_8extend(PyObject *__pyx_v_self, PyObject *__pyx_v_ops); /*proto*/
static PyObject *__pyx_pf_9xmmsvalue_18CollectionOperands_8extend(PyObject *__pyx_v_self, PyObject *__pyx_v_ops) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("extend");
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((struct __pyx_vtabstruct_9xmmsvalue_CollectionOperands *)((struct __pyx_obj_9xmmsvalue_CollectionOperands *)__pyx_v_self)->__pyx_base.__pyx_vtab)->extend(((struct __pyx_obj_9xmmsvalue_CollectionOperands *)__pyx_v_self), __pyx_v_ops, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 582; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("xmmsvalue.CollectionOperands.extend", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsvalue.pyx":586
 * 			self.append(o)
 * 
 * 	cpdef remove(self, Collection op):             # <<<<<<<<<<<<<<
 * 		"""Remove an operand"""
 * 		with cython.nonecheck(True):
 */

static PyObject *__pyx_pf_9xmmsvalue_18CollectionOperands_9remove(PyObject *__pyx_v_self, PyObject *__pyx_v_op); /*proto*/
static PyObject *__pyx_f_9xmmsvalue_18CollectionOperands_remove(struct __pyx_obj_9xmmsvalue_CollectionOperands *__pyx_v_self, struct __pyx_obj_9xmmsvalue_Collection *__pyx_v_op, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("remove");
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overriden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__remove); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 586; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (void *)&__pyx_pf_9xmmsvalue_18CollectionOperands_9remove)) {
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 586; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_2));
      __Pyx_INCREF(((PyObject *)__pyx_v_op));
      PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_op));
      __Pyx_GIVEREF(((PyObject *)__pyx_v_op));
      __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 = 586; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
      __pyx_r = __pyx_t_3;
      __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "xmmsvalue.pyx":589
 * 		"""Remove an operand"""
 * 		with cython.nonecheck(True):
 * 			xmmsv_coll_remove_operand(self.coll, op.coll)             # <<<<<<<<<<<<<<
 * 			self.pylist.remove(op)
 * 
 */
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    __Pyx_RaiseNoneAttributeError("coll");
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 589; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  if (unlikely(((PyObject *)__pyx_v_op) == Py_None)) {
    __Pyx_RaiseNoneAttributeError("coll");
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 589; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  xmmsv_coll_remove_operand(__pyx_v_self->__pyx_base.coll, __pyx_v_op->__pyx_base.coll);

  /* "xmmsvalue.pyx":590
 * 		with cython.nonecheck(True):
 * 			xmmsv_coll_remove_operand(self.coll, op.coll)
 * 			self.pylist.remove(op)             # <<<<<<<<<<<<<<
 * 
 * 	cpdef clear(self):
 */
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    __Pyx_RaiseNoneAttributeError("pylist");
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 590; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_1 = PyObject_GetAttr(__pyx_v_self->pylist, __pyx_n_s__remove); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 590; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 590; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_3));
  __Pyx_INCREF(((PyObject *)__pyx_v_op));
  PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_op));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_op));
  __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 590; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("xmmsvalue.CollectionOperands.remove", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsvalue.pyx":586
 * 			self.append(o)
 * 
 * 	cpdef remove(self, Collection op):             # <<<<<<<<<<<<<<
 * 		"""Remove an operand"""
 * 		with cython.nonecheck(True):
 */

static PyObject *__pyx_pf_9xmmsvalue_18CollectionOperands_9remove(PyObject *__pyx_v_self, PyObject *__pyx_v_op); /*proto*/
static char __pyx_doc_9xmmsvalue_18CollectionOperands_9remove[] = "Remove an operand";
static PyObject *__pyx_pf_9xmmsvalue_18CollectionOperands_9remove(PyObject *__pyx_v_self, PyObject *__pyx_v_op) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("remove");
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_op), __pyx_ptype_9xmmsvalue_Collection, 1, "op", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 586; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((struct __pyx_vtabstruct_9xmmsvalue_CollectionOperands *)((struct __pyx_obj_9xmmsvalue_CollectionOperands *)__pyx_v_self)->__pyx_base.__pyx_vtab)->remove(((struct __pyx_obj_9xmmsvalue_CollectionOperands *)__pyx_v_self), ((struct __pyx_obj_9xmmsvalue_Collection *)__pyx_v_op), 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 586; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("xmmsvalue.CollectionOperands.remove", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsvalue.pyx":592
 * 			self.pylist.remove(op)
 * 
 * 	cpdef clear(self):             # <<<<<<<<<<<<<<
 * 		cdef Collection op
 * 		for op in self.pylist:
 */

static PyObject *__pyx_pf_9xmmsvalue_18CollectionOperands_10clear(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_f_9xmmsvalue_18CollectionOperands_clear(struct __pyx_obj_9xmmsvalue_CollectionOperands *__pyx_v_self, int __pyx_skip_dispatch) {
  struct __pyx_obj_9xmmsvalue_Collection *__pyx_v_op = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  Py_ssize_t __pyx_t_3;
  PyObject *(*__pyx_t_4)(PyObject *);
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("clear");
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overriden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__clear); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 592; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (void *)&__pyx_pf_9xmmsvalue_18CollectionOperands_10clear)) {
      __Pyx_XDECREF(__pyx_r);
      __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 = 592; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "xmmsvalue.pyx":594
 * 	cpdef clear(self):
 * 		cdef Collection op
 * 		for op in self.pylist:             # <<<<<<<<<<<<<<
 * 			xmmsv_coll_remove_operand(self.coll, op.coll)
 * 		self.pylist = []
 */
  if (PyList_CheckExact(__pyx_v_self->pylist) || PyTuple_CheckExact(__pyx_v_self->pylist)) {
    __pyx_t_1 = __pyx_v_self->pylist; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = 0;
    __pyx_t_4 = NULL;
  } else {
    __pyx_t_3 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_self->pylist); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 594; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = Py_TYPE(__pyx_t_1)->tp_iternext;
  }
  for (;;) {
    if (PyList_CheckExact(__pyx_t_1)) {
      if (__pyx_t_3 >= PyList_GET_SIZE(__pyx_t_1)) break;
      __pyx_t_2 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_2); __pyx_t_3++;
    } else if (PyTuple_CheckExact(__pyx_t_1)) {
      if (__pyx_t_3 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
      __pyx_t_2 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_3); __Pyx_INCREF(__pyx_t_2); __pyx_t_3++;
    } else {
      __pyx_t_2 = __pyx_t_4(__pyx_t_1);
      if (unlikely(!__pyx_t_2)) {
        if (PyErr_Occurred()) {
          if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 594; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_2);
    }
    if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_9xmmsvalue_Collection))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 594; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_XDECREF(((PyObject *)__pyx_v_op));
    __pyx_v_op = ((struct __pyx_obj_9xmmsvalue_Collection *)__pyx_t_2);
    __pyx_t_2 = 0;

    /* "xmmsvalue.pyx":595
 * 		cdef Collection op
 * 		for op in self.pylist:
 * 			xmmsv_coll_remove_operand(self.coll, op.coll)             # <<<<<<<<<<<<<<
 * 		self.pylist = []
 * 
 */
    xmmsv_coll_remove_operand(__pyx_v_self->__pyx_base.coll, __pyx_v_op->__pyx_base.coll);
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "xmmsvalue.pyx":596
 * 		for op in self.pylist:
 * 			xmmsv_coll_remove_operand(self.coll, op.coll)
 * 		self.pylist = []             # <<<<<<<<<<<<<<
 * 
 * 	cpdef list(self):
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 596; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  __Pyx_GIVEREF(((PyObject *)__pyx_t_1));
  __Pyx_GOTREF(__pyx_v_self->pylist);
  __Pyx_DECREF(__pyx_v_self->pylist);
  __pyx_v_self->pylist = ((PyObject *)__pyx_t_1);
  __pyx_t_1 = 0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("xmmsvalue.CollectionOperands.clear", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_op);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsvalue.pyx":592
 * 			self.pylist.remove(op)
 * 
 * 	cpdef clear(self):             # <<<<<<<<<<<<<<
 * 		cdef Collection op
 * 		for op in self.pylist:
 */

static PyObject *__pyx_pf_9xmmsvalue_18CollectionOperands_10clear(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pf_9xmmsvalue_18CollectionOperands_10clear(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("clear");
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((struct __pyx_vtabstruct_9xmmsvalue_CollectionOperands *)((struct __pyx_obj_9xmmsvalue_CollectionOperands *)__pyx_v_self)->__pyx_base.__pyx_vtab)->clear(((struct __pyx_obj_9xmmsvalue_CollectionOperands *)__pyx_v_self), 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 592; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("xmmsvalue.CollectionOperands.clear", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsvalue.pyx":598
 * 		self.pylist = []
 * 
 * 	cpdef list(self):             # <<<<<<<<<<<<<<
 * 		return self.pylist[:]
 * 
 */

static PyObject *__pyx_pf_9xmmsvalue_18CollectionOperands_11list(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_f_9xmmsvalue_18CollectionOperands_list(struct __pyx_obj_9xmmsvalue_CollectionOperands *__pyx_v_self, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("list");
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overriden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__list); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 598; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (void *)&__pyx_pf_9xmmsvalue_18CollectionOperands_11list)) {
      __Pyx_XDECREF(__pyx_r);
      __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 = 598; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "xmmsvalue.pyx":599
 * 
 * 	cpdef list(self):
 * 		return self.pylist[:]             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PySequence_GetSlice(__pyx_v_self->pylist, 0, PY_SSIZE_T_MAX); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 599; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("xmmsvalue.CollectionOperands.list", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsvalue.pyx":598
 * 		self.pylist = []
 * 
 * 	cpdef list(self):             # <<<<<<<<<<<<<<
 * 		return self.pylist[:]
 * 
 */

static PyObject *__pyx_pf_9xmmsvalue_18CollectionOperands_11list(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pf_9xmmsvalue_18CollectionOperands_11list(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("list");
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((struct __pyx_vtabstruct_9xmmsvalue_CollectionOperands *)((struct __pyx_obj_9xmmsvalue_CollectionOperands *)__pyx_v_self)->__pyx_base.__pyx_vtab)->list(((struct __pyx_obj_9xmmsvalue_CollectionOperands *)__pyx_v_self), 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 598; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("xmmsvalue.CollectionOperands.list", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsvalue.pyx":604
 * 
 * cdef class CollectionIDList(CollectionRef):
 * 	def __init__(self, Collection c):             # <<<<<<<<<<<<<<
 * 		if c.coll == NULL:
 * 			raise RuntimeError("Uninitialized collection")
 */

static int __pyx_pf_9xmmsvalue_16CollectionIDList___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pf_9xmmsvalue_16CollectionIDList___init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct __pyx_obj_9xmmsvalue_Collection *__pyx_v_c = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__c,0};
  __Pyx_RefNannySetupContext("__init__");
  {
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__c);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 604; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_c = ((struct __pyx_obj_9xmmsvalue_Collection *)values[0]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 1, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 604; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("xmmsvalue.CollectionIDList.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_c), __pyx_ptype_9xmmsvalue_Collection, 1, "c", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 604; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "xmmsvalue.pyx":605
 * cdef class CollectionIDList(CollectionRef):
 * 	def __init__(self, Collection c):
 * 		if c.coll == NULL:             # <<<<<<<<<<<<<<
 * 			raise RuntimeError("Uninitialized collection")
 * 		self.set_collection(c.coll)
 */
  __pyx_t_1 = (__pyx_v_c->__pyx_base.coll == NULL);
  if (__pyx_t_1) {

    /* "xmmsvalue.pyx":606
 * 	def __init__(self, Collection c):
 * 		if c.coll == NULL:
 * 			raise RuntimeError("Uninitialized collection")             # <<<<<<<<<<<<<<
 * 		self.set_collection(c.coll)
 * 
 */
    __pyx_t_2 = PyObject_Call(__pyx_builtin_RuntimeError, ((PyObject *)__pyx_k_tuple_35), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 606; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 606; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    goto __pyx_L6;
  }
  __pyx_L6:;

  /* "xmmsvalue.pyx":607
 * 		if c.coll == NULL:
 * 			raise RuntimeError("Uninitialized collection")
 * 		self.set_collection(c.coll)             # <<<<<<<<<<<<<<
 * 
 * 	def __len__(self):
 */
  __pyx_t_2 = ((struct __pyx_vtabstruct_9xmmsvalue_CollectionIDList *)((struct __pyx_obj_9xmmsvalue_CollectionIDList *)__pyx_v_self)->__pyx_base.__pyx_vtab)->__pyx_base.set_collection(((struct __pyx_obj_9xmmsvalue_CollectionRef *)__pyx_v_self), __pyx_v_c->__pyx_base.coll); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 607; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("xmmsvalue.CollectionIDList.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsvalue.pyx":609
 * 		self.set_collection(c.coll)
 * 
 * 	def __len__(self):             # <<<<<<<<<<<<<<
 * 		return xmmsv_coll_idlist_get_size(self.coll)
 * 
 */

static Py_ssize_t __pyx_pf_9xmmsvalue_16CollectionIDList_1__len__(PyObject *__pyx_v_self); /*proto*/
static Py_ssize_t __pyx_pf_9xmmsvalue_16CollectionIDList_1__len__(PyObject *__pyx_v_self) {
  Py_ssize_t __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__len__");

  /* "xmmsvalue.pyx":610
 * 
 * 	def __len__(self):
 * 		return xmmsv_coll_idlist_get_size(self.coll)             # <<<<<<<<<<<<<<
 * 
 * 	cpdef list(self):
 */
  __pyx_r = xmmsv_coll_idlist_get_size(((struct __pyx_obj_9xmmsvalue_CollectionIDList *)__pyx_v_self)->__pyx_base.coll);
  goto __pyx_L0;

  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsvalue.pyx":612
 * 		return xmmsv_coll_idlist_get_size(self.coll)
 * 
 * 	cpdef list(self):             # <<<<<<<<<<<<<<
 * 		"""Returns a _COPY_ of the idlist as an ordinary list"""
 * 		cdef int x
 */

static PyObject *__pyx_pf_9xmmsvalue_16CollectionIDList_2list(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_f_9xmmsvalue_16CollectionIDList_list(struct __pyx_obj_9xmmsvalue_CollectionIDList *__pyx_v_self, int __pyx_skip_dispatch) {
  int __pyx_v_x;
  int __pyx_v_l;
  int __pyx_v_i;
  PyObject *__pyx_v_res = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  int __pyx_t_4;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("list");
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overriden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__list); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 612; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (void *)&__pyx_pf_9xmmsvalue_16CollectionIDList_2list)) {
      __Pyx_XDECREF(__pyx_r);
      __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 = 612; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "xmmsvalue.pyx":617
 * 		cdef int l
 * 		cdef int i
 * 		l = xmmsv_coll_idlist_get_size(self.coll)             # <<<<<<<<<<<<<<
 * 		i = 0
 * 		res = []
 */
  __pyx_v_l = xmmsv_coll_idlist_get_size(__pyx_v_self->__pyx_base.coll);

  /* "xmmsvalue.pyx":618
 * 		cdef int i
 * 		l = xmmsv_coll_idlist_get_size(self.coll)
 * 		i = 0             # <<<<<<<<<<<<<<
 * 		res = []
 * 		while i < l:
 */
  __pyx_v_i = 0;

  /* "xmmsvalue.pyx":619
 * 		l = xmmsv_coll_idlist_get_size(self.coll)
 * 		i = 0
 * 		res = []             # <<<<<<<<<<<<<<
 * 		while i < l:
 * 			x = -1
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 619; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  __pyx_v_res = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "xmmsvalue.pyx":620
 * 		i = 0
 * 		res = []
 * 		while i < l:             # <<<<<<<<<<<<<<
 * 			x = -1
 * 			xmmsv_coll_idlist_get_index(self.coll, i, &x)
 */
  while (1) {
    __pyx_t_3 = (__pyx_v_i < __pyx_v_l);
    if (!__pyx_t_3) break;

    /* "xmmsvalue.pyx":621
 * 		res = []
 * 		while i < l:
 * 			x = -1             # <<<<<<<<<<<<<<
 * 			xmmsv_coll_idlist_get_index(self.coll, i, &x)
 * 			res.append(x)
 */
    __pyx_v_x = -1;

    /* "xmmsvalue.pyx":622
 * 		while i < l:
 * 			x = -1
 * 			xmmsv_coll_idlist_get_index(self.coll, i, &x)             # <<<<<<<<<<<<<<
 * 			res.append(x)
 * 			i = i + 1
 */
    xmmsv_coll_idlist_get_index(__pyx_v_self->__pyx_base.coll, __pyx_v_i, (&__pyx_v_x));

    /* "xmmsvalue.pyx":623
 * 			x = -1
 * 			xmmsv_coll_idlist_get_index(self.coll, i, &x)
 * 			res.append(x)             # <<<<<<<<<<<<<<
 * 			i = i + 1
 * 		return res
 */
    if (unlikely(((PyObject *)__pyx_v_res) == Py_None)) {
      PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", "append"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 623; __pyx_clineno = __LINE__; goto __pyx_L1_error;} 
    }
    __pyx_t_1 = PyInt_FromLong(__pyx_v_x); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 623; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_4 = PyList_Append(__pyx_v_res, __pyx_t_1); if (unlikely(__pyx_t_4 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 623; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "xmmsvalue.pyx":624
 * 			xmmsv_coll_idlist_get_index(self.coll, i, &x)
 * 			res.append(x)
 * 			i = i + 1             # <<<<<<<<<<<<<<
 * 		return res
 * 
 */
    __pyx_v_i = (__pyx_v_i + 1);
  }

  /* "xmmsvalue.pyx":625
 * 			res.append(x)
 * 			i = i + 1
 * 		return res             # <<<<<<<<<<<<<<
 * 
 * 	def __repr__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_res));
  __pyx_r = ((PyObject *)__pyx_v_res);
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("xmmsvalue.CollectionIDList.list", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_res);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsvalue.pyx":612
 * 		return xmmsv_coll_idlist_get_size(self.coll)
 * 
 * 	cpdef list(self):             # <<<<<<<<<<<<<<
 * 		"""Returns a _COPY_ of the idlist as an ordinary list"""
 * 		cdef int x
 */

static PyObject *__pyx_pf_9xmmsvalue_16CollectionIDList_2list(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static char __pyx_doc_9xmmsvalue_16CollectionIDList_2list[] = "Returns a _COPY_ of the idlist as an ordinary list";
static PyObject *__pyx_pf_9xmmsvalue_16CollectionIDList_2list(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("list");
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((struct __pyx_vtabstruct_9xmmsvalue_CollectionIDList *)((struct __pyx_obj_9xmmsvalue_CollectionIDList *)__pyx_v_self)->__pyx_base.__pyx_vtab)->list(((struct __pyx_obj_9xmmsvalue_CollectionIDList *)__pyx_v_self), 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 612; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("xmmsvalue.CollectionIDList.list", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsvalue.pyx":627
 * 		return res
 * 
 * 	def __repr__(self):             # <<<<<<<<<<<<<<
 * 		return repr(self.list())
 * 
 */

static PyObject *__pyx_pf_9xmmsvalue_16CollectionIDList_3__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pf_9xmmsvalue_16CollectionIDList_3__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__repr__");

  /* "xmmsvalue.pyx":628
 * 
 * 	def __repr__(self):
 * 		return repr(self.list())             # <<<<<<<<<<<<<<
 * 
 * 	def __iter__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((struct __pyx_vtabstruct_9xmmsvalue_CollectionIDList *)((struct __pyx_obj_9xmmsvalue_CollectionIDList *)__pyx_v_self)->__pyx_base.__pyx_vtab)->list(((struct __pyx_obj_9xmmsvalue_CollectionIDList *)__pyx_v_self), 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 628; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_Repr(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 628; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("xmmsvalue.CollectionIDList.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsvalue.pyx":630
 * 		return repr(self.list())
 * 
 * 	def __iter__(self):             # <<<<<<<<<<<<<<
 * 		return iter(self.list())
 * 
 */

static PyObject *__pyx_pf_9xmmsvalue_16CollectionIDList_4__iter__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pf_9xmmsvalue_16CollectionIDList_4__iter__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__iter__");

  /* "xmmsvalue.pyx":631
 * 
 * 	def __iter__(self):
 * 		return iter(self.list())             # <<<<<<<<<<<<<<
 * 
 * 	cpdef append(self, int v):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((struct __pyx_vtabstruct_9xmmsvalue_CollectionIDList *)((struct __pyx_obj_9xmmsvalue_CollectionIDList *)__pyx_v_self)->__pyx_base.__pyx_vtab)->list(((struct __pyx_obj_9xmmsvalue_CollectionIDList *)__pyx_v_self), 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 631; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_GetIter(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 631; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("xmmsvalue.CollectionIDList.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsvalue.pyx":633
 * 		return iter(self.list())
 * 
 * 	cpdef append(self, int v):             # <<<<<<<<<<<<<<
 * 		"""Appends an id to the idlist"""
 * 		xmmsv_coll_idlist_append(self.coll, v)
 */

static PyObject *__pyx_pf_9xmmsvalue_16CollectionIDList_5append(PyObject *__pyx_v_self, PyObject *__pyx_arg_v); /*proto*/
static PyObject *__pyx_f_9xmmsvalue_16CollectionIDList_append(struct __pyx_obj_9xmmsvalue_CollectionIDList *__pyx_v_self, int __pyx_v_v, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("append");
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overriden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__append); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 633; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (void *)&__pyx_pf_9xmmsvalue_16CollectionIDList_5append)) {
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = PyInt_FromLong(__pyx_v_v); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 633; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 633; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_3));
      PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
      __Pyx_GIVEREF(__pyx_t_2);
      __pyx_t_2 = 0;
      __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 633; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "xmmsvalue.pyx":635
 * 	cpdef append(self, int v):
 * 		"""Appends an id to the idlist"""
 * 		xmmsv_coll_idlist_append(self.coll, v)             # <<<<<<<<<<<<<<
 * 
 * 	cpdef extend(self, v):
 */
  xmmsv_coll_idlist_append(__pyx_v_self->__pyx_base.coll, __pyx_v_v);

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("xmmsvalue.CollectionIDList.append", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsvalue.pyx":633
 * 		return iter(self.list())
 * 
 * 	cpdef append(self, int v):             # <<<<<<<<<<<<<<
 * 		"""Appends an id to the idlist"""
 * 		xmmsv_coll_idlist_append(self.coll, v)
 */

static PyObject *__pyx_pf_9xmmsvalue_16CollectionIDList_5append(PyObject *__pyx_v_self, PyObject *__pyx_arg_v); /*proto*/
static char __pyx_doc_9xmmsvalue_16CollectionIDList_5append[] = "Appends an id to the idlist";
static PyObject *__pyx_pf_9xmmsvalue_16CollectionIDList_5append(PyObject *__pyx_v_self, PyObject *__pyx_arg_v) {
  int __pyx_v_v;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("append");
  assert(__pyx_arg_v); {
    __pyx_v_v = __Pyx_PyInt_AsInt(__pyx_arg_v); if (unlikely((__pyx_v_v == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 633; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("xmmsvalue.CollectionIDList.append", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((struct __pyx_vtabstruct_9xmmsvalue_CollectionIDList *)((struct __pyx_obj_9xmmsvalue_CollectionIDList *)__pyx_v_self)->__pyx_base.__pyx_vtab)->append(((struct __pyx_obj_9xmmsvalue_CollectionIDList *)__pyx_v_self), __pyx_v_v, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 633; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("xmmsvalue.CollectionIDList.append", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsvalue.pyx":637
 * 		xmmsv_coll_idlist_append(self.coll, v)
 * 
 * 	cpdef extend(self, v):             # <<<<<<<<<<<<<<
 * 		for a in v:
 * 			self.append(a)
 */

static PyObject *__pyx_pf_9xmmsvalue_16CollectionIDList_6extend(PyObject *__pyx_v_self, PyObject *__pyx_v_v); /*proto*/
static PyObject *__pyx_f_9xmmsvalue_16CollectionIDList_extend(struct __pyx_obj_9xmmsvalue_CollectionIDList *__pyx_v_self, PyObject *__pyx_v_v, int __pyx_skip_dispatch) {
  PyObject *__pyx_v_a = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  Py_ssize_t __pyx_t_4;
  PyObject *(*__pyx_t_5)(PyObject *);
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("extend");
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overriden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__extend); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 637; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (void *)&__pyx_pf_9xmmsvalue_16CollectionIDList_6extend)) {
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 637; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_2));
      __Pyx_INCREF(__pyx_v_v);
      PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_v);
      __Pyx_GIVEREF(__pyx_v_v);
      __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 = 637; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0;
      __pyx_r = __pyx_t_3;
      __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "xmmsvalue.pyx":638
 * 
 * 	cpdef extend(self, v):
 * 		for a in v:             # <<<<<<<<<<<<<<
 * 			self.append(a)
 * 
 */
  if (PyList_CheckExact(__pyx_v_v) || PyTuple_CheckExact(__pyx_v_v)) {
    __pyx_t_1 = __pyx_v_v; __Pyx_INCREF(__pyx_t_1); __pyx_t_4 = 0;
    __pyx_t_5 = NULL;
  } else {
    __pyx_t_4 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_v); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 638; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_5 = Py_TYPE(__pyx_t_1)->tp_iternext;
  }
  for (;;) {
    if (PyList_CheckExact(__pyx_t_1)) {
      if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_1)) break;
      __pyx_t_3 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_3); __pyx_t_4++;
    } else if (PyTuple_CheckExact(__pyx_t_1)) {
      if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
      __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_4); __Pyx_INCREF(__pyx_t_3); __pyx_t_4++;
    } else {
      __pyx_t_3 = __pyx_t_5(__pyx_t_1);
      if (unlikely(!__pyx_t_3)) {
        if (PyErr_Occurred()) {
          if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear();
          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 638; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_3);
    }
    __Pyx_XDECREF(__pyx_v_a);
    __pyx_v_a = __pyx_t_3;
    __pyx_t_3 = 0;

    /* "xmmsvalue.pyx":639
 * 	cpdef extend(self, v):
 * 		for a in v:
 * 			self.append(a)             # <<<<<<<<<<<<<<
 * 
 * 	def __iadd__(self, v):
 */
    __pyx_t_6 = __Pyx_PyInt_AsInt(__pyx_v_a); if (unlikely((__pyx_t_6 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 639; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_3 = ((struct __pyx_vtabstruct_9xmmsvalue_CollectionIDList *)__pyx_v_self->__pyx_base.__pyx_vtab)->append(__pyx_v_self, __pyx_t_6, 0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 639; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("xmmsvalue.CollectionIDList.extend", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_a);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsvalue.pyx":637
 * 		xmmsv_coll_idlist_append(self.coll, v)
 * 
 * 	cpdef extend(self, v):             # <<<<<<<<<<<<<<
 * 		for a in v:
 * 			self.append(a)
 */

static PyObject *__pyx_pf_9xmmsvalue_16CollectionIDList_6extend(PyObject *__pyx_v_self, PyObject *__pyx_v_v); /*proto*/
static PyObject *__pyx_pf_9xmmsvalue_16CollectionIDList_6extend(PyObject *__pyx_v_self, PyObject *__pyx_v_v) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("extend");
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((struct __pyx_vtabstruct_9xmmsvalue_CollectionIDList *)((struct __pyx_obj_9xmmsvalue_CollectionIDList *)__pyx_v_self)->__pyx_base.__pyx_vtab)->extend(((struct __pyx_obj_9xmmsvalue_CollectionIDList *)__pyx_v_self), __pyx_v_v, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 637; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("xmmsvalue.CollectionIDList.extend", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsvalue.pyx":641
 * 			self.append(a)
 * 
 * 	def __iadd__(self, v):             # <<<<<<<<<<<<<<
 * 		self.extend(v)
 * 		return self
 */

static PyObject *__pyx_pf_9xmmsvalue_16CollectionIDList_7__iadd__(PyObject *__pyx_v_self, PyObject *__pyx_v_v); /*proto*/
static PyObject *__pyx_pf_9xmmsvalue_16CollectionIDList_7__iadd__(PyObject *__pyx_v_self, PyObject *__pyx_v_v) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__iadd__");

  /* "xmmsvalue.pyx":642
 * 
 * 	def __iadd__(self, v):
 * 		self.extend(v)             # <<<<<<<<<<<<<<
 * 		return self
 * 
 */
  __pyx_t_1 = ((struct __pyx_vtabstruct_9xmmsvalue_CollectionIDList *)((struct __pyx_obj_9xmmsvalue_CollectionIDList *)__pyx_v_self)->__pyx_base.__pyx_vtab)->extend(((struct __pyx_obj_9xmmsvalue_CollectionIDList *)__pyx_v_self), __pyx_v_v, 0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 642; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "xmmsvalue.pyx":643
 * 	def __iadd__(self, v):
 * 		self.extend(v)
 * 		return self             # <<<<<<<<<<<<<<
 * 
 * 	cpdef insert(self, int v, int i):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_self);
  __pyx_r = __pyx_v_self;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("xmmsvalue.CollectionIDList.__iadd__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsvalue.pyx":645
 * 		return self
 * 
 * 	cpdef insert(self, int v, int i):             # <<<<<<<<<<<<<<
 * 		"""Inserts an id at specified position"""
 * 		if i < 0:
 */

static PyObject *__pyx_pf_9xmmsvalue_16CollectionIDList_8insert(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_9xmmsvalue_16CollectionIDList_insert(struct __pyx_obj_9xmmsvalue_CollectionIDList *__pyx_v_self, int __pyx_v_v, int __pyx_v_i, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  Py_ssize_t __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("insert");
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overriden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__insert); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 645; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (void *)&__pyx_pf_9xmmsvalue_16CollectionIDList_8insert)) {
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = PyInt_FromLong(__pyx_v_v); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 645; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = PyInt_FromLong(__pyx_v_i); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 645; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 645; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_4));
      PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
      __Pyx_GIVEREF(__pyx_t_2);
      PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3);
      __Pyx_GIVEREF(__pyx_t_3);
      __pyx_t_2 = 0;
      __pyx_t_3 = 0;
      __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 645; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
      __pyx_r = __pyx_t_3;
      __pyx_t_3 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "xmmsvalue.pyx":647
 * 	cpdef insert(self, int v, int i):
 * 		"""Inserts an id at specified position"""
 * 		if i < 0:             # <<<<<<<<<<<<<<
 * 			i = len(self) + i
 * 		if not xmmsv_coll_idlist_insert(self.coll, v, i):
 */
  __pyx_t_5 = (__pyx_v_i < 0);
  if (__pyx_t_5) {

    /* "xmmsvalue.pyx":648
 * 		"""Inserts an id at specified position"""
 * 		if i < 0:
 * 			i = len(self) + i             # <<<<<<<<<<<<<<
 * 		if not xmmsv_coll_idlist_insert(self.coll, v, i):
 * 			raise IndexError("Index out of range")
 */
    __pyx_t_6 = PyObject_Length(((PyObject *)__pyx_v_self)); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 648; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_v_i = (__pyx_t_6 + __pyx_v_i);
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "xmmsvalue.pyx":649
 * 		if i < 0:
 * 			i = len(self) + i
 * 		if not xmmsv_coll_idlist_insert(self.coll, v, i):             # <<<<<<<<<<<<<<
 * 			raise IndexError("Index out of range")
 * 
 */
  __pyx_t_5 = (!xmmsv_coll_idlist_insert(__pyx_v_self->__pyx_base.coll, __pyx_v_v, __pyx_v_i));
  if (__pyx_t_5) {

    /* "xmmsvalue.pyx":650
 * 			i = len(self) + i
 * 		if not xmmsv_coll_idlist_insert(self.coll, v, i):
 * 			raise IndexError("Index out of range")             # <<<<<<<<<<<<<<
 * 
 * 	cpdef remove(self, int i):
 */
    __pyx_t_1 = PyObject_Call(__pyx_builtin_IndexError, ((PyObject *)__pyx_k_tuple_36), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 650; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 650; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    goto __pyx_L4;
  }
  __pyx_L4:;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("xmmsvalue.CollectionIDList.insert", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsvalue.pyx":645
 * 		return self
 * 
 * 	cpdef insert(self, int v, int i):             # <<<<<<<<<<<<<<
 * 		"""Inserts an id at specified position"""
 * 		if i < 0:
 */

static PyObject *__pyx_pf_9xmmsvalue_16CollectionIDList_8insert(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static char __pyx_doc_9xmmsvalue_16CollectionIDList_8insert[] = "Inserts an id at specified position";
static PyObject *__pyx_pf_9xmmsvalue_16CollectionIDList_8insert(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_v_v;
  int __pyx_v_i;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__v,&__pyx_n_s__i,0};
  __Pyx_RefNannySetupContext("insert");
  {
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__v);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__i);
        if (likely(values[1])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("insert", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 645; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "insert") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 645; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_v = __Pyx_PyInt_AsInt(values[0]); if (unlikely((__pyx_v_v == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 645; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    __pyx_v_i = __Pyx_PyInt_AsInt(values[1]); if (unlikely((__pyx_v_i == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 645; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("insert", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 645; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("xmmsvalue.CollectionIDList.insert", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((struct __pyx_vtabstruct_9xmmsvalue_CollectionIDList *)((struct __pyx_obj_9xmmsvalue_CollectionIDList *)__pyx_v_self)->__pyx_base.__pyx_vtab)->insert(((struct __pyx_obj_9xmmsvalue_CollectionIDList *)__pyx_v_self), __pyx_v_v, __pyx_v_i, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 645; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("xmmsvalue.CollectionIDList.insert", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsvalue.pyx":652
 * 			raise IndexError("Index out of range")
 * 
 * 	cpdef remove(self, int i):             # <<<<<<<<<<<<<<
 * 		"""Removes entry at specified position"""
 * 		if i < 0:
 */

static PyObject *__pyx_pf_9xmmsvalue_16CollectionIDList_9remove(PyObject *__pyx_v_self, PyObject *__pyx_arg_i); /*proto*/
static PyObject *__pyx_f_9xmmsvalue_16CollectionIDList_remove(struct __pyx_obj_9xmmsvalue_CollectionIDList *__pyx_v_self, int __pyx_v_i, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  Py_ssize_t __pyx_t_5;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("remove");
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overriden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__remove); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 652; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (void *)&__pyx_pf_9xmmsvalue_16CollectionIDList_9remove)) {
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_2 = PyInt_FromLong(__pyx_v_i); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 652; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 652; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_3));
      PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2);
      __Pyx_GIVEREF(__pyx_t_2);
      __pyx_t_2 = 0;
      __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 652; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "xmmsvalue.pyx":654
 * 	cpdef remove(self, int i):
 * 		"""Removes entry at specified position"""
 * 		if i < 0:             # <<<<<<<<<<<<<<
 * 			i = len(self) + i
 * 		if not xmmsv_coll_idlist_remove(self.coll, i):
 */
  __pyx_t_4 = (__pyx_v_i < 0);
  if (__pyx_t_4) {

    /* "xmmsvalue.pyx":655
 * 		"""Removes entry at specified position"""
 * 		if i < 0:
 * 			i = len(self) + i             # <<<<<<<<<<<<<<
 * 		if not xmmsv_coll_idlist_remove(self.coll, i):
 * 			raise IndexError("Index out of range")
 */
    __pyx_t_5 = PyObject_Length(((PyObject *)__pyx_v_self)); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 655; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_v_i = (__pyx_t_5 + __pyx_v_i);
    goto __pyx_L3;
  }
  __pyx_L3:;

  /* "xmmsvalue.pyx":656
 * 		if i < 0:
 * 			i = len(self) + i
 * 		if not xmmsv_coll_idlist_remove(self.coll, i):             # <<<<<<<<<<<<<<
 * 			raise IndexError("Index out of range")
 * 
 */
  __pyx_t_4 = (!xmmsv_coll_idlist_remove(__pyx_v_self->__pyx_base.coll, __pyx_v_i));
  if (__pyx_t_4) {

    /* "xmmsvalue.pyx":657
 * 			i = len(self) + i
 * 		if not xmmsv_coll_idlist_remove(self.coll, i):
 * 			raise IndexError("Index out of range")             # <<<<<<<<<<<<<<
 * 
 * 	def __delitem__(self, int i):
 */
    __pyx_t_1 = PyObject_Call(__pyx_builtin_IndexError, ((PyObject *)__pyx_k_tuple_37), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 657; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 657; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    goto __pyx_L4;
  }
  __pyx_L4:;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("xmmsvalue.CollectionIDList.remove", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsvalue.pyx":652
 * 			raise IndexError("Index out of range")
 * 
 * 	cpdef remove(self, int i):             # <<<<<<<<<<<<<<
 * 		"""Removes entry at specified position"""
 * 		if i < 0:
 */

static PyObject *__pyx_pf_9xmmsvalue_16CollectionIDList_9remove(PyObject *__pyx_v_self, PyObject *__pyx_arg_i); /*proto*/
static char __pyx_doc_9xmmsvalue_16CollectionIDList_9remove[] = "Removes entry at specified position";
static PyObject *__pyx_pf_9xmmsvalue_16CollectionIDList_9remove(PyObject *__pyx_v_self, PyObject *__pyx_arg_i) {
  int __pyx_v_i;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("remove");
  assert(__pyx_arg_i); {
    __pyx_v_i = __Pyx_PyInt_AsInt(__pyx_arg_i); if (unlikely((__pyx_v_i == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 652; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("xmmsvalue.CollectionIDList.remove", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((struct __pyx_vtabstruct_9xmmsvalue_CollectionIDList *)((struct __pyx_obj_9xmmsvalue_CollectionIDList *)__pyx_v_self)->__pyx_base.__pyx_vtab)->remove(((struct __pyx_obj_9xmmsvalue_CollectionIDList *)__pyx_v_self), __pyx_v_i, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 652; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("xmmsvalue.CollectionIDList.remove", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsvalue.pyx":659
 * 			raise IndexError("Index out of range")
 * 
 * 	def __delitem__(self, int i):             # <<<<<<<<<<<<<<
 * 		if i < 0:
 * 			i = len(self) + i
 */

static int __pyx_pf_9xmmsvalue_16CollectionIDList_10__delitem__(PyObject *__pyx_v_self, PyObject *__pyx_arg_i); /*proto*/
static int __pyx_pf_9xmmsvalue_16CollectionIDList_10__delitem__(PyObject *__pyx_v_self, PyObject *__pyx_arg_i) {
  int __pyx_v_i;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  Py_ssize_t __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__delitem__");
  assert(__pyx_arg_i); {
    __pyx_v_i = __Pyx_PyInt_AsInt(__pyx_arg_i); if (unlikely((__pyx_v_i == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 659; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("xmmsvalue.CollectionIDList.__delitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;

  /* "xmmsvalue.pyx":660
 * 
 * 	def __delitem__(self, int i):
 * 		if i < 0:             # <<<<<<<<<<<<<<
 * 			i = len(self) + i
 * 		self.remove(i)
 */
  __pyx_t_1 = (__pyx_v_i < 0);
  if (__pyx_t_1) {

    /* "xmmsvalue.pyx":661
 * 	def __delitem__(self, int i):
 * 		if i < 0:
 * 			i = len(self) + i             # <<<<<<<<<<<<<<
 * 		self.remove(i)
 * 
 */
    __pyx_t_2 = PyObject_Length(__pyx_v_self); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 661; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_v_i = (__pyx_t_2 + __pyx_v_i);
    goto __pyx_L5;
  }
  __pyx_L5:;

  /* "xmmsvalue.pyx":662
 * 		if i < 0:
 * 			i = len(self) + i
 * 		self.remove(i)             # <<<<<<<<<<<<<<
 * 
 * 	def __getitem__(self, int i):
 */
  __pyx_t_3 = ((struct __pyx_vtabstruct_9xmmsvalue_CollectionIDList *)((struct __pyx_obj_9xmmsvalue_CollectionIDList *)__pyx_v_self)->__pyx_base.__pyx_vtab)->remove(((struct __pyx_obj_9xmmsvalue_CollectionIDList *)__pyx_v_self), __pyx_v_i, 0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 662; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("xmmsvalue.CollectionIDList.__delitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsvalue.pyx":664
 * 		self.remove(i)
 * 
 * 	def __getitem__(self, int i):             # <<<<<<<<<<<<<<
 * 		cdef int x = 0
 * 		if i < 0:
 */

static PyObject *__pyx_pf_9xmmsvalue_16CollectionIDList_11__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_arg_i); /*proto*/
static PyObject *__pyx_pf_9xmmsvalue_16CollectionIDList_11__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_arg_i) {
  int __pyx_v_i;
  int __pyx_v_x;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  Py_ssize_t __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__getitem__");
  assert(__pyx_arg_i); {
    __pyx_v_i = __Pyx_PyInt_AsInt(__pyx_arg_i); if (unlikely((__pyx_v_i == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 664; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("xmmsvalue.CollectionIDList.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;

  /* "xmmsvalue.pyx":665
 * 
 * 	def __getitem__(self, int i):
 * 		cdef int x = 0             # <<<<<<<<<<<<<<
 * 		if i < 0:
 * 			i = len(self) + i
 */
  __pyx_v_x = 0;

  /* "xmmsvalue.pyx":666
 * 	def __getitem__(self, int i):
 * 		cdef int x = 0
 * 		if i < 0:             # <<<<<<<<<<<<<<
 * 			i = len(self) + i
 * 		if not xmmsv_coll_idlist_get_index(self.coll, i, &x):
 */
  __pyx_t_1 = (__pyx_v_i < 0);
  if (__pyx_t_1) {

    /* "xmmsvalue.pyx":667
 * 		cdef int x = 0
 * 		if i < 0:
 * 			i = len(self) + i             # <<<<<<<<<<<<<<
 * 		if not xmmsv_coll_idlist_get_index(self.coll, i, &x):
 * 			raise IndexError("Index out of range")
 */
    __pyx_t_2 = PyObject_Length(__pyx_v_self); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 667; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_v_i = (__pyx_t_2 + __pyx_v_i);
    goto __pyx_L5;
  }
  __pyx_L5:;

  /* "xmmsvalue.pyx":668
 * 		if i < 0:
 * 			i = len(self) + i
 * 		if not xmmsv_coll_idlist_get_index(self.coll, i, &x):             # <<<<<<<<<<<<<<
 * 			raise IndexError("Index out of range")
 * 		return x
 */
  __pyx_t_1 = (!xmmsv_coll_idlist_get_index(((struct __pyx_obj_9xmmsvalue_CollectionIDList *)__pyx_v_self)->__pyx_base.coll, __pyx_v_i, (&__pyx_v_x)));
  if (__pyx_t_1) {

    /* "xmmsvalue.pyx":669
 * 			i = len(self) + i
 * 		if not xmmsv_coll_idlist_get_index(self.coll, i, &x):
 * 			raise IndexError("Index out of range")             # <<<<<<<<<<<<<<
 * 		return x
 * 
 */
    __pyx_t_3 = PyObject_Call(__pyx_builtin_IndexError, ((PyObject *)__pyx_k_tuple_38), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 669; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 669; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    goto __pyx_L6;
  }
  __pyx_L6:;

  /* "xmmsvalue.pyx":670
 * 		if not xmmsv_coll_idlist_get_index(self.coll, i, &x):
 * 			raise IndexError("Index out of range")
 * 		return x             # <<<<<<<<<<<<<<
 * 
 * 	def __setitem__(self, int i, int v):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = PyInt_FromLong(__pyx_v_x); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 670; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("xmmsvalue.CollectionIDList.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsvalue.pyx":672
 * 		return x
 * 
 * 	def __setitem__(self, int i, int v):             # <<<<<<<<<<<<<<
 * 		if i < 0:
 * 			i = len(self) + i
 */

static int __pyx_pf_9xmmsvalue_16CollectionIDList_12__setitem__(PyObject *__pyx_v_self, PyObject *__pyx_arg_i, PyObject *__pyx_arg_v); /*proto*/
static int __pyx_pf_9xmmsvalue_16CollectionIDList_12__setitem__(PyObject *__pyx_v_self, PyObject *__pyx_arg_i, PyObject *__pyx_arg_v) {
  int __pyx_v_i;
  int __pyx_v_v;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  Py_ssize_t __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setitem__");
  assert(__pyx_arg_i); {
    __pyx_v_i = __Pyx_PyInt_AsInt(__pyx_arg_i); if (unlikely((__pyx_v_i == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 672; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  }
  assert(__pyx_arg_v); {
    __pyx_v_v = __Pyx_PyInt_AsInt(__pyx_arg_v); if (unlikely((__pyx_v_v == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 672; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("xmmsvalue.CollectionIDList.__setitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;

  /* "xmmsvalue.pyx":673
 * 
 * 	def __setitem__(self, int i, int v):
 * 		if i < 0:             # <<<<<<<<<<<<<<
 * 			i = len(self) + i
 * 		if not xmmsv_coll_idlist_set_index(self.coll, i, v):
 */
  __pyx_t_1 = (__pyx_v_i < 0);
  if (__pyx_t_1) {

    /* "xmmsvalue.pyx":674
 * 	def __setitem__(self, int i, int v):
 * 		if i < 0:
 * 			i = len(self) + i             # <<<<<<<<<<<<<<
 * 		if not xmmsv_coll_idlist_set_index(self.coll, i, v):
 * 			raise IndexError("Index out of range")
 */
    __pyx_t_2 = PyObject_Length(__pyx_v_self); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 674; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_v_i = (__pyx_t_2 + __pyx_v_i);
    goto __pyx_L5;
  }
  __pyx_L5:;

  /* "xmmsvalue.pyx":675
 * 		if i < 0:
 * 			i = len(self) + i
 * 		if not xmmsv_coll_idlist_set_index(self.coll, i, v):             # <<<<<<<<<<<<<<
 * 			raise IndexError("Index out of range")
 * 
 */
  __pyx_t_1 = (!xmmsv_coll_idlist_set_index(((struct __pyx_obj_9xmmsvalue_CollectionIDList *)__pyx_v_self)->__pyx_base.coll, __pyx_v_i, __pyx_v_v));
  if (__pyx_t_1) {

    /* "xmmsvalue.pyx":676
 * 			i = len(self) + i
 * 		if not xmmsv_coll_idlist_set_index(self.coll, i, v):
 * 			raise IndexError("Index out of range")             # <<<<<<<<<<<<<<
 * 
 * 	cpdef clear(self):
 */
    __pyx_t_3 = PyObject_Call(__pyx_builtin_IndexError, ((PyObject *)__pyx_k_tuple_39), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 676; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 676; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    goto __pyx_L6;
  }
  __pyx_L6:;

  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("xmmsvalue.CollectionIDList.__setitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsvalue.pyx":678
 * 			raise IndexError("Index out of range")
 * 
 * 	cpdef clear(self):             # <<<<<<<<<<<<<<
 * 		xmmsv_coll_idlist_clear(self.coll)
 * 
 */

static PyObject *__pyx_pf_9xmmsvalue_16CollectionIDList_13clear(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_f_9xmmsvalue_16CollectionIDList_clear(struct __pyx_obj_9xmmsvalue_CollectionIDList *__pyx_v_self, int __pyx_skip_dispatch) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("clear");
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overriden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__clear); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 678; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (void *)&__pyx_pf_9xmmsvalue_16CollectionIDList_13clear)) {
      __Pyx_XDECREF(__pyx_r);
      __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 = 678; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "xmmsvalue.pyx":679
 * 
 * 	cpdef clear(self):
 * 		xmmsv_coll_idlist_clear(self.coll)             # <<<<<<<<<<<<<<
 * 
 * 
 */
  xmmsv_coll_idlist_clear(__pyx_v_self->__pyx_base.coll);

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("xmmsvalue.CollectionIDList.clear", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsvalue.pyx":678
 * 			raise IndexError("Index out of range")
 * 
 * 	cpdef clear(self):             # <<<<<<<<<<<<<<
 * 		xmmsv_coll_idlist_clear(self.coll)
 * 
 */

static PyObject *__pyx_pf_9xmmsvalue_16CollectionIDList_13clear(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pf_9xmmsvalue_16CollectionIDList_13clear(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("clear");
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = ((struct __pyx_vtabstruct_9xmmsvalue_CollectionIDList *)((struct __pyx_obj_9xmmsvalue_CollectionIDList *)__pyx_v_self)->__pyx_base.__pyx_vtab)->clear(((struct __pyx_obj_9xmmsvalue_CollectionIDList *)__pyx_v_self), 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 678; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("xmmsvalue.CollectionIDList.clear", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsvalue.pyx":687
 * 
 * class BaseCollection(CollectionWrapper):
 * 	def __init__(Collection self, int _colltype, **kargs):             # <<<<<<<<<<<<<<
 * 		self.coll = xmmsv_coll_new(<xmmsv_coll_type_t> _colltype)
 * 		if self.coll == NULL:
 */

static PyObject *__pyx_pf_9xmmsvalue_14BaseCollection___init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_9xmmsvalue_14BaseCollection___init__ = {__Pyx_NAMESTR("__init__"), (PyCFunction)__pyx_pf_9xmmsvalue_14BaseCollection___init__, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pf_9xmmsvalue_14BaseCollection___init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct __pyx_obj_9xmmsvalue_Collection *__pyx_v_self = 0;
  int __pyx_v__colltype;
  PyObject *__pyx_v_kargs = 0;
  PyObject *__pyx_v_operands = NULL;
  PyObject *__pyx_v_ids = NULL;
  PyObject *__pyx_v_k = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  Py_ssize_t __pyx_t_8;
  Py_ssize_t __pyx_t_9;
  PyObject *__pyx_t_10 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__self,&__pyx_n_s___colltype,0};
  __Pyx_RefNannySetupContext("__init__");
  __pyx_self = __pyx_self;
  __pyx_v_kargs = PyDict_New(); if (unlikely(!__pyx_v_kargs)) return NULL;
  __Pyx_GOTREF(__pyx_v_kargs);
  {
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__self);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s___colltype);
        if (likely(values[1])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 687; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kargs, values, PyTuple_GET_SIZE(__pyx_args), "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 687; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_self = ((struct __pyx_obj_9xmmsvalue_Collection *)values[0]);
    __pyx_v__colltype = __Pyx_PyInt_AsInt(values[1]); if (unlikely((__pyx_v__colltype == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 687; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 687; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_DECREF(__pyx_v_kargs); __pyx_v_kargs = 0;
  __Pyx_AddTraceback("xmmsvalue.BaseCollection.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_self), __pyx_ptype_9xmmsvalue_Collection, 1, "self", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 687; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "xmmsvalue.pyx":688
 * class BaseCollection(CollectionWrapper):
 * 	def __init__(Collection self, int _colltype, **kargs):
 * 		self.coll = xmmsv_coll_new(<xmmsv_coll_type_t> _colltype)             # <<<<<<<<<<<<<<
 * 		if self.coll == NULL:
 * 			raise RuntimeError("Bad collection")
 */
  __pyx_v_self->__pyx_base.coll = xmmsv_coll_new(((xmmsv_coll_type_t)__pyx_v__colltype));

  /* "xmmsvalue.pyx":689
 * 	def __init__(Collection self, int _colltype, **kargs):
 * 		self.coll = xmmsv_coll_new(<xmmsv_coll_type_t> _colltype)
 * 		if self.coll == NULL:             # <<<<<<<<<<<<<<
 * 			raise RuntimeError("Bad collection")
 * 
 */
  __pyx_t_1 = (__pyx_v_self->__pyx_base.coll == NULL);
  if (__pyx_t_1) {

    /* "xmmsvalue.pyx":690
 * 		self.coll = xmmsv_coll_new(<xmmsv_coll_type_t> _colltype)
 * 		if self.coll == NULL:
 * 			raise RuntimeError("Bad collection")             # <<<<<<<<<<<<<<
 * 
 * 		operands = kargs.pop("operands", None)
 */
    __pyx_t_2 = PyObject_Call(__pyx_builtin_RuntimeError, ((PyObject *)__pyx_k_tuple_41), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 690; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 690; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    goto __pyx_L6;
  }
  __pyx_L6:;

  /* "xmmsvalue.pyx":692
 * 			raise RuntimeError("Bad collection")
 * 
 * 		operands = kargs.pop("operands", None)             # <<<<<<<<<<<<<<
 * 		if operands:
 * 			self.operands = operands
 */
  __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_kargs), __pyx_n_s__pop); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 692; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_k_tuple_42), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 692; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_v_operands = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "xmmsvalue.pyx":693
 * 
 * 		operands = kargs.pop("operands", None)
 * 		if operands:             # <<<<<<<<<<<<<<
 * 			self.operands = operands
 * 		ids = kargs.pop("ids", None)
 */
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_operands); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 693; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__pyx_t_1) {

    /* "xmmsvalue.pyx":694
 * 		operands = kargs.pop("operands", None)
 * 		if operands:
 * 			self.operands = operands             # <<<<<<<<<<<<<<
 * 		ids = kargs.pop("ids", None)
 * 		if ids:
 */
    if (PyObject_SetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__operands, __pyx_v_operands) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 694; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    goto __pyx_L7;
  }
  __pyx_L7:;

  /* "xmmsvalue.pyx":695
 * 		if operands:
 * 			self.operands = operands
 * 		ids = kargs.pop("ids", None)             # <<<<<<<<<<<<<<
 * 		if ids:
 * 			try:
 */
  __pyx_t_3 = PyObject_GetAttr(((PyObject *)__pyx_v_kargs), __pyx_n_s__pop); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 695; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_k_tuple_43), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 695; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_v_ids = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "xmmsvalue.pyx":696
 * 			self.operands = operands
 * 		ids = kargs.pop("ids", None)
 * 		if ids:             # <<<<<<<<<<<<<<
 * 			try:
 * 				self.ids = ids
 */
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_ids); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 696; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__pyx_t_1) {

    /* "xmmsvalue.pyx":697
 * 		ids = kargs.pop("ids", None)
 * 		if ids:
 * 			try:             # <<<<<<<<<<<<<<
 * 				self.ids = ids
 * 			except TypeError: # Just ignore idlist when illegal
 */
    {
      __Pyx_ExceptionSave(&__pyx_t_4, &__pyx_t_5, &__pyx_t_6);
      __Pyx_XGOTREF(__pyx_t_4);
      __Pyx_XGOTREF(__pyx_t_5);
      __Pyx_XGOTREF(__pyx_t_6);
      /*try:*/ {

        /* "xmmsvalue.pyx":698
 * 		if ids:
 * 			try:
 * 				self.ids = ids             # <<<<<<<<<<<<<<
 * 			except TypeError: # Just ignore idlist when illegal
 * 				pass
 */
        if (PyObject_SetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__ids, __pyx_v_ids) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 698; __pyx_clineno = __LINE__; goto __pyx_L9_error;}
      }
      __Pyx_XDECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
      goto __pyx_L16_try_end;
      __pyx_L9_error:;
      __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;

      /* "xmmsvalue.pyx":699
 * 			try:
 * 				self.ids = ids
 * 			except TypeError: # Just ignore idlist when illegal             # <<<<<<<<<<<<<<
 * 				pass
 * 		for k in kargs:
 */
      __pyx_t_7 = PyErr_ExceptionMatches(__pyx_builtin_TypeError);
      if (__pyx_t_7) {
        PyErr_Restore(0,0,0);
        goto __pyx_L10_exception_handled;
      }
      __Pyx_XGIVEREF(__pyx_t_4);
      __Pyx_XGIVEREF(__pyx_t_5);
      __Pyx_XGIVEREF(__pyx_t_6);
      __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6);
      goto __pyx_L1_error;
      __pyx_L10_exception_handled:;
      __Pyx_XGIVEREF(__pyx_t_4);
      __Pyx_XGIVEREF(__pyx_t_5);
      __Pyx_XGIVEREF(__pyx_t_6);
      __Pyx_ExceptionReset(__pyx_t_4, __pyx_t_5, __pyx_t_6);
      __pyx_L16_try_end:;
    }
    goto __pyx_L8;
  }
  __pyx_L8:;

  /* "xmmsvalue.pyx":701
 * 			except TypeError: # Just ignore idlist when illegal
 * 				pass
 * 		for k in kargs:             # <<<<<<<<<<<<<<
 * 			self.attributes[k] = kargs[k]
 * 
 */
  __Pyx_INCREF(((PyObject *)__pyx_v_kargs));
  __Pyx_XDECREF(__pyx_t_2);
  __pyx_t_2 = ((PyObject *)__pyx_v_kargs);
  __pyx_t_8 = 0;
  __pyx_t_9 = PyDict_Size(__pyx_t_2);
  while (1) {
    if (unlikely(__pyx_t_9 != PyDict_Size(__pyx_t_2))) {
      PyErr_SetString(PyExc_RuntimeError, "dictionary changed size during iteration"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 701; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    if (!PyDict_Next(__pyx_t_2, (&__pyx_t_8), (&__pyx_t_6), NULL)) break;
    __Pyx_INCREF(((PyObject *)__pyx_t_6));
    __Pyx_XDECREF(__pyx_v_k);
    __pyx_v_k = __pyx_t_6;

    /* "xmmsvalue.pyx":702
 * 				pass
 * 		for k in kargs:
 * 			self.attributes[k] = kargs[k]             # <<<<<<<<<<<<<<
 * 
 * class Reference(BaseCollection):
 */
    __pyx_t_3 = __Pyx_PyDict_GetItem(((PyObject *)__pyx_v_kargs), __pyx_v_k); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 702; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_10 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__attributes); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 702; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_10);
    if (PyObject_SetItem(__pyx_t_10, __pyx_v_k, __pyx_t_3) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 702; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  }
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_10);
  __Pyx_AddTraceback("xmmsvalue.BaseCollection.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_kargs);
  __Pyx_XDECREF(__pyx_v_operands);
  __Pyx_XDECREF(__pyx_v_ids);
  __Pyx_XDECREF(__pyx_v_k);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsvalue.pyx":705
 * 
 * class Reference(BaseCollection):
 * 	def __init__(Collection self, ref, ns="Collections"):             # <<<<<<<<<<<<<<
 * 		BaseCollection.__init__(self, XMMS_COLLECTION_TYPE_REFERENCE,
 * 				namespace=ns, reference=ref)
 */

static PyObject *__pyx_pf_9xmmsvalue_9Reference___init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_9xmmsvalue_9Reference___init__ = {__Pyx_NAMESTR("__init__"), (PyCFunction)__pyx_pf_9xmmsvalue_9Reference___init__, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pf_9xmmsvalue_9Reference___init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct __pyx_obj_9xmmsvalue_Collection *__pyx_v_self = 0;
  PyObject *__pyx_v_ref = 0;
  PyObject *__pyx_v_ns = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__self,&__pyx_n_s__ref,&__pyx_n_s__ns,0};
  __Pyx_RefNannySetupContext("__init__");
  __pyx_self = __pyx_self;
  {
    PyObject* values[3] = {0,0,0};
    values[2] = ((PyObject *)__pyx_n_s__Collections);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__self);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__ref);
        if (likely(values[1])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 705; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  2:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__ns);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 705; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = ((struct __pyx_obj_9xmmsvalue_Collection *)values[0]);
    __pyx_v_ref = values[1];
    __pyx_v_ns = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 705; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("xmmsvalue.Reference.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_self), __pyx_ptype_9xmmsvalue_Collection, 1, "self", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 705; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "xmmsvalue.pyx":706
 * class Reference(BaseCollection):
 * 	def __init__(Collection self, ref, ns="Collections"):
 * 		BaseCollection.__init__(self, XMMS_COLLECTION_TYPE_REFERENCE,             # <<<<<<<<<<<<<<
 * 				namespace=ns, reference=ref)
 * 
 */
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__BaseCollection); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 706; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s____init__); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 706; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyInt_FromLong(XMMS_COLLECTION_TYPE_REFERENCE); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 706; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 706; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_3));
  __Pyx_INCREF(((PyObject *)__pyx_v_self));
  PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_self));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 706; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));

  /* "xmmsvalue.pyx":707
 * 	def __init__(Collection self, ref, ns="Collections"):
 * 		BaseCollection.__init__(self, XMMS_COLLECTION_TYPE_REFERENCE,
 * 				namespace=ns, reference=ref)             # <<<<<<<<<<<<<<
 * 
 * class Universe(Reference):
 */
  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__namespace), __pyx_v_ns) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 706; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__reference), __pyx_v_ref) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 706; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_4 = PyEval_CallObjectWithKeywords(__pyx_t_2, ((PyObject *)__pyx_t_3), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 706; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("xmmsvalue.Reference.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsvalue.pyx":710
 * 
 * class Universe(Reference):
 * 	def __init__(self):             # <<<<<<<<<<<<<<
 * 		Reference.__init__(self, "All Media")
 * 
 */

static PyObject *__pyx_pf_9xmmsvalue_8Universe___init__(PyObject *__pyx_self, PyObject *__pyx_v_self); /*proto*/
static PyMethodDef __pyx_mdef_9xmmsvalue_8Universe___init__ = {__Pyx_NAMESTR("__init__"), (PyCFunction)__pyx_pf_9xmmsvalue_8Universe___init__, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pf_9xmmsvalue_8Universe___init__(PyObject *__pyx_self, PyObject *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__init__");
  __pyx_self = __pyx_self;

  /* "xmmsvalue.pyx":711
 * class Universe(Reference):
 * 	def __init__(self):
 * 		Reference.__init__(self, "All Media")             # <<<<<<<<<<<<<<
 * 
 * class FilterCollection(BaseCollection):
 */
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__Reference); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 711; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s____init__); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 711; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 711; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  __Pyx_INCREF(__pyx_v_self);
  PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self);
  __Pyx_GIVEREF(__pyx_v_self);
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_44));
  PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_kp_s_44));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_44));
  __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 = 711; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("xmmsvalue.Universe.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsvalue.pyx":714
 * 
 * class FilterCollection(BaseCollection):
 * 	def __init__(Collection self, operation, parent=None, **kv):             # <<<<<<<<<<<<<<
 * 		if parent is None:
 * 			parent = Universe()
 */

static PyObject *__pyx_pf_9xmmsvalue_16FilterCollection___init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_9xmmsvalue_16FilterCollection___init__ = {__Pyx_NAMESTR("__init__"), (PyCFunction)__pyx_pf_9xmmsvalue_16FilterCollection___init__, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pf_9xmmsvalue_16FilterCollection___init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct __pyx_obj_9xmmsvalue_Collection *__pyx_v_self = 0;
  PyObject *__pyx_v_operation = 0;
  PyObject *__pyx_v_parent = 0;
  PyObject *__pyx_v_kv = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__self,&__pyx_n_s__operation,&__pyx_n_s__parent,0};
  __Pyx_RefNannySetupContext("__init__");
  __pyx_self = __pyx_self;
  __pyx_v_kv = PyDict_New(); if (unlikely(!__pyx_v_kv)) return NULL;
  __Pyx_GOTREF(__pyx_v_kv);
  {
    PyObject* values[3] = {0,0,0};
    values[2] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__self);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__operation);
        if (likely(values[1])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 714; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
        case  2:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__parent);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kv, values, PyTuple_GET_SIZE(__pyx_args), "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 714; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = ((struct __pyx_obj_9xmmsvalue_Collection *)values[0]);
    __pyx_v_operation = values[1];
    __pyx_v_parent = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 714; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_DECREF(__pyx_v_kv); __pyx_v_kv = 0;
  __Pyx_AddTraceback("xmmsvalue.FilterCollection.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __Pyx_INCREF(__pyx_v_parent);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_self), __pyx_ptype_9xmmsvalue_Collection, 1, "self", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 714; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "xmmsvalue.pyx":715
 * class FilterCollection(BaseCollection):
 * 	def __init__(Collection self, operation, parent=None, **kv):
 * 		if parent is None:             # <<<<<<<<<<<<<<
 * 			parent = Universe()
 * 		BaseCollection.__init__(self, operation, operands=[parent], **kv)
 */
  __pyx_t_1 = (__pyx_v_parent == Py_None);
  if (__pyx_t_1) {

    /* "xmmsvalue.pyx":716
 * 	def __init__(Collection self, operation, parent=None, **kv):
 * 		if parent is None:
 * 			parent = Universe()             # <<<<<<<<<<<<<<
 * 		BaseCollection.__init__(self, operation, operands=[parent], **kv)
 * 
 */
    __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__Universe); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 716; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 716; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_v_parent);
    __pyx_v_parent = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L6;
  }
  __pyx_L6:;

  /* "xmmsvalue.pyx":717
 * 		if parent is None:
 * 			parent = Universe()
 * 		BaseCollection.__init__(self, operation, operands=[parent], **kv)             # <<<<<<<<<<<<<<
 * 
 * class Equals(FilterCollection):
 */
  __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__BaseCollection); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 717; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s____init__); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 717; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 717; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_3));
  __Pyx_INCREF(((PyObject *)__pyx_v_self));
  PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_self));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
  __Pyx_INCREF(__pyx_v_operation);
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_operation);
  __Pyx_GIVEREF(__pyx_v_operation);
  __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 717; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_4));
  __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 717; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_5));
  __Pyx_INCREF(__pyx_v_parent);
  PyList_SET_ITEM(__pyx_t_5, 0, __pyx_v_parent);
  __Pyx_GIVEREF(__pyx_v_parent);
  if (PyDict_SetItem(__pyx_t_4, ((PyObject *)__pyx_n_s__operands), ((PyObject *)__pyx_t_5)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 717; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
  if (PyDict_Update(((PyObject *)__pyx_t_4), ((PyObject *)__pyx_v_kv)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 717; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_5 = PyEval_CallObjectWithKeywords(__pyx_t_2, ((PyObject *)__pyx_t_3), ((PyObject *)__pyx_t_4)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 717; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("xmmsvalue.FilterCollection.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_kv);
  __Pyx_XDECREF(__pyx_v_parent);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsvalue.pyx":720
 * 
 * class Equals(FilterCollection):
 * 	def __init__(Collection self, parent=None, **kv):             # <<<<<<<<<<<<<<
 * 		FilterCollection.__init__(self, XMMS_COLLECTION_TYPE_EQUALS, parent, **kv)
 * 
 */

static PyObject *__pyx_pf_9xmmsvalue_6Equals___init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_9xmmsvalue_6Equals___init__ = {__Pyx_NAMESTR("__init__"), (PyCFunction)__pyx_pf_9xmmsvalue_6Equals___init__, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pf_9xmmsvalue_6Equals___init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct __pyx_obj_9xmmsvalue_Collection *__pyx_v_self = 0;
  PyObject *__pyx_v_parent = 0;
  PyObject *__pyx_v_kv = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__self,&__pyx_n_s__parent,0};
  __Pyx_RefNannySetupContext("__init__");
  __pyx_self = __pyx_self;
  __pyx_v_kv = PyDict_New(); if (unlikely(!__pyx_v_kv)) return NULL;
  __Pyx_GOTREF(__pyx_v_kv);
  {
    PyObject* values[2] = {0,0};
    values[1] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__self);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__parent);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kv, values, PyTuple_GET_SIZE(__pyx_args), "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 720; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = ((struct __pyx_obj_9xmmsvalue_Collection *)values[0]);
    __pyx_v_parent = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 720; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_DECREF(__pyx_v_kv); __pyx_v_kv = 0;
  __Pyx_AddTraceback("xmmsvalue.Equals.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_self), __pyx_ptype_9xmmsvalue_Collection, 1, "self", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 720; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "xmmsvalue.pyx":721
 * class Equals(FilterCollection):
 * 	def __init__(Collection self, parent=None, **kv):
 * 		FilterCollection.__init__(self, XMMS_COLLECTION_TYPE_EQUALS, parent, **kv)             # <<<<<<<<<<<<<<
 * 
 * class Smaller(FilterCollection):
 */
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__FilterCollection); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 721; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s____init__); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 721; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyInt_FromLong(XMMS_COLLECTION_TYPE_EQUALS); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 721; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 721; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_3));
  __Pyx_INCREF(((PyObject *)__pyx_v_self));
  PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_self));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_parent);
  PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_parent);
  __Pyx_GIVEREF(__pyx_v_parent);
  __pyx_t_1 = 0;
  __pyx_t_1 = PyEval_CallObjectWithKeywords(__pyx_t_2, ((PyObject *)__pyx_t_3), ((PyObject *)__pyx_v_kv)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 721; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("xmmsvalue.Equals.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_kv);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsvalue.pyx":724
 * 
 * class Smaller(FilterCollection):
 * 	def __init__(Collection self, parent=None, **kv):             # <<<<<<<<<<<<<<
 * 		FilterCollection.__init__(self, XMMS_COLLECTION_TYPE_SMALLER, parent, **kv)
 * 
 */

static PyObject *__pyx_pf_9xmmsvalue_7Smaller___init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_9xmmsvalue_7Smaller___init__ = {__Pyx_NAMESTR("__init__"), (PyCFunction)__pyx_pf_9xmmsvalue_7Smaller___init__, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pf_9xmmsvalue_7Smaller___init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct __pyx_obj_9xmmsvalue_Collection *__pyx_v_self = 0;
  PyObject *__pyx_v_parent = 0;
  PyObject *__pyx_v_kv = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__self,&__pyx_n_s__parent,0};
  __Pyx_RefNannySetupContext("__init__");
  __pyx_self = __pyx_self;
  __pyx_v_kv = PyDict_New(); if (unlikely(!__pyx_v_kv)) return NULL;
  __Pyx_GOTREF(__pyx_v_kv);
  {
    PyObject* values[2] = {0,0};
    values[1] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__self);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__parent);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kv, values, PyTuple_GET_SIZE(__pyx_args), "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 724; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = ((struct __pyx_obj_9xmmsvalue_Collection *)values[0]);
    __pyx_v_parent = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 724; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_DECREF(__pyx_v_kv); __pyx_v_kv = 0;
  __Pyx_AddTraceback("xmmsvalue.Smaller.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_self), __pyx_ptype_9xmmsvalue_Collection, 1, "self", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 724; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "xmmsvalue.pyx":725
 * class Smaller(FilterCollection):
 * 	def __init__(Collection self, parent=None, **kv):
 * 		FilterCollection.__init__(self, XMMS_COLLECTION_TYPE_SMALLER, parent, **kv)             # <<<<<<<<<<<<<<
 * 
 * class Greater(FilterCollection):
 */
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__FilterCollection); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 725; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s____init__); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 725; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyInt_FromLong(XMMS_COLLECTION_TYPE_SMALLER); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 725; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 725; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_3));
  __Pyx_INCREF(((PyObject *)__pyx_v_self));
  PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_self));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_parent);
  PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_parent);
  __Pyx_GIVEREF(__pyx_v_parent);
  __pyx_t_1 = 0;
  __pyx_t_1 = PyEval_CallObjectWithKeywords(__pyx_t_2, ((PyObject *)__pyx_t_3), ((PyObject *)__pyx_v_kv)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 725; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("xmmsvalue.Smaller.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_kv);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsvalue.pyx":728
 * 
 * class Greater(FilterCollection):
 * 	def __init__(Collection self, parent=None, **kv):             # <<<<<<<<<<<<<<
 * 		FilterCollection.__init__(self, XMMS_COLLECTION_TYPE_GREATER, parent, **kv)
 * 
 */

static PyObject *__pyx_pf_9xmmsvalue_7Greater___init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_9xmmsvalue_7Greater___init__ = {__Pyx_NAMESTR("__init__"), (PyCFunction)__pyx_pf_9xmmsvalue_7Greater___init__, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pf_9xmmsvalue_7Greater___init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct __pyx_obj_9xmmsvalue_Collection *__pyx_v_self = 0;
  PyObject *__pyx_v_parent = 0;
  PyObject *__pyx_v_kv = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__self,&__pyx_n_s__parent,0};
  __Pyx_RefNannySetupContext("__init__");
  __pyx_self = __pyx_self;
  __pyx_v_kv = PyDict_New(); if (unlikely(!__pyx_v_kv)) return NULL;
  __Pyx_GOTREF(__pyx_v_kv);
  {
    PyObject* values[2] = {0,0};
    values[1] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__self);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__parent);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kv, values, PyTuple_GET_SIZE(__pyx_args), "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 728; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = ((struct __pyx_obj_9xmmsvalue_Collection *)values[0]);
    __pyx_v_parent = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 728; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_DECREF(__pyx_v_kv); __pyx_v_kv = 0;
  __Pyx_AddTraceback("xmmsvalue.Greater.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_self), __pyx_ptype_9xmmsvalue_Collection, 1, "self", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 728; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "xmmsvalue.pyx":729
 * class Greater(FilterCollection):
 * 	def __init__(Collection self, parent=None, **kv):
 * 		FilterCollection.__init__(self, XMMS_COLLECTION_TYPE_GREATER, parent, **kv)             # <<<<<<<<<<<<<<
 * 
 * class Match(FilterCollection):
 */
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__FilterCollection); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 729; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s____init__); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 729; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyInt_FromLong(XMMS_COLLECTION_TYPE_GREATER); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 729; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 729; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_3));
  __Pyx_INCREF(((PyObject *)__pyx_v_self));
  PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_self));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_parent);
  PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_parent);
  __Pyx_GIVEREF(__pyx_v_parent);
  __pyx_t_1 = 0;
  __pyx_t_1 = PyEval_CallObjectWithKeywords(__pyx_t_2, ((PyObject *)__pyx_t_3), ((PyObject *)__pyx_v_kv)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 729; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("xmmsvalue.Greater.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_kv);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsvalue.pyx":732
 * 
 * class Match(FilterCollection):
 * 	def __init__(Collection self, parent=None, **kv):             # <<<<<<<<<<<<<<
 * 		FilterCollection.__init__(self, XMMS_COLLECTION_TYPE_MATCH, parent, **kv)
 * 
 */

static PyObject *__pyx_pf_9xmmsvalue_5Match___init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_9xmmsvalue_5Match___init__ = {__Pyx_NAMESTR("__init__"), (PyCFunction)__pyx_pf_9xmmsvalue_5Match___init__, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pf_9xmmsvalue_5Match___init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct __pyx_obj_9xmmsvalue_Collection *__pyx_v_self = 0;
  PyObject *__pyx_v_parent = 0;
  PyObject *__pyx_v_kv = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__self,&__pyx_n_s__parent,0};
  __Pyx_RefNannySetupContext("__init__");
  __pyx_self = __pyx_self;
  __pyx_v_kv = PyDict_New(); if (unlikely(!__pyx_v_kv)) return NULL;
  __Pyx_GOTREF(__pyx_v_kv);
  {
    PyObject* values[2] = {0,0};
    values[1] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__self);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__parent);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kv, values, PyTuple_GET_SIZE(__pyx_args), "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 732; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = ((struct __pyx_obj_9xmmsvalue_Collection *)values[0]);
    __pyx_v_parent = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 732; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_DECREF(__pyx_v_kv); __pyx_v_kv = 0;
  __Pyx_AddTraceback("xmmsvalue.Match.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_self), __pyx_ptype_9xmmsvalue_Collection, 1, "self", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 732; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "xmmsvalue.pyx":733
 * class Match(FilterCollection):
 * 	def __init__(Collection self, parent=None, **kv):
 * 		FilterCollection.__init__(self, XMMS_COLLECTION_TYPE_MATCH, parent, **kv)             # <<<<<<<<<<<<<<
 * 
 * class Has(FilterCollection):
 */
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__FilterCollection); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 733; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s____init__); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 733; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyInt_FromLong(XMMS_COLLECTION_TYPE_MATCH); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 733; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 733; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_3));
  __Pyx_INCREF(((PyObject *)__pyx_v_self));
  PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_self));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_parent);
  PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_parent);
  __Pyx_GIVEREF(__pyx_v_parent);
  __pyx_t_1 = 0;
  __pyx_t_1 = PyEval_CallObjectWithKeywords(__pyx_t_2, ((PyObject *)__pyx_t_3), ((PyObject *)__pyx_v_kv)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 733; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("xmmsvalue.Match.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_kv);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsvalue.pyx":736
 * 
 * class Has(FilterCollection):
 * 	def __init__(Collection self, parent=None, **kv):             # <<<<<<<<<<<<<<
 * 		FilterCollection.__init__(self, XMMS_COLLECTION_TYPE_HAS, parent, **kv)
 * 
 */

static PyObject *__pyx_pf_9xmmsvalue_3Has___init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_9xmmsvalue_3Has___init__ = {__Pyx_NAMESTR("__init__"), (PyCFunction)__pyx_pf_9xmmsvalue_3Has___init__, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pf_9xmmsvalue_3Has___init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct __pyx_obj_9xmmsvalue_Collection *__pyx_v_self = 0;
  PyObject *__pyx_v_parent = 0;
  PyObject *__pyx_v_kv = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__self,&__pyx_n_s__parent,0};
  __Pyx_RefNannySetupContext("__init__");
  __pyx_self = __pyx_self;
  __pyx_v_kv = PyDict_New(); if (unlikely(!__pyx_v_kv)) return NULL;
  __Pyx_GOTREF(__pyx_v_kv);
  {
    PyObject* values[2] = {0,0};
    values[1] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__self);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__parent);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, __pyx_v_kv, values, PyTuple_GET_SIZE(__pyx_args), "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 736; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = ((struct __pyx_obj_9xmmsvalue_Collection *)values[0]);
    __pyx_v_parent = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 736; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_DECREF(__pyx_v_kv); __pyx_v_kv = 0;
  __Pyx_AddTraceback("xmmsvalue.Has.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_self), __pyx_ptype_9xmmsvalue_Collection, 1, "self", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 736; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "xmmsvalue.pyx":737
 * class Has(FilterCollection):
 * 	def __init__(Collection self, parent=None, **kv):
 * 		FilterCollection.__init__(self, XMMS_COLLECTION_TYPE_HAS, parent, **kv)             # <<<<<<<<<<<<<<
 * 
 * class IDList(BaseCollection):
 */
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__FilterCollection); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 737; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s____init__); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 737; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyInt_FromLong(XMMS_COLLECTION_TYPE_HAS); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 737; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 737; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_3));
  __Pyx_INCREF(((PyObject *)__pyx_v_self));
  PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_self));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __Pyx_INCREF(__pyx_v_parent);
  PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_parent);
  __Pyx_GIVEREF(__pyx_v_parent);
  __pyx_t_1 = 0;
  __pyx_t_1 = PyEval_CallObjectWithKeywords(__pyx_t_2, ((PyObject *)__pyx_t_3), ((PyObject *)__pyx_v_kv)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 737; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("xmmsvalue.Has.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_kv);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsvalue.pyx":740
 * 
 * class IDList(BaseCollection):
 * 	def __init__(Collection self, ids = None):             # <<<<<<<<<<<<<<
 * 		BaseCollection.__init__(self, XMMS_COLLECTION_TYPE_IDLIST, ids=ids)
 * 
 */

static PyObject *__pyx_pf_9xmmsvalue_6IDList___init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_9xmmsvalue_6IDList___init__ = {__Pyx_NAMESTR("__init__"), (PyCFunction)__pyx_pf_9xmmsvalue_6IDList___init__, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pf_9xmmsvalue_6IDList___init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct __pyx_obj_9xmmsvalue_Collection *__pyx_v_self = 0;
  PyObject *__pyx_v_ids = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__self,&__pyx_n_s__ids,0};
  __Pyx_RefNannySetupContext("__init__");
  __pyx_self = __pyx_self;
  {
    PyObject* values[2] = {0,0};
    values[1] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__self);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__ids);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 740; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = ((struct __pyx_obj_9xmmsvalue_Collection *)values[0]);
    __pyx_v_ids = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 740; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("xmmsvalue.IDList.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_self), __pyx_ptype_9xmmsvalue_Collection, 1, "self", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 740; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "xmmsvalue.pyx":741
 * class IDList(BaseCollection):
 * 	def __init__(Collection self, ids = None):
 * 		BaseCollection.__init__(self, XMMS_COLLECTION_TYPE_IDLIST, ids=ids)             # <<<<<<<<<<<<<<
 * 
 * class Queue(BaseCollection):
 */
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__BaseCollection); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 741; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s____init__); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 741; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyInt_FromLong(XMMS_COLLECTION_TYPE_IDLIST); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 741; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 741; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_3));
  __Pyx_INCREF(((PyObject *)__pyx_v_self));
  PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_self));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 741; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__ids), __pyx_v_ids) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 741; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_4 = PyEval_CallObjectWithKeywords(__pyx_t_2, ((PyObject *)__pyx_t_3), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 741; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("xmmsvalue.IDList.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsvalue.pyx":744
 * 
 * class Queue(BaseCollection):
 * 	def __init__(Collection self, ids = None):             # <<<<<<<<<<<<<<
 * 		BaseCollection.__init__(self, XMMS_COLLECTION_TYPE_QUEUE, ids=ids)
 * 
 */

static PyObject *__pyx_pf_9xmmsvalue_5Queue___init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_9xmmsvalue_5Queue___init__ = {__Pyx_NAMESTR("__init__"), (PyCFunction)__pyx_pf_9xmmsvalue_5Queue___init__, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pf_9xmmsvalue_5Queue___init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct __pyx_obj_9xmmsvalue_Collection *__pyx_v_self = 0;
  PyObject *__pyx_v_ids = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__self,&__pyx_n_s__ids,0};
  __Pyx_RefNannySetupContext("__init__");
  __pyx_self = __pyx_self;
  {
    PyObject* values[2] = {0,0};
    values[1] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__self);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__ids);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 744; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = ((struct __pyx_obj_9xmmsvalue_Collection *)values[0]);
    __pyx_v_ids = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 744; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("xmmsvalue.Queue.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_self), __pyx_ptype_9xmmsvalue_Collection, 1, "self", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 744; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "xmmsvalue.pyx":745
 * class Queue(BaseCollection):
 * 	def __init__(Collection self, ids = None):
 * 		BaseCollection.__init__(self, XMMS_COLLECTION_TYPE_QUEUE, ids=ids)             # <<<<<<<<<<<<<<
 * 
 * class PShuffle(BaseCollection):
 */
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__BaseCollection); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 745; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s____init__); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 745; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyInt_FromLong(XMMS_COLLECTION_TYPE_QUEUE); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 745; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 745; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_3));
  __Pyx_INCREF(((PyObject *)__pyx_v_self));
  PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_self));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 745; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__ids), __pyx_v_ids) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 745; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_4 = PyEval_CallObjectWithKeywords(__pyx_t_2, ((PyObject *)__pyx_t_3), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 745; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("xmmsvalue.Queue.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsvalue.pyx":748
 * 
 * class PShuffle(BaseCollection):
 * 	def __init__(Collection self, parent = None, ids = None):             # <<<<<<<<<<<<<<
 * 		if parent is None:
 * 			parent = Universe()
 */

static PyObject *__pyx_pf_9xmmsvalue_8PShuffle___init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_9xmmsvalue_8PShuffle___init__ = {__Pyx_NAMESTR("__init__"), (PyCFunction)__pyx_pf_9xmmsvalue_8PShuffle___init__, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pf_9xmmsvalue_8PShuffle___init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct __pyx_obj_9xmmsvalue_Collection *__pyx_v_self = 0;
  PyObject *__pyx_v_parent = 0;
  PyObject *__pyx_v_ids = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  PyObject *__pyx_t_5 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__self,&__pyx_n_s__parent,&__pyx_n_s__ids,0};
  __Pyx_RefNannySetupContext("__init__");
  __pyx_self = __pyx_self;
  {
    PyObject* values[3] = {0,0,0};
    values[1] = ((PyObject *)Py_None);
    values[2] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__self);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__parent);
          if (value) { values[1] = value; kw_args--; }
        }
        case  2:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__ids);
          if (value) { values[2] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 748; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  3: values[2] = PyTuple_GET_ITEM(__pyx_args, 2);
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        break;
        default: goto __pyx_L5_argtuple_error;
      }
    }
    __pyx_v_self = ((struct __pyx_obj_9xmmsvalue_Collection *)values[0]);
    __pyx_v_parent = values[1];
    __pyx_v_ids = values[2];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 3, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 748; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("xmmsvalue.PShuffle.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __Pyx_INCREF(__pyx_v_parent);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_self), __pyx_ptype_9xmmsvalue_Collection, 1, "self", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 748; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "xmmsvalue.pyx":749
 * class PShuffle(BaseCollection):
 * 	def __init__(Collection self, parent = None, ids = None):
 * 		if parent is None:             # <<<<<<<<<<<<<<
 * 			parent = Universe()
 * 		BaseCollection.__init__(self, XMMS_COLLECTION_TYPE_PARTYSHUFFLE, operands=[parent], ids=ids)
 */
  __pyx_t_1 = (__pyx_v_parent == Py_None);
  if (__pyx_t_1) {

    /* "xmmsvalue.pyx":750
 * 	def __init__(Collection self, parent = None, ids = None):
 * 		if parent is None:
 * 			parent = Universe()             # <<<<<<<<<<<<<<
 * 		BaseCollection.__init__(self, XMMS_COLLECTION_TYPE_PARTYSHUFFLE, operands=[parent], ids=ids)
 * 
 */
    __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__Universe); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 750; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 750; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_v_parent);
    __pyx_v_parent = __pyx_t_3;
    __pyx_t_3 = 0;
    goto __pyx_L6;
  }
  __pyx_L6:;

  /* "xmmsvalue.pyx":751
 * 		if parent is None:
 * 			parent = Universe()
 * 		BaseCollection.__init__(self, XMMS_COLLECTION_TYPE_PARTYSHUFFLE, operands=[parent], ids=ids)             # <<<<<<<<<<<<<<
 * 
 * class Union(BaseCollection):
 */
  __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__BaseCollection); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 751; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_2 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s____init__); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 751; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_3 = PyInt_FromLong(XMMS_COLLECTION_TYPE_PARTYSHUFFLE); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 751; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 751; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_4));
  __Pyx_INCREF(((PyObject *)__pyx_v_self));
  PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_v_self));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
  PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_3);
  __pyx_t_3 = 0;
  __pyx_t_3 = PyDict_New(); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 751; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_3));
  __pyx_t_5 = PyList_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 751; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_5));
  __Pyx_INCREF(__pyx_v_parent);
  PyList_SET_ITEM(__pyx_t_5, 0, __pyx_v_parent);
  __Pyx_GIVEREF(__pyx_v_parent);
  if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__operands), ((PyObject *)__pyx_t_5)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 751; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0;
  if (PyDict_SetItem(__pyx_t_3, ((PyObject *)__pyx_n_s__ids), __pyx_v_ids) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 751; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_5 = PyEval_CallObjectWithKeywords(__pyx_t_2, ((PyObject *)__pyx_t_4), ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 751; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("xmmsvalue.PShuffle.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_parent);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsvalue.pyx":754
 * 
 * class Union(BaseCollection):
 * 	def __init__(Collection self, *a):             # <<<<<<<<<<<<<<
 * 		BaseCollection.__init__(self, XMMS_COLLECTION_TYPE_UNION, operands=a)
 * 
 */

static PyObject *__pyx_pf_9xmmsvalue_5Union___init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_9xmmsvalue_5Union___init__ = {__Pyx_NAMESTR("__init__"), (PyCFunction)__pyx_pf_9xmmsvalue_5Union___init__, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pf_9xmmsvalue_5Union___init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct __pyx_obj_9xmmsvalue_Collection *__pyx_v_self = 0;
  PyObject *__pyx_v_a = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__self,0};
  __Pyx_RefNannySetupContext("__init__");
  __pyx_self = __pyx_self;
  if (PyTuple_GET_SIZE(__pyx_args) > 1) {
    __pyx_v_a = PyTuple_GetSlice(__pyx_args, 1, PyTuple_GET_SIZE(__pyx_args));
    if (unlikely(!__pyx_v_a)) {
      __Pyx_RefNannyFinishContext();
      return NULL;
    }
    __Pyx_GOTREF(__pyx_v_a);
  } else {
    __pyx_v_a = __pyx_empty_tuple; __Pyx_INCREF(__pyx_empty_tuple);
  }
  {
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        default:
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__self);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t used_pos_args = (PyTuple_GET_SIZE(__pyx_args) < 1) ? PyTuple_GET_SIZE(__pyx_args) : 1;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, used_pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 754; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) < 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_self = ((struct __pyx_obj_9xmmsvalue_Collection *)values[0]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 754; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_DECREF(__pyx_v_a); __pyx_v_a = 0;
  __Pyx_AddTraceback("xmmsvalue.Union.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_self), __pyx_ptype_9xmmsvalue_Collection, 1, "self", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 754; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "xmmsvalue.pyx":755
 * class Union(BaseCollection):
 * 	def __init__(Collection self, *a):
 * 		BaseCollection.__init__(self, XMMS_COLLECTION_TYPE_UNION, operands=a)             # <<<<<<<<<<<<<<
 * 
 * class Intersection(BaseCollection):
 */
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__BaseCollection); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 755; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s____init__); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 755; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyInt_FromLong(XMMS_COLLECTION_TYPE_UNION); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 755; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 755; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_3));
  __Pyx_INCREF(((PyObject *)__pyx_v_self));
  PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_self));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 755; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__operands), ((PyObject *)__pyx_v_a)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 755; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_4 = PyEval_CallObjectWithKeywords(__pyx_t_2, ((PyObject *)__pyx_t_3), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 755; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("xmmsvalue.Union.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_a);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsvalue.pyx":758
 * 
 * class Intersection(BaseCollection):
 * 	def __init__(Collection self, *a):             # <<<<<<<<<<<<<<
 * 		BaseCollection.__init__(self, XMMS_COLLECTION_TYPE_INTERSECTION, operands=a)
 * 
 */

static PyObject *__pyx_pf_9xmmsvalue_12Intersection___init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_9xmmsvalue_12Intersection___init__ = {__Pyx_NAMESTR("__init__"), (PyCFunction)__pyx_pf_9xmmsvalue_12Intersection___init__, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pf_9xmmsvalue_12Intersection___init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct __pyx_obj_9xmmsvalue_Collection *__pyx_v_self = 0;
  PyObject *__pyx_v_a = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__self,0};
  __Pyx_RefNannySetupContext("__init__");
  __pyx_self = __pyx_self;
  if (PyTuple_GET_SIZE(__pyx_args) > 1) {
    __pyx_v_a = PyTuple_GetSlice(__pyx_args, 1, PyTuple_GET_SIZE(__pyx_args));
    if (unlikely(!__pyx_v_a)) {
      __Pyx_RefNannyFinishContext();
      return NULL;
    }
    __Pyx_GOTREF(__pyx_v_a);
  } else {
    __pyx_v_a = __pyx_empty_tuple; __Pyx_INCREF(__pyx_empty_tuple);
  }
  {
    PyObject* values[1] = {0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        default:
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__self);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
      }
      if (unlikely(kw_args > 0)) {
        const Py_ssize_t used_pos_args = (PyTuple_GET_SIZE(__pyx_args) < 1) ? PyTuple_GET_SIZE(__pyx_args) : 1;
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, used_pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 758; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) < 1) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
    }
    __pyx_v_self = ((struct __pyx_obj_9xmmsvalue_Collection *)values[0]);
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 1, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 758; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_DECREF(__pyx_v_a); __pyx_v_a = 0;
  __Pyx_AddTraceback("xmmsvalue.Intersection.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_self), __pyx_ptype_9xmmsvalue_Collection, 1, "self", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 758; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "xmmsvalue.pyx":759
 * class Intersection(BaseCollection):
 * 	def __init__(Collection self, *a):
 * 		BaseCollection.__init__(self, XMMS_COLLECTION_TYPE_INTERSECTION, operands=a)             # <<<<<<<<<<<<<<
 * 
 * class Complement(BaseCollection):
 */
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__BaseCollection); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 759; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s____init__); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 759; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyInt_FromLong(XMMS_COLLECTION_TYPE_INTERSECTION); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 759; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 759; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_3));
  __Pyx_INCREF(((PyObject *)__pyx_v_self));
  PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_self));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 759; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__operands), ((PyObject *)__pyx_v_a)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 759; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_4 = PyEval_CallObjectWithKeywords(__pyx_t_2, ((PyObject *)__pyx_t_3), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 759; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("xmmsvalue.Intersection.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_a);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsvalue.pyx":762
 * 
 * class Complement(BaseCollection):
 * 	def __init__(Collection self, op):             # <<<<<<<<<<<<<<
 * 		BaseCollection.__init__(self, XMMS_COLLECTION_TYPE_COMPLEMENT, operands=[op])
 * 
 */

static PyObject *__pyx_pf_9xmmsvalue_10Complement___init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyMethodDef __pyx_mdef_9xmmsvalue_10Complement___init__ = {__Pyx_NAMESTR("__init__"), (PyCFunction)__pyx_pf_9xmmsvalue_10Complement___init__, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pf_9xmmsvalue_10Complement___init__(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  struct __pyx_obj_9xmmsvalue_Collection *__pyx_v_self = 0;
  PyObject *__pyx_v_op = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__self,&__pyx_n_s__op,0};
  __Pyx_RefNannySetupContext("__init__");
  __pyx_self = __pyx_self;
  {
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
        case  1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
        case  0: break;
        default: goto __pyx_L5_argtuple_error;
      }
      kw_args = PyDict_Size(__pyx_kwds);
      switch (PyTuple_GET_SIZE(__pyx_args)) {
        case  0:
        values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__self);
        if (likely(values[0])) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__op);
        if (likely(values[1])) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 762; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, PyTuple_GET_SIZE(__pyx_args), "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 762; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else if (PyTuple_GET_SIZE(__pyx_args) != 2) {
      goto __pyx_L5_argtuple_error;
    } else {
      values[0] = PyTuple_GET_ITEM(__pyx_args, 0);
      values[1] = PyTuple_GET_ITEM(__pyx_args, 1);
    }
    __pyx_v_self = ((struct __pyx_obj_9xmmsvalue_Collection *)values[0]);
    __pyx_v_op = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 762; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("xmmsvalue.Complement.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_self), __pyx_ptype_9xmmsvalue_Collection, 1, "self", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 762; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "xmmsvalue.pyx":763
 * class Complement(BaseCollection):
 * 	def __init__(Collection self, op):
 * 		BaseCollection.__init__(self, XMMS_COLLECTION_TYPE_COMPLEMENT, operands=[op])             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__BaseCollection); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 763; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s____init__); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 763; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_1 = PyInt_FromLong(XMMS_COLLECTION_TYPE_COMPLEMENT); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 763; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 763; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_3));
  __Pyx_INCREF(((PyObject *)__pyx_v_self));
  PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_self));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
  PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 763; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  __pyx_t_4 = PyList_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 763; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_4));
  __Pyx_INCREF(__pyx_v_op);
  PyList_SET_ITEM(__pyx_t_4, 0, __pyx_v_op);
  __Pyx_GIVEREF(__pyx_v_op);
  if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__operands), ((PyObject *)__pyx_t_4)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 763; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;
  __pyx_t_4 = PyEval_CallObjectWithKeywords(__pyx_t_2, ((PyObject *)__pyx_t_3), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 763; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_AddTraceback("xmmsvalue.Complement.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsvalue.pyx":766
 * 
 * 
 * cdef create_coll(xmmsv_coll_t *coll):             # <<<<<<<<<<<<<<
 * 	cdef xmmsv_coll_type_t colltype
 * 	cdef Collection c
 */

static PyObject *__pyx_f_9xmmsvalue_create_coll(xmmsv_coll_t *__pyx_v_coll) {
  xmmsv_coll_type_t __pyx_v_colltype;
  struct __pyx_obj_9xmmsvalue_Collection *__pyx_v_c = 0;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("create_coll");

  /* "xmmsvalue.pyx":770
 * 	cdef Collection c
 * 
 * 	colltype = xmmsv_coll_get_type(coll)             # <<<<<<<<<<<<<<
 * 	c = CollectionWrapper()
 * 	if colltype == XMMS_COLLECTION_TYPE_REFERENCE:
 */
  __pyx_v_colltype = xmmsv_coll_get_type(__pyx_v_coll);

  /* "xmmsvalue.pyx":771
 * 
 * 	colltype = xmmsv_coll_get_type(coll)
 * 	c = CollectionWrapper()             # <<<<<<<<<<<<<<
 * 	if colltype == XMMS_COLLECTION_TYPE_REFERENCE:
 * 		c.__class__ = Reference
 */
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__CollectionWrapper); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 771; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __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 = 771; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (!(likely(((__pyx_t_2) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_2, __pyx_ptype_9xmmsvalue_Collection))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 771; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_c = ((struct __pyx_obj_9xmmsvalue_Collection *)__pyx_t_2);
  __pyx_t_2 = 0;

  /* "xmmsvalue.pyx":772
 * 	colltype = xmmsv_coll_get_type(coll)
 * 	c = CollectionWrapper()
 * 	if colltype == XMMS_COLLECTION_TYPE_REFERENCE:             # <<<<<<<<<<<<<<
 * 		c.__class__ = Reference
 * 	elif colltype == XMMS_COLLECTION_TYPE_UNION:
 */
  __pyx_t_3 = (__pyx_v_colltype == XMMS_COLLECTION_TYPE_REFERENCE);
  if (__pyx_t_3) {

    /* "xmmsvalue.pyx":773
 * 	c = CollectionWrapper()
 * 	if colltype == XMMS_COLLECTION_TYPE_REFERENCE:
 * 		c.__class__ = Reference             # <<<<<<<<<<<<<<
 * 	elif colltype == XMMS_COLLECTION_TYPE_UNION:
 * 		c.__class__ = Union
 */
    __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__Reference); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 773; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    if (PyObject_SetAttr(((PyObject *)__pyx_v_c), __pyx_n_s____class__, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 773; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    goto __pyx_L3;
  }

  /* "xmmsvalue.pyx":774
 * 	if colltype == XMMS_COLLECTION_TYPE_REFERENCE:
 * 		c.__class__ = Reference
 * 	elif colltype == XMMS_COLLECTION_TYPE_UNION:             # <<<<<<<<<<<<<<
 * 		c.__class__ = Union
 * 	elif colltype == XMMS_COLLECTION_TYPE_INTERSECTION:
 */
  __pyx_t_3 = (__pyx_v_colltype == XMMS_COLLECTION_TYPE_UNION);
  if (__pyx_t_3) {

    /* "xmmsvalue.pyx":775
 * 		c.__class__ = Reference
 * 	elif colltype == XMMS_COLLECTION_TYPE_UNION:
 * 		c.__class__ = Union             # <<<<<<<<<<<<<<
 * 	elif colltype == XMMS_COLLECTION_TYPE_INTERSECTION:
 * 		c.__class__ = Intersection
 */
    __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__Union); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 775; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    if (PyObject_SetAttr(((PyObject *)__pyx_v_c), __pyx_n_s____class__, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 775; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    goto __pyx_L3;
  }

  /* "xmmsvalue.pyx":776
 * 	elif colltype == XMMS_COLLECTION_TYPE_UNION:
 * 		c.__class__ = Union
 * 	elif colltype == XMMS_COLLECTION_TYPE_INTERSECTION:             # <<<<<<<<<<<<<<
 * 		c.__class__ = Intersection
 * 	elif colltype == XMMS_COLLECTION_TYPE_COMPLEMENT:
 */
  __pyx_t_3 = (__pyx_v_colltype == XMMS_COLLECTION_TYPE_INTERSECTION);
  if (__pyx_t_3) {

    /* "xmmsvalue.pyx":777
 * 		c.__class__ = Union
 * 	elif colltype == XMMS_COLLECTION_TYPE_INTERSECTION:
 * 		c.__class__ = Intersection             # <<<<<<<<<<<<<<
 * 	elif colltype == XMMS_COLLECTION_TYPE_COMPLEMENT:
 * 		c.__class__ = Complement
 */
    __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__Intersection); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 777; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    if (PyObject_SetAttr(((PyObject *)__pyx_v_c), __pyx_n_s____class__, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 777; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    goto __pyx_L3;
  }

  /* "xmmsvalue.pyx":778
 * 	elif colltype == XMMS_COLLECTION_TYPE_INTERSECTION:
 * 		c.__class__ = Intersection
 * 	elif colltype == XMMS_COLLECTION_TYPE_COMPLEMENT:             # <<<<<<<<<<<<<<
 * 		c.__class__ = Complement
 * 	elif colltype == XMMS_COLLECTION_TYPE_HAS:
 */
  __pyx_t_3 = (__pyx_v_colltype == XMMS_COLLECTION_TYPE_COMPLEMENT);
  if (__pyx_t_3) {

    /* "xmmsvalue.pyx":779
 * 		c.__class__ = Intersection
 * 	elif colltype == XMMS_COLLECTION_TYPE_COMPLEMENT:
 * 		c.__class__ = Complement             # <<<<<<<<<<<<<<
 * 	elif colltype == XMMS_COLLECTION_TYPE_HAS:
 * 		c.__class__ = Has
 */
    __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__Complement); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 779; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    if (PyObject_SetAttr(((PyObject *)__pyx_v_c), __pyx_n_s____class__, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 779; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    goto __pyx_L3;
  }

  /* "xmmsvalue.pyx":780
 * 	elif colltype == XMMS_COLLECTION_TYPE_COMPLEMENT:
 * 		c.__class__ = Complement
 * 	elif colltype == XMMS_COLLECTION_TYPE_HAS:             # <<<<<<<<<<<<<<
 * 		c.__class__ = Has
 * 	elif colltype == XMMS_COLLECTION_TYPE_EQUALS:
 */
  __pyx_t_3 = (__pyx_v_colltype == XMMS_COLLECTION_TYPE_HAS);
  if (__pyx_t_3) {

    /* "xmmsvalue.pyx":781
 * 		c.__class__ = Complement
 * 	elif colltype == XMMS_COLLECTION_TYPE_HAS:
 * 		c.__class__ = Has             # <<<<<<<<<<<<<<
 * 	elif colltype == XMMS_COLLECTION_TYPE_EQUALS:
 * 		c.__class__ = Equals
 */
    __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__Has); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 781; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    if (PyObject_SetAttr(((PyObject *)__pyx_v_c), __pyx_n_s____class__, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 781; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    goto __pyx_L3;
  }

  /* "xmmsvalue.pyx":782
 * 	elif colltype == XMMS_COLLECTION_TYPE_HAS:
 * 		c.__class__ = Has
 * 	elif colltype == XMMS_COLLECTION_TYPE_EQUALS:             # <<<<<<<<<<<<<<
 * 		c.__class__ = Equals
 * 	elif colltype == XMMS_COLLECTION_TYPE_MATCH:
 */
  __pyx_t_3 = (__pyx_v_colltype == XMMS_COLLECTION_TYPE_EQUALS);
  if (__pyx_t_3) {

    /* "xmmsvalue.pyx":783
 * 		c.__class__ = Has
 * 	elif colltype == XMMS_COLLECTION_TYPE_EQUALS:
 * 		c.__class__ = Equals             # <<<<<<<<<<<<<<
 * 	elif colltype == XMMS_COLLECTION_TYPE_MATCH:
 * 		c.__class__ = Match
 */
    __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__Equals); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 783; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    if (PyObject_SetAttr(((PyObject *)__pyx_v_c), __pyx_n_s____class__, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 783; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    goto __pyx_L3;
  }

  /* "xmmsvalue.pyx":784
 * 	elif colltype == XMMS_COLLECTION_TYPE_EQUALS:
 * 		c.__class__ = Equals
 * 	elif colltype == XMMS_COLLECTION_TYPE_MATCH:             # <<<<<<<<<<<<<<
 * 		c.__class__ = Match
 * 	elif colltype == XMMS_COLLECTION_TYPE_SMALLER:
 */
  __pyx_t_3 = (__pyx_v_colltype == XMMS_COLLECTION_TYPE_MATCH);
  if (__pyx_t_3) {

    /* "xmmsvalue.pyx":785
 * 		c.__class__ = Equals
 * 	elif colltype == XMMS_COLLECTION_TYPE_MATCH:
 * 		c.__class__ = Match             # <<<<<<<<<<<<<<
 * 	elif colltype == XMMS_COLLECTION_TYPE_SMALLER:
 * 		c.__class__ = Smaller
 */
    __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__Match); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 785; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    if (PyObject_SetAttr(((PyObject *)__pyx_v_c), __pyx_n_s____class__, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 785; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    goto __pyx_L3;
  }

  /* "xmmsvalue.pyx":786
 * 	elif colltype == XMMS_COLLECTION_TYPE_MATCH:
 * 		c.__class__ = Match
 * 	elif colltype == XMMS_COLLECTION_TYPE_SMALLER:             # <<<<<<<<<<<<<<
 * 		c.__class__ = Smaller
 * 	elif colltype == XMMS_COLLECTION_TYPE_GREATER:
 */
  __pyx_t_3 = (__pyx_v_colltype == XMMS_COLLECTION_TYPE_SMALLER);
  if (__pyx_t_3) {

    /* "xmmsvalue.pyx":787
 * 		c.__class__ = Match
 * 	elif colltype == XMMS_COLLECTION_TYPE_SMALLER:
 * 		c.__class__ = Smaller             # <<<<<<<<<<<<<<
 * 	elif colltype == XMMS_COLLECTION_TYPE_GREATER:
 * 		c.__class__ = Greater
 */
    __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__Smaller); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 787; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    if (PyObject_SetAttr(((PyObject *)__pyx_v_c), __pyx_n_s____class__, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 787; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    goto __pyx_L3;
  }

  /* "xmmsvalue.pyx":788
 * 	elif colltype == XMMS_COLLECTION_TYPE_SMALLER:
 * 		c.__class__ = Smaller
 * 	elif colltype == XMMS_COLLECTION_TYPE_GREATER:             # <<<<<<<<<<<<<<
 * 		c.__class__ = Greater
 * 	elif colltype == XMMS_COLLECTION_TYPE_IDLIST:
 */
  __pyx_t_3 = (__pyx_v_colltype == XMMS_COLLECTION_TYPE_GREATER);
  if (__pyx_t_3) {

    /* "xmmsvalue.pyx":789
 * 		c.__class__ = Smaller
 * 	elif colltype == XMMS_COLLECTION_TYPE_GREATER:
 * 		c.__class__ = Greater             # <<<<<<<<<<<<<<
 * 	elif colltype == XMMS_COLLECTION_TYPE_IDLIST:
 * 		c.__class__ = IDList
 */
    __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__Greater); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 789; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    if (PyObject_SetAttr(((PyObject *)__pyx_v_c), __pyx_n_s____class__, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 789; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    goto __pyx_L3;
  }

  /* "xmmsvalue.pyx":790
 * 	elif colltype == XMMS_COLLECTION_TYPE_GREATER:
 * 		c.__class__ = Greater
 * 	elif colltype == XMMS_COLLECTION_TYPE_IDLIST:             # <<<<<<<<<<<<<<
 * 		c.__class__ = IDList
 * 	elif colltype == XMMS_COLLECTION_TYPE_QUEUE:
 */
  __pyx_t_3 = (__pyx_v_colltype == XMMS_COLLECTION_TYPE_IDLIST);
  if (__pyx_t_3) {

    /* "xmmsvalue.pyx":791
 * 		c.__class__ = Greater
 * 	elif colltype == XMMS_COLLECTION_TYPE_IDLIST:
 * 		c.__class__ = IDList             # <<<<<<<<<<<<<<
 * 	elif colltype == XMMS_COLLECTION_TYPE_QUEUE:
 * 		c.__class__ = Queue
 */
    __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__IDList); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 791; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    if (PyObject_SetAttr(((PyObject *)__pyx_v_c), __pyx_n_s____class__, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 791; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    goto __pyx_L3;
  }

  /* "xmmsvalue.pyx":792
 * 	elif colltype == XMMS_COLLECTION_TYPE_IDLIST:
 * 		c.__class__ = IDList
 * 	elif colltype == XMMS_COLLECTION_TYPE_QUEUE:             # <<<<<<<<<<<<<<
 * 		c.__class__ = Queue
 * 	elif colltype == XMMS_COLLECTION_TYPE_PARTYSHUFFLE:
 */
  __pyx_t_3 = (__pyx_v_colltype == XMMS_COLLECTION_TYPE_QUEUE);
  if (__pyx_t_3) {

    /* "xmmsvalue.pyx":793
 * 		c.__class__ = IDList
 * 	elif colltype == XMMS_COLLECTION_TYPE_QUEUE:
 * 		c.__class__ = Queue             # <<<<<<<<<<<<<<
 * 	elif colltype == XMMS_COLLECTION_TYPE_PARTYSHUFFLE:
 * 		c.__class__ = PShuffle
 */
    __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__Queue); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 793; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    if (PyObject_SetAttr(((PyObject *)__pyx_v_c), __pyx_n_s____class__, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 793; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    goto __pyx_L3;
  }

  /* "xmmsvalue.pyx":794
 * 	elif colltype == XMMS_COLLECTION_TYPE_QUEUE:
 * 		c.__class__ = Queue
 * 	elif colltype == XMMS_COLLECTION_TYPE_PARTYSHUFFLE:             # <<<<<<<<<<<<<<
 * 		c.__class__ = PShuffle
 * 	else:
 */
  __pyx_t_3 = (__pyx_v_colltype == XMMS_COLLECTION_TYPE_PARTYSHUFFLE);
  if (__pyx_t_3) {

    /* "xmmsvalue.pyx":795
 * 		c.__class__ = Queue
 * 	elif colltype == XMMS_COLLECTION_TYPE_PARTYSHUFFLE:
 * 		c.__class__ = PShuffle             # <<<<<<<<<<<<<<
 * 	else:
 * 		raise RuntimeError("Unkown collection type")
 */
    __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__PShuffle); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 795; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    if (PyObject_SetAttr(((PyObject *)__pyx_v_c), __pyx_n_s____class__, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 795; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    goto __pyx_L3;
  }
  /*else*/ {

    /* "xmmsvalue.pyx":797
 * 		c.__class__ = PShuffle
 * 	else:
 * 		raise RuntimeError("Unkown collection type")             # <<<<<<<<<<<<<<
 * 
 * 	c.set_collection(coll)
 */
    __pyx_t_2 = PyObject_Call(__pyx_builtin_RuntimeError, ((PyObject *)__pyx_k_tuple_46), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 797; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_Raise(__pyx_t_2, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 797; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_L3:;

  /* "xmmsvalue.pyx":799
 * 		raise RuntimeError("Unkown collection type")
 * 
 * 	c.set_collection(coll)             # <<<<<<<<<<<<<<
 * 
 * 	if colltype == XMMS_COLLECTION_TYPE_REFERENCE:
 */
  __pyx_t_2 = ((struct __pyx_vtabstruct_9xmmsvalue_Collection *)__pyx_v_c->__pyx_base.__pyx_vtab)->__pyx_base.set_collection(((struct __pyx_obj_9xmmsvalue_CollectionRef *)__pyx_v_c), __pyx_v_coll); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 799; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "xmmsvalue.pyx":801
 * 	c.set_collection(coll)
 * 
 * 	if colltype == XMMS_COLLECTION_TYPE_REFERENCE:             # <<<<<<<<<<<<<<
 * 		if c.attributes.get("reference", "") == "All Media":
 * 			c.__class__ = Universe
 */
  __pyx_t_3 = (__pyx_v_colltype == XMMS_COLLECTION_TYPE_REFERENCE);
  if (__pyx_t_3) {

    /* "xmmsvalue.pyx":802
 * 
 * 	if colltype == XMMS_COLLECTION_TYPE_REFERENCE:
 * 		if c.attributes.get("reference", "") == "All Media":             # <<<<<<<<<<<<<<
 * 			c.__class__ = Universe
 * 
 */
    __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_v_c), __pyx_n_s__attributes); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_1 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__get); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_k_tuple_48), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_3 = __Pyx_PyString_Equals(__pyx_t_2, ((PyObject *)__pyx_kp_s_44), Py_EQ); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    if (__pyx_t_3) {

      /* "xmmsvalue.pyx":803
 * 	if colltype == XMMS_COLLECTION_TYPE_REFERENCE:
 * 		if c.attributes.get("reference", "") == "All Media":
 * 			c.__class__ = Universe             # <<<<<<<<<<<<<<
 * 
 * 	return c
 */
      __pyx_t_2 = __Pyx_GetName(__pyx_m, __pyx_n_s__Universe); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 803; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      if (PyObject_SetAttr(((PyObject *)__pyx_v_c), __pyx_n_s____class__, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 803; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      goto __pyx_L5;
    }
    __pyx_L5:;
    goto __pyx_L4;
  }
  __pyx_L4:;

  /* "xmmsvalue.pyx":805
 * 			c.__class__ = Universe
 * 
 * 	return c             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_c));
  __pyx_r = ((PyObject *)__pyx_v_c);
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("xmmsvalue.create_coll", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF((PyObject *)__pyx_v_c);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsvalue.pyx":808
 * 
 * 
 * def coll_parse(pattern):             # <<<<<<<<<<<<<<
 * 	cdef xmmsv_coll_t *coll = NULL
 * 
 */

static PyObject *__pyx_pf_9xmmsvalue_coll_parse(PyObject *__pyx_self, PyObject *__pyx_v_pattern); /*proto*/
static PyMethodDef __pyx_mdef_9xmmsvalue_coll_parse = {__Pyx_NAMESTR("coll_parse"), (PyCFunction)__pyx_pf_9xmmsvalue_coll_parse, METH_O, __Pyx_DOCSTR(0)};
static PyObject *__pyx_pf_9xmmsvalue_coll_parse(PyObject *__pyx_self, PyObject *__pyx_v_pattern) {
  xmmsv_coll_t *__pyx_v_coll;
  PyObject *__pyx_v__pattern = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  char *__pyx_t_2;
  int __pyx_t_3;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("coll_parse");
  __pyx_self = __pyx_self;

  /* "xmmsvalue.pyx":809
 * 
 * def coll_parse(pattern):
 * 	cdef xmmsv_coll_t *coll = NULL             # <<<<<<<<<<<<<<
 * 
 * 	_pattern = from_unicode(pattern)
 */
  __pyx_v_coll = NULL;

  /* "xmmsvalue.pyx":811
 * 	cdef xmmsv_coll_t *coll = NULL
 * 
 * 	_pattern = from_unicode(pattern)             # <<<<<<<<<<<<<<
 * 	if not xmmsv_coll_parse(<char *>_pattern, &coll):
 * 		raise ValueError("Unable to parse the pattern")
 */
  __pyx_t_1 = __pyx_f_9xmmsutils_from_unicode(__pyx_v_pattern); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 811; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v__pattern = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "xmmsvalue.pyx":812
 * 
 * 	_pattern = from_unicode(pattern)
 * 	if not xmmsv_coll_parse(<char *>_pattern, &coll):             # <<<<<<<<<<<<<<
 * 		raise ValueError("Unable to parse the pattern")
 * 	return create_coll(coll)
 */
  __pyx_t_2 = PyBytes_AsString(__pyx_v__pattern); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 812; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_3 = (!xmmsv_coll_parse(((char *)__pyx_t_2), (&__pyx_v_coll)));
  if (__pyx_t_3) {

    /* "xmmsvalue.pyx":813
 * 	_pattern = from_unicode(pattern)
 * 	if not xmmsv_coll_parse(<char *>_pattern, &coll):
 * 		raise ValueError("Unable to parse the pattern")             # <<<<<<<<<<<<<<
 * 	return create_coll(coll)
 * 
 */
    __pyx_t_1 = PyObject_Call(__pyx_builtin_ValueError, ((PyObject *)__pyx_k_tuple_50), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 813; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_Raise(__pyx_t_1, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 813; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    goto __pyx_L5;
  }
  __pyx_L5:;

  /* "xmmsvalue.pyx":814
 * 	if not xmmsv_coll_parse(<char *>_pattern, &coll):
 * 		raise ValueError("Unable to parse the pattern")
 * 	return create_coll(coll)             # <<<<<<<<<<<<<<
 * 
 * XMMSValue = XmmsValue
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_9xmmsvalue_create_coll(__pyx_v_coll); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 814; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("xmmsvalue.coll_parse", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v__pattern);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsutils.pxd":3
 * from cpython.unicode cimport PyUnicode_DecodeUTF8, PyUnicode_AsUTF8String
 * 
 * cdef inline to_unicode(char *s):             # <<<<<<<<<<<<<<
 * 	try:
 * 		ns = PyUnicode_DecodeUTF8(s, len(s), NULL)
 */

static CYTHON_INLINE PyObject *__pyx_f_9xmmsutils_to_unicode(char *__pyx_v_s) {
  PyObject *__pyx_v_ns = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("to_unicode");

  /* "xmmsutils.pxd":4
 * 
 * cdef inline to_unicode(char *s):
 * 	try:             # <<<<<<<<<<<<<<
 * 		ns = PyUnicode_DecodeUTF8(s, len(s), NULL)
 * 	except:
 */
  {
    __Pyx_ExceptionSave(&__pyx_t_1, &__pyx_t_2, &__pyx_t_3);
    __Pyx_XGOTREF(__pyx_t_1);
    __Pyx_XGOTREF(__pyx_t_2);
    __Pyx_XGOTREF(__pyx_t_3);
    /*try:*/ {

      /* "xmmsutils.pxd":5
 * cdef inline to_unicode(char *s):
 * 	try:
 * 		ns = PyUnicode_DecodeUTF8(s, len(s), NULL)             # <<<<<<<<<<<<<<
 * 	except:
 * 		ns = s
 */
      __pyx_t_4 = strlen(__pyx_v_s); 
      __pyx_t_5 = PyUnicode_DecodeUTF8(__pyx_v_s, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 5; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_v_ns = __pyx_t_5;
      __pyx_t_5 = 0;
    }
    __Pyx_XDECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
    goto __pyx_L10_try_end;
    __pyx_L3_error:;
    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "xmmsutils.pxd":6
 * 	try:
 * 		ns = PyUnicode_DecodeUTF8(s, len(s), NULL)
 * 	except:             # <<<<<<<<<<<<<<
 * 		ns = s
 * 	return ns
 */
    /*except:*/ {
      __Pyx_AddTraceback("xmmsutils.to_unicode", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_5, &__pyx_t_6, &__pyx_t_7) < 0) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_GOTREF(__pyx_t_7);

      /* "xmmsutils.pxd":7
 * 		ns = PyUnicode_DecodeUTF8(s, len(s), NULL)
 * 	except:
 * 		ns = s             # <<<<<<<<<<<<<<
 * 	return ns
 * 
 */
      __pyx_t_8 = PyBytes_FromString(__pyx_v_s); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 7; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
      __Pyx_GOTREF(((PyObject *)__pyx_t_8));
      __Pyx_XDECREF(__pyx_v_ns);
      __pyx_v_ns = ((PyObject *)__pyx_t_8);
      __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      goto __pyx_L4_exception_handled;
    }
    __pyx_L5_except_error:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    goto __pyx_L1_error;
    __pyx_L4_exception_handled:;
    __Pyx_XGIVEREF(__pyx_t_1);
    __Pyx_XGIVEREF(__pyx_t_2);
    __Pyx_XGIVEREF(__pyx_t_3);
    __Pyx_ExceptionReset(__pyx_t_1, __pyx_t_2, __pyx_t_3);
    __pyx_L10_try_end:;
  }

  /* "xmmsutils.pxd":8
 * 	except:
 * 		ns = s
 * 	return ns             # <<<<<<<<<<<<<<
 * 
 * cdef inline from_unicode(object o):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_ns);
  __pyx_r = __pyx_v_ns;
  goto __pyx_L0;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("xmmsutils.to_unicode", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_ns);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "xmmsutils.pxd":10
 * 	return ns
 * 
 * cdef inline from_unicode(object o):             # <<<<<<<<<<<<<<
 * 	if isinstance(o, unicode):
 * 		return PyUnicode_AsUTF8String(o)
 */

static CYTHON_INLINE PyObject *__pyx_f_9xmmsutils_from_unicode(PyObject *__pyx_v_o) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  int __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("from_unicode");

  /* "xmmsutils.pxd":11
 * 
 * cdef inline from_unicode(object o):
 * 	if isinstance(o, unicode):             # <<<<<<<<<<<<<<
 * 		return PyUnicode_AsUTF8String(o)
 * 	else:
 */
  __pyx_t_1 = ((PyObject *)((PyObject*)(&PyUnicode_Type)));
  __Pyx_INCREF(__pyx_t_1);
  __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_o, __pyx_t_1); 
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  if (__pyx_t_2) {

    /* "xmmsutils.pxd":12
 * cdef inline from_unicode(object o):
 * 	if isinstance(o, unicode):
 * 		return PyUnicode_AsUTF8String(o)             # <<<<<<<<<<<<<<
 * 	else:
 * 		return o
 */
    __Pyx_XDECREF(__pyx_r);
    __pyx_t_1 = PyUnicode_AsUTF8String(__pyx_v_o); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 12; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_r = __pyx_t_1;
    __pyx_t_1 = 0;
    goto __pyx_L0;
    goto __pyx_L3;
  }
  /*else*/ {

    /* "xmmsutils.pxd":14
 * 		return PyUnicode_AsUTF8String(o)
 * 	else:
 * 		return o             # <<<<<<<<<<<<<<
 */
    __Pyx_XDECREF(__pyx_r);
    __Pyx_INCREF(__pyx_v_o);
    __pyx_r = __pyx_v_o;
    goto __pyx_L0;
  }
  __pyx_L3:;

  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("xmmsutils.from_unicode", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static struct __pyx_vtabstruct_9xmmsvalue_XmmsValue __pyx_vtable_9xmmsvalue_XmmsValue;

static PyObject *__pyx_tp_new_9xmmsvalue_XmmsValue(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_9xmmsvalue_XmmsValue *p;
  PyObject *o = (*t->tp_alloc)(t, 0);
  if (!o) return 0;
  p = ((struct __pyx_obj_9xmmsvalue_XmmsValue *)o);
  p->__pyx_vtab = __pyx_vtabptr_9xmmsvalue_XmmsValue;
  p->sourcepref = Py_None; Py_INCREF(Py_None);
  if (__pyx_pf_9xmmsvalue_9XmmsValue___cinit__(o, __pyx_empty_tuple, NULL) < 0) {
    Py_DECREF(o); o = 0;
  }
  return o;
}

static void __pyx_tp_dealloc_9xmmsvalue_XmmsValue(PyObject *o) {
  struct __pyx_obj_9xmmsvalue_XmmsValue *p = (struct __pyx_obj_9xmmsvalue_XmmsValue *)o;
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    ++Py_REFCNT(o);
    __pyx_pf_9xmmsvalue_9XmmsValue_2__dealloc__(o);
    if (PyErr_Occurred()) PyErr_WriteUnraisable(o);
    --Py_REFCNT(o);
    PyErr_Restore(etype, eval, etb);
  }
  Py_XDECREF(p->sourcepref);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_9xmmsvalue_XmmsValue(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_9xmmsvalue_XmmsValue *p = (struct __pyx_obj_9xmmsvalue_XmmsValue *)o;
  if (p->sourcepref) {
    e = (*v)(p->sourcepref, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_9xmmsvalue_XmmsValue(PyObject *o) {
  struct __pyx_obj_9xmmsvalue_XmmsValue *p = (struct __pyx_obj_9xmmsvalue_XmmsValue *)o;
  PyObject* tmp;
  tmp = ((PyObject*)p->sourcepref);
  p->sourcepref = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyMethodDef __pyx_methods_9xmmsvalue_XmmsValue[] = {
  {__Pyx_NAMESTR("set_pyval"), (PyCFunction)__pyx_pf_9xmmsvalue_9XmmsValue_3set_pyval, METH_O, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("get_type"), (PyCFunction)__pyx_pf_9xmmsvalue_9XmmsValue_4get_type, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_9xmmsvalue_9XmmsValue_4get_type)},
  {__Pyx_NAMESTR("iserror"), (PyCFunction)__pyx_pf_9xmmsvalue_9XmmsValue_5iserror, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_9xmmsvalue_9XmmsValue_5iserror)},
  {__Pyx_NAMESTR("is_error"), (PyCFunction)__pyx_pf_9xmmsvalue_9XmmsValue_6is_error, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_9xmmsvalue_9XmmsValue_6is_error)},
  {__Pyx_NAMESTR("get_error"), (PyCFunction)__pyx_pf_9xmmsvalue_9XmmsValue_7get_error, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_9xmmsvalue_9XmmsValue_7get_error)},
  {__Pyx_NAMESTR("get_int"), (PyCFunction)__pyx_pf_9xmmsvalue_9XmmsValue_8get_int, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_9xmmsvalue_9XmmsValue_8get_int)},
  {__Pyx_NAMESTR("get_string"), (PyCFunction)__pyx_pf_9xmmsvalue_9XmmsValue_9get_string, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_9xmmsvalue_9XmmsValue_9get_string)},
  {__Pyx_NAMESTR("get_bin"), (PyCFunction)__pyx_pf_9xmmsvalue_9XmmsValue_10get_bin, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_9xmmsvalue_9XmmsValue_10get_bin)},
  {__Pyx_NAMESTR("get_coll"), (PyCFunction)__pyx_pf_9xmmsvalue_9XmmsValue_11get_coll, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_9xmmsvalue_9XmmsValue_11get_coll)},
  {__Pyx_NAMESTR("get_dict"), (PyCFunction)__pyx_pf_9xmmsvalue_9XmmsValue_12get_dict, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_9xmmsvalue_9XmmsValue_12get_dict)},
  {__Pyx_NAMESTR("get_dict_iter"), (PyCFunction)__pyx_pf_9xmmsvalue_9XmmsValue_13get_dict_iter, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_9xmmsvalue_9XmmsValue_13get_dict_iter)},
  {__Pyx_NAMESTR("get_propdict"), (PyCFunction)__pyx_pf_9xmmsvalue_9XmmsValue_14get_propdict, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_9xmmsvalue_9XmmsValue_14get_propdict)},
  {__Pyx_NAMESTR("get_list"), (PyCFunction)__pyx_pf_9xmmsvalue_9XmmsValue_15get_list, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_9xmmsvalue_9XmmsValue_15get_list)},
  {__Pyx_NAMESTR("get_list_iter"), (PyCFunction)__pyx_pf_9xmmsvalue_9XmmsValue_16get_list_iter, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_9xmmsvalue_9XmmsValue_16get_list_iter)},
  {__Pyx_NAMESTR("value"), (PyCFunction)__pyx_pf_9xmmsvalue_9XmmsValue_17value, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_9xmmsvalue_9XmmsValue_17value)},
  {0, 0, 0, 0}
};

static PyNumberMethods __pyx_tp_as_number_XmmsValue = {
  0, /*nb_add*/
  0, /*nb_subtract*/
  0, /*nb_multiply*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_divide*/
  #endif
  0, /*nb_remainder*/
  0, /*nb_divmod*/
  0, /*nb_power*/
  0, /*nb_negative*/
  0, /*nb_positive*/
  0, /*nb_absolute*/
  0, /*nb_nonzero*/
  0, /*nb_invert*/
  0, /*nb_lshift*/
  0, /*nb_rshift*/
  0, /*nb_and*/
  0, /*nb_xor*/
  0, /*nb_or*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_coerce*/
  #endif
  0, /*nb_int*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_long*/
  #else
  0, /*reserved*/
  #endif
  0, /*nb_float*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_oct*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*nb_hex*/
  #endif
  0, /*nb_inplace_add*/
  0, /*nb_inplace_subtract*/
  0, /*nb_inplace_multiply*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_inplace_divide*/
  #endif
  0, /*nb_inplace_remainder*/
  0, /*nb_inplace_power*/
  0, /*nb_inplace_lshift*/
  0, /*nb_inplace_rshift*/
  0, /*nb_inplace_and*/
  0, /*nb_inplace_xor*/
  0, /*nb_inplace_or*/
  0, /*nb_floor_divide*/
  0, /*nb_true_divide*/
  0, /*nb_inplace_floor_divide*/
  0, /*nb_inplace_true_divide*/
  #if PY_VERSION_HEX >= 0x02050000
  0, /*nb_index*/
  #endif
};

static PySequenceMethods __pyx_tp_as_sequence_XmmsValue = {
  0, /*sq_length*/
  0, /*sq_concat*/
  0, /*sq_repeat*/
  0, /*sq_item*/
  0, /*sq_slice*/
  0, /*sq_ass_item*/
  0, /*sq_ass_slice*/
  0, /*sq_contains*/
  0, /*sq_inplace_concat*/
  0, /*sq_inplace_repeat*/
};

static PyMappingMethods __pyx_tp_as_mapping_XmmsValue = {
  0, /*mp_length*/
  0, /*mp_subscript*/
  0, /*mp_ass_subscript*/
};

static PyBufferProcs __pyx_tp_as_buffer_XmmsValue = {
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getreadbuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getwritebuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getsegcount*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getcharbuffer*/
  #endif
  #if PY_VERSION_HEX >= 0x02060000
  0, /*bf_getbuffer*/
  #endif
  #if PY_VERSION_HEX >= 0x02060000
  0, /*bf_releasebuffer*/
  #endif
};

static PyTypeObject __pyx_type_9xmmsvalue_XmmsValue = {
  PyVarObject_HEAD_INIT(0, 0)
  __Pyx_NAMESTR("xmmsvalue.XmmsValue"), /*tp_name*/
  sizeof(struct __pyx_obj_9xmmsvalue_XmmsValue), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_9xmmsvalue_XmmsValue, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #else
  0, /*reserved*/
  #endif
  0, /*tp_repr*/
  &__pyx_tp_as_number_XmmsValue, /*tp_as_number*/
  &__pyx_tp_as_sequence_XmmsValue, /*tp_as_sequence*/
  &__pyx_tp_as_mapping_XmmsValue, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  &__pyx_tp_as_buffer_XmmsValue, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_9xmmsvalue_XmmsValue, /*tp_traverse*/
  __pyx_tp_clear_9xmmsvalue_XmmsValue, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_9xmmsvalue_XmmsValue, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pf_9xmmsvalue_9XmmsValue_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_9xmmsvalue_XmmsValue, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  #if PY_VERSION_HEX >= 0x02060000
  0, /*tp_version_tag*/
  #endif
};

static PyObject *__pyx_tp_new_9xmmsvalue_XmmsListIter(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_9xmmsvalue_XmmsListIter *p;
  PyObject *o = (*t->tp_alloc)(t, 0);
  if (!o) return 0;
  p = ((struct __pyx_obj_9xmmsvalue_XmmsListIter *)o);
  p->sourcepref = Py_None; Py_INCREF(Py_None);
  if (__pyx_pf_9xmmsvalue_12XmmsListIter___cinit__(o, __pyx_empty_tuple, NULL) < 0) {
    Py_DECREF(o); o = 0;
  }
  return o;
}

static void __pyx_tp_dealloc_9xmmsvalue_XmmsListIter(PyObject *o) {
  struct __pyx_obj_9xmmsvalue_XmmsListIter *p = (struct __pyx_obj_9xmmsvalue_XmmsListIter *)o;
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    ++Py_REFCNT(o);
    __pyx_pf_9xmmsvalue_12XmmsListIter_1__dealloc__(o);
    if (PyErr_Occurred()) PyErr_WriteUnraisable(o);
    --Py_REFCNT(o);
    PyErr_Restore(etype, eval, etb);
  }
  Py_XDECREF(p->sourcepref);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_9xmmsvalue_XmmsListIter(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_9xmmsvalue_XmmsListIter *p = (struct __pyx_obj_9xmmsvalue_XmmsListIter *)o;
  if (p->sourcepref) {
    e = (*v)(p->sourcepref, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_9xmmsvalue_XmmsListIter(PyObject *o) {
  struct __pyx_obj_9xmmsvalue_XmmsListIter *p = (struct __pyx_obj_9xmmsvalue_XmmsListIter *)o;
  PyObject* tmp;
  tmp = ((PyObject*)p->sourcepref);
  p->sourcepref = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyMethodDef __pyx_methods_9xmmsvalue_XmmsListIter[] = {
  {__Pyx_NAMESTR("__next__"), (PyCFunction)__pyx_pf_9xmmsvalue_12XmmsListIter_4__next__, METH_NOARGS|METH_COEXIST, __Pyx_DOCSTR(0)},
  {0, 0, 0, 0}
};

static PyNumberMethods __pyx_tp_as_number_XmmsListIter = {
  0, /*nb_add*/
  0, /*nb_subtract*/
  0, /*nb_multiply*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_divide*/
  #endif
  0, /*nb_remainder*/
  0, /*nb_divmod*/
  0, /*nb_power*/
  0, /*nb_negative*/
  0, /*nb_positive*/
  0, /*nb_absolute*/
  0, /*nb_nonzero*/
  0, /*nb_invert*/
  0, /*nb_lshift*/
  0, /*nb_rshift*/
  0, /*nb_and*/
  0, /*nb_xor*/
  0, /*nb_or*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_coerce*/
  #endif
  0, /*nb_int*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_long*/
  #else
  0, /*reserved*/
  #endif
  0, /*nb_float*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_oct*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*nb_hex*/
  #endif
  0, /*nb_inplace_add*/
  0, /*nb_inplace_subtract*/
  0, /*nb_inplace_multiply*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_inplace_divide*/
  #endif
  0, /*nb_inplace_remainder*/
  0, /*nb_inplace_power*/
  0, /*nb_inplace_lshift*/
  0, /*nb_inplace_rshift*/
  0, /*nb_inplace_and*/
  0, /*nb_inplace_xor*/
  0, /*nb_inplace_or*/
  0, /*nb_floor_divide*/
  0, /*nb_true_divide*/
  0, /*nb_inplace_floor_divide*/
  0, /*nb_inplace_true_divide*/
  #if PY_VERSION_HEX >= 0x02050000
  0, /*nb_index*/
  #endif
};

static PySequenceMethods __pyx_tp_as_sequence_XmmsListIter = {
  0, /*sq_length*/
  0, /*sq_concat*/
  0, /*sq_repeat*/
  0, /*sq_item*/
  0, /*sq_slice*/
  0, /*sq_ass_item*/
  0, /*sq_ass_slice*/
  0, /*sq_contains*/
  0, /*sq_inplace_concat*/
  0, /*sq_inplace_repeat*/
};

static PyMappingMethods __pyx_tp_as_mapping_XmmsListIter = {
  0, /*mp_length*/
  0, /*mp_subscript*/
  0, /*mp_ass_subscript*/
};

static PyBufferProcs __pyx_tp_as_buffer_XmmsListIter = {
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getreadbuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getwritebuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getsegcount*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getcharbuffer*/
  #endif
  #if PY_VERSION_HEX >= 0x02060000
  0, /*bf_getbuffer*/
  #endif
  #if PY_VERSION_HEX >= 0x02060000
  0, /*bf_releasebuffer*/
  #endif
};

static PyTypeObject __pyx_type_9xmmsvalue_XmmsListIter = {
  PyVarObject_HEAD_INIT(0, 0)
  __Pyx_NAMESTR("xmmsvalue.XmmsListIter"), /*tp_name*/
  sizeof(struct __pyx_obj_9xmmsvalue_XmmsListIter), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_9xmmsvalue_XmmsListIter, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #else
  0, /*reserved*/
  #endif
  0, /*tp_repr*/
  &__pyx_tp_as_number_XmmsListIter, /*tp_as_number*/
  &__pyx_tp_as_sequence_XmmsListIter, /*tp_as_sequence*/
  &__pyx_tp_as_mapping_XmmsListIter, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  &__pyx_tp_as_buffer_XmmsListIter, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_9xmmsvalue_XmmsListIter, /*tp_traverse*/
  __pyx_tp_clear_9xmmsvalue_XmmsListIter, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  __pyx_pf_9xmmsvalue_12XmmsListIter_3__iter__, /*tp_iter*/
  __pyx_pf_9xmmsvalue_12XmmsListIter_4__next__, /*tp_iternext*/
  __pyx_methods_9xmmsvalue_XmmsListIter, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pf_9xmmsvalue_12XmmsListIter_2__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_9xmmsvalue_XmmsListIter, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  #if PY_VERSION_HEX >= 0x02060000
  0, /*tp_version_tag*/
  #endif
};

static PyObject *__pyx_tp_new_9xmmsvalue_XmmsDictIter(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_9xmmsvalue_XmmsDictIter *p;
  PyObject *o = (*t->tp_alloc)(t, 0);
  if (!o) return 0;
  p = ((struct __pyx_obj_9xmmsvalue_XmmsDictIter *)o);
  p->sourcepref = Py_None; Py_INCREF(Py_None);
  if (__pyx_pf_9xmmsvalue_12XmmsDictIter___cinit__(o, __pyx_empty_tuple, NULL) < 0) {
    Py_DECREF(o); o = 0;
  }
  return o;
}

static void __pyx_tp_dealloc_9xmmsvalue_XmmsDictIter(PyObject *o) {
  struct __pyx_obj_9xmmsvalue_XmmsDictIter *p = (struct __pyx_obj_9xmmsvalue_XmmsDictIter *)o;
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    ++Py_REFCNT(o);
    __pyx_pf_9xmmsvalue_12XmmsDictIter_1__dealloc__(o);
    if (PyErr_Occurred()) PyErr_WriteUnraisable(o);
    --Py_REFCNT(o);
    PyErr_Restore(etype, eval, etb);
  }
  Py_XDECREF(p->sourcepref);
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_9xmmsvalue_XmmsDictIter(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_9xmmsvalue_XmmsDictIter *p = (struct __pyx_obj_9xmmsvalue_XmmsDictIter *)o;
  if (p->sourcepref) {
    e = (*v)(p->sourcepref, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_9xmmsvalue_XmmsDictIter(PyObject *o) {
  struct __pyx_obj_9xmmsvalue_XmmsDictIter *p = (struct __pyx_obj_9xmmsvalue_XmmsDictIter *)o;
  PyObject* tmp;
  tmp = ((PyObject*)p->sourcepref);
  p->sourcepref = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyMethodDef __pyx_methods_9xmmsvalue_XmmsDictIter[] = {
  {__Pyx_NAMESTR("__next__"), (PyCFunction)__pyx_pf_9xmmsvalue_12XmmsDictIter_4__next__, METH_NOARGS|METH_COEXIST, __Pyx_DOCSTR(0)},
  {0, 0, 0, 0}
};

static PyNumberMethods __pyx_tp_as_number_XmmsDictIter = {
  0, /*nb_add*/
  0, /*nb_subtract*/
  0, /*nb_multiply*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_divide*/
  #endif
  0, /*nb_remainder*/
  0, /*nb_divmod*/
  0, /*nb_power*/
  0, /*nb_negative*/
  0, /*nb_positive*/
  0, /*nb_absolute*/
  0, /*nb_nonzero*/
  0, /*nb_invert*/
  0, /*nb_lshift*/
  0, /*nb_rshift*/
  0, /*nb_and*/
  0, /*nb_xor*/
  0, /*nb_or*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_coerce*/
  #endif
  0, /*nb_int*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_long*/
  #else
  0, /*reserved*/
  #endif
  0, /*nb_float*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_oct*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*nb_hex*/
  #endif
  0, /*nb_inplace_add*/
  0, /*nb_inplace_subtract*/
  0, /*nb_inplace_multiply*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_inplace_divide*/
  #endif
  0, /*nb_inplace_remainder*/
  0, /*nb_inplace_power*/
  0, /*nb_inplace_lshift*/
  0, /*nb_inplace_rshift*/
  0, /*nb_inplace_and*/
  0, /*nb_inplace_xor*/
  0, /*nb_inplace_or*/
  0, /*nb_floor_divide*/
  0, /*nb_true_divide*/
  0, /*nb_inplace_floor_divide*/
  0, /*nb_inplace_true_divide*/
  #if PY_VERSION_HEX >= 0x02050000
  0, /*nb_index*/
  #endif
};

static PySequenceMethods __pyx_tp_as_sequence_XmmsDictIter = {
  0, /*sq_length*/
  0, /*sq_concat*/
  0, /*sq_repeat*/
  0, /*sq_item*/
  0, /*sq_slice*/
  0, /*sq_ass_item*/
  0, /*sq_ass_slice*/
  0, /*sq_contains*/
  0, /*sq_inplace_concat*/
  0, /*sq_inplace_repeat*/
};

static PyMappingMethods __pyx_tp_as_mapping_XmmsDictIter = {
  0, /*mp_length*/
  0, /*mp_subscript*/
  0, /*mp_ass_subscript*/
};

static PyBufferProcs __pyx_tp_as_buffer_XmmsDictIter = {
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getreadbuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getwritebuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getsegcount*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getcharbuffer*/
  #endif
  #if PY_VERSION_HEX >= 0x02060000
  0, /*bf_getbuffer*/
  #endif
  #if PY_VERSION_HEX >= 0x02060000
  0, /*bf_releasebuffer*/
  #endif
};

static PyTypeObject __pyx_type_9xmmsvalue_XmmsDictIter = {
  PyVarObject_HEAD_INIT(0, 0)
  __Pyx_NAMESTR("xmmsvalue.XmmsDictIter"), /*tp_name*/
  sizeof(struct __pyx_obj_9xmmsvalue_XmmsDictIter), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_9xmmsvalue_XmmsDictIter, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #else
  0, /*reserved*/
  #endif
  0, /*tp_repr*/
  &__pyx_tp_as_number_XmmsDictIter, /*tp_as_number*/
  &__pyx_tp_as_sequence_XmmsDictIter, /*tp_as_sequence*/
  &__pyx_tp_as_mapping_XmmsDictIter, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  &__pyx_tp_as_buffer_XmmsDictIter, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_9xmmsvalue_XmmsDictIter, /*tp_traverse*/
  __pyx_tp_clear_9xmmsvalue_XmmsDictIter, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  __pyx_pf_9xmmsvalue_12XmmsDictIter_3__iter__, /*tp_iter*/
  __pyx_pf_9xmmsvalue_12XmmsDictIter_4__next__, /*tp_iternext*/
  __pyx_methods_9xmmsvalue_XmmsDictIter, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pf_9xmmsvalue_12XmmsDictIter_2__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_9xmmsvalue_XmmsDictIter, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  #if PY_VERSION_HEX >= 0x02060000
  0, /*tp_version_tag*/
  #endif
};
static struct __pyx_vtabstruct_9xmmsvalue_CollectionRef __pyx_vtable_9xmmsvalue_CollectionRef;

static PyObject *__pyx_tp_new_9xmmsvalue_CollectionRef(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_9xmmsvalue_CollectionRef *p;
  PyObject *o = (*t->tp_alloc)(t, 0);
  if (!o) return 0;
  p = ((struct __pyx_obj_9xmmsvalue_CollectionRef *)o);
  p->__pyx_vtab = __pyx_vtabptr_9xmmsvalue_CollectionRef;
  if (__pyx_pf_9xmmsvalue_13CollectionRef___cinit__(o, __pyx_empty_tuple, NULL) < 0) {
    Py_DECREF(o); o = 0;
  }
  return o;
}

static void __pyx_tp_dealloc_9xmmsvalue_CollectionRef(PyObject *o) {
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    ++Py_REFCNT(o);
    __pyx_pf_9xmmsvalue_13CollectionRef_1__dealloc__(o);
    if (PyErr_Occurred()) PyErr_WriteUnraisable(o);
    --Py_REFCNT(o);
    PyErr_Restore(etype, eval, etb);
  }
  (*Py_TYPE(o)->tp_free)(o);
}

static PyMethodDef __pyx_methods_9xmmsvalue_CollectionRef[] = {
  {0, 0, 0, 0}
};

static PyNumberMethods __pyx_tp_as_number_CollectionRef = {
  0, /*nb_add*/
  0, /*nb_subtract*/
  0, /*nb_multiply*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_divide*/
  #endif
  0, /*nb_remainder*/
  0, /*nb_divmod*/
  0, /*nb_power*/
  0, /*nb_negative*/
  0, /*nb_positive*/
  0, /*nb_absolute*/
  0, /*nb_nonzero*/
  0, /*nb_invert*/
  0, /*nb_lshift*/
  0, /*nb_rshift*/
  0, /*nb_and*/
  0, /*nb_xor*/
  0, /*nb_or*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_coerce*/
  #endif
  0, /*nb_int*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_long*/
  #else
  0, /*reserved*/
  #endif
  0, /*nb_float*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_oct*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*nb_hex*/
  #endif
  0, /*nb_inplace_add*/
  0, /*nb_inplace_subtract*/
  0, /*nb_inplace_multiply*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_inplace_divide*/
  #endif
  0, /*nb_inplace_remainder*/
  0, /*nb_inplace_power*/
  0, /*nb_inplace_lshift*/
  0, /*nb_inplace_rshift*/
  0, /*nb_inplace_and*/
  0, /*nb_inplace_xor*/
  0, /*nb_inplace_or*/
  0, /*nb_floor_divide*/
  0, /*nb_true_divide*/
  0, /*nb_inplace_floor_divide*/
  0, /*nb_inplace_true_divide*/
  #if PY_VERSION_HEX >= 0x02050000
  0, /*nb_index*/
  #endif
};

static PySequenceMethods __pyx_tp_as_sequence_CollectionRef = {
  0, /*sq_length*/
  0, /*sq_concat*/
  0, /*sq_repeat*/
  0, /*sq_item*/
  0, /*sq_slice*/
  0, /*sq_ass_item*/
  0, /*sq_ass_slice*/
  0, /*sq_contains*/
  0, /*sq_inplace_concat*/
  0, /*sq_inplace_repeat*/
};

static PyMappingMethods __pyx_tp_as_mapping_CollectionRef = {
  0, /*mp_length*/
  0, /*mp_subscript*/
  0, /*mp_ass_subscript*/
};

static PyBufferProcs __pyx_tp_as_buffer_CollectionRef = {
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getreadbuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getwritebuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getsegcount*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getcharbuffer*/
  #endif
  #if PY_VERSION_HEX >= 0x02060000
  0, /*bf_getbuffer*/
  #endif
  #if PY_VERSION_HEX >= 0x02060000
  0, /*bf_releasebuffer*/
  #endif
};

static PyTypeObject __pyx_type_9xmmsvalue_CollectionRef = {
  PyVarObject_HEAD_INIT(0, 0)
  __Pyx_NAMESTR("xmmsvalue.CollectionRef"), /*tp_name*/
  sizeof(struct __pyx_obj_9xmmsvalue_CollectionRef), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_9xmmsvalue_CollectionRef, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #else
  0, /*reserved*/
  #endif
  0, /*tp_repr*/
  &__pyx_tp_as_number_CollectionRef, /*tp_as_number*/
  &__pyx_tp_as_sequence_CollectionRef, /*tp_as_sequence*/
  &__pyx_tp_as_mapping_CollectionRef, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  &__pyx_tp_as_buffer_CollectionRef, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  0, /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_9xmmsvalue_CollectionRef, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_9xmmsvalue_CollectionRef, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  #if PY_VERSION_HEX >= 0x02060000
  0, /*tp_version_tag*/
  #endif
};
static struct __pyx_vtabstruct_9xmmsvalue_Collection __pyx_vtable_9xmmsvalue_Collection;

static PyObject *__pyx_tp_new_9xmmsvalue_Collection(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_9xmmsvalue_Collection *p;
  PyObject *o = __pyx_tp_new_9xmmsvalue_CollectionRef(t, a, k);
  if (!o) return 0;
  p = ((struct __pyx_obj_9xmmsvalue_Collection *)o);
  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_9xmmsvalue_CollectionRef*)__pyx_vtabptr_9xmmsvalue_Collection;
  p->_attributes = Py_None; Py_INCREF(Py_None);
  p->_operands = Py_None; Py_INCREF(Py_None);
  p->_idlist = Py_None; Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_9xmmsvalue_Collection(PyObject *o) {
  struct __pyx_obj_9xmmsvalue_Collection *p = (struct __pyx_obj_9xmmsvalue_Collection *)o;
  Py_XDECREF(p->_attributes);
  Py_XDECREF(p->_operands);
  Py_XDECREF(p->_idlist);
  __pyx_tp_dealloc_9xmmsvalue_CollectionRef(o);
}

static int __pyx_tp_traverse_9xmmsvalue_Collection(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_9xmmsvalue_Collection *p = (struct __pyx_obj_9xmmsvalue_Collection *)o;
  if (__pyx_ptype_9xmmsvalue_CollectionRef->tp_traverse) {
    e = __pyx_ptype_9xmmsvalue_CollectionRef->tp_traverse(o, v, a); if (e) return e;
  }
  if (p->_attributes) {
    e = (*v)(p->_attributes, a); if (e) return e;
  }
  if (p->_operands) {
    e = (*v)(p->_operands, a); if (e) return e;
  }
  if (p->_idlist) {
    e = (*v)(p->_idlist, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_9xmmsvalue_Collection(PyObject *o) {
  struct __pyx_obj_9xmmsvalue_Collection *p = (struct __pyx_obj_9xmmsvalue_Collection *)o;
  PyObject* tmp;
  if (__pyx_ptype_9xmmsvalue_CollectionRef->tp_clear) {
    __pyx_ptype_9xmmsvalue_CollectionRef->tp_clear(o);
  }
  tmp = ((PyObject*)p->_attributes);
  p->_attributes = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_operands);
  p->_operands = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  tmp = ((PyObject*)p->_idlist);
  p->_idlist = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyObject *__pyx_getprop_9xmmsvalue_10Collection_attributes(PyObject *o, void *x) {
  return __pyx_pf_9xmmsvalue_10Collection_10attributes___get__(o);
}

static int __pyx_setprop_9xmmsvalue_10Collection_attributes(PyObject *o, PyObject *v, void *x) {
  if (v) {
    return __pyx_pf_9xmmsvalue_10Collection_10attributes_1__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_9xmmsvalue_10Collection_operands(PyObject *o, void *x) {
  return __pyx_pf_9xmmsvalue_10Collection_8operands___get__(o);
}

static int __pyx_setprop_9xmmsvalue_10Collection_operands(PyObject *o, PyObject *v, void *x) {
  if (v) {
    return __pyx_pf_9xmmsvalue_10Collection_8operands_1__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyObject *__pyx_getprop_9xmmsvalue_10Collection_ids(PyObject *o, void *x) {
  return __pyx_pf_9xmmsvalue_10Collection_3ids___get__(o);
}

static int __pyx_setprop_9xmmsvalue_10Collection_ids(PyObject *o, PyObject *v, void *x) {
  if (v) {
    return __pyx_pf_9xmmsvalue_10Collection_3ids_1__set__(o, v);
  }
  else {
    PyErr_SetString(PyExc_NotImplementedError, "__del__");
    return -1;
  }
}

static PyMethodDef __pyx_methods_9xmmsvalue_Collection[] = {
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_9xmmsvalue_Collection[] = {
  {(char *)"attributes", __pyx_getprop_9xmmsvalue_10Collection_attributes, __pyx_setprop_9xmmsvalue_10Collection_attributes, 0, 0},
  {(char *)"operands", __pyx_getprop_9xmmsvalue_10Collection_operands, __pyx_setprop_9xmmsvalue_10Collection_operands, 0, 0},
  {(char *)"ids", __pyx_getprop_9xmmsvalue_10Collection_ids, __pyx_setprop_9xmmsvalue_10Collection_ids, 0, 0},
  {0, 0, 0, 0, 0}
};

static PyNumberMethods __pyx_tp_as_number_Collection = {
  0, /*nb_add*/
  0, /*nb_subtract*/
  0, /*nb_multiply*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_divide*/
  #endif
  0, /*nb_remainder*/
  0, /*nb_divmod*/
  0, /*nb_power*/
  0, /*nb_negative*/
  0, /*nb_positive*/
  0, /*nb_absolute*/
  0, /*nb_nonzero*/
  __pyx_pf_9xmmsvalue_10Collection_3__invert__, /*nb_invert*/
  0, /*nb_lshift*/
  0, /*nb_rshift*/
  __pyx_pf_9xmmsvalue_10Collection_2__and__, /*nb_and*/
  0, /*nb_xor*/
  __pyx_pf_9xmmsvalue_10Collection_1__or__, /*nb_or*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_coerce*/
  #endif
  0, /*nb_int*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_long*/
  #else
  0, /*reserved*/
  #endif
  0, /*nb_float*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_oct*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*nb_hex*/
  #endif
  0, /*nb_inplace_add*/
  0, /*nb_inplace_subtract*/
  0, /*nb_inplace_multiply*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_inplace_divide*/
  #endif
  0, /*nb_inplace_remainder*/
  0, /*nb_inplace_power*/
  0, /*nb_inplace_lshift*/
  0, /*nb_inplace_rshift*/
  0, /*nb_inplace_and*/
  0, /*nb_inplace_xor*/
  0, /*nb_inplace_or*/
  0, /*nb_floor_divide*/
  0, /*nb_true_divide*/
  0, /*nb_inplace_floor_divide*/
  0, /*nb_inplace_true_divide*/
  #if PY_VERSION_HEX >= 0x02050000
  0, /*nb_index*/
  #endif
};

static PySequenceMethods __pyx_tp_as_sequence_Collection = {
  0, /*sq_length*/
  0, /*sq_concat*/
  0, /*sq_repeat*/
  0, /*sq_item*/
  0, /*sq_slice*/
  0, /*sq_ass_item*/
  0, /*sq_ass_slice*/
  0, /*sq_contains*/
  0, /*sq_inplace_concat*/
  0, /*sq_inplace_repeat*/
};

static PyMappingMethods __pyx_tp_as_mapping_Collection = {
  0, /*mp_length*/
  0, /*mp_subscript*/
  0, /*mp_ass_subscript*/
};

static PyBufferProcs __pyx_tp_as_buffer_Collection = {
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getreadbuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getwritebuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getsegcount*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getcharbuffer*/
  #endif
  #if PY_VERSION_HEX >= 0x02060000
  0, /*bf_getbuffer*/
  #endif
  #if PY_VERSION_HEX >= 0x02060000
  0, /*bf_releasebuffer*/
  #endif
};

static PyTypeObject __pyx_type_9xmmsvalue_Collection = {
  PyVarObject_HEAD_INIT(0, 0)
  __Pyx_NAMESTR("xmmsvalue.Collection"), /*tp_name*/
  sizeof(struct __pyx_obj_9xmmsvalue_Collection), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_9xmmsvalue_Collection, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #else
  0, /*reserved*/
  #endif
  __pyx_pf_9xmmsvalue_10Collection___repr__, /*tp_repr*/
  &__pyx_tp_as_number_Collection, /*tp_as_number*/
  &__pyx_tp_as_sequence_Collection, /*tp_as_sequence*/
  &__pyx_tp_as_mapping_Collection, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  &__pyx_tp_as_buffer_Collection, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_9xmmsvalue_Collection, /*tp_traverse*/
  __pyx_tp_clear_9xmmsvalue_Collection, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_9xmmsvalue_Collection, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_9xmmsvalue_Collection, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  0, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_9xmmsvalue_Collection, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  #if PY_VERSION_HEX >= 0x02060000
  0, /*tp_version_tag*/
  #endif
};
static struct __pyx_vtabstruct_9xmmsvalue_CollectionAttributes __pyx_vtable_9xmmsvalue_CollectionAttributes;

static PyObject *__pyx_tp_new_9xmmsvalue_CollectionAttributes(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_9xmmsvalue_CollectionAttributes *p;
  PyObject *o = __pyx_tp_new_9xmmsvalue_CollectionRef(t, a, k);
  if (!o) return 0;
  p = ((struct __pyx_obj_9xmmsvalue_CollectionAttributes *)o);
  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_9xmmsvalue_CollectionRef*)__pyx_vtabptr_9xmmsvalue_CollectionAttributes;
  return o;
}
static PyObject *__pyx_sq_item_9xmmsvalue_CollectionAttributes(PyObject *o, Py_ssize_t i) {
  PyObject *r;
  PyObject *x = PyInt_FromSsize_t(i); if(!x) return 0;
  r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x);
  Py_DECREF(x);
  return r;
}

static int __pyx_mp_ass_subscript_9xmmsvalue_CollectionAttributes(PyObject *o, PyObject *i, PyObject *v) {
  if (v) {
    return __pyx_pf_9xmmsvalue_20CollectionAttributes_12__setitem__(o, i, v);
  }
  else {
    if (__pyx_ptype_9xmmsvalue_CollectionRef->tp_as_mapping && __pyx_ptype_9xmmsvalue_CollectionRef->tp_as_mapping->mp_ass_subscript)
      return __pyx_ptype_9xmmsvalue_CollectionRef->tp_as_mapping->mp_ass_subscript(o, i, v);
    PyErr_Format(PyExc_NotImplementedError,
      "Subscript deletion not supported by %s", Py_TYPE(o)->tp_name);
    return -1;
  }
}

static PyMethodDef __pyx_methods_9xmmsvalue_CollectionAttributes[] = {
  {__Pyx_NAMESTR("get_dict"), (PyCFunction)__pyx_pf_9xmmsvalue_20CollectionAttributes_1get_dict, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_9xmmsvalue_20CollectionAttributes_1get_dict)},
  {__Pyx_NAMESTR("iterkeys"), (PyCFunction)__pyx_pf_9xmmsvalue_20CollectionAttributes_2iterkeys, METH_NOARGS, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("keys"), (PyCFunction)__pyx_pf_9xmmsvalue_20CollectionAttributes_3keys, METH_NOARGS, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("itervalues"), (PyCFunction)__pyx_pf_9xmmsvalue_20CollectionAttributes_4itervalues, METH_NOARGS, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("values"), (PyCFunction)__pyx_pf_9xmmsvalue_20CollectionAttributes_5values, METH_NOARGS, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("iteritems"), (PyCFunction)__pyx_pf_9xmmsvalue_20CollectionAttributes_6iteritems, METH_NOARGS, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("items"), (PyCFunction)__pyx_pf_9xmmsvalue_20CollectionAttributes_7items, METH_NOARGS, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("get"), (PyCFunction)__pyx_pf_9xmmsvalue_20CollectionAttributes_13get, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("clear"), (PyCFunction)__pyx_pf_9xmmsvalue_20CollectionAttributes_14clear, METH_NOARGS, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("update"), (PyCFunction)__pyx_pf_9xmmsvalue_20CollectionAttributes_15update, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)},
  {0, 0, 0, 0}
};

static PyNumberMethods __pyx_tp_as_number_CollectionAttributes = {
  0, /*nb_add*/
  0, /*nb_subtract*/
  0, /*nb_multiply*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_divide*/
  #endif
  0, /*nb_remainder*/
  0, /*nb_divmod*/
  0, /*nb_power*/
  0, /*nb_negative*/
  0, /*nb_positive*/
  0, /*nb_absolute*/
  0, /*nb_nonzero*/
  0, /*nb_invert*/
  0, /*nb_lshift*/
  0, /*nb_rshift*/
  0, /*nb_and*/
  0, /*nb_xor*/
  0, /*nb_or*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_coerce*/
  #endif
  0, /*nb_int*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_long*/
  #else
  0, /*reserved*/
  #endif
  0, /*nb_float*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_oct*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*nb_hex*/
  #endif
  0, /*nb_inplace_add*/
  0, /*nb_inplace_subtract*/
  0, /*nb_inplace_multiply*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_inplace_divide*/
  #endif
  0, /*nb_inplace_remainder*/
  0, /*nb_inplace_power*/
  0, /*nb_inplace_lshift*/
  0, /*nb_inplace_rshift*/
  0, /*nb_inplace_and*/
  0, /*nb_inplace_xor*/
  0, /*nb_inplace_or*/
  0, /*nb_floor_divide*/
  0, /*nb_true_divide*/
  0, /*nb_inplace_floor_divide*/
  0, /*nb_inplace_true_divide*/
  #if PY_VERSION_HEX >= 0x02050000
  0, /*nb_index*/
  #endif
};

static PySequenceMethods __pyx_tp_as_sequence_CollectionAttributes = {
  0, /*sq_length*/
  0, /*sq_concat*/
  0, /*sq_repeat*/
  __pyx_sq_item_9xmmsvalue_CollectionAttributes, /*sq_item*/
  0, /*sq_slice*/
  0, /*sq_ass_item*/
  0, /*sq_ass_slice*/
  __pyx_pf_9xmmsvalue_20CollectionAttributes_16__contains__, /*sq_contains*/
  0, /*sq_inplace_concat*/
  0, /*sq_inplace_repeat*/
};

static PyMappingMethods __pyx_tp_as_mapping_CollectionAttributes = {
  0, /*mp_length*/
  __pyx_pf_9xmmsvalue_20CollectionAttributes_11__getitem__, /*mp_subscript*/
  __pyx_mp_ass_subscript_9xmmsvalue_CollectionAttributes, /*mp_ass_subscript*/
};

static PyBufferProcs __pyx_tp_as_buffer_CollectionAttributes = {
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getreadbuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getwritebuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getsegcount*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getcharbuffer*/
  #endif
  #if PY_VERSION_HEX >= 0x02060000
  0, /*bf_getbuffer*/
  #endif
  #if PY_VERSION_HEX >= 0x02060000
  0, /*bf_releasebuffer*/
  #endif
};

static PyTypeObject __pyx_type_9xmmsvalue_CollectionAttributes = {
  PyVarObject_HEAD_INIT(0, 0)
  __Pyx_NAMESTR("xmmsvalue.CollectionAttributes"), /*tp_name*/
  sizeof(struct __pyx_obj_9xmmsvalue_CollectionAttributes), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_9xmmsvalue_CollectionRef, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #else
  0, /*reserved*/
  #endif
  __pyx_pf_9xmmsvalue_20CollectionAttributes_9__repr__, /*tp_repr*/
  &__pyx_tp_as_number_CollectionAttributes, /*tp_as_number*/
  &__pyx_tp_as_sequence_CollectionAttributes, /*tp_as_sequence*/
  &__pyx_tp_as_mapping_CollectionAttributes, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  __pyx_pf_9xmmsvalue_20CollectionAttributes_10__str__, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  &__pyx_tp_as_buffer_CollectionAttributes, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  0, /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  __pyx_pf_9xmmsvalue_20CollectionAttributes_8__iter__, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_9xmmsvalue_CollectionAttributes, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pf_9xmmsvalue_20CollectionAttributes___init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_9xmmsvalue_CollectionAttributes, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  #if PY_VERSION_HEX >= 0x02060000
  0, /*tp_version_tag*/
  #endif
};
static struct __pyx_vtabstruct_9xmmsvalue_AttributesIterator __pyx_vtable_9xmmsvalue_AttributesIterator;

static PyObject *__pyx_tp_new_9xmmsvalue_AttributesIterator(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_9xmmsvalue_AttributesIterator *p;
  PyObject *o = (*t->tp_alloc)(t, 0);
  if (!o) return 0;
  p = ((struct __pyx_obj_9xmmsvalue_AttributesIterator *)o);
  p->__pyx_vtab = __pyx_vtabptr_9xmmsvalue_AttributesIterator;
  p->attr = ((struct __pyx_obj_9xmmsvalue_CollectionAttributes *)Py_None); Py_INCREF(Py_None);
  if (__pyx_pf_9xmmsvalue_18AttributesIterator___cinit__(o, __pyx_empty_tuple, NULL) < 0) {
    Py_DECREF(o); o = 0;
  }
  return o;
}

static void __pyx_tp_dealloc_9xmmsvalue_AttributesIterator(PyObject *o) {
  struct __pyx_obj_9xmmsvalue_AttributesIterator *p = (struct __pyx_obj_9xmmsvalue_AttributesIterator *)o;
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    ++Py_REFCNT(o);
    __pyx_pf_9xmmsvalue_18AttributesIterator_1__dealloc__(o);
    if (PyErr_Occurred()) PyErr_WriteUnraisable(o);
    --Py_REFCNT(o);
    PyErr_Restore(etype, eval, etb);
  }
  Py_XDECREF(((PyObject *)p->attr));
  (*Py_TYPE(o)->tp_free)(o);
}

static int __pyx_tp_traverse_9xmmsvalue_AttributesIterator(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_9xmmsvalue_AttributesIterator *p = (struct __pyx_obj_9xmmsvalue_AttributesIterator *)o;
  if (p->attr) {
    e = (*v)(((PyObject*)p->attr), a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_9xmmsvalue_AttributesIterator(PyObject *o) {
  struct __pyx_obj_9xmmsvalue_AttributesIterator *p = (struct __pyx_obj_9xmmsvalue_AttributesIterator *)o;
  PyObject* tmp;
  tmp = ((PyObject*)p->attr);
  p->attr = ((struct __pyx_obj_9xmmsvalue_CollectionAttributes *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyMethodDef __pyx_methods_9xmmsvalue_AttributesIterator[] = {
  {__Pyx_NAMESTR("__next__"), (PyCFunction)__pyx_pf_9xmmsvalue_18AttributesIterator_4__next__, METH_NOARGS|METH_COEXIST, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("reset"), (PyCFunction)__pyx_pf_9xmmsvalue_18AttributesIterator_5reset, METH_NOARGS, __Pyx_DOCSTR(0)},
  {0, 0, 0, 0}
};

static PyNumberMethods __pyx_tp_as_number_AttributesIterator = {
  0, /*nb_add*/
  0, /*nb_subtract*/
  0, /*nb_multiply*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_divide*/
  #endif
  0, /*nb_remainder*/
  0, /*nb_divmod*/
  0, /*nb_power*/
  0, /*nb_negative*/
  0, /*nb_positive*/
  0, /*nb_absolute*/
  0, /*nb_nonzero*/
  0, /*nb_invert*/
  0, /*nb_lshift*/
  0, /*nb_rshift*/
  0, /*nb_and*/
  0, /*nb_xor*/
  0, /*nb_or*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_coerce*/
  #endif
  0, /*nb_int*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_long*/
  #else
  0, /*reserved*/
  #endif
  0, /*nb_float*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_oct*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*nb_hex*/
  #endif
  0, /*nb_inplace_add*/
  0, /*nb_inplace_subtract*/
  0, /*nb_inplace_multiply*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_inplace_divide*/
  #endif
  0, /*nb_inplace_remainder*/
  0, /*nb_inplace_power*/
  0, /*nb_inplace_lshift*/
  0, /*nb_inplace_rshift*/
  0, /*nb_inplace_and*/
  0, /*nb_inplace_xor*/
  0, /*nb_inplace_or*/
  0, /*nb_floor_divide*/
  0, /*nb_true_divide*/
  0, /*nb_inplace_floor_divide*/
  0, /*nb_inplace_true_divide*/
  #if PY_VERSION_HEX >= 0x02050000
  0, /*nb_index*/
  #endif
};

static PySequenceMethods __pyx_tp_as_sequence_AttributesIterator = {
  0, /*sq_length*/
  0, /*sq_concat*/
  0, /*sq_repeat*/
  0, /*sq_item*/
  0, /*sq_slice*/
  0, /*sq_ass_item*/
  0, /*sq_ass_slice*/
  0, /*sq_contains*/
  0, /*sq_inplace_concat*/
  0, /*sq_inplace_repeat*/
};

static PyMappingMethods __pyx_tp_as_mapping_AttributesIterator = {
  0, /*mp_length*/
  0, /*mp_subscript*/
  0, /*mp_ass_subscript*/
};

static PyBufferProcs __pyx_tp_as_buffer_AttributesIterator = {
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getreadbuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getwritebuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getsegcount*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getcharbuffer*/
  #endif
  #if PY_VERSION_HEX >= 0x02060000
  0, /*bf_getbuffer*/
  #endif
  #if PY_VERSION_HEX >= 0x02060000
  0, /*bf_releasebuffer*/
  #endif
};

static PyTypeObject __pyx_type_9xmmsvalue_AttributesIterator = {
  PyVarObject_HEAD_INIT(0, 0)
  __Pyx_NAMESTR("xmmsvalue.AttributesIterator"), /*tp_name*/
  sizeof(struct __pyx_obj_9xmmsvalue_AttributesIterator), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_9xmmsvalue_AttributesIterator, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #else
  0, /*reserved*/
  #endif
  0, /*tp_repr*/
  &__pyx_tp_as_number_AttributesIterator, /*tp_as_number*/
  &__pyx_tp_as_sequence_AttributesIterator, /*tp_as_sequence*/
  &__pyx_tp_as_mapping_AttributesIterator, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  &__pyx_tp_as_buffer_AttributesIterator, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_9xmmsvalue_AttributesIterator, /*tp_traverse*/
  __pyx_tp_clear_9xmmsvalue_AttributesIterator, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  __pyx_pf_9xmmsvalue_18AttributesIterator_3__iter__, /*tp_iter*/
  __pyx_pf_9xmmsvalue_18AttributesIterator_4__next__, /*tp_iternext*/
  __pyx_methods_9xmmsvalue_AttributesIterator, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pf_9xmmsvalue_18AttributesIterator_2__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_9xmmsvalue_AttributesIterator, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  #if PY_VERSION_HEX >= 0x02060000
  0, /*tp_version_tag*/
  #endif
};
static struct __pyx_vtabstruct_9xmmsvalue_CollectionOperands __pyx_vtable_9xmmsvalue_CollectionOperands;

static PyObject *__pyx_tp_new_9xmmsvalue_CollectionOperands(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_9xmmsvalue_CollectionOperands *p;
  PyObject *o = __pyx_tp_new_9xmmsvalue_CollectionRef(t, a, k);
  if (!o) return 0;
  p = ((struct __pyx_obj_9xmmsvalue_CollectionOperands *)o);
  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_9xmmsvalue_CollectionRef*)__pyx_vtabptr_9xmmsvalue_CollectionOperands;
  p->pylist = Py_None; Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_9xmmsvalue_CollectionOperands(PyObject *o) {
  struct __pyx_obj_9xmmsvalue_CollectionOperands *p = (struct __pyx_obj_9xmmsvalue_CollectionOperands *)o;
  Py_XDECREF(p->pylist);
  __pyx_tp_dealloc_9xmmsvalue_CollectionRef(o);
}

static int __pyx_tp_traverse_9xmmsvalue_CollectionOperands(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_9xmmsvalue_CollectionOperands *p = (struct __pyx_obj_9xmmsvalue_CollectionOperands *)o;
  if (__pyx_ptype_9xmmsvalue_CollectionRef->tp_traverse) {
    e = __pyx_ptype_9xmmsvalue_CollectionRef->tp_traverse(o, v, a); if (e) return e;
  }
  if (p->pylist) {
    e = (*v)(p->pylist, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_9xmmsvalue_CollectionOperands(PyObject *o) {
  struct __pyx_obj_9xmmsvalue_CollectionOperands *p = (struct __pyx_obj_9xmmsvalue_CollectionOperands *)o;
  PyObject* tmp;
  if (__pyx_ptype_9xmmsvalue_CollectionRef->tp_clear) {
    __pyx_ptype_9xmmsvalue_CollectionRef->tp_clear(o);
  }
  tmp = ((PyObject*)p->pylist);
  p->pylist = Py_None; Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}
static PyObject *__pyx_sq_item_9xmmsvalue_CollectionOperands(PyObject *o, Py_ssize_t i) {
  PyObject *r;
  PyObject *x = PyInt_FromSsize_t(i); if(!x) return 0;
  r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x);
  Py_DECREF(x);
  return r;
}

static int __pyx_mp_ass_subscript_9xmmsvalue_CollectionOperands(PyObject *o, PyObject *i, PyObject *v) {
  if (v) {
    if (__pyx_ptype_9xmmsvalue_CollectionRef->tp_as_mapping && __pyx_ptype_9xmmsvalue_CollectionRef->tp_as_mapping->mp_ass_subscript)
      return __pyx_ptype_9xmmsvalue_CollectionRef->tp_as_mapping->mp_ass_subscript(o, i, v);
    PyErr_Format(PyExc_NotImplementedError,
      "Subscript assignment not supported by %s", Py_TYPE(o)->tp_name);
    return -1;
  }
  else {
    return __pyx_pf_9xmmsvalue_18CollectionOperands_5__delitem__(o, i);
  }
}

static PyMethodDef __pyx_methods_9xmmsvalue_CollectionOperands[] = {
  {__Pyx_NAMESTR("append"), (PyCFunction)__pyx_pf_9xmmsvalue_18CollectionOperands_7append, METH_O, __Pyx_DOCSTR(__pyx_doc_9xmmsvalue_18CollectionOperands_7append)},
  {__Pyx_NAMESTR("extend"), (PyCFunction)__pyx_pf_9xmmsvalue_18CollectionOperands_8extend, METH_O, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("remove"), (PyCFunction)__pyx_pf_9xmmsvalue_18CollectionOperands_9remove, METH_O, __Pyx_DOCSTR(__pyx_doc_9xmmsvalue_18CollectionOperands_9remove)},
  {__Pyx_NAMESTR("clear"), (PyCFunction)__pyx_pf_9xmmsvalue_18CollectionOperands_10clear, METH_NOARGS, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("list"), (PyCFunction)__pyx_pf_9xmmsvalue_18CollectionOperands_11list, METH_NOARGS, __Pyx_DOCSTR(0)},
  {0, 0, 0, 0}
};

static PyNumberMethods __pyx_tp_as_number_CollectionOperands = {
  0, /*nb_add*/
  0, /*nb_subtract*/
  0, /*nb_multiply*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_divide*/
  #endif
  0, /*nb_remainder*/
  0, /*nb_divmod*/
  0, /*nb_power*/
  0, /*nb_negative*/
  0, /*nb_positive*/
  0, /*nb_absolute*/
  0, /*nb_nonzero*/
  0, /*nb_invert*/
  0, /*nb_lshift*/
  0, /*nb_rshift*/
  0, /*nb_and*/
  0, /*nb_xor*/
  0, /*nb_or*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_coerce*/
  #endif
  0, /*nb_int*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_long*/
  #else
  0, /*reserved*/
  #endif
  0, /*nb_float*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_oct*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*nb_hex*/
  #endif
  0, /*nb_inplace_add*/
  0, /*nb_inplace_subtract*/
  0, /*nb_inplace_multiply*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_inplace_divide*/
  #endif
  0, /*nb_inplace_remainder*/
  0, /*nb_inplace_power*/
  0, /*nb_inplace_lshift*/
  0, /*nb_inplace_rshift*/
  0, /*nb_inplace_and*/
  0, /*nb_inplace_xor*/
  0, /*nb_inplace_or*/
  0, /*nb_floor_divide*/
  0, /*nb_true_divide*/
  0, /*nb_inplace_floor_divide*/
  0, /*nb_inplace_true_divide*/
  #if PY_VERSION_HEX >= 0x02050000
  0, /*nb_index*/
  #endif
};

static PySequenceMethods __pyx_tp_as_sequence_CollectionOperands = {
  __pyx_pf_9xmmsvalue_18CollectionOperands_3__len__, /*sq_length*/
  0, /*sq_concat*/
  0, /*sq_repeat*/
  __pyx_sq_item_9xmmsvalue_CollectionOperands, /*sq_item*/
  0, /*sq_slice*/
  0, /*sq_ass_item*/
  0, /*sq_ass_slice*/
  0, /*sq_contains*/
  0, /*sq_inplace_concat*/
  0, /*sq_inplace_repeat*/
};

static PyMappingMethods __pyx_tp_as_mapping_CollectionOperands = {
  __pyx_pf_9xmmsvalue_18CollectionOperands_3__len__, /*mp_length*/
  __pyx_pf_9xmmsvalue_18CollectionOperands_4__getitem__, /*mp_subscript*/
  __pyx_mp_ass_subscript_9xmmsvalue_CollectionOperands, /*mp_ass_subscript*/
};

static PyBufferProcs __pyx_tp_as_buffer_CollectionOperands = {
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getreadbuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getwritebuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getsegcount*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getcharbuffer*/
  #endif
  #if PY_VERSION_HEX >= 0x02060000
  0, /*bf_getbuffer*/
  #endif
  #if PY_VERSION_HEX >= 0x02060000
  0, /*bf_releasebuffer*/
  #endif
};

static PyTypeObject __pyx_type_9xmmsvalue_CollectionOperands = {
  PyVarObject_HEAD_INIT(0, 0)
  __Pyx_NAMESTR("xmmsvalue.CollectionOperands"), /*tp_name*/
  sizeof(struct __pyx_obj_9xmmsvalue_CollectionOperands), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_9xmmsvalue_CollectionOperands, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #else
  0, /*reserved*/
  #endif
  __pyx_pf_9xmmsvalue_18CollectionOperands_1__repr__, /*tp_repr*/
  &__pyx_tp_as_number_CollectionOperands, /*tp_as_number*/
  &__pyx_tp_as_sequence_CollectionOperands, /*tp_as_sequence*/
  &__pyx_tp_as_mapping_CollectionOperands, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  __pyx_pf_9xmmsvalue_18CollectionOperands_2__str__, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  &__pyx_tp_as_buffer_CollectionOperands, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_9xmmsvalue_CollectionOperands, /*tp_traverse*/
  __pyx_tp_clear_9xmmsvalue_CollectionOperands, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  __pyx_pf_9xmmsvalue_18CollectionOperands_6__iter__, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_9xmmsvalue_CollectionOperands, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pf_9xmmsvalue_18CollectionOperands___init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_9xmmsvalue_CollectionOperands, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  #if PY_VERSION_HEX >= 0x02060000
  0, /*tp_version_tag*/
  #endif
};
static struct __pyx_vtabstruct_9xmmsvalue_CollectionIDList __pyx_vtable_9xmmsvalue_CollectionIDList;

static PyObject *__pyx_tp_new_9xmmsvalue_CollectionIDList(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_9xmmsvalue_CollectionIDList *p;
  PyObject *o = __pyx_tp_new_9xmmsvalue_CollectionRef(t, a, k);
  if (!o) return 0;
  p = ((struct __pyx_obj_9xmmsvalue_CollectionIDList *)o);
  p->__pyx_base.__pyx_vtab = (struct __pyx_vtabstruct_9xmmsvalue_CollectionRef*)__pyx_vtabptr_9xmmsvalue_CollectionIDList;
  return o;
}
static PyObject *__pyx_sq_item_9xmmsvalue_CollectionIDList(PyObject *o, Py_ssize_t i) {
  PyObject *r;
  PyObject *x = PyInt_FromSsize_t(i); if(!x) return 0;
  r = Py_TYPE(o)->tp_as_mapping->mp_subscript(o, x);
  Py_DECREF(x);
  return r;
}

static int __pyx_mp_ass_subscript_9xmmsvalue_CollectionIDList(PyObject *o, PyObject *i, PyObject *v) {
  if (v) {
    return __pyx_pf_9xmmsvalue_16CollectionIDList_12__setitem__(o, i, v);
  }
  else {
    return __pyx_pf_9xmmsvalue_16CollectionIDList_10__delitem__(o, i);
  }
}

static PyMethodDef __pyx_methods_9xmmsvalue_CollectionIDList[] = {
  {__Pyx_NAMESTR("list"), (PyCFunction)__pyx_pf_9xmmsvalue_16CollectionIDList_2list, METH_NOARGS, __Pyx_DOCSTR(__pyx_doc_9xmmsvalue_16CollectionIDList_2list)},
  {__Pyx_NAMESTR("append"), (PyCFunction)__pyx_pf_9xmmsvalue_16CollectionIDList_5append, METH_O, __Pyx_DOCSTR(__pyx_doc_9xmmsvalue_16CollectionIDList_5append)},
  {__Pyx_NAMESTR("extend"), (PyCFunction)__pyx_pf_9xmmsvalue_16CollectionIDList_6extend, METH_O, __Pyx_DOCSTR(0)},
  {__Pyx_NAMESTR("insert"), (PyCFunction)__pyx_pf_9xmmsvalue_16CollectionIDList_8insert, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_9xmmsvalue_16CollectionIDList_8insert)},
  {__Pyx_NAMESTR("remove"), (PyCFunction)__pyx_pf_9xmmsvalue_16CollectionIDList_9remove, METH_O, __Pyx_DOCSTR(__pyx_doc_9xmmsvalue_16CollectionIDList_9remove)},
  {__Pyx_NAMESTR("clear"), (PyCFunction)__pyx_pf_9xmmsvalue_16CollectionIDList_13clear, METH_NOARGS, __Pyx_DOCSTR(0)},
  {0, 0, 0, 0}
};

static PyNumberMethods __pyx_tp_as_number_CollectionIDList = {
  0, /*nb_add*/
  0, /*nb_subtract*/
  0, /*nb_multiply*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_divide*/
  #endif
  0, /*nb_remainder*/
  0, /*nb_divmod*/
  0, /*nb_power*/
  0, /*nb_negative*/
  0, /*nb_positive*/
  0, /*nb_absolute*/
  0, /*nb_nonzero*/
  0, /*nb_invert*/
  0, /*nb_lshift*/
  0, /*nb_rshift*/
  0, /*nb_and*/
  0, /*nb_xor*/
  0, /*nb_or*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_coerce*/
  #endif
  0, /*nb_int*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_long*/
  #else
  0, /*reserved*/
  #endif
  0, /*nb_float*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_oct*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*nb_hex*/
  #endif
  __pyx_pf_9xmmsvalue_16CollectionIDList_7__iadd__, /*nb_inplace_add*/
  0, /*nb_inplace_subtract*/
  0, /*nb_inplace_multiply*/
  #if PY_MAJOR_VERSION < 3
  0, /*nb_inplace_divide*/
  #endif
  0, /*nb_inplace_remainder*/
  0, /*nb_inplace_power*/
  0, /*nb_inplace_lshift*/
  0, /*nb_inplace_rshift*/
  0, /*nb_inplace_and*/
  0, /*nb_inplace_xor*/
  0, /*nb_inplace_or*/
  0, /*nb_floor_divide*/
  0, /*nb_true_divide*/
  0, /*nb_inplace_floor_divide*/
  0, /*nb_inplace_true_divide*/
  #if PY_VERSION_HEX >= 0x02050000
  0, /*nb_index*/
  #endif
};

static PySequenceMethods __pyx_tp_as_sequence_CollectionIDList = {
  __pyx_pf_9xmmsvalue_16CollectionIDList_1__len__, /*sq_length*/
  0, /*sq_concat*/
  0, /*sq_repeat*/
  __pyx_sq_item_9xmmsvalue_CollectionIDList, /*sq_item*/
  0, /*sq_slice*/
  0, /*sq_ass_item*/
  0, /*sq_ass_slice*/
  0, /*sq_contains*/
  0, /*sq_inplace_concat*/
  0, /*sq_inplace_repeat*/
};

static PyMappingMethods __pyx_tp_as_mapping_CollectionIDList = {
  __pyx_pf_9xmmsvalue_16CollectionIDList_1__len__, /*mp_length*/
  __pyx_pf_9xmmsvalue_16CollectionIDList_11__getitem__, /*mp_subscript*/
  __pyx_mp_ass_subscript_9xmmsvalue_CollectionIDList, /*mp_ass_subscript*/
};

static PyBufferProcs __pyx_tp_as_buffer_CollectionIDList = {
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getreadbuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getwritebuffer*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getsegcount*/
  #endif
  #if PY_MAJOR_VERSION < 3
  0, /*bf_getcharbuffer*/
  #endif
  #if PY_VERSION_HEX >= 0x02060000
  0, /*bf_getbuffer*/
  #endif
  #if PY_VERSION_HEX >= 0x02060000
  0, /*bf_releasebuffer*/
  #endif
};

static PyTypeObject __pyx_type_9xmmsvalue_CollectionIDList = {
  PyVarObject_HEAD_INIT(0, 0)
  __Pyx_NAMESTR("xmmsvalue.CollectionIDList"), /*tp_name*/
  sizeof(struct __pyx_obj_9xmmsvalue_CollectionIDList), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_9xmmsvalue_CollectionRef, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #else
  0, /*reserved*/
  #endif
  __pyx_pf_9xmmsvalue_16CollectionIDList_3__repr__, /*tp_repr*/
  &__pyx_tp_as_number_CollectionIDList, /*tp_as_number*/
  &__pyx_tp_as_sequence_CollectionIDList, /*tp_as_sequence*/
  &__pyx_tp_as_mapping_CollectionIDList, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  &__pyx_tp_as_buffer_CollectionIDList, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/
  0, /*tp_doc*/
  0, /*tp_traverse*/
  0, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  __pyx_pf_9xmmsvalue_16CollectionIDList_4__iter__, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_9xmmsvalue_CollectionIDList, /*tp_methods*/
  0, /*tp_members*/
  0, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pf_9xmmsvalue_16CollectionIDList___init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_9xmmsvalue_CollectionIDList, /*tp_new*/
  0, /*tp_free*/
  0, /*tp_is_gc*/
  0, /*tp_bases*/
  0, /*tp_mro*/
  0, /*tp_cache*/
  0, /*tp_subclasses*/
  0, /*tp_weaklist*/
  0, /*tp_del*/
  #if PY_VERSION_HEX >= 0x02060000
  0, /*tp_version_tag*/
  #endif
};

static PyMethodDef __pyx_methods[] = {
  {0, 0, 0, 0}
};

#if PY_MAJOR_VERSION >= 3
static struct PyModuleDef __pyx_moduledef = {
    PyModuleDef_HEAD_INIT,
    __Pyx_NAMESTR("xmmsvalue"),
    __Pyx_DOCSTR(__pyx_k_51), /* m_doc */
    -1, /* m_size */
    __pyx_methods /* m_methods */,
    NULL, /* m_reload */
    NULL, /* m_traverse */
    NULL, /* m_clear */
    NULL /* m_free */
};
#endif

static __Pyx_StringTabEntry __pyx_string_tab[] = {
  {&__pyx_kp_s_1, __pyx_k_1, sizeof(__pyx_k_1), 0, 0, 1, 0},
  {&__pyx_kp_s_11, __pyx_k_11, sizeof(__pyx_k_11), 0, 0, 1, 0},
  {&__pyx_kp_s_13, __pyx_k_13, sizeof(__pyx_k_13), 0, 0, 1, 0},
  {&__pyx_kp_s_15, __pyx_k_15, sizeof(__pyx_k_15), 0, 0, 1, 0},
  {&__pyx_kp_s_18, __pyx_k_18, sizeof(__pyx_k_18), 0, 0, 1, 0},
  {&__pyx_kp_s_2, __pyx_k_2, sizeof(__pyx_k_2), 0, 0, 1, 0},
  {&__pyx_kp_s_20, __pyx_k_20, sizeof(__pyx_k_20), 0, 0, 1, 0},
  {&__pyx_kp_s_22, __pyx_k_22, sizeof(__pyx_k_22), 0, 0, 1, 0},
  {&__pyx_kp_s_23, __pyx_k_23, sizeof(__pyx_k_23), 0, 0, 1, 0},
  {&__pyx_kp_s_24, __pyx_k_24, sizeof(__pyx_k_24), 0, 0, 1, 0},
  {&__pyx_kp_s_25, __pyx_k_25, sizeof(__pyx_k_25), 0, 0, 1, 0},
  {&__pyx_kp_s_27, __pyx_k_27, sizeof(__pyx_k_27), 0, 0, 1, 0},
  {&__pyx_kp_s_29, __pyx_k_29, sizeof(__pyx_k_29), 0, 0, 1, 0},
  {&__pyx_kp_s_31, __pyx_k_31, sizeof(__pyx_k_31), 0, 0, 1, 0},
  {&__pyx_kp_s_33, __pyx_k_33, sizeof(__pyx_k_33), 0, 0, 1, 0},
  {&__pyx_kp_s_40, __pyx_k_40, sizeof(__pyx_k_40), 0, 0, 1, 0},
  {&__pyx_kp_s_44, __pyx_k_44, sizeof(__pyx_k_44), 0, 0, 1, 0},
  {&__pyx_kp_s_45, __pyx_k_45, sizeof(__pyx_k_45), 0, 0, 1, 0},
  {&__pyx_kp_s_47, __pyx_k_47, sizeof(__pyx_k_47), 0, 0, 1, 0},
  {&__pyx_kp_s_49, __pyx_k_49, sizeof(__pyx_k_49), 0, 0, 1, 0},
  {&__pyx_n_s_52, __pyx_k_52, sizeof(__pyx_k_52), 0, 0, 1, 1},
  {&__pyx_n_s_53, __pyx_k_53, sizeof(__pyx_k_53), 0, 0, 1, 1},
  {&__pyx_n_s_54, __pyx_k_54, sizeof(__pyx_k_54), 0, 0, 1, 1},
  {&__pyx_n_s_55, __pyx_k_55, sizeof(__pyx_k_55), 0, 0, 1, 1},
  {&__pyx_n_s_56, __pyx_k_56, sizeof(__pyx_k_56), 0, 0, 1, 1},
  {&__pyx_n_s_57, __pyx_k_57, sizeof(__pyx_k_57), 0, 0, 1, 1},
  {&__pyx_n_s_58, __pyx_k_58, sizeof(__pyx_k_58), 0, 0, 1, 1},
  {&__pyx_n_s_59, __pyx_k_59, sizeof(__pyx_k_59), 0, 0, 1, 1},
  {&__pyx_n_s_60, __pyx_k_60, sizeof(__pyx_k_60), 0, 0, 1, 1},
  {&__pyx_n_s_61, __pyx_k_61, sizeof(__pyx_k_61), 0, 0, 1, 1},
  {&__pyx_n_s_62, __pyx_k_62, sizeof(__pyx_k_62), 0, 0, 1, 1},
  {&__pyx_kp_s_8, __pyx_k_8, sizeof(__pyx_k_8), 0, 0, 1, 0},
  {&__pyx_kp_s_9, __pyx_k_9, sizeof(__pyx_k_9), 0, 0, 1, 0},
  {&__pyx_n_s__BaseCollection, __pyx_k__BaseCollection, sizeof(__pyx_k__BaseCollection), 0, 0, 1, 1},
  {&__pyx_n_s__COLLECTION_TYPE_HAS, __pyx_k__COLLECTION_TYPE_HAS, sizeof(__pyx_k__COLLECTION_TYPE_HAS), 0, 0, 1, 1},
  {&__pyx_n_s__CollectionWrapper, __pyx_k__CollectionWrapper, sizeof(__pyx_k__CollectionWrapper), 0, 0, 1, 1},
  {&__pyx_n_s__Collections, __pyx_k__Collections, sizeof(__pyx_k__Collections), 0, 0, 1, 1},
  {&__pyx_n_s__Complement, __pyx_k__Complement, sizeof(__pyx_k__Complement), 0, 0, 1, 1},
  {&__pyx_n_s__Equals, __pyx_k__Equals, sizeof(__pyx_k__Equals), 0, 0, 1, 1},
  {&__pyx_n_s__FilterCollection, __pyx_k__FilterCollection, sizeof(__pyx_k__FilterCollection), 0, 0, 1, 1},
  {&__pyx_n_s__Greater, __pyx_k__Greater, sizeof(__pyx_k__Greater), 0, 0, 1, 1},
  {&__pyx_n_s__Has, __pyx_k__Has, sizeof(__pyx_k__Has), 0, 0, 1, 1},
  {&__pyx_n_s__IDList, __pyx_k__IDList, sizeof(__pyx_k__IDList), 0, 0, 1, 1},
  {&__pyx_n_s__IndexError, __pyx_k__IndexError, sizeof(__pyx_k__IndexError), 0, 0, 1, 1},
  {&__pyx_n_s__Intersection, __pyx_k__Intersection, sizeof(__pyx_k__Intersection), 0, 0, 1, 1},
  {&__pyx_n_s__KeyError, __pyx_k__KeyError, sizeof(__pyx_k__KeyError), 0, 0, 1, 1},
  {&__pyx_n_s__Match, __pyx_k__Match, sizeof(__pyx_k__Match), 0, 0, 1, 1},
  {&__pyx_n_s__NotImplemented, __pyx_k__NotImplemented, sizeof(__pyx_k__NotImplemented), 0, 0, 1, 1},
  {&__pyx_n_s__PShuffle, __pyx_k__PShuffle, sizeof(__pyx_k__PShuffle), 0, 0, 1, 1},
  {&__pyx_n_s__PropDict, __pyx_k__PropDict, sizeof(__pyx_k__PropDict), 0, 0, 1, 1},
  {&__pyx_n_s__Queue, __pyx_k__Queue, sizeof(__pyx_k__Queue), 0, 0, 1, 1},
  {&__pyx_n_s__Reference, __pyx_k__Reference, sizeof(__pyx_k__Reference), 0, 0, 1, 1},
  {&__pyx_n_s__RuntimeError, __pyx_k__RuntimeError, sizeof(__pyx_k__RuntimeError), 0, 0, 1, 1},
  {&__pyx_n_s__Smaller, __pyx_k__Smaller, sizeof(__pyx_k__Smaller), 0, 0, 1, 1},
  {&__pyx_n_s__StopIteration, __pyx_k__StopIteration, sizeof(__pyx_k__StopIteration), 0, 0, 1, 1},
  {&__pyx_n_s__TypeError, __pyx_k__TypeError, sizeof(__pyx_k__TypeError), 0, 0, 1, 1},
  {&__pyx_n_s__Union, __pyx_k__Union, sizeof(__pyx_k__Union), 0, 0, 1, 1},
  {&__pyx_n_s__Universe, __pyx_k__Universe, sizeof(__pyx_k__Universe), 0, 0, 1, 1},
  {&__pyx_n_s__VALUE_TYPE_BIN, __pyx_k__VALUE_TYPE_BIN, sizeof(__pyx_k__VALUE_TYPE_BIN), 0, 0, 1, 1},
  {&__pyx_n_s__VALUE_TYPE_COLL, __pyx_k__VALUE_TYPE_COLL, sizeof(__pyx_k__VALUE_TYPE_COLL), 0, 0, 1, 1},
  {&__pyx_n_s__VALUE_TYPE_DICT, __pyx_k__VALUE_TYPE_DICT, sizeof(__pyx_k__VALUE_TYPE_DICT), 0, 0, 1, 1},
  {&__pyx_n_s__VALUE_TYPE_ERROR, __pyx_k__VALUE_TYPE_ERROR, sizeof(__pyx_k__VALUE_TYPE_ERROR), 0, 0, 1, 1},
  {&__pyx_n_s__VALUE_TYPE_INT32, __pyx_k__VALUE_TYPE_INT32, sizeof(__pyx_k__VALUE_TYPE_INT32), 0, 0, 1, 1},
  {&__pyx_n_s__VALUE_TYPE_LIST, __pyx_k__VALUE_TYPE_LIST, sizeof(__pyx_k__VALUE_TYPE_LIST), 0, 0, 1, 1},
  {&__pyx_n_s__VALUE_TYPE_NONE, __pyx_k__VALUE_TYPE_NONE, sizeof(__pyx_k__VALUE_TYPE_NONE), 0, 0, 1, 1},
  {&__pyx_n_s__VALUE_TYPE_STRING, __pyx_k__VALUE_TYPE_STRING, sizeof(__pyx_k__VALUE_TYPE_STRING), 0, 0, 1, 1},
  {&__pyx_n_s__ValueError, __pyx_k__ValueError, sizeof(__pyx_k__ValueError), 0, 0, 1, 1},
  {&__pyx_n_s__XMMSValue, __pyx_k__XMMSValue, sizeof(__pyx_k__XMMSValue), 0, 0, 1, 1},
  {&__pyx_n_s____call__, __pyx_k____call__, sizeof(__pyx_k____call__), 0, 0, 1, 1},
  {&__pyx_n_s____class__, __pyx_k____class__, sizeof(__pyx_k____class__), 0, 0, 1, 1},
  {&__pyx_n_s____init__, __pyx_k____init__, sizeof(__pyx_k____init__), 0, 0, 1, 1},
  {&__pyx_n_s____main__, __pyx_k____main__, sizeof(__pyx_k____main__), 0, 0, 1, 1},
  {&__pyx_n_s____name__, __pyx_k____name__, sizeof(__pyx_k____name__), 0, 0, 1, 1},
  {&__pyx_n_s____test__, __pyx_k____test__, sizeof(__pyx_k____test__), 0, 0, 1, 1},
  {&__pyx_n_s___colltype, __pyx_k___colltype, sizeof(__pyx_k___colltype), 0, 0, 1, 1},
  {&__pyx_n_s__append, __pyx_k__append, sizeof(__pyx_k__append), 0, 0, 1, 1},
  {&__pyx_n_s__attributes, __pyx_k__attributes, sizeof(__pyx_k__attributes), 0, 0, 1, 1},
  {&__pyx_n_s__c, __pyx_k__c, sizeof(__pyx_k__c), 0, 0, 1, 1},
  {&__pyx_n_s__clear, __pyx_k__clear, sizeof(__pyx_k__clear), 0, 0, 1, 1},
  {&__pyx_n_s__coll_parse, __pyx_k__coll_parse, sizeof(__pyx_k__coll_parse), 0, 0, 1, 1},
  {&__pyx_n_s__d, __pyx_k__d, sizeof(__pyx_k__d), 0, 0, 1, 1},
  {&__pyx_n_s__default, __pyx_k__default, sizeof(__pyx_k__default), 0, 0, 1, 1},
  {&__pyx_n_s__extend, __pyx_k__extend, sizeof(__pyx_k__extend), 0, 0, 1, 1},
  {&__pyx_n_s__get, __pyx_k__get, sizeof(__pyx_k__get), 0, 0, 1, 1},
  {&__pyx_n_s__get_bin, __pyx_k__get_bin, sizeof(__pyx_k__get_bin), 0, 0, 1, 1},
  {&__pyx_n_s__get_coll, __pyx_k__get_coll, sizeof(__pyx_k__get_coll), 0, 0, 1, 1},
  {&__pyx_n_s__get_dict, __pyx_k__get_dict, sizeof(__pyx_k__get_dict), 0, 0, 1, 1},
  {&__pyx_n_s__get_dict_iter, __pyx_k__get_dict_iter, sizeof(__pyx_k__get_dict_iter), 0, 0, 1, 1},
  {&__pyx_n_s__get_error, __pyx_k__get_error, sizeof(__pyx_k__get_error), 0, 0, 1, 1},
  {&__pyx_n_s__get_int, __pyx_k__get_int, sizeof(__pyx_k__get_int), 0, 0, 1, 1},
  {&__pyx_n_s__get_list, __pyx_k__get_list, sizeof(__pyx_k__get_list), 0, 0, 1, 1},
  {&__pyx_n_s__get_list_iter, __pyx_k__get_list_iter, sizeof(__pyx_k__get_list_iter), 0, 0, 1, 1},
  {&__pyx_n_s__get_propdict, __pyx_k__get_propdict, sizeof(__pyx_k__get_propdict), 0, 0, 1, 1},
  {&__pyx_n_s__get_string, __pyx_k__get_string, sizeof(__pyx_k__get_string), 0, 0, 1, 1},
  {&__pyx_n_s__get_type, __pyx_k__get_type, sizeof(__pyx_k__get_type), 0, 0, 1, 1},
  {&__pyx_n_s__i, __pyx_k__i, sizeof(__pyx_k__i), 0, 0, 1, 1},
  {&__pyx_n_s__ids, __pyx_k__ids, sizeof(__pyx_k__ids), 0, 0, 1, 1},
  {&__pyx_n_s__insert, __pyx_k__insert, sizeof(__pyx_k__insert), 0, 0, 1, 1},
  {&__pyx_n_s__is_error, __pyx_k__is_error, sizeof(__pyx_k__is_error), 0, 0, 1, 1},
  {&__pyx_n_s__iserror, __pyx_k__iserror, sizeof(__pyx_k__iserror), 0, 0, 1, 1},
  {&__pyx_n_s__items, __pyx_k__items, sizeof(__pyx_k__items), 0, 0, 1, 1},
  {&__pyx_n_s__iteritems, __pyx_k__iteritems, sizeof(__pyx_k__iteritems), 0, 0, 1, 1},
  {&__pyx_n_s__iterkeys, __pyx_k__iterkeys, sizeof(__pyx_k__iterkeys), 0, 0, 1, 1},
  {&__pyx_n_s__itertype, __pyx_k__itertype, sizeof(__pyx_k__itertype), 0, 0, 1, 1},
  {&__pyx_n_s__itervalues, __pyx_k__itervalues, sizeof(__pyx_k__itervalues), 0, 0, 1, 1},
  {&__pyx_n_s__join, __pyx_k__join, sizeof(__pyx_k__join), 0, 0, 1, 1},
  {&__pyx_n_s__keys, __pyx_k__keys, sizeof(__pyx_k__keys), 0, 0, 1, 1},
  {&__pyx_n_s__list, __pyx_k__list, sizeof(__pyx_k__list), 0, 0, 1, 1},
  {&__pyx_n_s__name, __pyx_k__name, sizeof(__pyx_k__name), 0, 0, 1, 1},
  {&__pyx_n_s__namespace, __pyx_k__namespace, sizeof(__pyx_k__namespace), 0, 0, 1, 1},
  {&__pyx_n_s__ns, __pyx_k__ns, sizeof(__pyx_k__ns), 0, 0, 1, 1},
  {&__pyx_n_s__op, __pyx_k__op, sizeof(__pyx_k__op), 0, 0, 1, 1},
  {&__pyx_n_s__operands, __pyx_k__operands, sizeof(__pyx_k__operands), 0, 0, 1, 1},
  {&__pyx_n_s__operation, __pyx_k__operation, sizeof(__pyx_k__operation), 0, 0, 1, 1},
  {&__pyx_n_s__parent, __pyx_k__parent, sizeof(__pyx_k__parent), 0, 0, 1, 1},
  {&__pyx_n_s__pop, __pyx_k__pop, sizeof(__pyx_k__pop), 0, 0, 1, 1},
  {&__pyx_n_s__propdict, __pyx_k__propdict, sizeof(__pyx_k__propdict), 0, 0, 1, 1},
  {&__pyx_n_s__pyval, __pyx_k__pyval, sizeof(__pyx_k__pyval), 0, 0, 1, 1},
  {&__pyx_n_s__ref, __pyx_k__ref, sizeof(__pyx_k__ref), 0, 0, 1, 1},
  {&__pyx_n_s__reference, __pyx_k__reference, sizeof(__pyx_k__reference), 0, 0, 1, 1},
  {&__pyx_n_s__remove, __pyx_k__remove, sizeof(__pyx_k__remove), 0, 0, 1, 1},
  {&__pyx_n_s__reset, __pyx_k__reset, sizeof(__pyx_k__reset), 0, 0, 1, 1},
  {&__pyx_n_s__self, __pyx_k__self, sizeof(__pyx_k__self), 0, 0, 1, 1},
  {&__pyx_n_s__set_pyval, __pyx_k__set_pyval, sizeof(__pyx_k__set_pyval), 0, 0, 1, 1},
  {&__pyx_n_s__sourcepref, __pyx_k__sourcepref, sizeof(__pyx_k__sourcepref), 0, 0, 1, 1},
  {&__pyx_n_s__update, __pyx_k__update, sizeof(__pyx_k__update), 0, 0, 1, 1},
  {&__pyx_n_s__v, __pyx_k__v, sizeof(__pyx_k__v), 0, 0, 1, 1},
  {&__pyx_n_s__value, __pyx_k__value, sizeof(__pyx_k__value), 0, 0, 1, 1},
  {&__pyx_n_s__values, __pyx_k__values, sizeof(__pyx_k__values), 0, 0, 1, 1},
  {&__pyx_n_s__xmmsvalue, __pyx_k__xmmsvalue, sizeof(__pyx_k__xmmsvalue), 0, 0, 1, 1},
  {0, 0, 0, 0, 0, 0, 0}
};
static int __Pyx_InitCachedBuiltins(void) {
  __pyx_builtin_TypeError = __Pyx_GetName(__pyx_b, __pyx_n_s__TypeError); if (!__pyx_builtin_TypeError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 57; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_builtin_ValueError = __Pyx_GetName(__pyx_b, __pyx_n_s__ValueError); if (!__pyx_builtin_ValueError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 133; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_builtin_RuntimeError = __Pyx_GetName(__pyx_b, __pyx_n_s__RuntimeError); if (!__pyx_builtin_RuntimeError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 261; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_builtin_StopIteration = __Pyx_GetName(__pyx_b, __pyx_n_s__StopIteration); if (!__pyx_builtin_StopIteration) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 272; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_builtin_NotImplemented = __Pyx_GetName(__pyx_b, __pyx_n_s__NotImplemented); if (!__pyx_builtin_NotImplemented) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 407; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_builtin_KeyError = __Pyx_GetName(__pyx_b, __pyx_n_s__KeyError); if (!__pyx_builtin_KeyError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 510; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_builtin_IndexError = __Pyx_GetName(__pyx_b, __pyx_n_s__IndexError); if (!__pyx_builtin_IndexError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 571; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  return 0;
  __pyx_L1_error:;
  return -1;
}

static int __Pyx_InitCachedConstants(void) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__Pyx_InitCachedConstants");

  /* "xmmsvalue.pyx":133
 * 		cdef char *ret = NULL
 * 		if not xmmsv_get_error(self.val, <const_char **>&ret):
 * 			raise ValueError("Failed to retrieve value")             # <<<<<<<<<<<<<<
 * 		return to_unicode(ret)
 * 
 */
  __pyx_k_tuple_3 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 133; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_3));
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_2));
  PyTuple_SET_ITEM(__pyx_k_tuple_3, 0, ((PyObject *)__pyx_kp_s_2));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_2));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_3));

  /* "xmmsvalue.pyx":143
 * 		cdef int ret = 0
 * 		if not xmmsv_get_int(self.val, &ret):
 * 			raise ValueError("Failed to retrieve value")             # <<<<<<<<<<<<<<
 * 		return ret
 * 
 */
  __pyx_k_tuple_4 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_4));
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_2));
  PyTuple_SET_ITEM(__pyx_k_tuple_4, 0, ((PyObject *)__pyx_kp_s_2));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_2));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_4));

  /* "xmmsvalue.pyx":153
 * 		cdef char *ret = NULL
 * 		if not xmmsv_get_string(self.val, <const_char **>&ret):
 * 			raise ValueError("Failed to retrieve value")             # <<<<<<<<<<<<<<
 * 		return to_unicode(ret)
 * 
 */
  __pyx_k_tuple_5 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 153; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_5));
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_2));
  PyTuple_SET_ITEM(__pyx_k_tuple_5, 0, ((PyObject *)__pyx_kp_s_2));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_2));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_5));

  /* "xmmsvalue.pyx":164
 * 		cdef unsigned int rlen = 0
 * 		if not xmmsv_get_bin(self.val, <const_uchar **>&ret, &rlen):
 * 			raise ValueError("Failed to retrieve value")             # <<<<<<<<<<<<<<
 * 		return PyBytes_FromStringAndSize(<char *>ret, rlen)
 * 
 */
  __pyx_k_tuple_6 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 164; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_6));
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_2));
  PyTuple_SET_ITEM(__pyx_k_tuple_6, 0, ((PyObject *)__pyx_kp_s_2));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_2));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_6));

  /* "xmmsvalue.pyx":174
 * 		cdef xmmsv_coll_t *coll = NULL
 * 		if not xmmsv_get_coll(self.val, &coll):
 * 			raise ValueError("Failed to retrieve value")             # <<<<<<<<<<<<<<
 * 		return create_coll(coll)
 * 
 */
  __pyx_k_tuple_7 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 174; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_7));
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_2));
  PyTuple_SET_ITEM(__pyx_k_tuple_7, 0, ((PyObject *)__pyx_kp_s_2));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_2));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_7));

  /* "xmmsvalue.pyx":258
 * 	def __init__(self, XmmsValue value):
 * 		if value.get_type() != XMMSV_TYPE_LIST:
 * 			raise TypeError("The value is not a list.")             # <<<<<<<<<<<<<<
 * 		self.val = xmmsv_ref(value.val)
 * 		if not xmmsv_get_list_iter(self.val, &self.it):
 */
  __pyx_k_tuple_10 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 258; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_10));
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_9));
  PyTuple_SET_ITEM(__pyx_k_tuple_10, 0, ((PyObject *)__pyx_kp_s_9));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_9));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_10));

  /* "xmmsvalue.pyx":261
 * 		self.val = xmmsv_ref(value.val)
 * 		if not xmmsv_get_list_iter(self.val, &self.it):
 * 			raise RuntimeError("Failed to initialize the iterator.")             # <<<<<<<<<<<<<<
 * 		self.sourcepref = value.sourcepref
 * 
 */
  __pyx_k_tuple_12 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 261; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_12));
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_11));
  PyTuple_SET_ITEM(__pyx_k_tuple_12, 0, ((PyObject *)__pyx_kp_s_11));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_11));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_12));

  /* "xmmsvalue.pyx":275
 * 
 * 		if not xmmsv_list_iter_entry(self.it, &val):
 * 			raise RuntimeError("Failed to retrieve list entry.")             # <<<<<<<<<<<<<<
 * 		v = XmmsValue(self.sourcepref)
 * 		v.set_value(val)
 */
  __pyx_k_tuple_14 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 275; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_14));
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_13));
  PyTuple_SET_ITEM(__pyx_k_tuple_14, 0, ((PyObject *)__pyx_kp_s_13));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_13));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_14));

  /* "xmmsvalue.pyx":300
 * 	def __init__(self, XmmsValue value):
 * 		if value.get_type() != XMMSV_TYPE_DICT:
 * 			raise TypeError("The value is not a dict.")             # <<<<<<<<<<<<<<
 * 		self.val = xmmsv_ref(value.val)
 * 		if not xmmsv_get_dict_iter(self.val, &self.it):
 */
  __pyx_k_tuple_16 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 300; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_16));
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_15));
  PyTuple_SET_ITEM(__pyx_k_tuple_16, 0, ((PyObject *)__pyx_kp_s_15));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_15));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_16));

  /* "xmmsvalue.pyx":303
 * 		self.val = xmmsv_ref(value.val)
 * 		if not xmmsv_get_dict_iter(self.val, &self.it):
 * 			raise RuntimeError("Failed to initialize the iterator.")             # <<<<<<<<<<<<<<
 * 		self.sourcepref = value.sourcepref
 * 
 */
  __pyx_k_tuple_17 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 303; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_17));
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_11));
  PyTuple_SET_ITEM(__pyx_k_tuple_17, 0, ((PyObject *)__pyx_kp_s_11));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_11));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_17));

  /* "xmmsvalue.pyx":318
 * 
 * 		if not xmmsv_dict_iter_pair(self.it, <const_char **>&key, &val):
 * 			raise RuntimeError("Failed to retrieve dict item")             # <<<<<<<<<<<<<<
 * 		v = XmmsValue(self.sourcepref)
 * 		v.set_value(val)
 */
  __pyx_k_tuple_19 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 318; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_19));
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_18));
  PyTuple_SET_ITEM(__pyx_k_tuple_19, 0, ((PyObject *)__pyx_kp_s_18));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_18));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_19));

  /* "xmmsvalue.pyx":390
 * 			self.init_idlist()
 * 			if self._idlist is None:
 * 				raise TypeError("Can't set idlist for this type of collection")             # <<<<<<<<<<<<<<
 * 			elif self._idlist is ids:
 * 				pass
 */
  __pyx_k_tuple_21 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_21)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 390; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_21));
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_20));
  PyTuple_SET_ITEM(__pyx_k_tuple_21, 0, ((PyObject *)__pyx_kp_s_20));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_20));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_21));

  /* "xmmsvalue.pyx":440
 * 		cdef xmmsv_dict_iter_t *it = NULL
 * 		if attributes is None:
 * 			raise TypeError("__init__() argument must not be None")             # <<<<<<<<<<<<<<
 * 		if not xmmsv_get_dict_iter(xmmsv_coll_attributes_get(attributes.coll), &it):
 * 			raise RuntimeError("Failed to get fict iterator")
 */
  __pyx_k_tuple_26 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_26)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 440; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_26));
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_25));
  PyTuple_SET_ITEM(__pyx_k_tuple_26, 0, ((PyObject *)__pyx_kp_s_25));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_25));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_26));

  /* "xmmsvalue.pyx":442
 * 			raise TypeError("__init__() argument must not be None")
 * 		if not xmmsv_get_dict_iter(xmmsv_coll_attributes_get(attributes.coll), &it):
 * 			raise RuntimeError("Failed to get fict iterator")             # <<<<<<<<<<<<<<
 * 		xmmsv_dict_iter_first(it)
 * 		self.diter = it
 */
  __pyx_k_tuple_28 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_28)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 442; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_28));
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_27));
  PyTuple_SET_ITEM(__pyx_k_tuple_28, 0, ((PyObject *)__pyx_kp_s_27));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_27));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_28));

  /* "xmmsvalue.pyx":472
 * 	def __init__(self, Collection c):
 * 		if c.coll == NULL:
 * 			raise RuntimeError("Uninitialized collection")             # <<<<<<<<<<<<<<
 * 		self.set_collection(c.coll)
 * 
 */
  __pyx_k_tuple_30 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_30)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 472; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_30));
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_29));
  PyTuple_SET_ITEM(__pyx_k_tuple_30, 0, ((PyObject *)__pyx_kp_s_29));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_29));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_30));

  /* "xmmsvalue.pyx":547
 * 	def __init__(self, Collection c):
 * 		if c.coll == NULL:
 * 			raise RuntimeError("Uninitialized collection")             # <<<<<<<<<<<<<<
 * 		self.set_collection(c.coll)
 * 		self.init_pylist()
 */
  __pyx_k_tuple_32 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_32)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 547; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_32));
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_29));
  PyTuple_SET_ITEM(__pyx_k_tuple_32, 0, ((PyObject *)__pyx_kp_s_29));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_29));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_32));

  /* "xmmsvalue.pyx":572
 * 			xmmsv_coll_remove_operand(self.coll, op.coll)
 * 		except IndexError:
 * 			raise IndexError("Index out of range")             # <<<<<<<<<<<<<<
 * 	def __iter__(self):
 * 		return iter(self.pylist)
 */
  __pyx_k_tuple_34 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_34)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 572; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_34));
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_33));
  PyTuple_SET_ITEM(__pyx_k_tuple_34, 0, ((PyObject *)__pyx_kp_s_33));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_33));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_34));

  /* "xmmsvalue.pyx":606
 * 	def __init__(self, Collection c):
 * 		if c.coll == NULL:
 * 			raise RuntimeError("Uninitialized collection")             # <<<<<<<<<<<<<<
 * 		self.set_collection(c.coll)
 * 
 */
  __pyx_k_tuple_35 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_35)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 606; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_35));
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_29));
  PyTuple_SET_ITEM(__pyx_k_tuple_35, 0, ((PyObject *)__pyx_kp_s_29));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_29));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_35));

  /* "xmmsvalue.pyx":650
 * 			i = len(self) + i
 * 		if not xmmsv_coll_idlist_insert(self.coll, v, i):
 * 			raise IndexError("Index out of range")             # <<<<<<<<<<<<<<
 * 
 * 	cpdef remove(self, int i):
 */
  __pyx_k_tuple_36 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_36)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 650; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_36));
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_33));
  PyTuple_SET_ITEM(__pyx_k_tuple_36, 0, ((PyObject *)__pyx_kp_s_33));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_33));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_36));

  /* "xmmsvalue.pyx":657
 * 			i = len(self) + i
 * 		if not xmmsv_coll_idlist_remove(self.coll, i):
 * 			raise IndexError("Index out of range")             # <<<<<<<<<<<<<<
 * 
 * 	def __delitem__(self, int i):
 */
  __pyx_k_tuple_37 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_37)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 657; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_37));
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_33));
  PyTuple_SET_ITEM(__pyx_k_tuple_37, 0, ((PyObject *)__pyx_kp_s_33));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_33));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_37));

  /* "xmmsvalue.pyx":669
 * 			i = len(self) + i
 * 		if not xmmsv_coll_idlist_get_index(self.coll, i, &x):
 * 			raise IndexError("Index out of range")             # <<<<<<<<<<<<<<
 * 		return x
 * 
 */
  __pyx_k_tuple_38 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_38)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 669; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_38));
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_33));
  PyTuple_SET_ITEM(__pyx_k_tuple_38, 0, ((PyObject *)__pyx_kp_s_33));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_33));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_38));

  /* "xmmsvalue.pyx":676
 * 			i = len(self) + i
 * 		if not xmmsv_coll_idlist_set_index(self.coll, i, v):
 * 			raise IndexError("Index out of range")             # <<<<<<<<<<<<<<
 * 
 * 	cpdef clear(self):
 */
  __pyx_k_tuple_39 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_39)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 676; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_39));
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_33));
  PyTuple_SET_ITEM(__pyx_k_tuple_39, 0, ((PyObject *)__pyx_kp_s_33));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_33));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_39));

  /* "xmmsvalue.pyx":690
 * 		self.coll = xmmsv_coll_new(<xmmsv_coll_type_t> _colltype)
 * 		if self.coll == NULL:
 * 			raise RuntimeError("Bad collection")             # <<<<<<<<<<<<<<
 * 
 * 		operands = kargs.pop("operands", None)
 */
  __pyx_k_tuple_41 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_41)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 690; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_41));
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_40));
  PyTuple_SET_ITEM(__pyx_k_tuple_41, 0, ((PyObject *)__pyx_kp_s_40));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_40));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_41));

  /* "xmmsvalue.pyx":692
 * 			raise RuntimeError("Bad collection")
 * 
 * 		operands = kargs.pop("operands", None)             # <<<<<<<<<<<<<<
 * 		if operands:
 * 			self.operands = operands
 */
  __pyx_k_tuple_42 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_42)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 692; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_42));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__operands));
  PyTuple_SET_ITEM(__pyx_k_tuple_42, 0, ((PyObject *)__pyx_n_s__operands));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__operands));
  __Pyx_INCREF(Py_None);
  PyTuple_SET_ITEM(__pyx_k_tuple_42, 1, Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_42));

  /* "xmmsvalue.pyx":695
 * 		if operands:
 * 			self.operands = operands
 * 		ids = kargs.pop("ids", None)             # <<<<<<<<<<<<<<
 * 		if ids:
 * 			try:
 */
  __pyx_k_tuple_43 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_43)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 695; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_43));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__ids));
  PyTuple_SET_ITEM(__pyx_k_tuple_43, 0, ((PyObject *)__pyx_n_s__ids));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__ids));
  __Pyx_INCREF(Py_None);
  PyTuple_SET_ITEM(__pyx_k_tuple_43, 1, Py_None);
  __Pyx_GIVEREF(Py_None);
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_43));

  /* "xmmsvalue.pyx":797
 * 		c.__class__ = PShuffle
 * 	else:
 * 		raise RuntimeError("Unkown collection type")             # <<<<<<<<<<<<<<
 * 
 * 	c.set_collection(coll)
 */
  __pyx_k_tuple_46 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_46)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 797; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_46));
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_45));
  PyTuple_SET_ITEM(__pyx_k_tuple_46, 0, ((PyObject *)__pyx_kp_s_45));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_45));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_46));

  /* "xmmsvalue.pyx":802
 * 
 * 	if colltype == XMMS_COLLECTION_TYPE_REFERENCE:
 * 		if c.attributes.get("reference", "") == "All Media":             # <<<<<<<<<<<<<<
 * 			c.__class__ = Universe
 * 
 */
  __pyx_k_tuple_48 = PyTuple_New(2); if (unlikely(!__pyx_k_tuple_48)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 802; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_48));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__reference));
  PyTuple_SET_ITEM(__pyx_k_tuple_48, 0, ((PyObject *)__pyx_n_s__reference));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__reference));
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_47));
  PyTuple_SET_ITEM(__pyx_k_tuple_48, 1, ((PyObject *)__pyx_kp_s_47));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_47));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_48));

  /* "xmmsvalue.pyx":813
 * 	_pattern = from_unicode(pattern)
 * 	if not xmmsv_coll_parse(<char *>_pattern, &coll):
 * 		raise ValueError("Unable to parse the pattern")             # <<<<<<<<<<<<<<
 * 	return create_coll(coll)
 * 
 */
  __pyx_k_tuple_50 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_50)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 813; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_k_tuple_50));
  __Pyx_INCREF(((PyObject *)__pyx_kp_s_49));
  PyTuple_SET_ITEM(__pyx_k_tuple_50, 0, ((PyObject *)__pyx_kp_s_49));
  __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_49));
  __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_50));
  __Pyx_RefNannyFinishContext();
  return 0;
  __pyx_L1_error:;
  __Pyx_RefNannyFinishContext();
  return -1;
}

static int __Pyx_InitGlobals(void) {
  if (__Pyx_InitStrings(__pyx_string_tab) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  return 0;
  __pyx_L1_error:;
  return -1;
}

#if PY_MAJOR_VERSION < 3
PyMODINIT_FUNC initxmmsvalue(void); /*proto*/
PyMODINIT_FUNC initxmmsvalue(void)
#else
PyMODINIT_FUNC PyInit_xmmsvalue(void); /*proto*/
PyMODINIT_FUNC PyInit_xmmsvalue(void)
#endif
{
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  __Pyx_RefNannyDeclarations
  #if CYTHON_REFNANNY
  __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny");
  if (!__Pyx_RefNanny) {
      PyErr_Clear();
      __Pyx_RefNanny = __Pyx_RefNannyImportAPI("Cython.Runtime.refnanny");
      if (!__Pyx_RefNanny)
          Py_FatalError("failed to import 'refnanny' module");
  }
  #endif
  __Pyx_RefNannySetupContext("PyMODINIT_FUNC PyInit_xmmsvalue(void)");
  if ( __Pyx_check_binary_version() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __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;}
  __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;}
  #ifdef __pyx_binding_PyCFunctionType_USED
  if (__pyx_binding_PyCFunctionType_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  #endif
  /*--- Library function declarations ---*/
  /*--- Threads initialization code ---*/
  #if defined(__PYX_FORCE_INIT_THREADS) && __PYX_FORCE_INIT_THREADS
  #ifdef WITH_THREAD /* Python build with threading support? */
  PyEval_InitThreads();
  #endif
  #endif
  /*--- Module creation code ---*/
  #if PY_MAJOR_VERSION < 3
  __pyx_m = Py_InitModule4(__Pyx_NAMESTR("xmmsvalue"), __pyx_methods, __Pyx_DOCSTR(__pyx_k_51), 0, PYTHON_API_VERSION);
  #else
  __pyx_m = PyModule_Create(&__pyx_moduledef);
  #endif
  if (!__pyx_m) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  #if PY_MAJOR_VERSION < 3
  Py_INCREF(__pyx_m);
  #endif
  __pyx_b = PyImport_AddModule(__Pyx_NAMESTR(__Pyx_BUILTIN_MODULE_NAME));
  if (!__pyx_b) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  if (__Pyx_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
  /*--- Initialize various global constants etc. ---*/
  if (unlikely(__Pyx_InitGlobals() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__pyx_module_is_main_xmmsvalue) {
    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;};
  }
  /*--- Builtin init code ---*/
  if (unlikely(__Pyx_InitCachedBuiltins() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  /*--- Constants init code ---*/
  if (unlikely(__Pyx_InitCachedConstants() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  /*--- Global init code ---*/
  __pyx_v_9xmmsvalue__idlist_types = Py_None; Py_INCREF(Py_None);
  /*--- Variable export code ---*/
  /*--- Function export code ---*/
  if (__Pyx_ExportFunction("create_coll", (void (*)(void))__pyx_f_9xmmsvalue_create_coll, "PyObject *(xmmsv_coll_t *)") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_ExportFunction("create_native_value", (void (*)(void))__pyx_f_9xmmsvalue_create_native_value, "xmmsv_t *(PyObject *)") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  /*--- Type init code ---*/
  __pyx_vtabptr_9xmmsvalue_XmmsValue = &__pyx_vtable_9xmmsvalue_XmmsValue;
  __pyx_vtable_9xmmsvalue_XmmsValue.set_value = (PyObject *(*)(struct __pyx_obj_9xmmsvalue_XmmsValue *, xmmsv_t *, struct __pyx_opt_args_9xmmsvalue_9XmmsValue_set_value *__pyx_optional_args))__pyx_f_9xmmsvalue_9XmmsValue_set_value;
  __pyx_vtable_9xmmsvalue_XmmsValue.set_pyval = (PyObject *(*)(struct __pyx_obj_9xmmsvalue_XmmsValue *, PyObject *, int __pyx_skip_dispatch))__pyx_f_9xmmsvalue_9XmmsValue_set_pyval;
  __pyx_vtable_9xmmsvalue_XmmsValue.get_type = (PyObject *(*)(struct __pyx_obj_9xmmsvalue_XmmsValue *, int __pyx_skip_dispatch))__pyx_f_9xmmsvalue_9XmmsValue_get_type;
  __pyx_vtable_9xmmsvalue_XmmsValue.iserror = (PyObject *(*)(struct __pyx_obj_9xmmsvalue_XmmsValue *, int __pyx_skip_dispatch))__pyx_f_9xmmsvalue_9XmmsValue_iserror;
  __pyx_vtable_9xmmsvalue_XmmsValue.is_error = (PyObject *(*)(struct __pyx_obj_9xmmsvalue_XmmsValue *, int __pyx_skip_dispatch))__pyx_f_9xmmsvalue_9XmmsValue_is_error;
  __pyx_vtable_9xmmsvalue_XmmsValue.get_error = (PyObject *(*)(struct __pyx_obj_9xmmsvalue_XmmsValue *, int __pyx_skip_dispatch))__pyx_f_9xmmsvalue_9XmmsValue_get_error;
  __pyx_vtable_9xmmsvalue_XmmsValue.get_int = (PyObject *(*)(struct __pyx_obj_9xmmsvalue_XmmsValue *, int __pyx_skip_dispatch))__pyx_f_9xmmsvalue_9XmmsValue_get_int;
  __pyx_vtable_9xmmsvalue_XmmsValue.get_string = (PyObject *(*)(struct __pyx_obj_9xmmsvalue_XmmsValue *, int __pyx_skip_dispatch))__pyx_f_9xmmsvalue_9XmmsValue_get_string;
  __pyx_vtable_9xmmsvalue_XmmsValue.get_bin = (PyObject *(*)(struct __pyx_obj_9xmmsvalue_XmmsValue *, int __pyx_skip_dispatch))__pyx_f_9xmmsvalue_9XmmsValue_get_bin;
  __pyx_vtable_9xmmsvalue_XmmsValue.get_coll = (PyObject *(*)(struct __pyx_obj_9xmmsvalue_XmmsValue *, int __pyx_skip_dispatch))__pyx_f_9xmmsvalue_9XmmsValue_get_coll;
  __pyx_vtable_9xmmsvalue_XmmsValue.get_dict = (PyObject *(*)(struct __pyx_obj_9xmmsvalue_XmmsValue *, int __pyx_skip_dispatch))__pyx_f_9xmmsvalue_9XmmsValue_get_dict;
  __pyx_vtable_9xmmsvalue_XmmsValue.get_dict_iter = (PyObject *(*)(struct __pyx_obj_9xmmsvalue_XmmsValue *, int __pyx_skip_dispatch))__pyx_f_9xmmsvalue_9XmmsValue_get_dict_iter;
  __pyx_vtable_9xmmsvalue_XmmsValue.get_propdict = (PyObject *(*)(struct __pyx_obj_9xmmsvalue_XmmsValue *, int __pyx_skip_dispatch))__pyx_f_9xmmsvalue_9XmmsValue_get_propdict;
  __pyx_vtable_9xmmsvalue_XmmsValue.get_list = (PyObject *(*)(struct __pyx_obj_9xmmsvalue_XmmsValue *, int __pyx_skip_dispatch))__pyx_f_9xmmsvalue_9XmmsValue_get_list;
  __pyx_vtable_9xmmsvalue_XmmsValue.get_list_iter = (PyObject *(*)(struct __pyx_obj_9xmmsvalue_XmmsValue *, int __pyx_skip_dispatch))__pyx_f_9xmmsvalue_9XmmsValue_get_list_iter;
  __pyx_vtable_9xmmsvalue_XmmsValue.value = (PyObject *(*)(struct __pyx_obj_9xmmsvalue_XmmsValue *, int __pyx_skip_dispatch))__pyx_f_9xmmsvalue_9XmmsValue_value;
  if (PyType_Ready(&__pyx_type_9xmmsvalue_XmmsValue) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_SetVtable(__pyx_type_9xmmsvalue_XmmsValue.tp_dict, __pyx_vtabptr_9xmmsvalue_XmmsValue) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_SetAttrString(__pyx_m, "XmmsValue", (PyObject *)&__pyx_type_9xmmsvalue_XmmsValue) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 69; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_9xmmsvalue_XmmsValue = &__pyx_type_9xmmsvalue_XmmsValue;
  if (PyType_Ready(&__pyx_type_9xmmsvalue_XmmsListIter) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 241; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_SetAttrString(__pyx_m, "XmmsListIter", (PyObject *)&__pyx_type_9xmmsvalue_XmmsListIter) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 241; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_9xmmsvalue_XmmsListIter = &__pyx_type_9xmmsvalue_XmmsListIter;
  if (PyType_Ready(&__pyx_type_9xmmsvalue_XmmsDictIter) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 283; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_SetAttrString(__pyx_m, "XmmsDictIter", (PyObject *)&__pyx_type_9xmmsvalue_XmmsDictIter) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 283; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_9xmmsvalue_XmmsDictIter = &__pyx_type_9xmmsvalue_XmmsDictIter;
  __pyx_vtabptr_9xmmsvalue_CollectionRef = &__pyx_vtable_9xmmsvalue_CollectionRef;
  __pyx_vtable_9xmmsvalue_CollectionRef.set_collection = (PyObject *(*)(struct __pyx_obj_9xmmsvalue_CollectionRef *, xmmsv_coll_t *))__pyx_f_9xmmsvalue_13CollectionRef_set_collection;
  if (PyType_Ready(&__pyx_type_9xmmsvalue_CollectionRef) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 326; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_SetVtable(__pyx_type_9xmmsvalue_CollectionRef.tp_dict, __pyx_vtabptr_9xmmsvalue_CollectionRef) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 326; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_SetAttrString(__pyx_m, "CollectionRef", (PyObject *)&__pyx_type_9xmmsvalue_CollectionRef) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 326; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_9xmmsvalue_CollectionRef = &__pyx_type_9xmmsvalue_CollectionRef;
  __pyx_vtabptr_9xmmsvalue_Collection = &__pyx_vtable_9xmmsvalue_Collection;
  __pyx_vtable_9xmmsvalue_Collection.__pyx_base = *__pyx_vtabptr_9xmmsvalue_CollectionRef;
  __pyx_vtable_9xmmsvalue_Collection.init_idlist = (PyObject *(*)(struct __pyx_obj_9xmmsvalue_Collection *))__pyx_f_9xmmsvalue_10Collection_init_idlist;
  __pyx_vtable_9xmmsvalue_Collection.init_attributes = (PyObject *(*)(struct __pyx_obj_9xmmsvalue_Collection *))__pyx_f_9xmmsvalue_10Collection_init_attributes;
  __pyx_vtable_9xmmsvalue_Collection.init_operands = (PyObject *(*)(struct __pyx_obj_9xmmsvalue_Collection *))__pyx_f_9xmmsvalue_10Collection_init_operands;
  __pyx_type_9xmmsvalue_Collection.tp_base = __pyx_ptype_9xmmsvalue_CollectionRef;
  if (PyType_Ready(&__pyx_type_9xmmsvalue_Collection) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 343; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_SetVtable(__pyx_type_9xmmsvalue_Collection.tp_dict, __pyx_vtabptr_9xmmsvalue_Collection) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 343; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_SetAttrString(__pyx_m, "Collection", (PyObject *)&__pyx_type_9xmmsvalue_Collection) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 343; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_9xmmsvalue_Collection = &__pyx_type_9xmmsvalue_Collection;
  __pyx_vtabptr_9xmmsvalue_CollectionAttributes = &__pyx_vtable_9xmmsvalue_CollectionAttributes;
  __pyx_vtable_9xmmsvalue_CollectionAttributes.__pyx_base = *__pyx_vtabptr_9xmmsvalue_CollectionRef;
  __pyx_vtable_9xmmsvalue_CollectionAttributes.get_dict = (PyObject *(*)(struct __pyx_obj_9xmmsvalue_CollectionAttributes *, int __pyx_skip_dispatch))__pyx_f_9xmmsvalue_20CollectionAttributes_get_dict;
  __pyx_vtable_9xmmsvalue_CollectionAttributes.iterkeys = (PyObject *(*)(struct __pyx_obj_9xmmsvalue_CollectionAttributes *, int __pyx_skip_dispatch))__pyx_f_9xmmsvalue_20CollectionAttributes_iterkeys;
  __pyx_vtable_9xmmsvalue_CollectionAttributes.keys = (PyObject *(*)(struct __pyx_obj_9xmmsvalue_CollectionAttributes *, int __pyx_skip_dispatch))__pyx_f_9xmmsvalue_20CollectionAttributes_keys;
  __pyx_vtable_9xmmsvalue_CollectionAttributes.itervalues = (PyObject *(*)(struct __pyx_obj_9xmmsvalue_CollectionAttributes *, int __pyx_skip_dispatch))__pyx_f_9xmmsvalue_20CollectionAttributes_itervalues;
  __pyx_vtable_9xmmsvalue_CollectionAttributes.values = (PyObject *(*)(struct __pyx_obj_9xmmsvalue_CollectionAttributes *, int __pyx_skip_dispatch))__pyx_f_9xmmsvalue_20CollectionAttributes_values;
  __pyx_vtable_9xmmsvalue_CollectionAttributes.iteritems = (PyObject *(*)(struct __pyx_obj_9xmmsvalue_CollectionAttributes *, int __pyx_skip_dispatch))__pyx_f_9xmmsvalue_20CollectionAttributes_iteritems;
  __pyx_vtable_9xmmsvalue_CollectionAttributes.items = (PyObject *(*)(struct __pyx_obj_9xmmsvalue_CollectionAttributes *, int __pyx_skip_dispatch))__pyx_f_9xmmsvalue_20CollectionAttributes_items;
  __pyx_vtable_9xmmsvalue_CollectionAttributes.clear = (PyObject *(*)(struct __pyx_obj_9xmmsvalue_CollectionAttributes *, int __pyx_skip_dispatch))__pyx_f_9xmmsvalue_20CollectionAttributes_clear;
  __pyx_type_9xmmsvalue_CollectionAttributes.tp_base = __pyx_ptype_9xmmsvalue_CollectionRef;
  if (PyType_Ready(&__pyx_type_9xmmsvalue_CollectionAttributes) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 469; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_SetVtable(__pyx_type_9xmmsvalue_CollectionAttributes.tp_dict, __pyx_vtabptr_9xmmsvalue_CollectionAttributes) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 469; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_SetAttrString(__pyx_m, "CollectionAttributes", (PyObject *)&__pyx_type_9xmmsvalue_CollectionAttributes) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 469; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_9xmmsvalue_CollectionAttributes = &__pyx_type_9xmmsvalue_CollectionAttributes;
  __pyx_vtabptr_9xmmsvalue_AttributesIterator = &__pyx_vtable_9xmmsvalue_AttributesIterator;
  __pyx_vtable_9xmmsvalue_AttributesIterator.reset = (PyObject *(*)(struct __pyx_obj_9xmmsvalue_AttributesIterator *, int __pyx_skip_dispatch))__pyx_f_9xmmsvalue_18AttributesIterator_reset;
  if (PyType_Ready(&__pyx_type_9xmmsvalue_AttributesIterator) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 424; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_SetVtable(__pyx_type_9xmmsvalue_AttributesIterator.tp_dict, __pyx_vtabptr_9xmmsvalue_AttributesIterator) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 424; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_SetAttrString(__pyx_m, "AttributesIterator", (PyObject *)&__pyx_type_9xmmsvalue_AttributesIterator) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 424; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_9xmmsvalue_AttributesIterator = &__pyx_type_9xmmsvalue_AttributesIterator;
  __pyx_vtabptr_9xmmsvalue_CollectionOperands = &__pyx_vtable_9xmmsvalue_CollectionOperands;
  __pyx_vtable_9xmmsvalue_CollectionOperands.__pyx_base = *__pyx_vtabptr_9xmmsvalue_CollectionRef;
  __pyx_vtable_9xmmsvalue_CollectionOperands.init_pylist = (PyObject *(*)(struct __pyx_obj_9xmmsvalue_CollectionOperands *))__pyx_f_9xmmsvalue_18CollectionOperands_init_pylist;
  __pyx_vtable_9xmmsvalue_CollectionOperands.append = (PyObject *(*)(struct __pyx_obj_9xmmsvalue_CollectionOperands *, struct __pyx_obj_9xmmsvalue_Collection *, int __pyx_skip_dispatch))__pyx_f_9xmmsvalue_18CollectionOperands_append;
  __pyx_vtable_9xmmsvalue_CollectionOperands.extend = (PyObject *(*)(struct __pyx_obj_9xmmsvalue_CollectionOperands *, PyObject *, int __pyx_skip_dispatch))__pyx_f_9xmmsvalue_18CollectionOperands_extend;
  __pyx_vtable_9xmmsvalue_CollectionOperands.remove = (PyObject *(*)(struct __pyx_obj_9xmmsvalue_CollectionOperands *, struct __pyx_obj_9xmmsvalue_Collection *, int __pyx_skip_dispatch))__pyx_f_9xmmsvalue_18CollectionOperands_remove;
  __pyx_vtable_9xmmsvalue_CollectionOperands.clear = (PyObject *(*)(struct __pyx_obj_9xmmsvalue_CollectionOperands *, int __pyx_skip_dispatch))__pyx_f_9xmmsvalue_18CollectionOperands_clear;
  __pyx_vtable_9xmmsvalue_CollectionOperands.list = (PyObject *(*)(struct __pyx_obj_9xmmsvalue_CollectionOperands *, int __pyx_skip_dispatch))__pyx_f_9xmmsvalue_18CollectionOperands_list;
  __pyx_type_9xmmsvalue_CollectionOperands.tp_base = __pyx_ptype_9xmmsvalue_CollectionRef;
  if (PyType_Ready(&__pyx_type_9xmmsvalue_CollectionOperands) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 542; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_SetVtable(__pyx_type_9xmmsvalue_CollectionOperands.tp_dict, __pyx_vtabptr_9xmmsvalue_CollectionOperands) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 542; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_SetAttrString(__pyx_m, "CollectionOperands", (PyObject *)&__pyx_type_9xmmsvalue_CollectionOperands) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 542; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_9xmmsvalue_CollectionOperands = &__pyx_type_9xmmsvalue_CollectionOperands;
  __pyx_vtabptr_9xmmsvalue_CollectionIDList = &__pyx_vtable_9xmmsvalue_CollectionIDList;
  __pyx_vtable_9xmmsvalue_CollectionIDList.__pyx_base = *__pyx_vtabptr_9xmmsvalue_CollectionRef;
  __pyx_vtable_9xmmsvalue_CollectionIDList.list = (PyObject *(*)(struct __pyx_obj_9xmmsvalue_CollectionIDList *, int __pyx_skip_dispatch))__pyx_f_9xmmsvalue_16CollectionIDList_list;
  __pyx_vtable_9xmmsvalue_CollectionIDList.append = (PyObject *(*)(struct __pyx_obj_9xmmsvalue_CollectionIDList *, int, int __pyx_skip_dispatch))__pyx_f_9xmmsvalue_16CollectionIDList_append;
  __pyx_vtable_9xmmsvalue_CollectionIDList.extend = (PyObject *(*)(struct __pyx_obj_9xmmsvalue_CollectionIDList *, PyObject *, int __pyx_skip_dispatch))__pyx_f_9xmmsvalue_16CollectionIDList_extend;
  __pyx_vtable_9xmmsvalue_CollectionIDList.insert = (PyObject *(*)(struct __pyx_obj_9xmmsvalue_CollectionIDList *, int, int, int __pyx_skip_dispatch))__pyx_f_9xmmsvalue_16CollectionIDList_insert;
  __pyx_vtable_9xmmsvalue_CollectionIDList.remove = (PyObject *(*)(struct __pyx_obj_9xmmsvalue_CollectionIDList *, int, int __pyx_skip_dispatch))__pyx_f_9xmmsvalue_16CollectionIDList_remove;
  __pyx_vtable_9xmmsvalue_CollectionIDList.clear = (PyObject *(*)(struct __pyx_obj_9xmmsvalue_CollectionIDList *, int __pyx_skip_dispatch))__pyx_f_9xmmsvalue_16CollectionIDList_clear;
  __pyx_type_9xmmsvalue_CollectionIDList.tp_base = __pyx_ptype_9xmmsvalue_CollectionRef;
  if (PyType_Ready(&__pyx_type_9xmmsvalue_CollectionIDList) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 603; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_SetVtable(__pyx_type_9xmmsvalue_CollectionIDList.tp_dict, __pyx_vtabptr_9xmmsvalue_CollectionIDList) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 603; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (__Pyx_SetAttrString(__pyx_m, "CollectionIDList", (PyObject *)&__pyx_type_9xmmsvalue_CollectionIDList) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 603; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_9xmmsvalue_CollectionIDList = &__pyx_type_9xmmsvalue_CollectionIDList;
  /*--- Type import code ---*/
  /*--- Variable import code ---*/
  /*--- Function import code ---*/
  /*--- Execution code ---*/

  /* "xmmsvalue.pyx":10
 * from cxmmsvalue cimport *
 * 
 * VALUE_TYPE_NONE   = XMMSV_TYPE_NONE             # <<<<<<<<<<<<<<
 * VALUE_TYPE_ERROR  = XMMSV_TYPE_ERROR
 * VALUE_TYPE_INT32  = XMMSV_TYPE_INT32
 */
  __pyx_t_1 = PyInt_FromLong(XMMSV_TYPE_NONE); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 10; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__VALUE_TYPE_NONE, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 10; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "xmmsvalue.pyx":11
 * 
 * VALUE_TYPE_NONE   = XMMSV_TYPE_NONE
 * VALUE_TYPE_ERROR  = XMMSV_TYPE_ERROR             # <<<<<<<<<<<<<<
 * VALUE_TYPE_INT32  = XMMSV_TYPE_INT32
 * VALUE_TYPE_STRING = XMMSV_TYPE_STRING
 */
  __pyx_t_1 = PyInt_FromLong(XMMSV_TYPE_ERROR); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 11; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__VALUE_TYPE_ERROR, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 11; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "xmmsvalue.pyx":12
 * VALUE_TYPE_NONE   = XMMSV_TYPE_NONE
 * VALUE_TYPE_ERROR  = XMMSV_TYPE_ERROR
 * VALUE_TYPE_INT32  = XMMSV_TYPE_INT32             # <<<<<<<<<<<<<<
 * VALUE_TYPE_STRING = XMMSV_TYPE_STRING
 * VALUE_TYPE_COLL   = XMMSV_TYPE_COLL
 */
  __pyx_t_1 = PyInt_FromLong(XMMSV_TYPE_INT32); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 12; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__VALUE_TYPE_INT32, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 12; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "xmmsvalue.pyx":13
 * VALUE_TYPE_ERROR  = XMMSV_TYPE_ERROR
 * VALUE_TYPE_INT32  = XMMSV_TYPE_INT32
 * VALUE_TYPE_STRING = XMMSV_TYPE_STRING             # <<<<<<<<<<<<<<
 * VALUE_TYPE_COLL   = XMMSV_TYPE_COLL
 * VALUE_TYPE_BIN    = XMMSV_TYPE_BIN
 */
  __pyx_t_1 = PyInt_FromLong(XMMSV_TYPE_STRING); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 13; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__VALUE_TYPE_STRING, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 13; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "xmmsvalue.pyx":14
 * VALUE_TYPE_INT32  = XMMSV_TYPE_INT32
 * VALUE_TYPE_STRING = XMMSV_TYPE_STRING
 * VALUE_TYPE_COLL   = XMMSV_TYPE_COLL             # <<<<<<<<<<<<<<
 * VALUE_TYPE_BIN    = XMMSV_TYPE_BIN
 * VALUE_TYPE_LIST   = XMMSV_TYPE_LIST
 */
  __pyx_t_1 = PyInt_FromLong(XMMSV_TYPE_COLL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 14; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__VALUE_TYPE_COLL, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 14; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "xmmsvalue.pyx":15
 * VALUE_TYPE_STRING = XMMSV_TYPE_STRING
 * VALUE_TYPE_COLL   = XMMSV_TYPE_COLL
 * VALUE_TYPE_BIN    = XMMSV_TYPE_BIN             # <<<<<<<<<<<<<<
 * VALUE_TYPE_LIST   = XMMSV_TYPE_LIST
 * VALUE_TYPE_DICT   = XMMSV_TYPE_DICT
 */
  __pyx_t_1 = PyInt_FromLong(XMMSV_TYPE_BIN); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 15; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__VALUE_TYPE_BIN, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 15; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "xmmsvalue.pyx":16
 * VALUE_TYPE_COLL   = XMMSV_TYPE_COLL
 * VALUE_TYPE_BIN    = XMMSV_TYPE_BIN
 * VALUE_TYPE_LIST   = XMMSV_TYPE_LIST             # <<<<<<<<<<<<<<
 * VALUE_TYPE_DICT   = XMMSV_TYPE_DICT
 * 
 */
  __pyx_t_1 = PyInt_FromLong(XMMSV_TYPE_LIST); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 16; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__VALUE_TYPE_LIST, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 16; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "xmmsvalue.pyx":17
 * VALUE_TYPE_BIN    = XMMSV_TYPE_BIN
 * VALUE_TYPE_LIST   = XMMSV_TYPE_LIST
 * VALUE_TYPE_DICT   = XMMSV_TYPE_DICT             # <<<<<<<<<<<<<<
 * 
 * COLLECTION_TYPE_REFERENCE    = XMMS_COLLECTION_TYPE_REFERENCE
 */
  __pyx_t_1 = PyInt_FromLong(XMMSV_TYPE_DICT); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 17; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__VALUE_TYPE_DICT, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 17; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "xmmsvalue.pyx":19
 * VALUE_TYPE_DICT   = XMMSV_TYPE_DICT
 * 
 * COLLECTION_TYPE_REFERENCE    = XMMS_COLLECTION_TYPE_REFERENCE             # <<<<<<<<<<<<<<
 * COLLECTION_TYPE_UNION        = XMMS_COLLECTION_TYPE_UNION
 * COLLECTION_TYPE_INTERSECTION = XMMS_COLLECTION_TYPE_INTERSECTION
 */
  __pyx_t_1 = PyInt_FromLong(XMMS_COLLECTION_TYPE_REFERENCE); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 19; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_52, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 19; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "xmmsvalue.pyx":20
 * 
 * COLLECTION_TYPE_REFERENCE    = XMMS_COLLECTION_TYPE_REFERENCE
 * COLLECTION_TYPE_UNION        = XMMS_COLLECTION_TYPE_UNION             # <<<<<<<<<<<<<<
 * COLLECTION_TYPE_INTERSECTION = XMMS_COLLECTION_TYPE_INTERSECTION
 * COLLECTION_TYPE_COMPLEMENT   = XMMS_COLLECTION_TYPE_COMPLEMENT
 */
  __pyx_t_1 = PyInt_FromLong(XMMS_COLLECTION_TYPE_UNION); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 20; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_53, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 20; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "xmmsvalue.pyx":21
 * COLLECTION_TYPE_REFERENCE    = XMMS_COLLECTION_TYPE_REFERENCE
 * COLLECTION_TYPE_UNION        = XMMS_COLLECTION_TYPE_UNION
 * COLLECTION_TYPE_INTERSECTION = XMMS_COLLECTION_TYPE_INTERSECTION             # <<<<<<<<<<<<<<
 * COLLECTION_TYPE_COMPLEMENT   = XMMS_COLLECTION_TYPE_COMPLEMENT
 * COLLECTION_TYPE_HAS          = XMMS_COLLECTION_TYPE_HAS
 */
  __pyx_t_1 = PyInt_FromLong(XMMS_COLLECTION_TYPE_INTERSECTION); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 21; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_54, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 21; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "xmmsvalue.pyx":22
 * COLLECTION_TYPE_UNION        = XMMS_COLLECTION_TYPE_UNION
 * COLLECTION_TYPE_INTERSECTION = XMMS_COLLECTION_TYPE_INTERSECTION
 * COLLECTION_TYPE_COMPLEMENT   = XMMS_COLLECTION_TYPE_COMPLEMENT             # <<<<<<<<<<<<<<
 * COLLECTION_TYPE_HAS          = XMMS_COLLECTION_TYPE_HAS
 * COLLECTION_TYPE_EQUALS       = XMMS_COLLECTION_TYPE_EQUALS
 */
  __pyx_t_1 = PyInt_FromLong(XMMS_COLLECTION_TYPE_COMPLEMENT); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 22; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_55, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 22; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "xmmsvalue.pyx":23
 * COLLECTION_TYPE_INTERSECTION = XMMS_COLLECTION_TYPE_INTERSECTION
 * COLLECTION_TYPE_COMPLEMENT   = XMMS_COLLECTION_TYPE_COMPLEMENT
 * COLLECTION_TYPE_HAS          = XMMS_COLLECTION_TYPE_HAS             # <<<<<<<<<<<<<<
 * COLLECTION_TYPE_EQUALS       = XMMS_COLLECTION_TYPE_EQUALS
 * COLLECTION_TYPE_MATCH        = XMMS_COLLECTION_TYPE_MATCH
 */
  __pyx_t_1 = PyInt_FromLong(XMMS_COLLECTION_TYPE_HAS); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 23; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__COLLECTION_TYPE_HAS, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 23; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "xmmsvalue.pyx":24
 * COLLECTION_TYPE_COMPLEMENT   = XMMS_COLLECTION_TYPE_COMPLEMENT
 * COLLECTION_TYPE_HAS          = XMMS_COLLECTION_TYPE_HAS
 * COLLECTION_TYPE_EQUALS       = XMMS_COLLECTION_TYPE_EQUALS             # <<<<<<<<<<<<<<
 * COLLECTION_TYPE_MATCH        = XMMS_COLLECTION_TYPE_MATCH
 * COLLECTION_TYPE_SMALLER      = XMMS_COLLECTION_TYPE_SMALLER
 */
  __pyx_t_1 = PyInt_FromLong(XMMS_COLLECTION_TYPE_EQUALS); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 24; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_56, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 24; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "xmmsvalue.pyx":25
 * COLLECTION_TYPE_HAS          = XMMS_COLLECTION_TYPE_HAS
 * COLLECTION_TYPE_EQUALS       = XMMS_COLLECTION_TYPE_EQUALS
 * COLLECTION_TYPE_MATCH        = XMMS_COLLECTION_TYPE_MATCH             # <<<<<<<<<<<<<<
 * COLLECTION_TYPE_SMALLER      = XMMS_COLLECTION_TYPE_SMALLER
 * COLLECTION_TYPE_GREATER      = XMMS_COLLECTION_TYPE_GREATER
 */
  __pyx_t_1 = PyInt_FromLong(XMMS_COLLECTION_TYPE_MATCH); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 25; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_57, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 25; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "xmmsvalue.pyx":26
 * COLLECTION_TYPE_EQUALS       = XMMS_COLLECTION_TYPE_EQUALS
 * COLLECTION_TYPE_MATCH        = XMMS_COLLECTION_TYPE_MATCH
 * COLLECTION_TYPE_SMALLER      = XMMS_COLLECTION_TYPE_SMALLER             # <<<<<<<<<<<<<<
 * COLLECTION_TYPE_GREATER      = XMMS_COLLECTION_TYPE_GREATER
 * COLLECTION_TYPE_IDLIST       = XMMS_COLLECTION_TYPE_IDLIST
 */
  __pyx_t_1 = PyInt_FromLong(XMMS_COLLECTION_TYPE_SMALLER); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_58, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 26; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "xmmsvalue.pyx":27
 * COLLECTION_TYPE_MATCH        = XMMS_COLLECTION_TYPE_MATCH
 * COLLECTION_TYPE_SMALLER      = XMMS_COLLECTION_TYPE_SMALLER
 * COLLECTION_TYPE_GREATER      = XMMS_COLLECTION_TYPE_GREATER             # <<<<<<<<<<<<<<
 * COLLECTION_TYPE_IDLIST       = XMMS_COLLECTION_TYPE_IDLIST
 * COLLECTION_TYPE_QUEUE        = XMMS_COLLECTION_TYPE_QUEUE
 */
  __pyx_t_1 = PyInt_FromLong(XMMS_COLLECTION_TYPE_GREATER); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 27; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_59, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 27; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "xmmsvalue.pyx":28
 * COLLECTION_TYPE_SMALLER      = XMMS_COLLECTION_TYPE_SMALLER
 * COLLECTION_TYPE_GREATER      = XMMS_COLLECTION_TYPE_GREATER
 * COLLECTION_TYPE_IDLIST       = XMMS_COLLECTION_TYPE_IDLIST             # <<<<<<<<<<<<<<
 * COLLECTION_TYPE_QUEUE        = XMMS_COLLECTION_TYPE_QUEUE
 * COLLECTION_TYPE_PARTYSHUFFLE = XMMS_COLLECTION_TYPE_PARTYSHUFFLE
 */
  __pyx_t_1 = PyInt_FromLong(XMMS_COLLECTION_TYPE_IDLIST); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_60, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 28; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "xmmsvalue.pyx":29
 * COLLECTION_TYPE_GREATER      = XMMS_COLLECTION_TYPE_GREATER
 * COLLECTION_TYPE_IDLIST       = XMMS_COLLECTION_TYPE_IDLIST
 * COLLECTION_TYPE_QUEUE        = XMMS_COLLECTION_TYPE_QUEUE             # <<<<<<<<<<<<<<
 * COLLECTION_TYPE_PARTYSHUFFLE = XMMS_COLLECTION_TYPE_PARTYSHUFFLE
 * 
 */
  __pyx_t_1 = PyInt_FromLong(XMMS_COLLECTION_TYPE_QUEUE); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 29; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_61, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 29; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "xmmsvalue.pyx":30
 * COLLECTION_TYPE_IDLIST       = XMMS_COLLECTION_TYPE_IDLIST
 * COLLECTION_TYPE_QUEUE        = XMMS_COLLECTION_TYPE_QUEUE
 * COLLECTION_TYPE_PARTYSHUFFLE = XMMS_COLLECTION_TYPE_PARTYSHUFFLE             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_1 = PyInt_FromLong(XMMS_COLLECTION_TYPE_PARTYSHUFFLE); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 30; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s_62, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 30; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "xmmsvalue.pyx":33
 * 
 * 
 * from propdict import PropDict # xmmsclient.propdict             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_1));
  __Pyx_INCREF(((PyObject *)__pyx_n_s__PropDict));
  PyList_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_n_s__PropDict));
  __Pyx_GIVEREF(((PyObject *)__pyx_n_s__PropDict));
  __pyx_t_2 = __Pyx_Import(((PyObject *)__pyx_n_s__propdict), ((PyObject *)__pyx_t_1), -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
  __pyx_t_1 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__PropDict); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__PropDict, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "xmmsvalue.pyx":342
 * 
 * 
 * cdef _idlist_types = [XMMS_COLLECTION_TYPE_IDLIST, XMMS_COLLECTION_TYPE_QUEUE, XMMS_COLLECTION_TYPE_PARTYSHUFFLE]             # <<<<<<<<<<<<<<
 * cdef class Collection(CollectionRef):
 * 	#cdef object _attributes
 */
  __pyx_t_2 = PyInt_FromLong(XMMS_COLLECTION_TYPE_IDLIST); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 342; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_1 = PyInt_FromLong(XMMS_COLLECTION_TYPE_QUEUE); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 342; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyInt_FromLong(XMMS_COLLECTION_TYPE_PARTYSHUFFLE); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 342; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_4 = PyList_New(3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 342; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_4));
  PyList_SET_ITEM(__pyx_t_4, 0, __pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_2);
  PyList_SET_ITEM(__pyx_t_4, 1, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  PyList_SET_ITEM(__pyx_t_4, 2, __pyx_t_3);
  __Pyx_GIVEREF(__pyx_t_3);
  __pyx_t_2 = 0;
  __pyx_t_1 = 0;
  __pyx_t_3 = 0;
  __Pyx_XGOTREF(__pyx_v_9xmmsvalue__idlist_types);
  __Pyx_DECREF(__pyx_v_9xmmsvalue__idlist_types);
  __Pyx_GIVEREF(((PyObject *)__pyx_t_4));
  __pyx_v_9xmmsvalue__idlist_types = ((PyObject *)__pyx_t_4);
  __pyx_t_4 = 0;

  /* "xmmsvalue.pyx":683
 * 
 * # XXX Might not be needed.
 * class CollectionWrapper(Collection):             # <<<<<<<<<<<<<<
 * 	pass
 * 
 */
  __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 683; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_4));
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 683; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_3));
  __Pyx_INCREF(((PyObject *)((PyObject*)__pyx_ptype_9xmmsvalue_Collection)));
  PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)((PyObject*)__pyx_ptype_9xmmsvalue_Collection)));
  __Pyx_GIVEREF(((PyObject *)((PyObject*)__pyx_ptype_9xmmsvalue_Collection)));
  __pyx_t_1 = __Pyx_CreateClass(((PyObject *)__pyx_t_3), ((PyObject *)__pyx_t_4), __pyx_n_s__CollectionWrapper, __pyx_n_s__xmmsvalue); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 683; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__CollectionWrapper, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 683; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;

  /* "xmmsvalue.pyx":686
 * 	pass
 * 
 * class BaseCollection(CollectionWrapper):             # <<<<<<<<<<<<<<
 * 	def __init__(Collection self, int _colltype, **kargs):
 * 		self.coll = xmmsv_coll_new(<xmmsv_coll_type_t> _colltype)
 */
  __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 686; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_4));

  /* "xmmsvalue.pyx":687
 * 
 * class BaseCollection(CollectionWrapper):
 * 	def __init__(Collection self, int _colltype, **kargs):             # <<<<<<<<<<<<<<
 * 		self.coll = xmmsv_coll_new(<xmmsv_coll_type_t> _colltype)
 * 		if self.coll == NULL:
 */
  __pyx_t_1 = __pyx_binding_PyCFunctionType_NewEx(&__pyx_mdef_9xmmsvalue_14BaseCollection___init__, NULL, __pyx_n_s__xmmsvalue); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 687; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s____init__, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 687; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "xmmsvalue.pyx":686
 * 	pass
 * 
 * class BaseCollection(CollectionWrapper):             # <<<<<<<<<<<<<<
 * 	def __init__(Collection self, int _colltype, **kargs):
 * 		self.coll = xmmsv_coll_new(<xmmsv_coll_type_t> _colltype)
 */
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__CollectionWrapper); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 686; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 686; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_3));
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_CreateClass(((PyObject *)__pyx_t_3), ((PyObject *)__pyx_t_4), __pyx_n_s__BaseCollection, __pyx_n_s__xmmsvalue); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 686; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__BaseCollection, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 686; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;

  /* "xmmsvalue.pyx":704
 * 			self.attributes[k] = kargs[k]
 * 
 * class Reference(BaseCollection):             # <<<<<<<<<<<<<<
 * 	def __init__(Collection self, ref, ns="Collections"):
 * 		BaseCollection.__init__(self, XMMS_COLLECTION_TYPE_REFERENCE,
 */
  __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 704; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_4));

  /* "xmmsvalue.pyx":705
 * 
 * class Reference(BaseCollection):
 * 	def __init__(Collection self, ref, ns="Collections"):             # <<<<<<<<<<<<<<
 * 		BaseCollection.__init__(self, XMMS_COLLECTION_TYPE_REFERENCE,
 * 				namespace=ns, reference=ref)
 */
  __pyx_t_1 = __pyx_binding_PyCFunctionType_NewEx(&__pyx_mdef_9xmmsvalue_9Reference___init__, NULL, __pyx_n_s__xmmsvalue); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 705; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s____init__, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 705; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "xmmsvalue.pyx":704
 * 			self.attributes[k] = kargs[k]
 * 
 * class Reference(BaseCollection):             # <<<<<<<<<<<<<<
 * 	def __init__(Collection self, ref, ns="Collections"):
 * 		BaseCollection.__init__(self, XMMS_COLLECTION_TYPE_REFERENCE,
 */
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__BaseCollection); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 704; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 704; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_3));
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_CreateClass(((PyObject *)__pyx_t_3), ((PyObject *)__pyx_t_4), __pyx_n_s__Reference, __pyx_n_s__xmmsvalue); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 704; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__Reference, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 704; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;

  /* "xmmsvalue.pyx":709
 * 				namespace=ns, reference=ref)
 * 
 * class Universe(Reference):             # <<<<<<<<<<<<<<
 * 	def __init__(self):
 * 		Reference.__init__(self, "All Media")
 */
  __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 709; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_4));

  /* "xmmsvalue.pyx":710
 * 
 * class Universe(Reference):
 * 	def __init__(self):             # <<<<<<<<<<<<<<
 * 		Reference.__init__(self, "All Media")
 * 
 */
  __pyx_t_1 = __pyx_binding_PyCFunctionType_NewEx(&__pyx_mdef_9xmmsvalue_8Universe___init__, NULL, __pyx_n_s__xmmsvalue); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 710; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s____init__, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 710; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "xmmsvalue.pyx":709
 * 				namespace=ns, reference=ref)
 * 
 * class Universe(Reference):             # <<<<<<<<<<<<<<
 * 	def __init__(self):
 * 		Reference.__init__(self, "All Media")
 */
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__Reference); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 709; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 709; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_3));
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_CreateClass(((PyObject *)__pyx_t_3), ((PyObject *)__pyx_t_4), __pyx_n_s__Universe, __pyx_n_s__xmmsvalue); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 709; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__Universe, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 709; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;

  /* "xmmsvalue.pyx":713
 * 		Reference.__init__(self, "All Media")
 * 
 * class FilterCollection(BaseCollection):             # <<<<<<<<<<<<<<
 * 	def __init__(Collection self, operation, parent=None, **kv):
 * 		if parent is None:
 */
  __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 713; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_4));

  /* "xmmsvalue.pyx":714
 * 
 * class FilterCollection(BaseCollection):
 * 	def __init__(Collection self, operation, parent=None, **kv):             # <<<<<<<<<<<<<<
 * 		if parent is None:
 * 			parent = Universe()
 */
  __pyx_t_1 = __pyx_binding_PyCFunctionType_NewEx(&__pyx_mdef_9xmmsvalue_16FilterCollection___init__, NULL, __pyx_n_s__xmmsvalue); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 714; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s____init__, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 714; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "xmmsvalue.pyx":713
 * 		Reference.__init__(self, "All Media")
 * 
 * class FilterCollection(BaseCollection):             # <<<<<<<<<<<<<<
 * 	def __init__(Collection self, operation, parent=None, **kv):
 * 		if parent is None:
 */
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__BaseCollection); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 713; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 713; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_3));
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_CreateClass(((PyObject *)__pyx_t_3), ((PyObject *)__pyx_t_4), __pyx_n_s__FilterCollection, __pyx_n_s__xmmsvalue); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 713; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__FilterCollection, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 713; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;

  /* "xmmsvalue.pyx":719
 * 		BaseCollection.__init__(self, operation, operands=[parent], **kv)
 * 
 * class Equals(FilterCollection):             # <<<<<<<<<<<<<<
 * 	def __init__(Collection self, parent=None, **kv):
 * 		FilterCollection.__init__(self, XMMS_COLLECTION_TYPE_EQUALS, parent, **kv)
 */
  __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 719; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_4));

  /* "xmmsvalue.pyx":720
 * 
 * class Equals(FilterCollection):
 * 	def __init__(Collection self, parent=None, **kv):             # <<<<<<<<<<<<<<
 * 		FilterCollection.__init__(self, XMMS_COLLECTION_TYPE_EQUALS, parent, **kv)
 * 
 */
  __pyx_t_1 = __pyx_binding_PyCFunctionType_NewEx(&__pyx_mdef_9xmmsvalue_6Equals___init__, NULL, __pyx_n_s__xmmsvalue); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 720; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s____init__, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 720; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "xmmsvalue.pyx":719
 * 		BaseCollection.__init__(self, operation, operands=[parent], **kv)
 * 
 * class Equals(FilterCollection):             # <<<<<<<<<<<<<<
 * 	def __init__(Collection self, parent=None, **kv):
 * 		FilterCollection.__init__(self, XMMS_COLLECTION_TYPE_EQUALS, parent, **kv)
 */
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__FilterCollection); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 719; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 719; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_3));
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_CreateClass(((PyObject *)__pyx_t_3), ((PyObject *)__pyx_t_4), __pyx_n_s__Equals, __pyx_n_s__xmmsvalue); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 719; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__Equals, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 719; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;

  /* "xmmsvalue.pyx":723
 * 		FilterCollection.__init__(self, XMMS_COLLECTION_TYPE_EQUALS, parent, **kv)
 * 
 * class Smaller(FilterCollection):             # <<<<<<<<<<<<<<
 * 	def __init__(Collection self, parent=None, **kv):
 * 		FilterCollection.__init__(self, XMMS_COLLECTION_TYPE_SMALLER, parent, **kv)
 */
  __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 723; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_4));

  /* "xmmsvalue.pyx":724
 * 
 * class Smaller(FilterCollection):
 * 	def __init__(Collection self, parent=None, **kv):             # <<<<<<<<<<<<<<
 * 		FilterCollection.__init__(self, XMMS_COLLECTION_TYPE_SMALLER, parent, **kv)
 * 
 */
  __pyx_t_1 = __pyx_binding_PyCFunctionType_NewEx(&__pyx_mdef_9xmmsvalue_7Smaller___init__, NULL, __pyx_n_s__xmmsvalue); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 724; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s____init__, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 724; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "xmmsvalue.pyx":723
 * 		FilterCollection.__init__(self, XMMS_COLLECTION_TYPE_EQUALS, parent, **kv)
 * 
 * class Smaller(FilterCollection):             # <<<<<<<<<<<<<<
 * 	def __init__(Collection self, parent=None, **kv):
 * 		FilterCollection.__init__(self, XMMS_COLLECTION_TYPE_SMALLER, parent, **kv)
 */
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__FilterCollection); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 723; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 723; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_3));
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_CreateClass(((PyObject *)__pyx_t_3), ((PyObject *)__pyx_t_4), __pyx_n_s__Smaller, __pyx_n_s__xmmsvalue); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 723; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__Smaller, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 723; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;

  /* "xmmsvalue.pyx":727
 * 		FilterCollection.__init__(self, XMMS_COLLECTION_TYPE_SMALLER, parent, **kv)
 * 
 * class Greater(FilterCollection):             # <<<<<<<<<<<<<<
 * 	def __init__(Collection self, parent=None, **kv):
 * 		FilterCollection.__init__(self, XMMS_COLLECTION_TYPE_GREATER, parent, **kv)
 */
  __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 727; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_4));

  /* "xmmsvalue.pyx":728
 * 
 * class Greater(FilterCollection):
 * 	def __init__(Collection self, parent=None, **kv):             # <<<<<<<<<<<<<<
 * 		FilterCollection.__init__(self, XMMS_COLLECTION_TYPE_GREATER, parent, **kv)
 * 
 */
  __pyx_t_1 = __pyx_binding_PyCFunctionType_NewEx(&__pyx_mdef_9xmmsvalue_7Greater___init__, NULL, __pyx_n_s__xmmsvalue); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 728; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s____init__, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 728; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "xmmsvalue.pyx":727
 * 		FilterCollection.__init__(self, XMMS_COLLECTION_TYPE_SMALLER, parent, **kv)
 * 
 * class Greater(FilterCollection):             # <<<<<<<<<<<<<<
 * 	def __init__(Collection self, parent=None, **kv):
 * 		FilterCollection.__init__(self, XMMS_COLLECTION_TYPE_GREATER, parent, **kv)
 */
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__FilterCollection); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 727; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 727; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_3));
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_CreateClass(((PyObject *)__pyx_t_3), ((PyObject *)__pyx_t_4), __pyx_n_s__Greater, __pyx_n_s__xmmsvalue); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 727; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__Greater, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 727; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;

  /* "xmmsvalue.pyx":731
 * 		FilterCollection.__init__(self, XMMS_COLLECTION_TYPE_GREATER, parent, **kv)
 * 
 * class Match(FilterCollection):             # <<<<<<<<<<<<<<
 * 	def __init__(Collection self, parent=None, **kv):
 * 		FilterCollection.__init__(self, XMMS_COLLECTION_TYPE_MATCH, parent, **kv)
 */
  __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 731; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_4));

  /* "xmmsvalue.pyx":732
 * 
 * class Match(FilterCollection):
 * 	def __init__(Collection self, parent=None, **kv):             # <<<<<<<<<<<<<<
 * 		FilterCollection.__init__(self, XMMS_COLLECTION_TYPE_MATCH, parent, **kv)
 * 
 */
  __pyx_t_1 = __pyx_binding_PyCFunctionType_NewEx(&__pyx_mdef_9xmmsvalue_5Match___init__, NULL, __pyx_n_s__xmmsvalue); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 732; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s____init__, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 732; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "xmmsvalue.pyx":731
 * 		FilterCollection.__init__(self, XMMS_COLLECTION_TYPE_GREATER, parent, **kv)
 * 
 * class Match(FilterCollection):             # <<<<<<<<<<<<<<
 * 	def __init__(Collection self, parent=None, **kv):
 * 		FilterCollection.__init__(self, XMMS_COLLECTION_TYPE_MATCH, parent, **kv)
 */
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__FilterCollection); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 731; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 731; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_3));
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_CreateClass(((PyObject *)__pyx_t_3), ((PyObject *)__pyx_t_4), __pyx_n_s__Match, __pyx_n_s__xmmsvalue); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 731; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__Match, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 731; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;

  /* "xmmsvalue.pyx":735
 * 		FilterCollection.__init__(self, XMMS_COLLECTION_TYPE_MATCH, parent, **kv)
 * 
 * class Has(FilterCollection):             # <<<<<<<<<<<<<<
 * 	def __init__(Collection self, parent=None, **kv):
 * 		FilterCollection.__init__(self, XMMS_COLLECTION_TYPE_HAS, parent, **kv)
 */
  __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 735; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_4));

  /* "xmmsvalue.pyx":736
 * 
 * class Has(FilterCollection):
 * 	def __init__(Collection self, parent=None, **kv):             # <<<<<<<<<<<<<<
 * 		FilterCollection.__init__(self, XMMS_COLLECTION_TYPE_HAS, parent, **kv)
 * 
 */
  __pyx_t_1 = __pyx_binding_PyCFunctionType_NewEx(&__pyx_mdef_9xmmsvalue_3Has___init__, NULL, __pyx_n_s__xmmsvalue); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 736; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s____init__, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 736; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "xmmsvalue.pyx":735
 * 		FilterCollection.__init__(self, XMMS_COLLECTION_TYPE_MATCH, parent, **kv)
 * 
 * class Has(FilterCollection):             # <<<<<<<<<<<<<<
 * 	def __init__(Collection self, parent=None, **kv):
 * 		FilterCollection.__init__(self, XMMS_COLLECTION_TYPE_HAS, parent, **kv)
 */
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__FilterCollection); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 735; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 735; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_3));
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_CreateClass(((PyObject *)__pyx_t_3), ((PyObject *)__pyx_t_4), __pyx_n_s__Has, __pyx_n_s__xmmsvalue); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 735; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__Has, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 735; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;

  /* "xmmsvalue.pyx":739
 * 		FilterCollection.__init__(self, XMMS_COLLECTION_TYPE_HAS, parent, **kv)
 * 
 * class IDList(BaseCollection):             # <<<<<<<<<<<<<<
 * 	def __init__(Collection self, ids = None):
 * 		BaseCollection.__init__(self, XMMS_COLLECTION_TYPE_IDLIST, ids=ids)
 */
  __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 739; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_4));

  /* "xmmsvalue.pyx":740
 * 
 * class IDList(BaseCollection):
 * 	def __init__(Collection self, ids = None):             # <<<<<<<<<<<<<<
 * 		BaseCollection.__init__(self, XMMS_COLLECTION_TYPE_IDLIST, ids=ids)
 * 
 */
  __pyx_t_1 = __pyx_binding_PyCFunctionType_NewEx(&__pyx_mdef_9xmmsvalue_6IDList___init__, NULL, __pyx_n_s__xmmsvalue); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 740; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s____init__, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 740; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "xmmsvalue.pyx":739
 * 		FilterCollection.__init__(self, XMMS_COLLECTION_TYPE_HAS, parent, **kv)
 * 
 * class IDList(BaseCollection):             # <<<<<<<<<<<<<<
 * 	def __init__(Collection self, ids = None):
 * 		BaseCollection.__init__(self, XMMS_COLLECTION_TYPE_IDLIST, ids=ids)
 */
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__BaseCollection); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 739; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 739; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_3));
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_CreateClass(((PyObject *)__pyx_t_3), ((PyObject *)__pyx_t_4), __pyx_n_s__IDList, __pyx_n_s__xmmsvalue); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 739; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__IDList, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 739; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;

  /* "xmmsvalue.pyx":743
 * 		BaseCollection.__init__(self, XMMS_COLLECTION_TYPE_IDLIST, ids=ids)
 * 
 * class Queue(BaseCollection):             # <<<<<<<<<<<<<<
 * 	def __init__(Collection self, ids = None):
 * 		BaseCollection.__init__(self, XMMS_COLLECTION_TYPE_QUEUE, ids=ids)
 */
  __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 743; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_4));

  /* "xmmsvalue.pyx":744
 * 
 * class Queue(BaseCollection):
 * 	def __init__(Collection self, ids = None):             # <<<<<<<<<<<<<<
 * 		BaseCollection.__init__(self, XMMS_COLLECTION_TYPE_QUEUE, ids=ids)
 * 
 */
  __pyx_t_1 = __pyx_binding_PyCFunctionType_NewEx(&__pyx_mdef_9xmmsvalue_5Queue___init__, NULL, __pyx_n_s__xmmsvalue); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 744; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s____init__, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 744; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "xmmsvalue.pyx":743
 * 		BaseCollection.__init__(self, XMMS_COLLECTION_TYPE_IDLIST, ids=ids)
 * 
 * class Queue(BaseCollection):             # <<<<<<<<<<<<<<
 * 	def __init__(Collection self, ids = None):
 * 		BaseCollection.__init__(self, XMMS_COLLECTION_TYPE_QUEUE, ids=ids)
 */
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__BaseCollection); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 743; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 743; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_3));
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_CreateClass(((PyObject *)__pyx_t_3), ((PyObject *)__pyx_t_4), __pyx_n_s__Queue, __pyx_n_s__xmmsvalue); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 743; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__Queue, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 743; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;

  /* "xmmsvalue.pyx":747
 * 		BaseCollection.__init__(self, XMMS_COLLECTION_TYPE_QUEUE, ids=ids)
 * 
 * class PShuffle(BaseCollection):             # <<<<<<<<<<<<<<
 * 	def __init__(Collection self, parent = None, ids = None):
 * 		if parent is None:
 */
  __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 747; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_4));

  /* "xmmsvalue.pyx":748
 * 
 * class PShuffle(BaseCollection):
 * 	def __init__(Collection self, parent = None, ids = None):             # <<<<<<<<<<<<<<
 * 		if parent is None:
 * 			parent = Universe()
 */
  __pyx_t_1 = __pyx_binding_PyCFunctionType_NewEx(&__pyx_mdef_9xmmsvalue_8PShuffle___init__, NULL, __pyx_n_s__xmmsvalue); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 748; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s____init__, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 748; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "xmmsvalue.pyx":747
 * 		BaseCollection.__init__(self, XMMS_COLLECTION_TYPE_QUEUE, ids=ids)
 * 
 * class PShuffle(BaseCollection):             # <<<<<<<<<<<<<<
 * 	def __init__(Collection self, parent = None, ids = None):
 * 		if parent is None:
 */
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__BaseCollection); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 747; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 747; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_3));
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_CreateClass(((PyObject *)__pyx_t_3), ((PyObject *)__pyx_t_4), __pyx_n_s__PShuffle, __pyx_n_s__xmmsvalue); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 747; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__PShuffle, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 747; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;

  /* "xmmsvalue.pyx":753
 * 		BaseCollection.__init__(self, XMMS_COLLECTION_TYPE_PARTYSHUFFLE, operands=[parent], ids=ids)
 * 
 * class Union(BaseCollection):             # <<<<<<<<<<<<<<
 * 	def __init__(Collection self, *a):
 * 		BaseCollection.__init__(self, XMMS_COLLECTION_TYPE_UNION, operands=a)
 */
  __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 753; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_4));

  /* "xmmsvalue.pyx":754
 * 
 * class Union(BaseCollection):
 * 	def __init__(Collection self, *a):             # <<<<<<<<<<<<<<
 * 		BaseCollection.__init__(self, XMMS_COLLECTION_TYPE_UNION, operands=a)
 * 
 */
  __pyx_t_1 = __pyx_binding_PyCFunctionType_NewEx(&__pyx_mdef_9xmmsvalue_5Union___init__, NULL, __pyx_n_s__xmmsvalue); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 754; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s____init__, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 754; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "xmmsvalue.pyx":753
 * 		BaseCollection.__init__(self, XMMS_COLLECTION_TYPE_PARTYSHUFFLE, operands=[parent], ids=ids)
 * 
 * class Union(BaseCollection):             # <<<<<<<<<<<<<<
 * 	def __init__(Collection self, *a):
 * 		BaseCollection.__init__(self, XMMS_COLLECTION_TYPE_UNION, operands=a)
 */
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__BaseCollection); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 753; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 753; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_3));
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_CreateClass(((PyObject *)__pyx_t_3), ((PyObject *)__pyx_t_4), __pyx_n_s__Union, __pyx_n_s__xmmsvalue); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 753; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__Union, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 753; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;

  /* "xmmsvalue.pyx":757
 * 		BaseCollection.__init__(self, XMMS_COLLECTION_TYPE_UNION, operands=a)
 * 
 * class Intersection(BaseCollection):             # <<<<<<<<<<<<<<
 * 	def __init__(Collection self, *a):
 * 		BaseCollection.__init__(self, XMMS_COLLECTION_TYPE_INTERSECTION, operands=a)
 */
  __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 757; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_4));

  /* "xmmsvalue.pyx":758
 * 
 * class Intersection(BaseCollection):
 * 	def __init__(Collection self, *a):             # <<<<<<<<<<<<<<
 * 		BaseCollection.__init__(self, XMMS_COLLECTION_TYPE_INTERSECTION, operands=a)
 * 
 */
  __pyx_t_1 = __pyx_binding_PyCFunctionType_NewEx(&__pyx_mdef_9xmmsvalue_12Intersection___init__, NULL, __pyx_n_s__xmmsvalue); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 758; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s____init__, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 758; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "xmmsvalue.pyx":757
 * 		BaseCollection.__init__(self, XMMS_COLLECTION_TYPE_UNION, operands=a)
 * 
 * class Intersection(BaseCollection):             # <<<<<<<<<<<<<<
 * 	def __init__(Collection self, *a):
 * 		BaseCollection.__init__(self, XMMS_COLLECTION_TYPE_INTERSECTION, operands=a)
 */
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__BaseCollection); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 757; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 757; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_3));
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_CreateClass(((PyObject *)__pyx_t_3), ((PyObject *)__pyx_t_4), __pyx_n_s__Intersection, __pyx_n_s__xmmsvalue); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 757; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__Intersection, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 757; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;

  /* "xmmsvalue.pyx":761
 * 		BaseCollection.__init__(self, XMMS_COLLECTION_TYPE_INTERSECTION, operands=a)
 * 
 * class Complement(BaseCollection):             # <<<<<<<<<<<<<<
 * 	def __init__(Collection self, op):
 * 		BaseCollection.__init__(self, XMMS_COLLECTION_TYPE_COMPLEMENT, operands=[op])
 */
  __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 761; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_4));

  /* "xmmsvalue.pyx":762
 * 
 * class Complement(BaseCollection):
 * 	def __init__(Collection self, op):             # <<<<<<<<<<<<<<
 * 		BaseCollection.__init__(self, XMMS_COLLECTION_TYPE_COMPLEMENT, operands=[op])
 * 
 */
  __pyx_t_1 = __pyx_binding_PyCFunctionType_NewEx(&__pyx_mdef_9xmmsvalue_10Complement___init__, NULL, __pyx_n_s__xmmsvalue); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 762; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyObject_SetItem(__pyx_t_4, __pyx_n_s____init__, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 762; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "xmmsvalue.pyx":761
 * 		BaseCollection.__init__(self, XMMS_COLLECTION_TYPE_INTERSECTION, operands=a)
 * 
 * class Complement(BaseCollection):             # <<<<<<<<<<<<<<
 * 	def __init__(Collection self, op):
 * 		BaseCollection.__init__(self, XMMS_COLLECTION_TYPE_COMPLEMENT, operands=[op])
 */
  __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__BaseCollection); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 761; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 761; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_3));
  PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1);
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_CreateClass(((PyObject *)__pyx_t_3), ((PyObject *)__pyx_t_4), __pyx_n_s__Complement, __pyx_n_s__xmmsvalue); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 761; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0;
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__Complement, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 761; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;

  /* "xmmsvalue.pyx":808
 * 
 * 
 * def coll_parse(pattern):             # <<<<<<<<<<<<<<
 * 	cdef xmmsv_coll_t *coll = NULL
 * 
 */
  __pyx_t_4 = PyCFunction_NewEx(&__pyx_mdef_9xmmsvalue_coll_parse, NULL, __pyx_n_s__xmmsvalue); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 808; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__coll_parse, __pyx_t_4) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 808; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

  /* "xmmsvalue.pyx":816
 * 	return create_coll(coll)
 * 
 * XMMSValue = XmmsValue             # <<<<<<<<<<<<<<
 */
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s__XMMSValue, ((PyObject *)((PyObject*)__pyx_ptype_9xmmsvalue_XmmsValue))) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 816; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "xmmsvalue.pyx":1
 * """             # <<<<<<<<<<<<<<
 * Python bindings for xmmsv manipulations.
 * """
 */
  __pyx_t_4 = PyDict_New(); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(((PyObject *)__pyx_t_4));
  if (PyObject_SetAttr(__pyx_m, __pyx_n_s____test__, ((PyObject *)__pyx_t_4)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0;

  /* "xmmsutils.pxd":10
 * 	return ns
 * 
 * cdef inline from_unicode(object o):             # <<<<<<<<<<<<<<
 * 	if isinstance(o, unicode):
 * 		return PyUnicode_AsUTF8String(o)
 */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  if (__pyx_m) {
    __Pyx_AddTraceback("init xmmsvalue", __pyx_clineno, __pyx_lineno, __pyx_filename);
    Py_DECREF(__pyx_m); __pyx_m = 0;
  } else if (!PyErr_Occurred()) {
    PyErr_SetString(PyExc_ImportError, "init xmmsvalue");
  }
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  #if PY_MAJOR_VERSION < 3
  return;
  #else
  return __pyx_m;
  #endif
}

/* Runtime support code */

#if CYTHON_REFNANNY
static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) {
    PyObject *m = NULL, *p = NULL;
    void *r = NULL;
    m = PyImport_ImportModule((char *)modname);
    if (!m) goto end;
    p = PyObject_GetAttrString(m, (char *)"RefNannyAPI");
    if (!p) goto end;
    r = PyLong_AsVoidPtr(p);
end:
    Py_XDECREF(p);
    Py_XDECREF(m);
    return (__Pyx_RefNannyAPIStruct *)r;
}
#endif /* CYTHON_REFNANNY */

static PyObject *__Pyx_GetName(PyObject *dict, PyObject *name) {
    PyObject *result;
    result = PyObject_GetAttr(dict, name);
    if (!result) {
        if (dict != __pyx_b) {
            PyErr_Clear();
            result = PyObject_GetAttr(__pyx_b, name);
        }
        if (!result) {
            PyErr_SetObject(PyExc_NameError, name);
        }
    }
    return result;
}

static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb) {
    PyObject *local_type, *local_value, *local_tb;
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    PyThreadState *tstate = PyThreadState_GET();
    local_type = tstate->curexc_type;
    local_value = tstate->curexc_value;
    local_tb = tstate->curexc_traceback;
    tstate->curexc_type = 0;
    tstate->curexc_value = 0;
    tstate->curexc_traceback = 0;
    PyErr_NormalizeException(&local_type, &local_value, &local_tb);
    if (unlikely(tstate->curexc_type))
        goto bad;
    #if PY_MAJOR_VERSION >= 3
    if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0))
        goto bad;
    #endif
    *type = local_type;
    *value = local_value;
    *tb = local_tb;
    Py_INCREF(local_type);
    Py_INCREF(local_value);
    Py_INCREF(local_tb);
    tmp_type = tstate->exc_type;
    tmp_value = tstate->exc_value;
    tmp_tb = tstate->exc_traceback;
    tstate->exc_type = local_type;
    tstate->exc_value = local_value;
    tstate->exc_traceback = local_tb;
    /* Make sure tstate is in a consistent state when we XDECREF
       these objects (XDECREF may run arbitrary code). */
    Py_XDECREF(tmp_type);
    Py_XDECREF(tmp_value);
    Py_XDECREF(tmp_tb);
    return 0;
bad:
    *type = 0;
    *value = 0;
    *tb = 0;
    Py_XDECREF(local_type);
    Py_XDECREF(local_value);
    Py_XDECREF(local_tb);
    return -1;
}


static CYTHON_INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb) {
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    PyThreadState *tstate = PyThreadState_GET();

    tmp_type = tstate->curexc_type;
    tmp_value = tstate->curexc_value;
    tmp_tb = tstate->curexc_traceback;
    tstate->curexc_type = type;
    tstate->curexc_value = value;
    tstate->curexc_traceback = tb;
    Py_XDECREF(tmp_type);
    Py_XDECREF(tmp_value);
    Py_XDECREF(tmp_tb);
}

static CYTHON_INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb) {
    PyThreadState *tstate = PyThreadState_GET();
    *type = tstate->curexc_type;
    *value = tstate->curexc_value;
    *tb = tstate->curexc_traceback;

    tstate->curexc_type = 0;
    tstate->curexc_value = 0;
    tstate->curexc_traceback = 0;
}


#if PY_MAJOR_VERSION < 3
static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) {
    /* cause is unused */
    Py_XINCREF(type);
    Py_XINCREF(value);
    Py_XINCREF(tb);
    /* First, check the traceback argument, replacing None with NULL. */
    if (tb == Py_None) {
        Py_DECREF(tb);
        tb = 0;
    }
    else if (tb != NULL && !PyTraceBack_Check(tb)) {
        PyErr_SetString(PyExc_TypeError,
            "raise: arg 3 must be a traceback or None");
        goto raise_error;
    }
    /* Next, replace a missing value with None */
    if (value == NULL) {
        value = Py_None;
        Py_INCREF(value);
    }
    #if PY_VERSION_HEX < 0x02050000
    if (!PyClass_Check(type))
    #else
    if (!PyType_Check(type))
    #endif
    {
        /* Raising an instance.  The value should be a dummy. */
        if (value != Py_None) {
            PyErr_SetString(PyExc_TypeError,
                "instance exception may not have a separate value");
            goto raise_error;
        }
        /* Normalize to raise <class>, <instance> */
        Py_DECREF(value);
        value = type;
        #if PY_VERSION_HEX < 0x02050000
            if (PyInstance_Check(type)) {
                type = (PyObject*) ((PyInstanceObject*)type)->in_class;
                Py_INCREF(type);
            }
            else {
                type = 0;
                PyErr_SetString(PyExc_TypeError,
                    "raise: exception must be an old-style class or instance");
                goto raise_error;
            }
        #else
            type = (PyObject*) Py_TYPE(type);
            Py_INCREF(type);
            if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) {
                PyErr_SetString(PyExc_TypeError,
                    "raise: exception class must be a subclass of BaseException");
                goto raise_error;
            }
        #endif
    }

    __Pyx_ErrRestore(type, value, tb);
    return;
raise_error:
    Py_XDECREF(value);
    Py_XDECREF(type);
    Py_XDECREF(tb);
    return;
}

#else /* Python 3+ */

static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) {
    if (tb == Py_None) {
        tb = 0;
    } else if (tb && !PyTraceBack_Check(tb)) {
        PyErr_SetString(PyExc_TypeError,
            "raise: arg 3 must be a traceback or None");
        goto bad;
    }
    if (value == Py_None)
        value = 0;

    if (PyExceptionInstance_Check(type)) {
        if (value) {
            PyErr_SetString(PyExc_TypeError,
                "instance exception may not have a separate value");
            goto bad;
        }
        value = type;
        type = (PyObject*) Py_TYPE(value);
    } else if (!PyExceptionClass_Check(type)) {
        PyErr_SetString(PyExc_TypeError,
            "raise: exception class must be a subclass of BaseException");
        goto bad;
    }

    if (cause) {
        PyObject *fixed_cause;
        if (PyExceptionClass_Check(cause)) {
            fixed_cause = PyObject_CallObject(cause, NULL);
            if (fixed_cause == NULL)
                goto bad;
        }
        else if (PyExceptionInstance_Check(cause)) {
            fixed_cause = cause;
            Py_INCREF(fixed_cause);
        }
        else {
            PyErr_SetString(PyExc_TypeError,
                            "exception causes must derive from "
                            "BaseException");
            goto bad;
        }
        if (!value) {
            value = PyObject_CallObject(type, NULL);
        }
        PyException_SetCause(value, fixed_cause);
    }

    PyErr_SetObject(type, value);

    if (tb) {
        PyThreadState *tstate = PyThreadState_GET();
        PyObject* tmp_tb = tstate->curexc_traceback;
        if (tb != tmp_tb) {
            Py_INCREF(tb);
            tstate->curexc_traceback = tb;
            Py_XDECREF(tmp_tb);
        }
    }

bad:
    return;
}
#endif

static void __Pyx_RaiseArgtupleInvalid(
    const char* func_name,
    int exact,
    Py_ssize_t num_min,
    Py_ssize_t num_max,
    Py_ssize_t num_found)
{
    Py_ssize_t num_expected;
    const char *more_or_less;

    if (num_found < num_min) {
        num_expected = num_min;
        more_or_less = "at least";
    } else {
        num_expected = num_max;
        more_or_less = "at most";
    }
    if (exact) {
        more_or_less = "exactly";
    }
    PyErr_Format(PyExc_TypeError,
                 "%s() takes %s %"PY_FORMAT_SIZE_T"d positional argument%s (%"PY_FORMAT_SIZE_T"d given)",
                 func_name, more_or_less, num_expected,
                 (num_expected == 1) ? "" : "s", num_found);
}

static CYTHON_INLINE int __Pyx_CheckKeywordStrings(
    PyObject *kwdict,
    const char* function_name,
    int kw_allowed)
{
    PyObject* key = 0;
    Py_ssize_t pos = 0;
    while (PyDict_Next(kwdict, &pos, &key, 0)) {
        #if PY_MAJOR_VERSION < 3
        if (unlikely(!PyString_CheckExact(key)) && unlikely(!PyString_Check(key)))
        #else
        if (unlikely(!PyUnicode_CheckExact(key)) && unlikely(!PyUnicode_Check(key)))
        #endif
            goto invalid_keyword_type;
    }
    if ((!kw_allowed) && unlikely(key))
        goto invalid_keyword;
    return 1;
invalid_keyword_type:
    PyErr_Format(PyExc_TypeError,
        "%s() keywords must be strings", function_name);
    return 0;
invalid_keyword:
    PyErr_Format(PyExc_TypeError,
    #if PY_MAJOR_VERSION < 3
        "%s() got an unexpected keyword argument '%s'",
        function_name, PyString_AsString(key));
    #else
        "%s() got an unexpected keyword argument '%U'",
        function_name, key);
    #endif
    return 0;
}

static void __Pyx_RaiseDoubleKeywordsError(
    const char* func_name,
    PyObject* kw_name)
{
    PyErr_Format(PyExc_TypeError,
        #if PY_MAJOR_VERSION >= 3
        "%s() got multiple values for keyword argument '%U'", func_name, kw_name);
        #else
        "%s() got multiple values for keyword argument '%s'", func_name,
        PyString_AS_STRING(kw_name));
        #endif
}

static int __Pyx_ParseOptionalKeywords(
    PyObject *kwds,
    PyObject **argnames[],
    PyObject *kwds2,
    PyObject *values[],
    Py_ssize_t num_pos_args,
    const char* function_name)
{
    PyObject *key = 0, *value = 0;
    Py_ssize_t pos = 0;
    PyObject*** name;
    PyObject*** first_kw_arg = argnames + num_pos_args;

    while (PyDict_Next(kwds, &pos, &key, &value)) {
        name = first_kw_arg;
        while (*name && (**name != key)) name++;
        if (*name) {
            values[name-argnames] = value;
        } else {
            #if PY_MAJOR_VERSION < 3
            if (unlikely(!PyString_CheckExact(key)) && unlikely(!PyString_Check(key))) {
            #else
            if (unlikely(!PyUnicode_CheckExact(key)) && unlikely(!PyUnicode_Check(key))) {
            #endif
                goto invalid_keyword_type;
            } else {
                for (name = first_kw_arg; *name; name++) {
                    #if PY_MAJOR_VERSION >= 3
                    if (PyUnicode_GET_SIZE(**name) == PyUnicode_GET_SIZE(key) &&
                        PyUnicode_Compare(**name, key) == 0) break;
                    #else
                    if (PyString_GET_SIZE(**name) == PyString_GET_SIZE(key) &&
                        _PyString_Eq(**name, key)) break;
                    #endif
                }
                if (*name) {
                    values[name-argnames] = value;
                } else {
                    /* unexpected keyword found */
                    for (name=argnames; name != first_kw_arg; name++) {
                        if (**name == key) goto arg_passed_twice;
                        #if PY_MAJOR_VERSION >= 3
                        if (PyUnicode_GET_SIZE(**name) == PyUnicode_GET_SIZE(key) &&
                            PyUnicode_Compare(**name, key) == 0) goto arg_passed_twice;
                        #else
                        if (PyString_GET_SIZE(**name) == PyString_GET_SIZE(key) &&
                            _PyString_Eq(**name, key)) goto arg_passed_twice;
                        #endif
                    }
                    if (kwds2) {
                        if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad;
                    } else {
                        goto invalid_keyword;
                    }
                }
            }
        }
    }
    return 0;
arg_passed_twice:
    __Pyx_RaiseDoubleKeywordsError(function_name, **name);
    goto bad;
invalid_keyword_type:
    PyErr_Format(PyExc_TypeError,
        "%s() keywords must be strings", function_name);
    goto bad;
invalid_keyword:
    PyErr_Format(PyExc_TypeError,
    #if PY_MAJOR_VERSION < 3
        "%s() got an unexpected keyword argument '%s'",
        function_name, PyString_AsString(key));
    #else
        "%s() got an unexpected keyword argument '%U'",
        function_name, key);
    #endif
bad:
    return -1;
}

static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) {
    PyErr_Format(PyExc_ValueError,
                 "need more than %"PY_FORMAT_SIZE_T"d value%s to unpack",
                 index, (index == 1) ? "" : "s");
}

static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) {
    PyErr_Format(PyExc_ValueError,
                 "too many values to unpack (expected %"PY_FORMAT_SIZE_T"d)", expected);
}

static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected) {
    if (unlikely(retval)) {
        Py_DECREF(retval);
        __Pyx_RaiseTooManyValuesError(expected);
        return -1;
    } else if (PyErr_Occurred()) {
        if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) {
            PyErr_Clear();
            return 0;
        } else {
            return -1;
        }
    }
    return 0;
}

static int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed,
    const char *name, int exact)
{
    if (!type) {
        PyErr_Format(PyExc_SystemError, "Missing type object");
        return 0;
    }
    if (none_allowed && obj == Py_None) return 1;
    else if (exact) {
        if (Py_TYPE(obj) == type) return 1;
    }
    else {
        if (PyObject_TypeCheck(obj, type)) return 1;
    }
    PyErr_Format(PyExc_TypeError,
        "Argument '%s' has incorrect type (expected %s, got %s)",
        name, type->tp_name, Py_TYPE(obj)->tp_name);
    return 0;
}

static CYTHON_INLINE void __Pyx_RaiseNoneIndexingError(void) {
    PyErr_SetString(PyExc_TypeError, "'NoneType' object is unsubscriptable");
}

static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) {
    if (unlikely(!type)) {
        PyErr_Format(PyExc_SystemError, "Missing type object");
        return 0;
    }
    if (likely(PyObject_TypeCheck(obj, type)))
        return 1;
    PyErr_Format(PyExc_TypeError, "Cannot convert %.200s to %.200s",
                 Py_TYPE(obj)->tp_name, type->tp_name);
    return 0;
}

static CYTHON_INLINE void __Pyx_RaiseNoneAttributeError(const char* attrname) {
    PyErr_Format(PyExc_AttributeError, "'NoneType' object has no attribute '%s'", attrname);
}

static CYTHON_INLINE void __Pyx_ExceptionSave(PyObject **type, PyObject **value, PyObject **tb) {
    PyThreadState *tstate = PyThreadState_GET();
    *type = tstate->exc_type;
    *value = tstate->exc_value;
    *tb = tstate->exc_traceback;
    Py_XINCREF(*type);
    Py_XINCREF(*value);
    Py_XINCREF(*tb);
}

static void __Pyx_ExceptionReset(PyObject *type, PyObject *value, PyObject *tb) {
    PyObject *tmp_type, *tmp_value, *tmp_tb;
    PyThreadState *tstate = PyThreadState_GET();
    tmp_type = tstate->exc_type;
    tmp_value = tstate->exc_value;
    tmp_tb = tstate->exc_traceback;
    tstate->exc_type = type;
    tstate->exc_value = value;
    tstate->exc_traceback = tb;
    Py_XDECREF(tmp_type);
    Py_XDECREF(tmp_value);
    Py_XDECREF(tmp_tb);
}

static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, long level) {
    PyObject *py_import = 0;
    PyObject *empty_list = 0;
    PyObject *module = 0;
    PyObject *global_dict = 0;
    PyObject *empty_dict = 0;
    PyObject *list;
    py_import = __Pyx_GetAttrString(__pyx_b, "__import__");
    if (!py_import)
        goto bad;
    if (from_list)
        list = from_list;
    else {
        empty_list = PyList_New(0);
        if (!empty_list)
            goto bad;
        list = empty_list;
    }
    global_dict = PyModule_GetDict(__pyx_m);
    if (!global_dict)
        goto bad;
    empty_dict = PyDict_New();
    if (!empty_dict)
        goto bad;
    #if PY_VERSION_HEX >= 0x02050000
    {
        PyObject *py_level = PyInt_FromLong(level);
        if (!py_level)
            goto bad;
        module = PyObject_CallFunctionObjArgs(py_import,
            name, global_dict, empty_dict, list, py_level, NULL);
        Py_DECREF(py_level);
    }
    #else
    if (level>0) {
        PyErr_SetString(PyExc_RuntimeError, "Relative import is not supported for Python <=2.4.");
        goto bad;
    }
    module = PyObject_CallFunctionObjArgs(py_import,
        name, global_dict, empty_dict, list, NULL);
    #endif
bad:
    Py_XDECREF(empty_list);
    Py_XDECREF(py_import);
    Py_XDECREF(empty_dict);
    return module;
}

static PyObject *__Pyx_FindPy2Metaclass(PyObject *bases) {
    PyObject *metaclass;
    /* Default metaclass */
#if PY_MAJOR_VERSION < 3
    if (PyTuple_Check(bases) && PyTuple_GET_SIZE(bases) > 0) {
        PyObject *base = PyTuple_GET_ITEM(bases, 0);
        metaclass = PyObject_GetAttrString(base, (char *)"__class__");
        if (!metaclass) {
            PyErr_Clear();
            metaclass = (PyObject*) Py_TYPE(base);
        }
    } else {
        metaclass = (PyObject *) &PyClass_Type;
    }
#else
    if (PyTuple_Check(bases) && PyTuple_GET_SIZE(bases) > 0) {
        PyObject *base = PyTuple_GET_ITEM(bases, 0);
        metaclass = (PyObject*) Py_TYPE(base);
    } else {
        metaclass = (PyObject *) &PyType_Type;
    }
#endif
    Py_INCREF(metaclass);
    return metaclass;
}

static PyObject *__Pyx_CreateClass(PyObject *bases, PyObject *dict, PyObject *name,
                                   PyObject *modname) {
    PyObject *result;
    PyObject *metaclass;

    if (PyDict_SetItemString(dict, "__module__", modname) < 0)
        return NULL;

    /* Python2 __metaclass__ */
    metaclass = PyDict_GetItemString(dict, "__metaclass__");
    if (metaclass) {
        Py_INCREF(metaclass);
    } else {
        metaclass = __Pyx_FindPy2Metaclass(bases);
    }
    result = PyObject_CallFunctionObjArgs(metaclass, name, bases, dict, NULL);
    Py_DECREF(metaclass);
    return result;
}


static PyObject *__pyx_binding_PyCFunctionType_NewEx(PyMethodDef *ml, PyObject *self, PyObject *module) {
    __pyx_binding_PyCFunctionType_object *op = PyObject_GC_New(__pyx_binding_PyCFunctionType_object, __pyx_binding_PyCFunctionType);
    if (op == NULL)
        return NULL;
    op->func.m_ml = ml;
    Py_XINCREF(self);
    op->func.m_self = self;
    Py_XINCREF(module);
    op->func.m_module = module;
    PyObject_GC_Track(op);
    return (PyObject *)op;
}

static void __pyx_binding_PyCFunctionType_dealloc(__pyx_binding_PyCFunctionType_object *m) {
    PyObject_GC_UnTrack(m);
    Py_XDECREF(m->func.m_self);
    Py_XDECREF(m->func.m_module);
    PyObject_GC_Del(m);
}

static PyObject *__pyx_binding_PyCFunctionType_descr_get(PyObject *func, PyObject *obj, PyObject *type) {
    if (obj == Py_None)
            obj = NULL;
    return PyMethod_New(func, obj, type);
}

static int __pyx_binding_PyCFunctionType_init(void) {
    __pyx_binding_PyCFunctionType_type = PyCFunction_Type;
    __pyx_binding_PyCFunctionType_type.tp_name = __Pyx_NAMESTR("cython_binding_builtin_function_or_method");
    __pyx_binding_PyCFunctionType_type.tp_dealloc = (destructor)__pyx_binding_PyCFunctionType_dealloc;
    __pyx_binding_PyCFunctionType_type.tp_descr_get = __pyx_binding_PyCFunctionType_descr_get;
    if (PyType_Ready(&__pyx_binding_PyCFunctionType_type) < 0) {
        return -1;
    }
    __pyx_binding_PyCFunctionType = &__pyx_binding_PyCFunctionType_type;
    return 0;

}

static CYTHON_INLINE int __Pyx_PyBytes_Equals(PyObject* s1, PyObject* s2, int equals) {
    if (s1 == s2) {   /* as done by PyObject_RichCompareBool(); also catches the (interned) empty string */
        return (equals == Py_EQ);
    } else if (PyBytes_CheckExact(s1) & PyBytes_CheckExact(s2)) {
        if (PyBytes_GET_SIZE(s1) != PyBytes_GET_SIZE(s2)) {
            return (equals == Py_NE);
        } else if (PyBytes_GET_SIZE(s1) == 1) {
            if (equals == Py_EQ)
                return (PyBytes_AS_STRING(s1)[0] == PyBytes_AS_STRING(s2)[0]);
            else
                return (PyBytes_AS_STRING(s1)[0] != PyBytes_AS_STRING(s2)[0]);
        } else {
            int result = memcmp(PyBytes_AS_STRING(s1), PyBytes_AS_STRING(s2), (size_t)PyBytes_GET_SIZE(s1));
            return (equals == Py_EQ) ? (result == 0) : (result != 0);
        }
    } else if ((s1 == Py_None) & PyBytes_CheckExact(s2)) {
        return (equals == Py_NE);
    } else if ((s2 == Py_None) & PyBytes_CheckExact(s1)) {
        return (equals == Py_NE);
    } else {
        int result;
        PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
        if (!py_result)
            return -1;
        result = __Pyx_PyObject_IsTrue(py_result);
        Py_DECREF(py_result);
        return result;
    }
}

static CYTHON_INLINE int __Pyx_PyUnicode_Equals(PyObject* s1, PyObject* s2, int equals) {
    if (s1 == s2) {   /* as done by PyObject_RichCompareBool(); also catches the (interned) empty string */
        return (equals == Py_EQ);
    } else if (PyUnicode_CheckExact(s1) & PyUnicode_CheckExact(s2)) {
        if (PyUnicode_GET_SIZE(s1) != PyUnicode_GET_SIZE(s2)) {
            return (equals == Py_NE);
        } else if (PyUnicode_GET_SIZE(s1) == 1) {
            if (equals == Py_EQ)
                return (PyUnicode_AS_UNICODE(s1)[0] == PyUnicode_AS_UNICODE(s2)[0]);
            else
                return (PyUnicode_AS_UNICODE(s1)[0] != PyUnicode_AS_UNICODE(s2)[0]);
        } else {
            int result = PyUnicode_Compare(s1, s2);
            if ((result == -1) && unlikely(PyErr_Occurred()))
                return -1;
            return (equals == Py_EQ) ? (result == 0) : (result != 0);
        }
    } else if ((s1 == Py_None) & PyUnicode_CheckExact(s2)) {
        return (equals == Py_NE);
    } else if ((s2 == Py_None) & PyUnicode_CheckExact(s1)) {
        return (equals == Py_NE);
    } else {
        int result;
        PyObject* py_result = PyObject_RichCompare(s1, s2, equals);
        if (!py_result)
            return -1;
        result = __Pyx_PyObject_IsTrue(py_result);
        Py_DECREF(py_result);
        return result;
    }
}

static CYTHON_INLINE unsigned char __Pyx_PyInt_AsUnsignedChar(PyObject* x) {
    const unsigned char neg_one = (unsigned char)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
    if (sizeof(unsigned char) < sizeof(long)) {
        long val = __Pyx_PyInt_AsLong(x);
        if (unlikely(val != (long)(unsigned char)val)) {
            if (!unlikely(val == -1 && PyErr_Occurred())) {
                PyErr_SetString(PyExc_OverflowError,
                    (is_unsigned && unlikely(val < 0)) ?
                    "can't convert negative value to unsigned char" :
                    "value too large to convert to unsigned char");
            }
            return (unsigned char)-1;
        }
        return (unsigned char)val;
    }
    return (unsigned char)__Pyx_PyInt_AsUnsignedLong(x);
}

static CYTHON_INLINE unsigned short __Pyx_PyInt_AsUnsignedShort(PyObject* x) {
    const unsigned short neg_one = (unsigned short)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
    if (sizeof(unsigned short) < sizeof(long)) {
        long val = __Pyx_PyInt_AsLong(x);
        if (unlikely(val != (long)(unsigned short)val)) {
            if (!unlikely(val == -1 && PyErr_Occurred())) {
                PyErr_SetString(PyExc_OverflowError,
                    (is_unsigned && unlikely(val < 0)) ?
                    "can't convert negative value to unsigned short" :
                    "value too large to convert to unsigned short");
            }
            return (unsigned short)-1;
        }
        return (unsigned short)val;
    }
    return (unsigned short)__Pyx_PyInt_AsUnsignedLong(x);
}

static CYTHON_INLINE unsigned int __Pyx_PyInt_AsUnsignedInt(PyObject* x) {
    const unsigned int neg_one = (unsigned int)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
    if (sizeof(unsigned int) < sizeof(long)) {
        long val = __Pyx_PyInt_AsLong(x);
        if (unlikely(val != (long)(unsigned int)val)) {
            if (!unlikely(val == -1 && PyErr_Occurred())) {
                PyErr_SetString(PyExc_OverflowError,
                    (is_unsigned && unlikely(val < 0)) ?
                    "can't convert negative value to unsigned int" :
                    "value too large to convert to unsigned int");
            }
            return (unsigned int)-1;
        }
        return (unsigned int)val;
    }
    return (unsigned int)__Pyx_PyInt_AsUnsignedLong(x);
}

static CYTHON_INLINE char __Pyx_PyInt_AsChar(PyObject* x) {
    const char neg_one = (char)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
    if (sizeof(char) < sizeof(long)) {
        long val = __Pyx_PyInt_AsLong(x);
        if (unlikely(val != (long)(char)val)) {
            if (!unlikely(val == -1 && PyErr_Occurred())) {
                PyErr_SetString(PyExc_OverflowError,
                    (is_unsigned && unlikely(val < 0)) ?
                    "can't convert negative value to char" :
                    "value too large to convert to char");
            }
            return (char)-1;
        }
        return (char)val;
    }
    return (char)__Pyx_PyInt_AsLong(x);
}

static CYTHON_INLINE short __Pyx_PyInt_AsShort(PyObject* x) {
    const short neg_one = (short)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
    if (sizeof(short) < sizeof(long)) {
        long val = __Pyx_PyInt_AsLong(x);
        if (unlikely(val != (long)(short)val)) {
            if (!unlikely(val == -1 && PyErr_Occurred())) {
                PyErr_SetString(PyExc_OverflowError,
                    (is_unsigned && unlikely(val < 0)) ?
                    "can't convert negative value to short" :
                    "value too large to convert to short");
            }
            return (short)-1;
        }
        return (short)val;
    }
    return (short)__Pyx_PyInt_AsLong(x);
}

static CYTHON_INLINE int __Pyx_PyInt_AsInt(PyObject* x) {
    const int neg_one = (int)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
    if (sizeof(int) < sizeof(long)) {
        long val = __Pyx_PyInt_AsLong(x);
        if (unlikely(val != (long)(int)val)) {
            if (!unlikely(val == -1 && PyErr_Occurred())) {
                PyErr_SetString(PyExc_OverflowError,
                    (is_unsigned && unlikely(val < 0)) ?
                    "can't convert negative value to int" :
                    "value too large to convert to int");
            }
            return (int)-1;
        }
        return (int)val;
    }
    return (int)__Pyx_PyInt_AsLong(x);
}

static CYTHON_INLINE signed char __Pyx_PyInt_AsSignedChar(PyObject* x) {
    const signed char neg_one = (signed char)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
    if (sizeof(signed char) < sizeof(long)) {
        long val = __Pyx_PyInt_AsLong(x);
        if (unlikely(val != (long)(signed char)val)) {
            if (!unlikely(val == -1 && PyErr_Occurred())) {
                PyErr_SetString(PyExc_OverflowError,
                    (is_unsigned && unlikely(val < 0)) ?
                    "can't convert negative value to signed char" :
                    "value too large to convert to signed char");
            }
            return (signed char)-1;
        }
        return (signed char)val;
    }
    return (signed char)__Pyx_PyInt_AsSignedLong(x);
}

static CYTHON_INLINE signed short __Pyx_PyInt_AsSignedShort(PyObject* x) {
    const signed short neg_one = (signed short)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
    if (sizeof(signed short) < sizeof(long)) {
        long val = __Pyx_PyInt_AsLong(x);
        if (unlikely(val != (long)(signed short)val)) {
            if (!unlikely(val == -1 && PyErr_Occurred())) {
                PyErr_SetString(PyExc_OverflowError,
                    (is_unsigned && unlikely(val < 0)) ?
                    "can't convert negative value to signed short" :
                    "value too large to convert to signed short");
            }
            return (signed short)-1;
        }
        return (signed short)val;
    }
    return (signed short)__Pyx_PyInt_AsSignedLong(x);
}

static CYTHON_INLINE signed int __Pyx_PyInt_AsSignedInt(PyObject* x) {
    const signed int neg_one = (signed int)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
    if (sizeof(signed int) < sizeof(long)) {
        long val = __Pyx_PyInt_AsLong(x);
        if (unlikely(val != (long)(signed int)val)) {
            if (!unlikely(val == -1 && PyErr_Occurred())) {
                PyErr_SetString(PyExc_OverflowError,
                    (is_unsigned && unlikely(val < 0)) ?
                    "can't convert negative value to signed int" :
                    "value too large to convert to signed int");
            }
            return (signed int)-1;
        }
        return (signed int)val;
    }
    return (signed int)__Pyx_PyInt_AsSignedLong(x);
}

static CYTHON_INLINE int __Pyx_PyInt_AsLongDouble(PyObject* x) {
    const int neg_one = (int)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
    if (sizeof(int) < sizeof(long)) {
        long val = __Pyx_PyInt_AsLong(x);
        if (unlikely(val != (long)(int)val)) {
            if (!unlikely(val == -1 && PyErr_Occurred())) {
                PyErr_SetString(PyExc_OverflowError,
                    (is_unsigned && unlikely(val < 0)) ?
                    "can't convert negative value to int" :
                    "value too large to convert to int");
            }
            return (int)-1;
        }
        return (int)val;
    }
    return (int)__Pyx_PyInt_AsLong(x);
}

static CYTHON_INLINE unsigned long __Pyx_PyInt_AsUnsignedLong(PyObject* x) {
    const unsigned long neg_one = (unsigned long)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_VERSION_HEX < 0x03000000
    if (likely(PyInt_Check(x))) {
        long val = PyInt_AS_LONG(x);
        if (is_unsigned && unlikely(val < 0)) {
            PyErr_SetString(PyExc_OverflowError,
                            "can't convert negative value to unsigned long");
            return (unsigned long)-1;
        }
        return (unsigned long)val;
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
            if (unlikely(Py_SIZE(x) < 0)) {
                PyErr_SetString(PyExc_OverflowError,
                                "can't convert negative value to unsigned long");
                return (unsigned long)-1;
            }
            return (unsigned long)PyLong_AsUnsignedLong(x);
        } else {
            return (unsigned long)PyLong_AsLong(x);
        }
    } else {
        unsigned long val;
        PyObject *tmp = __Pyx_PyNumber_Int(x);
        if (!tmp) return (unsigned long)-1;
        val = __Pyx_PyInt_AsUnsignedLong(tmp);
        Py_DECREF(tmp);
        return val;
    }
}

static CYTHON_INLINE unsigned PY_LONG_LONG __Pyx_PyInt_AsUnsignedLongLong(PyObject* x) {
    const unsigned PY_LONG_LONG neg_one = (unsigned PY_LONG_LONG)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_VERSION_HEX < 0x03000000
    if (likely(PyInt_Check(x))) {
        long val = PyInt_AS_LONG(x);
        if (is_unsigned && unlikely(val < 0)) {
            PyErr_SetString(PyExc_OverflowError,
                            "can't convert negative value to unsigned PY_LONG_LONG");
            return (unsigned PY_LONG_LONG)-1;
        }
        return (unsigned PY_LONG_LONG)val;
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
            if (unlikely(Py_SIZE(x) < 0)) {
                PyErr_SetString(PyExc_OverflowError,
                                "can't convert negative value to unsigned PY_LONG_LONG");
                return (unsigned PY_LONG_LONG)-1;
            }
            return (unsigned PY_LONG_LONG)PyLong_AsUnsignedLongLong(x);
        } else {
            return (unsigned PY_LONG_LONG)PyLong_AsLongLong(x);
        }
    } else {
        unsigned PY_LONG_LONG val;
        PyObject *tmp = __Pyx_PyNumber_Int(x);
        if (!tmp) return (unsigned PY_LONG_LONG)-1;
        val = __Pyx_PyInt_AsUnsignedLongLong(tmp);
        Py_DECREF(tmp);
        return val;
    }
}

static CYTHON_INLINE long __Pyx_PyInt_AsLong(PyObject* x) {
    const long neg_one = (long)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_VERSION_HEX < 0x03000000
    if (likely(PyInt_Check(x))) {
        long val = PyInt_AS_LONG(x);
        if (is_unsigned && unlikely(val < 0)) {
            PyErr_SetString(PyExc_OverflowError,
                            "can't convert negative value to long");
            return (long)-1;
        }
        return (long)val;
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
            if (unlikely(Py_SIZE(x) < 0)) {
                PyErr_SetString(PyExc_OverflowError,
                                "can't convert negative value to long");
                return (long)-1;
            }
            return (long)PyLong_AsUnsignedLong(x);
        } else {
            return (long)PyLong_AsLong(x);
        }
    } else {
        long val;
        PyObject *tmp = __Pyx_PyNumber_Int(x);
        if (!tmp) return (long)-1;
        val = __Pyx_PyInt_AsLong(tmp);
        Py_DECREF(tmp);
        return val;
    }
}

static CYTHON_INLINE PY_LONG_LONG __Pyx_PyInt_AsLongLong(PyObject* x) {
    const PY_LONG_LONG neg_one = (PY_LONG_LONG)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_VERSION_HEX < 0x03000000
    if (likely(PyInt_Check(x))) {
        long val = PyInt_AS_LONG(x);
        if (is_unsigned && unlikely(val < 0)) {
            PyErr_SetString(PyExc_OverflowError,
                            "can't convert negative value to PY_LONG_LONG");
            return (PY_LONG_LONG)-1;
        }
        return (PY_LONG_LONG)val;
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
            if (unlikely(Py_SIZE(x) < 0)) {
                PyErr_SetString(PyExc_OverflowError,
                                "can't convert negative value to PY_LONG_LONG");
                return (PY_LONG_LONG)-1;
            }
            return (PY_LONG_LONG)PyLong_AsUnsignedLongLong(x);
        } else {
            return (PY_LONG_LONG)PyLong_AsLongLong(x);
        }
    } else {
        PY_LONG_LONG val;
        PyObject *tmp = __Pyx_PyNumber_Int(x);
        if (!tmp) return (PY_LONG_LONG)-1;
        val = __Pyx_PyInt_AsLongLong(tmp);
        Py_DECREF(tmp);
        return val;
    }
}

static CYTHON_INLINE signed long __Pyx_PyInt_AsSignedLong(PyObject* x) {
    const signed long neg_one = (signed long)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_VERSION_HEX < 0x03000000
    if (likely(PyInt_Check(x))) {
        long val = PyInt_AS_LONG(x);
        if (is_unsigned && unlikely(val < 0)) {
            PyErr_SetString(PyExc_OverflowError,
                            "can't convert negative value to signed long");
            return (signed long)-1;
        }
        return (signed long)val;
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
            if (unlikely(Py_SIZE(x) < 0)) {
                PyErr_SetString(PyExc_OverflowError,
                                "can't convert negative value to signed long");
                return (signed long)-1;
            }
            return (signed long)PyLong_AsUnsignedLong(x);
        } else {
            return (signed long)PyLong_AsLong(x);
        }
    } else {
        signed long val;
        PyObject *tmp = __Pyx_PyNumber_Int(x);
        if (!tmp) return (signed long)-1;
        val = __Pyx_PyInt_AsSignedLong(tmp);
        Py_DECREF(tmp);
        return val;
    }
}

static CYTHON_INLINE signed PY_LONG_LONG __Pyx_PyInt_AsSignedLongLong(PyObject* x) {
    const signed PY_LONG_LONG neg_one = (signed PY_LONG_LONG)-1, const_zero = 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_VERSION_HEX < 0x03000000
    if (likely(PyInt_Check(x))) {
        long val = PyInt_AS_LONG(x);
        if (is_unsigned && unlikely(val < 0)) {
            PyErr_SetString(PyExc_OverflowError,
                            "can't convert negative value to signed PY_LONG_LONG");
            return (signed PY_LONG_LONG)-1;
        }
        return (signed PY_LONG_LONG)val;
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
            if (unlikely(Py_SIZE(x) < 0)) {
                PyErr_SetString(PyExc_OverflowError,
                                "can't convert negative value to signed PY_LONG_LONG");
                return (signed PY_LONG_LONG)-1;
            }
            return (signed PY_LONG_LONG)PyLong_AsUnsignedLongLong(x);
        } else {
            return (signed PY_LONG_LONG)PyLong_AsLongLong(x);
        }
    } else {
        signed PY_LONG_LONG val;
        PyObject *tmp = __Pyx_PyNumber_Int(x);
        if (!tmp) return (signed PY_LONG_LONG)-1;
        val = __Pyx_PyInt_AsSignedLongLong(tmp);
        Py_DECREF(tmp);
        return val;
    }
}

static int __Pyx_check_binary_version(void) {
    char ctversion[4], rtversion[4];
    PyOS_snprintf(ctversion, 4, "%d.%d", PY_MAJOR_VERSION, PY_MINOR_VERSION);
    PyOS_snprintf(rtversion, 4, "%s", Py_GetVersion());
    if (ctversion[0] != rtversion[0] || ctversion[2] != rtversion[2]) {
        char message[200];
        PyOS_snprintf(message, sizeof(message),
                      "compiletime version %s of module '%.100s' "
                      "does not match runtime version %s",
                      ctversion, __Pyx_MODULE_NAME, rtversion);
        #if PY_VERSION_HEX < 0x02050000
        return PyErr_Warn(NULL, message);
        #else
        return PyErr_WarnEx(NULL, message, 1);
        #endif
    }
    return 0;
}

static int __Pyx_ExportFunction(const char *name, void (*f)(void), const char *sig) {
    PyObject *d = 0;
    PyObject *cobj = 0;
    union {
        void (*fp)(void);
        void *p;
    } tmp;

    d = PyObject_GetAttrString(__pyx_m, (char *)"__pyx_capi__");
    if (!d) {
        PyErr_Clear();
        d = PyDict_New();
        if (!d)
            goto bad;
        Py_INCREF(d);
        if (PyModule_AddObject(__pyx_m, (char *)"__pyx_capi__", d) < 0)
            goto bad;
    }
    tmp.fp = f;
#if PY_VERSION_HEX >= 0x02070000 && !(PY_MAJOR_VERSION==3&&PY_MINOR_VERSION==0)
    cobj = PyCapsule_New(tmp.p, sig, 0);
#else
    cobj = PyCObject_FromVoidPtrAndDesc(tmp.p, (void *)sig, 0);
#endif
    if (!cobj)
        goto bad;
    if (PyDict_SetItemString(d, name, cobj) < 0)
        goto bad;
    Py_DECREF(cobj);
    Py_DECREF(d);
    return 0;
bad:
    Py_XDECREF(cobj);
    Py_XDECREF(d);
    return -1;
}

static int __Pyx_SetVtable(PyObject *dict, void *vtable) {
#if PY_VERSION_HEX >= 0x02070000 && !(PY_MAJOR_VERSION==3&&PY_MINOR_VERSION==0)
    PyObject *ob = PyCapsule_New(vtable, 0, 0);
#else
    PyObject *ob = PyCObject_FromVoidPtr(vtable, 0);
#endif
    if (!ob)
        goto bad;
    if (PyDict_SetItemString(dict, "__pyx_vtable__", ob) < 0)
        goto bad;
    Py_DECREF(ob);
    return 0;
bad:
    Py_XDECREF(ob);
    return -1;
}

#include "compile.h"
#include "frameobject.h"
#include "traceback.h"

static void __Pyx_AddTraceback(const char *funcname, int __pyx_clineno,
                               int __pyx_lineno, const char *__pyx_filename) {
    PyObject *py_srcfile = 0;
    PyObject *py_funcname = 0;
    PyObject *py_globals = 0;
    PyCodeObject *py_code = 0;
    PyFrameObject *py_frame = 0;

    #if PY_MAJOR_VERSION < 3
    py_srcfile = PyString_FromString(__pyx_filename);
    #else
    py_srcfile = PyUnicode_FromString(__pyx_filename);
    #endif
    if (!py_srcfile) goto bad;
    if (__pyx_clineno) {
        #if PY_MAJOR_VERSION < 3
        py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, __pyx_clineno);
        #else
        py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, __pyx_clineno);
        #endif
    }
    else {
        #if PY_MAJOR_VERSION < 3
        py_funcname = PyString_FromString(funcname);
        #else
        py_funcname = PyUnicode_FromString(funcname);
        #endif
    }
    if (!py_funcname) goto bad;
    py_globals = PyModule_GetDict(__pyx_m);
    if (!py_globals) goto bad;
    py_code = PyCode_New(
        0,            /*int argcount,*/
        #if PY_MAJOR_VERSION >= 3
        0,            /*int kwonlyargcount,*/
        #endif
        0,            /*int nlocals,*/
        0,            /*int stacksize,*/
        0,            /*int flags,*/
        __pyx_empty_bytes, /*PyObject *code,*/
        __pyx_empty_tuple,  /*PyObject *consts,*/
        __pyx_empty_tuple,  /*PyObject *names,*/
        __pyx_empty_tuple,  /*PyObject *varnames,*/
        __pyx_empty_tuple,  /*PyObject *freevars,*/
        __pyx_empty_tuple,  /*PyObject *cellvars,*/
        py_srcfile,   /*PyObject *filename,*/
        py_funcname,  /*PyObject *name,*/
        __pyx_lineno,   /*int firstlineno,*/
        __pyx_empty_bytes  /*PyObject *lnotab*/
    );
    if (!py_code) goto bad;
    py_frame = PyFrame_New(
        PyThreadState_GET(), /*PyThreadState *tstate,*/
        py_code,             /*PyCodeObject *code,*/
        py_globals,          /*PyObject *globals,*/
        0                    /*PyObject *locals*/
    );
    if (!py_frame) goto bad;
    py_frame->f_lineno = __pyx_lineno;
    PyTraceBack_Here(py_frame);
bad:
    Py_XDECREF(py_srcfile);
    Py_XDECREF(py_funcname);
    Py_XDECREF(py_code);
    Py_XDECREF(py_frame);
}

static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) {
    while (t->p) {
        #if PY_MAJOR_VERSION < 3
        if (t->is_unicode) {
            *t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL);
        } else if (t->intern) {
            *t->p = PyString_InternFromString(t->s);
        } else {
            *t->p = PyString_FromStringAndSize(t->s, t->n - 1);
        }
        #else  /* Python 3+ has unicode identifiers */
        if (t->is_unicode | t->is_str) {
            if (t->intern) {
                *t->p = PyUnicode_InternFromString(t->s);
            } else if (t->encoding) {
                *t->p = PyUnicode_Decode(t->s, t->n - 1, t->encoding, NULL);
            } else {
                *t->p = PyUnicode_FromStringAndSize(t->s, t->n - 1);
            }
        } else {
            *t->p = PyBytes_FromStringAndSize(t->s, t->n - 1);
        }
        #endif
        if (!*t->p)
            return -1;
        ++t;
    }
    return 0;
}

/* Type Conversion Functions */

static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) {
   int is_true = x == Py_True;
   if (is_true | (x == Py_False) | (x == Py_None)) return is_true;
   else return PyObject_IsTrue(x);
}

static CYTHON_INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x) {
  PyNumberMethods *m;
  const char *name = NULL;
  PyObject *res = NULL;
#if PY_VERSION_HEX < 0x03000000
  if (PyInt_Check(x) || PyLong_Check(x))
#else
  if (PyLong_Check(x))
#endif
    return Py_INCREF(x), x;
  m = Py_TYPE(x)->tp_as_number;
#if PY_VERSION_HEX < 0x03000000
  if (m && m->nb_int) {
    name = "int";
    res = PyNumber_Int(x);
  }
  else if (m && m->nb_long) {
    name = "long";
    res = PyNumber_Long(x);
  }
#else
  if (m && m->nb_int) {
    name = "int";
    res = PyNumber_Long(x);
  }
#endif
  if (res) {
#if PY_VERSION_HEX < 0x03000000
    if (!PyInt_Check(res) && !PyLong_Check(res)) {
#else
    if (!PyLong_Check(res)) {
#endif
      PyErr_Format(PyExc_TypeError,
                   "__%s__ returned non-%s (type %.200s)",
                   name, name, Py_TYPE(res)->tp_name);
      Py_DECREF(res);
      return NULL;
    }
  }
  else if (!PyErr_Occurred()) {
    PyErr_SetString(PyExc_TypeError,
                    "an integer is required");
  }
  return res;
}

static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) {
  Py_ssize_t ival;
  PyObject* x = PyNumber_Index(b);
  if (!x) return -1;
  ival = PyInt_AsSsize_t(x);
  Py_DECREF(x);
  return ival;
}

static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) {
#if PY_VERSION_HEX < 0x02050000
   if (ival <= LONG_MAX)
       return PyInt_FromLong((long)ival);
   else {
       unsigned char *bytes = (unsigned char *) &ival;
       int one = 1; int little = (int)*(unsigned char*)&one;
       return _PyLong_FromByteArray(bytes, sizeof(size_t), little, 0);
   }
#else
   return PyInt_FromSize_t(ival);
#endif
}

static CYTHON_INLINE size_t __Pyx_PyInt_AsSize_t(PyObject* x) {
   unsigned PY_LONG_LONG val = __Pyx_PyInt_AsUnsignedLongLong(x);
   if (unlikely(val == (unsigned PY_LONG_LONG)-1 && PyErr_Occurred())) {
       return (size_t)-1;
   } else if (unlikely(val != (unsigned PY_LONG_LONG)(size_t)val)) {
       PyErr_SetString(PyExc_OverflowError,
                       "value too large to convert to size_t");
       return (size_t)-1;
   }
   return (size_t)val;
}


#endif /* Py_PYTHON_H */
