/* Generated by Cython 0.23.4 */

/* BEGIN: Cython Metadata
{
    "distutils": {
        "depends": []
    }
}
END: Cython Metadata */

#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.
#elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03020000)
    #error Cython requires Python 2.6+ or Python 3.2+.
#else
#define CYTHON_ABI "0_23_4"
#include <stddef.h>
#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
#ifndef Py_HUGE_VAL
  #define Py_HUGE_VAL HUGE_VAL
#endif
#ifdef PYPY_VERSION
#define CYTHON_COMPILING_IN_PYPY 1
#define CYTHON_COMPILING_IN_CPYTHON 0
#else
#define CYTHON_COMPILING_IN_PYPY 0
#define CYTHON_COMPILING_IN_CPYTHON 1
#endif
#if !defined(CYTHON_USE_PYLONG_INTERNALS) && CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX >= 0x02070000
#define CYTHON_USE_PYLONG_INTERNALS 1
#endif
#if CYTHON_COMPILING_IN_PYPY && PY_VERSION_HEX < 0x02070600 && !defined(Py_OptimizeFlag)
#define Py_OptimizeFlag 0
#endif
#define __PYX_BUILD_PY_SSIZE_T "n"
#define CYTHON_FORMAT_SSIZE_T "z"
#if PY_MAJOR_VERSION < 3
  #define __Pyx_BUILTIN_MODULE_NAME "__builtin__"
  #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
          PyCode_New(a+k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
  #define __Pyx_DefaultClassType PyClass_Type
#else
  #define __Pyx_BUILTIN_MODULE_NAME "builtins"
  #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)\
          PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos)
  #define __Pyx_DefaultClassType PyType_Type
#endif
#ifndef Py_TPFLAGS_CHECKTYPES
  #define Py_TPFLAGS_CHECKTYPES 0
#endif
#ifndef Py_TPFLAGS_HAVE_INDEX
  #define Py_TPFLAGS_HAVE_INDEX 0
#endif
#ifndef Py_TPFLAGS_HAVE_NEWBUFFER
  #define Py_TPFLAGS_HAVE_NEWBUFFER 0
#endif
#ifndef Py_TPFLAGS_HAVE_FINALIZE
  #define Py_TPFLAGS_HAVE_FINALIZE 0
#endif
#if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND)
  #define CYTHON_PEP393_ENABLED 1
  #define __Pyx_PyUnicode_READY(op)       (likely(PyUnicode_IS_READY(op)) ?\
                                              0 : _PyUnicode_Ready((PyObject *)(op)))
  #define __Pyx_PyUnicode_GET_LENGTH(u)   PyUnicode_GET_LENGTH(u)
  #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i)
  #define __Pyx_PyUnicode_KIND(u)         PyUnicode_KIND(u)
  #define __Pyx_PyUnicode_DATA(u)         PyUnicode_DATA(u)
  #define __Pyx_PyUnicode_READ(k, d, i)   PyUnicode_READ(k, d, i)
#else
  #define CYTHON_PEP393_ENABLED 0
  #define __Pyx_PyUnicode_READY(op)       (0)
  #define __Pyx_PyUnicode_GET_LENGTH(u)   PyUnicode_GET_SIZE(u)
  #define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i]))
  #define __Pyx_PyUnicode_KIND(u)         (sizeof(Py_UNICODE))
  #define __Pyx_PyUnicode_DATA(u)         ((void*)PyUnicode_AS_UNICODE(u))
  #define __Pyx_PyUnicode_READ(k, d, i)   ((void)(k), (Py_UCS4)(((Py_UNICODE*)d)[i]))
#endif
#if CYTHON_COMPILING_IN_PYPY
  #define __Pyx_PyUnicode_Concat(a, b)      PyNumber_Add(a, b)
  #define __Pyx_PyUnicode_ConcatSafe(a, b)  PyNumber_Add(a, b)
#else
  #define __Pyx_PyUnicode_Concat(a, b)      PyUnicode_Concat(a, b)
  #define __Pyx_PyUnicode_ConcatSafe(a, b)  ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ?\
      PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b))
#endif
#if CYTHON_COMPILING_IN_PYPY && !defined(PyUnicode_Contains)
  #define PyUnicode_Contains(u, s)  PySequence_Contains(u, s)
#endif
#define __Pyx_PyString_FormatSafe(a, b)   ((unlikely((a) == Py_None)) ? PyNumber_Remainder(a, b) : __Pyx_PyString_Format(a, b))
#define __Pyx_PyUnicode_FormatSafe(a, b)  ((unlikely((a) == Py_None)) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b))
#if PY_MAJOR_VERSION >= 3
  #define __Pyx_PyString_Format(a, b)  PyUnicode_Format(a, b)
#else
  #define __Pyx_PyString_Format(a, b)  PyString_Format(a, b)
#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_MAJOR_VERSION >= 3
  #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj)
  #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj)
#else
  #define __Pyx_PyBaseString_Check(obj) (PyString_Check(obj) || PyUnicode_Check(obj))
  #define __Pyx_PyBaseString_CheckExact(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj))
#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
  #define PyNumber_Int                 PyNumber_Long
#endif
#if PY_MAJOR_VERSION >= 3
  #define PyBoolObject                 PyLongObject
#endif
#if PY_MAJOR_VERSION >= 3 && CYTHON_COMPILING_IN_PYPY
  #ifndef PyUnicode_InternFromString
    #define PyUnicode_InternFromString(s) PyUnicode_FromString(s)
  #endif
#endif
#if PY_VERSION_HEX < 0x030200A4
  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_PyMethod_New(func, self, klass) ((self) ? PyMethod_New(func, self) : PyInstanceMethod_New(func))
#else
  #define __Pyx_PyMethod_New(func, self, klass) PyMethod_New(func, self, klass)
#endif
#if PY_VERSION_HEX >= 0x030500B1
#define __Pyx_PyAsyncMethodsStruct PyAsyncMethods
#define __Pyx_PyType_AsAsync(obj) (Py_TYPE(obj)->tp_as_async)
#elif CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3
typedef struct {
    unaryfunc am_await;
    unaryfunc am_aiter;
    unaryfunc am_anext;
} __Pyx_PyAsyncMethodsStruct;
#define __Pyx_PyType_AsAsync(obj) ((__Pyx_PyAsyncMethodsStruct*) (Py_TYPE(obj)->tp_reserved))
#else
#define __Pyx_PyType_AsAsync(obj) NULL
#endif
#ifndef CYTHON_RESTRICT
  #if defined(__GNUC__)
    #define CYTHON_RESTRICT __restrict__
  #elif defined(_MSC_VER) && _MSC_VER >= 1400
    #define CYTHON_RESTRICT __restrict
  #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
    #define CYTHON_RESTRICT restrict
  #else
    #define CYTHON_RESTRICT
  #endif
#endif
#define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None)

#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

#if defined(WIN32) || defined(MS_WINDOWS)
  #define _USE_MATH_DEFINES
#endif
#include <math.h>
#ifdef NAN
#define __PYX_NAN() ((float) NAN)
#else
static CYTHON_INLINE float __PYX_NAN() {
  float value;
  memset(&value, 0xFF, sizeof(value));
  return value;
}
#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

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

#define __PYX_HAVE__pyrobuf_list
#define __PYX_HAVE_API__pyrobuf_list
#include "stdint.h"
#include "string.h"
#include "stdio.h"
#include "pythread.h"
#ifdef _OPENMP
#include <omp.h>
#endif /* _OPENMP */

#ifdef PYREX_WITHOUT_ASSERTIONS
#define CYTHON_WITHOUT_ASSERTIONS
#endif

#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) && !defined(_MSC_VER))
#   define CYTHON_UNUSED __attribute__ ((__unused__))
# else
#   define CYTHON_UNUSED
# endif
#endif
#ifndef CYTHON_NCP_UNUSED
# if CYTHON_COMPILING_IN_CPYTHON
#  define CYTHON_NCP_UNUSED
# else
#  define CYTHON_NCP_UNUSED CYTHON_UNUSED
# endif
#endif
typedef struct {PyObject **p; char *s; const Py_ssize_t n; const char* encoding;
                const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry;

#define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0
#define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT 0
#define __PYX_DEFAULT_STRING_ENCODING ""
#define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString
#define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
#define __Pyx_uchar_cast(c) ((unsigned char)c)
#define __Pyx_long_cast(x) ((long)x)
#define __Pyx_fits_Py_ssize_t(v, type, is_signed)  (\
    (sizeof(type) < sizeof(Py_ssize_t))  ||\
    (sizeof(type) > sizeof(Py_ssize_t) &&\
          likely(v < (type)PY_SSIZE_T_MAX ||\
                 v == (type)PY_SSIZE_T_MAX)  &&\
          (!is_signed || likely(v > (type)PY_SSIZE_T_MIN ||\
                                v == (type)PY_SSIZE_T_MIN)))  ||\
    (sizeof(type) == sizeof(Py_ssize_t) &&\
          (is_signed || likely(v < (type)PY_SSIZE_T_MAX ||\
                               v == (type)PY_SSIZE_T_MAX)))  )
#if defined (__cplusplus) && __cplusplus >= 201103L
    #include <cstdlib>
    #define __Pyx_sst_abs(value) std::abs(value)
#elif SIZEOF_INT >= SIZEOF_SIZE_T
    #define __Pyx_sst_abs(value) abs(value)
#elif SIZEOF_LONG >= SIZEOF_SIZE_T
    #define __Pyx_sst_abs(value) labs(value)
#elif defined (_MSC_VER) && defined (_M_X64)
    #define __Pyx_sst_abs(value) _abs64(value)
#elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
    #define __Pyx_sst_abs(value) llabs(value)
#elif defined (__GNUC__)
    #define __Pyx_sst_abs(value) __builtin_llabs(value)
#else
    #define __Pyx_sst_abs(value) ((value<0) ? -value : value)
#endif
static CYTHON_INLINE char* __Pyx_PyObject_AsString(PyObject*);
static CYTHON_INLINE char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length);
#define __Pyx_PyByteArray_FromString(s) PyByteArray_FromStringAndSize((const char*)s, strlen((const char*)s))
#define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l)
#define __Pyx_PyBytes_FromString        PyBytes_FromString
#define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize
static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*);
#if PY_MAJOR_VERSION < 3
    #define __Pyx_PyStr_FromString        __Pyx_PyBytes_FromString
    #define __Pyx_PyStr_FromStringAndSize __Pyx_PyBytes_FromStringAndSize
#else
    #define __Pyx_PyStr_FromString        __Pyx_PyUnicode_FromString
    #define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize
#endif
#define __Pyx_PyObject_AsSString(s)    ((signed char*) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_AsUString(s)    ((unsigned char*) __Pyx_PyObject_AsString(s))
#define __Pyx_PyObject_FromCString(s)  __Pyx_PyObject_FromString((const char*)s)
#define __Pyx_PyBytes_FromCString(s)   __Pyx_PyBytes_FromString((const char*)s)
#define __Pyx_PyByteArray_FromCString(s)   __Pyx_PyByteArray_FromString((const char*)s)
#define __Pyx_PyStr_FromCString(s)     __Pyx_PyStr_FromString((const char*)s)
#define __Pyx_PyUnicode_FromCString(s) __Pyx_PyUnicode_FromString((const char*)s)
#if PY_MAJOR_VERSION < 3
static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u)
{
    const Py_UNICODE *u_end = u;
    while (*u_end++) ;
    return (size_t)(u_end - u - 1);
}
#else
#define __Pyx_Py_UNICODE_strlen Py_UNICODE_strlen
#endif
#define __Pyx_PyUnicode_FromUnicode(u)       PyUnicode_FromUnicode(u, __Pyx_Py_UNICODE_strlen(u))
#define __Pyx_PyUnicode_FromUnicodeAndLength PyUnicode_FromUnicode
#define __Pyx_PyUnicode_AsUnicode            PyUnicode_AsUnicode
#define __Pyx_NewRef(obj) (Py_INCREF(obj), obj)
#define __Pyx_Owned_Py_None(b) __Pyx_NewRef(Py_None)
#define __Pyx_PyBool_FromLong(b) ((b) ? __Pyx_NewRef(Py_True) : __Pyx_NewRef(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);
#if CYTHON_COMPILING_IN_CPYTHON
#define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x))
#else
#define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x)
#endif
#define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x))
#if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
static int __Pyx_sys_getdefaultencoding_not_ascii;
static int __Pyx_init_sys_getdefaultencoding_params(void) {
    PyObject* sys;
    PyObject* default_encoding = NULL;
    PyObject* ascii_chars_u = NULL;
    PyObject* ascii_chars_b = NULL;
    const char* default_encoding_c;
    sys = PyImport_ImportModule("sys");
    if (!sys) goto bad;
    default_encoding = PyObject_CallMethod(sys, (char*) "getdefaultencoding", NULL);
    Py_DECREF(sys);
    if (!default_encoding) goto bad;
    default_encoding_c = PyBytes_AsString(default_encoding);
    if (!default_encoding_c) goto bad;
    if (strcmp(default_encoding_c, "ascii") == 0) {
        __Pyx_sys_getdefaultencoding_not_ascii = 0;
    } else {
        char ascii_chars[128];
        int c;
        for (c = 0; c < 128; c++) {
            ascii_chars[c] = c;
        }
        __Pyx_sys_getdefaultencoding_not_ascii = 1;
        ascii_chars_u = PyUnicode_DecodeASCII(ascii_chars, 128, NULL);
        if (!ascii_chars_u) goto bad;
        ascii_chars_b = PyUnicode_AsEncodedString(ascii_chars_u, default_encoding_c, NULL);
        if (!ascii_chars_b || !PyBytes_Check(ascii_chars_b) || memcmp(ascii_chars, PyBytes_AS_STRING(ascii_chars_b), 128) != 0) {
            PyErr_Format(
                PyExc_ValueError,
                "This module compiled with c_string_encoding=ascii, but default encoding '%.200s' is not a superset of ascii.",
                default_encoding_c);
            goto bad;
        }
        Py_DECREF(ascii_chars_u);
        Py_DECREF(ascii_chars_b);
    }
    Py_DECREF(default_encoding);
    return 0;
bad:
    Py_XDECREF(default_encoding);
    Py_XDECREF(ascii_chars_u);
    Py_XDECREF(ascii_chars_b);
    return -1;
}
#endif
#if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT && PY_MAJOR_VERSION >= 3
#define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL)
#else
#define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL)
#if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT
static char* __PYX_DEFAULT_STRING_ENCODING;
static int __Pyx_init_sys_getdefaultencoding_params(void) {
    PyObject* sys;
    PyObject* default_encoding = NULL;
    char* default_encoding_c;
    sys = PyImport_ImportModule("sys");
    if (!sys) goto bad;
    default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL);
    Py_DECREF(sys);
    if (!default_encoding) goto bad;
    default_encoding_c = PyBytes_AsString(default_encoding);
    if (!default_encoding_c) goto bad;
    __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c));
    if (!__PYX_DEFAULT_STRING_ENCODING) goto bad;
    strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c);
    Py_DECREF(default_encoding);
    return 0;
bad:
    Py_XDECREF(default_encoding);
    return -1;
}
#endif
#endif


/* Test for GCC > 2.95 */
#if defined(__GNUC__)     && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)))
  #define likely(x)   __builtin_expect(!!(x), 1)
  #define unlikely(x) __builtin_expect(!!(x), 0)
#else /* !__GNUC__ or GCC < 2.95 */
  #define likely(x)   (x)
  #define unlikely(x) (x)
#endif /* __GNUC__ */

static PyObject *__pyx_m;
static PyObject *__pyx_d;
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[] = {
  "pyrobuf/src/pyrobuf_list.pyx",
  "type.pxd",
  "bool.pxd",
  "complex.pxd",
};

/*--- Type declarations ---*/
struct __pyx_obj_12pyrobuf_list_NullListener;
struct __pyx_obj_12pyrobuf_list_TypedList;
struct __pyx_obj_12pyrobuf_list_BytesList;
struct __pyx_obj_12pyrobuf_list_StringList;
struct __pyx_obj_12pyrobuf_list_Int64List;
struct __pyx_obj_12pyrobuf_list_Uint64List;
struct __pyx_obj_12pyrobuf_list_CharList;
struct __pyx_obj_12pyrobuf_list_Int32List;
struct __pyx_obj_12pyrobuf_list_IntList;
struct __pyx_obj_12pyrobuf_list_DoubleList;
struct __pyx_obj_12pyrobuf_list_FloatList;
struct __pyx_obj_12pyrobuf_list_Uint32List;
struct __pyx_obj_12pyrobuf_list___pyx_scope_struct____iter__;
struct __pyx_obj_12pyrobuf_list___pyx_scope_struct_1___iter__;
struct __pyx_obj_12pyrobuf_list___pyx_scope_struct_2___iter__;
struct __pyx_obj_12pyrobuf_list___pyx_scope_struct_3___iter__;
struct __pyx_obj_12pyrobuf_list___pyx_scope_struct_4___iter__;
struct __pyx_obj_12pyrobuf_list___pyx_scope_struct_5___iter__;
struct __pyx_obj_12pyrobuf_list___pyx_scope_struct_6___iter__;
struct __pyx_obj_12pyrobuf_list___pyx_scope_struct_7___iter__;

/* "pyrobuf_list.pxd":6
 * 
 * 
 * cdef class NullListener:             # <<<<<<<<<<<<<<
 *     cpdef void _Modified(self)
 * 
 */
struct __pyx_obj_12pyrobuf_list_NullListener {
  PyObject_HEAD
  struct __pyx_vtabstruct_12pyrobuf_list_NullListener *__pyx_vtab;
};


/* "pyrobuf_list.pxd":12
 * 
 * 
 * cdef class TypedList(list):             # <<<<<<<<<<<<<<
 * 
 *     cdef type _list_type
 */
struct __pyx_obj_12pyrobuf_list_TypedList {
  PyListObject __pyx_base;
  PyTypeObject *_list_type;
  PyObject *_listener;
};


/* "pyrobuf_list.pxd":18
 * 
 * 
 * cdef class BytesList(list):             # <<<<<<<<<<<<<<
 * 
 *     cdef PyObject *_listener
 */
struct __pyx_obj_12pyrobuf_list_BytesList {
  PyListObject __pyx_base;
  PyObject *_listener;
};


/* "pyrobuf_list.pxd":23
 * 
 * 
 * cdef class StringList(list):             # <<<<<<<<<<<<<<
 * 
 *     cdef PyObject *_listener
 */
struct __pyx_obj_12pyrobuf_list_StringList {
  PyListObject __pyx_base;
  PyObject *_listener;
};


/* "pyrobuf_list.pxd":32
 * 
 * 
 * cdef class Int64List:             # <<<<<<<<<<<<<<
 * 
 *     cdef int64_t *_data
 */
struct __pyx_obj_12pyrobuf_list_Int64List {
  PyObject_HEAD
  struct __pyx_vtabstruct_12pyrobuf_list_Int64List *__pyx_vtab;
  int64_t *_data;
  size_t _n_items;
  size_t _size;
  PyObject *_listener;
  Py_ssize_t shape[1];
  Py_ssize_t strides[1];
};


/* "pyrobuf_list.pxd":52
 * 
 * 
 * cdef class Uint64List:             # <<<<<<<<<<<<<<
 * 
 *     cdef uint64_t *_data
 */
struct __pyx_obj_12pyrobuf_list_Uint64List {
  PyObject_HEAD
  struct __pyx_vtabstruct_12pyrobuf_list_Uint64List *__pyx_vtab;
  uint64_t *_data;
  size_t _n_items;
  size_t _size;
  PyObject *_listener;
  Py_ssize_t shape[1];
  Py_ssize_t strides[1];
};


/* "pyrobuf_list.pxd":72
 * 
 * 
 * cdef class CharList:             # <<<<<<<<<<<<<<
 * 
 *     cdef char *_data
 */
struct __pyx_obj_12pyrobuf_list_CharList {
  PyObject_HEAD
  struct __pyx_vtabstruct_12pyrobuf_list_CharList *__pyx_vtab;
  char *_data;
  size_t _n_items;
  size_t _size;
  PyObject *_listener;
  Py_ssize_t shape[1];
  Py_ssize_t strides[1];
};


/* "pyrobuf_list.pxd":92
 * 
 * 
 * cdef class Int32List:             # <<<<<<<<<<<<<<
 * 
 *     cdef int32_t *_data
 */
struct __pyx_obj_12pyrobuf_list_Int32List {
  PyObject_HEAD
  struct __pyx_vtabstruct_12pyrobuf_list_Int32List *__pyx_vtab;
  int32_t *_data;
  size_t _n_items;
  size_t _size;
  PyObject *_listener;
  Py_ssize_t shape[1];
  Py_ssize_t strides[1];
};


/* "pyrobuf_list.pxd":112
 * 
 * 
 * cdef class IntList:             # <<<<<<<<<<<<<<
 * 
 *     cdef int *_data
 */
struct __pyx_obj_12pyrobuf_list_IntList {
  PyObject_HEAD
  struct __pyx_vtabstruct_12pyrobuf_list_IntList *__pyx_vtab;
  int *_data;
  size_t _n_items;
  size_t _size;
  PyObject *_listener;
  Py_ssize_t shape[1];
  Py_ssize_t strides[1];
};


/* "pyrobuf_list.pxd":132
 * 
 * 
 * cdef class DoubleList:             # <<<<<<<<<<<<<<
 * 
 *     cdef double *_data
 */
struct __pyx_obj_12pyrobuf_list_DoubleList {
  PyObject_HEAD
  struct __pyx_vtabstruct_12pyrobuf_list_DoubleList *__pyx_vtab;
  double *_data;
  size_t _n_items;
  size_t _size;
  PyObject *_listener;
  Py_ssize_t shape[1];
  Py_ssize_t strides[1];
};


/* "pyrobuf_list.pxd":152
 * 
 * 
 * cdef class FloatList:             # <<<<<<<<<<<<<<
 * 
 *     cdef float *_data
 */
struct __pyx_obj_12pyrobuf_list_FloatList {
  PyObject_HEAD
  struct __pyx_vtabstruct_12pyrobuf_list_FloatList *__pyx_vtab;
  float *_data;
  size_t _n_items;
  size_t _size;
  PyObject *_listener;
  Py_ssize_t shape[1];
  Py_ssize_t strides[1];
};


/* "pyrobuf_list.pxd":172
 * 
 * 
 * cdef class Uint32List:             # <<<<<<<<<<<<<<
 * 
 *     cdef uint32_t *_data
 */
struct __pyx_obj_12pyrobuf_list_Uint32List {
  PyObject_HEAD
  struct __pyx_vtabstruct_12pyrobuf_list_Uint32List *__pyx_vtab;
  uint32_t *_data;
  size_t _n_items;
  size_t _size;
  PyObject *_listener;
  Py_ssize_t shape[1];
  Py_ssize_t strides[1];
};


/* "pyrobuf_list.pyx":331
 *         return self._data[i]
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         cdef size_t idx = 0
 *         while idx < self._n_items:
 */
struct __pyx_obj_12pyrobuf_list___pyx_scope_struct____iter__ {
  PyObject_HEAD
  size_t __pyx_v_idx;
  struct __pyx_obj_12pyrobuf_list_Int64List *__pyx_v_self;
};


/* "pyrobuf_list.pyx":533
 *         return self._data[i]
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         cdef size_t idx = 0
 *         while idx < self._n_items:
 */
struct __pyx_obj_12pyrobuf_list___pyx_scope_struct_1___iter__ {
  PyObject_HEAD
  size_t __pyx_v_idx;
  struct __pyx_obj_12pyrobuf_list_Uint64List *__pyx_v_self;
};


/* "pyrobuf_list.pyx":735
 *         return self._data[i]
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         cdef size_t idx = 0
 *         while idx < self._n_items:
 */
struct __pyx_obj_12pyrobuf_list___pyx_scope_struct_2___iter__ {
  PyObject_HEAD
  size_t __pyx_v_idx;
  struct __pyx_obj_12pyrobuf_list_CharList *__pyx_v_self;
};


/* "pyrobuf_list.pyx":937
 *         return self._data[i]
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         cdef size_t idx = 0
 *         while idx < self._n_items:
 */
struct __pyx_obj_12pyrobuf_list___pyx_scope_struct_3___iter__ {
  PyObject_HEAD
  size_t __pyx_v_idx;
  struct __pyx_obj_12pyrobuf_list_Int32List *__pyx_v_self;
};


/* "pyrobuf_list.pyx":1139
 *         return self._data[i]
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         cdef size_t idx = 0
 *         while idx < self._n_items:
 */
struct __pyx_obj_12pyrobuf_list___pyx_scope_struct_4___iter__ {
  PyObject_HEAD
  size_t __pyx_v_idx;
  struct __pyx_obj_12pyrobuf_list_IntList *__pyx_v_self;
};


/* "pyrobuf_list.pyx":1341
 *         return self._data[i]
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         cdef size_t idx = 0
 *         while idx < self._n_items:
 */
struct __pyx_obj_12pyrobuf_list___pyx_scope_struct_5___iter__ {
  PyObject_HEAD
  size_t __pyx_v_idx;
  struct __pyx_obj_12pyrobuf_list_DoubleList *__pyx_v_self;
};


/* "pyrobuf_list.pyx":1543
 *         return self._data[i]
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         cdef size_t idx = 0
 *         while idx < self._n_items:
 */
struct __pyx_obj_12pyrobuf_list___pyx_scope_struct_6___iter__ {
  PyObject_HEAD
  size_t __pyx_v_idx;
  struct __pyx_obj_12pyrobuf_list_FloatList *__pyx_v_self;
};


/* "pyrobuf_list.pyx":1745
 *         return self._data[i]
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         cdef size_t idx = 0
 *         while idx < self._n_items:
 */
struct __pyx_obj_12pyrobuf_list___pyx_scope_struct_7___iter__ {
  PyObject_HEAD
  size_t __pyx_v_idx;
  struct __pyx_obj_12pyrobuf_list_Uint32List *__pyx_v_self;
};



/* "pyrobuf_list.pyx":6
 * 
 * 
 * cdef class NullListener:             # <<<<<<<<<<<<<<
 *     property _is_present_in_parent:
 *         def __get__(self):
 */

struct __pyx_vtabstruct_12pyrobuf_list_NullListener {
  void (*_Modified)(struct __pyx_obj_12pyrobuf_list_NullListener *, int __pyx_skip_dispatch);
};
static struct __pyx_vtabstruct_12pyrobuf_list_NullListener *__pyx_vtabptr_12pyrobuf_list_NullListener;


/* "pyrobuf_list.pyx":281
 * 
 * 
 * cdef class Int64List:             # <<<<<<<<<<<<<<
 * 
 *     def __cinit__(self, size_t size=16, object listener=None):
 */

struct __pyx_vtabstruct_12pyrobuf_list_Int64List {
  void (*_append)(struct __pyx_obj_12pyrobuf_list_Int64List *, int64_t);
  PyObject *(*append)(struct __pyx_obj_12pyrobuf_list_Int64List *, int64_t, int __pyx_skip_dispatch);
  PyObject *(*extend)(struct __pyx_obj_12pyrobuf_list_Int64List *, struct __pyx_obj_12pyrobuf_list_Int64List *, int __pyx_skip_dispatch);
  PyObject *(*insert)(struct __pyx_obj_12pyrobuf_list_Int64List *, int, int64_t, int __pyx_skip_dispatch);
  PyObject *(*pop)(struct __pyx_obj_12pyrobuf_list_Int64List *, int __pyx_skip_dispatch);
  PyObject *(*remove)(struct __pyx_obj_12pyrobuf_list_Int64List *, int64_t, int __pyx_skip_dispatch);
};
static struct __pyx_vtabstruct_12pyrobuf_list_Int64List *__pyx_vtabptr_12pyrobuf_list_Int64List;


/* "pyrobuf_list.pyx":483
 * 
 * 
 * cdef class Uint64List:             # <<<<<<<<<<<<<<
 * 
 *     def __cinit__(self, size_t size=16, object listener=None):
 */

struct __pyx_vtabstruct_12pyrobuf_list_Uint64List {
  void (*_append)(struct __pyx_obj_12pyrobuf_list_Uint64List *, uint64_t);
  PyObject *(*append)(struct __pyx_obj_12pyrobuf_list_Uint64List *, uint64_t, int __pyx_skip_dispatch);
  PyObject *(*extend)(struct __pyx_obj_12pyrobuf_list_Uint64List *, struct __pyx_obj_12pyrobuf_list_Uint64List *, int __pyx_skip_dispatch);
  PyObject *(*insert)(struct __pyx_obj_12pyrobuf_list_Uint64List *, int, uint64_t, int __pyx_skip_dispatch);
  PyObject *(*pop)(struct __pyx_obj_12pyrobuf_list_Uint64List *, int __pyx_skip_dispatch);
  PyObject *(*remove)(struct __pyx_obj_12pyrobuf_list_Uint64List *, uint64_t, int __pyx_skip_dispatch);
};
static struct __pyx_vtabstruct_12pyrobuf_list_Uint64List *__pyx_vtabptr_12pyrobuf_list_Uint64List;


/* "pyrobuf_list.pyx":685
 * 
 * 
 * cdef class CharList:             # <<<<<<<<<<<<<<
 * 
 *     def __cinit__(self, size_t size=16, object listener=None):
 */

struct __pyx_vtabstruct_12pyrobuf_list_CharList {
  void (*_append)(struct __pyx_obj_12pyrobuf_list_CharList *, char);
  PyObject *(*append)(struct __pyx_obj_12pyrobuf_list_CharList *, char, int __pyx_skip_dispatch);
  PyObject *(*extend)(struct __pyx_obj_12pyrobuf_list_CharList *, struct __pyx_obj_12pyrobuf_list_CharList *, int __pyx_skip_dispatch);
  PyObject *(*insert)(struct __pyx_obj_12pyrobuf_list_CharList *, int, char, int __pyx_skip_dispatch);
  PyObject *(*pop)(struct __pyx_obj_12pyrobuf_list_CharList *, int __pyx_skip_dispatch);
  PyObject *(*remove)(struct __pyx_obj_12pyrobuf_list_CharList *, char, int __pyx_skip_dispatch);
};
static struct __pyx_vtabstruct_12pyrobuf_list_CharList *__pyx_vtabptr_12pyrobuf_list_CharList;


/* "pyrobuf_list.pyx":887
 * 
 * 
 * cdef class Int32List:             # <<<<<<<<<<<<<<
 * 
 *     def __cinit__(self, size_t size=16, object listener=None):
 */

struct __pyx_vtabstruct_12pyrobuf_list_Int32List {
  void (*_append)(struct __pyx_obj_12pyrobuf_list_Int32List *, int32_t);
  PyObject *(*append)(struct __pyx_obj_12pyrobuf_list_Int32List *, int32_t, int __pyx_skip_dispatch);
  PyObject *(*extend)(struct __pyx_obj_12pyrobuf_list_Int32List *, struct __pyx_obj_12pyrobuf_list_Int32List *, int __pyx_skip_dispatch);
  PyObject *(*insert)(struct __pyx_obj_12pyrobuf_list_Int32List *, int, int32_t, int __pyx_skip_dispatch);
  PyObject *(*pop)(struct __pyx_obj_12pyrobuf_list_Int32List *, int __pyx_skip_dispatch);
  PyObject *(*remove)(struct __pyx_obj_12pyrobuf_list_Int32List *, int32_t, int __pyx_skip_dispatch);
};
static struct __pyx_vtabstruct_12pyrobuf_list_Int32List *__pyx_vtabptr_12pyrobuf_list_Int32List;


/* "pyrobuf_list.pyx":1089
 * 
 * 
 * cdef class IntList:             # <<<<<<<<<<<<<<
 * 
 *     def __cinit__(self, size_t size=16, object listener=None):
 */

struct __pyx_vtabstruct_12pyrobuf_list_IntList {
  void (*_append)(struct __pyx_obj_12pyrobuf_list_IntList *, int);
  PyObject *(*append)(struct __pyx_obj_12pyrobuf_list_IntList *, int, int __pyx_skip_dispatch);
  PyObject *(*extend)(struct __pyx_obj_12pyrobuf_list_IntList *, struct __pyx_obj_12pyrobuf_list_IntList *, int __pyx_skip_dispatch);
  PyObject *(*insert)(struct __pyx_obj_12pyrobuf_list_IntList *, int, int, int __pyx_skip_dispatch);
  PyObject *(*pop)(struct __pyx_obj_12pyrobuf_list_IntList *, int __pyx_skip_dispatch);
  PyObject *(*remove)(struct __pyx_obj_12pyrobuf_list_IntList *, int, int __pyx_skip_dispatch);
};
static struct __pyx_vtabstruct_12pyrobuf_list_IntList *__pyx_vtabptr_12pyrobuf_list_IntList;


/* "pyrobuf_list.pyx":1291
 * 
 * 
 * cdef class DoubleList:             # <<<<<<<<<<<<<<
 * 
 *     def __cinit__(self, size_t size=16, object listener=None):
 */

struct __pyx_vtabstruct_12pyrobuf_list_DoubleList {
  void (*_append)(struct __pyx_obj_12pyrobuf_list_DoubleList *, double);
  PyObject *(*append)(struct __pyx_obj_12pyrobuf_list_DoubleList *, double, int __pyx_skip_dispatch);
  PyObject *(*extend)(struct __pyx_obj_12pyrobuf_list_DoubleList *, struct __pyx_obj_12pyrobuf_list_DoubleList *, int __pyx_skip_dispatch);
  PyObject *(*insert)(struct __pyx_obj_12pyrobuf_list_DoubleList *, int, double, int __pyx_skip_dispatch);
  PyObject *(*pop)(struct __pyx_obj_12pyrobuf_list_DoubleList *, int __pyx_skip_dispatch);
  PyObject *(*remove)(struct __pyx_obj_12pyrobuf_list_DoubleList *, double, int __pyx_skip_dispatch);
};
static struct __pyx_vtabstruct_12pyrobuf_list_DoubleList *__pyx_vtabptr_12pyrobuf_list_DoubleList;


/* "pyrobuf_list.pyx":1493
 * 
 * 
 * cdef class FloatList:             # <<<<<<<<<<<<<<
 * 
 *     def __cinit__(self, size_t size=16, object listener=None):
 */

struct __pyx_vtabstruct_12pyrobuf_list_FloatList {
  void (*_append)(struct __pyx_obj_12pyrobuf_list_FloatList *, float);
  PyObject *(*append)(struct __pyx_obj_12pyrobuf_list_FloatList *, float, int __pyx_skip_dispatch);
  PyObject *(*extend)(struct __pyx_obj_12pyrobuf_list_FloatList *, struct __pyx_obj_12pyrobuf_list_FloatList *, int __pyx_skip_dispatch);
  PyObject *(*insert)(struct __pyx_obj_12pyrobuf_list_FloatList *, int, float, int __pyx_skip_dispatch);
  PyObject *(*pop)(struct __pyx_obj_12pyrobuf_list_FloatList *, int __pyx_skip_dispatch);
  PyObject *(*remove)(struct __pyx_obj_12pyrobuf_list_FloatList *, float, int __pyx_skip_dispatch);
};
static struct __pyx_vtabstruct_12pyrobuf_list_FloatList *__pyx_vtabptr_12pyrobuf_list_FloatList;


/* "pyrobuf_list.pyx":1695
 * 
 * 
 * cdef class Uint32List:             # <<<<<<<<<<<<<<
 * 
 *     def __cinit__(self, size_t size=16, object listener=None):
 */

struct __pyx_vtabstruct_12pyrobuf_list_Uint32List {
  void (*_append)(struct __pyx_obj_12pyrobuf_list_Uint32List *, uint32_t);
  PyObject *(*append)(struct __pyx_obj_12pyrobuf_list_Uint32List *, uint32_t, int __pyx_skip_dispatch);
  PyObject *(*extend)(struct __pyx_obj_12pyrobuf_list_Uint32List *, struct __pyx_obj_12pyrobuf_list_Uint32List *, int __pyx_skip_dispatch);
  PyObject *(*insert)(struct __pyx_obj_12pyrobuf_list_Uint32List *, int, uint32_t, int __pyx_skip_dispatch);
  PyObject *(*pop)(struct __pyx_obj_12pyrobuf_list_Uint32List *, int __pyx_skip_dispatch);
  PyObject *(*remove)(struct __pyx_obj_12pyrobuf_list_Uint32List *, uint32_t, int __pyx_skip_dispatch);
};
static struct __pyx_vtabstruct_12pyrobuf_list_Uint32List *__pyx_vtabptr_12pyrobuf_list_Uint32List;

/* --- Runtime support code (head) --- */
#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);
  #define __Pyx_RefNannyDeclarations void *__pyx_refnanny = NULL;
#ifdef WITH_THREAD
  #define __Pyx_RefNannySetupContext(name, acquire_gil)\
          if (acquire_gil) {\
              PyGILState_STATE __pyx_gilstate_save = PyGILState_Ensure();\
              __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\
              PyGILState_Release(__pyx_gilstate_save);\
          } else {\
              __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__);\
          }
#else
  #define __Pyx_RefNannySetupContext(name, acquire_gil)\
          __pyx_refnanny = __Pyx_RefNanny->SetupContext((name), __LINE__, __FILE__)
#endif
  #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, acquire_gil)
  #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
#define __Pyx_XDECREF_SET(r, v) do {\
        PyObject *tmp = (PyObject *) r;\
        r = v; __Pyx_XDECREF(tmp);\
    } while (0)
#define __Pyx_DECREF_SET(r, v) do {\
        PyObject *tmp = (PyObject *) r;\
        r = v; __Pyx_DECREF(tmp);\
    } while (0)
#define __Pyx_CLEAR(r)    do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0)
#define __Pyx_XCLEAR(r)   do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0)

#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) {
    PyTypeObject* tp = Py_TYPE(obj);
    if (likely(tp->tp_getattro))
        return tp->tp_getattro(obj, attr_name);
#if PY_MAJOR_VERSION < 3
    if (likely(tp->tp_getattr))
        return tp->tp_getattr(obj, PyString_AS_STRING(attr_name));
#endif
    return PyObject_GetAttr(obj, attr_name);
}
#else
#define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n)
#endif

static PyObject *__Pyx_GetBuiltinName(PyObject *name);

#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw);
#else
#define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw)
#endif

#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg);
#endif

static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg);

#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func);
#else
#define __Pyx_PyObject_CallNoArg(func) __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL)
#endif

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

static void __Pyx_WriteUnraisable(const char *name, int clineno,
                                  int lineno, const char *filename,
                                  int full_traceback, int nogil);

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

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

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);

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

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

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

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

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

#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE int __Pyx_PyList_Append(PyObject* list, PyObject* x) {
    PyListObject* L = (PyListObject*) list;
    Py_ssize_t len = Py_SIZE(list);
    if (likely(L->allocated > len) & likely(len > (L->allocated >> 1))) {
        Py_INCREF(x);
        PyList_SET_ITEM(list, len, x);
        Py_SIZE(list) = len+1;
        return 0;
    }
    return PyList_Append(list, x);
}
#else
#define __Pyx_PyList_Append(L,x) PyList_Append(L,x)
#endif

static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg);

static CYTHON_INLINE int __Pyx_PyObject_Append(PyObject* L, PyObject* x);

#define __Pyx_GetItemInt(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
    (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
    __Pyx_GetItemInt_Fast(o, (Py_ssize_t)i, is_list, wraparound, boundscheck) :\
    (is_list ? (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL) :\
               __Pyx_GetItemInt_Generic(o, to_py_func(i))))
#define __Pyx_GetItemInt_List(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
    (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
    __Pyx_GetItemInt_List_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\
    (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL))
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
                                                              int wraparound, int boundscheck);
#define __Pyx_GetItemInt_Tuple(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck)\
    (__Pyx_fits_Py_ssize_t(i, type, is_signed) ?\
    __Pyx_GetItemInt_Tuple_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) :\
    (PyErr_SetString(PyExc_IndexError, "tuple index out of range"), (PyObject*)NULL))
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
                                                              int wraparound, int boundscheck);
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j);
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i,
                                                     int is_list, int wraparound, int boundscheck);

#include <string.h>

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

typedef struct {
    int code_line;
    PyCodeObject* code_object;
} __Pyx_CodeObjectCacheEntry;
struct __Pyx_CodeObjectCache {
    int count;
    int max_count;
    __Pyx_CodeObjectCacheEntry* entries;
};
static struct __Pyx_CodeObjectCache __pyx_code_cache = {0,0,NULL};
static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line);
static PyCodeObject *__pyx_find_code_object(int code_line);
static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object);

static void __Pyx_AddTraceback(const char *funcname, int c_line,
                               int py_line, const char *filename);

static CYTHON_INLINE size_t __Pyx_PyInt_As_size_t(PyObject *);

static CYTHON_INLINE int64_t __Pyx_PyInt_As_int64_t(PyObject *);

static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *);

static CYTHON_INLINE uint64_t __Pyx_PyInt_As_uint64_t(PyObject *);

static CYTHON_INLINE char __Pyx_PyInt_As_char(PyObject *);

static CYTHON_INLINE int32_t __Pyx_PyInt_As_int32_t(PyObject *);

static CYTHON_INLINE uint32_t __Pyx_PyInt_As_uint32_t(PyObject *);

static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value);

static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int64_t(int64_t value);

static CYTHON_INLINE PyObject* __Pyx_PyInt_From_uint64_t(uint64_t value);

static CYTHON_INLINE PyObject* __Pyx_PyInt_From_char(char value);

static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int32_t(int32_t value);

static CYTHON_INLINE PyObject* __Pyx_PyInt_From_uint32_t(uint32_t value);

static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value);

static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *);

static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type);

static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb);

typedef PyObject *(*__pyx_coroutine_body_t)(PyObject *, PyObject *);
typedef struct {
    PyObject_HEAD
    __pyx_coroutine_body_t body;
    PyObject *closure;
    PyObject *exc_type;
    PyObject *exc_value;
    PyObject *exc_traceback;
    PyObject *gi_weakreflist;
    PyObject *classobj;
    PyObject *yieldfrom;
    PyObject *gi_name;
    PyObject *gi_qualname;
    int resume_label;
    char is_running;
} __pyx_CoroutineObject;
static __pyx_CoroutineObject *__Pyx__Coroutine_New(PyTypeObject *type, __pyx_coroutine_body_t body,
                                                   PyObject *closure, PyObject *name, PyObject *qualname);
static int __Pyx_Coroutine_clear(PyObject *self);
#if 1 || PY_VERSION_HEX < 0x030300B0
static int __Pyx_PyGen_FetchStopIterationValue(PyObject **pvalue);
#else
#define __Pyx_PyGen_FetchStopIterationValue(pvalue) PyGen_FetchStopIterationValue(pvalue)
#endif

static PyObject* __Pyx_Coroutine_patch_module(PyObject* module, const char* py_code);

static int __Pyx_patch_abc(void);

#define __Pyx_Generator_USED
static PyTypeObject *__pyx_GeneratorType = 0;
#define __Pyx_Generator_CheckExact(obj) (Py_TYPE(obj) == __pyx_GeneratorType)
#define __Pyx_Generator_New(body, closure, name, qualname)\
    __Pyx__Coroutine_New(__pyx_GeneratorType, body, closure, name, qualname)
static PyObject *__Pyx_Generator_Next(PyObject *self);
static int __pyx_Generator_init(void);

static int __Pyx_check_binary_version(void);

#if CYTHON_COMPILING_IN_CPYTHON
#define __Pyx_PyObject_DelAttrStr(o,n) __Pyx_PyObject_SetAttrStr(o,n,NULL)
static CYTHON_INLINE int __Pyx_PyObject_SetAttrStr(PyObject* obj, PyObject* attr_name, PyObject* value) {
    PyTypeObject* tp = Py_TYPE(obj);
    if (likely(tp->tp_setattro))
        return tp->tp_setattro(obj, attr_name, value);
#if PY_MAJOR_VERSION < 3
    if (likely(tp->tp_setattr))
        return tp->tp_setattr(obj, PyString_AS_STRING(attr_name), value);
#endif
    return PyObject_SetAttr(obj, attr_name, value);
}
#else
#define __Pyx_PyObject_DelAttrStr(o,n)   PyObject_DelAttr(o,n)
#define __Pyx_PyObject_SetAttrStr(o,n,v) PyObject_SetAttr(o,n,v)
#endif

static int __Pyx_ExportVoidPtr(PyObject *name, void *p, const char *sig);

#if !defined(__Pyx_PyIdentifier_FromString)
#if PY_MAJOR_VERSION < 3
  #define __Pyx_PyIdentifier_FromString(s) PyString_FromString(s)
#else
  #define __Pyx_PyIdentifier_FromString(s) PyUnicode_FromString(s)
#endif
#endif

static PyObject *__Pyx_ImportModule(const char *name);

static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class_name, size_t size, int strict);

static int __Pyx_InitStrings(__Pyx_StringTabEntry *t);

static void __pyx_f_12pyrobuf_list_12NullListener__Modified(CYTHON_UNUSED struct __pyx_obj_12pyrobuf_list_NullListener *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_12pyrobuf_list_9Int64List_append(struct __pyx_obj_12pyrobuf_list_Int64List *__pyx_v_self, int64_t __pyx_v_x, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_12pyrobuf_list_9Int64List_extend(struct __pyx_obj_12pyrobuf_list_Int64List *__pyx_v_self, struct __pyx_obj_12pyrobuf_list_Int64List *__pyx_v_x, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_12pyrobuf_list_9Int64List_insert(struct __pyx_obj_12pyrobuf_list_Int64List *__pyx_v_self, int __pyx_v_i, int64_t __pyx_v_x, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_12pyrobuf_list_9Int64List_pop(struct __pyx_obj_12pyrobuf_list_Int64List *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_12pyrobuf_list_9Int64List_remove(struct __pyx_obj_12pyrobuf_list_Int64List *__pyx_v_self, int64_t __pyx_v_x, int __pyx_skip_dispatch); /* proto*/
static void __pyx_f_12pyrobuf_list_9Int64List__append(struct __pyx_obj_12pyrobuf_list_Int64List *__pyx_v_self, int64_t __pyx_v_x); /* proto*/
static PyObject *__pyx_f_12pyrobuf_list_10Uint64List_append(struct __pyx_obj_12pyrobuf_list_Uint64List *__pyx_v_self, uint64_t __pyx_v_x, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_12pyrobuf_list_10Uint64List_extend(struct __pyx_obj_12pyrobuf_list_Uint64List *__pyx_v_self, struct __pyx_obj_12pyrobuf_list_Uint64List *__pyx_v_x, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_12pyrobuf_list_10Uint64List_insert(struct __pyx_obj_12pyrobuf_list_Uint64List *__pyx_v_self, int __pyx_v_i, uint64_t __pyx_v_x, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_12pyrobuf_list_10Uint64List_pop(struct __pyx_obj_12pyrobuf_list_Uint64List *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_12pyrobuf_list_10Uint64List_remove(struct __pyx_obj_12pyrobuf_list_Uint64List *__pyx_v_self, uint64_t __pyx_v_x, int __pyx_skip_dispatch); /* proto*/
static void __pyx_f_12pyrobuf_list_10Uint64List__append(struct __pyx_obj_12pyrobuf_list_Uint64List *__pyx_v_self, uint64_t __pyx_v_x); /* proto*/
static PyObject *__pyx_f_12pyrobuf_list_8CharList_append(struct __pyx_obj_12pyrobuf_list_CharList *__pyx_v_self, char __pyx_v_x, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_12pyrobuf_list_8CharList_extend(struct __pyx_obj_12pyrobuf_list_CharList *__pyx_v_self, struct __pyx_obj_12pyrobuf_list_CharList *__pyx_v_x, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_12pyrobuf_list_8CharList_insert(struct __pyx_obj_12pyrobuf_list_CharList *__pyx_v_self, int __pyx_v_i, char __pyx_v_x, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_12pyrobuf_list_8CharList_pop(struct __pyx_obj_12pyrobuf_list_CharList *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_12pyrobuf_list_8CharList_remove(struct __pyx_obj_12pyrobuf_list_CharList *__pyx_v_self, char __pyx_v_x, int __pyx_skip_dispatch); /* proto*/
static void __pyx_f_12pyrobuf_list_8CharList__append(struct __pyx_obj_12pyrobuf_list_CharList *__pyx_v_self, char __pyx_v_x); /* proto*/
static PyObject *__pyx_f_12pyrobuf_list_9Int32List_append(struct __pyx_obj_12pyrobuf_list_Int32List *__pyx_v_self, int32_t __pyx_v_x, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_12pyrobuf_list_9Int32List_extend(struct __pyx_obj_12pyrobuf_list_Int32List *__pyx_v_self, struct __pyx_obj_12pyrobuf_list_Int32List *__pyx_v_x, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_12pyrobuf_list_9Int32List_insert(struct __pyx_obj_12pyrobuf_list_Int32List *__pyx_v_self, int __pyx_v_i, int32_t __pyx_v_x, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_12pyrobuf_list_9Int32List_pop(struct __pyx_obj_12pyrobuf_list_Int32List *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_12pyrobuf_list_9Int32List_remove(struct __pyx_obj_12pyrobuf_list_Int32List *__pyx_v_self, int32_t __pyx_v_x, int __pyx_skip_dispatch); /* proto*/
static void __pyx_f_12pyrobuf_list_9Int32List__append(struct __pyx_obj_12pyrobuf_list_Int32List *__pyx_v_self, int32_t __pyx_v_x); /* proto*/
static PyObject *__pyx_f_12pyrobuf_list_7IntList_append(struct __pyx_obj_12pyrobuf_list_IntList *__pyx_v_self, int __pyx_v_x, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_12pyrobuf_list_7IntList_extend(struct __pyx_obj_12pyrobuf_list_IntList *__pyx_v_self, struct __pyx_obj_12pyrobuf_list_IntList *__pyx_v_x, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_12pyrobuf_list_7IntList_insert(struct __pyx_obj_12pyrobuf_list_IntList *__pyx_v_self, int __pyx_v_i, int __pyx_v_x, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_12pyrobuf_list_7IntList_pop(struct __pyx_obj_12pyrobuf_list_IntList *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_12pyrobuf_list_7IntList_remove(struct __pyx_obj_12pyrobuf_list_IntList *__pyx_v_self, int __pyx_v_x, int __pyx_skip_dispatch); /* proto*/
static void __pyx_f_12pyrobuf_list_7IntList__append(struct __pyx_obj_12pyrobuf_list_IntList *__pyx_v_self, int __pyx_v_x); /* proto*/
static PyObject *__pyx_f_12pyrobuf_list_10DoubleList_append(struct __pyx_obj_12pyrobuf_list_DoubleList *__pyx_v_self, double __pyx_v_x, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_12pyrobuf_list_10DoubleList_extend(struct __pyx_obj_12pyrobuf_list_DoubleList *__pyx_v_self, struct __pyx_obj_12pyrobuf_list_DoubleList *__pyx_v_x, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_12pyrobuf_list_10DoubleList_insert(struct __pyx_obj_12pyrobuf_list_DoubleList *__pyx_v_self, int __pyx_v_i, double __pyx_v_x, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_12pyrobuf_list_10DoubleList_pop(struct __pyx_obj_12pyrobuf_list_DoubleList *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_12pyrobuf_list_10DoubleList_remove(struct __pyx_obj_12pyrobuf_list_DoubleList *__pyx_v_self, double __pyx_v_x, int __pyx_skip_dispatch); /* proto*/
static void __pyx_f_12pyrobuf_list_10DoubleList__append(struct __pyx_obj_12pyrobuf_list_DoubleList *__pyx_v_self, double __pyx_v_x); /* proto*/
static PyObject *__pyx_f_12pyrobuf_list_9FloatList_append(struct __pyx_obj_12pyrobuf_list_FloatList *__pyx_v_self, float __pyx_v_x, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_12pyrobuf_list_9FloatList_extend(struct __pyx_obj_12pyrobuf_list_FloatList *__pyx_v_self, struct __pyx_obj_12pyrobuf_list_FloatList *__pyx_v_x, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_12pyrobuf_list_9FloatList_insert(struct __pyx_obj_12pyrobuf_list_FloatList *__pyx_v_self, int __pyx_v_i, float __pyx_v_x, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_12pyrobuf_list_9FloatList_pop(struct __pyx_obj_12pyrobuf_list_FloatList *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_12pyrobuf_list_9FloatList_remove(struct __pyx_obj_12pyrobuf_list_FloatList *__pyx_v_self, float __pyx_v_x, int __pyx_skip_dispatch); /* proto*/
static void __pyx_f_12pyrobuf_list_9FloatList__append(struct __pyx_obj_12pyrobuf_list_FloatList *__pyx_v_self, float __pyx_v_x); /* proto*/
static PyObject *__pyx_f_12pyrobuf_list_10Uint32List_append(struct __pyx_obj_12pyrobuf_list_Uint32List *__pyx_v_self, uint32_t __pyx_v_x, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_12pyrobuf_list_10Uint32List_extend(struct __pyx_obj_12pyrobuf_list_Uint32List *__pyx_v_self, struct __pyx_obj_12pyrobuf_list_Uint32List *__pyx_v_x, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_12pyrobuf_list_10Uint32List_insert(struct __pyx_obj_12pyrobuf_list_Uint32List *__pyx_v_self, int __pyx_v_i, uint32_t __pyx_v_x, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_12pyrobuf_list_10Uint32List_pop(struct __pyx_obj_12pyrobuf_list_Uint32List *__pyx_v_self, int __pyx_skip_dispatch); /* proto*/
static PyObject *__pyx_f_12pyrobuf_list_10Uint32List_remove(struct __pyx_obj_12pyrobuf_list_Uint32List *__pyx_v_self, uint32_t __pyx_v_x, int __pyx_skip_dispatch); /* proto*/
static void __pyx_f_12pyrobuf_list_10Uint32List__append(struct __pyx_obj_12pyrobuf_list_Uint32List *__pyx_v_self, uint32_t __pyx_v_x); /* proto*/

/* Module declarations from 'libc.stdint' */

/* Module declarations from 'libc.string' */

/* Module declarations from 'libc.stdio' */

/* Module declarations from '__builtin__' */

/* Module declarations from 'cpython.type' */
static PyTypeObject *__pyx_ptype_7cpython_4type_type = 0;

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

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

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

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

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

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

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

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

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

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

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

/* Module declarations from '__builtin__' */

/* Module declarations from 'cpython.bool' */
static PyTypeObject *__pyx_ptype_7cpython_4bool_bool = 0;

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

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

/* Module declarations from '__builtin__' */

/* Module declarations from 'cpython.complex' */
static PyTypeObject *__pyx_ptype_7cpython_7complex_complex = 0;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

/* Module declarations from 'cpython' */

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

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

/* Module declarations from 'pyrobuf_list' */
static PyTypeObject *__pyx_ptype_12pyrobuf_list_NullListener = 0;
static PyTypeObject *__pyx_ptype_12pyrobuf_list_TypedList = 0;
static PyTypeObject *__pyx_ptype_12pyrobuf_list_BytesList = 0;
static PyTypeObject *__pyx_ptype_12pyrobuf_list_StringList = 0;
static PyTypeObject *__pyx_ptype_12pyrobuf_list_Int64List = 0;
static PyTypeObject *__pyx_ptype_12pyrobuf_list_Uint64List = 0;
static PyTypeObject *__pyx_ptype_12pyrobuf_list_CharList = 0;
static PyTypeObject *__pyx_ptype_12pyrobuf_list_Int32List = 0;
static PyTypeObject *__pyx_ptype_12pyrobuf_list_IntList = 0;
static PyTypeObject *__pyx_ptype_12pyrobuf_list_DoubleList = 0;
static PyTypeObject *__pyx_ptype_12pyrobuf_list_FloatList = 0;
static PyTypeObject *__pyx_ptype_12pyrobuf_list_Uint32List = 0;
static PyTypeObject *__pyx_ptype_12pyrobuf_list___pyx_scope_struct____iter__ = 0;
static PyTypeObject *__pyx_ptype_12pyrobuf_list___pyx_scope_struct_1___iter__ = 0;
static PyTypeObject *__pyx_ptype_12pyrobuf_list___pyx_scope_struct_2___iter__ = 0;
static PyTypeObject *__pyx_ptype_12pyrobuf_list___pyx_scope_struct_3___iter__ = 0;
static PyTypeObject *__pyx_ptype_12pyrobuf_list___pyx_scope_struct_4___iter__ = 0;
static PyTypeObject *__pyx_ptype_12pyrobuf_list___pyx_scope_struct_5___iter__ = 0;
static PyTypeObject *__pyx_ptype_12pyrobuf_list___pyx_scope_struct_6___iter__ = 0;
static PyTypeObject *__pyx_ptype_12pyrobuf_list___pyx_scope_struct_7___iter__ = 0;
__PYX_EXTERN_C DL_EXPORT(struct __pyx_obj_12pyrobuf_list_NullListener) *null_listener;
#define __Pyx_MODULE_NAME "pyrobuf_list"
int __pyx_module_is_main_pyrobuf_list = 0;

/* Implementation of 'pyrobuf_list' */
static PyObject *__pyx_builtin_AssertionError;
static PyObject *__pyx_builtin_Exception;
static PyObject *__pyx_builtin_super;
static PyObject *__pyx_builtin_TypeError;
static PyObject *__pyx_builtin_MemoryError;
static PyObject *__pyx_builtin_range;
static PyObject *__pyx_builtin_IndexError;
static PyObject *__pyx_builtin_ValueError;
static char __pyx_k_I[] = "I";
static char __pyx_k_K[] = "K";
static char __pyx_k_L[] = "L";
static char __pyx_k_c[] = "c";
static char __pyx_k_d[] = "d";
static char __pyx_k_f[] = "f";
static char __pyx_k_i[] = "i";
static char __pyx_k_x[] = "x";
static char __pyx_k_pop[] = "pop";
static char __pyx_k_args[] = "args";
static char __pyx_k_iter[] = "__iter__";
static char __pyx_k_main[] = "__main__";
static char __pyx_k_name[] = "__name__";
static char __pyx_k_send[] = "send";
static char __pyx_k_size[] = "size";
static char __pyx_k_test[] = "__test__";
static char __pyx_k_close[] = "close";
static char __pyx_k_range[] = "range";
static char __pyx_k_super[] = "super";
static char __pyx_k_throw[] = "throw";
static char __pyx_k_utf_8[] = "utf-8";
static char __pyx_k_append[] = "append";
static char __pyx_k_decode[] = "decode";
static char __pyx_k_extend[] = "extend";
static char __pyx_k_insert[] = "insert";
static char __pyx_k_remove[] = "remove";
static char __pyx_k_setitem[] = "__setitem__";
static char __pyx_k_Modified[] = "_Modified";
static char __pyx_k_listener[] = "listener";
static char __pyx_k_pyx_capi[] = "__pyx_capi__";
static char __pyx_k_setslice[] = "__setslice__";
static char __pyx_k_Exception[] = "Exception";
static char __pyx_k_TypeError[] = "TypeError";
static char __pyx_k_list_type[] = "list_type";
static char __pyx_k_IndexError[] = "IndexError";
static char __pyx_k_ValueError[] = "ValueError";
static char __pyx_k_pyx_vtable[] = "__pyx_vtable__";
static char __pyx_k_MemoryError[] = "MemoryError";
static char __pyx_k_null_listener[] = "null_listener";
static char __pyx_k_type_mismatch[] = "type mismatch";
static char __pyx_k_x_not_in_list[] = "x not in list";
static char __pyx_k_AssertionError[] = "AssertionError";
static char __pyx_k_IntList___iter[] = "IntList.__iter__";
static char __pyx_k_CharList___iter[] = "CharList.__iter__";
static char __pyx_k_FloatList___iter[] = "FloatList.__iter__";
static char __pyx_k_Int32List___iter[] = "Int32List.__iter__";
static char __pyx_k_Int64List___iter[] = "Int64List.__iter__";
static char __pyx_k_DoubleList___iter[] = "DoubleList.__iter__";
static char __pyx_k_Uint32List___iter[] = "Uint32List.__iter__";
static char __pyx_k_Uint64List___iter[] = "Uint64List.__iter__";
static char __pyx_k_pop_from_empty_list[] = "pop from empty list";
static char __pyx_k_is_present_in_parent[] = "_is_present_in_parent";
static char __pyx_k_list_index_out_of_range[] = "list index out of range";
static char __pyx_k_r_has_type_s_but_expected_one_o[] = "%r has type %s, but expected one of: (%s,)";
static char __pyx_k_list_indices_must_be_integers_no[] = "list indices must be integers, not %s";
static char __pyx_k_r_has_type_s_but_expected_one_o_2[] = "%r has type %s, but expected one of: (%s, %s)";
static PyObject *__pyx_n_s_AssertionError;
static PyObject *__pyx_n_s_CharList___iter;
static PyObject *__pyx_n_s_DoubleList___iter;
static PyObject *__pyx_n_s_Exception;
static PyObject *__pyx_n_s_FloatList___iter;
static PyObject *__pyx_n_s_IndexError;
static PyObject *__pyx_n_s_Int32List___iter;
static PyObject *__pyx_n_s_Int64List___iter;
static PyObject *__pyx_n_s_IntList___iter;
static PyObject *__pyx_n_s_MemoryError;
static PyObject *__pyx_n_s_Modified;
static PyObject *__pyx_n_s_TypeError;
static PyObject *__pyx_n_s_Uint32List___iter;
static PyObject *__pyx_n_s_Uint64List___iter;
static PyObject *__pyx_n_s_ValueError;
static PyObject *__pyx_n_s_append;
static PyObject *__pyx_n_s_args;
static PyObject *__pyx_n_s_close;
static PyObject *__pyx_n_s_decode;
static PyObject *__pyx_n_s_extend;
static PyObject *__pyx_n_s_i;
static PyObject *__pyx_n_s_insert;
static PyObject *__pyx_n_s_is_present_in_parent;
static PyObject *__pyx_n_s_iter;
static PyObject *__pyx_kp_s_list_index_out_of_range;
static PyObject *__pyx_kp_s_list_indices_must_be_integers_no;
static PyObject *__pyx_n_s_list_type;
static PyObject *__pyx_n_s_listener;
static PyObject *__pyx_n_s_main;
static PyObject *__pyx_n_s_name;
static PyObject *__pyx_n_s_null_listener;
static PyObject *__pyx_n_s_pop;
static PyObject *__pyx_kp_s_pop_from_empty_list;
static PyObject *__pyx_n_s_pyx_capi;
static PyObject *__pyx_n_s_pyx_vtable;
static PyObject *__pyx_kp_s_r_has_type_s_but_expected_one_o;
static PyObject *__pyx_kp_s_r_has_type_s_but_expected_one_o_2;
static PyObject *__pyx_n_s_range;
static PyObject *__pyx_n_s_remove;
static PyObject *__pyx_n_s_send;
static PyObject *__pyx_n_s_setitem;
static PyObject *__pyx_n_s_setslice;
static PyObject *__pyx_n_s_size;
static PyObject *__pyx_n_s_super;
static PyObject *__pyx_n_s_test;
static PyObject *__pyx_n_s_throw;
static PyObject *__pyx_kp_s_type_mismatch;
static PyObject *__pyx_kp_s_utf_8;
static PyObject *__pyx_n_s_x;
static PyObject *__pyx_kp_s_x_not_in_list;
static PyObject *__pyx_pf_12pyrobuf_list_12NullListener_21_is_present_in_parent___get__(CYTHON_UNUSED struct __pyx_obj_12pyrobuf_list_NullListener *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrobuf_list_12NullListener__Modified(struct __pyx_obj_12pyrobuf_list_NullListener *__pyx_v_self); /* proto */
static int __pyx_pf_12pyrobuf_list_9TypedList___init__(struct __pyx_obj_12pyrobuf_list_TypedList *__pyx_v_self, PyTypeObject *__pyx_v_list_type, PyObject *__pyx_v_listener); /* proto */
static PyObject *__pyx_pf_12pyrobuf_list_9TypedList_9list_type___get__(struct __pyx_obj_12pyrobuf_list_TypedList *__pyx_v_self); /* proto */
static int __pyx_pf_12pyrobuf_list_9TypedList_2__setitem__(struct __pyx_obj_12pyrobuf_list_TypedList *__pyx_v_self, PyObject *__pyx_v_i, PyObject *__pyx_v_x); /* proto */
static int __pyx_pf_12pyrobuf_list_9TypedList_4__setslice__(struct __pyx_obj_12pyrobuf_list_TypedList *__pyx_v_self, PyObject *__pyx_v_i, PyObject *__pyx_v_j, PyObject *__pyx_v_x); /* proto */
static PyObject *__pyx_pf_12pyrobuf_list_9TypedList_6add(struct __pyx_obj_12pyrobuf_list_TypedList *__pyx_v_self, PyObject *__pyx_v_kwargs); /* proto */
static PyObject *__pyx_pf_12pyrobuf_list_9TypedList_8append(struct __pyx_obj_12pyrobuf_list_TypedList *__pyx_v_self, PyObject *__pyx_v_x); /* proto */
static PyObject *__pyx_pf_12pyrobuf_list_9TypedList_10extend(struct __pyx_obj_12pyrobuf_list_TypedList *__pyx_v_self, PyObject *__pyx_v_x); /* proto */
static PyObject *__pyx_pf_12pyrobuf_list_9TypedList_12insert(struct __pyx_obj_12pyrobuf_list_TypedList *__pyx_v_self, PyObject *__pyx_v_i, PyObject *__pyx_v_x); /* proto */
static int __pyx_pf_12pyrobuf_list_9BytesList___init__(struct __pyx_obj_12pyrobuf_list_BytesList *__pyx_v_self, PyObject *__pyx_v_listener); /* proto */
static int __pyx_pf_12pyrobuf_list_9BytesList_2__setitem__(struct __pyx_obj_12pyrobuf_list_BytesList *__pyx_v_self, PyObject *__pyx_v_i, PyObject *__pyx_v_x); /* proto */
static int __pyx_pf_12pyrobuf_list_9BytesList_4__setslice__(struct __pyx_obj_12pyrobuf_list_BytesList *__pyx_v_self, PyObject *__pyx_v_i, PyObject *__pyx_v_j, PyObject *__pyx_v_x); /* proto */
static PyObject *__pyx_pf_12pyrobuf_list_9BytesList_6append(struct __pyx_obj_12pyrobuf_list_BytesList *__pyx_v_self, PyObject *__pyx_v_x); /* proto */
static PyObject *__pyx_pf_12pyrobuf_list_9BytesList_8extend(struct __pyx_obj_12pyrobuf_list_BytesList *__pyx_v_self, PyObject *__pyx_v_x); /* proto */
static PyObject *__pyx_pf_12pyrobuf_list_9BytesList_10insert(struct __pyx_obj_12pyrobuf_list_BytesList *__pyx_v_self, PyObject *__pyx_v_i, PyObject *__pyx_v_x); /* proto */
static int __pyx_pf_12pyrobuf_list_10StringList___init__(struct __pyx_obj_12pyrobuf_list_StringList *__pyx_v_self, PyObject *__pyx_v_listener); /* proto */
static int __pyx_pf_12pyrobuf_list_10StringList_2__setitem__(struct __pyx_obj_12pyrobuf_list_StringList *__pyx_v_self, PyObject *__pyx_v_i, PyObject *__pyx_v_x); /* proto */
static int __pyx_pf_12pyrobuf_list_10StringList_4__setslice__(struct __pyx_obj_12pyrobuf_list_StringList *__pyx_v_self, PyObject *__pyx_v_i, PyObject *__pyx_v_j, PyObject *__pyx_v_x); /* proto */
static PyObject *__pyx_pf_12pyrobuf_list_10StringList_6append(struct __pyx_obj_12pyrobuf_list_StringList *__pyx_v_self, PyObject *__pyx_v_x); /* proto */
static PyObject *__pyx_pf_12pyrobuf_list_10StringList_8extend(struct __pyx_obj_12pyrobuf_list_StringList *__pyx_v_self, PyObject *__pyx_v_x); /* proto */
static PyObject *__pyx_pf_12pyrobuf_list_10StringList_10insert(struct __pyx_obj_12pyrobuf_list_StringList *__pyx_v_self, PyObject *__pyx_v_i, PyObject *__pyx_v_x); /* proto */
static int __pyx_pf_12pyrobuf_list_9Int64List___cinit__(struct __pyx_obj_12pyrobuf_list_Int64List *__pyx_v_self, size_t __pyx_v_size, PyObject *__pyx_v_listener); /* proto */
static void __pyx_pf_12pyrobuf_list_9Int64List_2__dealloc__(struct __pyx_obj_12pyrobuf_list_Int64List *__pyx_v_self); /* proto */
static int __pyx_pf_12pyrobuf_list_9Int64List_4__contains__(struct __pyx_obj_12pyrobuf_list_Int64List *__pyx_v_self, int64_t __pyx_v_x); /* proto */
static int __pyx_pf_12pyrobuf_list_9Int64List_6__delitem__(struct __pyx_obj_12pyrobuf_list_Int64List *__pyx_v_self, int __pyx_v_i); /* proto */
static PyObject *__pyx_pf_12pyrobuf_list_9Int64List_8__getitem__(struct __pyx_obj_12pyrobuf_list_Int64List *__pyx_v_self, int __pyx_v_i); /* proto */
static PyObject *__pyx_pf_12pyrobuf_list_9Int64List_10__iter__(struct __pyx_obj_12pyrobuf_list_Int64List *__pyx_v_self); /* proto */
static Py_ssize_t __pyx_pf_12pyrobuf_list_9Int64List_13__len__(struct __pyx_obj_12pyrobuf_list_Int64List *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrobuf_list_9Int64List_15__repr__(struct __pyx_obj_12pyrobuf_list_Int64List *__pyx_v_self); /* proto */
static int __pyx_pf_12pyrobuf_list_9Int64List_17__setitem__(struct __pyx_obj_12pyrobuf_list_Int64List *__pyx_v_self, int __pyx_v_i, int64_t __pyx_v_x); /* proto */
static PyObject *__pyx_pf_12pyrobuf_list_9Int64List_19__str__(struct __pyx_obj_12pyrobuf_list_Int64List *__pyx_v_self); /* proto */
static int __pyx_pf_12pyrobuf_list_9Int64List_21__getbuffer__(struct __pyx_obj_12pyrobuf_list_Int64List *__pyx_v_self, Py_buffer *__pyx_v_buffer, CYTHON_UNUSED int __pyx_v_flags); /* proto */
static void __pyx_pf_12pyrobuf_list_9Int64List_23__releasebuffer__(CYTHON_UNUSED struct __pyx_obj_12pyrobuf_list_Int64List *__pyx_v_self, CYTHON_UNUSED Py_buffer *__pyx_v_buffer); /* proto */
static PyObject *__pyx_pf_12pyrobuf_list_9Int64List_25append(struct __pyx_obj_12pyrobuf_list_Int64List *__pyx_v_self, int64_t __pyx_v_x); /* proto */
static PyObject *__pyx_pf_12pyrobuf_list_9Int64List_27extend(struct __pyx_obj_12pyrobuf_list_Int64List *__pyx_v_self, struct __pyx_obj_12pyrobuf_list_Int64List *__pyx_v_x); /* proto */
static PyObject *__pyx_pf_12pyrobuf_list_9Int64List_29insert(struct __pyx_obj_12pyrobuf_list_Int64List *__pyx_v_self, int __pyx_v_i, int64_t __pyx_v_x); /* proto */
static PyObject *__pyx_pf_12pyrobuf_list_9Int64List_31pop(struct __pyx_obj_12pyrobuf_list_Int64List *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrobuf_list_9Int64List_33remove(struct __pyx_obj_12pyrobuf_list_Int64List *__pyx_v_self, int64_t __pyx_v_x); /* proto */
static int __pyx_pf_12pyrobuf_list_10Uint64List___cinit__(struct __pyx_obj_12pyrobuf_list_Uint64List *__pyx_v_self, size_t __pyx_v_size, PyObject *__pyx_v_listener); /* proto */
static void __pyx_pf_12pyrobuf_list_10Uint64List_2__dealloc__(struct __pyx_obj_12pyrobuf_list_Uint64List *__pyx_v_self); /* proto */
static int __pyx_pf_12pyrobuf_list_10Uint64List_4__contains__(struct __pyx_obj_12pyrobuf_list_Uint64List *__pyx_v_self, uint64_t __pyx_v_x); /* proto */
static int __pyx_pf_12pyrobuf_list_10Uint64List_6__delitem__(struct __pyx_obj_12pyrobuf_list_Uint64List *__pyx_v_self, int __pyx_v_i); /* proto */
static PyObject *__pyx_pf_12pyrobuf_list_10Uint64List_8__getitem__(struct __pyx_obj_12pyrobuf_list_Uint64List *__pyx_v_self, int __pyx_v_i); /* proto */
static PyObject *__pyx_pf_12pyrobuf_list_10Uint64List_10__iter__(struct __pyx_obj_12pyrobuf_list_Uint64List *__pyx_v_self); /* proto */
static Py_ssize_t __pyx_pf_12pyrobuf_list_10Uint64List_13__len__(struct __pyx_obj_12pyrobuf_list_Uint64List *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrobuf_list_10Uint64List_15__repr__(struct __pyx_obj_12pyrobuf_list_Uint64List *__pyx_v_self); /* proto */
static int __pyx_pf_12pyrobuf_list_10Uint64List_17__setitem__(struct __pyx_obj_12pyrobuf_list_Uint64List *__pyx_v_self, int __pyx_v_i, uint64_t __pyx_v_x); /* proto */
static PyObject *__pyx_pf_12pyrobuf_list_10Uint64List_19__str__(struct __pyx_obj_12pyrobuf_list_Uint64List *__pyx_v_self); /* proto */
static int __pyx_pf_12pyrobuf_list_10Uint64List_21__getbuffer__(struct __pyx_obj_12pyrobuf_list_Uint64List *__pyx_v_self, Py_buffer *__pyx_v_buffer, CYTHON_UNUSED int __pyx_v_flags); /* proto */
static void __pyx_pf_12pyrobuf_list_10Uint64List_23__releasebuffer__(CYTHON_UNUSED struct __pyx_obj_12pyrobuf_list_Uint64List *__pyx_v_self, CYTHON_UNUSED Py_buffer *__pyx_v_buffer); /* proto */
static PyObject *__pyx_pf_12pyrobuf_list_10Uint64List_25append(struct __pyx_obj_12pyrobuf_list_Uint64List *__pyx_v_self, uint64_t __pyx_v_x); /* proto */
static PyObject *__pyx_pf_12pyrobuf_list_10Uint64List_27extend(struct __pyx_obj_12pyrobuf_list_Uint64List *__pyx_v_self, struct __pyx_obj_12pyrobuf_list_Uint64List *__pyx_v_x); /* proto */
static PyObject *__pyx_pf_12pyrobuf_list_10Uint64List_29insert(struct __pyx_obj_12pyrobuf_list_Uint64List *__pyx_v_self, int __pyx_v_i, uint64_t __pyx_v_x); /* proto */
static PyObject *__pyx_pf_12pyrobuf_list_10Uint64List_31pop(struct __pyx_obj_12pyrobuf_list_Uint64List *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrobuf_list_10Uint64List_33remove(struct __pyx_obj_12pyrobuf_list_Uint64List *__pyx_v_self, uint64_t __pyx_v_x); /* proto */
static int __pyx_pf_12pyrobuf_list_8CharList___cinit__(struct __pyx_obj_12pyrobuf_list_CharList *__pyx_v_self, size_t __pyx_v_size, PyObject *__pyx_v_listener); /* proto */
static void __pyx_pf_12pyrobuf_list_8CharList_2__dealloc__(struct __pyx_obj_12pyrobuf_list_CharList *__pyx_v_self); /* proto */
static int __pyx_pf_12pyrobuf_list_8CharList_4__contains__(struct __pyx_obj_12pyrobuf_list_CharList *__pyx_v_self, char __pyx_v_x); /* proto */
static int __pyx_pf_12pyrobuf_list_8CharList_6__delitem__(struct __pyx_obj_12pyrobuf_list_CharList *__pyx_v_self, int __pyx_v_i); /* proto */
static PyObject *__pyx_pf_12pyrobuf_list_8CharList_8__getitem__(struct __pyx_obj_12pyrobuf_list_CharList *__pyx_v_self, int __pyx_v_i); /* proto */
static PyObject *__pyx_pf_12pyrobuf_list_8CharList_10__iter__(struct __pyx_obj_12pyrobuf_list_CharList *__pyx_v_self); /* proto */
static Py_ssize_t __pyx_pf_12pyrobuf_list_8CharList_13__len__(struct __pyx_obj_12pyrobuf_list_CharList *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrobuf_list_8CharList_15__repr__(struct __pyx_obj_12pyrobuf_list_CharList *__pyx_v_self); /* proto */
static int __pyx_pf_12pyrobuf_list_8CharList_17__setitem__(struct __pyx_obj_12pyrobuf_list_CharList *__pyx_v_self, int __pyx_v_i, char __pyx_v_x); /* proto */
static PyObject *__pyx_pf_12pyrobuf_list_8CharList_19__str__(struct __pyx_obj_12pyrobuf_list_CharList *__pyx_v_self); /* proto */
static int __pyx_pf_12pyrobuf_list_8CharList_21__getbuffer__(struct __pyx_obj_12pyrobuf_list_CharList *__pyx_v_self, Py_buffer *__pyx_v_buffer, CYTHON_UNUSED int __pyx_v_flags); /* proto */
static void __pyx_pf_12pyrobuf_list_8CharList_23__releasebuffer__(CYTHON_UNUSED struct __pyx_obj_12pyrobuf_list_CharList *__pyx_v_self, CYTHON_UNUSED Py_buffer *__pyx_v_buffer); /* proto */
static PyObject *__pyx_pf_12pyrobuf_list_8CharList_25append(struct __pyx_obj_12pyrobuf_list_CharList *__pyx_v_self, char __pyx_v_x); /* proto */
static PyObject *__pyx_pf_12pyrobuf_list_8CharList_27extend(struct __pyx_obj_12pyrobuf_list_CharList *__pyx_v_self, struct __pyx_obj_12pyrobuf_list_CharList *__pyx_v_x); /* proto */
static PyObject *__pyx_pf_12pyrobuf_list_8CharList_29insert(struct __pyx_obj_12pyrobuf_list_CharList *__pyx_v_self, int __pyx_v_i, char __pyx_v_x); /* proto */
static PyObject *__pyx_pf_12pyrobuf_list_8CharList_31pop(struct __pyx_obj_12pyrobuf_list_CharList *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrobuf_list_8CharList_33remove(struct __pyx_obj_12pyrobuf_list_CharList *__pyx_v_self, char __pyx_v_x); /* proto */
static int __pyx_pf_12pyrobuf_list_9Int32List___cinit__(struct __pyx_obj_12pyrobuf_list_Int32List *__pyx_v_self, size_t __pyx_v_size, PyObject *__pyx_v_listener); /* proto */
static void __pyx_pf_12pyrobuf_list_9Int32List_2__dealloc__(struct __pyx_obj_12pyrobuf_list_Int32List *__pyx_v_self); /* proto */
static int __pyx_pf_12pyrobuf_list_9Int32List_4__contains__(struct __pyx_obj_12pyrobuf_list_Int32List *__pyx_v_self, int32_t __pyx_v_x); /* proto */
static int __pyx_pf_12pyrobuf_list_9Int32List_6__delitem__(struct __pyx_obj_12pyrobuf_list_Int32List *__pyx_v_self, int __pyx_v_i); /* proto */
static PyObject *__pyx_pf_12pyrobuf_list_9Int32List_8__getitem__(struct __pyx_obj_12pyrobuf_list_Int32List *__pyx_v_self, int __pyx_v_i); /* proto */
static PyObject *__pyx_pf_12pyrobuf_list_9Int32List_10__iter__(struct __pyx_obj_12pyrobuf_list_Int32List *__pyx_v_self); /* proto */
static Py_ssize_t __pyx_pf_12pyrobuf_list_9Int32List_13__len__(struct __pyx_obj_12pyrobuf_list_Int32List *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrobuf_list_9Int32List_15__repr__(struct __pyx_obj_12pyrobuf_list_Int32List *__pyx_v_self); /* proto */
static int __pyx_pf_12pyrobuf_list_9Int32List_17__setitem__(struct __pyx_obj_12pyrobuf_list_Int32List *__pyx_v_self, int __pyx_v_i, int32_t __pyx_v_x); /* proto */
static PyObject *__pyx_pf_12pyrobuf_list_9Int32List_19__str__(struct __pyx_obj_12pyrobuf_list_Int32List *__pyx_v_self); /* proto */
static int __pyx_pf_12pyrobuf_list_9Int32List_21__getbuffer__(struct __pyx_obj_12pyrobuf_list_Int32List *__pyx_v_self, Py_buffer *__pyx_v_buffer, CYTHON_UNUSED int __pyx_v_flags); /* proto */
static void __pyx_pf_12pyrobuf_list_9Int32List_23__releasebuffer__(CYTHON_UNUSED struct __pyx_obj_12pyrobuf_list_Int32List *__pyx_v_self, CYTHON_UNUSED Py_buffer *__pyx_v_buffer); /* proto */
static PyObject *__pyx_pf_12pyrobuf_list_9Int32List_25append(struct __pyx_obj_12pyrobuf_list_Int32List *__pyx_v_self, int32_t __pyx_v_x); /* proto */
static PyObject *__pyx_pf_12pyrobuf_list_9Int32List_27extend(struct __pyx_obj_12pyrobuf_list_Int32List *__pyx_v_self, struct __pyx_obj_12pyrobuf_list_Int32List *__pyx_v_x); /* proto */
static PyObject *__pyx_pf_12pyrobuf_list_9Int32List_29insert(struct __pyx_obj_12pyrobuf_list_Int32List *__pyx_v_self, int __pyx_v_i, int32_t __pyx_v_x); /* proto */
static PyObject *__pyx_pf_12pyrobuf_list_9Int32List_31pop(struct __pyx_obj_12pyrobuf_list_Int32List *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrobuf_list_9Int32List_33remove(struct __pyx_obj_12pyrobuf_list_Int32List *__pyx_v_self, int32_t __pyx_v_x); /* proto */
static int __pyx_pf_12pyrobuf_list_7IntList___cinit__(struct __pyx_obj_12pyrobuf_list_IntList *__pyx_v_self, size_t __pyx_v_size, PyObject *__pyx_v_listener); /* proto */
static void __pyx_pf_12pyrobuf_list_7IntList_2__dealloc__(struct __pyx_obj_12pyrobuf_list_IntList *__pyx_v_self); /* proto */
static int __pyx_pf_12pyrobuf_list_7IntList_4__contains__(struct __pyx_obj_12pyrobuf_list_IntList *__pyx_v_self, int __pyx_v_x); /* proto */
static int __pyx_pf_12pyrobuf_list_7IntList_6__delitem__(struct __pyx_obj_12pyrobuf_list_IntList *__pyx_v_self, int __pyx_v_i); /* proto */
static PyObject *__pyx_pf_12pyrobuf_list_7IntList_8__getitem__(struct __pyx_obj_12pyrobuf_list_IntList *__pyx_v_self, int __pyx_v_i); /* proto */
static PyObject *__pyx_pf_12pyrobuf_list_7IntList_10__iter__(struct __pyx_obj_12pyrobuf_list_IntList *__pyx_v_self); /* proto */
static Py_ssize_t __pyx_pf_12pyrobuf_list_7IntList_13__len__(struct __pyx_obj_12pyrobuf_list_IntList *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrobuf_list_7IntList_15__repr__(struct __pyx_obj_12pyrobuf_list_IntList *__pyx_v_self); /* proto */
static int __pyx_pf_12pyrobuf_list_7IntList_17__setitem__(struct __pyx_obj_12pyrobuf_list_IntList *__pyx_v_self, int __pyx_v_i, int __pyx_v_x); /* proto */
static PyObject *__pyx_pf_12pyrobuf_list_7IntList_19__str__(struct __pyx_obj_12pyrobuf_list_IntList *__pyx_v_self); /* proto */
static int __pyx_pf_12pyrobuf_list_7IntList_21__getbuffer__(struct __pyx_obj_12pyrobuf_list_IntList *__pyx_v_self, Py_buffer *__pyx_v_buffer, CYTHON_UNUSED int __pyx_v_flags); /* proto */
static void __pyx_pf_12pyrobuf_list_7IntList_23__releasebuffer__(CYTHON_UNUSED struct __pyx_obj_12pyrobuf_list_IntList *__pyx_v_self, CYTHON_UNUSED Py_buffer *__pyx_v_buffer); /* proto */
static PyObject *__pyx_pf_12pyrobuf_list_7IntList_25append(struct __pyx_obj_12pyrobuf_list_IntList *__pyx_v_self, int __pyx_v_x); /* proto */
static PyObject *__pyx_pf_12pyrobuf_list_7IntList_27extend(struct __pyx_obj_12pyrobuf_list_IntList *__pyx_v_self, struct __pyx_obj_12pyrobuf_list_IntList *__pyx_v_x); /* proto */
static PyObject *__pyx_pf_12pyrobuf_list_7IntList_29insert(struct __pyx_obj_12pyrobuf_list_IntList *__pyx_v_self, int __pyx_v_i, int __pyx_v_x); /* proto */
static PyObject *__pyx_pf_12pyrobuf_list_7IntList_31pop(struct __pyx_obj_12pyrobuf_list_IntList *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrobuf_list_7IntList_33remove(struct __pyx_obj_12pyrobuf_list_IntList *__pyx_v_self, int __pyx_v_x); /* proto */
static int __pyx_pf_12pyrobuf_list_10DoubleList___cinit__(struct __pyx_obj_12pyrobuf_list_DoubleList *__pyx_v_self, size_t __pyx_v_size, PyObject *__pyx_v_listener); /* proto */
static void __pyx_pf_12pyrobuf_list_10DoubleList_2__dealloc__(struct __pyx_obj_12pyrobuf_list_DoubleList *__pyx_v_self); /* proto */
static int __pyx_pf_12pyrobuf_list_10DoubleList_4__contains__(struct __pyx_obj_12pyrobuf_list_DoubleList *__pyx_v_self, double __pyx_v_x); /* proto */
static int __pyx_pf_12pyrobuf_list_10DoubleList_6__delitem__(struct __pyx_obj_12pyrobuf_list_DoubleList *__pyx_v_self, int __pyx_v_i); /* proto */
static PyObject *__pyx_pf_12pyrobuf_list_10DoubleList_8__getitem__(struct __pyx_obj_12pyrobuf_list_DoubleList *__pyx_v_self, int __pyx_v_i); /* proto */
static PyObject *__pyx_pf_12pyrobuf_list_10DoubleList_10__iter__(struct __pyx_obj_12pyrobuf_list_DoubleList *__pyx_v_self); /* proto */
static Py_ssize_t __pyx_pf_12pyrobuf_list_10DoubleList_13__len__(struct __pyx_obj_12pyrobuf_list_DoubleList *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrobuf_list_10DoubleList_15__repr__(struct __pyx_obj_12pyrobuf_list_DoubleList *__pyx_v_self); /* proto */
static int __pyx_pf_12pyrobuf_list_10DoubleList_17__setitem__(struct __pyx_obj_12pyrobuf_list_DoubleList *__pyx_v_self, int __pyx_v_i, double __pyx_v_x); /* proto */
static PyObject *__pyx_pf_12pyrobuf_list_10DoubleList_19__str__(struct __pyx_obj_12pyrobuf_list_DoubleList *__pyx_v_self); /* proto */
static int __pyx_pf_12pyrobuf_list_10DoubleList_21__getbuffer__(struct __pyx_obj_12pyrobuf_list_DoubleList *__pyx_v_self, Py_buffer *__pyx_v_buffer, CYTHON_UNUSED int __pyx_v_flags); /* proto */
static void __pyx_pf_12pyrobuf_list_10DoubleList_23__releasebuffer__(CYTHON_UNUSED struct __pyx_obj_12pyrobuf_list_DoubleList *__pyx_v_self, CYTHON_UNUSED Py_buffer *__pyx_v_buffer); /* proto */
static PyObject *__pyx_pf_12pyrobuf_list_10DoubleList_25append(struct __pyx_obj_12pyrobuf_list_DoubleList *__pyx_v_self, double __pyx_v_x); /* proto */
static PyObject *__pyx_pf_12pyrobuf_list_10DoubleList_27extend(struct __pyx_obj_12pyrobuf_list_DoubleList *__pyx_v_self, struct __pyx_obj_12pyrobuf_list_DoubleList *__pyx_v_x); /* proto */
static PyObject *__pyx_pf_12pyrobuf_list_10DoubleList_29insert(struct __pyx_obj_12pyrobuf_list_DoubleList *__pyx_v_self, int __pyx_v_i, double __pyx_v_x); /* proto */
static PyObject *__pyx_pf_12pyrobuf_list_10DoubleList_31pop(struct __pyx_obj_12pyrobuf_list_DoubleList *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrobuf_list_10DoubleList_33remove(struct __pyx_obj_12pyrobuf_list_DoubleList *__pyx_v_self, double __pyx_v_x); /* proto */
static int __pyx_pf_12pyrobuf_list_9FloatList___cinit__(struct __pyx_obj_12pyrobuf_list_FloatList *__pyx_v_self, size_t __pyx_v_size, PyObject *__pyx_v_listener); /* proto */
static void __pyx_pf_12pyrobuf_list_9FloatList_2__dealloc__(struct __pyx_obj_12pyrobuf_list_FloatList *__pyx_v_self); /* proto */
static int __pyx_pf_12pyrobuf_list_9FloatList_4__contains__(struct __pyx_obj_12pyrobuf_list_FloatList *__pyx_v_self, float __pyx_v_x); /* proto */
static int __pyx_pf_12pyrobuf_list_9FloatList_6__delitem__(struct __pyx_obj_12pyrobuf_list_FloatList *__pyx_v_self, int __pyx_v_i); /* proto */
static PyObject *__pyx_pf_12pyrobuf_list_9FloatList_8__getitem__(struct __pyx_obj_12pyrobuf_list_FloatList *__pyx_v_self, int __pyx_v_i); /* proto */
static PyObject *__pyx_pf_12pyrobuf_list_9FloatList_10__iter__(struct __pyx_obj_12pyrobuf_list_FloatList *__pyx_v_self); /* proto */
static Py_ssize_t __pyx_pf_12pyrobuf_list_9FloatList_13__len__(struct __pyx_obj_12pyrobuf_list_FloatList *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrobuf_list_9FloatList_15__repr__(struct __pyx_obj_12pyrobuf_list_FloatList *__pyx_v_self); /* proto */
static int __pyx_pf_12pyrobuf_list_9FloatList_17__setitem__(struct __pyx_obj_12pyrobuf_list_FloatList *__pyx_v_self, int __pyx_v_i, float __pyx_v_x); /* proto */
static PyObject *__pyx_pf_12pyrobuf_list_9FloatList_19__str__(struct __pyx_obj_12pyrobuf_list_FloatList *__pyx_v_self); /* proto */
static int __pyx_pf_12pyrobuf_list_9FloatList_21__getbuffer__(struct __pyx_obj_12pyrobuf_list_FloatList *__pyx_v_self, Py_buffer *__pyx_v_buffer, CYTHON_UNUSED int __pyx_v_flags); /* proto */
static void __pyx_pf_12pyrobuf_list_9FloatList_23__releasebuffer__(CYTHON_UNUSED struct __pyx_obj_12pyrobuf_list_FloatList *__pyx_v_self, CYTHON_UNUSED Py_buffer *__pyx_v_buffer); /* proto */
static PyObject *__pyx_pf_12pyrobuf_list_9FloatList_25append(struct __pyx_obj_12pyrobuf_list_FloatList *__pyx_v_self, float __pyx_v_x); /* proto */
static PyObject *__pyx_pf_12pyrobuf_list_9FloatList_27extend(struct __pyx_obj_12pyrobuf_list_FloatList *__pyx_v_self, struct __pyx_obj_12pyrobuf_list_FloatList *__pyx_v_x); /* proto */
static PyObject *__pyx_pf_12pyrobuf_list_9FloatList_29insert(struct __pyx_obj_12pyrobuf_list_FloatList *__pyx_v_self, int __pyx_v_i, float __pyx_v_x); /* proto */
static PyObject *__pyx_pf_12pyrobuf_list_9FloatList_31pop(struct __pyx_obj_12pyrobuf_list_FloatList *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrobuf_list_9FloatList_33remove(struct __pyx_obj_12pyrobuf_list_FloatList *__pyx_v_self, float __pyx_v_x); /* proto */
static int __pyx_pf_12pyrobuf_list_10Uint32List___cinit__(struct __pyx_obj_12pyrobuf_list_Uint32List *__pyx_v_self, size_t __pyx_v_size, PyObject *__pyx_v_listener); /* proto */
static void __pyx_pf_12pyrobuf_list_10Uint32List_2__dealloc__(struct __pyx_obj_12pyrobuf_list_Uint32List *__pyx_v_self); /* proto */
static int __pyx_pf_12pyrobuf_list_10Uint32List_4__contains__(struct __pyx_obj_12pyrobuf_list_Uint32List *__pyx_v_self, uint32_t __pyx_v_x); /* proto */
static int __pyx_pf_12pyrobuf_list_10Uint32List_6__delitem__(struct __pyx_obj_12pyrobuf_list_Uint32List *__pyx_v_self, int __pyx_v_i); /* proto */
static PyObject *__pyx_pf_12pyrobuf_list_10Uint32List_8__getitem__(struct __pyx_obj_12pyrobuf_list_Uint32List *__pyx_v_self, int __pyx_v_i); /* proto */
static PyObject *__pyx_pf_12pyrobuf_list_10Uint32List_10__iter__(struct __pyx_obj_12pyrobuf_list_Uint32List *__pyx_v_self); /* proto */
static Py_ssize_t __pyx_pf_12pyrobuf_list_10Uint32List_13__len__(struct __pyx_obj_12pyrobuf_list_Uint32List *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrobuf_list_10Uint32List_15__repr__(struct __pyx_obj_12pyrobuf_list_Uint32List *__pyx_v_self); /* proto */
static int __pyx_pf_12pyrobuf_list_10Uint32List_17__setitem__(struct __pyx_obj_12pyrobuf_list_Uint32List *__pyx_v_self, int __pyx_v_i, uint32_t __pyx_v_x); /* proto */
static PyObject *__pyx_pf_12pyrobuf_list_10Uint32List_19__str__(struct __pyx_obj_12pyrobuf_list_Uint32List *__pyx_v_self); /* proto */
static int __pyx_pf_12pyrobuf_list_10Uint32List_21__getbuffer__(struct __pyx_obj_12pyrobuf_list_Uint32List *__pyx_v_self, Py_buffer *__pyx_v_buffer, CYTHON_UNUSED int __pyx_v_flags); /* proto */
static void __pyx_pf_12pyrobuf_list_10Uint32List_23__releasebuffer__(CYTHON_UNUSED struct __pyx_obj_12pyrobuf_list_Uint32List *__pyx_v_self, CYTHON_UNUSED Py_buffer *__pyx_v_buffer); /* proto */
static PyObject *__pyx_pf_12pyrobuf_list_10Uint32List_25append(struct __pyx_obj_12pyrobuf_list_Uint32List *__pyx_v_self, uint32_t __pyx_v_x); /* proto */
static PyObject *__pyx_pf_12pyrobuf_list_10Uint32List_27extend(struct __pyx_obj_12pyrobuf_list_Uint32List *__pyx_v_self, struct __pyx_obj_12pyrobuf_list_Uint32List *__pyx_v_x); /* proto */
static PyObject *__pyx_pf_12pyrobuf_list_10Uint32List_29insert(struct __pyx_obj_12pyrobuf_list_Uint32List *__pyx_v_self, int __pyx_v_i, uint32_t __pyx_v_x); /* proto */
static PyObject *__pyx_pf_12pyrobuf_list_10Uint32List_31pop(struct __pyx_obj_12pyrobuf_list_Uint32List *__pyx_v_self); /* proto */
static PyObject *__pyx_pf_12pyrobuf_list_10Uint32List_33remove(struct __pyx_obj_12pyrobuf_list_Uint32List *__pyx_v_self, uint32_t __pyx_v_x); /* proto */
static PyObject *__pyx_tp_new_12pyrobuf_list_NullListener(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_12pyrobuf_list_TypedList(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_12pyrobuf_list_BytesList(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_12pyrobuf_list_StringList(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_12pyrobuf_list_Int64List(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_12pyrobuf_list_Uint64List(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_12pyrobuf_list_CharList(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_12pyrobuf_list_Int32List(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_12pyrobuf_list_IntList(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_12pyrobuf_list_DoubleList(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_12pyrobuf_list_FloatList(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_12pyrobuf_list_Uint32List(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_12pyrobuf_list___pyx_scope_struct____iter__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_12pyrobuf_list___pyx_scope_struct_1___iter__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_12pyrobuf_list___pyx_scope_struct_2___iter__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_12pyrobuf_list___pyx_scope_struct_3___iter__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_12pyrobuf_list___pyx_scope_struct_4___iter__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_12pyrobuf_list___pyx_scope_struct_5___iter__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_12pyrobuf_list___pyx_scope_struct_6___iter__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tp_new_12pyrobuf_list___pyx_scope_struct_7___iter__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/
static PyObject *__pyx_tuple_;
static PyObject *__pyx_tuple__2;
static PyObject *__pyx_tuple__3;
static PyObject *__pyx_tuple__4;
static PyObject *__pyx_tuple__5;
static PyObject *__pyx_tuple__6;
static PyObject *__pyx_tuple__7;
static PyObject *__pyx_tuple__8;
static PyObject *__pyx_tuple__9;
static PyObject *__pyx_tuple__10;
static PyObject *__pyx_tuple__11;
static PyObject *__pyx_tuple__12;
static PyObject *__pyx_tuple__13;
static PyObject *__pyx_tuple__14;
static PyObject *__pyx_tuple__15;
static PyObject *__pyx_tuple__16;
static PyObject *__pyx_tuple__17;
static PyObject *__pyx_tuple__18;
static PyObject *__pyx_tuple__19;
static PyObject *__pyx_tuple__20;
static PyObject *__pyx_tuple__21;
static PyObject *__pyx_tuple__22;
static PyObject *__pyx_tuple__23;
static PyObject *__pyx_tuple__24;
static PyObject *__pyx_tuple__25;
static PyObject *__pyx_tuple__26;
static PyObject *__pyx_tuple__27;
static PyObject *__pyx_tuple__28;
static PyObject *__pyx_tuple__29;
static PyObject *__pyx_tuple__30;
static PyObject *__pyx_tuple__31;
static PyObject *__pyx_tuple__32;
static PyObject *__pyx_tuple__33;
static PyObject *__pyx_tuple__34;
static PyObject *__pyx_tuple__35;
static PyObject *__pyx_tuple__36;
static PyObject *__pyx_tuple__37;
static PyObject *__pyx_tuple__38;
static PyObject *__pyx_tuple__39;
static PyObject *__pyx_tuple__40;
static PyObject *__pyx_tuple__41;
static PyObject *__pyx_tuple__42;
static PyObject *__pyx_tuple__43;
static PyObject *__pyx_tuple__44;
static PyObject *__pyx_tuple__45;
static PyObject *__pyx_tuple__46;
static PyObject *__pyx_tuple__47;
static PyObject *__pyx_tuple__48;
static PyObject *__pyx_tuple__49;
static PyObject *__pyx_tuple__50;
static PyObject *__pyx_tuple__51;
static PyObject *__pyx_tuple__52;
static PyObject *__pyx_tuple__53;
static PyObject *__pyx_tuple__54;
static PyObject *__pyx_tuple__55;
static PyObject *__pyx_tuple__56;
static PyObject *__pyx_tuple__57;
static PyObject *__pyx_tuple__58;
static PyObject *__pyx_tuple__59;
struct __pyx_obj_12pyrobuf_list_NullListener *null_listener = 0;

/* "pyrobuf_list.pyx":8
 * cdef class NullListener:
 *     property _is_present_in_parent:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return True
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrobuf_list_12NullListener_21_is_present_in_parent_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_12pyrobuf_list_12NullListener_21_is_present_in_parent_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrobuf_list_12NullListener_21_is_present_in_parent___get__(((struct __pyx_obj_12pyrobuf_list_NullListener *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_12pyrobuf_list_12NullListener_21_is_present_in_parent___get__(CYTHON_UNUSED struct __pyx_obj_12pyrobuf_list_NullListener *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "pyrobuf_list.pyx":9
 *     property _is_present_in_parent:
 *         def __get__(self):
 *             return True             # <<<<<<<<<<<<<<
 * 
 *     cpdef void _Modified(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(Py_True);
  __pyx_r = Py_True;
  goto __pyx_L0;

  /* "pyrobuf_list.pyx":8
 * cdef class NullListener:
 *     property _is_present_in_parent:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return True
 * 
 */

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrobuf_list.pyx":11
 *             return True
 * 
 *     cpdef void _Modified(self):             # <<<<<<<<<<<<<<
 *         return
 * 
 */

static PyObject *__pyx_pw_12pyrobuf_list_12NullListener_1_Modified(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static void __pyx_f_12pyrobuf_list_12NullListener__Modified(CYTHON_UNUSED struct __pyx_obj_12pyrobuf_list_NullListener *__pyx_v_self, int __pyx_skip_dispatch) {
  __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;
  __Pyx_RefNannySetupContext("_Modified", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_Modified); 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 (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_12pyrobuf_list_12NullListener_1_Modified)) {
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
      if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_4)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
        }
      }
      if (__pyx_t_4) {
        __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 11; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else {
        __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 11; __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;
      goto __pyx_L0;
    }
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  }

  /* "pyrobuf_list.pyx":12
 * 
 *     cpdef void _Modified(self):
 *         return             # <<<<<<<<<<<<<<
 * 
 * cdef public NullListener null_listener = NullListener()
 */
  goto __pyx_L0;

  /* "pyrobuf_list.pyx":11
 *             return True
 * 
 *     cpdef void _Modified(self):             # <<<<<<<<<<<<<<
 *         return
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_WriteUnraisable("pyrobuf_list.NullListener._Modified", __pyx_clineno, __pyx_lineno, __pyx_filename, 0, 0);
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrobuf_list_12NullListener_1_Modified(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_12pyrobuf_list_12NullListener_1_Modified(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("_Modified (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrobuf_list_12NullListener__Modified(((struct __pyx_obj_12pyrobuf_list_NullListener *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_12pyrobuf_list_12NullListener__Modified(struct __pyx_obj_12pyrobuf_list_NullListener *__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("_Modified", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_void_to_None(__pyx_f_12pyrobuf_list_12NullListener__Modified(__pyx_v_self, 1)); 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);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyrobuf_list.NullListener._Modified", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrobuf_list.pyx":19
 * cdef class TypedList(list):
 * 
 *     def __init__(self, type list_type, object listener=None):             # <<<<<<<<<<<<<<
 *         self._list_type = list_type
 *         if listener is None:
 */

/* Python wrapper */
static int __pyx_pw_12pyrobuf_list_9TypedList_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_12pyrobuf_list_9TypedList_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyTypeObject *__pyx_v_list_type = 0;
  PyObject *__pyx_v_listener = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_list_type,&__pyx_n_s_listener,0};
    PyObject* values[2] = {0,0};
    values[1] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_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 (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_list_type)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_listener);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 19; __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_list_type = ((PyTypeObject*)values[0]);
    __pyx_v_listener = 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 = 19; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyrobuf_list.TypedList.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_list_type), (&PyType_Type), 1, "list_type", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 19; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_12pyrobuf_list_9TypedList___init__(((struct __pyx_obj_12pyrobuf_list_TypedList *)__pyx_v_self), __pyx_v_list_type, __pyx_v_listener);

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_12pyrobuf_list_9TypedList___init__(struct __pyx_obj_12pyrobuf_list_TypedList *__pyx_v_self, PyTypeObject *__pyx_v_list_type, PyObject *__pyx_v_listener) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "pyrobuf_list.pyx":20
 * 
 *     def __init__(self, type list_type, object listener=None):
 *         self._list_type = list_type             # <<<<<<<<<<<<<<
 *         if listener is None:
 *             self._listener = <PyObject *>null_listener
 */
  __Pyx_INCREF(((PyObject *)__pyx_v_list_type));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_list_type));
  __Pyx_GOTREF(__pyx_v_self->_list_type);
  __Pyx_DECREF(((PyObject *)__pyx_v_self->_list_type));
  __pyx_v_self->_list_type = __pyx_v_list_type;

  /* "pyrobuf_list.pyx":21
 *     def __init__(self, type list_type, object listener=None):
 *         self._list_type = list_type
 *         if listener is None:             # <<<<<<<<<<<<<<
 *             self._listener = <PyObject *>null_listener
 *         else:
 */
  __pyx_t_1 = (__pyx_v_listener == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "pyrobuf_list.pyx":22
 *         self._list_type = list_type
 *         if listener is None:
 *             self._listener = <PyObject *>null_listener             # <<<<<<<<<<<<<<
 *         else:
 *             self._listener = <PyObject *>listener
 */
    __pyx_v_self->_listener = ((PyObject *)null_listener);

    /* "pyrobuf_list.pyx":21
 *     def __init__(self, type list_type, object listener=None):
 *         self._list_type = list_type
 *         if listener is None:             # <<<<<<<<<<<<<<
 *             self._listener = <PyObject *>null_listener
 *         else:
 */
    goto __pyx_L3;
  }

  /* "pyrobuf_list.pyx":24
 *             self._listener = <PyObject *>null_listener
 *         else:
 *             self._listener = <PyObject *>listener             # <<<<<<<<<<<<<<
 * 
 *     property list_type:
 */
  /*else*/ {
    __pyx_v_self->_listener = ((PyObject *)__pyx_v_listener);
  }
  __pyx_L3:;

  /* "pyrobuf_list.pyx":19
 * cdef class TypedList(list):
 * 
 *     def __init__(self, type list_type, object listener=None):             # <<<<<<<<<<<<<<
 *         self._list_type = list_type
 *         if listener is None:
 */

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrobuf_list.pyx":27
 * 
 *     property list_type:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self._list_type
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrobuf_list_9TypedList_9list_type_1__get__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_12pyrobuf_list_9TypedList_9list_type_1__get__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrobuf_list_9TypedList_9list_type___get__(((struct __pyx_obj_12pyrobuf_list_TypedList *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_12pyrobuf_list_9TypedList_9list_type___get__(struct __pyx_obj_12pyrobuf_list_TypedList *__pyx_v_self) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__get__", 0);

  /* "pyrobuf_list.pyx":28
 *     property list_type:
 *         def __get__(self):
 *             return self._list_type             # <<<<<<<<<<<<<<
 * 
 *     def __setitem__(self, i, x):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(((PyObject *)__pyx_v_self->_list_type));
  __pyx_r = ((PyObject *)__pyx_v_self->_list_type);
  goto __pyx_L0;

  /* "pyrobuf_list.pyx":27
 * 
 *     property list_type:
 *         def __get__(self):             # <<<<<<<<<<<<<<
 *             return self._list_type
 * 
 */

  /* function exit code */
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrobuf_list.pyx":30
 *             return self._list_type
 * 
 *     def __setitem__(self, i, x):             # <<<<<<<<<<<<<<
 *         try:
 *             assert isinstance(x, self._list_type)
 */

/* Python wrapper */
static int __pyx_pw_12pyrobuf_list_9TypedList_3__setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_i, PyObject *__pyx_v_x); /*proto*/
static int __pyx_pw_12pyrobuf_list_9TypedList_3__setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_i, PyObject *__pyx_v_x) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setitem__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrobuf_list_9TypedList_2__setitem__(((struct __pyx_obj_12pyrobuf_list_TypedList *)__pyx_v_self), ((PyObject *)__pyx_v_i), ((PyObject *)__pyx_v_x));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_12pyrobuf_list_9TypedList_2__setitem__(struct __pyx_obj_12pyrobuf_list_TypedList *__pyx_v_self, PyObject *__pyx_v_i, PyObject *__pyx_v_x) {
  PyObject *__pyx_v_listener = NULL;
  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;
  int __pyx_t_5;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  Py_ssize_t __pyx_t_10;
  int __pyx_t_11;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setitem__", 0);

  /* "pyrobuf_list.pyx":31
 * 
 *     def __setitem__(self, i, x):
 *         try:             # <<<<<<<<<<<<<<
 *             assert isinstance(x, self._list_type)
 *         except AssertionError:
 */
  {
    __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:*/ {

      /* "pyrobuf_list.pyx":32
 *     def __setitem__(self, i, x):
 *         try:
 *             assert isinstance(x, self._list_type)             # <<<<<<<<<<<<<<
 *         except AssertionError:
 *             raise Exception("type mismatch")
 */
      #ifndef CYTHON_WITHOUT_ASSERTIONS
      if (unlikely(!Py_OptimizeFlag)) {
        __pyx_t_4 = ((PyObject *)__pyx_v_self->_list_type);
        __Pyx_INCREF(__pyx_t_4);
        __pyx_t_5 = __Pyx_TypeCheck(__pyx_v_x, __pyx_t_4); 
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!(__pyx_t_5 != 0))) {
          PyErr_SetNone(PyExc_AssertionError);
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 32; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      #endif

      /* "pyrobuf_list.pyx":31
 * 
 *     def __setitem__(self, i, x):
 *         try:             # <<<<<<<<<<<<<<
 *             assert isinstance(x, self._list_type)
 *         except AssertionError:
 */
    }
    __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_4); __pyx_t_4 = 0;

    /* "pyrobuf_list.pyx":33
 *         try:
 *             assert isinstance(x, self._list_type)
 *         except AssertionError:             # <<<<<<<<<<<<<<
 *             raise Exception("type mismatch")
 * 
 */
    __pyx_t_6 = PyErr_ExceptionMatches(__pyx_builtin_AssertionError);
    if (__pyx_t_6) {
      __Pyx_AddTraceback("pyrobuf_list.TypedList.__setitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_7, &__pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_GOTREF(__pyx_t_8);

      /* "pyrobuf_list.pyx":34
 *             assert isinstance(x, self._list_type)
 *         except AssertionError:
 *             raise Exception("type mismatch")             # <<<<<<<<<<<<<<
 * 
 *         super(TypedList, self).__setitem__(i, x)
 */
      __pyx_t_9 = __Pyx_PyObject_Call(__pyx_builtin_Exception, __pyx_tuple_, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_Raise(__pyx_t_9, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
    }
    goto __pyx_L5_except_error;
    __pyx_L5_except_error:;

    /* "pyrobuf_list.pyx":31
 * 
 *     def __setitem__(self, i, x):
 *         try:             # <<<<<<<<<<<<<<
 *             assert isinstance(x, self._list_type)
 *         except AssertionError:
 */
    __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_L10_try_end:;
  }

  /* "pyrobuf_list.pyx":36
 *             raise Exception("type mismatch")
 * 
 *         super(TypedList, self).__setitem__(i, x)             # <<<<<<<<<<<<<<
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:
 */
  __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_INCREF(((PyObject *)__pyx_ptype_12pyrobuf_list_TypedList));
  __Pyx_GIVEREF(((PyObject *)__pyx_ptype_12pyrobuf_list_TypedList));
  PyTuple_SET_ITEM(__pyx_t_7, 0, ((PyObject *)__pyx_ptype_12pyrobuf_list_TypedList));
  __Pyx_INCREF(((PyObject *)__pyx_v_self));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
  PyTuple_SET_ITEM(__pyx_t_7, 1, ((PyObject *)__pyx_v_self));
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_7, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_setitem); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = NULL;
  __pyx_t_10 = 0;
  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_7))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_7);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_7, function);
      __pyx_t_10 = 1;
    }
  }
  __pyx_t_9 = PyTuple_New(2+__pyx_t_10); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_9);
  if (__pyx_t_4) {
    __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_4); __pyx_t_4 = NULL;
  }
  __Pyx_INCREF(__pyx_v_i);
  __Pyx_GIVEREF(__pyx_v_i);
  PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_10, __pyx_v_i);
  __Pyx_INCREF(__pyx_v_x);
  __Pyx_GIVEREF(__pyx_v_x);
  PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_10, __pyx_v_x);
  __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_9, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "pyrobuf_list.pyx":37
 * 
 *         super(TypedList, self).__setitem__(i, x)
 *         listener = <object>self._listener             # <<<<<<<<<<<<<<
 *         if not listener._is_present_in_parent:
 *             listener._Modified()
 */
  __pyx_t_8 = ((PyObject *)__pyx_v_self->_listener);
  __Pyx_INCREF(__pyx_t_8);
  __pyx_v_listener = __pyx_t_8;
  __pyx_t_8 = 0;

  /* "pyrobuf_list.pyx":38
 *         super(TypedList, self).__setitem__(i, x)
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:             # <<<<<<<<<<<<<<
 *             listener._Modified()
 * 
 */
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_listener, __pyx_n_s_is_present_in_parent); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 38; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 38; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_11 = ((!__pyx_t_5) != 0);
  if (__pyx_t_11) {

    /* "pyrobuf_list.pyx":39
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:
 *             listener._Modified()             # <<<<<<<<<<<<<<
 * 
 * 
 */
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_listener, __pyx_n_s_Modified); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_9 = NULL;
    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_9)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_9);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
      }
    }
    if (__pyx_t_9) {
      __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_9); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    } else {
      __pyx_t_8 = __Pyx_PyObject_CallNoArg(__pyx_t_7); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

    /* "pyrobuf_list.pyx":38
 *         super(TypedList, self).__setitem__(i, x)
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:             # <<<<<<<<<<<<<<
 *             listener._Modified()
 * 
 */
  }

  /* "pyrobuf_list.pyx":30
 *             return self._list_type
 * 
 *     def __setitem__(self, i, x):             # <<<<<<<<<<<<<<
 *         try:
 *             assert isinstance(x, self._list_type)
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("pyrobuf_list.TypedList.__setitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_listener);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrobuf_list.pyx":42
 * 
 * 
 *     def __setslice__(self, i, j, x):             # <<<<<<<<<<<<<<
 *         try:
 *             assert isinstance(x, TypedList)
 */

/* Python wrapper */
static int __pyx_pw_12pyrobuf_list_9TypedList_5__setslice__(PyObject *__pyx_v_self, Py_ssize_t __pyx_arg_i, Py_ssize_t __pyx_arg_j, PyObject *__pyx_v_x); /*proto*/
static int __pyx_pw_12pyrobuf_list_9TypedList_5__setslice__(PyObject *__pyx_v_self, Py_ssize_t __pyx_arg_i, Py_ssize_t __pyx_arg_j, PyObject *__pyx_v_x) {
  PyObject *__pyx_v_i = 0;
  PyObject *__pyx_v_j = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setslice__ (wrapper)", 0);
  __pyx_v_i = PyInt_FromSsize_t(__pyx_arg_i); if (unlikely(!__pyx_v_i)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __Pyx_GOTREF(__pyx_v_i);
  __pyx_v_j = PyInt_FromSsize_t(__pyx_arg_j); if (unlikely(!__pyx_v_j)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 42; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __Pyx_GOTREF(__pyx_v_j);
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyrobuf_list.TypedList.__setslice__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_12pyrobuf_list_9TypedList_4__setslice__(((struct __pyx_obj_12pyrobuf_list_TypedList *)__pyx_v_self), ((PyObject *)__pyx_v_i), ((PyObject *)__pyx_v_j), ((PyObject *)__pyx_v_x));

  /* function exit code */
  __Pyx_XDECREF(__pyx_v_i);
  __Pyx_XDECREF(__pyx_v_j);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_12pyrobuf_list_9TypedList_4__setslice__(struct __pyx_obj_12pyrobuf_list_TypedList *__pyx_v_self, PyObject *__pyx_v_i, PyObject *__pyx_v_j, PyObject *__pyx_v_x) {
  PyObject *__pyx_v_listener = NULL;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  PyObject *__pyx_t_2 = NULL;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_t_4;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  Py_ssize_t __pyx_t_10;
  int __pyx_t_11;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setslice__", 0);

  /* "pyrobuf_list.pyx":43
 * 
 *     def __setslice__(self, i, j, x):
 *         try:             # <<<<<<<<<<<<<<
 *             assert isinstance(x, TypedList)
 *             assert self._list_type == x.list_type
 */
  {
    __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:*/ {

      /* "pyrobuf_list.pyx":44
 *     def __setslice__(self, i, j, x):
 *         try:
 *             assert isinstance(x, TypedList)             # <<<<<<<<<<<<<<
 *             assert self._list_type == x.list_type
 *         except AssertionError:
 */
      #ifndef CYTHON_WITHOUT_ASSERTIONS
      if (unlikely(!Py_OptimizeFlag)) {
        __pyx_t_4 = __Pyx_TypeCheck(__pyx_v_x, __pyx_ptype_12pyrobuf_list_TypedList); 
        if (unlikely(!(__pyx_t_4 != 0))) {
          PyErr_SetNone(PyExc_AssertionError);
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 44; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      #endif

      /* "pyrobuf_list.pyx":45
 *         try:
 *             assert isinstance(x, TypedList)
 *             assert self._list_type == x.list_type             # <<<<<<<<<<<<<<
 *         except AssertionError:
 *             raise Exception("type mismatch")
 */
      #ifndef CYTHON_WITHOUT_ASSERTIONS
      if (unlikely(!Py_OptimizeFlag)) {
        __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_x, __pyx_n_s_list_type); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_6 = PyObject_RichCompare(((PyObject *)__pyx_v_self->_list_type), __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_4)) {
          PyErr_SetNone(PyExc_AssertionError);
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      #endif

      /* "pyrobuf_list.pyx":43
 * 
 *     def __setslice__(self, i, j, x):
 *         try:             # <<<<<<<<<<<<<<
 *             assert isinstance(x, TypedList)
 *             assert self._list_type == x.list_type
 */
    }
    __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;
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "pyrobuf_list.pyx":46
 *             assert isinstance(x, TypedList)
 *             assert self._list_type == x.list_type
 *         except AssertionError:             # <<<<<<<<<<<<<<
 *             raise Exception("type mismatch")
 * 
 */
    __pyx_t_7 = PyErr_ExceptionMatches(__pyx_builtin_AssertionError);
    if (__pyx_t_7) {
      __Pyx_AddTraceback("pyrobuf_list.TypedList.__setslice__", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_5, &__pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GOTREF(__pyx_t_8);

      /* "pyrobuf_list.pyx":47
 *             assert self._list_type == x.list_type
 *         except AssertionError:
 *             raise Exception("type mismatch")             # <<<<<<<<<<<<<<
 * 
 *         super(TypedList, self).__setslice__(i, j, x)
 */
      __pyx_t_9 = __Pyx_PyObject_Call(__pyx_builtin_Exception, __pyx_tuple__2, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_Raise(__pyx_t_9, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
    }
    goto __pyx_L5_except_error;
    __pyx_L5_except_error:;

    /* "pyrobuf_list.pyx":43
 * 
 *     def __setslice__(self, i, j, x):
 *         try:             # <<<<<<<<<<<<<<
 *             assert isinstance(x, TypedList)
 *             assert self._list_type == x.list_type
 */
    __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_L10_try_end:;
  }

  /* "pyrobuf_list.pyx":49
 *             raise Exception("type mismatch")
 * 
 *         super(TypedList, self).__setslice__(i, j, x)             # <<<<<<<<<<<<<<
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:
 */
  __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_INCREF(((PyObject *)__pyx_ptype_12pyrobuf_list_TypedList));
  __Pyx_GIVEREF(((PyObject *)__pyx_ptype_12pyrobuf_list_TypedList));
  PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_ptype_12pyrobuf_list_TypedList));
  __Pyx_INCREF(((PyObject *)__pyx_v_self));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
  PyTuple_SET_ITEM(__pyx_t_5, 1, ((PyObject *)__pyx_v_self));
  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_5, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_setslice); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = NULL;
  __pyx_t_10 = 0;
  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
      __pyx_t_10 = 1;
    }
  }
  __pyx_t_9 = PyTuple_New(3+__pyx_t_10); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_9);
  if (__pyx_t_6) {
    __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_6); __pyx_t_6 = NULL;
  }
  __Pyx_INCREF(__pyx_v_i);
  __Pyx_GIVEREF(__pyx_v_i);
  PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_10, __pyx_v_i);
  __Pyx_INCREF(__pyx_v_j);
  __Pyx_GIVEREF(__pyx_v_j);
  PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_10, __pyx_v_j);
  __Pyx_INCREF(__pyx_v_x);
  __Pyx_GIVEREF(__pyx_v_x);
  PyTuple_SET_ITEM(__pyx_t_9, 2+__pyx_t_10, __pyx_v_x);
  __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_9, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 49; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "pyrobuf_list.pyx":50
 * 
 *         super(TypedList, self).__setslice__(i, j, x)
 *         listener = <object>self._listener             # <<<<<<<<<<<<<<
 *         if not listener._is_present_in_parent:
 *             listener._Modified()
 */
  __pyx_t_8 = ((PyObject *)__pyx_v_self->_listener);
  __Pyx_INCREF(__pyx_t_8);
  __pyx_v_listener = __pyx_t_8;
  __pyx_t_8 = 0;

  /* "pyrobuf_list.pyx":51
 *         super(TypedList, self).__setslice__(i, j, x)
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:             # <<<<<<<<<<<<<<
 *             listener._Modified()
 * 
 */
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_listener, __pyx_n_s_is_present_in_parent); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_11 = ((!__pyx_t_4) != 0);
  if (__pyx_t_11) {

    /* "pyrobuf_list.pyx":52
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:
 *             listener._Modified()             # <<<<<<<<<<<<<<
 * 
 *     def add(self, **kwargs):
 */
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_listener, __pyx_n_s_Modified); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 52; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_9 = NULL;
    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_9)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_9);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
      }
    }
    if (__pyx_t_9) {
      __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_9); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 52; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    } else {
      __pyx_t_8 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 52; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

    /* "pyrobuf_list.pyx":51
 *         super(TypedList, self).__setslice__(i, j, x)
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:             # <<<<<<<<<<<<<<
 *             listener._Modified()
 * 
 */
  }

  /* "pyrobuf_list.pyx":42
 * 
 * 
 *     def __setslice__(self, i, j, x):             # <<<<<<<<<<<<<<
 *         try:
 *             assert isinstance(x, TypedList)
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("pyrobuf_list.TypedList.__setslice__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_listener);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrobuf_list.pyx":54
 *             listener._Modified()
 * 
 *     def add(self, **kwargs):             # <<<<<<<<<<<<<<
 *         elt = self._list_type(**kwargs)
 *         super(TypedList, self).append(elt)
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrobuf_list_9TypedList_7add(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_12pyrobuf_list_9TypedList_7add(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_kwargs = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("add (wrapper)", 0);
  if (unlikely(PyTuple_GET_SIZE(__pyx_args) > 0)) {
    __Pyx_RaiseArgtupleInvalid("add", 1, 0, 0, PyTuple_GET_SIZE(__pyx_args)); return NULL;}
  if (__pyx_kwds && unlikely(!__Pyx_CheckKeywordStrings(__pyx_kwds, "add", 1))) return NULL;
  if (__pyx_kwds) {
    __pyx_v_kwargs = PyDict_Copy(__pyx_kwds); if (unlikely(!__pyx_v_kwargs)) return NULL;
    __Pyx_GOTREF(__pyx_v_kwargs);
  } else {
    __pyx_v_kwargs = NULL;
  }
  __pyx_r = __pyx_pf_12pyrobuf_list_9TypedList_6add(((struct __pyx_obj_12pyrobuf_list_TypedList *)__pyx_v_self), __pyx_v_kwargs);

  /* function exit code */
  __Pyx_XDECREF(__pyx_v_kwargs);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_12pyrobuf_list_9TypedList_6add(struct __pyx_obj_12pyrobuf_list_TypedList *__pyx_v_self, PyObject *__pyx_v_kwargs) {
  PyObject *__pyx_v_elt = NULL;
  PyObject *__pyx_v_listener = 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_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("add", 0);

  /* "pyrobuf_list.pyx":55
 * 
 *     def add(self, **kwargs):
 *         elt = self._list_type(**kwargs)             # <<<<<<<<<<<<<<
 *         super(TypedList, self).append(elt)
 *         listener = <object>self._listener
 */
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_v_self->_list_type), __pyx_empty_tuple, __pyx_v_kwargs); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_elt = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pyrobuf_list.pyx":56
 *     def add(self, **kwargs):
 *         elt = self._list_type(**kwargs)
 *         super(TypedList, self).append(elt)             # <<<<<<<<<<<<<<
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:
 */
  __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_INCREF(((PyObject *)__pyx_ptype_12pyrobuf_list_TypedList));
  __Pyx_GIVEREF(((PyObject *)__pyx_ptype_12pyrobuf_list_TypedList));
  PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_ptype_12pyrobuf_list_TypedList));
  __Pyx_INCREF(((PyObject *)__pyx_v_self));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
  PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_v_self));
  __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 56; __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_PyObject_Append(__pyx_t_2, __pyx_v_elt); if (unlikely(__pyx_t_3 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 56; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

  /* "pyrobuf_list.pyx":57
 *         elt = self._list_type(**kwargs)
 *         super(TypedList, self).append(elt)
 *         listener = <object>self._listener             # <<<<<<<<<<<<<<
 *         if not listener._is_present_in_parent:
 *             listener._Modified()
 */
  __pyx_t_2 = ((PyObject *)__pyx_v_self->_listener);
  __Pyx_INCREF(__pyx_t_2);
  __pyx_v_listener = __pyx_t_2;
  __pyx_t_2 = 0;

  /* "pyrobuf_list.pyx":58
 *         super(TypedList, self).append(elt)
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:             # <<<<<<<<<<<<<<
 *             listener._Modified()
 *         return elt
 */
  __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_listener, __pyx_n_s_is_present_in_parent); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_t_5 = ((!__pyx_t_4) != 0);
  if (__pyx_t_5) {

    /* "pyrobuf_list.pyx":59
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:
 *             listener._Modified()             # <<<<<<<<<<<<<<
 *         return elt
 * 
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_listener, __pyx_n_s_Modified); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_6 = NULL;
    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_1))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_1);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_1);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_1, function);
      }
    }
    if (__pyx_t_6) {
      __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_1, __pyx_t_6); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    } else {
      __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __Pyx_GOTREF(__pyx_t_2);
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    /* "pyrobuf_list.pyx":58
 *         super(TypedList, self).append(elt)
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:             # <<<<<<<<<<<<<<
 *             listener._Modified()
 *         return elt
 */
  }

  /* "pyrobuf_list.pyx":60
 *         if not listener._is_present_in_parent:
 *             listener._Modified()
 *         return elt             # <<<<<<<<<<<<<<
 * 
 *     def append(self, x):
 */
  __Pyx_XDECREF(__pyx_r);
  __Pyx_INCREF(__pyx_v_elt);
  __pyx_r = __pyx_v_elt;
  goto __pyx_L0;

  /* "pyrobuf_list.pyx":54
 *             listener._Modified()
 * 
 *     def add(self, **kwargs):             # <<<<<<<<<<<<<<
 *         elt = self._list_type(**kwargs)
 *         super(TypedList, self).append(elt)
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("pyrobuf_list.TypedList.add", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_elt);
  __Pyx_XDECREF(__pyx_v_listener);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrobuf_list.pyx":62
 *         return elt
 * 
 *     def append(self, x):             # <<<<<<<<<<<<<<
 *         try:
 *             assert isinstance(x, self._list_type)
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrobuf_list_9TypedList_9append(PyObject *__pyx_v_self, PyObject *__pyx_v_x); /*proto*/
static PyObject *__pyx_pw_12pyrobuf_list_9TypedList_9append(PyObject *__pyx_v_self, PyObject *__pyx_v_x) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("append (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrobuf_list_9TypedList_8append(((struct __pyx_obj_12pyrobuf_list_TypedList *)__pyx_v_self), ((PyObject *)__pyx_v_x));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_12pyrobuf_list_9TypedList_8append(struct __pyx_obj_12pyrobuf_list_TypedList *__pyx_v_self, PyObject *__pyx_v_x) {
  PyObject *__pyx_v_listener = NULL;
  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;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_t_10;
  int __pyx_t_11;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("append", 0);

  /* "pyrobuf_list.pyx":63
 * 
 *     def append(self, x):
 *         try:             # <<<<<<<<<<<<<<
 *             assert isinstance(x, self._list_type)
 *         except AssertionError:
 */
  {
    __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:*/ {

      /* "pyrobuf_list.pyx":64
 *     def append(self, x):
 *         try:
 *             assert isinstance(x, self._list_type)             # <<<<<<<<<<<<<<
 *         except AssertionError:
 *             raise Exception("type mismatch")
 */
      #ifndef CYTHON_WITHOUT_ASSERTIONS
      if (unlikely(!Py_OptimizeFlag)) {
        __pyx_t_4 = ((PyObject *)__pyx_v_self->_list_type);
        __Pyx_INCREF(__pyx_t_4);
        __pyx_t_5 = __Pyx_TypeCheck(__pyx_v_x, __pyx_t_4); 
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!(__pyx_t_5 != 0))) {
          PyErr_SetNone(PyExc_AssertionError);
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      #endif

      /* "pyrobuf_list.pyx":63
 * 
 *     def append(self, x):
 *         try:             # <<<<<<<<<<<<<<
 *             assert isinstance(x, self._list_type)
 *         except AssertionError:
 */
    }
    __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_4); __pyx_t_4 = 0;

    /* "pyrobuf_list.pyx":65
 *         try:
 *             assert isinstance(x, self._list_type)
 *         except AssertionError:             # <<<<<<<<<<<<<<
 *             raise Exception("type mismatch")
 * 
 */
    __pyx_t_6 = PyErr_ExceptionMatches(__pyx_builtin_AssertionError);
    if (__pyx_t_6) {
      __Pyx_AddTraceback("pyrobuf_list.TypedList.append", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_7, &__pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_GOTREF(__pyx_t_8);

      /* "pyrobuf_list.pyx":66
 *             assert isinstance(x, self._list_type)
 *         except AssertionError:
 *             raise Exception("type mismatch")             # <<<<<<<<<<<<<<
 * 
 *         super(TypedList, self).append(x)
 */
      __pyx_t_9 = __Pyx_PyObject_Call(__pyx_builtin_Exception, __pyx_tuple__3, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_Raise(__pyx_t_9, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
    }
    goto __pyx_L5_except_error;
    __pyx_L5_except_error:;

    /* "pyrobuf_list.pyx":63
 * 
 *     def append(self, x):
 *         try:             # <<<<<<<<<<<<<<
 *             assert isinstance(x, self._list_type)
 *         except AssertionError:
 */
    __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_L10_try_end:;
  }

  /* "pyrobuf_list.pyx":68
 *             raise Exception("type mismatch")
 * 
 *         super(TypedList, self).append(x)             # <<<<<<<<<<<<<<
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:
 */
  __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_INCREF(((PyObject *)__pyx_ptype_12pyrobuf_list_TypedList));
  __Pyx_GIVEREF(((PyObject *)__pyx_ptype_12pyrobuf_list_TypedList));
  PyTuple_SET_ITEM(__pyx_t_8, 0, ((PyObject *)__pyx_ptype_12pyrobuf_list_TypedList));
  __Pyx_INCREF(((PyObject *)__pyx_v_self));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
  PyTuple_SET_ITEM(__pyx_t_8, 1, ((PyObject *)__pyx_v_self));
  __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_8, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_10 = __Pyx_PyObject_Append(__pyx_t_7, __pyx_v_x); if (unlikely(__pyx_t_10 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 68; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

  /* "pyrobuf_list.pyx":69
 * 
 *         super(TypedList, self).append(x)
 *         listener = <object>self._listener             # <<<<<<<<<<<<<<
 *         if not listener._is_present_in_parent:
 *             listener._Modified()
 */
  __pyx_t_7 = ((PyObject *)__pyx_v_self->_listener);
  __Pyx_INCREF(__pyx_t_7);
  __pyx_v_listener = __pyx_t_7;
  __pyx_t_7 = 0;

  /* "pyrobuf_list.pyx":70
 *         super(TypedList, self).append(x)
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:             # <<<<<<<<<<<<<<
 *             listener._Modified()
 * 
 */
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_listener, __pyx_n_s_is_present_in_parent); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_11 = ((!__pyx_t_5) != 0);
  if (__pyx_t_11) {

    /* "pyrobuf_list.pyx":71
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:
 *             listener._Modified()             # <<<<<<<<<<<<<<
 * 
 *     def extend(self, x):
 */
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_listener, __pyx_n_s_Modified); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 71; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_4 = NULL;
    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_8))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_8);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_8, function);
      }
    }
    if (__pyx_t_4) {
      __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_4); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 71; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    } else {
      __pyx_t_7 = __Pyx_PyObject_CallNoArg(__pyx_t_8); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 71; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __Pyx_GOTREF(__pyx_t_7);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

    /* "pyrobuf_list.pyx":70
 *         super(TypedList, self).append(x)
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:             # <<<<<<<<<<<<<<
 *             listener._Modified()
 * 
 */
  }

  /* "pyrobuf_list.pyx":62
 *         return elt
 * 
 *     def append(self, x):             # <<<<<<<<<<<<<<
 *         try:
 *             assert isinstance(x, self._list_type)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("pyrobuf_list.TypedList.append", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_listener);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrobuf_list.pyx":73
 *             listener._Modified()
 * 
 *     def extend(self, x):             # <<<<<<<<<<<<<<
 *         try:
 *             assert isinstance(x, TypedList)
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrobuf_list_9TypedList_11extend(PyObject *__pyx_v_self, PyObject *__pyx_v_x); /*proto*/
static PyObject *__pyx_pw_12pyrobuf_list_9TypedList_11extend(PyObject *__pyx_v_self, PyObject *__pyx_v_x) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("extend (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrobuf_list_9TypedList_10extend(((struct __pyx_obj_12pyrobuf_list_TypedList *)__pyx_v_self), ((PyObject *)__pyx_v_x));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_12pyrobuf_list_9TypedList_10extend(struct __pyx_obj_12pyrobuf_list_TypedList *__pyx_v_self, PyObject *__pyx_v_x) {
  PyObject *__pyx_v_listener = NULL;
  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;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_t_10;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("extend", 0);

  /* "pyrobuf_list.pyx":74
 * 
 *     def extend(self, x):
 *         try:             # <<<<<<<<<<<<<<
 *             assert isinstance(x, TypedList)
 *             assert self._list_type == x.list_type
 */
  {
    __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:*/ {

      /* "pyrobuf_list.pyx":75
 *     def extend(self, x):
 *         try:
 *             assert isinstance(x, TypedList)             # <<<<<<<<<<<<<<
 *             assert self._list_type == x.list_type
 *         except AssertionError:
 */
      #ifndef CYTHON_WITHOUT_ASSERTIONS
      if (unlikely(!Py_OptimizeFlag)) {
        __pyx_t_4 = __Pyx_TypeCheck(__pyx_v_x, __pyx_ptype_12pyrobuf_list_TypedList); 
        if (unlikely(!(__pyx_t_4 != 0))) {
          PyErr_SetNone(PyExc_AssertionError);
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 75; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      #endif

      /* "pyrobuf_list.pyx":76
 *         try:
 *             assert isinstance(x, TypedList)
 *             assert self._list_type == x.list_type             # <<<<<<<<<<<<<<
 *         except AssertionError:
 *             raise Exception("type mismatch")
 */
      #ifndef CYTHON_WITHOUT_ASSERTIONS
      if (unlikely(!Py_OptimizeFlag)) {
        __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_x, __pyx_n_s_list_type); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 76; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_6 = PyObject_RichCompare(((PyObject *)__pyx_v_self->_list_type), __pyx_t_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 76; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 76; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        if (unlikely(!__pyx_t_4)) {
          PyErr_SetNone(PyExc_AssertionError);
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 76; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      #endif

      /* "pyrobuf_list.pyx":74
 * 
 *     def extend(self, x):
 *         try:             # <<<<<<<<<<<<<<
 *             assert isinstance(x, TypedList)
 *             assert self._list_type == x.list_type
 */
    }
    __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;
    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;

    /* "pyrobuf_list.pyx":77
 *             assert isinstance(x, TypedList)
 *             assert self._list_type == x.list_type
 *         except AssertionError:             # <<<<<<<<<<<<<<
 *             raise Exception("type mismatch")
 * 
 */
    __pyx_t_7 = PyErr_ExceptionMatches(__pyx_builtin_AssertionError);
    if (__pyx_t_7) {
      __Pyx_AddTraceback("pyrobuf_list.TypedList.extend", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_5, &__pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 77; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
      __Pyx_GOTREF(__pyx_t_6);
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GOTREF(__pyx_t_8);

      /* "pyrobuf_list.pyx":78
 *             assert self._list_type == x.list_type
 *         except AssertionError:
 *             raise Exception("type mismatch")             # <<<<<<<<<<<<<<
 * 
 *         super(TypedList, self).extend(x)
 */
      __pyx_t_9 = __Pyx_PyObject_Call(__pyx_builtin_Exception, __pyx_tuple__4, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_Raise(__pyx_t_9, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
    }
    goto __pyx_L5_except_error;
    __pyx_L5_except_error:;

    /* "pyrobuf_list.pyx":74
 * 
 *     def extend(self, x):
 *         try:             # <<<<<<<<<<<<<<
 *             assert isinstance(x, TypedList)
 *             assert self._list_type == x.list_type
 */
    __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_L10_try_end:;
  }

  /* "pyrobuf_list.pyx":80
 *             raise Exception("type mismatch")
 * 
 *         super(TypedList, self).extend(x)             # <<<<<<<<<<<<<<
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:
 */
  __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_INCREF(((PyObject *)__pyx_ptype_12pyrobuf_list_TypedList));
  __Pyx_GIVEREF(((PyObject *)__pyx_ptype_12pyrobuf_list_TypedList));
  PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_ptype_12pyrobuf_list_TypedList));
  __Pyx_INCREF(((PyObject *)__pyx_v_self));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
  PyTuple_SET_ITEM(__pyx_t_5, 1, ((PyObject *)__pyx_v_self));
  __pyx_t_6 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_5, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_6);
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_extend); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
  __pyx_t_6 = NULL;
  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_5))) {
    __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
    if (likely(__pyx_t_6)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
      __Pyx_INCREF(__pyx_t_6);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_5, function);
    }
  }
  if (!__pyx_t_6) {
    __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_v_x); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_8);
  } else {
    __pyx_t_9 = PyTuple_New(1+1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_9);
    __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_6); __pyx_t_6 = NULL;
    __Pyx_INCREF(__pyx_v_x);
    __Pyx_GIVEREF(__pyx_v_x);
    PyTuple_SET_ITEM(__pyx_t_9, 0+1, __pyx_v_x);
    __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_9, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  }
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "pyrobuf_list.pyx":81
 * 
 *         super(TypedList, self).extend(x)
 *         listener = <object>self._listener             # <<<<<<<<<<<<<<
 *         if not listener._is_present_in_parent:
 *             listener._Modified()
 */
  __pyx_t_8 = ((PyObject *)__pyx_v_self->_listener);
  __Pyx_INCREF(__pyx_t_8);
  __pyx_v_listener = __pyx_t_8;
  __pyx_t_8 = 0;

  /* "pyrobuf_list.pyx":82
 *         super(TypedList, self).extend(x)
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:             # <<<<<<<<<<<<<<
 *             listener._Modified()
 * 
 */
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_listener, __pyx_n_s_is_present_in_parent); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 82; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_10 = ((!__pyx_t_4) != 0);
  if (__pyx_t_10) {

    /* "pyrobuf_list.pyx":83
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:
 *             listener._Modified()             # <<<<<<<<<<<<<<
 * 
 *     def insert(self, i, x):
 */
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_listener, __pyx_n_s_Modified); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_9 = NULL;
    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_9)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_9);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
      }
    }
    if (__pyx_t_9) {
      __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_9); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    } else {
      __pyx_t_8 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 83; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

    /* "pyrobuf_list.pyx":82
 *         super(TypedList, self).extend(x)
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:             # <<<<<<<<<<<<<<
 *             listener._Modified()
 * 
 */
  }

  /* "pyrobuf_list.pyx":73
 *             listener._Modified()
 * 
 *     def extend(self, x):             # <<<<<<<<<<<<<<
 *         try:
 *             assert isinstance(x, TypedList)
 */

  /* function exit code */
  __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_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("pyrobuf_list.TypedList.extend", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_listener);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrobuf_list.pyx":85
 *             listener._Modified()
 * 
 *     def insert(self, i, x):             # <<<<<<<<<<<<<<
 *         try:
 *             assert isinstance(x, self._list_type)
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrobuf_list_9TypedList_13insert(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_12pyrobuf_list_9TypedList_13insert(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_i = 0;
  PyObject *__pyx_v_x = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("insert (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_i,&__pyx_n_s_x,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_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 (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_x)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("insert", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 85; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "insert") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 85; __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_i = values[0];
    __pyx_v_x = values[1];
  }
  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 = 85; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyrobuf_list.TypedList.insert", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_12pyrobuf_list_9TypedList_12insert(((struct __pyx_obj_12pyrobuf_list_TypedList *)__pyx_v_self), __pyx_v_i, __pyx_v_x);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_12pyrobuf_list_9TypedList_12insert(struct __pyx_obj_12pyrobuf_list_TypedList *__pyx_v_self, PyObject *__pyx_v_i, PyObject *__pyx_v_x) {
  PyObject *__pyx_v_listener = NULL;
  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;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  Py_ssize_t __pyx_t_10;
  int __pyx_t_11;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("insert", 0);

  /* "pyrobuf_list.pyx":86
 * 
 *     def insert(self, i, x):
 *         try:             # <<<<<<<<<<<<<<
 *             assert isinstance(x, self._list_type)
 *         except AssertionError:
 */
  {
    __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:*/ {

      /* "pyrobuf_list.pyx":87
 *     def insert(self, i, x):
 *         try:
 *             assert isinstance(x, self._list_type)             # <<<<<<<<<<<<<<
 *         except AssertionError:
 *             raise Exception("type mismatch")
 */
      #ifndef CYTHON_WITHOUT_ASSERTIONS
      if (unlikely(!Py_OptimizeFlag)) {
        __pyx_t_4 = ((PyObject *)__pyx_v_self->_list_type);
        __Pyx_INCREF(__pyx_t_4);
        __pyx_t_5 = __Pyx_TypeCheck(__pyx_v_x, __pyx_t_4); 
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        if (unlikely(!(__pyx_t_5 != 0))) {
          PyErr_SetNone(PyExc_AssertionError);
          {__pyx_filename = __pyx_f[0]; __pyx_lineno = 87; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      #endif

      /* "pyrobuf_list.pyx":86
 * 
 *     def insert(self, i, x):
 *         try:             # <<<<<<<<<<<<<<
 *             assert isinstance(x, self._list_type)
 *         except AssertionError:
 */
    }
    __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_4); __pyx_t_4 = 0;

    /* "pyrobuf_list.pyx":88
 *         try:
 *             assert isinstance(x, self._list_type)
 *         except AssertionError:             # <<<<<<<<<<<<<<
 *             raise Exception("type mismatch")
 * 
 */
    __pyx_t_6 = PyErr_ExceptionMatches(__pyx_builtin_AssertionError);
    if (__pyx_t_6) {
      __Pyx_AddTraceback("pyrobuf_list.TypedList.insert", __pyx_clineno, __pyx_lineno, __pyx_filename);
      if (__Pyx_GetException(&__pyx_t_4, &__pyx_t_7, &__pyx_t_8) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 88; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_GOTREF(__pyx_t_8);

      /* "pyrobuf_list.pyx":89
 *             assert isinstance(x, self._list_type)
 *         except AssertionError:
 *             raise Exception("type mismatch")             # <<<<<<<<<<<<<<
 * 
 *         super(TypedList, self).insert(i, x)
 */
      __pyx_t_9 = __Pyx_PyObject_Call(__pyx_builtin_Exception, __pyx_tuple__5, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 89; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
      __Pyx_GOTREF(__pyx_t_9);
      __Pyx_Raise(__pyx_t_9, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 89; __pyx_clineno = __LINE__; goto __pyx_L5_except_error;}
    }
    goto __pyx_L5_except_error;
    __pyx_L5_except_error:;

    /* "pyrobuf_list.pyx":86
 * 
 *     def insert(self, i, x):
 *         try:             # <<<<<<<<<<<<<<
 *             assert isinstance(x, self._list_type)
 *         except AssertionError:
 */
    __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_L10_try_end:;
  }

  /* "pyrobuf_list.pyx":91
 *             raise Exception("type mismatch")
 * 
 *         super(TypedList, self).insert(i, x)             # <<<<<<<<<<<<<<
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:
 */
  __pyx_t_7 = PyTuple_New(2); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 91; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_INCREF(((PyObject *)__pyx_ptype_12pyrobuf_list_TypedList));
  __Pyx_GIVEREF(((PyObject *)__pyx_ptype_12pyrobuf_list_TypedList));
  PyTuple_SET_ITEM(__pyx_t_7, 0, ((PyObject *)__pyx_ptype_12pyrobuf_list_TypedList));
  __Pyx_INCREF(((PyObject *)__pyx_v_self));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
  PyTuple_SET_ITEM(__pyx_t_7, 1, ((PyObject *)__pyx_v_self));
  __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_7, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 91; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_insert); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 91; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_7);
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_4 = NULL;
  __pyx_t_10 = 0;
  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_7))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_7);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_7, function);
      __pyx_t_10 = 1;
    }
  }
  __pyx_t_9 = PyTuple_New(2+__pyx_t_10); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 91; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_9);
  if (__pyx_t_4) {
    __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_4); __pyx_t_4 = NULL;
  }
  __Pyx_INCREF(__pyx_v_i);
  __Pyx_GIVEREF(__pyx_v_i);
  PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_10, __pyx_v_i);
  __Pyx_INCREF(__pyx_v_x);
  __Pyx_GIVEREF(__pyx_v_x);
  PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_10, __pyx_v_x);
  __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_9, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 91; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

  /* "pyrobuf_list.pyx":92
 * 
 *         super(TypedList, self).insert(i, x)
 *         listener = <object>self._listener             # <<<<<<<<<<<<<<
 *         if not listener._is_present_in_parent:
 *             listener._Modified()
 */
  __pyx_t_8 = ((PyObject *)__pyx_v_self->_listener);
  __Pyx_INCREF(__pyx_t_8);
  __pyx_v_listener = __pyx_t_8;
  __pyx_t_8 = 0;

  /* "pyrobuf_list.pyx":93
 *         super(TypedList, self).insert(i, x)
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:             # <<<<<<<<<<<<<<
 *             listener._Modified()
 * 
 */
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_listener, __pyx_n_s_is_present_in_parent); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 93; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 93; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_11 = ((!__pyx_t_5) != 0);
  if (__pyx_t_11) {

    /* "pyrobuf_list.pyx":94
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:
 *             listener._Modified()             # <<<<<<<<<<<<<<
 * 
 * 
 */
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_listener, __pyx_n_s_Modified); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_9 = NULL;
    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_9)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_9);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
      }
    }
    if (__pyx_t_9) {
      __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_9); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    } else {
      __pyx_t_8 = __Pyx_PyObject_CallNoArg(__pyx_t_7); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 94; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

    /* "pyrobuf_list.pyx":93
 *         super(TypedList, self).insert(i, x)
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:             # <<<<<<<<<<<<<<
 *             listener._Modified()
 * 
 */
  }

  /* "pyrobuf_list.pyx":85
 *             listener._Modified()
 * 
 *     def insert(self, i, x):             # <<<<<<<<<<<<<<
 *         try:
 *             assert isinstance(x, self._list_type)
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("pyrobuf_list.TypedList.insert", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_listener);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrobuf_list.pyx":99
 * cdef class BytesList(list):
 * 
 *     def __init__(self, object listener=None):             # <<<<<<<<<<<<<<
 *         if listener is None:
 *             self._listener = <PyObject *>null_listener
 */

/* Python wrapper */
static int __pyx_pw_12pyrobuf_list_9BytesList_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_12pyrobuf_list_9BytesList_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_listener = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_listener,0};
    PyObject* values[1] = {0};
    values[0] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_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 (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_listener);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      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;
      }
    }
    __pyx_v_listener = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 99; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyrobuf_list.BytesList.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_12pyrobuf_list_9BytesList___init__(((struct __pyx_obj_12pyrobuf_list_BytesList *)__pyx_v_self), __pyx_v_listener);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_12pyrobuf_list_9BytesList___init__(struct __pyx_obj_12pyrobuf_list_BytesList *__pyx_v_self, PyObject *__pyx_v_listener) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "pyrobuf_list.pyx":100
 * 
 *     def __init__(self, object listener=None):
 *         if listener is None:             # <<<<<<<<<<<<<<
 *             self._listener = <PyObject *>null_listener
 *         else:
 */
  __pyx_t_1 = (__pyx_v_listener == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "pyrobuf_list.pyx":101
 *     def __init__(self, object listener=None):
 *         if listener is None:
 *             self._listener = <PyObject *>null_listener             # <<<<<<<<<<<<<<
 *         else:
 *             self._listener = <PyObject *>listener
 */
    __pyx_v_self->_listener = ((PyObject *)null_listener);

    /* "pyrobuf_list.pyx":100
 * 
 *     def __init__(self, object listener=None):
 *         if listener is None:             # <<<<<<<<<<<<<<
 *             self._listener = <PyObject *>null_listener
 *         else:
 */
    goto __pyx_L3;
  }

  /* "pyrobuf_list.pyx":103
 *             self._listener = <PyObject *>null_listener
 *         else:
 *             self._listener = <PyObject *>listener             # <<<<<<<<<<<<<<
 * 
 *     def __setitem__(self, i, x):
 */
  /*else*/ {
    __pyx_v_self->_listener = ((PyObject *)__pyx_v_listener);
  }
  __pyx_L3:;

  /* "pyrobuf_list.pyx":99
 * cdef class BytesList(list):
 * 
 *     def __init__(self, object listener=None):             # <<<<<<<<<<<<<<
 *         if listener is None:
 *             self._listener = <PyObject *>null_listener
 */

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrobuf_list.pyx":105
 *             self._listener = <PyObject *>listener
 * 
 *     def __setitem__(self, i, x):             # <<<<<<<<<<<<<<
 *         cdef list values
 * 
 */

/* Python wrapper */
static int __pyx_pw_12pyrobuf_list_9BytesList_3__setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_i, PyObject *__pyx_v_x); /*proto*/
static int __pyx_pw_12pyrobuf_list_9BytesList_3__setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_i, PyObject *__pyx_v_x) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setitem__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrobuf_list_9BytesList_2__setitem__(((struct __pyx_obj_12pyrobuf_list_BytesList *)__pyx_v_self), ((PyObject *)__pyx_v_i), ((PyObject *)__pyx_v_x));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_12pyrobuf_list_9BytesList_2__setitem__(struct __pyx_obj_12pyrobuf_list_BytesList *__pyx_v_self, PyObject *__pyx_v_i, PyObject *__pyx_v_x) {
  PyObject *__pyx_v_values = 0;
  PyObject *__pyx_v_val = NULL;
  PyObject *__pyx_v_listener = NULL;
  int __pyx_r;
  __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;
  Py_ssize_t __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *(*__pyx_t_9)(PyObject *);
  int __pyx_t_10;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setitem__", 0);

  /* "pyrobuf_list.pyx":108
 *         cdef list values
 * 
 *         if isinstance(i, (int, long)):             # <<<<<<<<<<<<<<
 *             if not isinstance(x, str):
 *                 raise TypeError("%r has type %s, but expected one of: (%s,)" % (x, type(x), str))
 */
  __pyx_t_2 = PyInt_Check(__pyx_v_i); 
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (!__pyx_t_3) {
  } else {
    __pyx_t_1 = __pyx_t_3;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_3 = PyLong_Check(__pyx_v_i); 
  __pyx_t_2 = (__pyx_t_3 != 0);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L4_bool_binop_done:;
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "pyrobuf_list.pyx":109
 * 
 *         if isinstance(i, (int, long)):
 *             if not isinstance(x, str):             # <<<<<<<<<<<<<<
 *                 raise TypeError("%r has type %s, but expected one of: (%s,)" % (x, type(x), str))
 * 
 */
    __pyx_t_2 = PyString_Check(__pyx_v_x); 
    __pyx_t_1 = ((!(__pyx_t_2 != 0)) != 0);
    if (__pyx_t_1) {

      /* "pyrobuf_list.pyx":110
 *         if isinstance(i, (int, long)):
 *             if not isinstance(x, str):
 *                 raise TypeError("%r has type %s, but expected one of: (%s,)" % (x, type(x), str))             # <<<<<<<<<<<<<<
 * 
 *             list.__setitem__(self, i, x)
 */
      __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_INCREF(__pyx_v_x);
      __Pyx_GIVEREF(__pyx_v_x);
      PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_x);
      __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_v_x)));
      __Pyx_GIVEREF(((PyObject *)Py_TYPE(__pyx_v_x)));
      PyTuple_SET_ITEM(__pyx_t_4, 1, ((PyObject *)Py_TYPE(__pyx_v_x)));
      __Pyx_INCREF(((PyObject *)(&PyString_Type)));
      __Pyx_GIVEREF(((PyObject *)(&PyString_Type)));
      PyTuple_SET_ITEM(__pyx_t_4, 2, ((PyObject *)(&PyString_Type)));
      __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_r_has_type_s_but_expected_one_o, __pyx_t_4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GIVEREF(__pyx_t_5);
      PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5);
      __pyx_t_5 = 0;
      __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_Raise(__pyx_t_5, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

      /* "pyrobuf_list.pyx":109
 * 
 *         if isinstance(i, (int, long)):
 *             if not isinstance(x, str):             # <<<<<<<<<<<<<<
 *                 raise TypeError("%r has type %s, but expected one of: (%s,)" % (x, type(x), str))
 * 
 */
    }

    /* "pyrobuf_list.pyx":112
 *                 raise TypeError("%r has type %s, but expected one of: (%s,)" % (x, type(x), str))
 * 
 *             list.__setitem__(self, i, x)             # <<<<<<<<<<<<<<
 *         elif isinstance(i, slice):
 *             values = list()
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)(&PyList_Type)), __pyx_n_s_setitem); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = NULL;
    __pyx_t_7 = 0;
    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
        __pyx_t_7 = 1;
      }
    }
    __pyx_t_8 = PyTuple_New(3+__pyx_t_7); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_8);
    if (__pyx_t_6) {
      __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL;
    }
    __Pyx_INCREF(((PyObject *)__pyx_v_self));
    __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
    PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, ((PyObject *)__pyx_v_self));
    __Pyx_INCREF(__pyx_v_i);
    __Pyx_GIVEREF(__pyx_v_i);
    PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_v_i);
    __Pyx_INCREF(__pyx_v_x);
    __Pyx_GIVEREF(__pyx_v_x);
    PyTuple_SET_ITEM(__pyx_t_8, 2+__pyx_t_7, __pyx_v_x);
    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_8, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "pyrobuf_list.pyx":108
 *         cdef list values
 * 
 *         if isinstance(i, (int, long)):             # <<<<<<<<<<<<<<
 *             if not isinstance(x, str):
 *                 raise TypeError("%r has type %s, but expected one of: (%s,)" % (x, type(x), str))
 */
    goto __pyx_L3;
  }

  /* "pyrobuf_list.pyx":113
 * 
 *             list.__setitem__(self, i, x)
 *         elif isinstance(i, slice):             # <<<<<<<<<<<<<<
 *             values = list()
 * 
 */
  __pyx_t_1 = PySlice_Check(__pyx_v_i); 
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "pyrobuf_list.pyx":114
 *             list.__setitem__(self, i, x)
 *         elif isinstance(i, slice):
 *             values = list()             # <<<<<<<<<<<<<<
 * 
 *             for val in x:
 */
    __pyx_t_5 = PyList_New(0); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_v_values = ((PyObject*)__pyx_t_5);
    __pyx_t_5 = 0;

    /* "pyrobuf_list.pyx":116
 *             values = list()
 * 
 *             for val in x:             # <<<<<<<<<<<<<<
 *                 if isinstance(val, str):
 *                     values.append(val)
 */
    if (likely(PyList_CheckExact(__pyx_v_x)) || PyTuple_CheckExact(__pyx_v_x)) {
      __pyx_t_5 = __pyx_v_x; __Pyx_INCREF(__pyx_t_5); __pyx_t_7 = 0;
      __pyx_t_9 = NULL;
    } else {
      __pyx_t_7 = -1; __pyx_t_5 = PyObject_GetIter(__pyx_v_x); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 116; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_9 = Py_TYPE(__pyx_t_5)->tp_iternext; if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 116; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    for (;;) {
      if (likely(!__pyx_t_9)) {
        if (likely(PyList_CheckExact(__pyx_t_5))) {
          if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_5)) break;
          #if CYTHON_COMPILING_IN_CPYTHON
          __pyx_t_4 = PyList_GET_ITEM(__pyx_t_5, __pyx_t_7); __Pyx_INCREF(__pyx_t_4); __pyx_t_7++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 116; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          #else
          __pyx_t_4 = PySequence_ITEM(__pyx_t_5, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 116; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_4);
          #endif
        } else {
          if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_5)) break;
          #if CYTHON_COMPILING_IN_CPYTHON
          __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_5, __pyx_t_7); __Pyx_INCREF(__pyx_t_4); __pyx_t_7++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 116; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          #else
          __pyx_t_4 = PySequence_ITEM(__pyx_t_5, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 116; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_4);
          #endif
        }
      } else {
        __pyx_t_4 = __pyx_t_9(__pyx_t_5);
        if (unlikely(!__pyx_t_4)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 116; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_4);
      }
      __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_4);
      __pyx_t_4 = 0;

      /* "pyrobuf_list.pyx":117
 * 
 *             for val in x:
 *                 if isinstance(val, str):             # <<<<<<<<<<<<<<
 *                     values.append(val)
 *                 else:
 */
      __pyx_t_2 = PyString_Check(__pyx_v_val); 
      __pyx_t_1 = (__pyx_t_2 != 0);
      if (__pyx_t_1) {

        /* "pyrobuf_list.pyx":118
 *             for val in x:
 *                 if isinstance(val, str):
 *                     values.append(val)             # <<<<<<<<<<<<<<
 *                 else:
 *                     raise TypeError("%r has type %s, but expected one of: (%s,)" % (val, type(val), str))
 */
        __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_values, __pyx_v_val); if (unlikely(__pyx_t_10 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 118; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

        /* "pyrobuf_list.pyx":117
 * 
 *             for val in x:
 *                 if isinstance(val, str):             # <<<<<<<<<<<<<<
 *                     values.append(val)
 *                 else:
 */
        goto __pyx_L9;
      }

      /* "pyrobuf_list.pyx":120
 *                     values.append(val)
 *                 else:
 *                     raise TypeError("%r has type %s, but expected one of: (%s,)" % (val, type(val), str))             # <<<<<<<<<<<<<<
 * 
 *             list.__setitem__(self, i, values)
 */
      /*else*/ {
        __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_INCREF(__pyx_v_val);
        __Pyx_GIVEREF(__pyx_v_val);
        PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_val);
        __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_v_val)));
        __Pyx_GIVEREF(((PyObject *)Py_TYPE(__pyx_v_val)));
        PyTuple_SET_ITEM(__pyx_t_4, 1, ((PyObject *)Py_TYPE(__pyx_v_val)));
        __Pyx_INCREF(((PyObject *)(&PyString_Type)));
        __Pyx_GIVEREF(((PyObject *)(&PyString_Type)));
        PyTuple_SET_ITEM(__pyx_t_4, 2, ((PyObject *)(&PyString_Type)));
        __pyx_t_8 = __Pyx_PyString_Format(__pyx_kp_s_r_has_type_s_but_expected_one_o, __pyx_t_4); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_4);
        __Pyx_GIVEREF(__pyx_t_8);
        PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_8);
        __pyx_t_8 = 0;
        __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
        __Pyx_Raise(__pyx_t_8, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_L9:;

      /* "pyrobuf_list.pyx":116
 *             values = list()
 * 
 *             for val in x:             # <<<<<<<<<<<<<<
 *                 if isinstance(val, str):
 *                     values.append(val)
 */
    }
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "pyrobuf_list.pyx":122
 *                     raise TypeError("%r has type %s, but expected one of: (%s,)" % (val, type(val), str))
 * 
 *             list.__setitem__(self, i, values)             # <<<<<<<<<<<<<<
 *         else:
 *             raise TypeError("list indices must be integers, not %s" % type(i).__name__)
 */
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)(&PyList_Type)), __pyx_n_s_setitem); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_4 = NULL;
    __pyx_t_7 = 0;
    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_8))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_8);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_8, function);
        __pyx_t_7 = 1;
      }
    }
    __pyx_t_6 = PyTuple_New(3+__pyx_t_7); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    if (__pyx_t_4) {
      __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); __pyx_t_4 = NULL;
    }
    __Pyx_INCREF(((PyObject *)__pyx_v_self));
    __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
    PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_7, ((PyObject *)__pyx_v_self));
    __Pyx_INCREF(__pyx_v_i);
    __Pyx_GIVEREF(__pyx_v_i);
    PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_7, __pyx_v_i);
    __Pyx_INCREF(__pyx_v_values);
    __Pyx_GIVEREF(__pyx_v_values);
    PyTuple_SET_ITEM(__pyx_t_6, 2+__pyx_t_7, __pyx_v_values);
    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "pyrobuf_list.pyx":113
 * 
 *             list.__setitem__(self, i, x)
 *         elif isinstance(i, slice):             # <<<<<<<<<<<<<<
 *             values = list()
 * 
 */
    goto __pyx_L3;
  }

  /* "pyrobuf_list.pyx":124
 *             list.__setitem__(self, i, values)
 *         else:
 *             raise TypeError("list indices must be integers, not %s" % type(i).__name__)             # <<<<<<<<<<<<<<
 * 
 *         listener = <object>self._listener
 */
  /*else*/ {
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)Py_TYPE(__pyx_v_i)), __pyx_n_s_name); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_8 = __Pyx_PyString_Format(__pyx_kp_s_list_indices_must_be_integers_no, __pyx_t_5); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_GIVEREF(__pyx_t_8);
    PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_8);
    __pyx_t_8 = 0;
    __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_Raise(__pyx_t_8, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 124; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_L3:;

  /* "pyrobuf_list.pyx":126
 *             raise TypeError("list indices must be integers, not %s" % type(i).__name__)
 * 
 *         listener = <object>self._listener             # <<<<<<<<<<<<<<
 *         if not listener._is_present_in_parent:
 *             listener._Modified()
 */
  __pyx_t_8 = ((PyObject *)__pyx_v_self->_listener);
  __Pyx_INCREF(__pyx_t_8);
  __pyx_v_listener = __pyx_t_8;
  __pyx_t_8 = 0;

  /* "pyrobuf_list.pyx":127
 * 
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:             # <<<<<<<<<<<<<<
 *             listener._Modified()
 * 
 */
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_listener, __pyx_n_s_is_present_in_parent); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 127; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_8); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 127; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __pyx_t_2 = ((!__pyx_t_1) != 0);
  if (__pyx_t_2) {

    /* "pyrobuf_list.pyx":128
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:
 *             listener._Modified()             # <<<<<<<<<<<<<<
 * 
 * 
 */
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_listener, __pyx_n_s_Modified); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = NULL;
    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
      }
    }
    if (__pyx_t_6) {
      __pyx_t_8 = __Pyx_PyObject_CallOneArg(__pyx_t_5, __pyx_t_6); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    } else {
      __pyx_t_8 = __Pyx_PyObject_CallNoArg(__pyx_t_5); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __Pyx_GOTREF(__pyx_t_8);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

    /* "pyrobuf_list.pyx":127
 * 
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:             # <<<<<<<<<<<<<<
 *             listener._Modified()
 * 
 */
  }

  /* "pyrobuf_list.pyx":105
 *             self._listener = <PyObject *>listener
 * 
 *     def __setitem__(self, i, x):             # <<<<<<<<<<<<<<
 *         cdef list values
 * 
 */

  /* function exit code */
  __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("pyrobuf_list.BytesList.__setitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_values);
  __Pyx_XDECREF(__pyx_v_val);
  __Pyx_XDECREF(__pyx_v_listener);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrobuf_list.pyx":131
 * 
 * 
 *     def __setslice__(self, i, j, x):             # <<<<<<<<<<<<<<
 *         cdef list values = list()
 * 
 */

/* Python wrapper */
static int __pyx_pw_12pyrobuf_list_9BytesList_5__setslice__(PyObject *__pyx_v_self, Py_ssize_t __pyx_arg_i, Py_ssize_t __pyx_arg_j, PyObject *__pyx_v_x); /*proto*/
static int __pyx_pw_12pyrobuf_list_9BytesList_5__setslice__(PyObject *__pyx_v_self, Py_ssize_t __pyx_arg_i, Py_ssize_t __pyx_arg_j, PyObject *__pyx_v_x) {
  PyObject *__pyx_v_i = 0;
  PyObject *__pyx_v_j = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setslice__ (wrapper)", 0);
  __pyx_v_i = PyInt_FromSsize_t(__pyx_arg_i); if (unlikely(!__pyx_v_i)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __Pyx_GOTREF(__pyx_v_i);
  __pyx_v_j = PyInt_FromSsize_t(__pyx_arg_j); if (unlikely(!__pyx_v_j)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 131; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __Pyx_GOTREF(__pyx_v_j);
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyrobuf_list.BytesList.__setslice__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_12pyrobuf_list_9BytesList_4__setslice__(((struct __pyx_obj_12pyrobuf_list_BytesList *)__pyx_v_self), ((PyObject *)__pyx_v_i), ((PyObject *)__pyx_v_j), ((PyObject *)__pyx_v_x));

  /* function exit code */
  __Pyx_XDECREF(__pyx_v_i);
  __Pyx_XDECREF(__pyx_v_j);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_12pyrobuf_list_9BytesList_4__setslice__(struct __pyx_obj_12pyrobuf_list_BytesList *__pyx_v_self, PyObject *__pyx_v_i, PyObject *__pyx_v_j, PyObject *__pyx_v_x) {
  PyObject *__pyx_v_values = 0;
  PyObject *__pyx_v_val = NULL;
  PyObject *__pyx_v_listener = NULL;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  PyObject *(*__pyx_t_3)(PyObject *);
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  int __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setslice__", 0);

  /* "pyrobuf_list.pyx":132
 * 
 *     def __setslice__(self, i, j, x):
 *         cdef list values = list()             # <<<<<<<<<<<<<<
 * 
 *         for val in x:
 */
  __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 132; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_v_values = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrobuf_list.pyx":134
 *         cdef list values = list()
 * 
 *         for val in x:             # <<<<<<<<<<<<<<
 *             if isinstance(val, str):
 *                 values.append(val)
 */
  if (likely(PyList_CheckExact(__pyx_v_x)) || PyTuple_CheckExact(__pyx_v_x)) {
    __pyx_t_1 = __pyx_v_x; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
    __pyx_t_3 = NULL;
  } else {
    __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_x); 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_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 134; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  for (;;) {
    if (likely(!__pyx_t_3)) {
      if (likely(PyList_CheckExact(__pyx_t_1))) {
        if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_COMPILING_IN_CPYTHON
        __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 134; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 134; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      } else {
        if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_COMPILING_IN_CPYTHON
        __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 134; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 134; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      }
    } else {
      __pyx_t_4 = __pyx_t_3(__pyx_t_1);
      if (unlikely(!__pyx_t_4)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 134; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_4);
    }
    __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "pyrobuf_list.pyx":135
 * 
 *         for val in x:
 *             if isinstance(val, str):             # <<<<<<<<<<<<<<
 *                 values.append(val)
 *             else:
 */
    __pyx_t_5 = PyString_Check(__pyx_v_val); 
    __pyx_t_6 = (__pyx_t_5 != 0);
    if (__pyx_t_6) {

      /* "pyrobuf_list.pyx":136
 *         for val in x:
 *             if isinstance(val, str):
 *                 values.append(val)             # <<<<<<<<<<<<<<
 *             else:
 *                 raise TypeError("%r has type %s, but expected one of: (%s,)" % (val, type(val), str))
 */
      __pyx_t_7 = __Pyx_PyList_Append(__pyx_v_values, __pyx_v_val); if (unlikely(__pyx_t_7 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 136; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

      /* "pyrobuf_list.pyx":135
 * 
 *         for val in x:
 *             if isinstance(val, str):             # <<<<<<<<<<<<<<
 *                 values.append(val)
 *             else:
 */
      goto __pyx_L5;
    }

    /* "pyrobuf_list.pyx":138
 *                 values.append(val)
 *             else:
 *                 raise TypeError("%r has type %s, but expected one of: (%s,)" % (val, type(val), str))             # <<<<<<<<<<<<<<
 * 
 *         list.__setslice__(self, i, j, values)
 */
    /*else*/ {
      __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 138; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_INCREF(__pyx_v_val);
      __Pyx_GIVEREF(__pyx_v_val);
      PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_val);
      __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_v_val)));
      __Pyx_GIVEREF(((PyObject *)Py_TYPE(__pyx_v_val)));
      PyTuple_SET_ITEM(__pyx_t_4, 1, ((PyObject *)Py_TYPE(__pyx_v_val)));
      __Pyx_INCREF(((PyObject *)(&PyString_Type)));
      __Pyx_GIVEREF(((PyObject *)(&PyString_Type)));
      PyTuple_SET_ITEM(__pyx_t_4, 2, ((PyObject *)(&PyString_Type)));
      __pyx_t_8 = __Pyx_PyString_Format(__pyx_kp_s_r_has_type_s_but_expected_one_o, __pyx_t_4); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 138; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 138; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GIVEREF(__pyx_t_8);
      PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_8);
      __pyx_t_8 = 0;
      __pyx_t_8 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 138; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_8);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_Raise(__pyx_t_8, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 138; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_L5:;

    /* "pyrobuf_list.pyx":134
 *         cdef list values = list()
 * 
 *         for val in x:             # <<<<<<<<<<<<<<
 *             if isinstance(val, str):
 *                 values.append(val)
 */
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pyrobuf_list.pyx":140
 *                 raise TypeError("%r has type %s, but expected one of: (%s,)" % (val, type(val), str))
 * 
 *         list.__setslice__(self, i, j, values)             # <<<<<<<<<<<<<<
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:
 */
  __pyx_t_8 = __Pyx_PyObject_GetAttrStr(((PyObject *)(&PyList_Type)), __pyx_n_s_setslice); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_8);
  __pyx_t_4 = NULL;
  __pyx_t_2 = 0;
  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_8))) {
    __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_8);
    if (likely(__pyx_t_4)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
      __Pyx_INCREF(__pyx_t_4);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_8, function);
      __pyx_t_2 = 1;
    }
  }
  __pyx_t_9 = PyTuple_New(4+__pyx_t_2); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_9);
  if (__pyx_t_4) {
    __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_4); __pyx_t_4 = NULL;
  }
  __Pyx_INCREF(((PyObject *)__pyx_v_self));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
  PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_2, ((PyObject *)__pyx_v_self));
  __Pyx_INCREF(__pyx_v_i);
  __Pyx_GIVEREF(__pyx_v_i);
  PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_2, __pyx_v_i);
  __Pyx_INCREF(__pyx_v_j);
  __Pyx_GIVEREF(__pyx_v_j);
  PyTuple_SET_ITEM(__pyx_t_9, 2+__pyx_t_2, __pyx_v_j);
  __Pyx_INCREF(__pyx_v_values);
  __Pyx_GIVEREF(__pyx_v_values);
  PyTuple_SET_ITEM(__pyx_t_9, 3+__pyx_t_2, __pyx_v_values);
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 140; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pyrobuf_list.pyx":141
 * 
 *         list.__setslice__(self, i, j, values)
 *         listener = <object>self._listener             # <<<<<<<<<<<<<<
 *         if not listener._is_present_in_parent:
 *             listener._Modified()
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_self->_listener);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_v_listener = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pyrobuf_list.pyx":142
 *         list.__setslice__(self, i, j, values)
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:             # <<<<<<<<<<<<<<
 *             listener._Modified()
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_listener, __pyx_n_s_is_present_in_parent); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 142; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 142; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_5 = ((!__pyx_t_6) != 0);
  if (__pyx_t_5) {

    /* "pyrobuf_list.pyx":143
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:
 *             listener._Modified()             # <<<<<<<<<<<<<<
 * 
 *     def append(self, x):
 */
    __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_v_listener, __pyx_n_s_Modified); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_8);
    __pyx_t_9 = NULL;
    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_8))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_8);
      if (likely(__pyx_t_9)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_8);
        __Pyx_INCREF(__pyx_t_9);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_8, function);
      }
    }
    if (__pyx_t_9) {
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_8, __pyx_t_9); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 143; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    } else {
      __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_8); 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_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "pyrobuf_list.pyx":142
 *         list.__setslice__(self, i, j, values)
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:             # <<<<<<<<<<<<<<
 *             listener._Modified()
 * 
 */
  }

  /* "pyrobuf_list.pyx":131
 * 
 * 
 *     def __setslice__(self, i, j, x):             # <<<<<<<<<<<<<<
 *         cdef list values = list()
 * 
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("pyrobuf_list.BytesList.__setslice__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_values);
  __Pyx_XDECREF(__pyx_v_val);
  __Pyx_XDECREF(__pyx_v_listener);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrobuf_list.pyx":145
 *             listener._Modified()
 * 
 *     def append(self, x):             # <<<<<<<<<<<<<<
 *         if not isinstance(x, str):
 *             raise TypeError("%r has type %s, but expected one of: (%s,)" % (x, type(x), str))
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrobuf_list_9BytesList_7append(PyObject *__pyx_v_self, PyObject *__pyx_v_x); /*proto*/
static PyObject *__pyx_pw_12pyrobuf_list_9BytesList_7append(PyObject *__pyx_v_self, PyObject *__pyx_v_x) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("append (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrobuf_list_9BytesList_6append(((struct __pyx_obj_12pyrobuf_list_BytesList *)__pyx_v_self), ((PyObject *)__pyx_v_x));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_12pyrobuf_list_9BytesList_6append(struct __pyx_obj_12pyrobuf_list_BytesList *__pyx_v_self, PyObject *__pyx_v_x) {
  PyObject *__pyx_v_listener = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("append", 0);

  /* "pyrobuf_list.pyx":146
 * 
 *     def append(self, x):
 *         if not isinstance(x, str):             # <<<<<<<<<<<<<<
 *             raise TypeError("%r has type %s, but expected one of: (%s,)" % (x, type(x), str))
 * 
 */
  __pyx_t_1 = PyString_Check(__pyx_v_x); 
  __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0);
  if (__pyx_t_2) {

    /* "pyrobuf_list.pyx":147
 *     def append(self, x):
 *         if not isinstance(x, str):
 *             raise TypeError("%r has type %s, but expected one of: (%s,)" % (x, type(x), str))             # <<<<<<<<<<<<<<
 * 
 *         list.append(self, x)
 */
    __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 147; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_v_x);
    __Pyx_GIVEREF(__pyx_v_x);
    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_x);
    __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_v_x)));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(__pyx_v_x)));
    PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)Py_TYPE(__pyx_v_x)));
    __Pyx_INCREF(((PyObject *)(&PyString_Type)));
    __Pyx_GIVEREF(((PyObject *)(&PyString_Type)));
    PyTuple_SET_ITEM(__pyx_t_3, 2, ((PyObject *)(&PyString_Type)));
    __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_r_has_type_s_but_expected_one_o, __pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 147; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __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 = 147; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4);
    __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 147; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_Raise(__pyx_t_4, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 147; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

    /* "pyrobuf_list.pyx":146
 * 
 *     def append(self, x):
 *         if not isinstance(x, str):             # <<<<<<<<<<<<<<
 *             raise TypeError("%r has type %s, but expected one of: (%s,)" % (x, type(x), str))
 * 
 */
  }

  /* "pyrobuf_list.pyx":149
 *             raise TypeError("%r has type %s, but expected one of: (%s,)" % (x, type(x), str))
 * 
 *         list.append(self, x)             # <<<<<<<<<<<<<<
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:
 */
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_TypeError, "descriptor '%s' requires a '%s' object but received a 'NoneType'", "append", "list");
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_5 = __Pyx_PyList_Append(((PyObject*)__pyx_v_self), __pyx_v_x); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 149; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pyrobuf_list.pyx":150
 * 
 *         list.append(self, x)
 *         listener = <object>self._listener             # <<<<<<<<<<<<<<
 *         if not listener._is_present_in_parent:
 *             listener._Modified()
 */
  __pyx_t_4 = ((PyObject *)__pyx_v_self->_listener);
  __Pyx_INCREF(__pyx_t_4);
  __pyx_v_listener = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "pyrobuf_list.pyx":151
 *         list.append(self, x)
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:             # <<<<<<<<<<<<<<
 *             listener._Modified()
 * 
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_listener, __pyx_n_s_is_present_in_parent); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 151; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 151; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_1 = ((!__pyx_t_2) != 0);
  if (__pyx_t_1) {

    /* "pyrobuf_list.pyx":152
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:
 *             listener._Modified()             # <<<<<<<<<<<<<<
 * 
 *     def extend(self, x):
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_listener, __pyx_n_s_Modified); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 152; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_6 = NULL;
    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
      }
    }
    if (__pyx_t_6) {
      __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_6); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 152; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    } else {
      __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 152; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "pyrobuf_list.pyx":151
 *         list.append(self, x)
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:             # <<<<<<<<<<<<<<
 *             listener._Modified()
 * 
 */
  }

  /* "pyrobuf_list.pyx":145
 *             listener._Modified()
 * 
 *     def append(self, x):             # <<<<<<<<<<<<<<
 *         if not isinstance(x, str):
 *             raise TypeError("%r has type %s, but expected one of: (%s,)" % (x, type(x), str))
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("pyrobuf_list.BytesList.append", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_listener);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrobuf_list.pyx":154
 *             listener._Modified()
 * 
 *     def extend(self, x):             # <<<<<<<<<<<<<<
 *         for val in x:
 *             if not isinstance(val, str):
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrobuf_list_9BytesList_9extend(PyObject *__pyx_v_self, PyObject *__pyx_v_x); /*proto*/
static PyObject *__pyx_pw_12pyrobuf_list_9BytesList_9extend(PyObject *__pyx_v_self, PyObject *__pyx_v_x) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("extend (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrobuf_list_9BytesList_8extend(((struct __pyx_obj_12pyrobuf_list_BytesList *)__pyx_v_self), ((PyObject *)__pyx_v_x));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_12pyrobuf_list_9BytesList_8extend(struct __pyx_obj_12pyrobuf_list_BytesList *__pyx_v_self, PyObject *__pyx_v_x) {
  PyObject *__pyx_v_val = NULL;
  PyObject *__pyx_v_listener = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  PyObject *(*__pyx_t_3)(PyObject *);
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("extend", 0);

  /* "pyrobuf_list.pyx":155
 * 
 *     def extend(self, x):
 *         for val in x:             # <<<<<<<<<<<<<<
 *             if not isinstance(val, str):
 *                 raise TypeError("%r has type %s, but expected one of: (%s,)" % (val, type(val), str))
 */
  if (likely(PyList_CheckExact(__pyx_v_x)) || PyTuple_CheckExact(__pyx_v_x)) {
    __pyx_t_1 = __pyx_v_x; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
    __pyx_t_3 = NULL;
  } else {
    __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_x); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 155; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 155; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  for (;;) {
    if (likely(!__pyx_t_3)) {
      if (likely(PyList_CheckExact(__pyx_t_1))) {
        if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_COMPILING_IN_CPYTHON
        __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 155; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 155; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      } else {
        if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_COMPILING_IN_CPYTHON
        __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 155; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 155; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      }
    } else {
      __pyx_t_4 = __pyx_t_3(__pyx_t_1);
      if (unlikely(!__pyx_t_4)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 155; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_4);
    }
    __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "pyrobuf_list.pyx":156
 *     def extend(self, x):
 *         for val in x:
 *             if not isinstance(val, str):             # <<<<<<<<<<<<<<
 *                 raise TypeError("%r has type %s, but expected one of: (%s,)" % (val, type(val), str))
 *             list.append(self, val)
 */
    __pyx_t_5 = PyString_Check(__pyx_v_val); 
    __pyx_t_6 = ((!(__pyx_t_5 != 0)) != 0);
    if (__pyx_t_6) {

      /* "pyrobuf_list.pyx":157
 *         for val in x:
 *             if not isinstance(val, str):
 *                 raise TypeError("%r has type %s, but expected one of: (%s,)" % (val, type(val), str))             # <<<<<<<<<<<<<<
 *             list.append(self, val)
 * 
 */
      __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_INCREF(__pyx_v_val);
      __Pyx_GIVEREF(__pyx_v_val);
      PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_val);
      __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_v_val)));
      __Pyx_GIVEREF(((PyObject *)Py_TYPE(__pyx_v_val)));
      PyTuple_SET_ITEM(__pyx_t_4, 1, ((PyObject *)Py_TYPE(__pyx_v_val)));
      __Pyx_INCREF(((PyObject *)(&PyString_Type)));
      __Pyx_GIVEREF(((PyObject *)(&PyString_Type)));
      PyTuple_SET_ITEM(__pyx_t_4, 2, ((PyObject *)(&PyString_Type)));
      __pyx_t_7 = __Pyx_PyString_Format(__pyx_kp_s_r_has_type_s_but_expected_one_o, __pyx_t_4); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_GIVEREF(__pyx_t_7);
      PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_7);
      __pyx_t_7 = 0;
      __pyx_t_7 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __Pyx_Raise(__pyx_t_7, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 157; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

      /* "pyrobuf_list.pyx":156
 *     def extend(self, x):
 *         for val in x:
 *             if not isinstance(val, str):             # <<<<<<<<<<<<<<
 *                 raise TypeError("%r has type %s, but expected one of: (%s,)" % (val, type(val), str))
 *             list.append(self, val)
 */
    }

    /* "pyrobuf_list.pyx":158
 *             if not isinstance(val, str):
 *                 raise TypeError("%r has type %s, but expected one of: (%s,)" % (val, type(val), str))
 *             list.append(self, val)             # <<<<<<<<<<<<<<
 * 
 *         listener = <object>self._listener
 */
    if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
      PyErr_Format(PyExc_TypeError, "descriptor '%s' requires a '%s' object but received a 'NoneType'", "append", "list");
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 158; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_8 = __Pyx_PyList_Append(((PyObject*)__pyx_v_self), __pyx_v_val); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 158; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

    /* "pyrobuf_list.pyx":155
 * 
 *     def extend(self, x):
 *         for val in x:             # <<<<<<<<<<<<<<
 *             if not isinstance(val, str):
 *                 raise TypeError("%r has type %s, but expected one of: (%s,)" % (val, type(val), str))
 */
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pyrobuf_list.pyx":160
 *             list.append(self, val)
 * 
 *         listener = <object>self._listener             # <<<<<<<<<<<<<<
 *         if not listener._is_present_in_parent:
 *             listener._Modified()
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_self->_listener);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_v_listener = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pyrobuf_list.pyx":161
 * 
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:             # <<<<<<<<<<<<<<
 *             listener._Modified()
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_listener, __pyx_n_s_is_present_in_parent); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 161; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_6 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_6 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 161; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_5 = ((!__pyx_t_6) != 0);
  if (__pyx_t_5) {

    /* "pyrobuf_list.pyx":162
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:
 *             listener._Modified()             # <<<<<<<<<<<<<<
 * 
 *     def insert(self, i, x):
 */
    __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_v_listener, __pyx_n_s_Modified); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 162; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_7);
    __pyx_t_4 = NULL;
    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_7))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_7);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_7);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_7, function);
      }
    }
    if (__pyx_t_4) {
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_7, __pyx_t_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 162; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    } else {
      __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_7); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 162; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "pyrobuf_list.pyx":161
 * 
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:             # <<<<<<<<<<<<<<
 *             listener._Modified()
 * 
 */
  }

  /* "pyrobuf_list.pyx":154
 *             listener._Modified()
 * 
 *     def extend(self, x):             # <<<<<<<<<<<<<<
 *         for val in x:
 *             if not isinstance(val, str):
 */

  /* function exit code */
  __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_7);
  __Pyx_AddTraceback("pyrobuf_list.BytesList.extend", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_val);
  __Pyx_XDECREF(__pyx_v_listener);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrobuf_list.pyx":164
 *             listener._Modified()
 * 
 *     def insert(self, i, x):             # <<<<<<<<<<<<<<
 * 
 *         if not isinstance(x, str):
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrobuf_list_9BytesList_11insert(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_12pyrobuf_list_9BytesList_11insert(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_i = 0;
  PyObject *__pyx_v_x = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("insert (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_i,&__pyx_n_s_x,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_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 (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_x)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("insert", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 164; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "insert") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 164; __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_i = values[0];
    __pyx_v_x = values[1];
  }
  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 = 164; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyrobuf_list.BytesList.insert", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_12pyrobuf_list_9BytesList_10insert(((struct __pyx_obj_12pyrobuf_list_BytesList *)__pyx_v_self), __pyx_v_i, __pyx_v_x);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_12pyrobuf_list_9BytesList_10insert(struct __pyx_obj_12pyrobuf_list_BytesList *__pyx_v_self, PyObject *__pyx_v_i, PyObject *__pyx_v_x) {
  PyObject *__pyx_v_listener = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  Py_ssize_t __pyx_t_5;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("insert", 0);

  /* "pyrobuf_list.pyx":166
 *     def insert(self, i, x):
 * 
 *         if not isinstance(x, str):             # <<<<<<<<<<<<<<
 *             raise TypeError("%r has type %s, but expected one of: (%s,)" % (x, type(x), str))
 * 
 */
  __pyx_t_1 = PyString_Check(__pyx_v_x); 
  __pyx_t_2 = ((!(__pyx_t_1 != 0)) != 0);
  if (__pyx_t_2) {

    /* "pyrobuf_list.pyx":167
 * 
 *         if not isinstance(x, str):
 *             raise TypeError("%r has type %s, but expected one of: (%s,)" % (x, type(x), str))             # <<<<<<<<<<<<<<
 * 
 *         list.insert(self, i, x)
 */
    __pyx_t_3 = PyTuple_New(3); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_INCREF(__pyx_v_x);
    __Pyx_GIVEREF(__pyx_v_x);
    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_x);
    __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_v_x)));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(__pyx_v_x)));
    PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)Py_TYPE(__pyx_v_x)));
    __Pyx_INCREF(((PyObject *)(&PyString_Type)));
    __Pyx_GIVEREF(((PyObject *)(&PyString_Type)));
    PyTuple_SET_ITEM(__pyx_t_3, 2, ((PyObject *)(&PyString_Type)));
    __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_r_has_type_s_but_expected_one_o, __pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __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 = 167; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_GIVEREF(__pyx_t_4);
    PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4);
    __pyx_t_4 = 0;
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_Raise(__pyx_t_4, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

    /* "pyrobuf_list.pyx":166
 *     def insert(self, i, x):
 * 
 *         if not isinstance(x, str):             # <<<<<<<<<<<<<<
 *             raise TypeError("%r has type %s, but expected one of: (%s,)" % (x, type(x), str))
 * 
 */
  }

  /* "pyrobuf_list.pyx":169
 *             raise TypeError("%r has type %s, but expected one of: (%s,)" % (x, type(x), str))
 * 
 *         list.insert(self, i, x)             # <<<<<<<<<<<<<<
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:
 */
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_TypeError, "descriptor '%s' requires a '%s' object but received a 'NoneType'", "insert", "list");
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 169; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 169; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_6 = PyList_Insert(((PyObject*)__pyx_v_self), __pyx_t_5, __pyx_v_x); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 169; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pyrobuf_list.pyx":170
 * 
 *         list.insert(self, i, x)
 *         listener = <object>self._listener             # <<<<<<<<<<<<<<
 *         if not listener._is_present_in_parent:
 *             listener._Modified()
 */
  __pyx_t_4 = ((PyObject *)__pyx_v_self->_listener);
  __Pyx_INCREF(__pyx_t_4);
  __pyx_v_listener = __pyx_t_4;
  __pyx_t_4 = 0;

  /* "pyrobuf_list.pyx":171
 *         list.insert(self, i, x)
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:             # <<<<<<<<<<<<<<
 *             listener._Modified()
 * 
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_listener, __pyx_n_s_is_present_in_parent); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 171; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 171; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __pyx_t_1 = ((!__pyx_t_2) != 0);
  if (__pyx_t_1) {

    /* "pyrobuf_list.pyx":172
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:
 *             listener._Modified()             # <<<<<<<<<<<<<<
 * 
 * 
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_listener, __pyx_n_s_Modified); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 172; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_7 = NULL;
    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_3))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_3);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_3, function);
      }
    }
    if (__pyx_t_7) {
      __pyx_t_4 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_7); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 172; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    } else {
      __pyx_t_4 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 172; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "pyrobuf_list.pyx":171
 *         list.insert(self, i, x)
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:             # <<<<<<<<<<<<<<
 *             listener._Modified()
 * 
 */
  }

  /* "pyrobuf_list.pyx":164
 *             listener._Modified()
 * 
 *     def insert(self, i, x):             # <<<<<<<<<<<<<<
 * 
 *         if not isinstance(x, str):
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("pyrobuf_list.BytesList.insert", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_listener);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrobuf_list.pyx":177
 * cdef class StringList(list):
 * 
 *     def __init__(self, object listener=None):             # <<<<<<<<<<<<<<
 *         if listener is None:
 *             self._listener = <PyObject *>null_listener
 */

/* Python wrapper */
static int __pyx_pw_12pyrobuf_list_10StringList_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_12pyrobuf_list_10StringList_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_listener = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__init__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_listener,0};
    PyObject* values[1] = {0};
    values[0] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_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 (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_listener);
          if (value) { values[0] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__init__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 177; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
      }
    } else {
      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;
      }
    }
    __pyx_v_listener = values[0];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__init__", 0, 0, 1, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 177; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyrobuf_list.StringList.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_12pyrobuf_list_10StringList___init__(((struct __pyx_obj_12pyrobuf_list_StringList *)__pyx_v_self), __pyx_v_listener);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_12pyrobuf_list_10StringList___init__(struct __pyx_obj_12pyrobuf_list_StringList *__pyx_v_self, PyObject *__pyx_v_listener) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  __Pyx_RefNannySetupContext("__init__", 0);

  /* "pyrobuf_list.pyx":178
 * 
 *     def __init__(self, object listener=None):
 *         if listener is None:             # <<<<<<<<<<<<<<
 *             self._listener = <PyObject *>null_listener
 *         else:
 */
  __pyx_t_1 = (__pyx_v_listener == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "pyrobuf_list.pyx":179
 *     def __init__(self, object listener=None):
 *         if listener is None:
 *             self._listener = <PyObject *>null_listener             # <<<<<<<<<<<<<<
 *         else:
 *             self._listener = <PyObject *>listener
 */
    __pyx_v_self->_listener = ((PyObject *)null_listener);

    /* "pyrobuf_list.pyx":178
 * 
 *     def __init__(self, object listener=None):
 *         if listener is None:             # <<<<<<<<<<<<<<
 *             self._listener = <PyObject *>null_listener
 *         else:
 */
    goto __pyx_L3;
  }

  /* "pyrobuf_list.pyx":181
 *             self._listener = <PyObject *>null_listener
 *         else:
 *             self._listener = <PyObject *>listener             # <<<<<<<<<<<<<<
 * 
 *     def __setitem__(self, i, x):
 */
  /*else*/ {
    __pyx_v_self->_listener = ((PyObject *)__pyx_v_listener);
  }
  __pyx_L3:;

  /* "pyrobuf_list.pyx":177
 * cdef class StringList(list):
 * 
 *     def __init__(self, object listener=None):             # <<<<<<<<<<<<<<
 *         if listener is None:
 *             self._listener = <PyObject *>null_listener
 */

  /* function exit code */
  __pyx_r = 0;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrobuf_list.pyx":183
 *             self._listener = <PyObject *>listener
 * 
 *     def __setitem__(self, i, x):             # <<<<<<<<<<<<<<
 *         cdef list values
 *         cdef unicode value
 */

/* Python wrapper */
static int __pyx_pw_12pyrobuf_list_10StringList_3__setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_i, PyObject *__pyx_v_x); /*proto*/
static int __pyx_pw_12pyrobuf_list_10StringList_3__setitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_i, PyObject *__pyx_v_x) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setitem__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrobuf_list_10StringList_2__setitem__(((struct __pyx_obj_12pyrobuf_list_StringList *)__pyx_v_self), ((PyObject *)__pyx_v_i), ((PyObject *)__pyx_v_x));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_12pyrobuf_list_10StringList_2__setitem__(struct __pyx_obj_12pyrobuf_list_StringList *__pyx_v_self, PyObject *__pyx_v_i, PyObject *__pyx_v_x) {
  PyObject *__pyx_v_values = 0;
  PyObject *__pyx_v_value = 0;
  PyObject *__pyx_v_val = NULL;
  PyObject *__pyx_v_listener = NULL;
  int __pyx_r;
  __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;
  Py_ssize_t __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  PyObject *(*__pyx_t_9)(PyObject *);
  int __pyx_t_10;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setitem__", 0);

  /* "pyrobuf_list.pyx":187
 *         cdef unicode value
 * 
 *         if isinstance(i, (int, long)):             # <<<<<<<<<<<<<<
 *             if isinstance(x, str):
 *                 value = x.decode('utf-8')
 */
  __pyx_t_2 = PyInt_Check(__pyx_v_i); 
  __pyx_t_3 = (__pyx_t_2 != 0);
  if (!__pyx_t_3) {
  } else {
    __pyx_t_1 = __pyx_t_3;
    goto __pyx_L4_bool_binop_done;
  }
  __pyx_t_3 = PyLong_Check(__pyx_v_i); 
  __pyx_t_2 = (__pyx_t_3 != 0);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L4_bool_binop_done:;
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "pyrobuf_list.pyx":188
 * 
 *         if isinstance(i, (int, long)):
 *             if isinstance(x, str):             # <<<<<<<<<<<<<<
 *                 value = x.decode('utf-8')
 *             elif isinstance(x, unicode):
 */
    __pyx_t_2 = PyString_Check(__pyx_v_x); 
    __pyx_t_1 = (__pyx_t_2 != 0);
    if (__pyx_t_1) {

      /* "pyrobuf_list.pyx":189
 *         if isinstance(i, (int, long)):
 *             if isinstance(x, str):
 *                 value = x.decode('utf-8')             # <<<<<<<<<<<<<<
 *             elif isinstance(x, unicode):
 *                 value = x
 */
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_x, __pyx_n_s_decode); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 189; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__6, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 189; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (!(likely(PyUnicode_CheckExact(__pyx_t_5))||((__pyx_t_5) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_5)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 189; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_v_value = ((PyObject*)__pyx_t_5);
      __pyx_t_5 = 0;

      /* "pyrobuf_list.pyx":188
 * 
 *         if isinstance(i, (int, long)):
 *             if isinstance(x, str):             # <<<<<<<<<<<<<<
 *                 value = x.decode('utf-8')
 *             elif isinstance(x, unicode):
 */
      goto __pyx_L6;
    }

    /* "pyrobuf_list.pyx":190
 *             if isinstance(x, str):
 *                 value = x.decode('utf-8')
 *             elif isinstance(x, unicode):             # <<<<<<<<<<<<<<
 *                 value = x
 *             else:
 */
    __pyx_t_1 = PyUnicode_Check(__pyx_v_x); 
    __pyx_t_2 = (__pyx_t_1 != 0);
    if (__pyx_t_2) {

      /* "pyrobuf_list.pyx":191
 *                 value = x.decode('utf-8')
 *             elif isinstance(x, unicode):
 *                 value = x             # <<<<<<<<<<<<<<
 *             else:
 *                 raise TypeError("%r has type %s, but expected one of: (%s, %s)" % (x, type(x), str, unicode))
 */
      if (!(likely(PyUnicode_CheckExact(__pyx_v_x))||((__pyx_v_x) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_v_x)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 191; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_5 = __pyx_v_x;
      __Pyx_INCREF(__pyx_t_5);
      __pyx_v_value = ((PyObject*)__pyx_t_5);
      __pyx_t_5 = 0;

      /* "pyrobuf_list.pyx":190
 *             if isinstance(x, str):
 *                 value = x.decode('utf-8')
 *             elif isinstance(x, unicode):             # <<<<<<<<<<<<<<
 *                 value = x
 *             else:
 */
      goto __pyx_L6;
    }

    /* "pyrobuf_list.pyx":193
 *                 value = x
 *             else:
 *                 raise TypeError("%r has type %s, but expected one of: (%s, %s)" % (x, type(x), str, unicode))             # <<<<<<<<<<<<<<
 * 
 *             list.__setitem__(self, i, value)
 */
    /*else*/ {
      __pyx_t_5 = PyTuple_New(4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 193; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_INCREF(__pyx_v_x);
      __Pyx_GIVEREF(__pyx_v_x);
      PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_v_x);
      __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_v_x)));
      __Pyx_GIVEREF(((PyObject *)Py_TYPE(__pyx_v_x)));
      PyTuple_SET_ITEM(__pyx_t_5, 1, ((PyObject *)Py_TYPE(__pyx_v_x)));
      __Pyx_INCREF(((PyObject *)(&PyString_Type)));
      __Pyx_GIVEREF(((PyObject *)(&PyString_Type)));
      PyTuple_SET_ITEM(__pyx_t_5, 2, ((PyObject *)(&PyString_Type)));
      __Pyx_INCREF(((PyObject *)(&PyUnicode_Type)));
      __Pyx_GIVEREF(((PyObject *)(&PyUnicode_Type)));
      PyTuple_SET_ITEM(__pyx_t_5, 3, ((PyObject *)(&PyUnicode_Type)));
      __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_r_has_type_s_but_expected_one_o_2, __pyx_t_5); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 193; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 193; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_5);
      __Pyx_GIVEREF(__pyx_t_4);
      PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4);
      __pyx_t_4 = 0;
      __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 193; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __Pyx_Raise(__pyx_t_4, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 193; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_L6:;

    /* "pyrobuf_list.pyx":195
 *                 raise TypeError("%r has type %s, but expected one of: (%s, %s)" % (x, type(x), str, unicode))
 * 
 *             list.__setitem__(self, i, value)             # <<<<<<<<<<<<<<
 *         elif isinstance(i, slice):
 *             values = list()
 */
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)(&PyList_Type)), __pyx_n_s_setitem); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 195; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_6 = NULL;
    __pyx_t_7 = 0;
    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
        __pyx_t_7 = 1;
      }
    }
    __pyx_t_8 = PyTuple_New(3+__pyx_t_7); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 195; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_8);
    if (__pyx_t_6) {
      __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL;
    }
    __Pyx_INCREF(((PyObject *)__pyx_v_self));
    __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
    PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, ((PyObject *)__pyx_v_self));
    __Pyx_INCREF(__pyx_v_i);
    __Pyx_GIVEREF(__pyx_v_i);
    PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_v_i);
    __Pyx_INCREF(__pyx_v_value);
    __Pyx_GIVEREF(__pyx_v_value);
    PyTuple_SET_ITEM(__pyx_t_8, 2+__pyx_t_7, __pyx_v_value);
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 195; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "pyrobuf_list.pyx":187
 *         cdef unicode value
 * 
 *         if isinstance(i, (int, long)):             # <<<<<<<<<<<<<<
 *             if isinstance(x, str):
 *                 value = x.decode('utf-8')
 */
    goto __pyx_L3;
  }

  /* "pyrobuf_list.pyx":196
 * 
 *             list.__setitem__(self, i, value)
 *         elif isinstance(i, slice):             # <<<<<<<<<<<<<<
 *             values = list()
 * 
 */
  __pyx_t_2 = PySlice_Check(__pyx_v_i); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "pyrobuf_list.pyx":197
 *             list.__setitem__(self, i, value)
 *         elif isinstance(i, slice):
 *             values = list()             # <<<<<<<<<<<<<<
 * 
 *             for val in x:
 */
    __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 197; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_v_values = ((PyObject*)__pyx_t_4);
    __pyx_t_4 = 0;

    /* "pyrobuf_list.pyx":199
 *             values = list()
 * 
 *             for val in x:             # <<<<<<<<<<<<<<
 *                 if isinstance(val, str):
 *                     values.append(val.decode('utf-8'))
 */
    if (likely(PyList_CheckExact(__pyx_v_x)) || PyTuple_CheckExact(__pyx_v_x)) {
      __pyx_t_4 = __pyx_v_x; __Pyx_INCREF(__pyx_t_4); __pyx_t_7 = 0;
      __pyx_t_9 = NULL;
    } else {
      __pyx_t_7 = -1; __pyx_t_4 = PyObject_GetIter(__pyx_v_x); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 199; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_9 = Py_TYPE(__pyx_t_4)->tp_iternext; if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 199; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    for (;;) {
      if (likely(!__pyx_t_9)) {
        if (likely(PyList_CheckExact(__pyx_t_4))) {
          if (__pyx_t_7 >= PyList_GET_SIZE(__pyx_t_4)) break;
          #if CYTHON_COMPILING_IN_CPYTHON
          __pyx_t_5 = PyList_GET_ITEM(__pyx_t_4, __pyx_t_7); __Pyx_INCREF(__pyx_t_5); __pyx_t_7++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 199; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          #else
          __pyx_t_5 = PySequence_ITEM(__pyx_t_4, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 199; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_5);
          #endif
        } else {
          if (__pyx_t_7 >= PyTuple_GET_SIZE(__pyx_t_4)) break;
          #if CYTHON_COMPILING_IN_CPYTHON
          __pyx_t_5 = PyTuple_GET_ITEM(__pyx_t_4, __pyx_t_7); __Pyx_INCREF(__pyx_t_5); __pyx_t_7++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 199; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          #else
          __pyx_t_5 = PySequence_ITEM(__pyx_t_4, __pyx_t_7); __pyx_t_7++; if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 199; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          __Pyx_GOTREF(__pyx_t_5);
          #endif
        }
      } else {
        __pyx_t_5 = __pyx_t_9(__pyx_t_4);
        if (unlikely(!__pyx_t_5)) {
          PyObject* exc_type = PyErr_Occurred();
          if (exc_type) {
            if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
            else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 199; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
          }
          break;
        }
        __Pyx_GOTREF(__pyx_t_5);
      }
      __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_5);
      __pyx_t_5 = 0;

      /* "pyrobuf_list.pyx":200
 * 
 *             for val in x:
 *                 if isinstance(val, str):             # <<<<<<<<<<<<<<
 *                     values.append(val.decode('utf-8'))
 *                 elif isinstance(val, unicode):
 */
      __pyx_t_1 = PyString_Check(__pyx_v_val); 
      __pyx_t_2 = (__pyx_t_1 != 0);
      if (__pyx_t_2) {

        /* "pyrobuf_list.pyx":201
 *             for val in x:
 *                 if isinstance(val, str):
 *                     values.append(val.decode('utf-8'))             # <<<<<<<<<<<<<<
 *                 elif isinstance(val, unicode):
 *                     values.append(val)
 */
        __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_val, __pyx_n_s_decode); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 201; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_tuple__7, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 201; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_values, __pyx_t_8); if (unlikely(__pyx_t_10 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 201; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;

        /* "pyrobuf_list.pyx":200
 * 
 *             for val in x:
 *                 if isinstance(val, str):             # <<<<<<<<<<<<<<
 *                     values.append(val.decode('utf-8'))
 *                 elif isinstance(val, unicode):
 */
        goto __pyx_L9;
      }

      /* "pyrobuf_list.pyx":202
 *                 if isinstance(val, str):
 *                     values.append(val.decode('utf-8'))
 *                 elif isinstance(val, unicode):             # <<<<<<<<<<<<<<
 *                     values.append(val)
 *                 else:
 */
      __pyx_t_2 = PyUnicode_Check(__pyx_v_val); 
      __pyx_t_1 = (__pyx_t_2 != 0);
      if (__pyx_t_1) {

        /* "pyrobuf_list.pyx":203
 *                     values.append(val.decode('utf-8'))
 *                 elif isinstance(val, unicode):
 *                     values.append(val)             # <<<<<<<<<<<<<<
 *                 else:
 *                     raise TypeError("%r has type %s, but expected one of: (%s, %s)" % (val, type(val), str, unicode))
 */
        __pyx_t_10 = __Pyx_PyList_Append(__pyx_v_values, __pyx_v_val); if (unlikely(__pyx_t_10 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 203; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

        /* "pyrobuf_list.pyx":202
 *                 if isinstance(val, str):
 *                     values.append(val.decode('utf-8'))
 *                 elif isinstance(val, unicode):             # <<<<<<<<<<<<<<
 *                     values.append(val)
 *                 else:
 */
        goto __pyx_L9;
      }

      /* "pyrobuf_list.pyx":205
 *                     values.append(val)
 *                 else:
 *                     raise TypeError("%r has type %s, but expected one of: (%s, %s)" % (val, type(val), str, unicode))             # <<<<<<<<<<<<<<
 * 
 *             list.__setitem__(self, i, values)
 */
      /*else*/ {
        __pyx_t_8 = PyTuple_New(4); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_INCREF(__pyx_v_val);
        __Pyx_GIVEREF(__pyx_v_val);
        PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_v_val);
        __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_v_val)));
        __Pyx_GIVEREF(((PyObject *)Py_TYPE(__pyx_v_val)));
        PyTuple_SET_ITEM(__pyx_t_8, 1, ((PyObject *)Py_TYPE(__pyx_v_val)));
        __Pyx_INCREF(((PyObject *)(&PyString_Type)));
        __Pyx_GIVEREF(((PyObject *)(&PyString_Type)));
        PyTuple_SET_ITEM(__pyx_t_8, 2, ((PyObject *)(&PyString_Type)));
        __Pyx_INCREF(((PyObject *)(&PyUnicode_Type)));
        __Pyx_GIVEREF(((PyObject *)(&PyUnicode_Type)));
        PyTuple_SET_ITEM(__pyx_t_8, 3, ((PyObject *)(&PyUnicode_Type)));
        __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_r_has_type_s_but_expected_one_o_2, __pyx_t_8); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_8);
        __Pyx_GIVEREF(__pyx_t_5);
        PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_5);
        __pyx_t_5 = 0;
        __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_t_8, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
        __Pyx_Raise(__pyx_t_5, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        {__pyx_filename = __pyx_f[0]; __pyx_lineno = 205; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __pyx_L9:;

      /* "pyrobuf_list.pyx":199
 *             values = list()
 * 
 *             for val in x:             # <<<<<<<<<<<<<<
 *                 if isinstance(val, str):
 *                     values.append(val.decode('utf-8'))
 */
    }
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;

    /* "pyrobuf_list.pyx":207
 *                     raise TypeError("%r has type %s, but expected one of: (%s, %s)" % (val, type(val), str, unicode))
 * 
 *             list.__setitem__(self, i, values)             # <<<<<<<<<<<<<<
 *         else:
 *             raise TypeError("list indices must be integers, not %s" % type(i).__name__)
 */
    __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)(&PyList_Type)), __pyx_n_s_setitem); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 207; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __pyx_t_8 = NULL;
    __pyx_t_7 = 0;
    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_5))) {
      __pyx_t_8 = PyMethod_GET_SELF(__pyx_t_5);
      if (likely(__pyx_t_8)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
        __Pyx_INCREF(__pyx_t_8);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_5, function);
        __pyx_t_7 = 1;
      }
    }
    __pyx_t_6 = PyTuple_New(3+__pyx_t_7); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 207; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    if (__pyx_t_8) {
      __Pyx_GIVEREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_8); __pyx_t_8 = NULL;
    }
    __Pyx_INCREF(((PyObject *)__pyx_v_self));
    __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
    PyTuple_SET_ITEM(__pyx_t_6, 0+__pyx_t_7, ((PyObject *)__pyx_v_self));
    __Pyx_INCREF(__pyx_v_i);
    __Pyx_GIVEREF(__pyx_v_i);
    PyTuple_SET_ITEM(__pyx_t_6, 1+__pyx_t_7, __pyx_v_i);
    __Pyx_INCREF(__pyx_v_values);
    __Pyx_GIVEREF(__pyx_v_values);
    PyTuple_SET_ITEM(__pyx_t_6, 2+__pyx_t_7, __pyx_v_values);
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_6, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 207; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __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;

    /* "pyrobuf_list.pyx":196
 * 
 *             list.__setitem__(self, i, value)
 *         elif isinstance(i, slice):             # <<<<<<<<<<<<<<
 *             values = list()
 * 
 */
    goto __pyx_L3;
  }

  /* "pyrobuf_list.pyx":209
 *             list.__setitem__(self, i, values)
 *         else:
 *             raise TypeError("list indices must be integers, not %s" % type(i).__name__)             # <<<<<<<<<<<<<<
 * 
 *         listener = <object>self._listener
 */
  /*else*/ {
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)Py_TYPE(__pyx_v_i)), __pyx_n_s_name); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 209; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = __Pyx_PyString_Format(__pyx_kp_s_list_indices_must_be_integers_no, __pyx_t_4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 209; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 209; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_5);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_5);
    __pyx_t_5 = 0;
    __pyx_t_5 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 209; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_Raise(__pyx_t_5, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 209; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_L3:;

  /* "pyrobuf_list.pyx":211
 *             raise TypeError("list indices must be integers, not %s" % type(i).__name__)
 * 
 *         listener = <object>self._listener             # <<<<<<<<<<<<<<
 *         if not listener._is_present_in_parent:
 *             listener._Modified()
 */
  __pyx_t_5 = ((PyObject *)__pyx_v_self->_listener);
  __Pyx_INCREF(__pyx_t_5);
  __pyx_v_listener = __pyx_t_5;
  __pyx_t_5 = 0;

  /* "pyrobuf_list.pyx":212
 * 
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:             # <<<<<<<<<<<<<<
 *             listener._Modified()
 * 
 */
  __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_v_listener, __pyx_n_s_is_present_in_parent); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 212; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_5);
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 212; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
  __pyx_t_2 = ((!__pyx_t_1) != 0);
  if (__pyx_t_2) {

    /* "pyrobuf_list.pyx":213
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:
 *             listener._Modified()             # <<<<<<<<<<<<<<
 * 
 * 
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_listener, __pyx_n_s_Modified); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = NULL;
    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    if (__pyx_t_6) {
      __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_6); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    } else {
      __pyx_t_5 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __Pyx_GOTREF(__pyx_t_5);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    /* "pyrobuf_list.pyx":212
 * 
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:             # <<<<<<<<<<<<<<
 *             listener._Modified()
 * 
 */
  }

  /* "pyrobuf_list.pyx":183
 *             self._listener = <PyObject *>listener
 * 
 *     def __setitem__(self, i, x):             # <<<<<<<<<<<<<<
 *         cdef list values
 *         cdef unicode value
 */

  /* function exit code */
  __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("pyrobuf_list.StringList.__setitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_values);
  __Pyx_XDECREF(__pyx_v_value);
  __Pyx_XDECREF(__pyx_v_val);
  __Pyx_XDECREF(__pyx_v_listener);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrobuf_list.pyx":216
 * 
 * 
 *     def __setslice__(self, i, j, x):             # <<<<<<<<<<<<<<
 *         cdef list values = list()
 * 
 */

/* Python wrapper */
static int __pyx_pw_12pyrobuf_list_10StringList_5__setslice__(PyObject *__pyx_v_self, Py_ssize_t __pyx_arg_i, Py_ssize_t __pyx_arg_j, PyObject *__pyx_v_x); /*proto*/
static int __pyx_pw_12pyrobuf_list_10StringList_5__setslice__(PyObject *__pyx_v_self, Py_ssize_t __pyx_arg_i, Py_ssize_t __pyx_arg_j, PyObject *__pyx_v_x) {
  PyObject *__pyx_v_i = 0;
  PyObject *__pyx_v_j = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setslice__ (wrapper)", 0);
  __pyx_v_i = PyInt_FromSsize_t(__pyx_arg_i); if (unlikely(!__pyx_v_i)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __Pyx_GOTREF(__pyx_v_i);
  __pyx_v_j = PyInt_FromSsize_t(__pyx_arg_j); if (unlikely(!__pyx_v_j)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 216; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __Pyx_GOTREF(__pyx_v_j);
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyrobuf_list.StringList.__setslice__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_12pyrobuf_list_10StringList_4__setslice__(((struct __pyx_obj_12pyrobuf_list_StringList *)__pyx_v_self), ((PyObject *)__pyx_v_i), ((PyObject *)__pyx_v_j), ((PyObject *)__pyx_v_x));

  /* function exit code */
  __Pyx_XDECREF(__pyx_v_i);
  __Pyx_XDECREF(__pyx_v_j);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_12pyrobuf_list_10StringList_4__setslice__(struct __pyx_obj_12pyrobuf_list_StringList *__pyx_v_self, PyObject *__pyx_v_i, PyObject *__pyx_v_j, PyObject *__pyx_v_x) {
  PyObject *__pyx_v_values = 0;
  PyObject *__pyx_v_val = NULL;
  PyObject *__pyx_v_listener = NULL;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  PyObject *(*__pyx_t_3)(PyObject *);
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  PyObject *__pyx_t_9 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__setslice__", 0);

  /* "pyrobuf_list.pyx":217
 * 
 *     def __setslice__(self, i, j, x):
 *         cdef list values = list()             # <<<<<<<<<<<<<<
 * 
 *         for val in x:
 */
  __pyx_t_1 = PyList_New(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_v_values = ((PyObject*)__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrobuf_list.pyx":219
 *         cdef list values = list()
 * 
 *         for val in x:             # <<<<<<<<<<<<<<
 *             if isinstance(val, str):
 *                 values.append(val.decode('utf-8'))
 */
  if (likely(PyList_CheckExact(__pyx_v_x)) || PyTuple_CheckExact(__pyx_v_x)) {
    __pyx_t_1 = __pyx_v_x; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
    __pyx_t_3 = NULL;
  } else {
    __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_x); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 219; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 219; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  for (;;) {
    if (likely(!__pyx_t_3)) {
      if (likely(PyList_CheckExact(__pyx_t_1))) {
        if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_COMPILING_IN_CPYTHON
        __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 219; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 219; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      } else {
        if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_COMPILING_IN_CPYTHON
        __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 219; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 219; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      }
    } else {
      __pyx_t_4 = __pyx_t_3(__pyx_t_1);
      if (unlikely(!__pyx_t_4)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 219; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_4);
    }
    __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "pyrobuf_list.pyx":220
 * 
 *         for val in x:
 *             if isinstance(val, str):             # <<<<<<<<<<<<<<
 *                 values.append(val.decode('utf-8'))
 *             elif isinstance(val, unicode):
 */
    __pyx_t_5 = PyString_Check(__pyx_v_val); 
    __pyx_t_6 = (__pyx_t_5 != 0);
    if (__pyx_t_6) {

      /* "pyrobuf_list.pyx":221
 *         for val in x:
 *             if isinstance(val, str):
 *                 values.append(val.decode('utf-8'))             # <<<<<<<<<<<<<<
 *             elif isinstance(val, unicode):
 *                 values.append(val)
 */
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_val, __pyx_n_s_decode); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__8, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_values, __pyx_t_7); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

      /* "pyrobuf_list.pyx":220
 * 
 *         for val in x:
 *             if isinstance(val, str):             # <<<<<<<<<<<<<<
 *                 values.append(val.decode('utf-8'))
 *             elif isinstance(val, unicode):
 */
      goto __pyx_L5;
    }

    /* "pyrobuf_list.pyx":222
 *             if isinstance(val, str):
 *                 values.append(val.decode('utf-8'))
 *             elif isinstance(val, unicode):             # <<<<<<<<<<<<<<
 *                 values.append(val)
 *             else:
 */
    __pyx_t_6 = PyUnicode_Check(__pyx_v_val); 
    __pyx_t_5 = (__pyx_t_6 != 0);
    if (__pyx_t_5) {

      /* "pyrobuf_list.pyx":223
 *                 values.append(val.decode('utf-8'))
 *             elif isinstance(val, unicode):
 *                 values.append(val)             # <<<<<<<<<<<<<<
 *             else:
 *                 raise TypeError("%r has type %s, but expected one of: (%s, %s)" % (val, type(val), str, unicode))
 */
      __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_values, __pyx_v_val); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 223; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

      /* "pyrobuf_list.pyx":222
 *             if isinstance(val, str):
 *                 values.append(val.decode('utf-8'))
 *             elif isinstance(val, unicode):             # <<<<<<<<<<<<<<
 *                 values.append(val)
 *             else:
 */
      goto __pyx_L5;
    }

    /* "pyrobuf_list.pyx":225
 *                 values.append(val)
 *             else:
 *                 raise TypeError("%r has type %s, but expected one of: (%s, %s)" % (val, type(val), str, unicode))             # <<<<<<<<<<<<<<
 * 
 *         list.__setslice__(self, i, j, values)
 */
    /*else*/ {
      __pyx_t_7 = PyTuple_New(4); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 225; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_INCREF(__pyx_v_val);
      __Pyx_GIVEREF(__pyx_v_val);
      PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_val);
      __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_v_val)));
      __Pyx_GIVEREF(((PyObject *)Py_TYPE(__pyx_v_val)));
      PyTuple_SET_ITEM(__pyx_t_7, 1, ((PyObject *)Py_TYPE(__pyx_v_val)));
      __Pyx_INCREF(((PyObject *)(&PyString_Type)));
      __Pyx_GIVEREF(((PyObject *)(&PyString_Type)));
      PyTuple_SET_ITEM(__pyx_t_7, 2, ((PyObject *)(&PyString_Type)));
      __Pyx_INCREF(((PyObject *)(&PyUnicode_Type)));
      __Pyx_GIVEREF(((PyObject *)(&PyUnicode_Type)));
      PyTuple_SET_ITEM(__pyx_t_7, 3, ((PyObject *)(&PyUnicode_Type)));
      __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_r_has_type_s_but_expected_one_o_2, __pyx_t_7); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 225; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 225; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_GIVEREF(__pyx_t_4);
      PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_4);
      __pyx_t_4 = 0;
      __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_t_7, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 225; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_Raise(__pyx_t_4, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 225; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_L5:;

    /* "pyrobuf_list.pyx":219
 *         cdef list values = list()
 * 
 *         for val in x:             # <<<<<<<<<<<<<<
 *             if isinstance(val, str):
 *                 values.append(val.decode('utf-8'))
 */
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pyrobuf_list.pyx":227
 *                 raise TypeError("%r has type %s, but expected one of: (%s, %s)" % (val, type(val), str, unicode))
 * 
 *         list.__setslice__(self, i, j, values)             # <<<<<<<<<<<<<<
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:
 */
  __pyx_t_4 = __Pyx_PyObject_GetAttrStr(((PyObject *)(&PyList_Type)), __pyx_n_s_setslice); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 227; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_4);
  __pyx_t_7 = NULL;
  __pyx_t_2 = 0;
  if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_4))) {
    __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_4);
    if (likely(__pyx_t_7)) {
      PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_INCREF(function);
      __Pyx_DECREF_SET(__pyx_t_4, function);
      __pyx_t_2 = 1;
    }
  }
  __pyx_t_9 = PyTuple_New(4+__pyx_t_2); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 227; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_9);
  if (__pyx_t_7) {
    __Pyx_GIVEREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_7); __pyx_t_7 = NULL;
  }
  __Pyx_INCREF(((PyObject *)__pyx_v_self));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
  PyTuple_SET_ITEM(__pyx_t_9, 0+__pyx_t_2, ((PyObject *)__pyx_v_self));
  __Pyx_INCREF(__pyx_v_i);
  __Pyx_GIVEREF(__pyx_v_i);
  PyTuple_SET_ITEM(__pyx_t_9, 1+__pyx_t_2, __pyx_v_i);
  __Pyx_INCREF(__pyx_v_j);
  __Pyx_GIVEREF(__pyx_v_j);
  PyTuple_SET_ITEM(__pyx_t_9, 2+__pyx_t_2, __pyx_v_j);
  __Pyx_INCREF(__pyx_v_values);
  __Pyx_GIVEREF(__pyx_v_values);
  PyTuple_SET_ITEM(__pyx_t_9, 3+__pyx_t_2, __pyx_v_values);
  __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 227; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
  __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pyrobuf_list.pyx":228
 * 
 *         list.__setslice__(self, i, j, values)
 *         listener = <object>self._listener             # <<<<<<<<<<<<<<
 *         if not listener._is_present_in_parent:
 *             listener._Modified()
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_self->_listener);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_v_listener = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pyrobuf_list.pyx":229
 *         list.__setslice__(self, i, j, values)
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:             # <<<<<<<<<<<<<<
 *             listener._Modified()
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_listener, __pyx_n_s_is_present_in_parent); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 229; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 229; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_6 = ((!__pyx_t_5) != 0);
  if (__pyx_t_6) {

    /* "pyrobuf_list.pyx":230
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:
 *             listener._Modified()             # <<<<<<<<<<<<<<
 * 
 *     def append(self, x):
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_listener, __pyx_n_s_Modified); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 230; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_9 = NULL;
    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_9 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_9)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_9);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    if (__pyx_t_9) {
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_9); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 230; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0;
    } else {
      __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_4); 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_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "pyrobuf_list.pyx":229
 *         list.__setslice__(self, i, j, values)
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:             # <<<<<<<<<<<<<<
 *             listener._Modified()
 * 
 */
  }

  /* "pyrobuf_list.pyx":216
 * 
 * 
 *     def __setslice__(self, i, j, x):             # <<<<<<<<<<<<<<
 *         cdef list values = list()
 * 
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_XDECREF(__pyx_t_9);
  __Pyx_AddTraceback("pyrobuf_list.StringList.__setslice__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_values);
  __Pyx_XDECREF(__pyx_v_val);
  __Pyx_XDECREF(__pyx_v_listener);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrobuf_list.pyx":232
 *             listener._Modified()
 * 
 *     def append(self, x):             # <<<<<<<<<<<<<<
 *         cdef unicode value
 *         if isinstance(x, unicode):
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrobuf_list_10StringList_7append(PyObject *__pyx_v_self, PyObject *__pyx_v_x); /*proto*/
static PyObject *__pyx_pw_12pyrobuf_list_10StringList_7append(PyObject *__pyx_v_self, PyObject *__pyx_v_x) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("append (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrobuf_list_10StringList_6append(((struct __pyx_obj_12pyrobuf_list_StringList *)__pyx_v_self), ((PyObject *)__pyx_v_x));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_12pyrobuf_list_10StringList_6append(struct __pyx_obj_12pyrobuf_list_StringList *__pyx_v_self, PyObject *__pyx_v_x) {
  PyObject *__pyx_v_value = 0;
  PyObject *__pyx_v_listener = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("append", 0);

  /* "pyrobuf_list.pyx":234
 *     def append(self, x):
 *         cdef unicode value
 *         if isinstance(x, unicode):             # <<<<<<<<<<<<<<
 *             value = x
 *         elif isinstance(x, str):
 */
  __pyx_t_1 = PyUnicode_Check(__pyx_v_x); 
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "pyrobuf_list.pyx":235
 *         cdef unicode value
 *         if isinstance(x, unicode):
 *             value = x             # <<<<<<<<<<<<<<
 *         elif isinstance(x, str):
 *             value = x.decode('utf-8')
 */
    if (!(likely(PyUnicode_CheckExact(__pyx_v_x))||((__pyx_v_x) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_v_x)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 235; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_3 = __pyx_v_x;
    __Pyx_INCREF(__pyx_t_3);
    __pyx_v_value = ((PyObject*)__pyx_t_3);
    __pyx_t_3 = 0;

    /* "pyrobuf_list.pyx":234
 *     def append(self, x):
 *         cdef unicode value
 *         if isinstance(x, unicode):             # <<<<<<<<<<<<<<
 *             value = x
 *         elif isinstance(x, str):
 */
    goto __pyx_L3;
  }

  /* "pyrobuf_list.pyx":236
 *         if isinstance(x, unicode):
 *             value = x
 *         elif isinstance(x, str):             # <<<<<<<<<<<<<<
 *             value = x.decode('utf-8')
 *         else:
 */
  __pyx_t_2 = PyString_Check(__pyx_v_x); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "pyrobuf_list.pyx":237
 *             value = x
 *         elif isinstance(x, str):
 *             value = x.decode('utf-8')             # <<<<<<<<<<<<<<
 *         else:
 *             raise TypeError("%r has type %s, but expected one of: (%s, %s)" % (x, type(x), str, unicode))
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_x, __pyx_n_s_decode); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 237; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__9, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 237; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (!(likely(PyUnicode_CheckExact(__pyx_t_4))||((__pyx_t_4) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_4)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 237; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_v_value = ((PyObject*)__pyx_t_4);
    __pyx_t_4 = 0;

    /* "pyrobuf_list.pyx":236
 *         if isinstance(x, unicode):
 *             value = x
 *         elif isinstance(x, str):             # <<<<<<<<<<<<<<
 *             value = x.decode('utf-8')
 *         else:
 */
    goto __pyx_L3;
  }

  /* "pyrobuf_list.pyx":239
 *             value = x.decode('utf-8')
 *         else:
 *             raise TypeError("%r has type %s, but expected one of: (%s, %s)" % (x, type(x), str, unicode))             # <<<<<<<<<<<<<<
 * 
 *         list.append(self, value)
 */
  /*else*/ {
    __pyx_t_4 = PyTuple_New(4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 239; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_INCREF(__pyx_v_x);
    __Pyx_GIVEREF(__pyx_v_x);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_x);
    __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_v_x)));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(__pyx_v_x)));
    PyTuple_SET_ITEM(__pyx_t_4, 1, ((PyObject *)Py_TYPE(__pyx_v_x)));
    __Pyx_INCREF(((PyObject *)(&PyString_Type)));
    __Pyx_GIVEREF(((PyObject *)(&PyString_Type)));
    PyTuple_SET_ITEM(__pyx_t_4, 2, ((PyObject *)(&PyString_Type)));
    __Pyx_INCREF(((PyObject *)(&PyUnicode_Type)));
    __Pyx_GIVEREF(((PyObject *)(&PyUnicode_Type)));
    PyTuple_SET_ITEM(__pyx_t_4, 3, ((PyObject *)(&PyUnicode_Type)));
    __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_r_has_type_s_but_expected_one_o_2, __pyx_t_4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 239; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 239; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3);
    __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 239; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 239; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_L3:;

  /* "pyrobuf_list.pyx":241
 *             raise TypeError("%r has type %s, but expected one of: (%s, %s)" % (x, type(x), str, unicode))
 * 
 *         list.append(self, value)             # <<<<<<<<<<<<<<
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:
 */
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_TypeError, "descriptor '%s' requires a '%s' object but received a 'NoneType'", "append", "list");
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 241; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_5 = __Pyx_PyList_Append(((PyObject*)__pyx_v_self), __pyx_v_value); if (unlikely(__pyx_t_5 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 241; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pyrobuf_list.pyx":242
 * 
 *         list.append(self, value)
 *         listener = <object>self._listener             # <<<<<<<<<<<<<<
 *         if not listener._is_present_in_parent:
 *             listener._Modified()
 */
  __pyx_t_3 = ((PyObject *)__pyx_v_self->_listener);
  __Pyx_INCREF(__pyx_t_3);
  __pyx_v_listener = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "pyrobuf_list.pyx":243
 *         list.append(self, value)
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:             # <<<<<<<<<<<<<<
 *             listener._Modified()
 * 
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_listener, __pyx_n_s_is_present_in_parent); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_2 = ((!__pyx_t_1) != 0);
  if (__pyx_t_2) {

    /* "pyrobuf_list.pyx":244
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:
 *             listener._Modified()             # <<<<<<<<<<<<<<
 * 
 *     def extend(self, x):
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_listener, __pyx_n_s_Modified); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 244; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_6 = NULL;
    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_6)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_6);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    if (__pyx_t_6) {
      __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_6); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 244; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    } else {
      __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 244; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "pyrobuf_list.pyx":243
 *         list.append(self, value)
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:             # <<<<<<<<<<<<<<
 *             listener._Modified()
 * 
 */
  }

  /* "pyrobuf_list.pyx":232
 *             listener._Modified()
 * 
 *     def append(self, x):             # <<<<<<<<<<<<<<
 *         cdef unicode value
 *         if isinstance(x, unicode):
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("pyrobuf_list.StringList.append", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_value);
  __Pyx_XDECREF(__pyx_v_listener);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrobuf_list.pyx":246
 *             listener._Modified()
 * 
 *     def extend(self, x):             # <<<<<<<<<<<<<<
 *         cdef unicode value
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrobuf_list_10StringList_9extend(PyObject *__pyx_v_self, PyObject *__pyx_v_x); /*proto*/
static PyObject *__pyx_pw_12pyrobuf_list_10StringList_9extend(PyObject *__pyx_v_self, PyObject *__pyx_v_x) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("extend (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrobuf_list_10StringList_8extend(((struct __pyx_obj_12pyrobuf_list_StringList *)__pyx_v_self), ((PyObject *)__pyx_v_x));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_12pyrobuf_list_10StringList_8extend(struct __pyx_obj_12pyrobuf_list_StringList *__pyx_v_self, PyObject *__pyx_v_x) {
  PyObject *__pyx_v_value = 0;
  PyObject *__pyx_v_val = NULL;
  PyObject *__pyx_v_listener = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  PyObject *__pyx_t_1 = NULL;
  Py_ssize_t __pyx_t_2;
  PyObject *(*__pyx_t_3)(PyObject *);
  PyObject *__pyx_t_4 = NULL;
  int __pyx_t_5;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("extend", 0);

  /* "pyrobuf_list.pyx":249
 *         cdef unicode value
 * 
 *         for val in x:             # <<<<<<<<<<<<<<
 *             if isinstance(val, str):
 *                 value = val.decode('utf-8')
 */
  if (likely(PyList_CheckExact(__pyx_v_x)) || PyTuple_CheckExact(__pyx_v_x)) {
    __pyx_t_1 = __pyx_v_x; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0;
    __pyx_t_3 = NULL;
  } else {
    __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_v_x); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 249; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 249; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  for (;;) {
    if (likely(!__pyx_t_3)) {
      if (likely(PyList_CheckExact(__pyx_t_1))) {
        if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_COMPILING_IN_CPYTHON
        __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 249; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 249; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      } else {
        if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break;
        #if CYTHON_COMPILING_IN_CPYTHON
        __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 249; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        #else
        __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 249; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_4);
        #endif
      }
    } else {
      __pyx_t_4 = __pyx_t_3(__pyx_t_1);
      if (unlikely(!__pyx_t_4)) {
        PyObject* exc_type = PyErr_Occurred();
        if (exc_type) {
          if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear();
          else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 249; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        }
        break;
      }
      __Pyx_GOTREF(__pyx_t_4);
    }
    __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_4);
    __pyx_t_4 = 0;

    /* "pyrobuf_list.pyx":250
 * 
 *         for val in x:
 *             if isinstance(val, str):             # <<<<<<<<<<<<<<
 *                 value = val.decode('utf-8')
 *             elif isinstance(val, unicode):
 */
    __pyx_t_5 = PyString_Check(__pyx_v_val); 
    __pyx_t_6 = (__pyx_t_5 != 0);
    if (__pyx_t_6) {

      /* "pyrobuf_list.pyx":251
 *         for val in x:
 *             if isinstance(val, str):
 *                 value = val.decode('utf-8')             # <<<<<<<<<<<<<<
 *             elif isinstance(val, unicode):
 *                 value = val
 */
      __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_val, __pyx_n_s_decode); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 251; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__10, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 251; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      if (!(likely(PyUnicode_CheckExact(__pyx_t_7))||((__pyx_t_7) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_7)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 251; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_XDECREF_SET(__pyx_v_value, ((PyObject*)__pyx_t_7));
      __pyx_t_7 = 0;

      /* "pyrobuf_list.pyx":250
 * 
 *         for val in x:
 *             if isinstance(val, str):             # <<<<<<<<<<<<<<
 *                 value = val.decode('utf-8')
 *             elif isinstance(val, unicode):
 */
      goto __pyx_L5;
    }

    /* "pyrobuf_list.pyx":252
 *             if isinstance(val, str):
 *                 value = val.decode('utf-8')
 *             elif isinstance(val, unicode):             # <<<<<<<<<<<<<<
 *                 value = val
 *             else:
 */
    __pyx_t_6 = PyUnicode_Check(__pyx_v_val); 
    __pyx_t_5 = (__pyx_t_6 != 0);
    if (__pyx_t_5) {

      /* "pyrobuf_list.pyx":253
 *                 value = val.decode('utf-8')
 *             elif isinstance(val, unicode):
 *                 value = val             # <<<<<<<<<<<<<<
 *             else:
 *                 raise TypeError("%r has type %s, but expected one of: (%s, %s)" % (val, type(val), str, unicode))
 */
      if (!(likely(PyUnicode_CheckExact(__pyx_v_val))||((__pyx_v_val) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_v_val)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 253; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __pyx_t_7 = __pyx_v_val;
      __Pyx_INCREF(__pyx_t_7);
      __Pyx_XDECREF_SET(__pyx_v_value, ((PyObject*)__pyx_t_7));
      __pyx_t_7 = 0;

      /* "pyrobuf_list.pyx":252
 *             if isinstance(val, str):
 *                 value = val.decode('utf-8')
 *             elif isinstance(val, unicode):             # <<<<<<<<<<<<<<
 *                 value = val
 *             else:
 */
      goto __pyx_L5;
    }

    /* "pyrobuf_list.pyx":255
 *                 value = val
 *             else:
 *                 raise TypeError("%r has type %s, but expected one of: (%s, %s)" % (val, type(val), str, unicode))             # <<<<<<<<<<<<<<
 *             list.append(self, value)
 * 
 */
    /*else*/ {
      __pyx_t_7 = PyTuple_New(4); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 255; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_INCREF(__pyx_v_val);
      __Pyx_GIVEREF(__pyx_v_val);
      PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_v_val);
      __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_v_val)));
      __Pyx_GIVEREF(((PyObject *)Py_TYPE(__pyx_v_val)));
      PyTuple_SET_ITEM(__pyx_t_7, 1, ((PyObject *)Py_TYPE(__pyx_v_val)));
      __Pyx_INCREF(((PyObject *)(&PyString_Type)));
      __Pyx_GIVEREF(((PyObject *)(&PyString_Type)));
      PyTuple_SET_ITEM(__pyx_t_7, 2, ((PyObject *)(&PyString_Type)));
      __Pyx_INCREF(((PyObject *)(&PyUnicode_Type)));
      __Pyx_GIVEREF(((PyObject *)(&PyUnicode_Type)));
      PyTuple_SET_ITEM(__pyx_t_7, 3, ((PyObject *)(&PyUnicode_Type)));
      __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_r_has_type_s_but_expected_one_o_2, __pyx_t_7); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 255; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 255; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_7);
      __Pyx_GIVEREF(__pyx_t_4);
      PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_4);
      __pyx_t_4 = 0;
      __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_t_7, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 255; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
      __Pyx_Raise(__pyx_t_4, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 255; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_L5:;

    /* "pyrobuf_list.pyx":256
 *             else:
 *                 raise TypeError("%r has type %s, but expected one of: (%s, %s)" % (val, type(val), str, unicode))
 *             list.append(self, value)             # <<<<<<<<<<<<<<
 * 
 *         listener = <object>self._listener
 */
    if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
      PyErr_Format(PyExc_TypeError, "descriptor '%s' requires a '%s' object but received a 'NoneType'", "append", "list");
      {__pyx_filename = __pyx_f[0]; __pyx_lineno = 256; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __pyx_t_8 = __Pyx_PyList_Append(((PyObject*)__pyx_v_self), __pyx_v_value); if (unlikely(__pyx_t_8 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 256; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

    /* "pyrobuf_list.pyx":249
 *         cdef unicode value
 * 
 *         for val in x:             # <<<<<<<<<<<<<<
 *             if isinstance(val, str):
 *                 value = val.decode('utf-8')
 */
  }
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /* "pyrobuf_list.pyx":258
 *             list.append(self, value)
 * 
 *         listener = <object>self._listener             # <<<<<<<<<<<<<<
 *         if not listener._is_present_in_parent:
 *             listener._Modified()
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_self->_listener);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_v_listener = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pyrobuf_list.pyx":259
 * 
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:             # <<<<<<<<<<<<<<
 *             listener._Modified()
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_listener, __pyx_n_s_is_present_in_parent); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 259; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 259; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_6 = ((!__pyx_t_5) != 0);
  if (__pyx_t_6) {

    /* "pyrobuf_list.pyx":260
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:
 *             listener._Modified()             # <<<<<<<<<<<<<<
 * 
 *     def insert(self, i, x):
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_listener, __pyx_n_s_Modified); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 260; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_7 = NULL;
    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    if (__pyx_t_7) {
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_7); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 260; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    } else {
      __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 260; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "pyrobuf_list.pyx":259
 * 
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:             # <<<<<<<<<<<<<<
 *             listener._Modified()
 * 
 */
  }

  /* "pyrobuf_list.pyx":246
 *             listener._Modified()
 * 
 *     def extend(self, x):             # <<<<<<<<<<<<<<
 *         cdef unicode value
 * 
 */

  /* function exit code */
  __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_7);
  __Pyx_AddTraceback("pyrobuf_list.StringList.extend", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_value);
  __Pyx_XDECREF(__pyx_v_val);
  __Pyx_XDECREF(__pyx_v_listener);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrobuf_list.pyx":262
 *             listener._Modified()
 * 
 *     def insert(self, i, x):             # <<<<<<<<<<<<<<
 *         cdef unicode value
 *         if isinstance(x, str):
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrobuf_list_10StringList_11insert(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_12pyrobuf_list_10StringList_11insert(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  PyObject *__pyx_v_i = 0;
  PyObject *__pyx_v_x = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("insert (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_i,&__pyx_n_s_x,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_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 (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_x)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("insert", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 262; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "insert") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 262; __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_i = values[0];
    __pyx_v_x = values[1];
  }
  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 = 262; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyrobuf_list.StringList.insert", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_12pyrobuf_list_10StringList_10insert(((struct __pyx_obj_12pyrobuf_list_StringList *)__pyx_v_self), __pyx_v_i, __pyx_v_x);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_12pyrobuf_list_10StringList_10insert(struct __pyx_obj_12pyrobuf_list_StringList *__pyx_v_self, PyObject *__pyx_v_i, PyObject *__pyx_v_x) {
  PyObject *__pyx_v_value = 0;
  PyObject *__pyx_v_listener = NULL;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  PyObject *__pyx_t_4 = NULL;
  Py_ssize_t __pyx_t_5;
  int __pyx_t_6;
  PyObject *__pyx_t_7 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("insert", 0);

  /* "pyrobuf_list.pyx":264
 *     def insert(self, i, x):
 *         cdef unicode value
 *         if isinstance(x, str):             # <<<<<<<<<<<<<<
 *             value = x.decode('utf-8')
 *         elif isinstance(x, unicode):
 */
  __pyx_t_1 = PyString_Check(__pyx_v_x); 
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "pyrobuf_list.pyx":265
 *         cdef unicode value
 *         if isinstance(x, str):
 *             value = x.decode('utf-8')             # <<<<<<<<<<<<<<
 *         elif isinstance(x, unicode):
 *             value = x
 */
    __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_x, __pyx_n_s_decode); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 265; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple__11, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 265; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    if (!(likely(PyUnicode_CheckExact(__pyx_t_4))||((__pyx_t_4) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_t_4)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 265; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_v_value = ((PyObject*)__pyx_t_4);
    __pyx_t_4 = 0;

    /* "pyrobuf_list.pyx":264
 *     def insert(self, i, x):
 *         cdef unicode value
 *         if isinstance(x, str):             # <<<<<<<<<<<<<<
 *             value = x.decode('utf-8')
 *         elif isinstance(x, unicode):
 */
    goto __pyx_L3;
  }

  /* "pyrobuf_list.pyx":266
 *         if isinstance(x, str):
 *             value = x.decode('utf-8')
 *         elif isinstance(x, unicode):             # <<<<<<<<<<<<<<
 *             value = x
 *         else:
 */
  __pyx_t_2 = PyUnicode_Check(__pyx_v_x); 
  __pyx_t_1 = (__pyx_t_2 != 0);
  if (__pyx_t_1) {

    /* "pyrobuf_list.pyx":267
 *             value = x.decode('utf-8')
 *         elif isinstance(x, unicode):
 *             value = x             # <<<<<<<<<<<<<<
 *         else:
 *             raise TypeError("%r has type %s, but expected one of: (%s, %s)" % (x, type(x), str, unicode))
 */
    if (!(likely(PyUnicode_CheckExact(__pyx_v_x))||((__pyx_v_x) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "unicode", Py_TYPE(__pyx_v_x)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 267; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __pyx_t_4 = __pyx_v_x;
    __Pyx_INCREF(__pyx_t_4);
    __pyx_v_value = ((PyObject*)__pyx_t_4);
    __pyx_t_4 = 0;

    /* "pyrobuf_list.pyx":266
 *         if isinstance(x, str):
 *             value = x.decode('utf-8')
 *         elif isinstance(x, unicode):             # <<<<<<<<<<<<<<
 *             value = x
 *         else:
 */
    goto __pyx_L3;
  }

  /* "pyrobuf_list.pyx":269
 *             value = x
 *         else:
 *             raise TypeError("%r has type %s, but expected one of: (%s, %s)" % (x, type(x), str, unicode))             # <<<<<<<<<<<<<<
 * 
 *         list.insert(self, i, value)
 */
  /*else*/ {
    __pyx_t_4 = PyTuple_New(4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 269; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_INCREF(__pyx_v_x);
    __Pyx_GIVEREF(__pyx_v_x);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_x);
    __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_v_x)));
    __Pyx_GIVEREF(((PyObject *)Py_TYPE(__pyx_v_x)));
    PyTuple_SET_ITEM(__pyx_t_4, 1, ((PyObject *)Py_TYPE(__pyx_v_x)));
    __Pyx_INCREF(((PyObject *)(&PyString_Type)));
    __Pyx_GIVEREF(((PyObject *)(&PyString_Type)));
    PyTuple_SET_ITEM(__pyx_t_4, 2, ((PyObject *)(&PyString_Type)));
    __Pyx_INCREF(((PyObject *)(&PyUnicode_Type)));
    __Pyx_GIVEREF(((PyObject *)(&PyUnicode_Type)));
    PyTuple_SET_ITEM(__pyx_t_4, 3, ((PyObject *)(&PyUnicode_Type)));
    __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_r_has_type_s_but_expected_one_o_2, __pyx_t_4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 269; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 269; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __Pyx_GIVEREF(__pyx_t_3);
    PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3);
    __pyx_t_3 = 0;
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 269; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_Raise(__pyx_t_3, 0, 0, 0);
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 269; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_L3:;

  /* "pyrobuf_list.pyx":271
 *             raise TypeError("%r has type %s, but expected one of: (%s, %s)" % (x, type(x), str, unicode))
 * 
 *         list.insert(self, i, value)             # <<<<<<<<<<<<<<
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:
 */
  if (unlikely(((PyObject *)__pyx_v_self) == Py_None)) {
    PyErr_Format(PyExc_TypeError, "descriptor '%s' requires a '%s' object but received a 'NoneType'", "insert", "list");
    {__pyx_filename = __pyx_f[0]; __pyx_lineno = 271; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  __pyx_t_5 = __Pyx_PyIndex_AsSsize_t(__pyx_v_i); if (unlikely((__pyx_t_5 == (Py_ssize_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 271; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_t_6 = PyList_Insert(((PyObject*)__pyx_v_self), __pyx_t_5, __pyx_v_value); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 271; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pyrobuf_list.pyx":272
 * 
 *         list.insert(self, i, value)
 *         listener = <object>self._listener             # <<<<<<<<<<<<<<
 *         if not listener._is_present_in_parent:
 *             listener._Modified()
 */
  __pyx_t_3 = ((PyObject *)__pyx_v_self->_listener);
  __Pyx_INCREF(__pyx_t_3);
  __pyx_v_listener = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "pyrobuf_list.pyx":273
 *         list.insert(self, i, value)
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:             # <<<<<<<<<<<<<<
 *             listener._Modified()
 * 
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_listener, __pyx_n_s_is_present_in_parent); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 273; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 273; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_2 = ((!__pyx_t_1) != 0);
  if (__pyx_t_2) {

    /* "pyrobuf_list.pyx":274
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:
 *             listener._Modified()             # <<<<<<<<<<<<<<
 * 
 * 
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_listener, __pyx_n_s_Modified); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 274; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_7 = NULL;
    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    if (__pyx_t_7) {
      __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_7); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 274; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    } else {
      __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 274; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "pyrobuf_list.pyx":273
 *         list.insert(self, i, value)
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:             # <<<<<<<<<<<<<<
 *             listener._Modified()
 * 
 */
  }

  /* "pyrobuf_list.pyx":262
 *             listener._Modified()
 * 
 *     def insert(self, i, x):             # <<<<<<<<<<<<<<
 *         cdef unicode value
 *         if isinstance(x, str):
 */

  /* function exit code */
  __pyx_r = Py_None; __Pyx_INCREF(Py_None);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("pyrobuf_list.StringList.insert", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_value);
  __Pyx_XDECREF(__pyx_v_listener);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrobuf_list.pyx":283
 * cdef class Int64List:
 * 
 *     def __cinit__(self, size_t size=16, object listener=None):             # <<<<<<<<<<<<<<
 *         self._data = <int64_t *>PyMem_Malloc(size * sizeof(int64_t))
 *         if not self._data:
 */

/* Python wrapper */
static int __pyx_pw_12pyrobuf_list_9Int64List_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_12pyrobuf_list_9Int64List_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  size_t __pyx_v_size;
  PyObject *__pyx_v_listener = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_size,&__pyx_n_s_listener,0};
    PyObject* values[2] = {0,0};
    values[1] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_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 (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_size);
          if (value) { values[0] = value; kw_args--; }
        }
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_listener);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 283; __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;
      }
    }
    if (values[0]) {
      __pyx_v_size = __Pyx_PyInt_As_size_t(values[0]); if (unlikely((__pyx_v_size == (size_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 283; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    } else {
      __pyx_v_size = ((size_t)16);
    }
    __pyx_v_listener = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 283; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyrobuf_list.Int64List.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_12pyrobuf_list_9Int64List___cinit__(((struct __pyx_obj_12pyrobuf_list_Int64List *)__pyx_v_self), __pyx_v_size, __pyx_v_listener);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_12pyrobuf_list_9Int64List___cinit__(struct __pyx_obj_12pyrobuf_list_Int64List *__pyx_v_self, size_t __pyx_v_size, PyObject *__pyx_v_listener) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);

  /* "pyrobuf_list.pyx":284
 * 
 *     def __cinit__(self, size_t size=16, object listener=None):
 *         self._data = <int64_t *>PyMem_Malloc(size * sizeof(int64_t))             # <<<<<<<<<<<<<<
 *         if not self._data:
 *             raise MemoryError()
 */
  __pyx_v_self->_data = ((int64_t *)PyMem_Malloc((__pyx_v_size * (sizeof(int64_t)))));

  /* "pyrobuf_list.pyx":285
 *     def __cinit__(self, size_t size=16, object listener=None):
 *         self._data = <int64_t *>PyMem_Malloc(size * sizeof(int64_t))
 *         if not self._data:             # <<<<<<<<<<<<<<
 *             raise MemoryError()
 * 
 */
  __pyx_t_1 = ((!(__pyx_v_self->_data != 0)) != 0);
  if (__pyx_t_1) {

    /* "pyrobuf_list.pyx":286
 *         self._data = <int64_t *>PyMem_Malloc(size * sizeof(int64_t))
 *         if not self._data:
 *             raise MemoryError()             # <<<<<<<<<<<<<<
 * 
 *         self._n_items = 0
 */
    PyErr_NoMemory(); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 286; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

    /* "pyrobuf_list.pyx":285
 *     def __cinit__(self, size_t size=16, object listener=None):
 *         self._data = <int64_t *>PyMem_Malloc(size * sizeof(int64_t))
 *         if not self._data:             # <<<<<<<<<<<<<<
 *             raise MemoryError()
 * 
 */
  }

  /* "pyrobuf_list.pyx":288
 *             raise MemoryError()
 * 
 *         self._n_items = 0             # <<<<<<<<<<<<<<
 *         self._size = size
 *         if listener is None:
 */
  __pyx_v_self->_n_items = 0;

  /* "pyrobuf_list.pyx":289
 * 
 *         self._n_items = 0
 *         self._size = size             # <<<<<<<<<<<<<<
 *         if listener is None:
 *             self._listener = <PyObject *>null_listener
 */
  __pyx_v_self->_size = __pyx_v_size;

  /* "pyrobuf_list.pyx":290
 *         self._n_items = 0
 *         self._size = size
 *         if listener is None:             # <<<<<<<<<<<<<<
 *             self._listener = <PyObject *>null_listener
 *         else:
 */
  __pyx_t_1 = (__pyx_v_listener == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "pyrobuf_list.pyx":291
 *         self._size = size
 *         if listener is None:
 *             self._listener = <PyObject *>null_listener             # <<<<<<<<<<<<<<
 *         else:
 *             self._listener = <PyObject *>listener
 */
    __pyx_v_self->_listener = ((PyObject *)null_listener);

    /* "pyrobuf_list.pyx":290
 *         self._n_items = 0
 *         self._size = size
 *         if listener is None:             # <<<<<<<<<<<<<<
 *             self._listener = <PyObject *>null_listener
 *         else:
 */
    goto __pyx_L4;
  }

  /* "pyrobuf_list.pyx":293
 *             self._listener = <PyObject *>null_listener
 *         else:
 *             self._listener = <PyObject *>listener             # <<<<<<<<<<<<<<
 * 
 *     def __dealloc__(self):
 */
  /*else*/ {
    __pyx_v_self->_listener = ((PyObject *)__pyx_v_listener);
  }
  __pyx_L4:;

  /* "pyrobuf_list.pyx":283
 * cdef class Int64List:
 * 
 *     def __cinit__(self, size_t size=16, object listener=None):             # <<<<<<<<<<<<<<
 *         self._data = <int64_t *>PyMem_Malloc(size * sizeof(int64_t))
 *         if not self._data:
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyrobuf_list.Int64List.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrobuf_list.pyx":295
 *             self._listener = <PyObject *>listener
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         PyMem_Free(self._data)
 * 
 */

/* Python wrapper */
static void __pyx_pw_12pyrobuf_list_9Int64List_3__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_12pyrobuf_list_9Int64List_3__dealloc__(PyObject *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_pf_12pyrobuf_list_9Int64List_2__dealloc__(((struct __pyx_obj_12pyrobuf_list_Int64List *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

static void __pyx_pf_12pyrobuf_list_9Int64List_2__dealloc__(struct __pyx_obj_12pyrobuf_list_Int64List *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__", 0);

  /* "pyrobuf_list.pyx":296
 * 
 *     def __dealloc__(self):
 *         PyMem_Free(self._data)             # <<<<<<<<<<<<<<
 * 
 *     def __contains__(self, int64_t x):
 */
  PyMem_Free(__pyx_v_self->_data);

  /* "pyrobuf_list.pyx":295
 *             self._listener = <PyObject *>listener
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         PyMem_Free(self._data)
 * 
 */

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

/* "pyrobuf_list.pyx":298
 *         PyMem_Free(self._data)
 * 
 *     def __contains__(self, int64_t x):             # <<<<<<<<<<<<<<
 *         cdef size_t i
 *         for i in range(self._n_items):
 */

/* Python wrapper */
static int __pyx_pw_12pyrobuf_list_9Int64List_5__contains__(PyObject *__pyx_v_self, PyObject *__pyx_arg_x); /*proto*/
static int __pyx_pw_12pyrobuf_list_9Int64List_5__contains__(PyObject *__pyx_v_self, PyObject *__pyx_arg_x) {
  int64_t __pyx_v_x;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__contains__ (wrapper)", 0);
  assert(__pyx_arg_x); {
    __pyx_v_x = __Pyx_PyInt_As_int64_t(__pyx_arg_x); if (unlikely((__pyx_v_x == (int64_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 298; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyrobuf_list.Int64List.__contains__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_12pyrobuf_list_9Int64List_4__contains__(((struct __pyx_obj_12pyrobuf_list_Int64List *)__pyx_v_self), ((int64_t)__pyx_v_x));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_12pyrobuf_list_9Int64List_4__contains__(struct __pyx_obj_12pyrobuf_list_Int64List *__pyx_v_self, int64_t __pyx_v_x) {
  size_t __pyx_v_i;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  size_t __pyx_t_1;
  size_t __pyx_t_2;
  int __pyx_t_3;
  __Pyx_RefNannySetupContext("__contains__", 0);

  /* "pyrobuf_list.pyx":300
 *     def __contains__(self, int64_t x):
 *         cdef size_t i
 *         for i in range(self._n_items):             # <<<<<<<<<<<<<<
 *             if self._data[i] == x:
 *                 return True
 */
  __pyx_t_1 = __pyx_v_self->_n_items;
  for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
    __pyx_v_i = __pyx_t_2;

    /* "pyrobuf_list.pyx":301
 *         cdef size_t i
 *         for i in range(self._n_items):
 *             if self._data[i] == x:             # <<<<<<<<<<<<<<
 *                 return True
 * 
 */
    __pyx_t_3 = (((__pyx_v_self->_data[__pyx_v_i]) == __pyx_v_x) != 0);
    if (__pyx_t_3) {

      /* "pyrobuf_list.pyx":302
 *         for i in range(self._n_items):
 *             if self._data[i] == x:
 *                 return True             # <<<<<<<<<<<<<<
 * 
 *         return False
 */
      __pyx_r = 1;
      goto __pyx_L0;

      /* "pyrobuf_list.pyx":301
 *         cdef size_t i
 *         for i in range(self._n_items):
 *             if self._data[i] == x:             # <<<<<<<<<<<<<<
 *                 return True
 * 
 */
    }
  }

  /* "pyrobuf_list.pyx":304
 *                 return True
 * 
 *         return False             # <<<<<<<<<<<<<<
 * 
 *     def __delitem__(self, int i):
 */
  __pyx_r = 0;
  goto __pyx_L0;

  /* "pyrobuf_list.pyx":298
 *         PyMem_Free(self._data)
 * 
 *     def __contains__(self, int64_t x):             # <<<<<<<<<<<<<<
 *         cdef size_t i
 *         for i in range(self._n_items):
 */

  /* function exit code */
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrobuf_list.pyx":306
 *         return False
 * 
 *     def __delitem__(self, int i):             # <<<<<<<<<<<<<<
 *         if i < 0:
 *             i += <int>self._n_items
 */

/* Python wrapper */
static int __pyx_pw_12pyrobuf_list_9Int64List_7__delitem__(PyObject *__pyx_v_self, PyObject *__pyx_arg_i); /*proto*/
static int __pyx_pw_12pyrobuf_list_9Int64List_7__delitem__(PyObject *__pyx_v_self, PyObject *__pyx_arg_i) {
  int __pyx_v_i;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__delitem__ (wrapper)", 0);
  assert(__pyx_arg_i); {
    __pyx_v_i = __Pyx_PyInt_As_int(__pyx_arg_i); if (unlikely((__pyx_v_i == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 306; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyrobuf_list.Int64List.__delitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_12pyrobuf_list_9Int64List_6__delitem__(((struct __pyx_obj_12pyrobuf_list_Int64List *)__pyx_v_self), ((int)__pyx_v_i));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_12pyrobuf_list_9Int64List_6__delitem__(struct __pyx_obj_12pyrobuf_list_Int64List *__pyx_v_self, int __pyx_v_i) {
  size_t __pyx_v_j;
  PyObject *__pyx_v_listener = NULL;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  size_t __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;
  __Pyx_RefNannySetupContext("__delitem__", 0);

  /* "pyrobuf_list.pyx":307
 * 
 *     def __delitem__(self, int i):
 *         if i < 0:             # <<<<<<<<<<<<<<
 *             i += <int>self._n_items
 * 
 */
  __pyx_t_1 = ((__pyx_v_i < 0) != 0);
  if (__pyx_t_1) {

    /* "pyrobuf_list.pyx":308
 *     def __delitem__(self, int i):
 *         if i < 0:
 *             i += <int>self._n_items             # <<<<<<<<<<<<<<
 * 
 *         if i < 0 or <size_t>i >= self._n_items:
 */
    __pyx_v_i = (__pyx_v_i + ((int)__pyx_v_self->_n_items));

    /* "pyrobuf_list.pyx":307
 * 
 *     def __delitem__(self, int i):
 *         if i < 0:             # <<<<<<<<<<<<<<
 *             i += <int>self._n_items
 * 
 */
  }

  /* "pyrobuf_list.pyx":310
 *             i += <int>self._n_items
 * 
 *         if i < 0 or <size_t>i >= self._n_items:             # <<<<<<<<<<<<<<
 *             raise IndexError("list index out of range")
 * 
 */
  __pyx_t_2 = ((__pyx_v_i < 0) != 0);
  if (!__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L5_bool_binop_done;
  }
  __pyx_t_2 = ((((size_t)__pyx_v_i) >= __pyx_v_self->_n_items) != 0);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L5_bool_binop_done:;
  if (__pyx_t_1) {

    /* "pyrobuf_list.pyx":311
 * 
 *         if i < 0 or <size_t>i >= self._n_items:
 *             raise IndexError("list index out of range")             # <<<<<<<<<<<<<<
 * 
 *         cdef size_t j
 */
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_IndexError, __pyx_tuple__12, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 311; __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 = 311; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

    /* "pyrobuf_list.pyx":310
 *             i += <int>self._n_items
 * 
 *         if i < 0 or <size_t>i >= self._n_items:             # <<<<<<<<<<<<<<
 *             raise IndexError("list index out of range")
 * 
 */
  }

  /* "pyrobuf_list.pyx":314
 * 
 *         cdef size_t j
 *         for j in range(i, self._n_items):             # <<<<<<<<<<<<<<
 *             self._data[j] = self._data[j + 1]
 * 
 */
  __pyx_t_4 = __pyx_v_self->_n_items;
  for (__pyx_t_5 = __pyx_v_i; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
    __pyx_v_j = __pyx_t_5;

    /* "pyrobuf_list.pyx":315
 *         cdef size_t j
 *         for j in range(i, self._n_items):
 *             self._data[j] = self._data[j + 1]             # <<<<<<<<<<<<<<
 * 
 *         self._n_items -= 1
 */
    (__pyx_v_self->_data[__pyx_v_j]) = (__pyx_v_self->_data[(__pyx_v_j + 1)]);
  }

  /* "pyrobuf_list.pyx":317
 *             self._data[j] = self._data[j + 1]
 * 
 *         self._n_items -= 1             # <<<<<<<<<<<<<<
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:
 */
  __pyx_v_self->_n_items = (__pyx_v_self->_n_items - 1);

  /* "pyrobuf_list.pyx":318
 * 
 *         self._n_items -= 1
 *         listener = <object>self._listener             # <<<<<<<<<<<<<<
 *         if not listener._is_present_in_parent:
 *             listener._Modified()
 */
  __pyx_t_3 = ((PyObject *)__pyx_v_self->_listener);
  __Pyx_INCREF(__pyx_t_3);
  __pyx_v_listener = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "pyrobuf_list.pyx":319
 *         self._n_items -= 1
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:             # <<<<<<<<<<<<<<
 *             listener._Modified()
 * 
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_listener, __pyx_n_s_is_present_in_parent); 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_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 319; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_2 = ((!__pyx_t_1) != 0);
  if (__pyx_t_2) {

    /* "pyrobuf_list.pyx":320
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:
 *             listener._Modified()             # <<<<<<<<<<<<<<
 * 
 *     def __getitem__(self, int i):
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_listener, __pyx_n_s_Modified); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 320; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = NULL;
    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_6, function);
      }
    }
    if (__pyx_t_7) {
      __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_7); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 320; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    } else {
      __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_6); 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_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "pyrobuf_list.pyx":319
 *         self._n_items -= 1
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:             # <<<<<<<<<<<<<<
 *             listener._Modified()
 * 
 */
  }

  /* "pyrobuf_list.pyx":306
 *         return False
 * 
 *     def __delitem__(self, int i):             # <<<<<<<<<<<<<<
 *         if i < 0:
 *             i += <int>self._n_items
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("pyrobuf_list.Int64List.__delitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_listener);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrobuf_list.pyx":322
 *             listener._Modified()
 * 
 *     def __getitem__(self, int i):             # <<<<<<<<<<<<<<
 *         if i < 0:
 *             i += <int>self._n_items
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrobuf_list_9Int64List_9__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_arg_i); /*proto*/
static PyObject *__pyx_pw_12pyrobuf_list_9Int64List_9__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_arg_i) {
  int __pyx_v_i;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0);
  assert(__pyx_arg_i); {
    __pyx_v_i = __Pyx_PyInt_As_int(__pyx_arg_i); if (unlikely((__pyx_v_i == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 322; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyrobuf_list.Int64List.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_12pyrobuf_list_9Int64List_8__getitem__(((struct __pyx_obj_12pyrobuf_list_Int64List *)__pyx_v_self), ((int)__pyx_v_i));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_12pyrobuf_list_9Int64List_8__getitem__(struct __pyx_obj_12pyrobuf_list_Int64List *__pyx_v_self, int __pyx_v_i) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__getitem__", 0);

  /* "pyrobuf_list.pyx":323
 * 
 *     def __getitem__(self, int i):
 *         if i < 0:             # <<<<<<<<<<<<<<
 *             i += <int>self._n_items
 * 
 */
  __pyx_t_1 = ((__pyx_v_i < 0) != 0);
  if (__pyx_t_1) {

    /* "pyrobuf_list.pyx":324
 *     def __getitem__(self, int i):
 *         if i < 0:
 *             i += <int>self._n_items             # <<<<<<<<<<<<<<
 * 
 *         if i < 0 or <size_t>i >= self._n_items or i < 0:
 */
    __pyx_v_i = (__pyx_v_i + ((int)__pyx_v_self->_n_items));

    /* "pyrobuf_list.pyx":323
 * 
 *     def __getitem__(self, int i):
 *         if i < 0:             # <<<<<<<<<<<<<<
 *             i += <int>self._n_items
 * 
 */
  }

  /* "pyrobuf_list.pyx":326
 *             i += <int>self._n_items
 * 
 *         if i < 0 or <size_t>i >= self._n_items or i < 0:             # <<<<<<<<<<<<<<
 *             raise IndexError("list index out of range")
 * 
 */
  __pyx_t_2 = ((__pyx_v_i < 0) != 0);
  if (!__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L5_bool_binop_done;
  }
  __pyx_t_2 = ((((size_t)__pyx_v_i) >= __pyx_v_self->_n_items) != 0);
  if (!__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L5_bool_binop_done;
  }
  __pyx_t_2 = ((__pyx_v_i < 0) != 0);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L5_bool_binop_done:;
  if (__pyx_t_1) {

    /* "pyrobuf_list.pyx":327
 * 
 *         if i < 0 or <size_t>i >= self._n_items or i < 0:
 *             raise IndexError("list index out of range")             # <<<<<<<<<<<<<<
 * 
 *         return self._data[i]
 */
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_IndexError, __pyx_tuple__13, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 327; __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 = 327; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

    /* "pyrobuf_list.pyx":326
 *             i += <int>self._n_items
 * 
 *         if i < 0 or <size_t>i >= self._n_items or i < 0:             # <<<<<<<<<<<<<<
 *             raise IndexError("list index out of range")
 * 
 */
  }

  /* "pyrobuf_list.pyx":329
 *             raise IndexError("list index out of range")
 * 
 *         return self._data[i]             # <<<<<<<<<<<<<<
 * 
 *     def __iter__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = __Pyx_PyInt_From_int64_t((__pyx_v_self->_data[__pyx_v_i])); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 329; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "pyrobuf_list.pyx":322
 *             listener._Modified()
 * 
 *     def __getitem__(self, int i):             # <<<<<<<<<<<<<<
 *         if i < 0:
 *             i += <int>self._n_items
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pyrobuf_list.Int64List.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_12pyrobuf_list_9Int64List_12generator(__pyx_CoroutineObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */

/* "pyrobuf_list.pyx":331
 *         return self._data[i]
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         cdef size_t idx = 0
 *         while idx < self._n_items:
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrobuf_list_9Int64List_11__iter__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_12pyrobuf_list_9Int64List_11__iter__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrobuf_list_9Int64List_10__iter__(((struct __pyx_obj_12pyrobuf_list_Int64List *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_12pyrobuf_list_9Int64List_10__iter__(struct __pyx_obj_12pyrobuf_list_Int64List *__pyx_v_self) {
  struct __pyx_obj_12pyrobuf_list___pyx_scope_struct____iter__ *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__iter__", 0);
  __pyx_cur_scope = (struct __pyx_obj_12pyrobuf_list___pyx_scope_struct____iter__ *)__pyx_tp_new_12pyrobuf_list___pyx_scope_struct____iter__(__pyx_ptype_12pyrobuf_list___pyx_scope_struct____iter__, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __Pyx_GOTREF(__pyx_cur_scope);
  __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
  __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  {
    __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_12pyrobuf_list_9Int64List_12generator, (PyObject *) __pyx_cur_scope, __pyx_n_s_iter, __pyx_n_s_Int64List___iter); if (unlikely(!gen)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 331; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyrobuf_list.Int64List.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_gb_12pyrobuf_list_9Int64List_12generator(__pyx_CoroutineObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_12pyrobuf_list___pyx_scope_struct____iter__ *__pyx_cur_scope = ((struct __pyx_obj_12pyrobuf_list___pyx_scope_struct____iter__ *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("None", 0);
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    case 1: goto __pyx_L6_resume_from_yield;
    default: /* CPython raises the right error here */
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __pyx_L3_first_run:;
  if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 331; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pyrobuf_list.pyx":332
 * 
 *     def __iter__(self):
 *         cdef size_t idx = 0             # <<<<<<<<<<<<<<
 *         while idx < self._n_items:
 *             yield self._data[idx]
 */
  __pyx_cur_scope->__pyx_v_idx = 0;

  /* "pyrobuf_list.pyx":333
 *     def __iter__(self):
 *         cdef size_t idx = 0
 *         while idx < self._n_items:             # <<<<<<<<<<<<<<
 *             yield self._data[idx]
 *             idx += 1
 */
  while (1) {
    __pyx_t_1 = ((__pyx_cur_scope->__pyx_v_idx < __pyx_cur_scope->__pyx_v_self->_n_items) != 0);
    if (!__pyx_t_1) break;

    /* "pyrobuf_list.pyx":334
 *         cdef size_t idx = 0
 *         while idx < self._n_items:
 *             yield self._data[idx]             # <<<<<<<<<<<<<<
 *             idx += 1
 * 
 */
    __pyx_t_2 = __Pyx_PyInt_From_int64_t((__pyx_cur_scope->__pyx_v_self->_data[__pyx_cur_scope->__pyx_v_idx])); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 334; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    __Pyx_XGIVEREF(__pyx_r);
    __Pyx_RefNannyFinishContext();
    /* return from generator, yielding value */
    __pyx_generator->resume_label = 1;
    return __pyx_r;
    __pyx_L6_resume_from_yield:;
    if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 334; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

    /* "pyrobuf_list.pyx":335
 *         while idx < self._n_items:
 *             yield self._data[idx]
 *             idx += 1             # <<<<<<<<<<<<<<
 * 
 *     def __len__(self):
 */
    __pyx_cur_scope->__pyx_v_idx = (__pyx_cur_scope->__pyx_v_idx + 1);
  }

  /* "pyrobuf_list.pyx":331
 *         return self._data[i]
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         cdef size_t idx = 0
 *         while idx < self._n_items:
 */

  /* function exit code */
  PyErr_SetNone(PyExc_StopIteration);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
  __pyx_generator->resume_label = -1;
  __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrobuf_list.pyx":337
 *             idx += 1
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         return self._n_items
 * 
 */

/* Python wrapper */
static Py_ssize_t __pyx_pw_12pyrobuf_list_9Int64List_14__len__(PyObject *__pyx_v_self); /*proto*/
static Py_ssize_t __pyx_pw_12pyrobuf_list_9Int64List_14__len__(PyObject *__pyx_v_self) {
  Py_ssize_t __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__len__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrobuf_list_9Int64List_13__len__(((struct __pyx_obj_12pyrobuf_list_Int64List *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static Py_ssize_t __pyx_pf_12pyrobuf_list_9Int64List_13__len__(struct __pyx_obj_12pyrobuf_list_Int64List *__pyx_v_self) {
  Py_ssize_t __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__len__", 0);

  /* "pyrobuf_list.pyx":338
 * 
 *     def __len__(self):
 *         return self._n_items             # <<<<<<<<<<<<<<
 * 
 *     def __repr__(self):
 */
  __pyx_r = __pyx_v_self->_n_items;
  goto __pyx_L0;

  /* "pyrobuf_list.pyx":337
 *             idx += 1
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         return self._n_items
 * 
 */

  /* function exit code */
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrobuf_list.pyx":340
 *         return self._n_items
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return repr(list(self))
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrobuf_list_9Int64List_16__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_12pyrobuf_list_9Int64List_16__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrobuf_list_9Int64List_15__repr__(((struct __pyx_obj_12pyrobuf_list_Int64List *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_12pyrobuf_list_9Int64List_15__repr__(struct __pyx_obj_12pyrobuf_list_Int64List *__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__", 0);

  /* "pyrobuf_list.pyx":341
 * 
 *     def __repr__(self):
 *         return repr(list(self))             # <<<<<<<<<<<<<<
 * 
 *     def __setitem__(self, int i, int64_t x):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PySequence_List(((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 341; __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 = 341; __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;

  /* "pyrobuf_list.pyx":340
 *         return self._n_items
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return repr(list(self))
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pyrobuf_list.Int64List.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrobuf_list.pyx":343
 *         return repr(list(self))
 * 
 *     def __setitem__(self, int i, int64_t x):             # <<<<<<<<<<<<<<
 *         if i < 0:
 *             i += <int>self._n_items
 */

/* Python wrapper */
static int __pyx_pw_12pyrobuf_list_9Int64List_18__setitem__(PyObject *__pyx_v_self, PyObject *__pyx_arg_i, PyObject *__pyx_arg_x); /*proto*/
static int __pyx_pw_12pyrobuf_list_9Int64List_18__setitem__(PyObject *__pyx_v_self, PyObject *__pyx_arg_i, PyObject *__pyx_arg_x) {
  int __pyx_v_i;
  int64_t __pyx_v_x;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setitem__ (wrapper)", 0);
  assert(__pyx_arg_i); {
    __pyx_v_i = __Pyx_PyInt_As_int(__pyx_arg_i); if (unlikely((__pyx_v_i == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 343; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  }
  assert(__pyx_arg_x); {
    __pyx_v_x = __Pyx_PyInt_As_int64_t(__pyx_arg_x); if (unlikely((__pyx_v_x == (int64_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 343; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyrobuf_list.Int64List.__setitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_12pyrobuf_list_9Int64List_17__setitem__(((struct __pyx_obj_12pyrobuf_list_Int64List *)__pyx_v_self), ((int)__pyx_v_i), ((int64_t)__pyx_v_x));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_12pyrobuf_list_9Int64List_17__setitem__(struct __pyx_obj_12pyrobuf_list_Int64List *__pyx_v_self, int __pyx_v_i, int64_t __pyx_v_x) {
  PyObject *__pyx_v_listener = NULL;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  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;
  __Pyx_RefNannySetupContext("__setitem__", 0);

  /* "pyrobuf_list.pyx":344
 * 
 *     def __setitem__(self, int i, int64_t x):
 *         if i < 0:             # <<<<<<<<<<<<<<
 *             i += <int>self._n_items
 * 
 */
  __pyx_t_1 = ((__pyx_v_i < 0) != 0);
  if (__pyx_t_1) {

    /* "pyrobuf_list.pyx":345
 *     def __setitem__(self, int i, int64_t x):
 *         if i < 0:
 *             i += <int>self._n_items             # <<<<<<<<<<<<<<
 * 
 *         if i < 0 or <size_t>i >= self._n_items:
 */
    __pyx_v_i = (__pyx_v_i + ((int)__pyx_v_self->_n_items));

    /* "pyrobuf_list.pyx":344
 * 
 *     def __setitem__(self, int i, int64_t x):
 *         if i < 0:             # <<<<<<<<<<<<<<
 *             i += <int>self._n_items
 * 
 */
  }

  /* "pyrobuf_list.pyx":347
 *             i += <int>self._n_items
 * 
 *         if i < 0 or <size_t>i >= self._n_items:             # <<<<<<<<<<<<<<
 *             raise IndexError("list index out of range")
 * 
 */
  __pyx_t_2 = ((__pyx_v_i < 0) != 0);
  if (!__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L5_bool_binop_done;
  }
  __pyx_t_2 = ((((size_t)__pyx_v_i) >= __pyx_v_self->_n_items) != 0);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L5_bool_binop_done:;
  if (__pyx_t_1) {

    /* "pyrobuf_list.pyx":348
 * 
 *         if i < 0 or <size_t>i >= self._n_items:
 *             raise IndexError("list index out of range")             # <<<<<<<<<<<<<<
 * 
 *         self._data[i] = x
 */
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_IndexError, __pyx_tuple__14, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 348; __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 = 348; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

    /* "pyrobuf_list.pyx":347
 *             i += <int>self._n_items
 * 
 *         if i < 0 or <size_t>i >= self._n_items:             # <<<<<<<<<<<<<<
 *             raise IndexError("list index out of range")
 * 
 */
  }

  /* "pyrobuf_list.pyx":350
 *             raise IndexError("list index out of range")
 * 
 *         self._data[i] = x             # <<<<<<<<<<<<<<
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:
 */
  (__pyx_v_self->_data[__pyx_v_i]) = __pyx_v_x;

  /* "pyrobuf_list.pyx":351
 * 
 *         self._data[i] = x
 *         listener = <object>self._listener             # <<<<<<<<<<<<<<
 *         if not listener._is_present_in_parent:
 *             listener._Modified()
 */
  __pyx_t_3 = ((PyObject *)__pyx_v_self->_listener);
  __Pyx_INCREF(__pyx_t_3);
  __pyx_v_listener = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "pyrobuf_list.pyx":352
 *         self._data[i] = x
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:             # <<<<<<<<<<<<<<
 *             listener._Modified()
 * 
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_listener, __pyx_n_s_is_present_in_parent); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 352; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 352; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_2 = ((!__pyx_t_1) != 0);
  if (__pyx_t_2) {

    /* "pyrobuf_list.pyx":353
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:
 *             listener._Modified()             # <<<<<<<<<<<<<<
 * 
 *     def __str__(self):
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_listener, __pyx_n_s_Modified); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 353; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = NULL;
    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    if (__pyx_t_5) {
      __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 353; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    } else {
      __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 353; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "pyrobuf_list.pyx":352
 *         self._data[i] = x
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:             # <<<<<<<<<<<<<<
 *             listener._Modified()
 * 
 */
  }

  /* "pyrobuf_list.pyx":343
 *         return repr(list(self))
 * 
 *     def __setitem__(self, int i, int64_t x):             # <<<<<<<<<<<<<<
 *         if i < 0:
 *             i += <int>self._n_items
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pyrobuf_list.Int64List.__setitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_listener);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrobuf_list.pyx":355
 *             listener._Modified()
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return str(list(self))
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrobuf_list_9Int64List_20__str__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_12pyrobuf_list_9Int64List_20__str__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrobuf_list_9Int64List_19__str__(((struct __pyx_obj_12pyrobuf_list_Int64List *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_12pyrobuf_list_9Int64List_19__str__(struct __pyx_obj_12pyrobuf_list_Int64List *__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__", 0);

  /* "pyrobuf_list.pyx":356
 * 
 *     def __str__(self):
 *         return str(list(self))             # <<<<<<<<<<<<<<
 * 
 *     def __getbuffer__(self, Py_buffer *buffer, int flags):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PySequence_List(((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 356; __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 = 356; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)(&PyString_Type)), __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 356; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyrobuf_list.pyx":355
 *             listener._Modified()
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return str(list(self))
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pyrobuf_list.Int64List.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrobuf_list.pyx":358
 *         return str(list(self))
 * 
 *     def __getbuffer__(self, Py_buffer *buffer, int flags):             # <<<<<<<<<<<<<<
 * 
 *         cdef Py_ssize_t itemsize = sizeof(int64_t)
 */

/* Python wrapper */
static CYTHON_UNUSED int __pyx_pw_12pyrobuf_list_9Int64List_22__getbuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_buffer, int __pyx_v_flags); /*proto*/
static CYTHON_UNUSED int __pyx_pw_12pyrobuf_list_9Int64List_22__getbuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_buffer, int __pyx_v_flags) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__getbuffer__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrobuf_list_9Int64List_21__getbuffer__(((struct __pyx_obj_12pyrobuf_list_Int64List *)__pyx_v_self), ((Py_buffer *)__pyx_v_buffer), ((int)__pyx_v_flags));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_12pyrobuf_list_9Int64List_21__getbuffer__(struct __pyx_obj_12pyrobuf_list_Int64List *__pyx_v_self, Py_buffer *__pyx_v_buffer, CYTHON_UNUSED int __pyx_v_flags) {
  Py_ssize_t __pyx_v_itemsize;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  size_t __pyx_t_1;
  Py_ssize_t *__pyx_t_2;
  __Pyx_RefNannySetupContext("__getbuffer__", 0);
  if (__pyx_v_buffer != NULL) {
    __pyx_v_buffer->obj = Py_None; __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(__pyx_v_buffer->obj);
  }

  /* "pyrobuf_list.pyx":360
 *     def __getbuffer__(self, Py_buffer *buffer, int flags):
 * 
 *         cdef Py_ssize_t itemsize = sizeof(int64_t)             # <<<<<<<<<<<<<<
 *         self.shape[0] = self._n_items
 *         self.strides[0] = 1
 */
  __pyx_v_itemsize = (sizeof(int64_t));

  /* "pyrobuf_list.pyx":361
 * 
 *         cdef Py_ssize_t itemsize = sizeof(int64_t)
 *         self.shape[0] = self._n_items             # <<<<<<<<<<<<<<
 *         self.strides[0] = 1
 * 
 */
  __pyx_t_1 = __pyx_v_self->_n_items;
  (__pyx_v_self->shape[0]) = __pyx_t_1;

  /* "pyrobuf_list.pyx":362
 *         cdef Py_ssize_t itemsize = sizeof(int64_t)
 *         self.shape[0] = self._n_items
 *         self.strides[0] = 1             # <<<<<<<<<<<<<<
 * 
 *         buffer.buf = <char *>(self._data)
 */
  (__pyx_v_self->strides[0]) = 1;

  /* "pyrobuf_list.pyx":364
 *         self.strides[0] = 1
 * 
 *         buffer.buf = <char *>(self._data)             # <<<<<<<<<<<<<<
 *         buffer.format = 'L'
 *         buffer.internal = NULL                  # see References
 */
  __pyx_v_buffer->buf = ((char *)__pyx_v_self->_data);

  /* "pyrobuf_list.pyx":365
 * 
 *         buffer.buf = <char *>(self._data)
 *         buffer.format = 'L'             # <<<<<<<<<<<<<<
 *         buffer.internal = NULL                  # see References
 *         buffer.itemsize = itemsize
 */
  __pyx_v_buffer->format = __pyx_k_L;

  /* "pyrobuf_list.pyx":366
 *         buffer.buf = <char *>(self._data)
 *         buffer.format = 'L'
 *         buffer.internal = NULL                  # see References             # <<<<<<<<<<<<<<
 *         buffer.itemsize = itemsize
 *         buffer.len = self._n_items
 */
  __pyx_v_buffer->internal = NULL;

  /* "pyrobuf_list.pyx":367
 *         buffer.format = 'L'
 *         buffer.internal = NULL                  # see References
 *         buffer.itemsize = itemsize             # <<<<<<<<<<<<<<
 *         buffer.len = self._n_items
 *         buffer.ndim = 1
 */
  __pyx_v_buffer->itemsize = __pyx_v_itemsize;

  /* "pyrobuf_list.pyx":368
 *         buffer.internal = NULL                  # see References
 *         buffer.itemsize = itemsize
 *         buffer.len = self._n_items             # <<<<<<<<<<<<<<
 *         buffer.ndim = 1
 *         buffer.obj = self
 */
  __pyx_t_1 = __pyx_v_self->_n_items;
  __pyx_v_buffer->len = __pyx_t_1;

  /* "pyrobuf_list.pyx":369
 *         buffer.itemsize = itemsize
 *         buffer.len = self._n_items
 *         buffer.ndim = 1             # <<<<<<<<<<<<<<
 *         buffer.obj = self
 *         buffer.readonly = 1
 */
  __pyx_v_buffer->ndim = 1;

  /* "pyrobuf_list.pyx":370
 *         buffer.len = self._n_items
 *         buffer.ndim = 1
 *         buffer.obj = self             # <<<<<<<<<<<<<<
 *         buffer.readonly = 1
 *         buffer.shape = self.shape
 */
  __Pyx_INCREF(((PyObject *)__pyx_v_self));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
  __Pyx_GOTREF(__pyx_v_buffer->obj);
  __Pyx_DECREF(__pyx_v_buffer->obj);
  __pyx_v_buffer->obj = ((PyObject *)__pyx_v_self);

  /* "pyrobuf_list.pyx":371
 *         buffer.ndim = 1
 *         buffer.obj = self
 *         buffer.readonly = 1             # <<<<<<<<<<<<<<
 *         buffer.shape = self.shape
 *         buffer.strides = self.strides
 */
  __pyx_v_buffer->readonly = 1;

  /* "pyrobuf_list.pyx":372
 *         buffer.obj = self
 *         buffer.readonly = 1
 *         buffer.shape = self.shape             # <<<<<<<<<<<<<<
 *         buffer.strides = self.strides
 *         buffer.suboffsets = NULL                # for pointer arrays only
 */
  __pyx_t_2 = __pyx_v_self->shape;
  __pyx_v_buffer->shape = __pyx_t_2;

  /* "pyrobuf_list.pyx":373
 *         buffer.readonly = 1
 *         buffer.shape = self.shape
 *         buffer.strides = self.strides             # <<<<<<<<<<<<<<
 *         buffer.suboffsets = NULL                # for pointer arrays only
 * 
 */
  __pyx_t_2 = __pyx_v_self->strides;
  __pyx_v_buffer->strides = __pyx_t_2;

  /* "pyrobuf_list.pyx":374
 *         buffer.shape = self.shape
 *         buffer.strides = self.strides
 *         buffer.suboffsets = NULL                # for pointer arrays only             # <<<<<<<<<<<<<<
 * 
 *     def __releasebuffer__(self, Py_buffer *buffer):
 */
  __pyx_v_buffer->suboffsets = NULL;

  /* "pyrobuf_list.pyx":358
 *         return str(list(self))
 * 
 *     def __getbuffer__(self, Py_buffer *buffer, int flags):             # <<<<<<<<<<<<<<
 * 
 *         cdef Py_ssize_t itemsize = sizeof(int64_t)
 */

  /* function exit code */
  __pyx_r = 0;
  if (__pyx_v_buffer != NULL && __pyx_v_buffer->obj == Py_None) {
    __Pyx_GOTREF(Py_None);
    __Pyx_DECREF(Py_None); __pyx_v_buffer->obj = NULL;
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrobuf_list.pyx":376
 *         buffer.suboffsets = NULL                # for pointer arrays only
 * 
 *     def __releasebuffer__(self, Py_buffer *buffer):             # <<<<<<<<<<<<<<
 *         pass
 * 
 */

/* Python wrapper */
static CYTHON_UNUSED void __pyx_pw_12pyrobuf_list_9Int64List_24__releasebuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_buffer); /*proto*/
static CYTHON_UNUSED void __pyx_pw_12pyrobuf_list_9Int64List_24__releasebuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_buffer) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__releasebuffer__ (wrapper)", 0);
  __pyx_pf_12pyrobuf_list_9Int64List_23__releasebuffer__(((struct __pyx_obj_12pyrobuf_list_Int64List *)__pyx_v_self), ((Py_buffer *)__pyx_v_buffer));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

static void __pyx_pf_12pyrobuf_list_9Int64List_23__releasebuffer__(CYTHON_UNUSED struct __pyx_obj_12pyrobuf_list_Int64List *__pyx_v_self, CYTHON_UNUSED Py_buffer *__pyx_v_buffer) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__releasebuffer__", 0);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

/* "pyrobuf_list.pyx":379
 *         pass
 * 
 *     cpdef append(self, int64_t x):             # <<<<<<<<<<<<<<
 *         self._append(x)
 *         listener = <object>self._listener
 */

static PyObject *__pyx_pw_12pyrobuf_list_9Int64List_26append(PyObject *__pyx_v_self, PyObject *__pyx_arg_x); /*proto*/
static PyObject *__pyx_f_12pyrobuf_list_9Int64List_append(struct __pyx_obj_12pyrobuf_list_Int64List *__pyx_v_self, int64_t __pyx_v_x, int __pyx_skip_dispatch) {
  PyObject *__pyx_v_listener = NULL;
  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;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  int __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("append", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_append); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 379; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_12pyrobuf_list_9Int64List_26append)) {
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_3 = __Pyx_PyInt_From_int64_t(__pyx_v_x); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 379; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_4 = __pyx_t_1; __pyx_t_5 = NULL;
      if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_4))) {
        __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
        if (likely(__pyx_t_5)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_5);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_4, function);
        }
      }
      if (!__pyx_t_5) {
        __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 379; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_GOTREF(__pyx_t_2);
      } else {
        __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 379; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL;
        __Pyx_GIVEREF(__pyx_t_3);
        PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_3);
        __pyx_t_3 = 0;
        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 379; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 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;
  }

  /* "pyrobuf_list.pyx":380
 * 
 *     cpdef append(self, int64_t x):
 *         self._append(x)             # <<<<<<<<<<<<<<
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:
 */
  ((struct __pyx_vtabstruct_12pyrobuf_list_Int64List *)__pyx_v_self->__pyx_vtab)->_append(__pyx_v_self, __pyx_v_x);

  /* "pyrobuf_list.pyx":381
 *     cpdef append(self, int64_t x):
 *         self._append(x)
 *         listener = <object>self._listener             # <<<<<<<<<<<<<<
 *         if not listener._is_present_in_parent:
 *             listener._Modified()
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_self->_listener);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_v_listener = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pyrobuf_list.pyx":382
 *         self._append(x)
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:             # <<<<<<<<<<<<<<
 *             listener._Modified()
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_listener, __pyx_n_s_is_present_in_parent); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 382; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 382; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_8 = ((!__pyx_t_7) != 0);
  if (__pyx_t_8) {

    /* "pyrobuf_list.pyx":383
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:
 *             listener._Modified()             # <<<<<<<<<<<<<<
 * 
 *     cpdef extend(self, Int64List x):
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_listener, __pyx_n_s_Modified); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 383; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = NULL;
    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    if (__pyx_t_4) {
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 383; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    } else {
      __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 383; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "pyrobuf_list.pyx":382
 *         self._append(x)
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:             # <<<<<<<<<<<<<<
 *             listener._Modified()
 * 
 */
  }

  /* "pyrobuf_list.pyx":379
 *         pass
 * 
 *     cpdef append(self, int64_t x):             # <<<<<<<<<<<<<<
 *         self._append(x)
 *         listener = <object>self._listener
 */

  /* function exit code */
  __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_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("pyrobuf_list.Int64List.append", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_listener);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrobuf_list_9Int64List_26append(PyObject *__pyx_v_self, PyObject *__pyx_arg_x); /*proto*/
static PyObject *__pyx_pw_12pyrobuf_list_9Int64List_26append(PyObject *__pyx_v_self, PyObject *__pyx_arg_x) {
  int64_t __pyx_v_x;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("append (wrapper)", 0);
  assert(__pyx_arg_x); {
    __pyx_v_x = __Pyx_PyInt_As_int64_t(__pyx_arg_x); if (unlikely((__pyx_v_x == (int64_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 379; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyrobuf_list.Int64List.append", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_12pyrobuf_list_9Int64List_25append(((struct __pyx_obj_12pyrobuf_list_Int64List *)__pyx_v_self), ((int64_t)__pyx_v_x));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_12pyrobuf_list_9Int64List_25append(struct __pyx_obj_12pyrobuf_list_Int64List *__pyx_v_self, int64_t __pyx_v_x) {
  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", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_12pyrobuf_list_9Int64List_append(__pyx_v_self, __pyx_v_x, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 379; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyrobuf_list.Int64List.append", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrobuf_list.pyx":385
 *             listener._Modified()
 * 
 *     cpdef extend(self, Int64List x):             # <<<<<<<<<<<<<<
 *         cdef int64_t *mem
 *         cdef size_t new_len = self._n_items + len(x)
 */

static PyObject *__pyx_pw_12pyrobuf_list_9Int64List_28extend(PyObject *__pyx_v_self, PyObject *__pyx_v_x); /*proto*/
static PyObject *__pyx_f_12pyrobuf_list_9Int64List_extend(struct __pyx_obj_12pyrobuf_list_Int64List *__pyx_v_self, struct __pyx_obj_12pyrobuf_list_Int64List *__pyx_v_x, int __pyx_skip_dispatch) {
  int64_t *__pyx_v_mem;
  size_t __pyx_v_new_len;
  size_t __pyx_v_new_size;
  int __pyx_v_i;
  PyObject *__pyx_v_listener = NULL;
  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;
  PyObject *__pyx_t_5 = NULL;
  Py_ssize_t __pyx_t_6;
  int __pyx_t_7;
  size_t __pyx_t_8;
  size_t __pyx_t_9;
  size_t __pyx_t_10;
  int __pyx_t_11;
  int64_t __pyx_t_12;
  int __pyx_t_13;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("extend", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_extend); 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);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_12pyrobuf_list_9Int64List_28extend)) {
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
      if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_4)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
        }
      }
      if (!__pyx_t_4) {
        __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_v_x)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 385; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
      } else {
        __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 385; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL;
        __Pyx_INCREF(((PyObject *)__pyx_v_x));
        __Pyx_GIVEREF(((PyObject *)__pyx_v_x));
        PyTuple_SET_ITEM(__pyx_t_5, 0+1, ((PyObject *)__pyx_v_x));
        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 385; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      }
      __Pyx_DECREF(__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;
  }

  /* "pyrobuf_list.pyx":387
 *     cpdef extend(self, Int64List x):
 *         cdef int64_t *mem
 *         cdef size_t new_len = self._n_items + len(x)             # <<<<<<<<<<<<<<
 *         cdef size_t new_size
 *         cdef int i
 */
  __pyx_t_6 = PyObject_Length(((PyObject *)__pyx_v_x)); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 387; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_new_len = (__pyx_v_self->_n_items + __pyx_t_6);

  /* "pyrobuf_list.pyx":391
 *         cdef int i
 * 
 *         if new_len > self._size:             # <<<<<<<<<<<<<<
 *             new_size = max(new_len, 2 * self._size)
 *             mem = <int64_t *>PyMem_Realloc(self._data, new_size * sizeof(int64_t))
 */
  __pyx_t_7 = ((__pyx_v_new_len > __pyx_v_self->_size) != 0);
  if (__pyx_t_7) {

    /* "pyrobuf_list.pyx":392
 * 
 *         if new_len > self._size:
 *             new_size = max(new_len, 2 * self._size)             # <<<<<<<<<<<<<<
 *             mem = <int64_t *>PyMem_Realloc(self._data, new_size * sizeof(int64_t))
 *             if not mem:
 */
    __pyx_t_8 = (2 * __pyx_v_self->_size);
    __pyx_t_9 = __pyx_v_new_len;
    if (((__pyx_t_8 > __pyx_t_9) != 0)) {
      __pyx_t_10 = __pyx_t_8;
    } else {
      __pyx_t_10 = __pyx_t_9;
    }
    __pyx_v_new_size = __pyx_t_10;

    /* "pyrobuf_list.pyx":393
 *         if new_len > self._size:
 *             new_size = max(new_len, 2 * self._size)
 *             mem = <int64_t *>PyMem_Realloc(self._data, new_size * sizeof(int64_t))             # <<<<<<<<<<<<<<
 *             if not mem:
 *                 raise MemoryError()
 */
    __pyx_v_mem = ((int64_t *)PyMem_Realloc(__pyx_v_self->_data, (__pyx_v_new_size * (sizeof(int64_t)))));

    /* "pyrobuf_list.pyx":394
 *             new_size = max(new_len, 2 * self._size)
 *             mem = <int64_t *>PyMem_Realloc(self._data, new_size * sizeof(int64_t))
 *             if not mem:             # <<<<<<<<<<<<<<
 *                 raise MemoryError()
 * 
 */
    __pyx_t_7 = ((!(__pyx_v_mem != 0)) != 0);
    if (__pyx_t_7) {

      /* "pyrobuf_list.pyx":395
 *             mem = <int64_t *>PyMem_Realloc(self._data, new_size * sizeof(int64_t))
 *             if not mem:
 *                 raise MemoryError()             # <<<<<<<<<<<<<<
 * 
 *             self._data = mem
 */
      PyErr_NoMemory(); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 395; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

      /* "pyrobuf_list.pyx":394
 *             new_size = max(new_len, 2 * self._size)
 *             mem = <int64_t *>PyMem_Realloc(self._data, new_size * sizeof(int64_t))
 *             if not mem:             # <<<<<<<<<<<<<<
 *                 raise MemoryError()
 * 
 */
    }

    /* "pyrobuf_list.pyx":397
 *                 raise MemoryError()
 * 
 *             self._data = mem             # <<<<<<<<<<<<<<
 *             self._size = new_size
 * 
 */
    __pyx_v_self->_data = __pyx_v_mem;

    /* "pyrobuf_list.pyx":398
 * 
 *             self._data = mem
 *             self._size = new_size             # <<<<<<<<<<<<<<
 * 
 *         for i in range(len(x)):
 */
    __pyx_v_self->_size = __pyx_v_new_size;

    /* "pyrobuf_list.pyx":391
 *         cdef int i
 * 
 *         if new_len > self._size:             # <<<<<<<<<<<<<<
 *             new_size = max(new_len, 2 * self._size)
 *             mem = <int64_t *>PyMem_Realloc(self._data, new_size * sizeof(int64_t))
 */
  }

  /* "pyrobuf_list.pyx":400
 *             self._size = new_size
 * 
 *         for i in range(len(x)):             # <<<<<<<<<<<<<<
 *             self._data[self._n_items + i] = x[i]
 * 
 */
  __pyx_t_6 = PyObject_Length(((PyObject *)__pyx_v_x)); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 400; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_6; __pyx_t_11+=1) {
    __pyx_v_i = __pyx_t_11;

    /* "pyrobuf_list.pyx":401
 * 
 *         for i in range(len(x)):
 *             self._data[self._n_items + i] = x[i]             # <<<<<<<<<<<<<<
 * 
 *         if new_len != self._n_items:
 */
    __pyx_t_1 = __Pyx_GetItemInt(((PyObject *)__pyx_v_x), __pyx_v_i, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 401; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_12 = __Pyx_PyInt_As_int64_t(__pyx_t_1); if (unlikely((__pyx_t_12 == (int64_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 401; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    (__pyx_v_self->_data[(__pyx_v_self->_n_items + __pyx_v_i)]) = __pyx_t_12;
  }

  /* "pyrobuf_list.pyx":403
 *             self._data[self._n_items + i] = x[i]
 * 
 *         if new_len != self._n_items:             # <<<<<<<<<<<<<<
 *             listener = <object>self._listener
 *             if not listener._is_present_in_parent:
 */
  __pyx_t_7 = ((__pyx_v_new_len != __pyx_v_self->_n_items) != 0);
  if (__pyx_t_7) {

    /* "pyrobuf_list.pyx":404
 * 
 *         if new_len != self._n_items:
 *             listener = <object>self._listener             # <<<<<<<<<<<<<<
 *             if not listener._is_present_in_parent:
 *                 listener._Modified()
 */
    __pyx_t_1 = ((PyObject *)__pyx_v_self->_listener);
    __Pyx_INCREF(__pyx_t_1);
    __pyx_v_listener = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "pyrobuf_list.pyx":405
 *         if new_len != self._n_items:
 *             listener = <object>self._listener
 *             if not listener._is_present_in_parent:             # <<<<<<<<<<<<<<
 *                 listener._Modified()
 *         self._n_items = new_len
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_listener, __pyx_n_s_is_present_in_parent); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 405; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 405; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_13 = ((!__pyx_t_7) != 0);
    if (__pyx_t_13) {

      /* "pyrobuf_list.pyx":406
 *             listener = <object>self._listener
 *             if not listener._is_present_in_parent:
 *                 listener._Modified()             # <<<<<<<<<<<<<<
 *         self._n_items = new_len
 * 
 */
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_listener, __pyx_n_s_Modified); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 406; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = NULL;
      if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
        __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
        if (likely(__pyx_t_3)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_2, function);
        }
      }
      if (__pyx_t_3) {
        __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 406; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      } else {
        __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 406; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "pyrobuf_list.pyx":405
 *         if new_len != self._n_items:
 *             listener = <object>self._listener
 *             if not listener._is_present_in_parent:             # <<<<<<<<<<<<<<
 *                 listener._Modified()
 *         self._n_items = new_len
 */
    }

    /* "pyrobuf_list.pyx":403
 *             self._data[self._n_items + i] = x[i]
 * 
 *         if new_len != self._n_items:             # <<<<<<<<<<<<<<
 *             listener = <object>self._listener
 *             if not listener._is_present_in_parent:
 */
  }

  /* "pyrobuf_list.pyx":407
 *             if not listener._is_present_in_parent:
 *                 listener._Modified()
 *         self._n_items = new_len             # <<<<<<<<<<<<<<
 * 
 *     cpdef insert(self, int i, int64_t x):
 */
  __pyx_v_self->_n_items = __pyx_v_new_len;

  /* "pyrobuf_list.pyx":385
 *             listener._Modified()
 * 
 *     cpdef extend(self, Int64List x):             # <<<<<<<<<<<<<<
 *         cdef int64_t *mem
 *         cdef size_t new_len = self._n_items + len(x)
 */

  /* function exit code */
  __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_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pyrobuf_list.Int64List.extend", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_listener);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrobuf_list_9Int64List_28extend(PyObject *__pyx_v_self, PyObject *__pyx_v_x); /*proto*/
static PyObject *__pyx_pw_12pyrobuf_list_9Int64List_28extend(PyObject *__pyx_v_self, PyObject *__pyx_v_x) {
  CYTHON_UNUSED int __pyx_lineno = 0;
  CYTHON_UNUSED const char *__pyx_filename = NULL;
  CYTHON_UNUSED int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("extend (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_x), __pyx_ptype_12pyrobuf_list_Int64List, 1, "x", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 385; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_12pyrobuf_list_9Int64List_27extend(((struct __pyx_obj_12pyrobuf_list_Int64List *)__pyx_v_self), ((struct __pyx_obj_12pyrobuf_list_Int64List *)__pyx_v_x));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_12pyrobuf_list_9Int64List_27extend(struct __pyx_obj_12pyrobuf_list_Int64List *__pyx_v_self, struct __pyx_obj_12pyrobuf_list_Int64List *__pyx_v_x) {
  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", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_12pyrobuf_list_9Int64List_extend(__pyx_v_self, __pyx_v_x, 1); 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_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyrobuf_list.Int64List.extend", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrobuf_list.pyx":409
 *         self._n_items = new_len
 * 
 *     cpdef insert(self, int i, int64_t x):             # <<<<<<<<<<<<<<
 *         cdef int64_t *mem
 *         cdef size_t j
 */

static PyObject *__pyx_pw_12pyrobuf_list_9Int64List_30insert(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_12pyrobuf_list_9Int64List_insert(struct __pyx_obj_12pyrobuf_list_Int64List *__pyx_v_self, int __pyx_v_i, int64_t __pyx_v_x, int __pyx_skip_dispatch) {
  int64_t *__pyx_v_mem;
  size_t __pyx_v_j;
  PyObject *__pyx_v_listener = NULL;
  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;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  Py_ssize_t __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  int __pyx_t_10;
  size_t __pyx_t_11;
  size_t __pyx_t_12;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("insert", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_insert); 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);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_12pyrobuf_list_9Int64List_30insert)) {
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_i); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 409; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = __Pyx_PyInt_From_int64_t(__pyx_v_x); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 409; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_5 = __pyx_t_1; __pyx_t_6 = NULL;
      __pyx_t_7 = 0;
      if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_5))) {
        __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
        if (likely(__pyx_t_6)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
          __Pyx_INCREF(__pyx_t_6);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_5, function);
          __pyx_t_7 = 1;
        }
      }
      __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 409; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_8);
      if (__pyx_t_6) {
        __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL;
      }
      __Pyx_GIVEREF(__pyx_t_3);
      PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_t_3);
      __Pyx_GIVEREF(__pyx_t_4);
      PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_t_4);
      __pyx_t_3 = 0;
      __pyx_t_4 = 0;
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 409; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 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;
  }

  /* "pyrobuf_list.pyx":413
 *         cdef size_t j
 * 
 *         if i < 0:             # <<<<<<<<<<<<<<
 *             i += <int>self._n_items
 * 
 */
  __pyx_t_9 = ((__pyx_v_i < 0) != 0);
  if (__pyx_t_9) {

    /* "pyrobuf_list.pyx":414
 * 
 *         if i < 0:
 *             i += <int>self._n_items             # <<<<<<<<<<<<<<
 * 
 *         if i < 0 or <size_t>i > self._n_items:
 */
    __pyx_v_i = (__pyx_v_i + ((int)__pyx_v_self->_n_items));

    /* "pyrobuf_list.pyx":413
 *         cdef size_t j
 * 
 *         if i < 0:             # <<<<<<<<<<<<<<
 *             i += <int>self._n_items
 * 
 */
  }

  /* "pyrobuf_list.pyx":416
 *             i += <int>self._n_items
 * 
 *         if i < 0 or <size_t>i > self._n_items:             # <<<<<<<<<<<<<<
 *             raise IndexError("list index out of range")
 * 
 */
  __pyx_t_10 = ((__pyx_v_i < 0) != 0);
  if (!__pyx_t_10) {
  } else {
    __pyx_t_9 = __pyx_t_10;
    goto __pyx_L5_bool_binop_done;
  }
  __pyx_t_10 = ((((size_t)__pyx_v_i) > __pyx_v_self->_n_items) != 0);
  __pyx_t_9 = __pyx_t_10;
  __pyx_L5_bool_binop_done:;
  if (__pyx_t_9) {

    /* "pyrobuf_list.pyx":417
 * 
 *         if i < 0 or <size_t>i > self._n_items:
 *             raise IndexError("list index out of range")             # <<<<<<<<<<<<<<
 * 
 *         if self._n_items == self._size:
 */
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_IndexError, __pyx_tuple__15, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 417; __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 = 417; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

    /* "pyrobuf_list.pyx":416
 *             i += <int>self._n_items
 * 
 *         if i < 0 or <size_t>i > self._n_items:             # <<<<<<<<<<<<<<
 *             raise IndexError("list index out of range")
 * 
 */
  }

  /* "pyrobuf_list.pyx":419
 *             raise IndexError("list index out of range")
 * 
 *         if self._n_items == self._size:             # <<<<<<<<<<<<<<
 *             mem = <int64_t *>PyMem_Realloc(self._data, 2 * self._size * sizeof(int64_t))
 *             if not mem:
 */
  __pyx_t_9 = ((__pyx_v_self->_n_items == __pyx_v_self->_size) != 0);
  if (__pyx_t_9) {

    /* "pyrobuf_list.pyx":420
 * 
 *         if self._n_items == self._size:
 *             mem = <int64_t *>PyMem_Realloc(self._data, 2 * self._size * sizeof(int64_t))             # <<<<<<<<<<<<<<
 *             if not mem:
 *                 raise MemoryError()
 */
    __pyx_v_mem = ((int64_t *)PyMem_Realloc(__pyx_v_self->_data, ((2 * __pyx_v_self->_size) * (sizeof(int64_t)))));

    /* "pyrobuf_list.pyx":421
 *         if self._n_items == self._size:
 *             mem = <int64_t *>PyMem_Realloc(self._data, 2 * self._size * sizeof(int64_t))
 *             if not mem:             # <<<<<<<<<<<<<<
 *                 raise MemoryError()
 * 
 */
    __pyx_t_9 = ((!(__pyx_v_mem != 0)) != 0);
    if (__pyx_t_9) {

      /* "pyrobuf_list.pyx":422
 *             mem = <int64_t *>PyMem_Realloc(self._data, 2 * self._size * sizeof(int64_t))
 *             if not mem:
 *                 raise MemoryError()             # <<<<<<<<<<<<<<
 * 
 *             self._data = mem
 */
      PyErr_NoMemory(); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 422; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

      /* "pyrobuf_list.pyx":421
 *         if self._n_items == self._size:
 *             mem = <int64_t *>PyMem_Realloc(self._data, 2 * self._size * sizeof(int64_t))
 *             if not mem:             # <<<<<<<<<<<<<<
 *                 raise MemoryError()
 * 
 */
    }

    /* "pyrobuf_list.pyx":424
 *                 raise MemoryError()
 * 
 *             self._data = mem             # <<<<<<<<<<<<<<
 *             self._size *= 2
 * 
 */
    __pyx_v_self->_data = __pyx_v_mem;

    /* "pyrobuf_list.pyx":425
 * 
 *             self._data = mem
 *             self._size *= 2             # <<<<<<<<<<<<<<
 * 
 *         for j in range(self._n_items, <size_t>i, -1):
 */
    __pyx_v_self->_size = (__pyx_v_self->_size * 2);

    /* "pyrobuf_list.pyx":419
 *             raise IndexError("list index out of range")
 * 
 *         if self._n_items == self._size:             # <<<<<<<<<<<<<<
 *             mem = <int64_t *>PyMem_Realloc(self._data, 2 * self._size * sizeof(int64_t))
 *             if not mem:
 */
  }

  /* "pyrobuf_list.pyx":427
 *             self._size *= 2
 * 
 *         for j in range(self._n_items, <size_t>i, -1):             # <<<<<<<<<<<<<<
 *             self._data[j] = self._data[j - 1]
 * 
 */
  __pyx_t_11 = ((size_t)__pyx_v_i);
  for (__pyx_t_12 = __pyx_v_self->_n_items + 1; __pyx_t_12 > __pyx_t_11 + 1; ) { __pyx_t_12-=1;
    __pyx_v_j = __pyx_t_12;

    /* "pyrobuf_list.pyx":428
 * 
 *         for j in range(self._n_items, <size_t>i, -1):
 *             self._data[j] = self._data[j - 1]             # <<<<<<<<<<<<<<
 * 
 *         self._data[i] = x
 */
    (__pyx_v_self->_data[__pyx_v_j]) = (__pyx_v_self->_data[(__pyx_v_j - 1)]);
  }

  /* "pyrobuf_list.pyx":430
 *             self._data[j] = self._data[j - 1]
 * 
 *         self._data[i] = x             # <<<<<<<<<<<<<<
 *         self._n_items += 1
 *         listener = <object>self._listener
 */
  (__pyx_v_self->_data[__pyx_v_i]) = __pyx_v_x;

  /* "pyrobuf_list.pyx":431
 * 
 *         self._data[i] = x
 *         self._n_items += 1             # <<<<<<<<<<<<<<
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:
 */
  __pyx_v_self->_n_items = (__pyx_v_self->_n_items + 1);

  /* "pyrobuf_list.pyx":432
 *         self._data[i] = x
 *         self._n_items += 1
 *         listener = <object>self._listener             # <<<<<<<<<<<<<<
 *         if not listener._is_present_in_parent:
 *             listener._Modified()
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_self->_listener);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_v_listener = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pyrobuf_list.pyx":433
 *         self._n_items += 1
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:             # <<<<<<<<<<<<<<
 *             listener._Modified()
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_listener, __pyx_n_s_is_present_in_parent); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 433; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 433; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_10 = ((!__pyx_t_9) != 0);
  if (__pyx_t_10) {

    /* "pyrobuf_list.pyx":434
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:
 *             listener._Modified()             # <<<<<<<<<<<<<<
 * 
 *     cpdef pop(self):
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_listener, __pyx_n_s_Modified); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 434; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_5 = NULL;
    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    if (__pyx_t_5) {
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_5); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 434; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    } else {
      __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 434; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "pyrobuf_list.pyx":433
 *         self._n_items += 1
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:             # <<<<<<<<<<<<<<
 *             listener._Modified()
 * 
 */
  }

  /* "pyrobuf_list.pyx":409
 *         self._n_items = new_len
 * 
 *     cpdef insert(self, int i, int64_t x):             # <<<<<<<<<<<<<<
 *         cdef int64_t *mem
 *         cdef size_t j
 */

  /* function exit code */
  __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_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("pyrobuf_list.Int64List.insert", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_listener);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrobuf_list_9Int64List_30insert(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_12pyrobuf_list_9Int64List_30insert(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_v_i;
  int64_t __pyx_v_x;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("insert (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_i,&__pyx_n_s_x,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_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 (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_x)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("insert", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 409; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "insert") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 409; __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_i = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_i == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 409; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    __pyx_v_x = __Pyx_PyInt_As_int64_t(values[1]); if (unlikely((__pyx_v_x == (int64_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 409; __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 = 409; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyrobuf_list.Int64List.insert", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_12pyrobuf_list_9Int64List_29insert(((struct __pyx_obj_12pyrobuf_list_Int64List *)__pyx_v_self), __pyx_v_i, __pyx_v_x);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_12pyrobuf_list_9Int64List_29insert(struct __pyx_obj_12pyrobuf_list_Int64List *__pyx_v_self, int __pyx_v_i, int64_t __pyx_v_x) {
  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("insert", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_12pyrobuf_list_9Int64List_insert(__pyx_v_self, __pyx_v_i, __pyx_v_x, 1); 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_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyrobuf_list.Int64List.insert", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrobuf_list.pyx":436
 *             listener._Modified()
 * 
 *     cpdef pop(self):             # <<<<<<<<<<<<<<
 *         if self._n_items == 0:
 *             raise IndexError("pop from empty list")
 */

static PyObject *__pyx_pw_12pyrobuf_list_9Int64List_32pop(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_f_12pyrobuf_list_9Int64List_pop(struct __pyx_obj_12pyrobuf_list_Int64List *__pyx_v_self, int __pyx_skip_dispatch) {
  PyObject *__pyx_v_listener = NULL;
  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;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("pop", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_pop); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 436; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_12pyrobuf_list_9Int64List_32pop)) {
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
      if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_4)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
        }
      }
      if (__pyx_t_4) {
        __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 436; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else {
        __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 436; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__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;
  }

  /* "pyrobuf_list.pyx":437
 * 
 *     cpdef pop(self):
 *         if self._n_items == 0:             # <<<<<<<<<<<<<<
 *             raise IndexError("pop from empty list")
 * 
 */
  __pyx_t_5 = ((__pyx_v_self->_n_items == 0) != 0);
  if (__pyx_t_5) {

    /* "pyrobuf_list.pyx":438
 *     cpdef pop(self):
 *         if self._n_items == 0:
 *             raise IndexError("pop from empty list")             # <<<<<<<<<<<<<<
 * 
 *         self._n_items -= 1
 */
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_IndexError, __pyx_tuple__16, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 438; __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 = 438; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

    /* "pyrobuf_list.pyx":437
 * 
 *     cpdef pop(self):
 *         if self._n_items == 0:             # <<<<<<<<<<<<<<
 *             raise IndexError("pop from empty list")
 * 
 */
  }

  /* "pyrobuf_list.pyx":440
 *             raise IndexError("pop from empty list")
 * 
 *         self._n_items -= 1             # <<<<<<<<<<<<<<
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:
 */
  __pyx_v_self->_n_items = (__pyx_v_self->_n_items - 1);

  /* "pyrobuf_list.pyx":441
 * 
 *         self._n_items -= 1
 *         listener = <object>self._listener             # <<<<<<<<<<<<<<
 *         if not listener._is_present_in_parent:
 *             listener._Modified()
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_self->_listener);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_v_listener = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pyrobuf_list.pyx":442
 *         self._n_items -= 1
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:             # <<<<<<<<<<<<<<
 *             listener._Modified()
 *         return self._data[self._n_items]
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_listener, __pyx_n_s_is_present_in_parent); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 442; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 442; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_6 = ((!__pyx_t_5) != 0);
  if (__pyx_t_6) {

    /* "pyrobuf_list.pyx":443
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:
 *             listener._Modified()             # <<<<<<<<<<<<<<
 *         return self._data[self._n_items]
 * 
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_listener, __pyx_n_s_Modified); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 443; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = NULL;
    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    if (__pyx_t_3) {
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 443; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    } else {
      __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 443; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "pyrobuf_list.pyx":442
 *         self._n_items -= 1
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:             # <<<<<<<<<<<<<<
 *             listener._Modified()
 *         return self._data[self._n_items]
 */
  }

  /* "pyrobuf_list.pyx":444
 *         if not listener._is_present_in_parent:
 *             listener._Modified()
 *         return self._data[self._n_items]             # <<<<<<<<<<<<<<
 * 
 *     cpdef remove(self, int64_t x):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int64_t((__pyx_v_self->_data[__pyx_v_self->_n_items])); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 444; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyrobuf_list.pyx":436
 *             listener._Modified()
 * 
 *     cpdef pop(self):             # <<<<<<<<<<<<<<
 *         if self._n_items == 0:
 *             raise IndexError("pop from empty list")
 */

  /* function exit code */
  __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("pyrobuf_list.Int64List.pop", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_listener);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrobuf_list_9Int64List_32pop(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_12pyrobuf_list_9Int64List_32pop(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("pop (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrobuf_list_9Int64List_31pop(((struct __pyx_obj_12pyrobuf_list_Int64List *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_12pyrobuf_list_9Int64List_31pop(struct __pyx_obj_12pyrobuf_list_Int64List *__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("pop", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_12pyrobuf_list_9Int64List_pop(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 436; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyrobuf_list.Int64List.pop", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrobuf_list.pyx":446
 *         return self._data[self._n_items]
 * 
 *     cpdef remove(self, int64_t x):             # <<<<<<<<<<<<<<
 *         cdef size_t i
 *         cdef size_t j
 */

static PyObject *__pyx_pw_12pyrobuf_list_9Int64List_34remove(PyObject *__pyx_v_self, PyObject *__pyx_arg_x); /*proto*/
static PyObject *__pyx_f_12pyrobuf_list_9Int64List_remove(struct __pyx_obj_12pyrobuf_list_Int64List *__pyx_v_self, int64_t __pyx_v_x, int __pyx_skip_dispatch) {
  size_t __pyx_v_i;
  size_t __pyx_v_j;
  int __pyx_v_found;
  PyObject *__pyx_v_listener = NULL;
  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;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  size_t __pyx_t_7;
  size_t __pyx_t_8;
  int __pyx_t_9;
  int __pyx_t_10;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("remove", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_remove); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 446; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_12pyrobuf_list_9Int64List_34remove)) {
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_3 = __Pyx_PyInt_From_int64_t(__pyx_v_x); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 446; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_4 = __pyx_t_1; __pyx_t_5 = NULL;
      if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_4))) {
        __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
        if (likely(__pyx_t_5)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_5);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_4, function);
        }
      }
      if (!__pyx_t_5) {
        __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 446; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_GOTREF(__pyx_t_2);
      } else {
        __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 446; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL;
        __Pyx_GIVEREF(__pyx_t_3);
        PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_3);
        __pyx_t_3 = 0;
        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 446; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 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;
  }

  /* "pyrobuf_list.pyx":449
 *         cdef size_t i
 *         cdef size_t j
 *         cdef bint found = 0             # <<<<<<<<<<<<<<
 * 
 *         for i in range(self._n_items):
 */
  __pyx_v_found = 0;

  /* "pyrobuf_list.pyx":451
 *         cdef bint found = 0
 * 
 *         for i in range(self._n_items):             # <<<<<<<<<<<<<<
 *             if self._data[i] == x:
 *                 found = 1
 */
  __pyx_t_7 = __pyx_v_self->_n_items;
  for (__pyx_t_8 = 0; __pyx_t_8 < __pyx_t_7; __pyx_t_8+=1) {
    __pyx_v_i = __pyx_t_8;

    /* "pyrobuf_list.pyx":452
 * 
 *         for i in range(self._n_items):
 *             if self._data[i] == x:             # <<<<<<<<<<<<<<
 *                 found = 1
 *                 break
 */
    __pyx_t_9 = (((__pyx_v_self->_data[__pyx_v_i]) == __pyx_v_x) != 0);
    if (__pyx_t_9) {

      /* "pyrobuf_list.pyx":453
 *         for i in range(self._n_items):
 *             if self._data[i] == x:
 *                 found = 1             # <<<<<<<<<<<<<<
 *                 break
 * 
 */
      __pyx_v_found = 1;

      /* "pyrobuf_list.pyx":454
 *             if self._data[i] == x:
 *                 found = 1
 *                 break             # <<<<<<<<<<<<<<
 * 
 *         if found == 0:
 */
      goto __pyx_L4_break;

      /* "pyrobuf_list.pyx":452
 * 
 *         for i in range(self._n_items):
 *             if self._data[i] == x:             # <<<<<<<<<<<<<<
 *                 found = 1
 *                 break
 */
    }
  }
  __pyx_L4_break:;

  /* "pyrobuf_list.pyx":456
 *                 break
 * 
 *         if found == 0:             # <<<<<<<<<<<<<<
 *             raise ValueError("x not in list")
 * 
 */
  __pyx_t_9 = ((__pyx_v_found == 0) != 0);
  if (__pyx_t_9) {

    /* "pyrobuf_list.pyx":457
 * 
 *         if found == 0:
 *             raise ValueError("x not in list")             # <<<<<<<<<<<<<<
 * 
 *         for j in range(i, self._n_items):
 */
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__17, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 457; __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 = 457; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

    /* "pyrobuf_list.pyx":456
 *                 break
 * 
 *         if found == 0:             # <<<<<<<<<<<<<<
 *             raise ValueError("x not in list")
 * 
 */
  }

  /* "pyrobuf_list.pyx":459
 *             raise ValueError("x not in list")
 * 
 *         for j in range(i, self._n_items):             # <<<<<<<<<<<<<<
 *             self._data[j] = self._data[j + 1]
 * 
 */
  __pyx_t_7 = __pyx_v_self->_n_items;
  for (__pyx_t_8 = __pyx_v_i; __pyx_t_8 < __pyx_t_7; __pyx_t_8+=1) {
    __pyx_v_j = __pyx_t_8;

    /* "pyrobuf_list.pyx":460
 * 
 *         for j in range(i, self._n_items):
 *             self._data[j] = self._data[j + 1]             # <<<<<<<<<<<<<<
 * 
 *         self._n_items -= 1
 */
    (__pyx_v_self->_data[__pyx_v_j]) = (__pyx_v_self->_data[(__pyx_v_j + 1)]);
  }

  /* "pyrobuf_list.pyx":462
 *             self._data[j] = self._data[j + 1]
 * 
 *         self._n_items -= 1             # <<<<<<<<<<<<<<
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:
 */
  __pyx_v_self->_n_items = (__pyx_v_self->_n_items - 1);

  /* "pyrobuf_list.pyx":463
 * 
 *         self._n_items -= 1
 *         listener = <object>self._listener             # <<<<<<<<<<<<<<
 *         if not listener._is_present_in_parent:
 *             listener._Modified()
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_self->_listener);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_v_listener = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pyrobuf_list.pyx":464
 *         self._n_items -= 1
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:             # <<<<<<<<<<<<<<
 *             listener._Modified()
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_listener, __pyx_n_s_is_present_in_parent); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 464; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 464; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_10 = ((!__pyx_t_9) != 0);
  if (__pyx_t_10) {

    /* "pyrobuf_list.pyx":465
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:
 *             listener._Modified()             # <<<<<<<<<<<<<<
 * 
 *     cdef void _append(self, int64_t x):
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_listener, __pyx_n_s_Modified); 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_t_4 = NULL;
    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    if (__pyx_t_4) {
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 465; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    } else {
      __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); 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_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "pyrobuf_list.pyx":464
 *         self._n_items -= 1
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:             # <<<<<<<<<<<<<<
 *             listener._Modified()
 * 
 */
  }

  /* "pyrobuf_list.pyx":446
 *         return self._data[self._n_items]
 * 
 *     cpdef remove(self, int64_t x):             # <<<<<<<<<<<<<<
 *         cdef size_t i
 *         cdef size_t j
 */

  /* function exit code */
  __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_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("pyrobuf_list.Int64List.remove", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_listener);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrobuf_list_9Int64List_34remove(PyObject *__pyx_v_self, PyObject *__pyx_arg_x); /*proto*/
static PyObject *__pyx_pw_12pyrobuf_list_9Int64List_34remove(PyObject *__pyx_v_self, PyObject *__pyx_arg_x) {
  int64_t __pyx_v_x;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("remove (wrapper)", 0);
  assert(__pyx_arg_x); {
    __pyx_v_x = __Pyx_PyInt_As_int64_t(__pyx_arg_x); if (unlikely((__pyx_v_x == (int64_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 446; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyrobuf_list.Int64List.remove", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_12pyrobuf_list_9Int64List_33remove(((struct __pyx_obj_12pyrobuf_list_Int64List *)__pyx_v_self), ((int64_t)__pyx_v_x));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_12pyrobuf_list_9Int64List_33remove(struct __pyx_obj_12pyrobuf_list_Int64List *__pyx_v_self, int64_t __pyx_v_x) {
  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", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_12pyrobuf_list_9Int64List_remove(__pyx_v_self, __pyx_v_x, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 446; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyrobuf_list.Int64List.remove", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrobuf_list.pyx":467
 *             listener._Modified()
 * 
 *     cdef void _append(self, int64_t x):             # <<<<<<<<<<<<<<
 *         cdef int64_t *mem
 * 
 */

static void __pyx_f_12pyrobuf_list_9Int64List__append(struct __pyx_obj_12pyrobuf_list_Int64List *__pyx_v_self, int64_t __pyx_v_x) {
  int64_t *__pyx_v_mem;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_append", 0);

  /* "pyrobuf_list.pyx":470
 *         cdef int64_t *mem
 * 
 *         if self._n_items == self._size:             # <<<<<<<<<<<<<<
 *             mem = <int64_t *>PyMem_Realloc(self._data, 2 * self._size * sizeof(int64_t))
 *             if not mem:
 */
  __pyx_t_1 = ((__pyx_v_self->_n_items == __pyx_v_self->_size) != 0);
  if (__pyx_t_1) {

    /* "pyrobuf_list.pyx":471
 * 
 *         if self._n_items == self._size:
 *             mem = <int64_t *>PyMem_Realloc(self._data, 2 * self._size * sizeof(int64_t))             # <<<<<<<<<<<<<<
 *             if not mem:
 *                 raise MemoryError()
 */
    __pyx_v_mem = ((int64_t *)PyMem_Realloc(__pyx_v_self->_data, ((2 * __pyx_v_self->_size) * (sizeof(int64_t)))));

    /* "pyrobuf_list.pyx":472
 *         if self._n_items == self._size:
 *             mem = <int64_t *>PyMem_Realloc(self._data, 2 * self._size * sizeof(int64_t))
 *             if not mem:             # <<<<<<<<<<<<<<
 *                 raise MemoryError()
 * 
 */
    __pyx_t_1 = ((!(__pyx_v_mem != 0)) != 0);
    if (__pyx_t_1) {

      /* "pyrobuf_list.pyx":473
 *             mem = <int64_t *>PyMem_Realloc(self._data, 2 * self._size * sizeof(int64_t))
 *             if not mem:
 *                 raise MemoryError()             # <<<<<<<<<<<<<<
 * 
 *             self._data = mem
 */
      PyErr_NoMemory(); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 473; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

      /* "pyrobuf_list.pyx":472
 *         if self._n_items == self._size:
 *             mem = <int64_t *>PyMem_Realloc(self._data, 2 * self._size * sizeof(int64_t))
 *             if not mem:             # <<<<<<<<<<<<<<
 *                 raise MemoryError()
 * 
 */
    }

    /* "pyrobuf_list.pyx":475
 *                 raise MemoryError()
 * 
 *             self._data = mem             # <<<<<<<<<<<<<<
 *             self._size *= 2
 * 
 */
    __pyx_v_self->_data = __pyx_v_mem;

    /* "pyrobuf_list.pyx":476
 * 
 *             self._data = mem
 *             self._size *= 2             # <<<<<<<<<<<<<<
 * 
 *         self._data[self._n_items] = x
 */
    __pyx_v_self->_size = (__pyx_v_self->_size * 2);

    /* "pyrobuf_list.pyx":470
 *         cdef int64_t *mem
 * 
 *         if self._n_items == self._size:             # <<<<<<<<<<<<<<
 *             mem = <int64_t *>PyMem_Realloc(self._data, 2 * self._size * sizeof(int64_t))
 *             if not mem:
 */
  }

  /* "pyrobuf_list.pyx":478
 *             self._size *= 2
 * 
 *         self._data[self._n_items] = x             # <<<<<<<<<<<<<<
 *         self._n_items += 1
 * 
 */
  (__pyx_v_self->_data[__pyx_v_self->_n_items]) = __pyx_v_x;

  /* "pyrobuf_list.pyx":479
 * 
 *         self._data[self._n_items] = x
 *         self._n_items += 1             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_v_self->_n_items = (__pyx_v_self->_n_items + 1);

  /* "pyrobuf_list.pyx":467
 *             listener._Modified()
 * 
 *     cdef void _append(self, int64_t x):             # <<<<<<<<<<<<<<
 *         cdef int64_t *mem
 * 
 */

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_WriteUnraisable("pyrobuf_list.Int64List._append", __pyx_clineno, __pyx_lineno, __pyx_filename, 0, 0);
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
}

/* "pyrobuf_list.pyx":485
 * cdef class Uint64List:
 * 
 *     def __cinit__(self, size_t size=16, object listener=None):             # <<<<<<<<<<<<<<
 *         self._data = <uint64_t *>PyMem_Malloc(size * sizeof(uint64_t))
 *         if not self._data:
 */

/* Python wrapper */
static int __pyx_pw_12pyrobuf_list_10Uint64List_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_12pyrobuf_list_10Uint64List_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  size_t __pyx_v_size;
  PyObject *__pyx_v_listener = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_size,&__pyx_n_s_listener,0};
    PyObject* values[2] = {0,0};
    values[1] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_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 (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_size);
          if (value) { values[0] = value; kw_args--; }
        }
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_listener);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 485; __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;
      }
    }
    if (values[0]) {
      __pyx_v_size = __Pyx_PyInt_As_size_t(values[0]); if (unlikely((__pyx_v_size == (size_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 485; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    } else {
      __pyx_v_size = ((size_t)16);
    }
    __pyx_v_listener = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 485; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyrobuf_list.Uint64List.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_12pyrobuf_list_10Uint64List___cinit__(((struct __pyx_obj_12pyrobuf_list_Uint64List *)__pyx_v_self), __pyx_v_size, __pyx_v_listener);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_12pyrobuf_list_10Uint64List___cinit__(struct __pyx_obj_12pyrobuf_list_Uint64List *__pyx_v_self, size_t __pyx_v_size, PyObject *__pyx_v_listener) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);

  /* "pyrobuf_list.pyx":486
 * 
 *     def __cinit__(self, size_t size=16, object listener=None):
 *         self._data = <uint64_t *>PyMem_Malloc(size * sizeof(uint64_t))             # <<<<<<<<<<<<<<
 *         if not self._data:
 *             raise MemoryError()
 */
  __pyx_v_self->_data = ((uint64_t *)PyMem_Malloc((__pyx_v_size * (sizeof(uint64_t)))));

  /* "pyrobuf_list.pyx":487
 *     def __cinit__(self, size_t size=16, object listener=None):
 *         self._data = <uint64_t *>PyMem_Malloc(size * sizeof(uint64_t))
 *         if not self._data:             # <<<<<<<<<<<<<<
 *             raise MemoryError()
 * 
 */
  __pyx_t_1 = ((!(__pyx_v_self->_data != 0)) != 0);
  if (__pyx_t_1) {

    /* "pyrobuf_list.pyx":488
 *         self._data = <uint64_t *>PyMem_Malloc(size * sizeof(uint64_t))
 *         if not self._data:
 *             raise MemoryError()             # <<<<<<<<<<<<<<
 * 
 *         self._n_items = 0
 */
    PyErr_NoMemory(); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 488; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

    /* "pyrobuf_list.pyx":487
 *     def __cinit__(self, size_t size=16, object listener=None):
 *         self._data = <uint64_t *>PyMem_Malloc(size * sizeof(uint64_t))
 *         if not self._data:             # <<<<<<<<<<<<<<
 *             raise MemoryError()
 * 
 */
  }

  /* "pyrobuf_list.pyx":490
 *             raise MemoryError()
 * 
 *         self._n_items = 0             # <<<<<<<<<<<<<<
 *         self._size = size
 *         if listener is None:
 */
  __pyx_v_self->_n_items = 0;

  /* "pyrobuf_list.pyx":491
 * 
 *         self._n_items = 0
 *         self._size = size             # <<<<<<<<<<<<<<
 *         if listener is None:
 *             self._listener = <PyObject *>null_listener
 */
  __pyx_v_self->_size = __pyx_v_size;

  /* "pyrobuf_list.pyx":492
 *         self._n_items = 0
 *         self._size = size
 *         if listener is None:             # <<<<<<<<<<<<<<
 *             self._listener = <PyObject *>null_listener
 *         else:
 */
  __pyx_t_1 = (__pyx_v_listener == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "pyrobuf_list.pyx":493
 *         self._size = size
 *         if listener is None:
 *             self._listener = <PyObject *>null_listener             # <<<<<<<<<<<<<<
 *         else:
 *             self._listener = <PyObject *>listener
 */
    __pyx_v_self->_listener = ((PyObject *)null_listener);

    /* "pyrobuf_list.pyx":492
 *         self._n_items = 0
 *         self._size = size
 *         if listener is None:             # <<<<<<<<<<<<<<
 *             self._listener = <PyObject *>null_listener
 *         else:
 */
    goto __pyx_L4;
  }

  /* "pyrobuf_list.pyx":495
 *             self._listener = <PyObject *>null_listener
 *         else:
 *             self._listener = <PyObject *>listener             # <<<<<<<<<<<<<<
 * 
 *     def __dealloc__(self):
 */
  /*else*/ {
    __pyx_v_self->_listener = ((PyObject *)__pyx_v_listener);
  }
  __pyx_L4:;

  /* "pyrobuf_list.pyx":485
 * cdef class Uint64List:
 * 
 *     def __cinit__(self, size_t size=16, object listener=None):             # <<<<<<<<<<<<<<
 *         self._data = <uint64_t *>PyMem_Malloc(size * sizeof(uint64_t))
 *         if not self._data:
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyrobuf_list.Uint64List.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrobuf_list.pyx":497
 *             self._listener = <PyObject *>listener
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         PyMem_Free(self._data)
 * 
 */

/* Python wrapper */
static void __pyx_pw_12pyrobuf_list_10Uint64List_3__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_12pyrobuf_list_10Uint64List_3__dealloc__(PyObject *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_pf_12pyrobuf_list_10Uint64List_2__dealloc__(((struct __pyx_obj_12pyrobuf_list_Uint64List *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

static void __pyx_pf_12pyrobuf_list_10Uint64List_2__dealloc__(struct __pyx_obj_12pyrobuf_list_Uint64List *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__", 0);

  /* "pyrobuf_list.pyx":498
 * 
 *     def __dealloc__(self):
 *         PyMem_Free(self._data)             # <<<<<<<<<<<<<<
 * 
 *     def __contains__(self, uint64_t x):
 */
  PyMem_Free(__pyx_v_self->_data);

  /* "pyrobuf_list.pyx":497
 *             self._listener = <PyObject *>listener
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         PyMem_Free(self._data)
 * 
 */

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

/* "pyrobuf_list.pyx":500
 *         PyMem_Free(self._data)
 * 
 *     def __contains__(self, uint64_t x):             # <<<<<<<<<<<<<<
 *         cdef size_t i
 *         for i in range(self._n_items):
 */

/* Python wrapper */
static int __pyx_pw_12pyrobuf_list_10Uint64List_5__contains__(PyObject *__pyx_v_self, PyObject *__pyx_arg_x); /*proto*/
static int __pyx_pw_12pyrobuf_list_10Uint64List_5__contains__(PyObject *__pyx_v_self, PyObject *__pyx_arg_x) {
  uint64_t __pyx_v_x;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__contains__ (wrapper)", 0);
  assert(__pyx_arg_x); {
    __pyx_v_x = __Pyx_PyInt_As_uint64_t(__pyx_arg_x); if (unlikely((__pyx_v_x == (uint64_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 500; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyrobuf_list.Uint64List.__contains__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_12pyrobuf_list_10Uint64List_4__contains__(((struct __pyx_obj_12pyrobuf_list_Uint64List *)__pyx_v_self), ((uint64_t)__pyx_v_x));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_12pyrobuf_list_10Uint64List_4__contains__(struct __pyx_obj_12pyrobuf_list_Uint64List *__pyx_v_self, uint64_t __pyx_v_x) {
  size_t __pyx_v_i;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  size_t __pyx_t_1;
  size_t __pyx_t_2;
  int __pyx_t_3;
  __Pyx_RefNannySetupContext("__contains__", 0);

  /* "pyrobuf_list.pyx":502
 *     def __contains__(self, uint64_t x):
 *         cdef size_t i
 *         for i in range(self._n_items):             # <<<<<<<<<<<<<<
 *             if self._data[i] == x:
 *                 return True
 */
  __pyx_t_1 = __pyx_v_self->_n_items;
  for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
    __pyx_v_i = __pyx_t_2;

    /* "pyrobuf_list.pyx":503
 *         cdef size_t i
 *         for i in range(self._n_items):
 *             if self._data[i] == x:             # <<<<<<<<<<<<<<
 *                 return True
 * 
 */
    __pyx_t_3 = (((__pyx_v_self->_data[__pyx_v_i]) == __pyx_v_x) != 0);
    if (__pyx_t_3) {

      /* "pyrobuf_list.pyx":504
 *         for i in range(self._n_items):
 *             if self._data[i] == x:
 *                 return True             # <<<<<<<<<<<<<<
 * 
 *         return False
 */
      __pyx_r = 1;
      goto __pyx_L0;

      /* "pyrobuf_list.pyx":503
 *         cdef size_t i
 *         for i in range(self._n_items):
 *             if self._data[i] == x:             # <<<<<<<<<<<<<<
 *                 return True
 * 
 */
    }
  }

  /* "pyrobuf_list.pyx":506
 *                 return True
 * 
 *         return False             # <<<<<<<<<<<<<<
 * 
 *     def __delitem__(self, int i):
 */
  __pyx_r = 0;
  goto __pyx_L0;

  /* "pyrobuf_list.pyx":500
 *         PyMem_Free(self._data)
 * 
 *     def __contains__(self, uint64_t x):             # <<<<<<<<<<<<<<
 *         cdef size_t i
 *         for i in range(self._n_items):
 */

  /* function exit code */
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrobuf_list.pyx":508
 *         return False
 * 
 *     def __delitem__(self, int i):             # <<<<<<<<<<<<<<
 *         if i < 0:
 *             i += <int>self._n_items
 */

/* Python wrapper */
static int __pyx_pw_12pyrobuf_list_10Uint64List_7__delitem__(PyObject *__pyx_v_self, PyObject *__pyx_arg_i); /*proto*/
static int __pyx_pw_12pyrobuf_list_10Uint64List_7__delitem__(PyObject *__pyx_v_self, PyObject *__pyx_arg_i) {
  int __pyx_v_i;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__delitem__ (wrapper)", 0);
  assert(__pyx_arg_i); {
    __pyx_v_i = __Pyx_PyInt_As_int(__pyx_arg_i); if (unlikely((__pyx_v_i == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 508; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyrobuf_list.Uint64List.__delitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_12pyrobuf_list_10Uint64List_6__delitem__(((struct __pyx_obj_12pyrobuf_list_Uint64List *)__pyx_v_self), ((int)__pyx_v_i));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_12pyrobuf_list_10Uint64List_6__delitem__(struct __pyx_obj_12pyrobuf_list_Uint64List *__pyx_v_self, int __pyx_v_i) {
  size_t __pyx_v_j;
  PyObject *__pyx_v_listener = NULL;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  size_t __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;
  __Pyx_RefNannySetupContext("__delitem__", 0);

  /* "pyrobuf_list.pyx":509
 * 
 *     def __delitem__(self, int i):
 *         if i < 0:             # <<<<<<<<<<<<<<
 *             i += <int>self._n_items
 * 
 */
  __pyx_t_1 = ((__pyx_v_i < 0) != 0);
  if (__pyx_t_1) {

    /* "pyrobuf_list.pyx":510
 *     def __delitem__(self, int i):
 *         if i < 0:
 *             i += <int>self._n_items             # <<<<<<<<<<<<<<
 * 
 *         if i < 0 or <size_t>i >= self._n_items:
 */
    __pyx_v_i = (__pyx_v_i + ((int)__pyx_v_self->_n_items));

    /* "pyrobuf_list.pyx":509
 * 
 *     def __delitem__(self, int i):
 *         if i < 0:             # <<<<<<<<<<<<<<
 *             i += <int>self._n_items
 * 
 */
  }

  /* "pyrobuf_list.pyx":512
 *             i += <int>self._n_items
 * 
 *         if i < 0 or <size_t>i >= self._n_items:             # <<<<<<<<<<<<<<
 *             raise IndexError("list index out of range")
 * 
 */
  __pyx_t_2 = ((__pyx_v_i < 0) != 0);
  if (!__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L5_bool_binop_done;
  }
  __pyx_t_2 = ((((size_t)__pyx_v_i) >= __pyx_v_self->_n_items) != 0);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L5_bool_binop_done:;
  if (__pyx_t_1) {

    /* "pyrobuf_list.pyx":513
 * 
 *         if i < 0 or <size_t>i >= self._n_items:
 *             raise IndexError("list index out of range")             # <<<<<<<<<<<<<<
 * 
 *         cdef size_t j
 */
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_IndexError, __pyx_tuple__18, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 513; __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 = 513; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

    /* "pyrobuf_list.pyx":512
 *             i += <int>self._n_items
 * 
 *         if i < 0 or <size_t>i >= self._n_items:             # <<<<<<<<<<<<<<
 *             raise IndexError("list index out of range")
 * 
 */
  }

  /* "pyrobuf_list.pyx":516
 * 
 *         cdef size_t j
 *         for j in range(i, self._n_items):             # <<<<<<<<<<<<<<
 *             self._data[j] = self._data[j + 1]
 * 
 */
  __pyx_t_4 = __pyx_v_self->_n_items;
  for (__pyx_t_5 = __pyx_v_i; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
    __pyx_v_j = __pyx_t_5;

    /* "pyrobuf_list.pyx":517
 *         cdef size_t j
 *         for j in range(i, self._n_items):
 *             self._data[j] = self._data[j + 1]             # <<<<<<<<<<<<<<
 * 
 *         self._n_items -= 1
 */
    (__pyx_v_self->_data[__pyx_v_j]) = (__pyx_v_self->_data[(__pyx_v_j + 1)]);
  }

  /* "pyrobuf_list.pyx":519
 *             self._data[j] = self._data[j + 1]
 * 
 *         self._n_items -= 1             # <<<<<<<<<<<<<<
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:
 */
  __pyx_v_self->_n_items = (__pyx_v_self->_n_items - 1);

  /* "pyrobuf_list.pyx":520
 * 
 *         self._n_items -= 1
 *         listener = <object>self._listener             # <<<<<<<<<<<<<<
 *         if not listener._is_present_in_parent:
 *             listener._Modified()
 */
  __pyx_t_3 = ((PyObject *)__pyx_v_self->_listener);
  __Pyx_INCREF(__pyx_t_3);
  __pyx_v_listener = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "pyrobuf_list.pyx":521
 *         self._n_items -= 1
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:             # <<<<<<<<<<<<<<
 *             listener._Modified()
 * 
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_listener, __pyx_n_s_is_present_in_parent); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 521; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 521; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_2 = ((!__pyx_t_1) != 0);
  if (__pyx_t_2) {

    /* "pyrobuf_list.pyx":522
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:
 *             listener._Modified()             # <<<<<<<<<<<<<<
 * 
 *     def __getitem__(self, int i):
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_listener, __pyx_n_s_Modified); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 522; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = NULL;
    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_6, function);
      }
    }
    if (__pyx_t_7) {
      __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_7); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 522; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    } else {
      __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 522; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "pyrobuf_list.pyx":521
 *         self._n_items -= 1
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:             # <<<<<<<<<<<<<<
 *             listener._Modified()
 * 
 */
  }

  /* "pyrobuf_list.pyx":508
 *         return False
 * 
 *     def __delitem__(self, int i):             # <<<<<<<<<<<<<<
 *         if i < 0:
 *             i += <int>self._n_items
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("pyrobuf_list.Uint64List.__delitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_listener);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrobuf_list.pyx":524
 *             listener._Modified()
 * 
 *     def __getitem__(self, int i):             # <<<<<<<<<<<<<<
 *         if i < 0:
 *             i += <int>self._n_items
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrobuf_list_10Uint64List_9__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_arg_i); /*proto*/
static PyObject *__pyx_pw_12pyrobuf_list_10Uint64List_9__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_arg_i) {
  int __pyx_v_i;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0);
  assert(__pyx_arg_i); {
    __pyx_v_i = __Pyx_PyInt_As_int(__pyx_arg_i); if (unlikely((__pyx_v_i == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 524; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyrobuf_list.Uint64List.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_12pyrobuf_list_10Uint64List_8__getitem__(((struct __pyx_obj_12pyrobuf_list_Uint64List *)__pyx_v_self), ((int)__pyx_v_i));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_12pyrobuf_list_10Uint64List_8__getitem__(struct __pyx_obj_12pyrobuf_list_Uint64List *__pyx_v_self, int __pyx_v_i) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__getitem__", 0);

  /* "pyrobuf_list.pyx":525
 * 
 *     def __getitem__(self, int i):
 *         if i < 0:             # <<<<<<<<<<<<<<
 *             i += <int>self._n_items
 * 
 */
  __pyx_t_1 = ((__pyx_v_i < 0) != 0);
  if (__pyx_t_1) {

    /* "pyrobuf_list.pyx":526
 *     def __getitem__(self, int i):
 *         if i < 0:
 *             i += <int>self._n_items             # <<<<<<<<<<<<<<
 * 
 *         if i < 0 or <size_t>i >= self._n_items or i < 0:
 */
    __pyx_v_i = (__pyx_v_i + ((int)__pyx_v_self->_n_items));

    /* "pyrobuf_list.pyx":525
 * 
 *     def __getitem__(self, int i):
 *         if i < 0:             # <<<<<<<<<<<<<<
 *             i += <int>self._n_items
 * 
 */
  }

  /* "pyrobuf_list.pyx":528
 *             i += <int>self._n_items
 * 
 *         if i < 0 or <size_t>i >= self._n_items or i < 0:             # <<<<<<<<<<<<<<
 *             raise IndexError("list index out of range")
 * 
 */
  __pyx_t_2 = ((__pyx_v_i < 0) != 0);
  if (!__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L5_bool_binop_done;
  }
  __pyx_t_2 = ((((size_t)__pyx_v_i) >= __pyx_v_self->_n_items) != 0);
  if (!__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L5_bool_binop_done;
  }
  __pyx_t_2 = ((__pyx_v_i < 0) != 0);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L5_bool_binop_done:;
  if (__pyx_t_1) {

    /* "pyrobuf_list.pyx":529
 * 
 *         if i < 0 or <size_t>i >= self._n_items or i < 0:
 *             raise IndexError("list index out of range")             # <<<<<<<<<<<<<<
 * 
 *         return self._data[i]
 */
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_IndexError, __pyx_tuple__19, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 529; __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 = 529; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

    /* "pyrobuf_list.pyx":528
 *             i += <int>self._n_items
 * 
 *         if i < 0 or <size_t>i >= self._n_items or i < 0:             # <<<<<<<<<<<<<<
 *             raise IndexError("list index out of range")
 * 
 */
  }

  /* "pyrobuf_list.pyx":531
 *             raise IndexError("list index out of range")
 * 
 *         return self._data[i]             # <<<<<<<<<<<<<<
 * 
 *     def __iter__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = __Pyx_PyInt_From_uint64_t((__pyx_v_self->_data[__pyx_v_i])); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 531; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "pyrobuf_list.pyx":524
 *             listener._Modified()
 * 
 *     def __getitem__(self, int i):             # <<<<<<<<<<<<<<
 *         if i < 0:
 *             i += <int>self._n_items
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pyrobuf_list.Uint64List.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_12pyrobuf_list_10Uint64List_12generator1(__pyx_CoroutineObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */

/* "pyrobuf_list.pyx":533
 *         return self._data[i]
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         cdef size_t idx = 0
 *         while idx < self._n_items:
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrobuf_list_10Uint64List_11__iter__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_12pyrobuf_list_10Uint64List_11__iter__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrobuf_list_10Uint64List_10__iter__(((struct __pyx_obj_12pyrobuf_list_Uint64List *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_12pyrobuf_list_10Uint64List_10__iter__(struct __pyx_obj_12pyrobuf_list_Uint64List *__pyx_v_self) {
  struct __pyx_obj_12pyrobuf_list___pyx_scope_struct_1___iter__ *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__iter__", 0);
  __pyx_cur_scope = (struct __pyx_obj_12pyrobuf_list___pyx_scope_struct_1___iter__ *)__pyx_tp_new_12pyrobuf_list___pyx_scope_struct_1___iter__(__pyx_ptype_12pyrobuf_list___pyx_scope_struct_1___iter__, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __Pyx_GOTREF(__pyx_cur_scope);
  __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
  __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  {
    __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_12pyrobuf_list_10Uint64List_12generator1, (PyObject *) __pyx_cur_scope, __pyx_n_s_iter, __pyx_n_s_Uint64List___iter); if (unlikely(!gen)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 533; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyrobuf_list.Uint64List.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_gb_12pyrobuf_list_10Uint64List_12generator1(__pyx_CoroutineObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_12pyrobuf_list___pyx_scope_struct_1___iter__ *__pyx_cur_scope = ((struct __pyx_obj_12pyrobuf_list___pyx_scope_struct_1___iter__ *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("None", 0);
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    case 1: goto __pyx_L6_resume_from_yield;
    default: /* CPython raises the right error here */
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __pyx_L3_first_run:;
  if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 533; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pyrobuf_list.pyx":534
 * 
 *     def __iter__(self):
 *         cdef size_t idx = 0             # <<<<<<<<<<<<<<
 *         while idx < self._n_items:
 *             yield self._data[idx]
 */
  __pyx_cur_scope->__pyx_v_idx = 0;

  /* "pyrobuf_list.pyx":535
 *     def __iter__(self):
 *         cdef size_t idx = 0
 *         while idx < self._n_items:             # <<<<<<<<<<<<<<
 *             yield self._data[idx]
 *             idx += 1
 */
  while (1) {
    __pyx_t_1 = ((__pyx_cur_scope->__pyx_v_idx < __pyx_cur_scope->__pyx_v_self->_n_items) != 0);
    if (!__pyx_t_1) break;

    /* "pyrobuf_list.pyx":536
 *         cdef size_t idx = 0
 *         while idx < self._n_items:
 *             yield self._data[idx]             # <<<<<<<<<<<<<<
 *             idx += 1
 * 
 */
    __pyx_t_2 = __Pyx_PyInt_From_uint64_t((__pyx_cur_scope->__pyx_v_self->_data[__pyx_cur_scope->__pyx_v_idx])); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 536; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    __Pyx_XGIVEREF(__pyx_r);
    __Pyx_RefNannyFinishContext();
    /* return from generator, yielding value */
    __pyx_generator->resume_label = 1;
    return __pyx_r;
    __pyx_L6_resume_from_yield:;
    if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 536; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

    /* "pyrobuf_list.pyx":537
 *         while idx < self._n_items:
 *             yield self._data[idx]
 *             idx += 1             # <<<<<<<<<<<<<<
 * 
 *     def __len__(self):
 */
    __pyx_cur_scope->__pyx_v_idx = (__pyx_cur_scope->__pyx_v_idx + 1);
  }

  /* "pyrobuf_list.pyx":533
 *         return self._data[i]
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         cdef size_t idx = 0
 *         while idx < self._n_items:
 */

  /* function exit code */
  PyErr_SetNone(PyExc_StopIteration);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
  __pyx_generator->resume_label = -1;
  __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrobuf_list.pyx":539
 *             idx += 1
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         return self._n_items
 * 
 */

/* Python wrapper */
static Py_ssize_t __pyx_pw_12pyrobuf_list_10Uint64List_14__len__(PyObject *__pyx_v_self); /*proto*/
static Py_ssize_t __pyx_pw_12pyrobuf_list_10Uint64List_14__len__(PyObject *__pyx_v_self) {
  Py_ssize_t __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__len__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrobuf_list_10Uint64List_13__len__(((struct __pyx_obj_12pyrobuf_list_Uint64List *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static Py_ssize_t __pyx_pf_12pyrobuf_list_10Uint64List_13__len__(struct __pyx_obj_12pyrobuf_list_Uint64List *__pyx_v_self) {
  Py_ssize_t __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__len__", 0);

  /* "pyrobuf_list.pyx":540
 * 
 *     def __len__(self):
 *         return self._n_items             # <<<<<<<<<<<<<<
 * 
 *     def __repr__(self):
 */
  __pyx_r = __pyx_v_self->_n_items;
  goto __pyx_L0;

  /* "pyrobuf_list.pyx":539
 *             idx += 1
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         return self._n_items
 * 
 */

  /* function exit code */
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrobuf_list.pyx":542
 *         return self._n_items
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return repr(list(self))
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrobuf_list_10Uint64List_16__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_12pyrobuf_list_10Uint64List_16__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrobuf_list_10Uint64List_15__repr__(((struct __pyx_obj_12pyrobuf_list_Uint64List *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_12pyrobuf_list_10Uint64List_15__repr__(struct __pyx_obj_12pyrobuf_list_Uint64List *__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__", 0);

  /* "pyrobuf_list.pyx":543
 * 
 *     def __repr__(self):
 *         return repr(list(self))             # <<<<<<<<<<<<<<
 * 
 *     def __setitem__(self, int i, uint64_t x):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PySequence_List(((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 543; __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 = 543; __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;

  /* "pyrobuf_list.pyx":542
 *         return self._n_items
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return repr(list(self))
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pyrobuf_list.Uint64List.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrobuf_list.pyx":545
 *         return repr(list(self))
 * 
 *     def __setitem__(self, int i, uint64_t x):             # <<<<<<<<<<<<<<
 *         if i < 0:
 *             i += <int>self._n_items
 */

/* Python wrapper */
static int __pyx_pw_12pyrobuf_list_10Uint64List_18__setitem__(PyObject *__pyx_v_self, PyObject *__pyx_arg_i, PyObject *__pyx_arg_x); /*proto*/
static int __pyx_pw_12pyrobuf_list_10Uint64List_18__setitem__(PyObject *__pyx_v_self, PyObject *__pyx_arg_i, PyObject *__pyx_arg_x) {
  int __pyx_v_i;
  uint64_t __pyx_v_x;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setitem__ (wrapper)", 0);
  assert(__pyx_arg_i); {
    __pyx_v_i = __Pyx_PyInt_As_int(__pyx_arg_i); if (unlikely((__pyx_v_i == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 545; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  }
  assert(__pyx_arg_x); {
    __pyx_v_x = __Pyx_PyInt_As_uint64_t(__pyx_arg_x); if (unlikely((__pyx_v_x == (uint64_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 545; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyrobuf_list.Uint64List.__setitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_12pyrobuf_list_10Uint64List_17__setitem__(((struct __pyx_obj_12pyrobuf_list_Uint64List *)__pyx_v_self), ((int)__pyx_v_i), ((uint64_t)__pyx_v_x));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_12pyrobuf_list_10Uint64List_17__setitem__(struct __pyx_obj_12pyrobuf_list_Uint64List *__pyx_v_self, int __pyx_v_i, uint64_t __pyx_v_x) {
  PyObject *__pyx_v_listener = NULL;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  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;
  __Pyx_RefNannySetupContext("__setitem__", 0);

  /* "pyrobuf_list.pyx":546
 * 
 *     def __setitem__(self, int i, uint64_t x):
 *         if i < 0:             # <<<<<<<<<<<<<<
 *             i += <int>self._n_items
 * 
 */
  __pyx_t_1 = ((__pyx_v_i < 0) != 0);
  if (__pyx_t_1) {

    /* "pyrobuf_list.pyx":547
 *     def __setitem__(self, int i, uint64_t x):
 *         if i < 0:
 *             i += <int>self._n_items             # <<<<<<<<<<<<<<
 * 
 *         if i < 0 or <size_t>i >= self._n_items:
 */
    __pyx_v_i = (__pyx_v_i + ((int)__pyx_v_self->_n_items));

    /* "pyrobuf_list.pyx":546
 * 
 *     def __setitem__(self, int i, uint64_t x):
 *         if i < 0:             # <<<<<<<<<<<<<<
 *             i += <int>self._n_items
 * 
 */
  }

  /* "pyrobuf_list.pyx":549
 *             i += <int>self._n_items
 * 
 *         if i < 0 or <size_t>i >= self._n_items:             # <<<<<<<<<<<<<<
 *             raise IndexError("list index out of range")
 * 
 */
  __pyx_t_2 = ((__pyx_v_i < 0) != 0);
  if (!__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L5_bool_binop_done;
  }
  __pyx_t_2 = ((((size_t)__pyx_v_i) >= __pyx_v_self->_n_items) != 0);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L5_bool_binop_done:;
  if (__pyx_t_1) {

    /* "pyrobuf_list.pyx":550
 * 
 *         if i < 0 or <size_t>i >= self._n_items:
 *             raise IndexError("list index out of range")             # <<<<<<<<<<<<<<
 * 
 *         self._data[i] = x
 */
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_IndexError, __pyx_tuple__20, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 550; __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 = 550; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

    /* "pyrobuf_list.pyx":549
 *             i += <int>self._n_items
 * 
 *         if i < 0 or <size_t>i >= self._n_items:             # <<<<<<<<<<<<<<
 *             raise IndexError("list index out of range")
 * 
 */
  }

  /* "pyrobuf_list.pyx":552
 *             raise IndexError("list index out of range")
 * 
 *         self._data[i] = x             # <<<<<<<<<<<<<<
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:
 */
  (__pyx_v_self->_data[__pyx_v_i]) = __pyx_v_x;

  /* "pyrobuf_list.pyx":553
 * 
 *         self._data[i] = x
 *         listener = <object>self._listener             # <<<<<<<<<<<<<<
 *         if not listener._is_present_in_parent:
 *             listener._Modified()
 */
  __pyx_t_3 = ((PyObject *)__pyx_v_self->_listener);
  __Pyx_INCREF(__pyx_t_3);
  __pyx_v_listener = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "pyrobuf_list.pyx":554
 *         self._data[i] = x
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:             # <<<<<<<<<<<<<<
 *             listener._Modified()
 * 
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_listener, __pyx_n_s_is_present_in_parent); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 554; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 554; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_2 = ((!__pyx_t_1) != 0);
  if (__pyx_t_2) {

    /* "pyrobuf_list.pyx":555
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:
 *             listener._Modified()             # <<<<<<<<<<<<<<
 * 
 *     def __str__(self):
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_listener, __pyx_n_s_Modified); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 555; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = NULL;
    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    if (__pyx_t_5) {
      __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 555; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    } else {
      __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 555; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "pyrobuf_list.pyx":554
 *         self._data[i] = x
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:             # <<<<<<<<<<<<<<
 *             listener._Modified()
 * 
 */
  }

  /* "pyrobuf_list.pyx":545
 *         return repr(list(self))
 * 
 *     def __setitem__(self, int i, uint64_t x):             # <<<<<<<<<<<<<<
 *         if i < 0:
 *             i += <int>self._n_items
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pyrobuf_list.Uint64List.__setitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_listener);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrobuf_list.pyx":557
 *             listener._Modified()
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return str(list(self))
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrobuf_list_10Uint64List_20__str__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_12pyrobuf_list_10Uint64List_20__str__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrobuf_list_10Uint64List_19__str__(((struct __pyx_obj_12pyrobuf_list_Uint64List *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_12pyrobuf_list_10Uint64List_19__str__(struct __pyx_obj_12pyrobuf_list_Uint64List *__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__", 0);

  /* "pyrobuf_list.pyx":558
 * 
 *     def __str__(self):
 *         return str(list(self))             # <<<<<<<<<<<<<<
 * 
 *     def __getbuffer__(self, Py_buffer *buffer, int flags):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PySequence_List(((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 558; __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 = 558; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)(&PyString_Type)), __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 558; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyrobuf_list.pyx":557
 *             listener._Modified()
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return str(list(self))
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pyrobuf_list.Uint64List.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrobuf_list.pyx":560
 *         return str(list(self))
 * 
 *     def __getbuffer__(self, Py_buffer *buffer, int flags):             # <<<<<<<<<<<<<<
 * 
 *         cdef Py_ssize_t itemsize = sizeof(uint64_t)
 */

/* Python wrapper */
static CYTHON_UNUSED int __pyx_pw_12pyrobuf_list_10Uint64List_22__getbuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_buffer, int __pyx_v_flags); /*proto*/
static CYTHON_UNUSED int __pyx_pw_12pyrobuf_list_10Uint64List_22__getbuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_buffer, int __pyx_v_flags) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__getbuffer__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrobuf_list_10Uint64List_21__getbuffer__(((struct __pyx_obj_12pyrobuf_list_Uint64List *)__pyx_v_self), ((Py_buffer *)__pyx_v_buffer), ((int)__pyx_v_flags));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_12pyrobuf_list_10Uint64List_21__getbuffer__(struct __pyx_obj_12pyrobuf_list_Uint64List *__pyx_v_self, Py_buffer *__pyx_v_buffer, CYTHON_UNUSED int __pyx_v_flags) {
  Py_ssize_t __pyx_v_itemsize;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  size_t __pyx_t_1;
  Py_ssize_t *__pyx_t_2;
  __Pyx_RefNannySetupContext("__getbuffer__", 0);
  if (__pyx_v_buffer != NULL) {
    __pyx_v_buffer->obj = Py_None; __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(__pyx_v_buffer->obj);
  }

  /* "pyrobuf_list.pyx":562
 *     def __getbuffer__(self, Py_buffer *buffer, int flags):
 * 
 *         cdef Py_ssize_t itemsize = sizeof(uint64_t)             # <<<<<<<<<<<<<<
 *         self.shape[0] = self._n_items
 *         self.strides[0] = 1
 */
  __pyx_v_itemsize = (sizeof(uint64_t));

  /* "pyrobuf_list.pyx":563
 * 
 *         cdef Py_ssize_t itemsize = sizeof(uint64_t)
 *         self.shape[0] = self._n_items             # <<<<<<<<<<<<<<
 *         self.strides[0] = 1
 * 
 */
  __pyx_t_1 = __pyx_v_self->_n_items;
  (__pyx_v_self->shape[0]) = __pyx_t_1;

  /* "pyrobuf_list.pyx":564
 *         cdef Py_ssize_t itemsize = sizeof(uint64_t)
 *         self.shape[0] = self._n_items
 *         self.strides[0] = 1             # <<<<<<<<<<<<<<
 * 
 *         buffer.buf = <char *>(self._data)
 */
  (__pyx_v_self->strides[0]) = 1;

  /* "pyrobuf_list.pyx":566
 *         self.strides[0] = 1
 * 
 *         buffer.buf = <char *>(self._data)             # <<<<<<<<<<<<<<
 *         buffer.format = 'K'
 *         buffer.internal = NULL                  # see References
 */
  __pyx_v_buffer->buf = ((char *)__pyx_v_self->_data);

  /* "pyrobuf_list.pyx":567
 * 
 *         buffer.buf = <char *>(self._data)
 *         buffer.format = 'K'             # <<<<<<<<<<<<<<
 *         buffer.internal = NULL                  # see References
 *         buffer.itemsize = itemsize
 */
  __pyx_v_buffer->format = __pyx_k_K;

  /* "pyrobuf_list.pyx":568
 *         buffer.buf = <char *>(self._data)
 *         buffer.format = 'K'
 *         buffer.internal = NULL                  # see References             # <<<<<<<<<<<<<<
 *         buffer.itemsize = itemsize
 *         buffer.len = self._n_items
 */
  __pyx_v_buffer->internal = NULL;

  /* "pyrobuf_list.pyx":569
 *         buffer.format = 'K'
 *         buffer.internal = NULL                  # see References
 *         buffer.itemsize = itemsize             # <<<<<<<<<<<<<<
 *         buffer.len = self._n_items
 *         buffer.ndim = 1
 */
  __pyx_v_buffer->itemsize = __pyx_v_itemsize;

  /* "pyrobuf_list.pyx":570
 *         buffer.internal = NULL                  # see References
 *         buffer.itemsize = itemsize
 *         buffer.len = self._n_items             # <<<<<<<<<<<<<<
 *         buffer.ndim = 1
 *         buffer.obj = self
 */
  __pyx_t_1 = __pyx_v_self->_n_items;
  __pyx_v_buffer->len = __pyx_t_1;

  /* "pyrobuf_list.pyx":571
 *         buffer.itemsize = itemsize
 *         buffer.len = self._n_items
 *         buffer.ndim = 1             # <<<<<<<<<<<<<<
 *         buffer.obj = self
 *         buffer.readonly = 1
 */
  __pyx_v_buffer->ndim = 1;

  /* "pyrobuf_list.pyx":572
 *         buffer.len = self._n_items
 *         buffer.ndim = 1
 *         buffer.obj = self             # <<<<<<<<<<<<<<
 *         buffer.readonly = 1
 *         buffer.shape = self.shape
 */
  __Pyx_INCREF(((PyObject *)__pyx_v_self));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
  __Pyx_GOTREF(__pyx_v_buffer->obj);
  __Pyx_DECREF(__pyx_v_buffer->obj);
  __pyx_v_buffer->obj = ((PyObject *)__pyx_v_self);

  /* "pyrobuf_list.pyx":573
 *         buffer.ndim = 1
 *         buffer.obj = self
 *         buffer.readonly = 1             # <<<<<<<<<<<<<<
 *         buffer.shape = self.shape
 *         buffer.strides = self.strides
 */
  __pyx_v_buffer->readonly = 1;

  /* "pyrobuf_list.pyx":574
 *         buffer.obj = self
 *         buffer.readonly = 1
 *         buffer.shape = self.shape             # <<<<<<<<<<<<<<
 *         buffer.strides = self.strides
 *         buffer.suboffsets = NULL                # for pointer arrays only
 */
  __pyx_t_2 = __pyx_v_self->shape;
  __pyx_v_buffer->shape = __pyx_t_2;

  /* "pyrobuf_list.pyx":575
 *         buffer.readonly = 1
 *         buffer.shape = self.shape
 *         buffer.strides = self.strides             # <<<<<<<<<<<<<<
 *         buffer.suboffsets = NULL                # for pointer arrays only
 * 
 */
  __pyx_t_2 = __pyx_v_self->strides;
  __pyx_v_buffer->strides = __pyx_t_2;

  /* "pyrobuf_list.pyx":576
 *         buffer.shape = self.shape
 *         buffer.strides = self.strides
 *         buffer.suboffsets = NULL                # for pointer arrays only             # <<<<<<<<<<<<<<
 * 
 *     def __releasebuffer__(self, Py_buffer *buffer):
 */
  __pyx_v_buffer->suboffsets = NULL;

  /* "pyrobuf_list.pyx":560
 *         return str(list(self))
 * 
 *     def __getbuffer__(self, Py_buffer *buffer, int flags):             # <<<<<<<<<<<<<<
 * 
 *         cdef Py_ssize_t itemsize = sizeof(uint64_t)
 */

  /* function exit code */
  __pyx_r = 0;
  if (__pyx_v_buffer != NULL && __pyx_v_buffer->obj == Py_None) {
    __Pyx_GOTREF(Py_None);
    __Pyx_DECREF(Py_None); __pyx_v_buffer->obj = NULL;
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrobuf_list.pyx":578
 *         buffer.suboffsets = NULL                # for pointer arrays only
 * 
 *     def __releasebuffer__(self, Py_buffer *buffer):             # <<<<<<<<<<<<<<
 *         pass
 * 
 */

/* Python wrapper */
static CYTHON_UNUSED void __pyx_pw_12pyrobuf_list_10Uint64List_24__releasebuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_buffer); /*proto*/
static CYTHON_UNUSED void __pyx_pw_12pyrobuf_list_10Uint64List_24__releasebuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_buffer) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__releasebuffer__ (wrapper)", 0);
  __pyx_pf_12pyrobuf_list_10Uint64List_23__releasebuffer__(((struct __pyx_obj_12pyrobuf_list_Uint64List *)__pyx_v_self), ((Py_buffer *)__pyx_v_buffer));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

static void __pyx_pf_12pyrobuf_list_10Uint64List_23__releasebuffer__(CYTHON_UNUSED struct __pyx_obj_12pyrobuf_list_Uint64List *__pyx_v_self, CYTHON_UNUSED Py_buffer *__pyx_v_buffer) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__releasebuffer__", 0);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

/* "pyrobuf_list.pyx":581
 *         pass
 * 
 *     cpdef append(self, uint64_t x):             # <<<<<<<<<<<<<<
 *         self._append(x)
 *         listener = <object>self._listener
 */

static PyObject *__pyx_pw_12pyrobuf_list_10Uint64List_26append(PyObject *__pyx_v_self, PyObject *__pyx_arg_x); /*proto*/
static PyObject *__pyx_f_12pyrobuf_list_10Uint64List_append(struct __pyx_obj_12pyrobuf_list_Uint64List *__pyx_v_self, uint64_t __pyx_v_x, int __pyx_skip_dispatch) {
  PyObject *__pyx_v_listener = NULL;
  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;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  int __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("append", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_append); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 581; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_12pyrobuf_list_10Uint64List_26append)) {
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_3 = __Pyx_PyInt_From_uint64_t(__pyx_v_x); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 581; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_4 = __pyx_t_1; __pyx_t_5 = NULL;
      if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_4))) {
        __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
        if (likely(__pyx_t_5)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_5);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_4, function);
        }
      }
      if (!__pyx_t_5) {
        __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 581; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_GOTREF(__pyx_t_2);
      } else {
        __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 581; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL;
        __Pyx_GIVEREF(__pyx_t_3);
        PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_3);
        __pyx_t_3 = 0;
        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 581; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 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;
  }

  /* "pyrobuf_list.pyx":582
 * 
 *     cpdef append(self, uint64_t x):
 *         self._append(x)             # <<<<<<<<<<<<<<
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:
 */
  ((struct __pyx_vtabstruct_12pyrobuf_list_Uint64List *)__pyx_v_self->__pyx_vtab)->_append(__pyx_v_self, __pyx_v_x);

  /* "pyrobuf_list.pyx":583
 *     cpdef append(self, uint64_t x):
 *         self._append(x)
 *         listener = <object>self._listener             # <<<<<<<<<<<<<<
 *         if not listener._is_present_in_parent:
 *             listener._Modified()
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_self->_listener);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_v_listener = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pyrobuf_list.pyx":584
 *         self._append(x)
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:             # <<<<<<<<<<<<<<
 *             listener._Modified()
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_listener, __pyx_n_s_is_present_in_parent); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 584; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 584; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_8 = ((!__pyx_t_7) != 0);
  if (__pyx_t_8) {

    /* "pyrobuf_list.pyx":585
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:
 *             listener._Modified()             # <<<<<<<<<<<<<<
 * 
 *     cpdef extend(self, Uint64List x):
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_listener, __pyx_n_s_Modified); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 585; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = NULL;
    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    if (__pyx_t_4) {
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 585; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    } else {
      __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 585; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "pyrobuf_list.pyx":584
 *         self._append(x)
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:             # <<<<<<<<<<<<<<
 *             listener._Modified()
 * 
 */
  }

  /* "pyrobuf_list.pyx":581
 *         pass
 * 
 *     cpdef append(self, uint64_t x):             # <<<<<<<<<<<<<<
 *         self._append(x)
 *         listener = <object>self._listener
 */

  /* function exit code */
  __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_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("pyrobuf_list.Uint64List.append", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_listener);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrobuf_list_10Uint64List_26append(PyObject *__pyx_v_self, PyObject *__pyx_arg_x); /*proto*/
static PyObject *__pyx_pw_12pyrobuf_list_10Uint64List_26append(PyObject *__pyx_v_self, PyObject *__pyx_arg_x) {
  uint64_t __pyx_v_x;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("append (wrapper)", 0);
  assert(__pyx_arg_x); {
    __pyx_v_x = __Pyx_PyInt_As_uint64_t(__pyx_arg_x); if (unlikely((__pyx_v_x == (uint64_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 581; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyrobuf_list.Uint64List.append", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_12pyrobuf_list_10Uint64List_25append(((struct __pyx_obj_12pyrobuf_list_Uint64List *)__pyx_v_self), ((uint64_t)__pyx_v_x));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_12pyrobuf_list_10Uint64List_25append(struct __pyx_obj_12pyrobuf_list_Uint64List *__pyx_v_self, uint64_t __pyx_v_x) {
  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", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_12pyrobuf_list_10Uint64List_append(__pyx_v_self, __pyx_v_x, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 581; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyrobuf_list.Uint64List.append", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrobuf_list.pyx":587
 *             listener._Modified()
 * 
 *     cpdef extend(self, Uint64List x):             # <<<<<<<<<<<<<<
 *         cdef uint64_t *mem
 *         cdef size_t new_len = self._n_items + len(x)
 */

static PyObject *__pyx_pw_12pyrobuf_list_10Uint64List_28extend(PyObject *__pyx_v_self, PyObject *__pyx_v_x); /*proto*/
static PyObject *__pyx_f_12pyrobuf_list_10Uint64List_extend(struct __pyx_obj_12pyrobuf_list_Uint64List *__pyx_v_self, struct __pyx_obj_12pyrobuf_list_Uint64List *__pyx_v_x, int __pyx_skip_dispatch) {
  uint64_t *__pyx_v_mem;
  size_t __pyx_v_new_len;
  size_t __pyx_v_new_size;
  int __pyx_v_i;
  PyObject *__pyx_v_listener = NULL;
  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;
  PyObject *__pyx_t_5 = NULL;
  Py_ssize_t __pyx_t_6;
  int __pyx_t_7;
  size_t __pyx_t_8;
  size_t __pyx_t_9;
  size_t __pyx_t_10;
  int __pyx_t_11;
  uint64_t __pyx_t_12;
  int __pyx_t_13;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("extend", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_extend); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 587; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_12pyrobuf_list_10Uint64List_28extend)) {
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
      if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_4)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
        }
      }
      if (!__pyx_t_4) {
        __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_v_x)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 587; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
      } else {
        __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 587; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL;
        __Pyx_INCREF(((PyObject *)__pyx_v_x));
        __Pyx_GIVEREF(((PyObject *)__pyx_v_x));
        PyTuple_SET_ITEM(__pyx_t_5, 0+1, ((PyObject *)__pyx_v_x));
        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 587; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      }
      __Pyx_DECREF(__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;
  }

  /* "pyrobuf_list.pyx":589
 *     cpdef extend(self, Uint64List x):
 *         cdef uint64_t *mem
 *         cdef size_t new_len = self._n_items + len(x)             # <<<<<<<<<<<<<<
 *         cdef size_t new_size
 *         cdef int i
 */
  __pyx_t_6 = PyObject_Length(((PyObject *)__pyx_v_x)); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 589; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_new_len = (__pyx_v_self->_n_items + __pyx_t_6);

  /* "pyrobuf_list.pyx":593
 *         cdef int i
 * 
 *         if new_len > self._size:             # <<<<<<<<<<<<<<
 *             new_size = max(new_len, 2 * self._size)
 *             mem = <uint64_t *>PyMem_Realloc(self._data, new_size * sizeof(uint64_t))
 */
  __pyx_t_7 = ((__pyx_v_new_len > __pyx_v_self->_size) != 0);
  if (__pyx_t_7) {

    /* "pyrobuf_list.pyx":594
 * 
 *         if new_len > self._size:
 *             new_size = max(new_len, 2 * self._size)             # <<<<<<<<<<<<<<
 *             mem = <uint64_t *>PyMem_Realloc(self._data, new_size * sizeof(uint64_t))
 *             if not mem:
 */
    __pyx_t_8 = (2 * __pyx_v_self->_size);
    __pyx_t_9 = __pyx_v_new_len;
    if (((__pyx_t_8 > __pyx_t_9) != 0)) {
      __pyx_t_10 = __pyx_t_8;
    } else {
      __pyx_t_10 = __pyx_t_9;
    }
    __pyx_v_new_size = __pyx_t_10;

    /* "pyrobuf_list.pyx":595
 *         if new_len > self._size:
 *             new_size = max(new_len, 2 * self._size)
 *             mem = <uint64_t *>PyMem_Realloc(self._data, new_size * sizeof(uint64_t))             # <<<<<<<<<<<<<<
 *             if not mem:
 *                 raise MemoryError()
 */
    __pyx_v_mem = ((uint64_t *)PyMem_Realloc(__pyx_v_self->_data, (__pyx_v_new_size * (sizeof(uint64_t)))));

    /* "pyrobuf_list.pyx":596
 *             new_size = max(new_len, 2 * self._size)
 *             mem = <uint64_t *>PyMem_Realloc(self._data, new_size * sizeof(uint64_t))
 *             if not mem:             # <<<<<<<<<<<<<<
 *                 raise MemoryError()
 * 
 */
    __pyx_t_7 = ((!(__pyx_v_mem != 0)) != 0);
    if (__pyx_t_7) {

      /* "pyrobuf_list.pyx":597
 *             mem = <uint64_t *>PyMem_Realloc(self._data, new_size * sizeof(uint64_t))
 *             if not mem:
 *                 raise MemoryError()             # <<<<<<<<<<<<<<
 * 
 *             self._data = mem
 */
      PyErr_NoMemory(); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 597; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

      /* "pyrobuf_list.pyx":596
 *             new_size = max(new_len, 2 * self._size)
 *             mem = <uint64_t *>PyMem_Realloc(self._data, new_size * sizeof(uint64_t))
 *             if not mem:             # <<<<<<<<<<<<<<
 *                 raise MemoryError()
 * 
 */
    }

    /* "pyrobuf_list.pyx":599
 *                 raise MemoryError()
 * 
 *             self._data = mem             # <<<<<<<<<<<<<<
 *             self._size = new_size
 * 
 */
    __pyx_v_self->_data = __pyx_v_mem;

    /* "pyrobuf_list.pyx":600
 * 
 *             self._data = mem
 *             self._size = new_size             # <<<<<<<<<<<<<<
 * 
 *         for i in range(len(x)):
 */
    __pyx_v_self->_size = __pyx_v_new_size;

    /* "pyrobuf_list.pyx":593
 *         cdef int i
 * 
 *         if new_len > self._size:             # <<<<<<<<<<<<<<
 *             new_size = max(new_len, 2 * self._size)
 *             mem = <uint64_t *>PyMem_Realloc(self._data, new_size * sizeof(uint64_t))
 */
  }

  /* "pyrobuf_list.pyx":602
 *             self._size = new_size
 * 
 *         for i in range(len(x)):             # <<<<<<<<<<<<<<
 *             self._data[self._n_items + i] = x[i]
 * 
 */
  __pyx_t_6 = PyObject_Length(((PyObject *)__pyx_v_x)); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 602; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_6; __pyx_t_11+=1) {
    __pyx_v_i = __pyx_t_11;

    /* "pyrobuf_list.pyx":603
 * 
 *         for i in range(len(x)):
 *             self._data[self._n_items + i] = x[i]             # <<<<<<<<<<<<<<
 * 
 *         if new_len != self._n_items:
 */
    __pyx_t_1 = __Pyx_GetItemInt(((PyObject *)__pyx_v_x), __pyx_v_i, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 603; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_12 = __Pyx_PyInt_As_uint64_t(__pyx_t_1); if (unlikely((__pyx_t_12 == (uint64_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 603; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    (__pyx_v_self->_data[(__pyx_v_self->_n_items + __pyx_v_i)]) = __pyx_t_12;
  }

  /* "pyrobuf_list.pyx":605
 *             self._data[self._n_items + i] = x[i]
 * 
 *         if new_len != self._n_items:             # <<<<<<<<<<<<<<
 *             listener = <object>self._listener
 *             if not listener._is_present_in_parent:
 */
  __pyx_t_7 = ((__pyx_v_new_len != __pyx_v_self->_n_items) != 0);
  if (__pyx_t_7) {

    /* "pyrobuf_list.pyx":606
 * 
 *         if new_len != self._n_items:
 *             listener = <object>self._listener             # <<<<<<<<<<<<<<
 *             if not listener._is_present_in_parent:
 *                 listener._Modified()
 */
    __pyx_t_1 = ((PyObject *)__pyx_v_self->_listener);
    __Pyx_INCREF(__pyx_t_1);
    __pyx_v_listener = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "pyrobuf_list.pyx":607
 *         if new_len != self._n_items:
 *             listener = <object>self._listener
 *             if not listener._is_present_in_parent:             # <<<<<<<<<<<<<<
 *                 listener._Modified()
 *         self._n_items = new_len
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_listener, __pyx_n_s_is_present_in_parent); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 607; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 607; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_13 = ((!__pyx_t_7) != 0);
    if (__pyx_t_13) {

      /* "pyrobuf_list.pyx":608
 *             listener = <object>self._listener
 *             if not listener._is_present_in_parent:
 *                 listener._Modified()             # <<<<<<<<<<<<<<
 *         self._n_items = new_len
 * 
 */
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_listener, __pyx_n_s_Modified); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 608; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = NULL;
      if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
        __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
        if (likely(__pyx_t_3)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_2, function);
        }
      }
      if (__pyx_t_3) {
        __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 608; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      } else {
        __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 608; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "pyrobuf_list.pyx":607
 *         if new_len != self._n_items:
 *             listener = <object>self._listener
 *             if not listener._is_present_in_parent:             # <<<<<<<<<<<<<<
 *                 listener._Modified()
 *         self._n_items = new_len
 */
    }

    /* "pyrobuf_list.pyx":605
 *             self._data[self._n_items + i] = x[i]
 * 
 *         if new_len != self._n_items:             # <<<<<<<<<<<<<<
 *             listener = <object>self._listener
 *             if not listener._is_present_in_parent:
 */
  }

  /* "pyrobuf_list.pyx":609
 *             if not listener._is_present_in_parent:
 *                 listener._Modified()
 *         self._n_items = new_len             # <<<<<<<<<<<<<<
 * 
 *     cpdef insert(self, int i, uint64_t x):
 */
  __pyx_v_self->_n_items = __pyx_v_new_len;

  /* "pyrobuf_list.pyx":587
 *             listener._Modified()
 * 
 *     cpdef extend(self, Uint64List x):             # <<<<<<<<<<<<<<
 *         cdef uint64_t *mem
 *         cdef size_t new_len = self._n_items + len(x)
 */

  /* function exit code */
  __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_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pyrobuf_list.Uint64List.extend", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_listener);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrobuf_list_10Uint64List_28extend(PyObject *__pyx_v_self, PyObject *__pyx_v_x); /*proto*/
static PyObject *__pyx_pw_12pyrobuf_list_10Uint64List_28extend(PyObject *__pyx_v_self, PyObject *__pyx_v_x) {
  CYTHON_UNUSED int __pyx_lineno = 0;
  CYTHON_UNUSED const char *__pyx_filename = NULL;
  CYTHON_UNUSED int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("extend (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_x), __pyx_ptype_12pyrobuf_list_Uint64List, 1, "x", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 587; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_12pyrobuf_list_10Uint64List_27extend(((struct __pyx_obj_12pyrobuf_list_Uint64List *)__pyx_v_self), ((struct __pyx_obj_12pyrobuf_list_Uint64List *)__pyx_v_x));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_12pyrobuf_list_10Uint64List_27extend(struct __pyx_obj_12pyrobuf_list_Uint64List *__pyx_v_self, struct __pyx_obj_12pyrobuf_list_Uint64List *__pyx_v_x) {
  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", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_12pyrobuf_list_10Uint64List_extend(__pyx_v_self, __pyx_v_x, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 587; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyrobuf_list.Uint64List.extend", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrobuf_list.pyx":611
 *         self._n_items = new_len
 * 
 *     cpdef insert(self, int i, uint64_t x):             # <<<<<<<<<<<<<<
 *         cdef uint64_t *mem
 *         cdef size_t j
 */

static PyObject *__pyx_pw_12pyrobuf_list_10Uint64List_30insert(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_12pyrobuf_list_10Uint64List_insert(struct __pyx_obj_12pyrobuf_list_Uint64List *__pyx_v_self, int __pyx_v_i, uint64_t __pyx_v_x, int __pyx_skip_dispatch) {
  uint64_t *__pyx_v_mem;
  size_t __pyx_v_j;
  PyObject *__pyx_v_listener = NULL;
  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;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  Py_ssize_t __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  int __pyx_t_10;
  size_t __pyx_t_11;
  size_t __pyx_t_12;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("insert", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_insert); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 611; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_12pyrobuf_list_10Uint64List_30insert)) {
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_i); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 611; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = __Pyx_PyInt_From_uint64_t(__pyx_v_x); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 611; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_5 = __pyx_t_1; __pyx_t_6 = NULL;
      __pyx_t_7 = 0;
      if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_5))) {
        __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
        if (likely(__pyx_t_6)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
          __Pyx_INCREF(__pyx_t_6);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_5, function);
          __pyx_t_7 = 1;
        }
      }
      __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 611; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_8);
      if (__pyx_t_6) {
        __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL;
      }
      __Pyx_GIVEREF(__pyx_t_3);
      PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_t_3);
      __Pyx_GIVEREF(__pyx_t_4);
      PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_t_4);
      __pyx_t_3 = 0;
      __pyx_t_4 = 0;
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 611; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 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;
  }

  /* "pyrobuf_list.pyx":615
 *         cdef size_t j
 * 
 *         if i < 0:             # <<<<<<<<<<<<<<
 *             i += <int>self._n_items
 * 
 */
  __pyx_t_9 = ((__pyx_v_i < 0) != 0);
  if (__pyx_t_9) {

    /* "pyrobuf_list.pyx":616
 * 
 *         if i < 0:
 *             i += <int>self._n_items             # <<<<<<<<<<<<<<
 * 
 *         if i < 0 or <size_t>i > self._n_items:
 */
    __pyx_v_i = (__pyx_v_i + ((int)__pyx_v_self->_n_items));

    /* "pyrobuf_list.pyx":615
 *         cdef size_t j
 * 
 *         if i < 0:             # <<<<<<<<<<<<<<
 *             i += <int>self._n_items
 * 
 */
  }

  /* "pyrobuf_list.pyx":618
 *             i += <int>self._n_items
 * 
 *         if i < 0 or <size_t>i > self._n_items:             # <<<<<<<<<<<<<<
 *             raise IndexError("list index out of range")
 * 
 */
  __pyx_t_10 = ((__pyx_v_i < 0) != 0);
  if (!__pyx_t_10) {
  } else {
    __pyx_t_9 = __pyx_t_10;
    goto __pyx_L5_bool_binop_done;
  }
  __pyx_t_10 = ((((size_t)__pyx_v_i) > __pyx_v_self->_n_items) != 0);
  __pyx_t_9 = __pyx_t_10;
  __pyx_L5_bool_binop_done:;
  if (__pyx_t_9) {

    /* "pyrobuf_list.pyx":619
 * 
 *         if i < 0 or <size_t>i > self._n_items:
 *             raise IndexError("list index out of range")             # <<<<<<<<<<<<<<
 * 
 *         if self._n_items == self._size:
 */
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_IndexError, __pyx_tuple__21, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 619; __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 = 619; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

    /* "pyrobuf_list.pyx":618
 *             i += <int>self._n_items
 * 
 *         if i < 0 or <size_t>i > self._n_items:             # <<<<<<<<<<<<<<
 *             raise IndexError("list index out of range")
 * 
 */
  }

  /* "pyrobuf_list.pyx":621
 *             raise IndexError("list index out of range")
 * 
 *         if self._n_items == self._size:             # <<<<<<<<<<<<<<
 *             mem = <uint64_t *>PyMem_Realloc(self._data, 2 * self._size * sizeof(uint64_t))
 *             if not mem:
 */
  __pyx_t_9 = ((__pyx_v_self->_n_items == __pyx_v_self->_size) != 0);
  if (__pyx_t_9) {

    /* "pyrobuf_list.pyx":622
 * 
 *         if self._n_items == self._size:
 *             mem = <uint64_t *>PyMem_Realloc(self._data, 2 * self._size * sizeof(uint64_t))             # <<<<<<<<<<<<<<
 *             if not mem:
 *                 raise MemoryError()
 */
    __pyx_v_mem = ((uint64_t *)PyMem_Realloc(__pyx_v_self->_data, ((2 * __pyx_v_self->_size) * (sizeof(uint64_t)))));

    /* "pyrobuf_list.pyx":623
 *         if self._n_items == self._size:
 *             mem = <uint64_t *>PyMem_Realloc(self._data, 2 * self._size * sizeof(uint64_t))
 *             if not mem:             # <<<<<<<<<<<<<<
 *                 raise MemoryError()
 * 
 */
    __pyx_t_9 = ((!(__pyx_v_mem != 0)) != 0);
    if (__pyx_t_9) {

      /* "pyrobuf_list.pyx":624
 *             mem = <uint64_t *>PyMem_Realloc(self._data, 2 * self._size * sizeof(uint64_t))
 *             if not mem:
 *                 raise MemoryError()             # <<<<<<<<<<<<<<
 * 
 *             self._data = mem
 */
      PyErr_NoMemory(); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 624; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

      /* "pyrobuf_list.pyx":623
 *         if self._n_items == self._size:
 *             mem = <uint64_t *>PyMem_Realloc(self._data, 2 * self._size * sizeof(uint64_t))
 *             if not mem:             # <<<<<<<<<<<<<<
 *                 raise MemoryError()
 * 
 */
    }

    /* "pyrobuf_list.pyx":626
 *                 raise MemoryError()
 * 
 *             self._data = mem             # <<<<<<<<<<<<<<
 *             self._size *= 2
 * 
 */
    __pyx_v_self->_data = __pyx_v_mem;

    /* "pyrobuf_list.pyx":627
 * 
 *             self._data = mem
 *             self._size *= 2             # <<<<<<<<<<<<<<
 * 
 *         for j in range(self._n_items, <size_t>i, -1):
 */
    __pyx_v_self->_size = (__pyx_v_self->_size * 2);

    /* "pyrobuf_list.pyx":621
 *             raise IndexError("list index out of range")
 * 
 *         if self._n_items == self._size:             # <<<<<<<<<<<<<<
 *             mem = <uint64_t *>PyMem_Realloc(self._data, 2 * self._size * sizeof(uint64_t))
 *             if not mem:
 */
  }

  /* "pyrobuf_list.pyx":629
 *             self._size *= 2
 * 
 *         for j in range(self._n_items, <size_t>i, -1):             # <<<<<<<<<<<<<<
 *             self._data[j] = self._data[j - 1]
 * 
 */
  __pyx_t_11 = ((size_t)__pyx_v_i);
  for (__pyx_t_12 = __pyx_v_self->_n_items + 1; __pyx_t_12 > __pyx_t_11 + 1; ) { __pyx_t_12-=1;
    __pyx_v_j = __pyx_t_12;

    /* "pyrobuf_list.pyx":630
 * 
 *         for j in range(self._n_items, <size_t>i, -1):
 *             self._data[j] = self._data[j - 1]             # <<<<<<<<<<<<<<
 * 
 *         self._data[i] = x
 */
    (__pyx_v_self->_data[__pyx_v_j]) = (__pyx_v_self->_data[(__pyx_v_j - 1)]);
  }

  /* "pyrobuf_list.pyx":632
 *             self._data[j] = self._data[j - 1]
 * 
 *         self._data[i] = x             # <<<<<<<<<<<<<<
 *         self._n_items += 1
 *         listener = <object>self._listener
 */
  (__pyx_v_self->_data[__pyx_v_i]) = __pyx_v_x;

  /* "pyrobuf_list.pyx":633
 * 
 *         self._data[i] = x
 *         self._n_items += 1             # <<<<<<<<<<<<<<
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:
 */
  __pyx_v_self->_n_items = (__pyx_v_self->_n_items + 1);

  /* "pyrobuf_list.pyx":634
 *         self._data[i] = x
 *         self._n_items += 1
 *         listener = <object>self._listener             # <<<<<<<<<<<<<<
 *         if not listener._is_present_in_parent:
 *             listener._Modified()
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_self->_listener);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_v_listener = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pyrobuf_list.pyx":635
 *         self._n_items += 1
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:             # <<<<<<<<<<<<<<
 *             listener._Modified()
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_listener, __pyx_n_s_is_present_in_parent); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 635; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 635; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_10 = ((!__pyx_t_9) != 0);
  if (__pyx_t_10) {

    /* "pyrobuf_list.pyx":636
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:
 *             listener._Modified()             # <<<<<<<<<<<<<<
 * 
 *     cpdef pop(self):
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_listener, __pyx_n_s_Modified); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 636; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_5 = NULL;
    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    if (__pyx_t_5) {
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_5); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 636; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    } else {
      __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 636; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "pyrobuf_list.pyx":635
 *         self._n_items += 1
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:             # <<<<<<<<<<<<<<
 *             listener._Modified()
 * 
 */
  }

  /* "pyrobuf_list.pyx":611
 *         self._n_items = new_len
 * 
 *     cpdef insert(self, int i, uint64_t x):             # <<<<<<<<<<<<<<
 *         cdef uint64_t *mem
 *         cdef size_t j
 */

  /* function exit code */
  __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_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("pyrobuf_list.Uint64List.insert", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_listener);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrobuf_list_10Uint64List_30insert(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_12pyrobuf_list_10Uint64List_30insert(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_v_i;
  uint64_t __pyx_v_x;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("insert (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_i,&__pyx_n_s_x,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_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 (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_x)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("insert", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 611; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "insert") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 611; __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_i = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_i == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 611; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    __pyx_v_x = __Pyx_PyInt_As_uint64_t(values[1]); if (unlikely((__pyx_v_x == (uint64_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 611; __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 = 611; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyrobuf_list.Uint64List.insert", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_12pyrobuf_list_10Uint64List_29insert(((struct __pyx_obj_12pyrobuf_list_Uint64List *)__pyx_v_self), __pyx_v_i, __pyx_v_x);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_12pyrobuf_list_10Uint64List_29insert(struct __pyx_obj_12pyrobuf_list_Uint64List *__pyx_v_self, int __pyx_v_i, uint64_t __pyx_v_x) {
  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("insert", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_12pyrobuf_list_10Uint64List_insert(__pyx_v_self, __pyx_v_i, __pyx_v_x, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 611; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyrobuf_list.Uint64List.insert", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrobuf_list.pyx":638
 *             listener._Modified()
 * 
 *     cpdef pop(self):             # <<<<<<<<<<<<<<
 *         if self._n_items == 0:
 *             raise IndexError("pop from empty list")
 */

static PyObject *__pyx_pw_12pyrobuf_list_10Uint64List_32pop(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_f_12pyrobuf_list_10Uint64List_pop(struct __pyx_obj_12pyrobuf_list_Uint64List *__pyx_v_self, int __pyx_skip_dispatch) {
  PyObject *__pyx_v_listener = NULL;
  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;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("pop", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_pop); 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);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_12pyrobuf_list_10Uint64List_32pop)) {
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
      if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_4)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
        }
      }
      if (__pyx_t_4) {
        __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 638; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else {
        __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 638; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__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;
  }

  /* "pyrobuf_list.pyx":639
 * 
 *     cpdef pop(self):
 *         if self._n_items == 0:             # <<<<<<<<<<<<<<
 *             raise IndexError("pop from empty list")
 * 
 */
  __pyx_t_5 = ((__pyx_v_self->_n_items == 0) != 0);
  if (__pyx_t_5) {

    /* "pyrobuf_list.pyx":640
 *     cpdef pop(self):
 *         if self._n_items == 0:
 *             raise IndexError("pop from empty list")             # <<<<<<<<<<<<<<
 * 
 *         self._n_items -= 1
 */
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_IndexError, __pyx_tuple__22, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 640; __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 = 640; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

    /* "pyrobuf_list.pyx":639
 * 
 *     cpdef pop(self):
 *         if self._n_items == 0:             # <<<<<<<<<<<<<<
 *             raise IndexError("pop from empty list")
 * 
 */
  }

  /* "pyrobuf_list.pyx":642
 *             raise IndexError("pop from empty list")
 * 
 *         self._n_items -= 1             # <<<<<<<<<<<<<<
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:
 */
  __pyx_v_self->_n_items = (__pyx_v_self->_n_items - 1);

  /* "pyrobuf_list.pyx":643
 * 
 *         self._n_items -= 1
 *         listener = <object>self._listener             # <<<<<<<<<<<<<<
 *         if not listener._is_present_in_parent:
 *             listener._Modified()
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_self->_listener);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_v_listener = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pyrobuf_list.pyx":644
 *         self._n_items -= 1
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:             # <<<<<<<<<<<<<<
 *             listener._Modified()
 *         return self._data[self._n_items]
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_listener, __pyx_n_s_is_present_in_parent); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 644; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 644; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_6 = ((!__pyx_t_5) != 0);
  if (__pyx_t_6) {

    /* "pyrobuf_list.pyx":645
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:
 *             listener._Modified()             # <<<<<<<<<<<<<<
 *         return self._data[self._n_items]
 * 
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_listener, __pyx_n_s_Modified); 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 = NULL;
    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    if (__pyx_t_3) {
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 645; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    } else {
      __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); 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_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "pyrobuf_list.pyx":644
 *         self._n_items -= 1
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:             # <<<<<<<<<<<<<<
 *             listener._Modified()
 *         return self._data[self._n_items]
 */
  }

  /* "pyrobuf_list.pyx":646
 *         if not listener._is_present_in_parent:
 *             listener._Modified()
 *         return self._data[self._n_items]             # <<<<<<<<<<<<<<
 * 
 *     cpdef remove(self, uint64_t x):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_uint64_t((__pyx_v_self->_data[__pyx_v_self->_n_items])); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 646; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyrobuf_list.pyx":638
 *             listener._Modified()
 * 
 *     cpdef pop(self):             # <<<<<<<<<<<<<<
 *         if self._n_items == 0:
 *             raise IndexError("pop from empty list")
 */

  /* function exit code */
  __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("pyrobuf_list.Uint64List.pop", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_listener);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrobuf_list_10Uint64List_32pop(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_12pyrobuf_list_10Uint64List_32pop(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("pop (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrobuf_list_10Uint64List_31pop(((struct __pyx_obj_12pyrobuf_list_Uint64List *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_12pyrobuf_list_10Uint64List_31pop(struct __pyx_obj_12pyrobuf_list_Uint64List *__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("pop", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_12pyrobuf_list_10Uint64List_pop(__pyx_v_self, 1); 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_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyrobuf_list.Uint64List.pop", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrobuf_list.pyx":648
 *         return self._data[self._n_items]
 * 
 *     cpdef remove(self, uint64_t x):             # <<<<<<<<<<<<<<
 *         cdef size_t i
 *         cdef size_t j
 */

static PyObject *__pyx_pw_12pyrobuf_list_10Uint64List_34remove(PyObject *__pyx_v_self, PyObject *__pyx_arg_x); /*proto*/
static PyObject *__pyx_f_12pyrobuf_list_10Uint64List_remove(struct __pyx_obj_12pyrobuf_list_Uint64List *__pyx_v_self, uint64_t __pyx_v_x, int __pyx_skip_dispatch) {
  size_t __pyx_v_i;
  size_t __pyx_v_j;
  int __pyx_v_found;
  PyObject *__pyx_v_listener = NULL;
  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;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  size_t __pyx_t_7;
  size_t __pyx_t_8;
  int __pyx_t_9;
  int __pyx_t_10;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("remove", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_remove); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 648; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_12pyrobuf_list_10Uint64List_34remove)) {
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_3 = __Pyx_PyInt_From_uint64_t(__pyx_v_x); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 648; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_4 = __pyx_t_1; __pyx_t_5 = NULL;
      if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_4))) {
        __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
        if (likely(__pyx_t_5)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_5);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_4, function);
        }
      }
      if (!__pyx_t_5) {
        __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 648; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_GOTREF(__pyx_t_2);
      } else {
        __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 648; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL;
        __Pyx_GIVEREF(__pyx_t_3);
        PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_3);
        __pyx_t_3 = 0;
        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 648; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 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;
  }

  /* "pyrobuf_list.pyx":651
 *         cdef size_t i
 *         cdef size_t j
 *         cdef bint found = 0             # <<<<<<<<<<<<<<
 * 
 *         for i in range(self._n_items):
 */
  __pyx_v_found = 0;

  /* "pyrobuf_list.pyx":653
 *         cdef bint found = 0
 * 
 *         for i in range(self._n_items):             # <<<<<<<<<<<<<<
 *             if self._data[i] == x:
 *                 found = 1
 */
  __pyx_t_7 = __pyx_v_self->_n_items;
  for (__pyx_t_8 = 0; __pyx_t_8 < __pyx_t_7; __pyx_t_8+=1) {
    __pyx_v_i = __pyx_t_8;

    /* "pyrobuf_list.pyx":654
 * 
 *         for i in range(self._n_items):
 *             if self._data[i] == x:             # <<<<<<<<<<<<<<
 *                 found = 1
 *                 break
 */
    __pyx_t_9 = (((__pyx_v_self->_data[__pyx_v_i]) == __pyx_v_x) != 0);
    if (__pyx_t_9) {

      /* "pyrobuf_list.pyx":655
 *         for i in range(self._n_items):
 *             if self._data[i] == x:
 *                 found = 1             # <<<<<<<<<<<<<<
 *                 break
 * 
 */
      __pyx_v_found = 1;

      /* "pyrobuf_list.pyx":656
 *             if self._data[i] == x:
 *                 found = 1
 *                 break             # <<<<<<<<<<<<<<
 * 
 *         if found == 0:
 */
      goto __pyx_L4_break;

      /* "pyrobuf_list.pyx":654
 * 
 *         for i in range(self._n_items):
 *             if self._data[i] == x:             # <<<<<<<<<<<<<<
 *                 found = 1
 *                 break
 */
    }
  }
  __pyx_L4_break:;

  /* "pyrobuf_list.pyx":658
 *                 break
 * 
 *         if found == 0:             # <<<<<<<<<<<<<<
 *             raise ValueError("x not in list")
 * 
 */
  __pyx_t_9 = ((__pyx_v_found == 0) != 0);
  if (__pyx_t_9) {

    /* "pyrobuf_list.pyx":659
 * 
 *         if found == 0:
 *             raise ValueError("x not in list")             # <<<<<<<<<<<<<<
 * 
 *         for j in range(i, self._n_items):
 */
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__23, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 659; __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 = 659; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

    /* "pyrobuf_list.pyx":658
 *                 break
 * 
 *         if found == 0:             # <<<<<<<<<<<<<<
 *             raise ValueError("x not in list")
 * 
 */
  }

  /* "pyrobuf_list.pyx":661
 *             raise ValueError("x not in list")
 * 
 *         for j in range(i, self._n_items):             # <<<<<<<<<<<<<<
 *             self._data[j] = self._data[j + 1]
 * 
 */
  __pyx_t_7 = __pyx_v_self->_n_items;
  for (__pyx_t_8 = __pyx_v_i; __pyx_t_8 < __pyx_t_7; __pyx_t_8+=1) {
    __pyx_v_j = __pyx_t_8;

    /* "pyrobuf_list.pyx":662
 * 
 *         for j in range(i, self._n_items):
 *             self._data[j] = self._data[j + 1]             # <<<<<<<<<<<<<<
 * 
 *         self._n_items -= 1
 */
    (__pyx_v_self->_data[__pyx_v_j]) = (__pyx_v_self->_data[(__pyx_v_j + 1)]);
  }

  /* "pyrobuf_list.pyx":664
 *             self._data[j] = self._data[j + 1]
 * 
 *         self._n_items -= 1             # <<<<<<<<<<<<<<
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:
 */
  __pyx_v_self->_n_items = (__pyx_v_self->_n_items - 1);

  /* "pyrobuf_list.pyx":665
 * 
 *         self._n_items -= 1
 *         listener = <object>self._listener             # <<<<<<<<<<<<<<
 *         if not listener._is_present_in_parent:
 *             listener._Modified()
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_self->_listener);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_v_listener = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pyrobuf_list.pyx":666
 *         self._n_items -= 1
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:             # <<<<<<<<<<<<<<
 *             listener._Modified()
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_listener, __pyx_n_s_is_present_in_parent); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 666; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 666; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_10 = ((!__pyx_t_9) != 0);
  if (__pyx_t_10) {

    /* "pyrobuf_list.pyx":667
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:
 *             listener._Modified()             # <<<<<<<<<<<<<<
 * 
 *     cdef void _append(self, uint64_t x):
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_listener, __pyx_n_s_Modified); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 667; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = NULL;
    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    if (__pyx_t_4) {
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 667; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    } else {
      __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 667; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "pyrobuf_list.pyx":666
 *         self._n_items -= 1
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:             # <<<<<<<<<<<<<<
 *             listener._Modified()
 * 
 */
  }

  /* "pyrobuf_list.pyx":648
 *         return self._data[self._n_items]
 * 
 *     cpdef remove(self, uint64_t x):             # <<<<<<<<<<<<<<
 *         cdef size_t i
 *         cdef size_t j
 */

  /* function exit code */
  __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_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("pyrobuf_list.Uint64List.remove", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_listener);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrobuf_list_10Uint64List_34remove(PyObject *__pyx_v_self, PyObject *__pyx_arg_x); /*proto*/
static PyObject *__pyx_pw_12pyrobuf_list_10Uint64List_34remove(PyObject *__pyx_v_self, PyObject *__pyx_arg_x) {
  uint64_t __pyx_v_x;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("remove (wrapper)", 0);
  assert(__pyx_arg_x); {
    __pyx_v_x = __Pyx_PyInt_As_uint64_t(__pyx_arg_x); if (unlikely((__pyx_v_x == (uint64_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 648; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyrobuf_list.Uint64List.remove", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_12pyrobuf_list_10Uint64List_33remove(((struct __pyx_obj_12pyrobuf_list_Uint64List *)__pyx_v_self), ((uint64_t)__pyx_v_x));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_12pyrobuf_list_10Uint64List_33remove(struct __pyx_obj_12pyrobuf_list_Uint64List *__pyx_v_self, uint64_t __pyx_v_x) {
  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", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_12pyrobuf_list_10Uint64List_remove(__pyx_v_self, __pyx_v_x, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 648; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyrobuf_list.Uint64List.remove", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrobuf_list.pyx":669
 *             listener._Modified()
 * 
 *     cdef void _append(self, uint64_t x):             # <<<<<<<<<<<<<<
 *         cdef uint64_t *mem
 * 
 */

static void __pyx_f_12pyrobuf_list_10Uint64List__append(struct __pyx_obj_12pyrobuf_list_Uint64List *__pyx_v_self, uint64_t __pyx_v_x) {
  uint64_t *__pyx_v_mem;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_append", 0);

  /* "pyrobuf_list.pyx":672
 *         cdef uint64_t *mem
 * 
 *         if self._n_items == self._size:             # <<<<<<<<<<<<<<
 *             mem = <uint64_t *>PyMem_Realloc(self._data, 2 * self._size * sizeof(uint64_t))
 *             if not mem:
 */
  __pyx_t_1 = ((__pyx_v_self->_n_items == __pyx_v_self->_size) != 0);
  if (__pyx_t_1) {

    /* "pyrobuf_list.pyx":673
 * 
 *         if self._n_items == self._size:
 *             mem = <uint64_t *>PyMem_Realloc(self._data, 2 * self._size * sizeof(uint64_t))             # <<<<<<<<<<<<<<
 *             if not mem:
 *                 raise MemoryError()
 */
    __pyx_v_mem = ((uint64_t *)PyMem_Realloc(__pyx_v_self->_data, ((2 * __pyx_v_self->_size) * (sizeof(uint64_t)))));

    /* "pyrobuf_list.pyx":674
 *         if self._n_items == self._size:
 *             mem = <uint64_t *>PyMem_Realloc(self._data, 2 * self._size * sizeof(uint64_t))
 *             if not mem:             # <<<<<<<<<<<<<<
 *                 raise MemoryError()
 * 
 */
    __pyx_t_1 = ((!(__pyx_v_mem != 0)) != 0);
    if (__pyx_t_1) {

      /* "pyrobuf_list.pyx":675
 *             mem = <uint64_t *>PyMem_Realloc(self._data, 2 * self._size * sizeof(uint64_t))
 *             if not mem:
 *                 raise MemoryError()             # <<<<<<<<<<<<<<
 * 
 *             self._data = mem
 */
      PyErr_NoMemory(); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 675; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

      /* "pyrobuf_list.pyx":674
 *         if self._n_items == self._size:
 *             mem = <uint64_t *>PyMem_Realloc(self._data, 2 * self._size * sizeof(uint64_t))
 *             if not mem:             # <<<<<<<<<<<<<<
 *                 raise MemoryError()
 * 
 */
    }

    /* "pyrobuf_list.pyx":677
 *                 raise MemoryError()
 * 
 *             self._data = mem             # <<<<<<<<<<<<<<
 *             self._size *= 2
 * 
 */
    __pyx_v_self->_data = __pyx_v_mem;

    /* "pyrobuf_list.pyx":678
 * 
 *             self._data = mem
 *             self._size *= 2             # <<<<<<<<<<<<<<
 * 
 *         self._data[self._n_items] = x
 */
    __pyx_v_self->_size = (__pyx_v_self->_size * 2);

    /* "pyrobuf_list.pyx":672
 *         cdef uint64_t *mem
 * 
 *         if self._n_items == self._size:             # <<<<<<<<<<<<<<
 *             mem = <uint64_t *>PyMem_Realloc(self._data, 2 * self._size * sizeof(uint64_t))
 *             if not mem:
 */
  }

  /* "pyrobuf_list.pyx":680
 *             self._size *= 2
 * 
 *         self._data[self._n_items] = x             # <<<<<<<<<<<<<<
 *         self._n_items += 1
 * 
 */
  (__pyx_v_self->_data[__pyx_v_self->_n_items]) = __pyx_v_x;

  /* "pyrobuf_list.pyx":681
 * 
 *         self._data[self._n_items] = x
 *         self._n_items += 1             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_v_self->_n_items = (__pyx_v_self->_n_items + 1);

  /* "pyrobuf_list.pyx":669
 *             listener._Modified()
 * 
 *     cdef void _append(self, uint64_t x):             # <<<<<<<<<<<<<<
 *         cdef uint64_t *mem
 * 
 */

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_WriteUnraisable("pyrobuf_list.Uint64List._append", __pyx_clineno, __pyx_lineno, __pyx_filename, 0, 0);
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
}

/* "pyrobuf_list.pyx":687
 * cdef class CharList:
 * 
 *     def __cinit__(self, size_t size=16, object listener=None):             # <<<<<<<<<<<<<<
 *         self._data = <char *>PyMem_Malloc(size * sizeof(char))
 *         if not self._data:
 */

/* Python wrapper */
static int __pyx_pw_12pyrobuf_list_8CharList_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_12pyrobuf_list_8CharList_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  size_t __pyx_v_size;
  PyObject *__pyx_v_listener = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_size,&__pyx_n_s_listener,0};
    PyObject* values[2] = {0,0};
    values[1] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_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 (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_size);
          if (value) { values[0] = value; kw_args--; }
        }
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_listener);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 687; __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;
      }
    }
    if (values[0]) {
      __pyx_v_size = __Pyx_PyInt_As_size_t(values[0]); if (unlikely((__pyx_v_size == (size_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 687; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    } else {
      __pyx_v_size = ((size_t)16);
    }
    __pyx_v_listener = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 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_AddTraceback("pyrobuf_list.CharList.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_12pyrobuf_list_8CharList___cinit__(((struct __pyx_obj_12pyrobuf_list_CharList *)__pyx_v_self), __pyx_v_size, __pyx_v_listener);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_12pyrobuf_list_8CharList___cinit__(struct __pyx_obj_12pyrobuf_list_CharList *__pyx_v_self, size_t __pyx_v_size, PyObject *__pyx_v_listener) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);

  /* "pyrobuf_list.pyx":688
 * 
 *     def __cinit__(self, size_t size=16, object listener=None):
 *         self._data = <char *>PyMem_Malloc(size * sizeof(char))             # <<<<<<<<<<<<<<
 *         if not self._data:
 *             raise MemoryError()
 */
  __pyx_v_self->_data = ((char *)PyMem_Malloc((__pyx_v_size * (sizeof(char)))));

  /* "pyrobuf_list.pyx":689
 *     def __cinit__(self, size_t size=16, object listener=None):
 *         self._data = <char *>PyMem_Malloc(size * sizeof(char))
 *         if not self._data:             # <<<<<<<<<<<<<<
 *             raise MemoryError()
 * 
 */
  __pyx_t_1 = ((!(__pyx_v_self->_data != 0)) != 0);
  if (__pyx_t_1) {

    /* "pyrobuf_list.pyx":690
 *         self._data = <char *>PyMem_Malloc(size * sizeof(char))
 *         if not self._data:
 *             raise MemoryError()             # <<<<<<<<<<<<<<
 * 
 *         self._n_items = 0
 */
    PyErr_NoMemory(); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 690; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

    /* "pyrobuf_list.pyx":689
 *     def __cinit__(self, size_t size=16, object listener=None):
 *         self._data = <char *>PyMem_Malloc(size * sizeof(char))
 *         if not self._data:             # <<<<<<<<<<<<<<
 *             raise MemoryError()
 * 
 */
  }

  /* "pyrobuf_list.pyx":692
 *             raise MemoryError()
 * 
 *         self._n_items = 0             # <<<<<<<<<<<<<<
 *         self._size = size
 *         if listener is None:
 */
  __pyx_v_self->_n_items = 0;

  /* "pyrobuf_list.pyx":693
 * 
 *         self._n_items = 0
 *         self._size = size             # <<<<<<<<<<<<<<
 *         if listener is None:
 *             self._listener = <PyObject *>null_listener
 */
  __pyx_v_self->_size = __pyx_v_size;

  /* "pyrobuf_list.pyx":694
 *         self._n_items = 0
 *         self._size = size
 *         if listener is None:             # <<<<<<<<<<<<<<
 *             self._listener = <PyObject *>null_listener
 *         else:
 */
  __pyx_t_1 = (__pyx_v_listener == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "pyrobuf_list.pyx":695
 *         self._size = size
 *         if listener is None:
 *             self._listener = <PyObject *>null_listener             # <<<<<<<<<<<<<<
 *         else:
 *             self._listener = <PyObject *>listener
 */
    __pyx_v_self->_listener = ((PyObject *)null_listener);

    /* "pyrobuf_list.pyx":694
 *         self._n_items = 0
 *         self._size = size
 *         if listener is None:             # <<<<<<<<<<<<<<
 *             self._listener = <PyObject *>null_listener
 *         else:
 */
    goto __pyx_L4;
  }

  /* "pyrobuf_list.pyx":697
 *             self._listener = <PyObject *>null_listener
 *         else:
 *             self._listener = <PyObject *>listener             # <<<<<<<<<<<<<<
 * 
 *     def __dealloc__(self):
 */
  /*else*/ {
    __pyx_v_self->_listener = ((PyObject *)__pyx_v_listener);
  }
  __pyx_L4:;

  /* "pyrobuf_list.pyx":687
 * cdef class CharList:
 * 
 *     def __cinit__(self, size_t size=16, object listener=None):             # <<<<<<<<<<<<<<
 *         self._data = <char *>PyMem_Malloc(size * sizeof(char))
 *         if not self._data:
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyrobuf_list.CharList.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrobuf_list.pyx":699
 *             self._listener = <PyObject *>listener
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         PyMem_Free(self._data)
 * 
 */

/* Python wrapper */
static void __pyx_pw_12pyrobuf_list_8CharList_3__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_12pyrobuf_list_8CharList_3__dealloc__(PyObject *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_pf_12pyrobuf_list_8CharList_2__dealloc__(((struct __pyx_obj_12pyrobuf_list_CharList *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

static void __pyx_pf_12pyrobuf_list_8CharList_2__dealloc__(struct __pyx_obj_12pyrobuf_list_CharList *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__", 0);

  /* "pyrobuf_list.pyx":700
 * 
 *     def __dealloc__(self):
 *         PyMem_Free(self._data)             # <<<<<<<<<<<<<<
 * 
 *     def __contains__(self, char x):
 */
  PyMem_Free(__pyx_v_self->_data);

  /* "pyrobuf_list.pyx":699
 *             self._listener = <PyObject *>listener
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         PyMem_Free(self._data)
 * 
 */

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

/* "pyrobuf_list.pyx":702
 *         PyMem_Free(self._data)
 * 
 *     def __contains__(self, char x):             # <<<<<<<<<<<<<<
 *         cdef size_t i
 *         for i in range(self._n_items):
 */

/* Python wrapper */
static int __pyx_pw_12pyrobuf_list_8CharList_5__contains__(PyObject *__pyx_v_self, PyObject *__pyx_arg_x); /*proto*/
static int __pyx_pw_12pyrobuf_list_8CharList_5__contains__(PyObject *__pyx_v_self, PyObject *__pyx_arg_x) {
  char __pyx_v_x;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__contains__ (wrapper)", 0);
  assert(__pyx_arg_x); {
    __pyx_v_x = __Pyx_PyInt_As_char(__pyx_arg_x); if (unlikely((__pyx_v_x == (char)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 702; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyrobuf_list.CharList.__contains__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_12pyrobuf_list_8CharList_4__contains__(((struct __pyx_obj_12pyrobuf_list_CharList *)__pyx_v_self), ((char)__pyx_v_x));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_12pyrobuf_list_8CharList_4__contains__(struct __pyx_obj_12pyrobuf_list_CharList *__pyx_v_self, char __pyx_v_x) {
  size_t __pyx_v_i;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  size_t __pyx_t_1;
  size_t __pyx_t_2;
  int __pyx_t_3;
  __Pyx_RefNannySetupContext("__contains__", 0);

  /* "pyrobuf_list.pyx":704
 *     def __contains__(self, char x):
 *         cdef size_t i
 *         for i in range(self._n_items):             # <<<<<<<<<<<<<<
 *             if self._data[i] == x:
 *                 return True
 */
  __pyx_t_1 = __pyx_v_self->_n_items;
  for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
    __pyx_v_i = __pyx_t_2;

    /* "pyrobuf_list.pyx":705
 *         cdef size_t i
 *         for i in range(self._n_items):
 *             if self._data[i] == x:             # <<<<<<<<<<<<<<
 *                 return True
 * 
 */
    __pyx_t_3 = (((__pyx_v_self->_data[__pyx_v_i]) == __pyx_v_x) != 0);
    if (__pyx_t_3) {

      /* "pyrobuf_list.pyx":706
 *         for i in range(self._n_items):
 *             if self._data[i] == x:
 *                 return True             # <<<<<<<<<<<<<<
 * 
 *         return False
 */
      __pyx_r = 1;
      goto __pyx_L0;

      /* "pyrobuf_list.pyx":705
 *         cdef size_t i
 *         for i in range(self._n_items):
 *             if self._data[i] == x:             # <<<<<<<<<<<<<<
 *                 return True
 * 
 */
    }
  }

  /* "pyrobuf_list.pyx":708
 *                 return True
 * 
 *         return False             # <<<<<<<<<<<<<<
 * 
 *     def __delitem__(self, int i):
 */
  __pyx_r = 0;
  goto __pyx_L0;

  /* "pyrobuf_list.pyx":702
 *         PyMem_Free(self._data)
 * 
 *     def __contains__(self, char x):             # <<<<<<<<<<<<<<
 *         cdef size_t i
 *         for i in range(self._n_items):
 */

  /* function exit code */
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrobuf_list.pyx":710
 *         return False
 * 
 *     def __delitem__(self, int i):             # <<<<<<<<<<<<<<
 *         if i < 0:
 *             i += <int>self._n_items
 */

/* Python wrapper */
static int __pyx_pw_12pyrobuf_list_8CharList_7__delitem__(PyObject *__pyx_v_self, PyObject *__pyx_arg_i); /*proto*/
static int __pyx_pw_12pyrobuf_list_8CharList_7__delitem__(PyObject *__pyx_v_self, PyObject *__pyx_arg_i) {
  int __pyx_v_i;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__delitem__ (wrapper)", 0);
  assert(__pyx_arg_i); {
    __pyx_v_i = __Pyx_PyInt_As_int(__pyx_arg_i); if (unlikely((__pyx_v_i == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 710; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyrobuf_list.CharList.__delitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_12pyrobuf_list_8CharList_6__delitem__(((struct __pyx_obj_12pyrobuf_list_CharList *)__pyx_v_self), ((int)__pyx_v_i));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_12pyrobuf_list_8CharList_6__delitem__(struct __pyx_obj_12pyrobuf_list_CharList *__pyx_v_self, int __pyx_v_i) {
  size_t __pyx_v_j;
  PyObject *__pyx_v_listener = NULL;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  size_t __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;
  __Pyx_RefNannySetupContext("__delitem__", 0);

  /* "pyrobuf_list.pyx":711
 * 
 *     def __delitem__(self, int i):
 *         if i < 0:             # <<<<<<<<<<<<<<
 *             i += <int>self._n_items
 * 
 */
  __pyx_t_1 = ((__pyx_v_i < 0) != 0);
  if (__pyx_t_1) {

    /* "pyrobuf_list.pyx":712
 *     def __delitem__(self, int i):
 *         if i < 0:
 *             i += <int>self._n_items             # <<<<<<<<<<<<<<
 * 
 *         if i < 0 or <size_t>i >= self._n_items:
 */
    __pyx_v_i = (__pyx_v_i + ((int)__pyx_v_self->_n_items));

    /* "pyrobuf_list.pyx":711
 * 
 *     def __delitem__(self, int i):
 *         if i < 0:             # <<<<<<<<<<<<<<
 *             i += <int>self._n_items
 * 
 */
  }

  /* "pyrobuf_list.pyx":714
 *             i += <int>self._n_items
 * 
 *         if i < 0 or <size_t>i >= self._n_items:             # <<<<<<<<<<<<<<
 *             raise IndexError("list index out of range")
 * 
 */
  __pyx_t_2 = ((__pyx_v_i < 0) != 0);
  if (!__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L5_bool_binop_done;
  }
  __pyx_t_2 = ((((size_t)__pyx_v_i) >= __pyx_v_self->_n_items) != 0);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L5_bool_binop_done:;
  if (__pyx_t_1) {

    /* "pyrobuf_list.pyx":715
 * 
 *         if i < 0 or <size_t>i >= self._n_items:
 *             raise IndexError("list index out of range")             # <<<<<<<<<<<<<<
 * 
 *         cdef size_t j
 */
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_IndexError, __pyx_tuple__24, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 715; __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 = 715; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

    /* "pyrobuf_list.pyx":714
 *             i += <int>self._n_items
 * 
 *         if i < 0 or <size_t>i >= self._n_items:             # <<<<<<<<<<<<<<
 *             raise IndexError("list index out of range")
 * 
 */
  }

  /* "pyrobuf_list.pyx":718
 * 
 *         cdef size_t j
 *         for j in range(i, self._n_items):             # <<<<<<<<<<<<<<
 *             self._data[j] = self._data[j + 1]
 * 
 */
  __pyx_t_4 = __pyx_v_self->_n_items;
  for (__pyx_t_5 = __pyx_v_i; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
    __pyx_v_j = __pyx_t_5;

    /* "pyrobuf_list.pyx":719
 *         cdef size_t j
 *         for j in range(i, self._n_items):
 *             self._data[j] = self._data[j + 1]             # <<<<<<<<<<<<<<
 * 
 *         self._n_items -= 1
 */
    (__pyx_v_self->_data[__pyx_v_j]) = (__pyx_v_self->_data[(__pyx_v_j + 1)]);
  }

  /* "pyrobuf_list.pyx":721
 *             self._data[j] = self._data[j + 1]
 * 
 *         self._n_items -= 1             # <<<<<<<<<<<<<<
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:
 */
  __pyx_v_self->_n_items = (__pyx_v_self->_n_items - 1);

  /* "pyrobuf_list.pyx":722
 * 
 *         self._n_items -= 1
 *         listener = <object>self._listener             # <<<<<<<<<<<<<<
 *         if not listener._is_present_in_parent:
 *             listener._Modified()
 */
  __pyx_t_3 = ((PyObject *)__pyx_v_self->_listener);
  __Pyx_INCREF(__pyx_t_3);
  __pyx_v_listener = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "pyrobuf_list.pyx":723
 *         self._n_items -= 1
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:             # <<<<<<<<<<<<<<
 *             listener._Modified()
 * 
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_listener, __pyx_n_s_is_present_in_parent); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 723; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 723; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_2 = ((!__pyx_t_1) != 0);
  if (__pyx_t_2) {

    /* "pyrobuf_list.pyx":724
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:
 *             listener._Modified()             # <<<<<<<<<<<<<<
 * 
 *     def __getitem__(self, int i):
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_listener, __pyx_n_s_Modified); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 724; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = NULL;
    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_6, function);
      }
    }
    if (__pyx_t_7) {
      __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_7); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 724; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    } else {
      __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 724; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "pyrobuf_list.pyx":723
 *         self._n_items -= 1
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:             # <<<<<<<<<<<<<<
 *             listener._Modified()
 * 
 */
  }

  /* "pyrobuf_list.pyx":710
 *         return False
 * 
 *     def __delitem__(self, int i):             # <<<<<<<<<<<<<<
 *         if i < 0:
 *             i += <int>self._n_items
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("pyrobuf_list.CharList.__delitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_listener);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrobuf_list.pyx":726
 *             listener._Modified()
 * 
 *     def __getitem__(self, int i):             # <<<<<<<<<<<<<<
 *         if i < 0:
 *             i += <int>self._n_items
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrobuf_list_8CharList_9__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_arg_i); /*proto*/
static PyObject *__pyx_pw_12pyrobuf_list_8CharList_9__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_arg_i) {
  int __pyx_v_i;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0);
  assert(__pyx_arg_i); {
    __pyx_v_i = __Pyx_PyInt_As_int(__pyx_arg_i); if (unlikely((__pyx_v_i == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 726; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyrobuf_list.CharList.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_12pyrobuf_list_8CharList_8__getitem__(((struct __pyx_obj_12pyrobuf_list_CharList *)__pyx_v_self), ((int)__pyx_v_i));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_12pyrobuf_list_8CharList_8__getitem__(struct __pyx_obj_12pyrobuf_list_CharList *__pyx_v_self, int __pyx_v_i) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__getitem__", 0);

  /* "pyrobuf_list.pyx":727
 * 
 *     def __getitem__(self, int i):
 *         if i < 0:             # <<<<<<<<<<<<<<
 *             i += <int>self._n_items
 * 
 */
  __pyx_t_1 = ((__pyx_v_i < 0) != 0);
  if (__pyx_t_1) {

    /* "pyrobuf_list.pyx":728
 *     def __getitem__(self, int i):
 *         if i < 0:
 *             i += <int>self._n_items             # <<<<<<<<<<<<<<
 * 
 *         if i < 0 or <size_t>i >= self._n_items or i < 0:
 */
    __pyx_v_i = (__pyx_v_i + ((int)__pyx_v_self->_n_items));

    /* "pyrobuf_list.pyx":727
 * 
 *     def __getitem__(self, int i):
 *         if i < 0:             # <<<<<<<<<<<<<<
 *             i += <int>self._n_items
 * 
 */
  }

  /* "pyrobuf_list.pyx":730
 *             i += <int>self._n_items
 * 
 *         if i < 0 or <size_t>i >= self._n_items or i < 0:             # <<<<<<<<<<<<<<
 *             raise IndexError("list index out of range")
 * 
 */
  __pyx_t_2 = ((__pyx_v_i < 0) != 0);
  if (!__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L5_bool_binop_done;
  }
  __pyx_t_2 = ((((size_t)__pyx_v_i) >= __pyx_v_self->_n_items) != 0);
  if (!__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L5_bool_binop_done;
  }
  __pyx_t_2 = ((__pyx_v_i < 0) != 0);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L5_bool_binop_done:;
  if (__pyx_t_1) {

    /* "pyrobuf_list.pyx":731
 * 
 *         if i < 0 or <size_t>i >= self._n_items or i < 0:
 *             raise IndexError("list index out of range")             # <<<<<<<<<<<<<<
 * 
 *         return self._data[i]
 */
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_IndexError, __pyx_tuple__25, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 731; __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 = 731; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

    /* "pyrobuf_list.pyx":730
 *             i += <int>self._n_items
 * 
 *         if i < 0 or <size_t>i >= self._n_items or i < 0:             # <<<<<<<<<<<<<<
 *             raise IndexError("list index out of range")
 * 
 */
  }

  /* "pyrobuf_list.pyx":733
 *             raise IndexError("list index out of range")
 * 
 *         return self._data[i]             # <<<<<<<<<<<<<<
 * 
 *     def __iter__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = __Pyx_PyInt_From_char((__pyx_v_self->_data[__pyx_v_i])); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 733; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "pyrobuf_list.pyx":726
 *             listener._Modified()
 * 
 *     def __getitem__(self, int i):             # <<<<<<<<<<<<<<
 *         if i < 0:
 *             i += <int>self._n_items
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pyrobuf_list.CharList.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_12pyrobuf_list_8CharList_12generator2(__pyx_CoroutineObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */

/* "pyrobuf_list.pyx":735
 *         return self._data[i]
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         cdef size_t idx = 0
 *         while idx < self._n_items:
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrobuf_list_8CharList_11__iter__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_12pyrobuf_list_8CharList_11__iter__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrobuf_list_8CharList_10__iter__(((struct __pyx_obj_12pyrobuf_list_CharList *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_12pyrobuf_list_8CharList_10__iter__(struct __pyx_obj_12pyrobuf_list_CharList *__pyx_v_self) {
  struct __pyx_obj_12pyrobuf_list___pyx_scope_struct_2___iter__ *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__iter__", 0);
  __pyx_cur_scope = (struct __pyx_obj_12pyrobuf_list___pyx_scope_struct_2___iter__ *)__pyx_tp_new_12pyrobuf_list___pyx_scope_struct_2___iter__(__pyx_ptype_12pyrobuf_list___pyx_scope_struct_2___iter__, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __Pyx_GOTREF(__pyx_cur_scope);
  __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
  __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  {
    __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_12pyrobuf_list_8CharList_12generator2, (PyObject *) __pyx_cur_scope, __pyx_n_s_iter, __pyx_n_s_CharList___iter); if (unlikely(!gen)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 735; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyrobuf_list.CharList.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_gb_12pyrobuf_list_8CharList_12generator2(__pyx_CoroutineObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_12pyrobuf_list___pyx_scope_struct_2___iter__ *__pyx_cur_scope = ((struct __pyx_obj_12pyrobuf_list___pyx_scope_struct_2___iter__ *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("None", 0);
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    case 1: goto __pyx_L6_resume_from_yield;
    default: /* CPython raises the right error here */
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __pyx_L3_first_run:;
  if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 735; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pyrobuf_list.pyx":736
 * 
 *     def __iter__(self):
 *         cdef size_t idx = 0             # <<<<<<<<<<<<<<
 *         while idx < self._n_items:
 *             yield self._data[idx]
 */
  __pyx_cur_scope->__pyx_v_idx = 0;

  /* "pyrobuf_list.pyx":737
 *     def __iter__(self):
 *         cdef size_t idx = 0
 *         while idx < self._n_items:             # <<<<<<<<<<<<<<
 *             yield self._data[idx]
 *             idx += 1
 */
  while (1) {
    __pyx_t_1 = ((__pyx_cur_scope->__pyx_v_idx < __pyx_cur_scope->__pyx_v_self->_n_items) != 0);
    if (!__pyx_t_1) break;

    /* "pyrobuf_list.pyx":738
 *         cdef size_t idx = 0
 *         while idx < self._n_items:
 *             yield self._data[idx]             # <<<<<<<<<<<<<<
 *             idx += 1
 * 
 */
    __pyx_t_2 = __Pyx_PyInt_From_char((__pyx_cur_scope->__pyx_v_self->_data[__pyx_cur_scope->__pyx_v_idx])); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 738; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    __Pyx_XGIVEREF(__pyx_r);
    __Pyx_RefNannyFinishContext();
    /* return from generator, yielding value */
    __pyx_generator->resume_label = 1;
    return __pyx_r;
    __pyx_L6_resume_from_yield:;
    if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 738; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

    /* "pyrobuf_list.pyx":739
 *         while idx < self._n_items:
 *             yield self._data[idx]
 *             idx += 1             # <<<<<<<<<<<<<<
 * 
 *     def __len__(self):
 */
    __pyx_cur_scope->__pyx_v_idx = (__pyx_cur_scope->__pyx_v_idx + 1);
  }

  /* "pyrobuf_list.pyx":735
 *         return self._data[i]
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         cdef size_t idx = 0
 *         while idx < self._n_items:
 */

  /* function exit code */
  PyErr_SetNone(PyExc_StopIteration);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
  __pyx_generator->resume_label = -1;
  __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrobuf_list.pyx":741
 *             idx += 1
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         return self._n_items
 * 
 */

/* Python wrapper */
static Py_ssize_t __pyx_pw_12pyrobuf_list_8CharList_14__len__(PyObject *__pyx_v_self); /*proto*/
static Py_ssize_t __pyx_pw_12pyrobuf_list_8CharList_14__len__(PyObject *__pyx_v_self) {
  Py_ssize_t __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__len__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrobuf_list_8CharList_13__len__(((struct __pyx_obj_12pyrobuf_list_CharList *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static Py_ssize_t __pyx_pf_12pyrobuf_list_8CharList_13__len__(struct __pyx_obj_12pyrobuf_list_CharList *__pyx_v_self) {
  Py_ssize_t __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__len__", 0);

  /* "pyrobuf_list.pyx":742
 * 
 *     def __len__(self):
 *         return self._n_items             # <<<<<<<<<<<<<<
 * 
 *     def __repr__(self):
 */
  __pyx_r = __pyx_v_self->_n_items;
  goto __pyx_L0;

  /* "pyrobuf_list.pyx":741
 *             idx += 1
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         return self._n_items
 * 
 */

  /* function exit code */
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrobuf_list.pyx":744
 *         return self._n_items
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return repr(list(self))
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrobuf_list_8CharList_16__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_12pyrobuf_list_8CharList_16__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrobuf_list_8CharList_15__repr__(((struct __pyx_obj_12pyrobuf_list_CharList *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_12pyrobuf_list_8CharList_15__repr__(struct __pyx_obj_12pyrobuf_list_CharList *__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__", 0);

  /* "pyrobuf_list.pyx":745
 * 
 *     def __repr__(self):
 *         return repr(list(self))             # <<<<<<<<<<<<<<
 * 
 *     def __setitem__(self, int i, char x):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PySequence_List(((PyObject *)__pyx_v_self)); 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_Repr(__pyx_t_1); 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_r = __pyx_t_2;
  __pyx_t_2 = 0;
  goto __pyx_L0;

  /* "pyrobuf_list.pyx":744
 *         return self._n_items
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return repr(list(self))
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pyrobuf_list.CharList.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrobuf_list.pyx":747
 *         return repr(list(self))
 * 
 *     def __setitem__(self, int i, char x):             # <<<<<<<<<<<<<<
 *         if i < 0:
 *             i += <int>self._n_items
 */

/* Python wrapper */
static int __pyx_pw_12pyrobuf_list_8CharList_18__setitem__(PyObject *__pyx_v_self, PyObject *__pyx_arg_i, PyObject *__pyx_arg_x); /*proto*/
static int __pyx_pw_12pyrobuf_list_8CharList_18__setitem__(PyObject *__pyx_v_self, PyObject *__pyx_arg_i, PyObject *__pyx_arg_x) {
  int __pyx_v_i;
  char __pyx_v_x;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setitem__ (wrapper)", 0);
  assert(__pyx_arg_i); {
    __pyx_v_i = __Pyx_PyInt_As_int(__pyx_arg_i); if (unlikely((__pyx_v_i == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 747; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  }
  assert(__pyx_arg_x); {
    __pyx_v_x = __Pyx_PyInt_As_char(__pyx_arg_x); if (unlikely((__pyx_v_x == (char)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 747; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyrobuf_list.CharList.__setitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_12pyrobuf_list_8CharList_17__setitem__(((struct __pyx_obj_12pyrobuf_list_CharList *)__pyx_v_self), ((int)__pyx_v_i), ((char)__pyx_v_x));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_12pyrobuf_list_8CharList_17__setitem__(struct __pyx_obj_12pyrobuf_list_CharList *__pyx_v_self, int __pyx_v_i, char __pyx_v_x) {
  PyObject *__pyx_v_listener = NULL;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  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;
  __Pyx_RefNannySetupContext("__setitem__", 0);

  /* "pyrobuf_list.pyx":748
 * 
 *     def __setitem__(self, int i, char x):
 *         if i < 0:             # <<<<<<<<<<<<<<
 *             i += <int>self._n_items
 * 
 */
  __pyx_t_1 = ((__pyx_v_i < 0) != 0);
  if (__pyx_t_1) {

    /* "pyrobuf_list.pyx":749
 *     def __setitem__(self, int i, char x):
 *         if i < 0:
 *             i += <int>self._n_items             # <<<<<<<<<<<<<<
 * 
 *         if i < 0 or <size_t>i >= self._n_items:
 */
    __pyx_v_i = (__pyx_v_i + ((int)__pyx_v_self->_n_items));

    /* "pyrobuf_list.pyx":748
 * 
 *     def __setitem__(self, int i, char x):
 *         if i < 0:             # <<<<<<<<<<<<<<
 *             i += <int>self._n_items
 * 
 */
  }

  /* "pyrobuf_list.pyx":751
 *             i += <int>self._n_items
 * 
 *         if i < 0 or <size_t>i >= self._n_items:             # <<<<<<<<<<<<<<
 *             raise IndexError("list index out of range")
 * 
 */
  __pyx_t_2 = ((__pyx_v_i < 0) != 0);
  if (!__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L5_bool_binop_done;
  }
  __pyx_t_2 = ((((size_t)__pyx_v_i) >= __pyx_v_self->_n_items) != 0);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L5_bool_binop_done:;
  if (__pyx_t_1) {

    /* "pyrobuf_list.pyx":752
 * 
 *         if i < 0 or <size_t>i >= self._n_items:
 *             raise IndexError("list index out of range")             # <<<<<<<<<<<<<<
 * 
 *         self._data[i] = x
 */
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_IndexError, __pyx_tuple__26, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 752; __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 = 752; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

    /* "pyrobuf_list.pyx":751
 *             i += <int>self._n_items
 * 
 *         if i < 0 or <size_t>i >= self._n_items:             # <<<<<<<<<<<<<<
 *             raise IndexError("list index out of range")
 * 
 */
  }

  /* "pyrobuf_list.pyx":754
 *             raise IndexError("list index out of range")
 * 
 *         self._data[i] = x             # <<<<<<<<<<<<<<
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:
 */
  (__pyx_v_self->_data[__pyx_v_i]) = __pyx_v_x;

  /* "pyrobuf_list.pyx":755
 * 
 *         self._data[i] = x
 *         listener = <object>self._listener             # <<<<<<<<<<<<<<
 *         if not listener._is_present_in_parent:
 *             listener._Modified()
 */
  __pyx_t_3 = ((PyObject *)__pyx_v_self->_listener);
  __Pyx_INCREF(__pyx_t_3);
  __pyx_v_listener = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "pyrobuf_list.pyx":756
 *         self._data[i] = x
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:             # <<<<<<<<<<<<<<
 *             listener._Modified()
 * 
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_listener, __pyx_n_s_is_present_in_parent); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 756; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 756; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_2 = ((!__pyx_t_1) != 0);
  if (__pyx_t_2) {

    /* "pyrobuf_list.pyx":757
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:
 *             listener._Modified()             # <<<<<<<<<<<<<<
 * 
 *     def __str__(self):
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_listener, __pyx_n_s_Modified); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 757; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = NULL;
    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    if (__pyx_t_5) {
      __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 757; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    } else {
      __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 757; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "pyrobuf_list.pyx":756
 *         self._data[i] = x
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:             # <<<<<<<<<<<<<<
 *             listener._Modified()
 * 
 */
  }

  /* "pyrobuf_list.pyx":747
 *         return repr(list(self))
 * 
 *     def __setitem__(self, int i, char x):             # <<<<<<<<<<<<<<
 *         if i < 0:
 *             i += <int>self._n_items
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pyrobuf_list.CharList.__setitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_listener);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrobuf_list.pyx":759
 *             listener._Modified()
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return str(list(self))
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrobuf_list_8CharList_20__str__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_12pyrobuf_list_8CharList_20__str__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrobuf_list_8CharList_19__str__(((struct __pyx_obj_12pyrobuf_list_CharList *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_12pyrobuf_list_8CharList_19__str__(struct __pyx_obj_12pyrobuf_list_CharList *__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__", 0);

  /* "pyrobuf_list.pyx":760
 * 
 *     def __str__(self):
 *         return str(list(self))             # <<<<<<<<<<<<<<
 * 
 *     def __getbuffer__(self, Py_buffer *buffer, int flags):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PySequence_List(((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 760; __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 = 760; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)(&PyString_Type)), __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 760; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyrobuf_list.pyx":759
 *             listener._Modified()
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return str(list(self))
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pyrobuf_list.CharList.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrobuf_list.pyx":762
 *         return str(list(self))
 * 
 *     def __getbuffer__(self, Py_buffer *buffer, int flags):             # <<<<<<<<<<<<<<
 * 
 *         cdef Py_ssize_t itemsize = sizeof(char)
 */

/* Python wrapper */
static CYTHON_UNUSED int __pyx_pw_12pyrobuf_list_8CharList_22__getbuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_buffer, int __pyx_v_flags); /*proto*/
static CYTHON_UNUSED int __pyx_pw_12pyrobuf_list_8CharList_22__getbuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_buffer, int __pyx_v_flags) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__getbuffer__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrobuf_list_8CharList_21__getbuffer__(((struct __pyx_obj_12pyrobuf_list_CharList *)__pyx_v_self), ((Py_buffer *)__pyx_v_buffer), ((int)__pyx_v_flags));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_12pyrobuf_list_8CharList_21__getbuffer__(struct __pyx_obj_12pyrobuf_list_CharList *__pyx_v_self, Py_buffer *__pyx_v_buffer, CYTHON_UNUSED int __pyx_v_flags) {
  Py_ssize_t __pyx_v_itemsize;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  size_t __pyx_t_1;
  Py_ssize_t *__pyx_t_2;
  __Pyx_RefNannySetupContext("__getbuffer__", 0);
  if (__pyx_v_buffer != NULL) {
    __pyx_v_buffer->obj = Py_None; __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(__pyx_v_buffer->obj);
  }

  /* "pyrobuf_list.pyx":764
 *     def __getbuffer__(self, Py_buffer *buffer, int flags):
 * 
 *         cdef Py_ssize_t itemsize = sizeof(char)             # <<<<<<<<<<<<<<
 *         self.shape[0] = self._n_items
 *         self.strides[0] = 1
 */
  __pyx_v_itemsize = (sizeof(char));

  /* "pyrobuf_list.pyx":765
 * 
 *         cdef Py_ssize_t itemsize = sizeof(char)
 *         self.shape[0] = self._n_items             # <<<<<<<<<<<<<<
 *         self.strides[0] = 1
 * 
 */
  __pyx_t_1 = __pyx_v_self->_n_items;
  (__pyx_v_self->shape[0]) = __pyx_t_1;

  /* "pyrobuf_list.pyx":766
 *         cdef Py_ssize_t itemsize = sizeof(char)
 *         self.shape[0] = self._n_items
 *         self.strides[0] = 1             # <<<<<<<<<<<<<<
 * 
 *         buffer.buf = <char *>(self._data)
 */
  (__pyx_v_self->strides[0]) = 1;

  /* "pyrobuf_list.pyx":768
 *         self.strides[0] = 1
 * 
 *         buffer.buf = <char *>(self._data)             # <<<<<<<<<<<<<<
 *         buffer.format = 'c'
 *         buffer.internal = NULL                  # see References
 */
  __pyx_v_buffer->buf = ((char *)__pyx_v_self->_data);

  /* "pyrobuf_list.pyx":769
 * 
 *         buffer.buf = <char *>(self._data)
 *         buffer.format = 'c'             # <<<<<<<<<<<<<<
 *         buffer.internal = NULL                  # see References
 *         buffer.itemsize = itemsize
 */
  __pyx_v_buffer->format = __pyx_k_c;

  /* "pyrobuf_list.pyx":770
 *         buffer.buf = <char *>(self._data)
 *         buffer.format = 'c'
 *         buffer.internal = NULL                  # see References             # <<<<<<<<<<<<<<
 *         buffer.itemsize = itemsize
 *         buffer.len = self._n_items
 */
  __pyx_v_buffer->internal = NULL;

  /* "pyrobuf_list.pyx":771
 *         buffer.format = 'c'
 *         buffer.internal = NULL                  # see References
 *         buffer.itemsize = itemsize             # <<<<<<<<<<<<<<
 *         buffer.len = self._n_items
 *         buffer.ndim = 1
 */
  __pyx_v_buffer->itemsize = __pyx_v_itemsize;

  /* "pyrobuf_list.pyx":772
 *         buffer.internal = NULL                  # see References
 *         buffer.itemsize = itemsize
 *         buffer.len = self._n_items             # <<<<<<<<<<<<<<
 *         buffer.ndim = 1
 *         buffer.obj = self
 */
  __pyx_t_1 = __pyx_v_self->_n_items;
  __pyx_v_buffer->len = __pyx_t_1;

  /* "pyrobuf_list.pyx":773
 *         buffer.itemsize = itemsize
 *         buffer.len = self._n_items
 *         buffer.ndim = 1             # <<<<<<<<<<<<<<
 *         buffer.obj = self
 *         buffer.readonly = 1
 */
  __pyx_v_buffer->ndim = 1;

  /* "pyrobuf_list.pyx":774
 *         buffer.len = self._n_items
 *         buffer.ndim = 1
 *         buffer.obj = self             # <<<<<<<<<<<<<<
 *         buffer.readonly = 1
 *         buffer.shape = self.shape
 */
  __Pyx_INCREF(((PyObject *)__pyx_v_self));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
  __Pyx_GOTREF(__pyx_v_buffer->obj);
  __Pyx_DECREF(__pyx_v_buffer->obj);
  __pyx_v_buffer->obj = ((PyObject *)__pyx_v_self);

  /* "pyrobuf_list.pyx":775
 *         buffer.ndim = 1
 *         buffer.obj = self
 *         buffer.readonly = 1             # <<<<<<<<<<<<<<
 *         buffer.shape = self.shape
 *         buffer.strides = self.strides
 */
  __pyx_v_buffer->readonly = 1;

  /* "pyrobuf_list.pyx":776
 *         buffer.obj = self
 *         buffer.readonly = 1
 *         buffer.shape = self.shape             # <<<<<<<<<<<<<<
 *         buffer.strides = self.strides
 *         buffer.suboffsets = NULL                # for pointer arrays only
 */
  __pyx_t_2 = __pyx_v_self->shape;
  __pyx_v_buffer->shape = __pyx_t_2;

  /* "pyrobuf_list.pyx":777
 *         buffer.readonly = 1
 *         buffer.shape = self.shape
 *         buffer.strides = self.strides             # <<<<<<<<<<<<<<
 *         buffer.suboffsets = NULL                # for pointer arrays only
 * 
 */
  __pyx_t_2 = __pyx_v_self->strides;
  __pyx_v_buffer->strides = __pyx_t_2;

  /* "pyrobuf_list.pyx":778
 *         buffer.shape = self.shape
 *         buffer.strides = self.strides
 *         buffer.suboffsets = NULL                # for pointer arrays only             # <<<<<<<<<<<<<<
 * 
 *     def __releasebuffer__(self, Py_buffer *buffer):
 */
  __pyx_v_buffer->suboffsets = NULL;

  /* "pyrobuf_list.pyx":762
 *         return str(list(self))
 * 
 *     def __getbuffer__(self, Py_buffer *buffer, int flags):             # <<<<<<<<<<<<<<
 * 
 *         cdef Py_ssize_t itemsize = sizeof(char)
 */

  /* function exit code */
  __pyx_r = 0;
  if (__pyx_v_buffer != NULL && __pyx_v_buffer->obj == Py_None) {
    __Pyx_GOTREF(Py_None);
    __Pyx_DECREF(Py_None); __pyx_v_buffer->obj = NULL;
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrobuf_list.pyx":780
 *         buffer.suboffsets = NULL                # for pointer arrays only
 * 
 *     def __releasebuffer__(self, Py_buffer *buffer):             # <<<<<<<<<<<<<<
 *         pass
 * 
 */

/* Python wrapper */
static CYTHON_UNUSED void __pyx_pw_12pyrobuf_list_8CharList_24__releasebuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_buffer); /*proto*/
static CYTHON_UNUSED void __pyx_pw_12pyrobuf_list_8CharList_24__releasebuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_buffer) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__releasebuffer__ (wrapper)", 0);
  __pyx_pf_12pyrobuf_list_8CharList_23__releasebuffer__(((struct __pyx_obj_12pyrobuf_list_CharList *)__pyx_v_self), ((Py_buffer *)__pyx_v_buffer));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

static void __pyx_pf_12pyrobuf_list_8CharList_23__releasebuffer__(CYTHON_UNUSED struct __pyx_obj_12pyrobuf_list_CharList *__pyx_v_self, CYTHON_UNUSED Py_buffer *__pyx_v_buffer) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__releasebuffer__", 0);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

/* "pyrobuf_list.pyx":783
 *         pass
 * 
 *     cpdef append(self, char x):             # <<<<<<<<<<<<<<
 *         self._append(x)
 *         listener = <object>self._listener
 */

static PyObject *__pyx_pw_12pyrobuf_list_8CharList_26append(PyObject *__pyx_v_self, PyObject *__pyx_arg_x); /*proto*/
static PyObject *__pyx_f_12pyrobuf_list_8CharList_append(struct __pyx_obj_12pyrobuf_list_CharList *__pyx_v_self, char __pyx_v_x, int __pyx_skip_dispatch) {
  PyObject *__pyx_v_listener = NULL;
  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;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  int __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("append", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_append); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 783; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_12pyrobuf_list_8CharList_26append)) {
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_3 = __Pyx_PyInt_From_char(__pyx_v_x); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 783; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_4 = __pyx_t_1; __pyx_t_5 = NULL;
      if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_4))) {
        __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
        if (likely(__pyx_t_5)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_5);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_4, function);
        }
      }
      if (!__pyx_t_5) {
        __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 783; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_GOTREF(__pyx_t_2);
      } else {
        __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 783; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL;
        __Pyx_GIVEREF(__pyx_t_3);
        PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_3);
        __pyx_t_3 = 0;
        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_6, NULL); 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);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 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;
  }

  /* "pyrobuf_list.pyx":784
 * 
 *     cpdef append(self, char x):
 *         self._append(x)             # <<<<<<<<<<<<<<
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:
 */
  ((struct __pyx_vtabstruct_12pyrobuf_list_CharList *)__pyx_v_self->__pyx_vtab)->_append(__pyx_v_self, __pyx_v_x);

  /* "pyrobuf_list.pyx":785
 *     cpdef append(self, char x):
 *         self._append(x)
 *         listener = <object>self._listener             # <<<<<<<<<<<<<<
 *         if not listener._is_present_in_parent:
 *             listener._Modified()
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_self->_listener);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_v_listener = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pyrobuf_list.pyx":786
 *         self._append(x)
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:             # <<<<<<<<<<<<<<
 *             listener._Modified()
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_listener, __pyx_n_s_is_present_in_parent); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 786; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 786; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_8 = ((!__pyx_t_7) != 0);
  if (__pyx_t_8) {

    /* "pyrobuf_list.pyx":787
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:
 *             listener._Modified()             # <<<<<<<<<<<<<<
 * 
 *     cpdef extend(self, CharList x):
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_listener, __pyx_n_s_Modified); 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);
    __pyx_t_4 = NULL;
    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    if (__pyx_t_4) {
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 787; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    } else {
      __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 787; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "pyrobuf_list.pyx":786
 *         self._append(x)
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:             # <<<<<<<<<<<<<<
 *             listener._Modified()
 * 
 */
  }

  /* "pyrobuf_list.pyx":783
 *         pass
 * 
 *     cpdef append(self, char x):             # <<<<<<<<<<<<<<
 *         self._append(x)
 *         listener = <object>self._listener
 */

  /* function exit code */
  __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_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("pyrobuf_list.CharList.append", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_listener);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrobuf_list_8CharList_26append(PyObject *__pyx_v_self, PyObject *__pyx_arg_x); /*proto*/
static PyObject *__pyx_pw_12pyrobuf_list_8CharList_26append(PyObject *__pyx_v_self, PyObject *__pyx_arg_x) {
  char __pyx_v_x;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("append (wrapper)", 0);
  assert(__pyx_arg_x); {
    __pyx_v_x = __Pyx_PyInt_As_char(__pyx_arg_x); if (unlikely((__pyx_v_x == (char)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 783; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyrobuf_list.CharList.append", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_12pyrobuf_list_8CharList_25append(((struct __pyx_obj_12pyrobuf_list_CharList *)__pyx_v_self), ((char)__pyx_v_x));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_12pyrobuf_list_8CharList_25append(struct __pyx_obj_12pyrobuf_list_CharList *__pyx_v_self, char __pyx_v_x) {
  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", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_12pyrobuf_list_8CharList_append(__pyx_v_self, __pyx_v_x, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 783; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyrobuf_list.CharList.append", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrobuf_list.pyx":789
 *             listener._Modified()
 * 
 *     cpdef extend(self, CharList x):             # <<<<<<<<<<<<<<
 *         cdef char *mem
 *         cdef size_t new_len = self._n_items + len(x)
 */

static PyObject *__pyx_pw_12pyrobuf_list_8CharList_28extend(PyObject *__pyx_v_self, PyObject *__pyx_v_x); /*proto*/
static PyObject *__pyx_f_12pyrobuf_list_8CharList_extend(struct __pyx_obj_12pyrobuf_list_CharList *__pyx_v_self, struct __pyx_obj_12pyrobuf_list_CharList *__pyx_v_x, int __pyx_skip_dispatch) {
  char *__pyx_v_mem;
  size_t __pyx_v_new_len;
  size_t __pyx_v_new_size;
  int __pyx_v_i;
  PyObject *__pyx_v_listener = NULL;
  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;
  PyObject *__pyx_t_5 = NULL;
  Py_ssize_t __pyx_t_6;
  int __pyx_t_7;
  size_t __pyx_t_8;
  size_t __pyx_t_9;
  size_t __pyx_t_10;
  int __pyx_t_11;
  char __pyx_t_12;
  int __pyx_t_13;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("extend", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_extend); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 789; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_12pyrobuf_list_8CharList_28extend)) {
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
      if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_4)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
        }
      }
      if (!__pyx_t_4) {
        __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_v_x)); 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);
      } else {
        __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 789; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL;
        __Pyx_INCREF(((PyObject *)__pyx_v_x));
        __Pyx_GIVEREF(((PyObject *)__pyx_v_x));
        PyTuple_SET_ITEM(__pyx_t_5, 0+1, ((PyObject *)__pyx_v_x));
        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); 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);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      }
      __Pyx_DECREF(__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;
  }

  /* "pyrobuf_list.pyx":791
 *     cpdef extend(self, CharList x):
 *         cdef char *mem
 *         cdef size_t new_len = self._n_items + len(x)             # <<<<<<<<<<<<<<
 *         cdef size_t new_size
 *         cdef int i
 */
  __pyx_t_6 = PyObject_Length(((PyObject *)__pyx_v_x)); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 791; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_new_len = (__pyx_v_self->_n_items + __pyx_t_6);

  /* "pyrobuf_list.pyx":795
 *         cdef int i
 * 
 *         if new_len > self._size:             # <<<<<<<<<<<<<<
 *             new_size = max(new_len, 2 * self._size)
 *             mem = <char *>PyMem_Realloc(self._data, new_size * sizeof(char))
 */
  __pyx_t_7 = ((__pyx_v_new_len > __pyx_v_self->_size) != 0);
  if (__pyx_t_7) {

    /* "pyrobuf_list.pyx":796
 * 
 *         if new_len > self._size:
 *             new_size = max(new_len, 2 * self._size)             # <<<<<<<<<<<<<<
 *             mem = <char *>PyMem_Realloc(self._data, new_size * sizeof(char))
 *             if not mem:
 */
    __pyx_t_8 = (2 * __pyx_v_self->_size);
    __pyx_t_9 = __pyx_v_new_len;
    if (((__pyx_t_8 > __pyx_t_9) != 0)) {
      __pyx_t_10 = __pyx_t_8;
    } else {
      __pyx_t_10 = __pyx_t_9;
    }
    __pyx_v_new_size = __pyx_t_10;

    /* "pyrobuf_list.pyx":797
 *         if new_len > self._size:
 *             new_size = max(new_len, 2 * self._size)
 *             mem = <char *>PyMem_Realloc(self._data, new_size * sizeof(char))             # <<<<<<<<<<<<<<
 *             if not mem:
 *                 raise MemoryError()
 */
    __pyx_v_mem = ((char *)PyMem_Realloc(__pyx_v_self->_data, (__pyx_v_new_size * (sizeof(char)))));

    /* "pyrobuf_list.pyx":798
 *             new_size = max(new_len, 2 * self._size)
 *             mem = <char *>PyMem_Realloc(self._data, new_size * sizeof(char))
 *             if not mem:             # <<<<<<<<<<<<<<
 *                 raise MemoryError()
 * 
 */
    __pyx_t_7 = ((!(__pyx_v_mem != 0)) != 0);
    if (__pyx_t_7) {

      /* "pyrobuf_list.pyx":799
 *             mem = <char *>PyMem_Realloc(self._data, new_size * sizeof(char))
 *             if not mem:
 *                 raise MemoryError()             # <<<<<<<<<<<<<<
 * 
 *             self._data = mem
 */
      PyErr_NoMemory(); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 799; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

      /* "pyrobuf_list.pyx":798
 *             new_size = max(new_len, 2 * self._size)
 *             mem = <char *>PyMem_Realloc(self._data, new_size * sizeof(char))
 *             if not mem:             # <<<<<<<<<<<<<<
 *                 raise MemoryError()
 * 
 */
    }

    /* "pyrobuf_list.pyx":801
 *                 raise MemoryError()
 * 
 *             self._data = mem             # <<<<<<<<<<<<<<
 *             self._size = new_size
 * 
 */
    __pyx_v_self->_data = __pyx_v_mem;

    /* "pyrobuf_list.pyx":802
 * 
 *             self._data = mem
 *             self._size = new_size             # <<<<<<<<<<<<<<
 * 
 *         for i in range(len(x)):
 */
    __pyx_v_self->_size = __pyx_v_new_size;

    /* "pyrobuf_list.pyx":795
 *         cdef int i
 * 
 *         if new_len > self._size:             # <<<<<<<<<<<<<<
 *             new_size = max(new_len, 2 * self._size)
 *             mem = <char *>PyMem_Realloc(self._data, new_size * sizeof(char))
 */
  }

  /* "pyrobuf_list.pyx":804
 *             self._size = new_size
 * 
 *         for i in range(len(x)):             # <<<<<<<<<<<<<<
 *             self._data[self._n_items + i] = x[i]
 * 
 */
  __pyx_t_6 = PyObject_Length(((PyObject *)__pyx_v_x)); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 804; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_6; __pyx_t_11+=1) {
    __pyx_v_i = __pyx_t_11;

    /* "pyrobuf_list.pyx":805
 * 
 *         for i in range(len(x)):
 *             self._data[self._n_items + i] = x[i]             # <<<<<<<<<<<<<<
 * 
 *         if new_len != self._n_items:
 */
    __pyx_t_1 = __Pyx_GetItemInt(((PyObject *)__pyx_v_x), __pyx_v_i, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 805; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_12 = __Pyx_PyInt_As_char(__pyx_t_1); if (unlikely((__pyx_t_12 == (char)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 805; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    (__pyx_v_self->_data[(__pyx_v_self->_n_items + __pyx_v_i)]) = __pyx_t_12;
  }

  /* "pyrobuf_list.pyx":807
 *             self._data[self._n_items + i] = x[i]
 * 
 *         if new_len != self._n_items:             # <<<<<<<<<<<<<<
 *             listener = <object>self._listener
 *             if not listener._is_present_in_parent:
 */
  __pyx_t_7 = ((__pyx_v_new_len != __pyx_v_self->_n_items) != 0);
  if (__pyx_t_7) {

    /* "pyrobuf_list.pyx":808
 * 
 *         if new_len != self._n_items:
 *             listener = <object>self._listener             # <<<<<<<<<<<<<<
 *             if not listener._is_present_in_parent:
 *                 listener._Modified()
 */
    __pyx_t_1 = ((PyObject *)__pyx_v_self->_listener);
    __Pyx_INCREF(__pyx_t_1);
    __pyx_v_listener = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "pyrobuf_list.pyx":809
 *         if new_len != self._n_items:
 *             listener = <object>self._listener
 *             if not listener._is_present_in_parent:             # <<<<<<<<<<<<<<
 *                 listener._Modified()
 *         self._n_items = new_len
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_listener, __pyx_n_s_is_present_in_parent); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 809; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 809; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_13 = ((!__pyx_t_7) != 0);
    if (__pyx_t_13) {

      /* "pyrobuf_list.pyx":810
 *             listener = <object>self._listener
 *             if not listener._is_present_in_parent:
 *                 listener._Modified()             # <<<<<<<<<<<<<<
 *         self._n_items = new_len
 * 
 */
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_listener, __pyx_n_s_Modified); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 810; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = NULL;
      if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
        __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
        if (likely(__pyx_t_3)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_2, function);
        }
      }
      if (__pyx_t_3) {
        __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 810; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      } else {
        __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 810; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "pyrobuf_list.pyx":809
 *         if new_len != self._n_items:
 *             listener = <object>self._listener
 *             if not listener._is_present_in_parent:             # <<<<<<<<<<<<<<
 *                 listener._Modified()
 *         self._n_items = new_len
 */
    }

    /* "pyrobuf_list.pyx":807
 *             self._data[self._n_items + i] = x[i]
 * 
 *         if new_len != self._n_items:             # <<<<<<<<<<<<<<
 *             listener = <object>self._listener
 *             if not listener._is_present_in_parent:
 */
  }

  /* "pyrobuf_list.pyx":811
 *             if not listener._is_present_in_parent:
 *                 listener._Modified()
 *         self._n_items = new_len             # <<<<<<<<<<<<<<
 * 
 *     cpdef insert(self, int i, char x):
 */
  __pyx_v_self->_n_items = __pyx_v_new_len;

  /* "pyrobuf_list.pyx":789
 *             listener._Modified()
 * 
 *     cpdef extend(self, CharList x):             # <<<<<<<<<<<<<<
 *         cdef char *mem
 *         cdef size_t new_len = self._n_items + len(x)
 */

  /* function exit code */
  __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_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pyrobuf_list.CharList.extend", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_listener);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrobuf_list_8CharList_28extend(PyObject *__pyx_v_self, PyObject *__pyx_v_x); /*proto*/
static PyObject *__pyx_pw_12pyrobuf_list_8CharList_28extend(PyObject *__pyx_v_self, PyObject *__pyx_v_x) {
  CYTHON_UNUSED int __pyx_lineno = 0;
  CYTHON_UNUSED const char *__pyx_filename = NULL;
  CYTHON_UNUSED int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("extend (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_x), __pyx_ptype_12pyrobuf_list_CharList, 1, "x", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 789; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_12pyrobuf_list_8CharList_27extend(((struct __pyx_obj_12pyrobuf_list_CharList *)__pyx_v_self), ((struct __pyx_obj_12pyrobuf_list_CharList *)__pyx_v_x));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_12pyrobuf_list_8CharList_27extend(struct __pyx_obj_12pyrobuf_list_CharList *__pyx_v_self, struct __pyx_obj_12pyrobuf_list_CharList *__pyx_v_x) {
  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", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_12pyrobuf_list_8CharList_extend(__pyx_v_self, __pyx_v_x, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 789; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyrobuf_list.CharList.extend", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrobuf_list.pyx":813
 *         self._n_items = new_len
 * 
 *     cpdef insert(self, int i, char x):             # <<<<<<<<<<<<<<
 *         cdef char *mem
 *         cdef size_t j
 */

static PyObject *__pyx_pw_12pyrobuf_list_8CharList_30insert(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_12pyrobuf_list_8CharList_insert(struct __pyx_obj_12pyrobuf_list_CharList *__pyx_v_self, int __pyx_v_i, char __pyx_v_x, int __pyx_skip_dispatch) {
  char *__pyx_v_mem;
  size_t __pyx_v_j;
  PyObject *__pyx_v_listener = NULL;
  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;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  Py_ssize_t __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  int __pyx_t_10;
  size_t __pyx_t_11;
  size_t __pyx_t_12;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("insert", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_insert); 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);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_12pyrobuf_list_8CharList_30insert)) {
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_i); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 813; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = __Pyx_PyInt_From_char(__pyx_v_x); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 813; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_5 = __pyx_t_1; __pyx_t_6 = NULL;
      __pyx_t_7 = 0;
      if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_5))) {
        __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
        if (likely(__pyx_t_6)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
          __Pyx_INCREF(__pyx_t_6);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_5, function);
          __pyx_t_7 = 1;
        }
      }
      __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 813; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_8);
      if (__pyx_t_6) {
        __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL;
      }
      __Pyx_GIVEREF(__pyx_t_3);
      PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_t_3);
      __Pyx_GIVEREF(__pyx_t_4);
      PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_t_4);
      __pyx_t_3 = 0;
      __pyx_t_4 = 0;
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 813; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 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;
  }

  /* "pyrobuf_list.pyx":817
 *         cdef size_t j
 * 
 *         if i < 0:             # <<<<<<<<<<<<<<
 *             i += <int>self._n_items
 * 
 */
  __pyx_t_9 = ((__pyx_v_i < 0) != 0);
  if (__pyx_t_9) {

    /* "pyrobuf_list.pyx":818
 * 
 *         if i < 0:
 *             i += <int>self._n_items             # <<<<<<<<<<<<<<
 * 
 *         if i < 0 or <size_t>i > self._n_items:
 */
    __pyx_v_i = (__pyx_v_i + ((int)__pyx_v_self->_n_items));

    /* "pyrobuf_list.pyx":817
 *         cdef size_t j
 * 
 *         if i < 0:             # <<<<<<<<<<<<<<
 *             i += <int>self._n_items
 * 
 */
  }

  /* "pyrobuf_list.pyx":820
 *             i += <int>self._n_items
 * 
 *         if i < 0 or <size_t>i > self._n_items:             # <<<<<<<<<<<<<<
 *             raise IndexError("list index out of range")
 * 
 */
  __pyx_t_10 = ((__pyx_v_i < 0) != 0);
  if (!__pyx_t_10) {
  } else {
    __pyx_t_9 = __pyx_t_10;
    goto __pyx_L5_bool_binop_done;
  }
  __pyx_t_10 = ((((size_t)__pyx_v_i) > __pyx_v_self->_n_items) != 0);
  __pyx_t_9 = __pyx_t_10;
  __pyx_L5_bool_binop_done:;
  if (__pyx_t_9) {

    /* "pyrobuf_list.pyx":821
 * 
 *         if i < 0 or <size_t>i > self._n_items:
 *             raise IndexError("list index out of range")             # <<<<<<<<<<<<<<
 * 
 *         if self._n_items == self._size:
 */
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_IndexError, __pyx_tuple__27, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 821; __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 = 821; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

    /* "pyrobuf_list.pyx":820
 *             i += <int>self._n_items
 * 
 *         if i < 0 or <size_t>i > self._n_items:             # <<<<<<<<<<<<<<
 *             raise IndexError("list index out of range")
 * 
 */
  }

  /* "pyrobuf_list.pyx":823
 *             raise IndexError("list index out of range")
 * 
 *         if self._n_items == self._size:             # <<<<<<<<<<<<<<
 *             mem = <char *>PyMem_Realloc(self._data, 2 * self._size * sizeof(char))
 *             if not mem:
 */
  __pyx_t_9 = ((__pyx_v_self->_n_items == __pyx_v_self->_size) != 0);
  if (__pyx_t_9) {

    /* "pyrobuf_list.pyx":824
 * 
 *         if self._n_items == self._size:
 *             mem = <char *>PyMem_Realloc(self._data, 2 * self._size * sizeof(char))             # <<<<<<<<<<<<<<
 *             if not mem:
 *                 raise MemoryError()
 */
    __pyx_v_mem = ((char *)PyMem_Realloc(__pyx_v_self->_data, ((2 * __pyx_v_self->_size) * (sizeof(char)))));

    /* "pyrobuf_list.pyx":825
 *         if self._n_items == self._size:
 *             mem = <char *>PyMem_Realloc(self._data, 2 * self._size * sizeof(char))
 *             if not mem:             # <<<<<<<<<<<<<<
 *                 raise MemoryError()
 * 
 */
    __pyx_t_9 = ((!(__pyx_v_mem != 0)) != 0);
    if (__pyx_t_9) {

      /* "pyrobuf_list.pyx":826
 *             mem = <char *>PyMem_Realloc(self._data, 2 * self._size * sizeof(char))
 *             if not mem:
 *                 raise MemoryError()             # <<<<<<<<<<<<<<
 * 
 *             self._data = mem
 */
      PyErr_NoMemory(); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 826; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

      /* "pyrobuf_list.pyx":825
 *         if self._n_items == self._size:
 *             mem = <char *>PyMem_Realloc(self._data, 2 * self._size * sizeof(char))
 *             if not mem:             # <<<<<<<<<<<<<<
 *                 raise MemoryError()
 * 
 */
    }

    /* "pyrobuf_list.pyx":828
 *                 raise MemoryError()
 * 
 *             self._data = mem             # <<<<<<<<<<<<<<
 *             self._size *= 2
 * 
 */
    __pyx_v_self->_data = __pyx_v_mem;

    /* "pyrobuf_list.pyx":829
 * 
 *             self._data = mem
 *             self._size *= 2             # <<<<<<<<<<<<<<
 * 
 *         for j in range(self._n_items, <size_t>i, -1):
 */
    __pyx_v_self->_size = (__pyx_v_self->_size * 2);

    /* "pyrobuf_list.pyx":823
 *             raise IndexError("list index out of range")
 * 
 *         if self._n_items == self._size:             # <<<<<<<<<<<<<<
 *             mem = <char *>PyMem_Realloc(self._data, 2 * self._size * sizeof(char))
 *             if not mem:
 */
  }

  /* "pyrobuf_list.pyx":831
 *             self._size *= 2
 * 
 *         for j in range(self._n_items, <size_t>i, -1):             # <<<<<<<<<<<<<<
 *             self._data[j] = self._data[j - 1]
 * 
 */
  __pyx_t_11 = ((size_t)__pyx_v_i);
  for (__pyx_t_12 = __pyx_v_self->_n_items + 1; __pyx_t_12 > __pyx_t_11 + 1; ) { __pyx_t_12-=1;
    __pyx_v_j = __pyx_t_12;

    /* "pyrobuf_list.pyx":832
 * 
 *         for j in range(self._n_items, <size_t>i, -1):
 *             self._data[j] = self._data[j - 1]             # <<<<<<<<<<<<<<
 * 
 *         self._data[i] = x
 */
    (__pyx_v_self->_data[__pyx_v_j]) = (__pyx_v_self->_data[(__pyx_v_j - 1)]);
  }

  /* "pyrobuf_list.pyx":834
 *             self._data[j] = self._data[j - 1]
 * 
 *         self._data[i] = x             # <<<<<<<<<<<<<<
 *         self._n_items += 1
 *         listener = <object>self._listener
 */
  (__pyx_v_self->_data[__pyx_v_i]) = __pyx_v_x;

  /* "pyrobuf_list.pyx":835
 * 
 *         self._data[i] = x
 *         self._n_items += 1             # <<<<<<<<<<<<<<
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:
 */
  __pyx_v_self->_n_items = (__pyx_v_self->_n_items + 1);

  /* "pyrobuf_list.pyx":836
 *         self._data[i] = x
 *         self._n_items += 1
 *         listener = <object>self._listener             # <<<<<<<<<<<<<<
 *         if not listener._is_present_in_parent:
 *             listener._Modified()
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_self->_listener);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_v_listener = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pyrobuf_list.pyx":837
 *         self._n_items += 1
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:             # <<<<<<<<<<<<<<
 *             listener._Modified()
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_listener, __pyx_n_s_is_present_in_parent); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 837; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 837; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_10 = ((!__pyx_t_9) != 0);
  if (__pyx_t_10) {

    /* "pyrobuf_list.pyx":838
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:
 *             listener._Modified()             # <<<<<<<<<<<<<<
 * 
 *     cpdef pop(self):
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_listener, __pyx_n_s_Modified); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 838; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_5 = NULL;
    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    if (__pyx_t_5) {
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_5); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 838; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    } else {
      __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 838; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "pyrobuf_list.pyx":837
 *         self._n_items += 1
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:             # <<<<<<<<<<<<<<
 *             listener._Modified()
 * 
 */
  }

  /* "pyrobuf_list.pyx":813
 *         self._n_items = new_len
 * 
 *     cpdef insert(self, int i, char x):             # <<<<<<<<<<<<<<
 *         cdef char *mem
 *         cdef size_t j
 */

  /* function exit code */
  __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_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("pyrobuf_list.CharList.insert", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_listener);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrobuf_list_8CharList_30insert(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_12pyrobuf_list_8CharList_30insert(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_v_i;
  char __pyx_v_x;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("insert (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_i,&__pyx_n_s_x,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_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 (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_x)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("insert", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 813; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "insert") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 813; __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_i = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_i == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 813; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    __pyx_v_x = __Pyx_PyInt_As_char(values[1]); if (unlikely((__pyx_v_x == (char)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 813; __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 = 813; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyrobuf_list.CharList.insert", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_12pyrobuf_list_8CharList_29insert(((struct __pyx_obj_12pyrobuf_list_CharList *)__pyx_v_self), __pyx_v_i, __pyx_v_x);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_12pyrobuf_list_8CharList_29insert(struct __pyx_obj_12pyrobuf_list_CharList *__pyx_v_self, int __pyx_v_i, char __pyx_v_x) {
  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("insert", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_12pyrobuf_list_8CharList_insert(__pyx_v_self, __pyx_v_i, __pyx_v_x, 1); 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_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyrobuf_list.CharList.insert", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrobuf_list.pyx":840
 *             listener._Modified()
 * 
 *     cpdef pop(self):             # <<<<<<<<<<<<<<
 *         if self._n_items == 0:
 *             raise IndexError("pop from empty list")
 */

static PyObject *__pyx_pw_12pyrobuf_list_8CharList_32pop(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_f_12pyrobuf_list_8CharList_pop(struct __pyx_obj_12pyrobuf_list_CharList *__pyx_v_self, int __pyx_skip_dispatch) {
  PyObject *__pyx_v_listener = NULL;
  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;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("pop", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_pop); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 840; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_12pyrobuf_list_8CharList_32pop)) {
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
      if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_4)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
        }
      }
      if (__pyx_t_4) {
        __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 840; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else {
        __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 840; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__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;
  }

  /* "pyrobuf_list.pyx":841
 * 
 *     cpdef pop(self):
 *         if self._n_items == 0:             # <<<<<<<<<<<<<<
 *             raise IndexError("pop from empty list")
 * 
 */
  __pyx_t_5 = ((__pyx_v_self->_n_items == 0) != 0);
  if (__pyx_t_5) {

    /* "pyrobuf_list.pyx":842
 *     cpdef pop(self):
 *         if self._n_items == 0:
 *             raise IndexError("pop from empty list")             # <<<<<<<<<<<<<<
 * 
 *         self._n_items -= 1
 */
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_IndexError, __pyx_tuple__28, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 842; __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 = 842; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

    /* "pyrobuf_list.pyx":841
 * 
 *     cpdef pop(self):
 *         if self._n_items == 0:             # <<<<<<<<<<<<<<
 *             raise IndexError("pop from empty list")
 * 
 */
  }

  /* "pyrobuf_list.pyx":844
 *             raise IndexError("pop from empty list")
 * 
 *         self._n_items -= 1             # <<<<<<<<<<<<<<
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:
 */
  __pyx_v_self->_n_items = (__pyx_v_self->_n_items - 1);

  /* "pyrobuf_list.pyx":845
 * 
 *         self._n_items -= 1
 *         listener = <object>self._listener             # <<<<<<<<<<<<<<
 *         if not listener._is_present_in_parent:
 *             listener._Modified()
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_self->_listener);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_v_listener = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pyrobuf_list.pyx":846
 *         self._n_items -= 1
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:             # <<<<<<<<<<<<<<
 *             listener._Modified()
 *         return self._data[self._n_items]
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_listener, __pyx_n_s_is_present_in_parent); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 846; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 846; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_6 = ((!__pyx_t_5) != 0);
  if (__pyx_t_6) {

    /* "pyrobuf_list.pyx":847
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:
 *             listener._Modified()             # <<<<<<<<<<<<<<
 *         return self._data[self._n_items]
 * 
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_listener, __pyx_n_s_Modified); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 847; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = NULL;
    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    if (__pyx_t_3) {
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 847; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    } else {
      __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 847; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "pyrobuf_list.pyx":846
 *         self._n_items -= 1
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:             # <<<<<<<<<<<<<<
 *             listener._Modified()
 *         return self._data[self._n_items]
 */
  }

  /* "pyrobuf_list.pyx":848
 *         if not listener._is_present_in_parent:
 *             listener._Modified()
 *         return self._data[self._n_items]             # <<<<<<<<<<<<<<
 * 
 *     cpdef remove(self, char x):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_char((__pyx_v_self->_data[__pyx_v_self->_n_items])); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 848; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyrobuf_list.pyx":840
 *             listener._Modified()
 * 
 *     cpdef pop(self):             # <<<<<<<<<<<<<<
 *         if self._n_items == 0:
 *             raise IndexError("pop from empty list")
 */

  /* function exit code */
  __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("pyrobuf_list.CharList.pop", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_listener);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrobuf_list_8CharList_32pop(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_12pyrobuf_list_8CharList_32pop(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("pop (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrobuf_list_8CharList_31pop(((struct __pyx_obj_12pyrobuf_list_CharList *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_12pyrobuf_list_8CharList_31pop(struct __pyx_obj_12pyrobuf_list_CharList *__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("pop", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_12pyrobuf_list_8CharList_pop(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 840; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyrobuf_list.CharList.pop", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrobuf_list.pyx":850
 *         return self._data[self._n_items]
 * 
 *     cpdef remove(self, char x):             # <<<<<<<<<<<<<<
 *         cdef size_t i
 *         cdef size_t j
 */

static PyObject *__pyx_pw_12pyrobuf_list_8CharList_34remove(PyObject *__pyx_v_self, PyObject *__pyx_arg_x); /*proto*/
static PyObject *__pyx_f_12pyrobuf_list_8CharList_remove(struct __pyx_obj_12pyrobuf_list_CharList *__pyx_v_self, char __pyx_v_x, int __pyx_skip_dispatch) {
  size_t __pyx_v_i;
  size_t __pyx_v_j;
  int __pyx_v_found;
  PyObject *__pyx_v_listener = NULL;
  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;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  size_t __pyx_t_7;
  size_t __pyx_t_8;
  int __pyx_t_9;
  int __pyx_t_10;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("remove", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_remove); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 850; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_12pyrobuf_list_8CharList_34remove)) {
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_3 = __Pyx_PyInt_From_char(__pyx_v_x); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 850; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_4 = __pyx_t_1; __pyx_t_5 = NULL;
      if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_4))) {
        __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
        if (likely(__pyx_t_5)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_5);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_4, function);
        }
      }
      if (!__pyx_t_5) {
        __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 850; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_GOTREF(__pyx_t_2);
      } else {
        __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 850; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL;
        __Pyx_GIVEREF(__pyx_t_3);
        PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_3);
        __pyx_t_3 = 0;
        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 850; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 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;
  }

  /* "pyrobuf_list.pyx":853
 *         cdef size_t i
 *         cdef size_t j
 *         cdef bint found = 0             # <<<<<<<<<<<<<<
 * 
 *         for i in range(self._n_items):
 */
  __pyx_v_found = 0;

  /* "pyrobuf_list.pyx":855
 *         cdef bint found = 0
 * 
 *         for i in range(self._n_items):             # <<<<<<<<<<<<<<
 *             if self._data[i] == x:
 *                 found = 1
 */
  __pyx_t_7 = __pyx_v_self->_n_items;
  for (__pyx_t_8 = 0; __pyx_t_8 < __pyx_t_7; __pyx_t_8+=1) {
    __pyx_v_i = __pyx_t_8;

    /* "pyrobuf_list.pyx":856
 * 
 *         for i in range(self._n_items):
 *             if self._data[i] == x:             # <<<<<<<<<<<<<<
 *                 found = 1
 *                 break
 */
    __pyx_t_9 = (((__pyx_v_self->_data[__pyx_v_i]) == __pyx_v_x) != 0);
    if (__pyx_t_9) {

      /* "pyrobuf_list.pyx":857
 *         for i in range(self._n_items):
 *             if self._data[i] == x:
 *                 found = 1             # <<<<<<<<<<<<<<
 *                 break
 * 
 */
      __pyx_v_found = 1;

      /* "pyrobuf_list.pyx":858
 *             if self._data[i] == x:
 *                 found = 1
 *                 break             # <<<<<<<<<<<<<<
 * 
 *         if found == 0:
 */
      goto __pyx_L4_break;

      /* "pyrobuf_list.pyx":856
 * 
 *         for i in range(self._n_items):
 *             if self._data[i] == x:             # <<<<<<<<<<<<<<
 *                 found = 1
 *                 break
 */
    }
  }
  __pyx_L4_break:;

  /* "pyrobuf_list.pyx":860
 *                 break
 * 
 *         if found == 0:             # <<<<<<<<<<<<<<
 *             raise ValueError("x not in list")
 * 
 */
  __pyx_t_9 = ((__pyx_v_found == 0) != 0);
  if (__pyx_t_9) {

    /* "pyrobuf_list.pyx":861
 * 
 *         if found == 0:
 *             raise ValueError("x not in list")             # <<<<<<<<<<<<<<
 * 
 *         for j in range(i, self._n_items):
 */
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__29, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 861; __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 = 861; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

    /* "pyrobuf_list.pyx":860
 *                 break
 * 
 *         if found == 0:             # <<<<<<<<<<<<<<
 *             raise ValueError("x not in list")
 * 
 */
  }

  /* "pyrobuf_list.pyx":863
 *             raise ValueError("x not in list")
 * 
 *         for j in range(i, self._n_items):             # <<<<<<<<<<<<<<
 *             self._data[j] = self._data[j + 1]
 * 
 */
  __pyx_t_7 = __pyx_v_self->_n_items;
  for (__pyx_t_8 = __pyx_v_i; __pyx_t_8 < __pyx_t_7; __pyx_t_8+=1) {
    __pyx_v_j = __pyx_t_8;

    /* "pyrobuf_list.pyx":864
 * 
 *         for j in range(i, self._n_items):
 *             self._data[j] = self._data[j + 1]             # <<<<<<<<<<<<<<
 * 
 *         self._n_items -= 1
 */
    (__pyx_v_self->_data[__pyx_v_j]) = (__pyx_v_self->_data[(__pyx_v_j + 1)]);
  }

  /* "pyrobuf_list.pyx":866
 *             self._data[j] = self._data[j + 1]
 * 
 *         self._n_items -= 1             # <<<<<<<<<<<<<<
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:
 */
  __pyx_v_self->_n_items = (__pyx_v_self->_n_items - 1);

  /* "pyrobuf_list.pyx":867
 * 
 *         self._n_items -= 1
 *         listener = <object>self._listener             # <<<<<<<<<<<<<<
 *         if not listener._is_present_in_parent:
 *             listener._Modified()
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_self->_listener);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_v_listener = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pyrobuf_list.pyx":868
 *         self._n_items -= 1
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:             # <<<<<<<<<<<<<<
 *             listener._Modified()
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_listener, __pyx_n_s_is_present_in_parent); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 868; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 868; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_10 = ((!__pyx_t_9) != 0);
  if (__pyx_t_10) {

    /* "pyrobuf_list.pyx":869
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:
 *             listener._Modified()             # <<<<<<<<<<<<<<
 * 
 *     cdef void _append(self, char x):
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_listener, __pyx_n_s_Modified); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 869; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = NULL;
    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    if (__pyx_t_4) {
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 869; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    } else {
      __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 869; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "pyrobuf_list.pyx":868
 *         self._n_items -= 1
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:             # <<<<<<<<<<<<<<
 *             listener._Modified()
 * 
 */
  }

  /* "pyrobuf_list.pyx":850
 *         return self._data[self._n_items]
 * 
 *     cpdef remove(self, char x):             # <<<<<<<<<<<<<<
 *         cdef size_t i
 *         cdef size_t j
 */

  /* function exit code */
  __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_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("pyrobuf_list.CharList.remove", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_listener);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrobuf_list_8CharList_34remove(PyObject *__pyx_v_self, PyObject *__pyx_arg_x); /*proto*/
static PyObject *__pyx_pw_12pyrobuf_list_8CharList_34remove(PyObject *__pyx_v_self, PyObject *__pyx_arg_x) {
  char __pyx_v_x;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("remove (wrapper)", 0);
  assert(__pyx_arg_x); {
    __pyx_v_x = __Pyx_PyInt_As_char(__pyx_arg_x); if (unlikely((__pyx_v_x == (char)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 850; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyrobuf_list.CharList.remove", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_12pyrobuf_list_8CharList_33remove(((struct __pyx_obj_12pyrobuf_list_CharList *)__pyx_v_self), ((char)__pyx_v_x));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_12pyrobuf_list_8CharList_33remove(struct __pyx_obj_12pyrobuf_list_CharList *__pyx_v_self, char __pyx_v_x) {
  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", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_12pyrobuf_list_8CharList_remove(__pyx_v_self, __pyx_v_x, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 850; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyrobuf_list.CharList.remove", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrobuf_list.pyx":871
 *             listener._Modified()
 * 
 *     cdef void _append(self, char x):             # <<<<<<<<<<<<<<
 *         cdef char *mem
 * 
 */

static void __pyx_f_12pyrobuf_list_8CharList__append(struct __pyx_obj_12pyrobuf_list_CharList *__pyx_v_self, char __pyx_v_x) {
  char *__pyx_v_mem;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_append", 0);

  /* "pyrobuf_list.pyx":874
 *         cdef char *mem
 * 
 *         if self._n_items == self._size:             # <<<<<<<<<<<<<<
 *             mem = <char *>PyMem_Realloc(self._data, 2 * self._size * sizeof(char))
 *             if not mem:
 */
  __pyx_t_1 = ((__pyx_v_self->_n_items == __pyx_v_self->_size) != 0);
  if (__pyx_t_1) {

    /* "pyrobuf_list.pyx":875
 * 
 *         if self._n_items == self._size:
 *             mem = <char *>PyMem_Realloc(self._data, 2 * self._size * sizeof(char))             # <<<<<<<<<<<<<<
 *             if not mem:
 *                 raise MemoryError()
 */
    __pyx_v_mem = ((char *)PyMem_Realloc(__pyx_v_self->_data, ((2 * __pyx_v_self->_size) * (sizeof(char)))));

    /* "pyrobuf_list.pyx":876
 *         if self._n_items == self._size:
 *             mem = <char *>PyMem_Realloc(self._data, 2 * self._size * sizeof(char))
 *             if not mem:             # <<<<<<<<<<<<<<
 *                 raise MemoryError()
 * 
 */
    __pyx_t_1 = ((!(__pyx_v_mem != 0)) != 0);
    if (__pyx_t_1) {

      /* "pyrobuf_list.pyx":877
 *             mem = <char *>PyMem_Realloc(self._data, 2 * self._size * sizeof(char))
 *             if not mem:
 *                 raise MemoryError()             # <<<<<<<<<<<<<<
 * 
 *             self._data = mem
 */
      PyErr_NoMemory(); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 877; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

      /* "pyrobuf_list.pyx":876
 *         if self._n_items == self._size:
 *             mem = <char *>PyMem_Realloc(self._data, 2 * self._size * sizeof(char))
 *             if not mem:             # <<<<<<<<<<<<<<
 *                 raise MemoryError()
 * 
 */
    }

    /* "pyrobuf_list.pyx":879
 *                 raise MemoryError()
 * 
 *             self._data = mem             # <<<<<<<<<<<<<<
 *             self._size *= 2
 * 
 */
    __pyx_v_self->_data = __pyx_v_mem;

    /* "pyrobuf_list.pyx":880
 * 
 *             self._data = mem
 *             self._size *= 2             # <<<<<<<<<<<<<<
 * 
 *         self._data[self._n_items] = x
 */
    __pyx_v_self->_size = (__pyx_v_self->_size * 2);

    /* "pyrobuf_list.pyx":874
 *         cdef char *mem
 * 
 *         if self._n_items == self._size:             # <<<<<<<<<<<<<<
 *             mem = <char *>PyMem_Realloc(self._data, 2 * self._size * sizeof(char))
 *             if not mem:
 */
  }

  /* "pyrobuf_list.pyx":882
 *             self._size *= 2
 * 
 *         self._data[self._n_items] = x             # <<<<<<<<<<<<<<
 *         self._n_items += 1
 * 
 */
  (__pyx_v_self->_data[__pyx_v_self->_n_items]) = __pyx_v_x;

  /* "pyrobuf_list.pyx":883
 * 
 *         self._data[self._n_items] = x
 *         self._n_items += 1             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_v_self->_n_items = (__pyx_v_self->_n_items + 1);

  /* "pyrobuf_list.pyx":871
 *             listener._Modified()
 * 
 *     cdef void _append(self, char x):             # <<<<<<<<<<<<<<
 *         cdef char *mem
 * 
 */

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_WriteUnraisable("pyrobuf_list.CharList._append", __pyx_clineno, __pyx_lineno, __pyx_filename, 0, 0);
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
}

/* "pyrobuf_list.pyx":889
 * cdef class Int32List:
 * 
 *     def __cinit__(self, size_t size=16, object listener=None):             # <<<<<<<<<<<<<<
 *         self._data = <int32_t *>PyMem_Malloc(size * sizeof(int32_t))
 *         if not self._data:
 */

/* Python wrapper */
static int __pyx_pw_12pyrobuf_list_9Int32List_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_12pyrobuf_list_9Int32List_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  size_t __pyx_v_size;
  PyObject *__pyx_v_listener = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_size,&__pyx_n_s_listener,0};
    PyObject* values[2] = {0,0};
    values[1] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_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 (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_size);
          if (value) { values[0] = value; kw_args--; }
        }
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_listener);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 889; __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;
      }
    }
    if (values[0]) {
      __pyx_v_size = __Pyx_PyInt_As_size_t(values[0]); if (unlikely((__pyx_v_size == (size_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 889; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    } else {
      __pyx_v_size = ((size_t)16);
    }
    __pyx_v_listener = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 889; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyrobuf_list.Int32List.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_12pyrobuf_list_9Int32List___cinit__(((struct __pyx_obj_12pyrobuf_list_Int32List *)__pyx_v_self), __pyx_v_size, __pyx_v_listener);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_12pyrobuf_list_9Int32List___cinit__(struct __pyx_obj_12pyrobuf_list_Int32List *__pyx_v_self, size_t __pyx_v_size, PyObject *__pyx_v_listener) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);

  /* "pyrobuf_list.pyx":890
 * 
 *     def __cinit__(self, size_t size=16, object listener=None):
 *         self._data = <int32_t *>PyMem_Malloc(size * sizeof(int32_t))             # <<<<<<<<<<<<<<
 *         if not self._data:
 *             raise MemoryError()
 */
  __pyx_v_self->_data = ((int32_t *)PyMem_Malloc((__pyx_v_size * (sizeof(int32_t)))));

  /* "pyrobuf_list.pyx":891
 *     def __cinit__(self, size_t size=16, object listener=None):
 *         self._data = <int32_t *>PyMem_Malloc(size * sizeof(int32_t))
 *         if not self._data:             # <<<<<<<<<<<<<<
 *             raise MemoryError()
 * 
 */
  __pyx_t_1 = ((!(__pyx_v_self->_data != 0)) != 0);
  if (__pyx_t_1) {

    /* "pyrobuf_list.pyx":892
 *         self._data = <int32_t *>PyMem_Malloc(size * sizeof(int32_t))
 *         if not self._data:
 *             raise MemoryError()             # <<<<<<<<<<<<<<
 * 
 *         self._n_items = 0
 */
    PyErr_NoMemory(); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 892; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

    /* "pyrobuf_list.pyx":891
 *     def __cinit__(self, size_t size=16, object listener=None):
 *         self._data = <int32_t *>PyMem_Malloc(size * sizeof(int32_t))
 *         if not self._data:             # <<<<<<<<<<<<<<
 *             raise MemoryError()
 * 
 */
  }

  /* "pyrobuf_list.pyx":894
 *             raise MemoryError()
 * 
 *         self._n_items = 0             # <<<<<<<<<<<<<<
 *         self._size = size
 *         if listener is None:
 */
  __pyx_v_self->_n_items = 0;

  /* "pyrobuf_list.pyx":895
 * 
 *         self._n_items = 0
 *         self._size = size             # <<<<<<<<<<<<<<
 *         if listener is None:
 *             self._listener = <PyObject *>null_listener
 */
  __pyx_v_self->_size = __pyx_v_size;

  /* "pyrobuf_list.pyx":896
 *         self._n_items = 0
 *         self._size = size
 *         if listener is None:             # <<<<<<<<<<<<<<
 *             self._listener = <PyObject *>null_listener
 *         else:
 */
  __pyx_t_1 = (__pyx_v_listener == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "pyrobuf_list.pyx":897
 *         self._size = size
 *         if listener is None:
 *             self._listener = <PyObject *>null_listener             # <<<<<<<<<<<<<<
 *         else:
 *             self._listener = <PyObject *>listener
 */
    __pyx_v_self->_listener = ((PyObject *)null_listener);

    /* "pyrobuf_list.pyx":896
 *         self._n_items = 0
 *         self._size = size
 *         if listener is None:             # <<<<<<<<<<<<<<
 *             self._listener = <PyObject *>null_listener
 *         else:
 */
    goto __pyx_L4;
  }

  /* "pyrobuf_list.pyx":899
 *             self._listener = <PyObject *>null_listener
 *         else:
 *             self._listener = <PyObject *>listener             # <<<<<<<<<<<<<<
 * 
 *     def __dealloc__(self):
 */
  /*else*/ {
    __pyx_v_self->_listener = ((PyObject *)__pyx_v_listener);
  }
  __pyx_L4:;

  /* "pyrobuf_list.pyx":889
 * cdef class Int32List:
 * 
 *     def __cinit__(self, size_t size=16, object listener=None):             # <<<<<<<<<<<<<<
 *         self._data = <int32_t *>PyMem_Malloc(size * sizeof(int32_t))
 *         if not self._data:
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyrobuf_list.Int32List.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrobuf_list.pyx":901
 *             self._listener = <PyObject *>listener
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         PyMem_Free(self._data)
 * 
 */

/* Python wrapper */
static void __pyx_pw_12pyrobuf_list_9Int32List_3__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_12pyrobuf_list_9Int32List_3__dealloc__(PyObject *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_pf_12pyrobuf_list_9Int32List_2__dealloc__(((struct __pyx_obj_12pyrobuf_list_Int32List *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

static void __pyx_pf_12pyrobuf_list_9Int32List_2__dealloc__(struct __pyx_obj_12pyrobuf_list_Int32List *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__", 0);

  /* "pyrobuf_list.pyx":902
 * 
 *     def __dealloc__(self):
 *         PyMem_Free(self._data)             # <<<<<<<<<<<<<<
 * 
 *     def __contains__(self, int32_t x):
 */
  PyMem_Free(__pyx_v_self->_data);

  /* "pyrobuf_list.pyx":901
 *             self._listener = <PyObject *>listener
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         PyMem_Free(self._data)
 * 
 */

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

/* "pyrobuf_list.pyx":904
 *         PyMem_Free(self._data)
 * 
 *     def __contains__(self, int32_t x):             # <<<<<<<<<<<<<<
 *         cdef size_t i
 *         for i in range(self._n_items):
 */

/* Python wrapper */
static int __pyx_pw_12pyrobuf_list_9Int32List_5__contains__(PyObject *__pyx_v_self, PyObject *__pyx_arg_x); /*proto*/
static int __pyx_pw_12pyrobuf_list_9Int32List_5__contains__(PyObject *__pyx_v_self, PyObject *__pyx_arg_x) {
  int32_t __pyx_v_x;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__contains__ (wrapper)", 0);
  assert(__pyx_arg_x); {
    __pyx_v_x = __Pyx_PyInt_As_int32_t(__pyx_arg_x); if (unlikely((__pyx_v_x == (int32_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 904; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyrobuf_list.Int32List.__contains__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_12pyrobuf_list_9Int32List_4__contains__(((struct __pyx_obj_12pyrobuf_list_Int32List *)__pyx_v_self), ((int32_t)__pyx_v_x));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_12pyrobuf_list_9Int32List_4__contains__(struct __pyx_obj_12pyrobuf_list_Int32List *__pyx_v_self, int32_t __pyx_v_x) {
  size_t __pyx_v_i;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  size_t __pyx_t_1;
  size_t __pyx_t_2;
  int __pyx_t_3;
  __Pyx_RefNannySetupContext("__contains__", 0);

  /* "pyrobuf_list.pyx":906
 *     def __contains__(self, int32_t x):
 *         cdef size_t i
 *         for i in range(self._n_items):             # <<<<<<<<<<<<<<
 *             if self._data[i] == x:
 *                 return True
 */
  __pyx_t_1 = __pyx_v_self->_n_items;
  for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
    __pyx_v_i = __pyx_t_2;

    /* "pyrobuf_list.pyx":907
 *         cdef size_t i
 *         for i in range(self._n_items):
 *             if self._data[i] == x:             # <<<<<<<<<<<<<<
 *                 return True
 * 
 */
    __pyx_t_3 = (((__pyx_v_self->_data[__pyx_v_i]) == __pyx_v_x) != 0);
    if (__pyx_t_3) {

      /* "pyrobuf_list.pyx":908
 *         for i in range(self._n_items):
 *             if self._data[i] == x:
 *                 return True             # <<<<<<<<<<<<<<
 * 
 *         return False
 */
      __pyx_r = 1;
      goto __pyx_L0;

      /* "pyrobuf_list.pyx":907
 *         cdef size_t i
 *         for i in range(self._n_items):
 *             if self._data[i] == x:             # <<<<<<<<<<<<<<
 *                 return True
 * 
 */
    }
  }

  /* "pyrobuf_list.pyx":910
 *                 return True
 * 
 *         return False             # <<<<<<<<<<<<<<
 * 
 *     def __delitem__(self, int i):
 */
  __pyx_r = 0;
  goto __pyx_L0;

  /* "pyrobuf_list.pyx":904
 *         PyMem_Free(self._data)
 * 
 *     def __contains__(self, int32_t x):             # <<<<<<<<<<<<<<
 *         cdef size_t i
 *         for i in range(self._n_items):
 */

  /* function exit code */
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrobuf_list.pyx":912
 *         return False
 * 
 *     def __delitem__(self, int i):             # <<<<<<<<<<<<<<
 *         if i < 0:
 *             i += <int>self._n_items
 */

/* Python wrapper */
static int __pyx_pw_12pyrobuf_list_9Int32List_7__delitem__(PyObject *__pyx_v_self, PyObject *__pyx_arg_i); /*proto*/
static int __pyx_pw_12pyrobuf_list_9Int32List_7__delitem__(PyObject *__pyx_v_self, PyObject *__pyx_arg_i) {
  int __pyx_v_i;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__delitem__ (wrapper)", 0);
  assert(__pyx_arg_i); {
    __pyx_v_i = __Pyx_PyInt_As_int(__pyx_arg_i); if (unlikely((__pyx_v_i == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 912; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyrobuf_list.Int32List.__delitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_12pyrobuf_list_9Int32List_6__delitem__(((struct __pyx_obj_12pyrobuf_list_Int32List *)__pyx_v_self), ((int)__pyx_v_i));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_12pyrobuf_list_9Int32List_6__delitem__(struct __pyx_obj_12pyrobuf_list_Int32List *__pyx_v_self, int __pyx_v_i) {
  size_t __pyx_v_j;
  PyObject *__pyx_v_listener = NULL;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  size_t __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;
  __Pyx_RefNannySetupContext("__delitem__", 0);

  /* "pyrobuf_list.pyx":913
 * 
 *     def __delitem__(self, int i):
 *         if i < 0:             # <<<<<<<<<<<<<<
 *             i += <int>self._n_items
 * 
 */
  __pyx_t_1 = ((__pyx_v_i < 0) != 0);
  if (__pyx_t_1) {

    /* "pyrobuf_list.pyx":914
 *     def __delitem__(self, int i):
 *         if i < 0:
 *             i += <int>self._n_items             # <<<<<<<<<<<<<<
 * 
 *         if i < 0 or <size_t>i >= self._n_items:
 */
    __pyx_v_i = (__pyx_v_i + ((int)__pyx_v_self->_n_items));

    /* "pyrobuf_list.pyx":913
 * 
 *     def __delitem__(self, int i):
 *         if i < 0:             # <<<<<<<<<<<<<<
 *             i += <int>self._n_items
 * 
 */
  }

  /* "pyrobuf_list.pyx":916
 *             i += <int>self._n_items
 * 
 *         if i < 0 or <size_t>i >= self._n_items:             # <<<<<<<<<<<<<<
 *             raise IndexError("list index out of range")
 * 
 */
  __pyx_t_2 = ((__pyx_v_i < 0) != 0);
  if (!__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L5_bool_binop_done;
  }
  __pyx_t_2 = ((((size_t)__pyx_v_i) >= __pyx_v_self->_n_items) != 0);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L5_bool_binop_done:;
  if (__pyx_t_1) {

    /* "pyrobuf_list.pyx":917
 * 
 *         if i < 0 or <size_t>i >= self._n_items:
 *             raise IndexError("list index out of range")             # <<<<<<<<<<<<<<
 * 
 *         cdef size_t j
 */
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_IndexError, __pyx_tuple__30, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 917; __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 = 917; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

    /* "pyrobuf_list.pyx":916
 *             i += <int>self._n_items
 * 
 *         if i < 0 or <size_t>i >= self._n_items:             # <<<<<<<<<<<<<<
 *             raise IndexError("list index out of range")
 * 
 */
  }

  /* "pyrobuf_list.pyx":920
 * 
 *         cdef size_t j
 *         for j in range(i, self._n_items):             # <<<<<<<<<<<<<<
 *             self._data[j] = self._data[j + 1]
 * 
 */
  __pyx_t_4 = __pyx_v_self->_n_items;
  for (__pyx_t_5 = __pyx_v_i; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
    __pyx_v_j = __pyx_t_5;

    /* "pyrobuf_list.pyx":921
 *         cdef size_t j
 *         for j in range(i, self._n_items):
 *             self._data[j] = self._data[j + 1]             # <<<<<<<<<<<<<<
 * 
 *         self._n_items -= 1
 */
    (__pyx_v_self->_data[__pyx_v_j]) = (__pyx_v_self->_data[(__pyx_v_j + 1)]);
  }

  /* "pyrobuf_list.pyx":923
 *             self._data[j] = self._data[j + 1]
 * 
 *         self._n_items -= 1             # <<<<<<<<<<<<<<
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:
 */
  __pyx_v_self->_n_items = (__pyx_v_self->_n_items - 1);

  /* "pyrobuf_list.pyx":924
 * 
 *         self._n_items -= 1
 *         listener = <object>self._listener             # <<<<<<<<<<<<<<
 *         if not listener._is_present_in_parent:
 *             listener._Modified()
 */
  __pyx_t_3 = ((PyObject *)__pyx_v_self->_listener);
  __Pyx_INCREF(__pyx_t_3);
  __pyx_v_listener = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "pyrobuf_list.pyx":925
 *         self._n_items -= 1
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:             # <<<<<<<<<<<<<<
 *             listener._Modified()
 * 
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_listener, __pyx_n_s_is_present_in_parent); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 925; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 925; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_2 = ((!__pyx_t_1) != 0);
  if (__pyx_t_2) {

    /* "pyrobuf_list.pyx":926
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:
 *             listener._Modified()             # <<<<<<<<<<<<<<
 * 
 *     def __getitem__(self, int i):
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_listener, __pyx_n_s_Modified); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 926; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = NULL;
    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_6, function);
      }
    }
    if (__pyx_t_7) {
      __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_7); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 926; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    } else {
      __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 926; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "pyrobuf_list.pyx":925
 *         self._n_items -= 1
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:             # <<<<<<<<<<<<<<
 *             listener._Modified()
 * 
 */
  }

  /* "pyrobuf_list.pyx":912
 *         return False
 * 
 *     def __delitem__(self, int i):             # <<<<<<<<<<<<<<
 *         if i < 0:
 *             i += <int>self._n_items
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("pyrobuf_list.Int32List.__delitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_listener);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrobuf_list.pyx":928
 *             listener._Modified()
 * 
 *     def __getitem__(self, int i):             # <<<<<<<<<<<<<<
 *         if i < 0:
 *             i += <int>self._n_items
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrobuf_list_9Int32List_9__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_arg_i); /*proto*/
static PyObject *__pyx_pw_12pyrobuf_list_9Int32List_9__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_arg_i) {
  int __pyx_v_i;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0);
  assert(__pyx_arg_i); {
    __pyx_v_i = __Pyx_PyInt_As_int(__pyx_arg_i); if (unlikely((__pyx_v_i == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 928; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyrobuf_list.Int32List.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_12pyrobuf_list_9Int32List_8__getitem__(((struct __pyx_obj_12pyrobuf_list_Int32List *)__pyx_v_self), ((int)__pyx_v_i));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_12pyrobuf_list_9Int32List_8__getitem__(struct __pyx_obj_12pyrobuf_list_Int32List *__pyx_v_self, int __pyx_v_i) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__getitem__", 0);

  /* "pyrobuf_list.pyx":929
 * 
 *     def __getitem__(self, int i):
 *         if i < 0:             # <<<<<<<<<<<<<<
 *             i += <int>self._n_items
 * 
 */
  __pyx_t_1 = ((__pyx_v_i < 0) != 0);
  if (__pyx_t_1) {

    /* "pyrobuf_list.pyx":930
 *     def __getitem__(self, int i):
 *         if i < 0:
 *             i += <int>self._n_items             # <<<<<<<<<<<<<<
 * 
 *         if i < 0 or <size_t>i >= self._n_items or i < 0:
 */
    __pyx_v_i = (__pyx_v_i + ((int)__pyx_v_self->_n_items));

    /* "pyrobuf_list.pyx":929
 * 
 *     def __getitem__(self, int i):
 *         if i < 0:             # <<<<<<<<<<<<<<
 *             i += <int>self._n_items
 * 
 */
  }

  /* "pyrobuf_list.pyx":932
 *             i += <int>self._n_items
 * 
 *         if i < 0 or <size_t>i >= self._n_items or i < 0:             # <<<<<<<<<<<<<<
 *             raise IndexError("list index out of range")
 * 
 */
  __pyx_t_2 = ((__pyx_v_i < 0) != 0);
  if (!__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L5_bool_binop_done;
  }
  __pyx_t_2 = ((((size_t)__pyx_v_i) >= __pyx_v_self->_n_items) != 0);
  if (!__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L5_bool_binop_done;
  }
  __pyx_t_2 = ((__pyx_v_i < 0) != 0);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L5_bool_binop_done:;
  if (__pyx_t_1) {

    /* "pyrobuf_list.pyx":933
 * 
 *         if i < 0 or <size_t>i >= self._n_items or i < 0:
 *             raise IndexError("list index out of range")             # <<<<<<<<<<<<<<
 * 
 *         return self._data[i]
 */
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_IndexError, __pyx_tuple__31, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 933; __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 = 933; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

    /* "pyrobuf_list.pyx":932
 *             i += <int>self._n_items
 * 
 *         if i < 0 or <size_t>i >= self._n_items or i < 0:             # <<<<<<<<<<<<<<
 *             raise IndexError("list index out of range")
 * 
 */
  }

  /* "pyrobuf_list.pyx":935
 *             raise IndexError("list index out of range")
 * 
 *         return self._data[i]             # <<<<<<<<<<<<<<
 * 
 *     def __iter__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = __Pyx_PyInt_From_int32_t((__pyx_v_self->_data[__pyx_v_i])); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 935; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "pyrobuf_list.pyx":928
 *             listener._Modified()
 * 
 *     def __getitem__(self, int i):             # <<<<<<<<<<<<<<
 *         if i < 0:
 *             i += <int>self._n_items
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pyrobuf_list.Int32List.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_12pyrobuf_list_9Int32List_12generator3(__pyx_CoroutineObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */

/* "pyrobuf_list.pyx":937
 *         return self._data[i]
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         cdef size_t idx = 0
 *         while idx < self._n_items:
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrobuf_list_9Int32List_11__iter__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_12pyrobuf_list_9Int32List_11__iter__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrobuf_list_9Int32List_10__iter__(((struct __pyx_obj_12pyrobuf_list_Int32List *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_12pyrobuf_list_9Int32List_10__iter__(struct __pyx_obj_12pyrobuf_list_Int32List *__pyx_v_self) {
  struct __pyx_obj_12pyrobuf_list___pyx_scope_struct_3___iter__ *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__iter__", 0);
  __pyx_cur_scope = (struct __pyx_obj_12pyrobuf_list___pyx_scope_struct_3___iter__ *)__pyx_tp_new_12pyrobuf_list___pyx_scope_struct_3___iter__(__pyx_ptype_12pyrobuf_list___pyx_scope_struct_3___iter__, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __Pyx_GOTREF(__pyx_cur_scope);
  __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
  __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  {
    __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_12pyrobuf_list_9Int32List_12generator3, (PyObject *) __pyx_cur_scope, __pyx_n_s_iter, __pyx_n_s_Int32List___iter); if (unlikely(!gen)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 937; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyrobuf_list.Int32List.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_gb_12pyrobuf_list_9Int32List_12generator3(__pyx_CoroutineObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_12pyrobuf_list___pyx_scope_struct_3___iter__ *__pyx_cur_scope = ((struct __pyx_obj_12pyrobuf_list___pyx_scope_struct_3___iter__ *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("None", 0);
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    case 1: goto __pyx_L6_resume_from_yield;
    default: /* CPython raises the right error here */
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __pyx_L3_first_run:;
  if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 937; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pyrobuf_list.pyx":938
 * 
 *     def __iter__(self):
 *         cdef size_t idx = 0             # <<<<<<<<<<<<<<
 *         while idx < self._n_items:
 *             yield self._data[idx]
 */
  __pyx_cur_scope->__pyx_v_idx = 0;

  /* "pyrobuf_list.pyx":939
 *     def __iter__(self):
 *         cdef size_t idx = 0
 *         while idx < self._n_items:             # <<<<<<<<<<<<<<
 *             yield self._data[idx]
 *             idx += 1
 */
  while (1) {
    __pyx_t_1 = ((__pyx_cur_scope->__pyx_v_idx < __pyx_cur_scope->__pyx_v_self->_n_items) != 0);
    if (!__pyx_t_1) break;

    /* "pyrobuf_list.pyx":940
 *         cdef size_t idx = 0
 *         while idx < self._n_items:
 *             yield self._data[idx]             # <<<<<<<<<<<<<<
 *             idx += 1
 * 
 */
    __pyx_t_2 = __Pyx_PyInt_From_int32_t((__pyx_cur_scope->__pyx_v_self->_data[__pyx_cur_scope->__pyx_v_idx])); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 940; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    __Pyx_XGIVEREF(__pyx_r);
    __Pyx_RefNannyFinishContext();
    /* return from generator, yielding value */
    __pyx_generator->resume_label = 1;
    return __pyx_r;
    __pyx_L6_resume_from_yield:;
    if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 940; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

    /* "pyrobuf_list.pyx":941
 *         while idx < self._n_items:
 *             yield self._data[idx]
 *             idx += 1             # <<<<<<<<<<<<<<
 * 
 *     def __len__(self):
 */
    __pyx_cur_scope->__pyx_v_idx = (__pyx_cur_scope->__pyx_v_idx + 1);
  }

  /* "pyrobuf_list.pyx":937
 *         return self._data[i]
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         cdef size_t idx = 0
 *         while idx < self._n_items:
 */

  /* function exit code */
  PyErr_SetNone(PyExc_StopIteration);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
  __pyx_generator->resume_label = -1;
  __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrobuf_list.pyx":943
 *             idx += 1
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         return self._n_items
 * 
 */

/* Python wrapper */
static Py_ssize_t __pyx_pw_12pyrobuf_list_9Int32List_14__len__(PyObject *__pyx_v_self); /*proto*/
static Py_ssize_t __pyx_pw_12pyrobuf_list_9Int32List_14__len__(PyObject *__pyx_v_self) {
  Py_ssize_t __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__len__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrobuf_list_9Int32List_13__len__(((struct __pyx_obj_12pyrobuf_list_Int32List *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static Py_ssize_t __pyx_pf_12pyrobuf_list_9Int32List_13__len__(struct __pyx_obj_12pyrobuf_list_Int32List *__pyx_v_self) {
  Py_ssize_t __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__len__", 0);

  /* "pyrobuf_list.pyx":944
 * 
 *     def __len__(self):
 *         return self._n_items             # <<<<<<<<<<<<<<
 * 
 *     def __repr__(self):
 */
  __pyx_r = __pyx_v_self->_n_items;
  goto __pyx_L0;

  /* "pyrobuf_list.pyx":943
 *             idx += 1
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         return self._n_items
 * 
 */

  /* function exit code */
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrobuf_list.pyx":946
 *         return self._n_items
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return repr(list(self))
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrobuf_list_9Int32List_16__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_12pyrobuf_list_9Int32List_16__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrobuf_list_9Int32List_15__repr__(((struct __pyx_obj_12pyrobuf_list_Int32List *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_12pyrobuf_list_9Int32List_15__repr__(struct __pyx_obj_12pyrobuf_list_Int32List *__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__", 0);

  /* "pyrobuf_list.pyx":947
 * 
 *     def __repr__(self):
 *         return repr(list(self))             # <<<<<<<<<<<<<<
 * 
 *     def __setitem__(self, int i, int32_t x):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PySequence_List(((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 947; __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 = 947; __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;

  /* "pyrobuf_list.pyx":946
 *         return self._n_items
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return repr(list(self))
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pyrobuf_list.Int32List.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrobuf_list.pyx":949
 *         return repr(list(self))
 * 
 *     def __setitem__(self, int i, int32_t x):             # <<<<<<<<<<<<<<
 *         if i < 0:
 *             i += <int>self._n_items
 */

/* Python wrapper */
static int __pyx_pw_12pyrobuf_list_9Int32List_18__setitem__(PyObject *__pyx_v_self, PyObject *__pyx_arg_i, PyObject *__pyx_arg_x); /*proto*/
static int __pyx_pw_12pyrobuf_list_9Int32List_18__setitem__(PyObject *__pyx_v_self, PyObject *__pyx_arg_i, PyObject *__pyx_arg_x) {
  int __pyx_v_i;
  int32_t __pyx_v_x;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setitem__ (wrapper)", 0);
  assert(__pyx_arg_i); {
    __pyx_v_i = __Pyx_PyInt_As_int(__pyx_arg_i); if (unlikely((__pyx_v_i == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 949; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  }
  assert(__pyx_arg_x); {
    __pyx_v_x = __Pyx_PyInt_As_int32_t(__pyx_arg_x); if (unlikely((__pyx_v_x == (int32_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 949; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyrobuf_list.Int32List.__setitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_12pyrobuf_list_9Int32List_17__setitem__(((struct __pyx_obj_12pyrobuf_list_Int32List *)__pyx_v_self), ((int)__pyx_v_i), ((int32_t)__pyx_v_x));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_12pyrobuf_list_9Int32List_17__setitem__(struct __pyx_obj_12pyrobuf_list_Int32List *__pyx_v_self, int __pyx_v_i, int32_t __pyx_v_x) {
  PyObject *__pyx_v_listener = NULL;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  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;
  __Pyx_RefNannySetupContext("__setitem__", 0);

  /* "pyrobuf_list.pyx":950
 * 
 *     def __setitem__(self, int i, int32_t x):
 *         if i < 0:             # <<<<<<<<<<<<<<
 *             i += <int>self._n_items
 * 
 */
  __pyx_t_1 = ((__pyx_v_i < 0) != 0);
  if (__pyx_t_1) {

    /* "pyrobuf_list.pyx":951
 *     def __setitem__(self, int i, int32_t x):
 *         if i < 0:
 *             i += <int>self._n_items             # <<<<<<<<<<<<<<
 * 
 *         if i < 0 or <size_t>i >= self._n_items:
 */
    __pyx_v_i = (__pyx_v_i + ((int)__pyx_v_self->_n_items));

    /* "pyrobuf_list.pyx":950
 * 
 *     def __setitem__(self, int i, int32_t x):
 *         if i < 0:             # <<<<<<<<<<<<<<
 *             i += <int>self._n_items
 * 
 */
  }

  /* "pyrobuf_list.pyx":953
 *             i += <int>self._n_items
 * 
 *         if i < 0 or <size_t>i >= self._n_items:             # <<<<<<<<<<<<<<
 *             raise IndexError("list index out of range")
 * 
 */
  __pyx_t_2 = ((__pyx_v_i < 0) != 0);
  if (!__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L5_bool_binop_done;
  }
  __pyx_t_2 = ((((size_t)__pyx_v_i) >= __pyx_v_self->_n_items) != 0);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L5_bool_binop_done:;
  if (__pyx_t_1) {

    /* "pyrobuf_list.pyx":954
 * 
 *         if i < 0 or <size_t>i >= self._n_items:
 *             raise IndexError("list index out of range")             # <<<<<<<<<<<<<<
 * 
 *         self._data[i] = x
 */
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_IndexError, __pyx_tuple__32, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 954; __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 = 954; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

    /* "pyrobuf_list.pyx":953
 *             i += <int>self._n_items
 * 
 *         if i < 0 or <size_t>i >= self._n_items:             # <<<<<<<<<<<<<<
 *             raise IndexError("list index out of range")
 * 
 */
  }

  /* "pyrobuf_list.pyx":956
 *             raise IndexError("list index out of range")
 * 
 *         self._data[i] = x             # <<<<<<<<<<<<<<
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:
 */
  (__pyx_v_self->_data[__pyx_v_i]) = __pyx_v_x;

  /* "pyrobuf_list.pyx":957
 * 
 *         self._data[i] = x
 *         listener = <object>self._listener             # <<<<<<<<<<<<<<
 *         if not listener._is_present_in_parent:
 *             listener._Modified()
 */
  __pyx_t_3 = ((PyObject *)__pyx_v_self->_listener);
  __Pyx_INCREF(__pyx_t_3);
  __pyx_v_listener = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "pyrobuf_list.pyx":958
 *         self._data[i] = x
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:             # <<<<<<<<<<<<<<
 *             listener._Modified()
 * 
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_listener, __pyx_n_s_is_present_in_parent); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 958; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 958; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_2 = ((!__pyx_t_1) != 0);
  if (__pyx_t_2) {

    /* "pyrobuf_list.pyx":959
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:
 *             listener._Modified()             # <<<<<<<<<<<<<<
 * 
 *     def __str__(self):
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_listener, __pyx_n_s_Modified); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 959; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = NULL;
    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    if (__pyx_t_5) {
      __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 959; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    } else {
      __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 959; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "pyrobuf_list.pyx":958
 *         self._data[i] = x
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:             # <<<<<<<<<<<<<<
 *             listener._Modified()
 * 
 */
  }

  /* "pyrobuf_list.pyx":949
 *         return repr(list(self))
 * 
 *     def __setitem__(self, int i, int32_t x):             # <<<<<<<<<<<<<<
 *         if i < 0:
 *             i += <int>self._n_items
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pyrobuf_list.Int32List.__setitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_listener);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrobuf_list.pyx":961
 *             listener._Modified()
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return str(list(self))
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrobuf_list_9Int32List_20__str__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_12pyrobuf_list_9Int32List_20__str__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrobuf_list_9Int32List_19__str__(((struct __pyx_obj_12pyrobuf_list_Int32List *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_12pyrobuf_list_9Int32List_19__str__(struct __pyx_obj_12pyrobuf_list_Int32List *__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__", 0);

  /* "pyrobuf_list.pyx":962
 * 
 *     def __str__(self):
 *         return str(list(self))             # <<<<<<<<<<<<<<
 * 
 *     def __getbuffer__(self, Py_buffer *buffer, int flags):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PySequence_List(((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 962; __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 = 962; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)(&PyString_Type)), __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 962; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyrobuf_list.pyx":961
 *             listener._Modified()
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return str(list(self))
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pyrobuf_list.Int32List.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrobuf_list.pyx":964
 *         return str(list(self))
 * 
 *     def __getbuffer__(self, Py_buffer *buffer, int flags):             # <<<<<<<<<<<<<<
 * 
 *         cdef Py_ssize_t itemsize = sizeof(int32_t)
 */

/* Python wrapper */
static CYTHON_UNUSED int __pyx_pw_12pyrobuf_list_9Int32List_22__getbuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_buffer, int __pyx_v_flags); /*proto*/
static CYTHON_UNUSED int __pyx_pw_12pyrobuf_list_9Int32List_22__getbuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_buffer, int __pyx_v_flags) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__getbuffer__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrobuf_list_9Int32List_21__getbuffer__(((struct __pyx_obj_12pyrobuf_list_Int32List *)__pyx_v_self), ((Py_buffer *)__pyx_v_buffer), ((int)__pyx_v_flags));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_12pyrobuf_list_9Int32List_21__getbuffer__(struct __pyx_obj_12pyrobuf_list_Int32List *__pyx_v_self, Py_buffer *__pyx_v_buffer, CYTHON_UNUSED int __pyx_v_flags) {
  Py_ssize_t __pyx_v_itemsize;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  size_t __pyx_t_1;
  Py_ssize_t *__pyx_t_2;
  __Pyx_RefNannySetupContext("__getbuffer__", 0);
  if (__pyx_v_buffer != NULL) {
    __pyx_v_buffer->obj = Py_None; __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(__pyx_v_buffer->obj);
  }

  /* "pyrobuf_list.pyx":966
 *     def __getbuffer__(self, Py_buffer *buffer, int flags):
 * 
 *         cdef Py_ssize_t itemsize = sizeof(int32_t)             # <<<<<<<<<<<<<<
 *         self.shape[0] = self._n_items
 *         self.strides[0] = 1
 */
  __pyx_v_itemsize = (sizeof(int32_t));

  /* "pyrobuf_list.pyx":967
 * 
 *         cdef Py_ssize_t itemsize = sizeof(int32_t)
 *         self.shape[0] = self._n_items             # <<<<<<<<<<<<<<
 *         self.strides[0] = 1
 * 
 */
  __pyx_t_1 = __pyx_v_self->_n_items;
  (__pyx_v_self->shape[0]) = __pyx_t_1;

  /* "pyrobuf_list.pyx":968
 *         cdef Py_ssize_t itemsize = sizeof(int32_t)
 *         self.shape[0] = self._n_items
 *         self.strides[0] = 1             # <<<<<<<<<<<<<<
 * 
 *         buffer.buf = <char *>(self._data)
 */
  (__pyx_v_self->strides[0]) = 1;

  /* "pyrobuf_list.pyx":970
 *         self.strides[0] = 1
 * 
 *         buffer.buf = <char *>(self._data)             # <<<<<<<<<<<<<<
 *         buffer.format = 'i'
 *         buffer.internal = NULL                  # see References
 */
  __pyx_v_buffer->buf = ((char *)__pyx_v_self->_data);

  /* "pyrobuf_list.pyx":971
 * 
 *         buffer.buf = <char *>(self._data)
 *         buffer.format = 'i'             # <<<<<<<<<<<<<<
 *         buffer.internal = NULL                  # see References
 *         buffer.itemsize = itemsize
 */
  __pyx_v_buffer->format = __pyx_k_i;

  /* "pyrobuf_list.pyx":972
 *         buffer.buf = <char *>(self._data)
 *         buffer.format = 'i'
 *         buffer.internal = NULL                  # see References             # <<<<<<<<<<<<<<
 *         buffer.itemsize = itemsize
 *         buffer.len = self._n_items
 */
  __pyx_v_buffer->internal = NULL;

  /* "pyrobuf_list.pyx":973
 *         buffer.format = 'i'
 *         buffer.internal = NULL                  # see References
 *         buffer.itemsize = itemsize             # <<<<<<<<<<<<<<
 *         buffer.len = self._n_items
 *         buffer.ndim = 1
 */
  __pyx_v_buffer->itemsize = __pyx_v_itemsize;

  /* "pyrobuf_list.pyx":974
 *         buffer.internal = NULL                  # see References
 *         buffer.itemsize = itemsize
 *         buffer.len = self._n_items             # <<<<<<<<<<<<<<
 *         buffer.ndim = 1
 *         buffer.obj = self
 */
  __pyx_t_1 = __pyx_v_self->_n_items;
  __pyx_v_buffer->len = __pyx_t_1;

  /* "pyrobuf_list.pyx":975
 *         buffer.itemsize = itemsize
 *         buffer.len = self._n_items
 *         buffer.ndim = 1             # <<<<<<<<<<<<<<
 *         buffer.obj = self
 *         buffer.readonly = 1
 */
  __pyx_v_buffer->ndim = 1;

  /* "pyrobuf_list.pyx":976
 *         buffer.len = self._n_items
 *         buffer.ndim = 1
 *         buffer.obj = self             # <<<<<<<<<<<<<<
 *         buffer.readonly = 1
 *         buffer.shape = self.shape
 */
  __Pyx_INCREF(((PyObject *)__pyx_v_self));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
  __Pyx_GOTREF(__pyx_v_buffer->obj);
  __Pyx_DECREF(__pyx_v_buffer->obj);
  __pyx_v_buffer->obj = ((PyObject *)__pyx_v_self);

  /* "pyrobuf_list.pyx":977
 *         buffer.ndim = 1
 *         buffer.obj = self
 *         buffer.readonly = 1             # <<<<<<<<<<<<<<
 *         buffer.shape = self.shape
 *         buffer.strides = self.strides
 */
  __pyx_v_buffer->readonly = 1;

  /* "pyrobuf_list.pyx":978
 *         buffer.obj = self
 *         buffer.readonly = 1
 *         buffer.shape = self.shape             # <<<<<<<<<<<<<<
 *         buffer.strides = self.strides
 *         buffer.suboffsets = NULL                # for pointer arrays only
 */
  __pyx_t_2 = __pyx_v_self->shape;
  __pyx_v_buffer->shape = __pyx_t_2;

  /* "pyrobuf_list.pyx":979
 *         buffer.readonly = 1
 *         buffer.shape = self.shape
 *         buffer.strides = self.strides             # <<<<<<<<<<<<<<
 *         buffer.suboffsets = NULL                # for pointer arrays only
 * 
 */
  __pyx_t_2 = __pyx_v_self->strides;
  __pyx_v_buffer->strides = __pyx_t_2;

  /* "pyrobuf_list.pyx":980
 *         buffer.shape = self.shape
 *         buffer.strides = self.strides
 *         buffer.suboffsets = NULL                # for pointer arrays only             # <<<<<<<<<<<<<<
 * 
 *     def __releasebuffer__(self, Py_buffer *buffer):
 */
  __pyx_v_buffer->suboffsets = NULL;

  /* "pyrobuf_list.pyx":964
 *         return str(list(self))
 * 
 *     def __getbuffer__(self, Py_buffer *buffer, int flags):             # <<<<<<<<<<<<<<
 * 
 *         cdef Py_ssize_t itemsize = sizeof(int32_t)
 */

  /* function exit code */
  __pyx_r = 0;
  if (__pyx_v_buffer != NULL && __pyx_v_buffer->obj == Py_None) {
    __Pyx_GOTREF(Py_None);
    __Pyx_DECREF(Py_None); __pyx_v_buffer->obj = NULL;
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrobuf_list.pyx":982
 *         buffer.suboffsets = NULL                # for pointer arrays only
 * 
 *     def __releasebuffer__(self, Py_buffer *buffer):             # <<<<<<<<<<<<<<
 *         pass
 * 
 */

/* Python wrapper */
static CYTHON_UNUSED void __pyx_pw_12pyrobuf_list_9Int32List_24__releasebuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_buffer); /*proto*/
static CYTHON_UNUSED void __pyx_pw_12pyrobuf_list_9Int32List_24__releasebuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_buffer) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__releasebuffer__ (wrapper)", 0);
  __pyx_pf_12pyrobuf_list_9Int32List_23__releasebuffer__(((struct __pyx_obj_12pyrobuf_list_Int32List *)__pyx_v_self), ((Py_buffer *)__pyx_v_buffer));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

static void __pyx_pf_12pyrobuf_list_9Int32List_23__releasebuffer__(CYTHON_UNUSED struct __pyx_obj_12pyrobuf_list_Int32List *__pyx_v_self, CYTHON_UNUSED Py_buffer *__pyx_v_buffer) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__releasebuffer__", 0);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

/* "pyrobuf_list.pyx":985
 *         pass
 * 
 *     cpdef append(self, int32_t x):             # <<<<<<<<<<<<<<
 *         self._append(x)
 *         listener = <object>self._listener
 */

static PyObject *__pyx_pw_12pyrobuf_list_9Int32List_26append(PyObject *__pyx_v_self, PyObject *__pyx_arg_x); /*proto*/
static PyObject *__pyx_f_12pyrobuf_list_9Int32List_append(struct __pyx_obj_12pyrobuf_list_Int32List *__pyx_v_self, int32_t __pyx_v_x, int __pyx_skip_dispatch) {
  PyObject *__pyx_v_listener = NULL;
  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;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  int __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("append", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_append); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 985; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_12pyrobuf_list_9Int32List_26append)) {
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_3 = __Pyx_PyInt_From_int32_t(__pyx_v_x); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 985; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_4 = __pyx_t_1; __pyx_t_5 = NULL;
      if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_4))) {
        __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
        if (likely(__pyx_t_5)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_5);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_4, function);
        }
      }
      if (!__pyx_t_5) {
        __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 985; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_GOTREF(__pyx_t_2);
      } else {
        __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 985; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL;
        __Pyx_GIVEREF(__pyx_t_3);
        PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_3);
        __pyx_t_3 = 0;
        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 985; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 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;
  }

  /* "pyrobuf_list.pyx":986
 * 
 *     cpdef append(self, int32_t x):
 *         self._append(x)             # <<<<<<<<<<<<<<
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:
 */
  ((struct __pyx_vtabstruct_12pyrobuf_list_Int32List *)__pyx_v_self->__pyx_vtab)->_append(__pyx_v_self, __pyx_v_x);

  /* "pyrobuf_list.pyx":987
 *     cpdef append(self, int32_t x):
 *         self._append(x)
 *         listener = <object>self._listener             # <<<<<<<<<<<<<<
 *         if not listener._is_present_in_parent:
 *             listener._Modified()
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_self->_listener);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_v_listener = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pyrobuf_list.pyx":988
 *         self._append(x)
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:             # <<<<<<<<<<<<<<
 *             listener._Modified()
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_listener, __pyx_n_s_is_present_in_parent); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 988; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 988; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_8 = ((!__pyx_t_7) != 0);
  if (__pyx_t_8) {

    /* "pyrobuf_list.pyx":989
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:
 *             listener._Modified()             # <<<<<<<<<<<<<<
 * 
 *     cpdef extend(self, Int32List x):
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_listener, __pyx_n_s_Modified); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 989; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = NULL;
    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    if (__pyx_t_4) {
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 989; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    } else {
      __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 989; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "pyrobuf_list.pyx":988
 *         self._append(x)
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:             # <<<<<<<<<<<<<<
 *             listener._Modified()
 * 
 */
  }

  /* "pyrobuf_list.pyx":985
 *         pass
 * 
 *     cpdef append(self, int32_t x):             # <<<<<<<<<<<<<<
 *         self._append(x)
 *         listener = <object>self._listener
 */

  /* function exit code */
  __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_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("pyrobuf_list.Int32List.append", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_listener);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrobuf_list_9Int32List_26append(PyObject *__pyx_v_self, PyObject *__pyx_arg_x); /*proto*/
static PyObject *__pyx_pw_12pyrobuf_list_9Int32List_26append(PyObject *__pyx_v_self, PyObject *__pyx_arg_x) {
  int32_t __pyx_v_x;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("append (wrapper)", 0);
  assert(__pyx_arg_x); {
    __pyx_v_x = __Pyx_PyInt_As_int32_t(__pyx_arg_x); if (unlikely((__pyx_v_x == (int32_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 985; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyrobuf_list.Int32List.append", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_12pyrobuf_list_9Int32List_25append(((struct __pyx_obj_12pyrobuf_list_Int32List *)__pyx_v_self), ((int32_t)__pyx_v_x));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_12pyrobuf_list_9Int32List_25append(struct __pyx_obj_12pyrobuf_list_Int32List *__pyx_v_self, int32_t __pyx_v_x) {
  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", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_12pyrobuf_list_9Int32List_append(__pyx_v_self, __pyx_v_x, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 985; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyrobuf_list.Int32List.append", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrobuf_list.pyx":991
 *             listener._Modified()
 * 
 *     cpdef extend(self, Int32List x):             # <<<<<<<<<<<<<<
 *         cdef int32_t *mem
 *         cdef size_t new_len = self._n_items + len(x)
 */

static PyObject *__pyx_pw_12pyrobuf_list_9Int32List_28extend(PyObject *__pyx_v_self, PyObject *__pyx_v_x); /*proto*/
static PyObject *__pyx_f_12pyrobuf_list_9Int32List_extend(struct __pyx_obj_12pyrobuf_list_Int32List *__pyx_v_self, struct __pyx_obj_12pyrobuf_list_Int32List *__pyx_v_x, int __pyx_skip_dispatch) {
  int32_t *__pyx_v_mem;
  size_t __pyx_v_new_len;
  size_t __pyx_v_new_size;
  int __pyx_v_i;
  PyObject *__pyx_v_listener = NULL;
  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;
  PyObject *__pyx_t_5 = NULL;
  Py_ssize_t __pyx_t_6;
  int __pyx_t_7;
  size_t __pyx_t_8;
  size_t __pyx_t_9;
  size_t __pyx_t_10;
  int __pyx_t_11;
  int32_t __pyx_t_12;
  int __pyx_t_13;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("extend", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_extend); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 991; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_12pyrobuf_list_9Int32List_28extend)) {
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
      if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_4)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
        }
      }
      if (!__pyx_t_4) {
        __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_v_x)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 991; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
      } else {
        __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 991; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL;
        __Pyx_INCREF(((PyObject *)__pyx_v_x));
        __Pyx_GIVEREF(((PyObject *)__pyx_v_x));
        PyTuple_SET_ITEM(__pyx_t_5, 0+1, ((PyObject *)__pyx_v_x));
        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 991; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      }
      __Pyx_DECREF(__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;
  }

  /* "pyrobuf_list.pyx":993
 *     cpdef extend(self, Int32List x):
 *         cdef int32_t *mem
 *         cdef size_t new_len = self._n_items + len(x)             # <<<<<<<<<<<<<<
 *         cdef size_t new_size
 *         cdef int i
 */
  __pyx_t_6 = PyObject_Length(((PyObject *)__pyx_v_x)); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 993; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_new_len = (__pyx_v_self->_n_items + __pyx_t_6);

  /* "pyrobuf_list.pyx":997
 *         cdef int i
 * 
 *         if new_len > self._size:             # <<<<<<<<<<<<<<
 *             new_size = max(new_len, 2 * self._size)
 *             mem = <int32_t *>PyMem_Realloc(self._data, new_size * sizeof(int32_t))
 */
  __pyx_t_7 = ((__pyx_v_new_len > __pyx_v_self->_size) != 0);
  if (__pyx_t_7) {

    /* "pyrobuf_list.pyx":998
 * 
 *         if new_len > self._size:
 *             new_size = max(new_len, 2 * self._size)             # <<<<<<<<<<<<<<
 *             mem = <int32_t *>PyMem_Realloc(self._data, new_size * sizeof(int32_t))
 *             if not mem:
 */
    __pyx_t_8 = (2 * __pyx_v_self->_size);
    __pyx_t_9 = __pyx_v_new_len;
    if (((__pyx_t_8 > __pyx_t_9) != 0)) {
      __pyx_t_10 = __pyx_t_8;
    } else {
      __pyx_t_10 = __pyx_t_9;
    }
    __pyx_v_new_size = __pyx_t_10;

    /* "pyrobuf_list.pyx":999
 *         if new_len > self._size:
 *             new_size = max(new_len, 2 * self._size)
 *             mem = <int32_t *>PyMem_Realloc(self._data, new_size * sizeof(int32_t))             # <<<<<<<<<<<<<<
 *             if not mem:
 *                 raise MemoryError()
 */
    __pyx_v_mem = ((int32_t *)PyMem_Realloc(__pyx_v_self->_data, (__pyx_v_new_size * (sizeof(int32_t)))));

    /* "pyrobuf_list.pyx":1000
 *             new_size = max(new_len, 2 * self._size)
 *             mem = <int32_t *>PyMem_Realloc(self._data, new_size * sizeof(int32_t))
 *             if not mem:             # <<<<<<<<<<<<<<
 *                 raise MemoryError()
 * 
 */
    __pyx_t_7 = ((!(__pyx_v_mem != 0)) != 0);
    if (__pyx_t_7) {

      /* "pyrobuf_list.pyx":1001
 *             mem = <int32_t *>PyMem_Realloc(self._data, new_size * sizeof(int32_t))
 *             if not mem:
 *                 raise MemoryError()             # <<<<<<<<<<<<<<
 * 
 *             self._data = mem
 */
      PyErr_NoMemory(); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1001; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

      /* "pyrobuf_list.pyx":1000
 *             new_size = max(new_len, 2 * self._size)
 *             mem = <int32_t *>PyMem_Realloc(self._data, new_size * sizeof(int32_t))
 *             if not mem:             # <<<<<<<<<<<<<<
 *                 raise MemoryError()
 * 
 */
    }

    /* "pyrobuf_list.pyx":1003
 *                 raise MemoryError()
 * 
 *             self._data = mem             # <<<<<<<<<<<<<<
 *             self._size = new_size
 * 
 */
    __pyx_v_self->_data = __pyx_v_mem;

    /* "pyrobuf_list.pyx":1004
 * 
 *             self._data = mem
 *             self._size = new_size             # <<<<<<<<<<<<<<
 * 
 *         for i in range(len(x)):
 */
    __pyx_v_self->_size = __pyx_v_new_size;

    /* "pyrobuf_list.pyx":997
 *         cdef int i
 * 
 *         if new_len > self._size:             # <<<<<<<<<<<<<<
 *             new_size = max(new_len, 2 * self._size)
 *             mem = <int32_t *>PyMem_Realloc(self._data, new_size * sizeof(int32_t))
 */
  }

  /* "pyrobuf_list.pyx":1006
 *             self._size = new_size
 * 
 *         for i in range(len(x)):             # <<<<<<<<<<<<<<
 *             self._data[self._n_items + i] = x[i]
 * 
 */
  __pyx_t_6 = PyObject_Length(((PyObject *)__pyx_v_x)); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1006; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_6; __pyx_t_11+=1) {
    __pyx_v_i = __pyx_t_11;

    /* "pyrobuf_list.pyx":1007
 * 
 *         for i in range(len(x)):
 *             self._data[self._n_items + i] = x[i]             # <<<<<<<<<<<<<<
 * 
 *         if new_len != self._n_items:
 */
    __pyx_t_1 = __Pyx_GetItemInt(((PyObject *)__pyx_v_x), __pyx_v_i, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1007; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_12 = __Pyx_PyInt_As_int32_t(__pyx_t_1); if (unlikely((__pyx_t_12 == (int32_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1007; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    (__pyx_v_self->_data[(__pyx_v_self->_n_items + __pyx_v_i)]) = __pyx_t_12;
  }

  /* "pyrobuf_list.pyx":1009
 *             self._data[self._n_items + i] = x[i]
 * 
 *         if new_len != self._n_items:             # <<<<<<<<<<<<<<
 *             listener = <object>self._listener
 *             if not listener._is_present_in_parent:
 */
  __pyx_t_7 = ((__pyx_v_new_len != __pyx_v_self->_n_items) != 0);
  if (__pyx_t_7) {

    /* "pyrobuf_list.pyx":1010
 * 
 *         if new_len != self._n_items:
 *             listener = <object>self._listener             # <<<<<<<<<<<<<<
 *             if not listener._is_present_in_parent:
 *                 listener._Modified()
 */
    __pyx_t_1 = ((PyObject *)__pyx_v_self->_listener);
    __Pyx_INCREF(__pyx_t_1);
    __pyx_v_listener = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "pyrobuf_list.pyx":1011
 *         if new_len != self._n_items:
 *             listener = <object>self._listener
 *             if not listener._is_present_in_parent:             # <<<<<<<<<<<<<<
 *                 listener._Modified()
 *         self._n_items = new_len
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_listener, __pyx_n_s_is_present_in_parent); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1011; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1011; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_13 = ((!__pyx_t_7) != 0);
    if (__pyx_t_13) {

      /* "pyrobuf_list.pyx":1012
 *             listener = <object>self._listener
 *             if not listener._is_present_in_parent:
 *                 listener._Modified()             # <<<<<<<<<<<<<<
 *         self._n_items = new_len
 * 
 */
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_listener, __pyx_n_s_Modified); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1012; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = NULL;
      if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
        __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
        if (likely(__pyx_t_3)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_2, function);
        }
      }
      if (__pyx_t_3) {
        __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1012; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      } else {
        __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1012; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "pyrobuf_list.pyx":1011
 *         if new_len != self._n_items:
 *             listener = <object>self._listener
 *             if not listener._is_present_in_parent:             # <<<<<<<<<<<<<<
 *                 listener._Modified()
 *         self._n_items = new_len
 */
    }

    /* "pyrobuf_list.pyx":1009
 *             self._data[self._n_items + i] = x[i]
 * 
 *         if new_len != self._n_items:             # <<<<<<<<<<<<<<
 *             listener = <object>self._listener
 *             if not listener._is_present_in_parent:
 */
  }

  /* "pyrobuf_list.pyx":1013
 *             if not listener._is_present_in_parent:
 *                 listener._Modified()
 *         self._n_items = new_len             # <<<<<<<<<<<<<<
 * 
 *     cpdef insert(self, int i, int32_t x):
 */
  __pyx_v_self->_n_items = __pyx_v_new_len;

  /* "pyrobuf_list.pyx":991
 *             listener._Modified()
 * 
 *     cpdef extend(self, Int32List x):             # <<<<<<<<<<<<<<
 *         cdef int32_t *mem
 *         cdef size_t new_len = self._n_items + len(x)
 */

  /* function exit code */
  __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_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pyrobuf_list.Int32List.extend", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_listener);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrobuf_list_9Int32List_28extend(PyObject *__pyx_v_self, PyObject *__pyx_v_x); /*proto*/
static PyObject *__pyx_pw_12pyrobuf_list_9Int32List_28extend(PyObject *__pyx_v_self, PyObject *__pyx_v_x) {
  CYTHON_UNUSED int __pyx_lineno = 0;
  CYTHON_UNUSED const char *__pyx_filename = NULL;
  CYTHON_UNUSED int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("extend (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_x), __pyx_ptype_12pyrobuf_list_Int32List, 1, "x", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 991; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_12pyrobuf_list_9Int32List_27extend(((struct __pyx_obj_12pyrobuf_list_Int32List *)__pyx_v_self), ((struct __pyx_obj_12pyrobuf_list_Int32List *)__pyx_v_x));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_12pyrobuf_list_9Int32List_27extend(struct __pyx_obj_12pyrobuf_list_Int32List *__pyx_v_self, struct __pyx_obj_12pyrobuf_list_Int32List *__pyx_v_x) {
  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", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_12pyrobuf_list_9Int32List_extend(__pyx_v_self, __pyx_v_x, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 991; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyrobuf_list.Int32List.extend", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrobuf_list.pyx":1015
 *         self._n_items = new_len
 * 
 *     cpdef insert(self, int i, int32_t x):             # <<<<<<<<<<<<<<
 *         cdef int32_t *mem
 *         cdef size_t j
 */

static PyObject *__pyx_pw_12pyrobuf_list_9Int32List_30insert(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_12pyrobuf_list_9Int32List_insert(struct __pyx_obj_12pyrobuf_list_Int32List *__pyx_v_self, int __pyx_v_i, int32_t __pyx_v_x, int __pyx_skip_dispatch) {
  int32_t *__pyx_v_mem;
  size_t __pyx_v_j;
  PyObject *__pyx_v_listener = NULL;
  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;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  Py_ssize_t __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  int __pyx_t_10;
  size_t __pyx_t_11;
  size_t __pyx_t_12;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("insert", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_insert); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1015; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_12pyrobuf_list_9Int32List_30insert)) {
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_i); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1015; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = __Pyx_PyInt_From_int32_t(__pyx_v_x); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1015; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_5 = __pyx_t_1; __pyx_t_6 = NULL;
      __pyx_t_7 = 0;
      if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_5))) {
        __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
        if (likely(__pyx_t_6)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
          __Pyx_INCREF(__pyx_t_6);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_5, function);
          __pyx_t_7 = 1;
        }
      }
      __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1015; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_8);
      if (__pyx_t_6) {
        __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL;
      }
      __Pyx_GIVEREF(__pyx_t_3);
      PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_t_3);
      __Pyx_GIVEREF(__pyx_t_4);
      PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_t_4);
      __pyx_t_3 = 0;
      __pyx_t_4 = 0;
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1015; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 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;
  }

  /* "pyrobuf_list.pyx":1019
 *         cdef size_t j
 * 
 *         if i < 0:             # <<<<<<<<<<<<<<
 *             i += <int>self._n_items
 * 
 */
  __pyx_t_9 = ((__pyx_v_i < 0) != 0);
  if (__pyx_t_9) {

    /* "pyrobuf_list.pyx":1020
 * 
 *         if i < 0:
 *             i += <int>self._n_items             # <<<<<<<<<<<<<<
 * 
 *         if i < 0 or <size_t>i > self._n_items:
 */
    __pyx_v_i = (__pyx_v_i + ((int)__pyx_v_self->_n_items));

    /* "pyrobuf_list.pyx":1019
 *         cdef size_t j
 * 
 *         if i < 0:             # <<<<<<<<<<<<<<
 *             i += <int>self._n_items
 * 
 */
  }

  /* "pyrobuf_list.pyx":1022
 *             i += <int>self._n_items
 * 
 *         if i < 0 or <size_t>i > self._n_items:             # <<<<<<<<<<<<<<
 *             raise IndexError("list index out of range")
 * 
 */
  __pyx_t_10 = ((__pyx_v_i < 0) != 0);
  if (!__pyx_t_10) {
  } else {
    __pyx_t_9 = __pyx_t_10;
    goto __pyx_L5_bool_binop_done;
  }
  __pyx_t_10 = ((((size_t)__pyx_v_i) > __pyx_v_self->_n_items) != 0);
  __pyx_t_9 = __pyx_t_10;
  __pyx_L5_bool_binop_done:;
  if (__pyx_t_9) {

    /* "pyrobuf_list.pyx":1023
 * 
 *         if i < 0 or <size_t>i > self._n_items:
 *             raise IndexError("list index out of range")             # <<<<<<<<<<<<<<
 * 
 *         if self._n_items == self._size:
 */
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_IndexError, __pyx_tuple__33, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1023; __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 = 1023; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

    /* "pyrobuf_list.pyx":1022
 *             i += <int>self._n_items
 * 
 *         if i < 0 or <size_t>i > self._n_items:             # <<<<<<<<<<<<<<
 *             raise IndexError("list index out of range")
 * 
 */
  }

  /* "pyrobuf_list.pyx":1025
 *             raise IndexError("list index out of range")
 * 
 *         if self._n_items == self._size:             # <<<<<<<<<<<<<<
 *             mem = <int32_t *>PyMem_Realloc(self._data, 2 * self._size * sizeof(int32_t))
 *             if not mem:
 */
  __pyx_t_9 = ((__pyx_v_self->_n_items == __pyx_v_self->_size) != 0);
  if (__pyx_t_9) {

    /* "pyrobuf_list.pyx":1026
 * 
 *         if self._n_items == self._size:
 *             mem = <int32_t *>PyMem_Realloc(self._data, 2 * self._size * sizeof(int32_t))             # <<<<<<<<<<<<<<
 *             if not mem:
 *                 raise MemoryError()
 */
    __pyx_v_mem = ((int32_t *)PyMem_Realloc(__pyx_v_self->_data, ((2 * __pyx_v_self->_size) * (sizeof(int32_t)))));

    /* "pyrobuf_list.pyx":1027
 *         if self._n_items == self._size:
 *             mem = <int32_t *>PyMem_Realloc(self._data, 2 * self._size * sizeof(int32_t))
 *             if not mem:             # <<<<<<<<<<<<<<
 *                 raise MemoryError()
 * 
 */
    __pyx_t_9 = ((!(__pyx_v_mem != 0)) != 0);
    if (__pyx_t_9) {

      /* "pyrobuf_list.pyx":1028
 *             mem = <int32_t *>PyMem_Realloc(self._data, 2 * self._size * sizeof(int32_t))
 *             if not mem:
 *                 raise MemoryError()             # <<<<<<<<<<<<<<
 * 
 *             self._data = mem
 */
      PyErr_NoMemory(); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1028; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

      /* "pyrobuf_list.pyx":1027
 *         if self._n_items == self._size:
 *             mem = <int32_t *>PyMem_Realloc(self._data, 2 * self._size * sizeof(int32_t))
 *             if not mem:             # <<<<<<<<<<<<<<
 *                 raise MemoryError()
 * 
 */
    }

    /* "pyrobuf_list.pyx":1030
 *                 raise MemoryError()
 * 
 *             self._data = mem             # <<<<<<<<<<<<<<
 *             self._size *= 2
 * 
 */
    __pyx_v_self->_data = __pyx_v_mem;

    /* "pyrobuf_list.pyx":1031
 * 
 *             self._data = mem
 *             self._size *= 2             # <<<<<<<<<<<<<<
 * 
 *         for j in range(self._n_items, <size_t>i, -1):
 */
    __pyx_v_self->_size = (__pyx_v_self->_size * 2);

    /* "pyrobuf_list.pyx":1025
 *             raise IndexError("list index out of range")
 * 
 *         if self._n_items == self._size:             # <<<<<<<<<<<<<<
 *             mem = <int32_t *>PyMem_Realloc(self._data, 2 * self._size * sizeof(int32_t))
 *             if not mem:
 */
  }

  /* "pyrobuf_list.pyx":1033
 *             self._size *= 2
 * 
 *         for j in range(self._n_items, <size_t>i, -1):             # <<<<<<<<<<<<<<
 *             self._data[j] = self._data[j - 1]
 * 
 */
  __pyx_t_11 = ((size_t)__pyx_v_i);
  for (__pyx_t_12 = __pyx_v_self->_n_items + 1; __pyx_t_12 > __pyx_t_11 + 1; ) { __pyx_t_12-=1;
    __pyx_v_j = __pyx_t_12;

    /* "pyrobuf_list.pyx":1034
 * 
 *         for j in range(self._n_items, <size_t>i, -1):
 *             self._data[j] = self._data[j - 1]             # <<<<<<<<<<<<<<
 * 
 *         self._data[i] = x
 */
    (__pyx_v_self->_data[__pyx_v_j]) = (__pyx_v_self->_data[(__pyx_v_j - 1)]);
  }

  /* "pyrobuf_list.pyx":1036
 *             self._data[j] = self._data[j - 1]
 * 
 *         self._data[i] = x             # <<<<<<<<<<<<<<
 *         self._n_items += 1
 *         listener = <object>self._listener
 */
  (__pyx_v_self->_data[__pyx_v_i]) = __pyx_v_x;

  /* "pyrobuf_list.pyx":1037
 * 
 *         self._data[i] = x
 *         self._n_items += 1             # <<<<<<<<<<<<<<
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:
 */
  __pyx_v_self->_n_items = (__pyx_v_self->_n_items + 1);

  /* "pyrobuf_list.pyx":1038
 *         self._data[i] = x
 *         self._n_items += 1
 *         listener = <object>self._listener             # <<<<<<<<<<<<<<
 *         if not listener._is_present_in_parent:
 *             listener._Modified()
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_self->_listener);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_v_listener = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pyrobuf_list.pyx":1039
 *         self._n_items += 1
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:             # <<<<<<<<<<<<<<
 *             listener._Modified()
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_listener, __pyx_n_s_is_present_in_parent); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1039; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1039; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_10 = ((!__pyx_t_9) != 0);
  if (__pyx_t_10) {

    /* "pyrobuf_list.pyx":1040
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:
 *             listener._Modified()             # <<<<<<<<<<<<<<
 * 
 *     cpdef pop(self):
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_listener, __pyx_n_s_Modified); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1040; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_5 = NULL;
    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    if (__pyx_t_5) {
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_5); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1040; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    } else {
      __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1040; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "pyrobuf_list.pyx":1039
 *         self._n_items += 1
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:             # <<<<<<<<<<<<<<
 *             listener._Modified()
 * 
 */
  }

  /* "pyrobuf_list.pyx":1015
 *         self._n_items = new_len
 * 
 *     cpdef insert(self, int i, int32_t x):             # <<<<<<<<<<<<<<
 *         cdef int32_t *mem
 *         cdef size_t j
 */

  /* function exit code */
  __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_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("pyrobuf_list.Int32List.insert", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_listener);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrobuf_list_9Int32List_30insert(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_12pyrobuf_list_9Int32List_30insert(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_v_i;
  int32_t __pyx_v_x;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("insert (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_i,&__pyx_n_s_x,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_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 (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_x)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("insert", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1015; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "insert") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1015; __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_i = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_i == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1015; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    __pyx_v_x = __Pyx_PyInt_As_int32_t(values[1]); if (unlikely((__pyx_v_x == (int32_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1015; __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 = 1015; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyrobuf_list.Int32List.insert", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_12pyrobuf_list_9Int32List_29insert(((struct __pyx_obj_12pyrobuf_list_Int32List *)__pyx_v_self), __pyx_v_i, __pyx_v_x);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_12pyrobuf_list_9Int32List_29insert(struct __pyx_obj_12pyrobuf_list_Int32List *__pyx_v_self, int __pyx_v_i, int32_t __pyx_v_x) {
  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("insert", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_12pyrobuf_list_9Int32List_insert(__pyx_v_self, __pyx_v_i, __pyx_v_x, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1015; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyrobuf_list.Int32List.insert", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrobuf_list.pyx":1042
 *             listener._Modified()
 * 
 *     cpdef pop(self):             # <<<<<<<<<<<<<<
 *         if self._n_items == 0:
 *             raise IndexError("pop from empty list")
 */

static PyObject *__pyx_pw_12pyrobuf_list_9Int32List_32pop(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_f_12pyrobuf_list_9Int32List_pop(struct __pyx_obj_12pyrobuf_list_Int32List *__pyx_v_self, int __pyx_skip_dispatch) {
  PyObject *__pyx_v_listener = NULL;
  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;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("pop", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_pop); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1042; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_12pyrobuf_list_9Int32List_32pop)) {
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
      if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_4)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
        }
      }
      if (__pyx_t_4) {
        __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1042; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else {
        __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1042; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__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;
  }

  /* "pyrobuf_list.pyx":1043
 * 
 *     cpdef pop(self):
 *         if self._n_items == 0:             # <<<<<<<<<<<<<<
 *             raise IndexError("pop from empty list")
 * 
 */
  __pyx_t_5 = ((__pyx_v_self->_n_items == 0) != 0);
  if (__pyx_t_5) {

    /* "pyrobuf_list.pyx":1044
 *     cpdef pop(self):
 *         if self._n_items == 0:
 *             raise IndexError("pop from empty list")             # <<<<<<<<<<<<<<
 * 
 *         self._n_items -= 1
 */
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_IndexError, __pyx_tuple__34, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1044; __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 = 1044; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

    /* "pyrobuf_list.pyx":1043
 * 
 *     cpdef pop(self):
 *         if self._n_items == 0:             # <<<<<<<<<<<<<<
 *             raise IndexError("pop from empty list")
 * 
 */
  }

  /* "pyrobuf_list.pyx":1046
 *             raise IndexError("pop from empty list")
 * 
 *         self._n_items -= 1             # <<<<<<<<<<<<<<
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:
 */
  __pyx_v_self->_n_items = (__pyx_v_self->_n_items - 1);

  /* "pyrobuf_list.pyx":1047
 * 
 *         self._n_items -= 1
 *         listener = <object>self._listener             # <<<<<<<<<<<<<<
 *         if not listener._is_present_in_parent:
 *             listener._Modified()
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_self->_listener);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_v_listener = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pyrobuf_list.pyx":1048
 *         self._n_items -= 1
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:             # <<<<<<<<<<<<<<
 *             listener._Modified()
 *         return self._data[self._n_items]
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_listener, __pyx_n_s_is_present_in_parent); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1048; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1048; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_6 = ((!__pyx_t_5) != 0);
  if (__pyx_t_6) {

    /* "pyrobuf_list.pyx":1049
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:
 *             listener._Modified()             # <<<<<<<<<<<<<<
 *         return self._data[self._n_items]
 * 
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_listener, __pyx_n_s_Modified); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1049; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = NULL;
    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    if (__pyx_t_3) {
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1049; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    } else {
      __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1049; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "pyrobuf_list.pyx":1048
 *         self._n_items -= 1
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:             # <<<<<<<<<<<<<<
 *             listener._Modified()
 *         return self._data[self._n_items]
 */
  }

  /* "pyrobuf_list.pyx":1050
 *         if not listener._is_present_in_parent:
 *             listener._Modified()
 *         return self._data[self._n_items]             # <<<<<<<<<<<<<<
 * 
 *     cpdef remove(self, int32_t x):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int32_t((__pyx_v_self->_data[__pyx_v_self->_n_items])); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1050; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyrobuf_list.pyx":1042
 *             listener._Modified()
 * 
 *     cpdef pop(self):             # <<<<<<<<<<<<<<
 *         if self._n_items == 0:
 *             raise IndexError("pop from empty list")
 */

  /* function exit code */
  __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("pyrobuf_list.Int32List.pop", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_listener);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrobuf_list_9Int32List_32pop(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_12pyrobuf_list_9Int32List_32pop(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("pop (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrobuf_list_9Int32List_31pop(((struct __pyx_obj_12pyrobuf_list_Int32List *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_12pyrobuf_list_9Int32List_31pop(struct __pyx_obj_12pyrobuf_list_Int32List *__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("pop", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_12pyrobuf_list_9Int32List_pop(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1042; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyrobuf_list.Int32List.pop", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrobuf_list.pyx":1052
 *         return self._data[self._n_items]
 * 
 *     cpdef remove(self, int32_t x):             # <<<<<<<<<<<<<<
 *         cdef size_t i
 *         cdef size_t j
 */

static PyObject *__pyx_pw_12pyrobuf_list_9Int32List_34remove(PyObject *__pyx_v_self, PyObject *__pyx_arg_x); /*proto*/
static PyObject *__pyx_f_12pyrobuf_list_9Int32List_remove(struct __pyx_obj_12pyrobuf_list_Int32List *__pyx_v_self, int32_t __pyx_v_x, int __pyx_skip_dispatch) {
  size_t __pyx_v_i;
  size_t __pyx_v_j;
  int __pyx_v_found;
  PyObject *__pyx_v_listener = NULL;
  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;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  size_t __pyx_t_7;
  size_t __pyx_t_8;
  int __pyx_t_9;
  int __pyx_t_10;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("remove", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_remove); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1052; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_12pyrobuf_list_9Int32List_34remove)) {
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_3 = __Pyx_PyInt_From_int32_t(__pyx_v_x); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1052; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_4 = __pyx_t_1; __pyx_t_5 = NULL;
      if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_4))) {
        __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
        if (likely(__pyx_t_5)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_5);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_4, function);
        }
      }
      if (!__pyx_t_5) {
        __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1052; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_GOTREF(__pyx_t_2);
      } else {
        __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1052; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL;
        __Pyx_GIVEREF(__pyx_t_3);
        PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_3);
        __pyx_t_3 = 0;
        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1052; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 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;
  }

  /* "pyrobuf_list.pyx":1055
 *         cdef size_t i
 *         cdef size_t j
 *         cdef bint found = 0             # <<<<<<<<<<<<<<
 * 
 *         for i in range(self._n_items):
 */
  __pyx_v_found = 0;

  /* "pyrobuf_list.pyx":1057
 *         cdef bint found = 0
 * 
 *         for i in range(self._n_items):             # <<<<<<<<<<<<<<
 *             if self._data[i] == x:
 *                 found = 1
 */
  __pyx_t_7 = __pyx_v_self->_n_items;
  for (__pyx_t_8 = 0; __pyx_t_8 < __pyx_t_7; __pyx_t_8+=1) {
    __pyx_v_i = __pyx_t_8;

    /* "pyrobuf_list.pyx":1058
 * 
 *         for i in range(self._n_items):
 *             if self._data[i] == x:             # <<<<<<<<<<<<<<
 *                 found = 1
 *                 break
 */
    __pyx_t_9 = (((__pyx_v_self->_data[__pyx_v_i]) == __pyx_v_x) != 0);
    if (__pyx_t_9) {

      /* "pyrobuf_list.pyx":1059
 *         for i in range(self._n_items):
 *             if self._data[i] == x:
 *                 found = 1             # <<<<<<<<<<<<<<
 *                 break
 * 
 */
      __pyx_v_found = 1;

      /* "pyrobuf_list.pyx":1060
 *             if self._data[i] == x:
 *                 found = 1
 *                 break             # <<<<<<<<<<<<<<
 * 
 *         if found == 0:
 */
      goto __pyx_L4_break;

      /* "pyrobuf_list.pyx":1058
 * 
 *         for i in range(self._n_items):
 *             if self._data[i] == x:             # <<<<<<<<<<<<<<
 *                 found = 1
 *                 break
 */
    }
  }
  __pyx_L4_break:;

  /* "pyrobuf_list.pyx":1062
 *                 break
 * 
 *         if found == 0:             # <<<<<<<<<<<<<<
 *             raise ValueError("x not in list")
 * 
 */
  __pyx_t_9 = ((__pyx_v_found == 0) != 0);
  if (__pyx_t_9) {

    /* "pyrobuf_list.pyx":1063
 * 
 *         if found == 0:
 *             raise ValueError("x not in list")             # <<<<<<<<<<<<<<
 * 
 *         for j in range(i, self._n_items):
 */
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__35, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1063; __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 = 1063; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

    /* "pyrobuf_list.pyx":1062
 *                 break
 * 
 *         if found == 0:             # <<<<<<<<<<<<<<
 *             raise ValueError("x not in list")
 * 
 */
  }

  /* "pyrobuf_list.pyx":1065
 *             raise ValueError("x not in list")
 * 
 *         for j in range(i, self._n_items):             # <<<<<<<<<<<<<<
 *             self._data[j] = self._data[j + 1]
 * 
 */
  __pyx_t_7 = __pyx_v_self->_n_items;
  for (__pyx_t_8 = __pyx_v_i; __pyx_t_8 < __pyx_t_7; __pyx_t_8+=1) {
    __pyx_v_j = __pyx_t_8;

    /* "pyrobuf_list.pyx":1066
 * 
 *         for j in range(i, self._n_items):
 *             self._data[j] = self._data[j + 1]             # <<<<<<<<<<<<<<
 * 
 *         self._n_items -= 1
 */
    (__pyx_v_self->_data[__pyx_v_j]) = (__pyx_v_self->_data[(__pyx_v_j + 1)]);
  }

  /* "pyrobuf_list.pyx":1068
 *             self._data[j] = self._data[j + 1]
 * 
 *         self._n_items -= 1             # <<<<<<<<<<<<<<
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:
 */
  __pyx_v_self->_n_items = (__pyx_v_self->_n_items - 1);

  /* "pyrobuf_list.pyx":1069
 * 
 *         self._n_items -= 1
 *         listener = <object>self._listener             # <<<<<<<<<<<<<<
 *         if not listener._is_present_in_parent:
 *             listener._Modified()
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_self->_listener);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_v_listener = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pyrobuf_list.pyx":1070
 *         self._n_items -= 1
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:             # <<<<<<<<<<<<<<
 *             listener._Modified()
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_listener, __pyx_n_s_is_present_in_parent); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1070; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1070; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_10 = ((!__pyx_t_9) != 0);
  if (__pyx_t_10) {

    /* "pyrobuf_list.pyx":1071
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:
 *             listener._Modified()             # <<<<<<<<<<<<<<
 * 
 *     cdef void _append(self, int32_t x):
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_listener, __pyx_n_s_Modified); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1071; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = NULL;
    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    if (__pyx_t_4) {
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1071; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    } else {
      __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1071; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "pyrobuf_list.pyx":1070
 *         self._n_items -= 1
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:             # <<<<<<<<<<<<<<
 *             listener._Modified()
 * 
 */
  }

  /* "pyrobuf_list.pyx":1052
 *         return self._data[self._n_items]
 * 
 *     cpdef remove(self, int32_t x):             # <<<<<<<<<<<<<<
 *         cdef size_t i
 *         cdef size_t j
 */

  /* function exit code */
  __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_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("pyrobuf_list.Int32List.remove", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_listener);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrobuf_list_9Int32List_34remove(PyObject *__pyx_v_self, PyObject *__pyx_arg_x); /*proto*/
static PyObject *__pyx_pw_12pyrobuf_list_9Int32List_34remove(PyObject *__pyx_v_self, PyObject *__pyx_arg_x) {
  int32_t __pyx_v_x;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("remove (wrapper)", 0);
  assert(__pyx_arg_x); {
    __pyx_v_x = __Pyx_PyInt_As_int32_t(__pyx_arg_x); if (unlikely((__pyx_v_x == (int32_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1052; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyrobuf_list.Int32List.remove", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_12pyrobuf_list_9Int32List_33remove(((struct __pyx_obj_12pyrobuf_list_Int32List *)__pyx_v_self), ((int32_t)__pyx_v_x));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_12pyrobuf_list_9Int32List_33remove(struct __pyx_obj_12pyrobuf_list_Int32List *__pyx_v_self, int32_t __pyx_v_x) {
  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", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_12pyrobuf_list_9Int32List_remove(__pyx_v_self, __pyx_v_x, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1052; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyrobuf_list.Int32List.remove", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrobuf_list.pyx":1073
 *             listener._Modified()
 * 
 *     cdef void _append(self, int32_t x):             # <<<<<<<<<<<<<<
 *         cdef int32_t *mem
 * 
 */

static void __pyx_f_12pyrobuf_list_9Int32List__append(struct __pyx_obj_12pyrobuf_list_Int32List *__pyx_v_self, int32_t __pyx_v_x) {
  int32_t *__pyx_v_mem;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_append", 0);

  /* "pyrobuf_list.pyx":1076
 *         cdef int32_t *mem
 * 
 *         if self._n_items == self._size:             # <<<<<<<<<<<<<<
 *             mem = <int32_t *>PyMem_Realloc(self._data, 2 * self._size * sizeof(int32_t))
 *             if not mem:
 */
  __pyx_t_1 = ((__pyx_v_self->_n_items == __pyx_v_self->_size) != 0);
  if (__pyx_t_1) {

    /* "pyrobuf_list.pyx":1077
 * 
 *         if self._n_items == self._size:
 *             mem = <int32_t *>PyMem_Realloc(self._data, 2 * self._size * sizeof(int32_t))             # <<<<<<<<<<<<<<
 *             if not mem:
 *                 raise MemoryError()
 */
    __pyx_v_mem = ((int32_t *)PyMem_Realloc(__pyx_v_self->_data, ((2 * __pyx_v_self->_size) * (sizeof(int32_t)))));

    /* "pyrobuf_list.pyx":1078
 *         if self._n_items == self._size:
 *             mem = <int32_t *>PyMem_Realloc(self._data, 2 * self._size * sizeof(int32_t))
 *             if not mem:             # <<<<<<<<<<<<<<
 *                 raise MemoryError()
 * 
 */
    __pyx_t_1 = ((!(__pyx_v_mem != 0)) != 0);
    if (__pyx_t_1) {

      /* "pyrobuf_list.pyx":1079
 *             mem = <int32_t *>PyMem_Realloc(self._data, 2 * self._size * sizeof(int32_t))
 *             if not mem:
 *                 raise MemoryError()             # <<<<<<<<<<<<<<
 * 
 *             self._data = mem
 */
      PyErr_NoMemory(); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1079; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

      /* "pyrobuf_list.pyx":1078
 *         if self._n_items == self._size:
 *             mem = <int32_t *>PyMem_Realloc(self._data, 2 * self._size * sizeof(int32_t))
 *             if not mem:             # <<<<<<<<<<<<<<
 *                 raise MemoryError()
 * 
 */
    }

    /* "pyrobuf_list.pyx":1081
 *                 raise MemoryError()
 * 
 *             self._data = mem             # <<<<<<<<<<<<<<
 *             self._size *= 2
 * 
 */
    __pyx_v_self->_data = __pyx_v_mem;

    /* "pyrobuf_list.pyx":1082
 * 
 *             self._data = mem
 *             self._size *= 2             # <<<<<<<<<<<<<<
 * 
 *         self._data[self._n_items] = x
 */
    __pyx_v_self->_size = (__pyx_v_self->_size * 2);

    /* "pyrobuf_list.pyx":1076
 *         cdef int32_t *mem
 * 
 *         if self._n_items == self._size:             # <<<<<<<<<<<<<<
 *             mem = <int32_t *>PyMem_Realloc(self._data, 2 * self._size * sizeof(int32_t))
 *             if not mem:
 */
  }

  /* "pyrobuf_list.pyx":1084
 *             self._size *= 2
 * 
 *         self._data[self._n_items] = x             # <<<<<<<<<<<<<<
 *         self._n_items += 1
 * 
 */
  (__pyx_v_self->_data[__pyx_v_self->_n_items]) = __pyx_v_x;

  /* "pyrobuf_list.pyx":1085
 * 
 *         self._data[self._n_items] = x
 *         self._n_items += 1             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_v_self->_n_items = (__pyx_v_self->_n_items + 1);

  /* "pyrobuf_list.pyx":1073
 *             listener._Modified()
 * 
 *     cdef void _append(self, int32_t x):             # <<<<<<<<<<<<<<
 *         cdef int32_t *mem
 * 
 */

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_WriteUnraisable("pyrobuf_list.Int32List._append", __pyx_clineno, __pyx_lineno, __pyx_filename, 0, 0);
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
}

/* "pyrobuf_list.pyx":1091
 * cdef class IntList:
 * 
 *     def __cinit__(self, size_t size=16, object listener=None):             # <<<<<<<<<<<<<<
 *         self._data = <int *>PyMem_Malloc(size * sizeof(int))
 *         if not self._data:
 */

/* Python wrapper */
static int __pyx_pw_12pyrobuf_list_7IntList_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_12pyrobuf_list_7IntList_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  size_t __pyx_v_size;
  PyObject *__pyx_v_listener = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_size,&__pyx_n_s_listener,0};
    PyObject* values[2] = {0,0};
    values[1] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_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 (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_size);
          if (value) { values[0] = value; kw_args--; }
        }
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_listener);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1091; __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;
      }
    }
    if (values[0]) {
      __pyx_v_size = __Pyx_PyInt_As_size_t(values[0]); if (unlikely((__pyx_v_size == (size_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1091; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    } else {
      __pyx_v_size = ((size_t)16);
    }
    __pyx_v_listener = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1091; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyrobuf_list.IntList.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_12pyrobuf_list_7IntList___cinit__(((struct __pyx_obj_12pyrobuf_list_IntList *)__pyx_v_self), __pyx_v_size, __pyx_v_listener);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_12pyrobuf_list_7IntList___cinit__(struct __pyx_obj_12pyrobuf_list_IntList *__pyx_v_self, size_t __pyx_v_size, PyObject *__pyx_v_listener) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);

  /* "pyrobuf_list.pyx":1092
 * 
 *     def __cinit__(self, size_t size=16, object listener=None):
 *         self._data = <int *>PyMem_Malloc(size * sizeof(int))             # <<<<<<<<<<<<<<
 *         if not self._data:
 *             raise MemoryError()
 */
  __pyx_v_self->_data = ((int *)PyMem_Malloc((__pyx_v_size * (sizeof(int)))));

  /* "pyrobuf_list.pyx":1093
 *     def __cinit__(self, size_t size=16, object listener=None):
 *         self._data = <int *>PyMem_Malloc(size * sizeof(int))
 *         if not self._data:             # <<<<<<<<<<<<<<
 *             raise MemoryError()
 * 
 */
  __pyx_t_1 = ((!(__pyx_v_self->_data != 0)) != 0);
  if (__pyx_t_1) {

    /* "pyrobuf_list.pyx":1094
 *         self._data = <int *>PyMem_Malloc(size * sizeof(int))
 *         if not self._data:
 *             raise MemoryError()             # <<<<<<<<<<<<<<
 * 
 *         self._n_items = 0
 */
    PyErr_NoMemory(); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1094; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

    /* "pyrobuf_list.pyx":1093
 *     def __cinit__(self, size_t size=16, object listener=None):
 *         self._data = <int *>PyMem_Malloc(size * sizeof(int))
 *         if not self._data:             # <<<<<<<<<<<<<<
 *             raise MemoryError()
 * 
 */
  }

  /* "pyrobuf_list.pyx":1096
 *             raise MemoryError()
 * 
 *         self._n_items = 0             # <<<<<<<<<<<<<<
 *         self._size = size
 *         if listener is None:
 */
  __pyx_v_self->_n_items = 0;

  /* "pyrobuf_list.pyx":1097
 * 
 *         self._n_items = 0
 *         self._size = size             # <<<<<<<<<<<<<<
 *         if listener is None:
 *             self._listener = <PyObject *>null_listener
 */
  __pyx_v_self->_size = __pyx_v_size;

  /* "pyrobuf_list.pyx":1098
 *         self._n_items = 0
 *         self._size = size
 *         if listener is None:             # <<<<<<<<<<<<<<
 *             self._listener = <PyObject *>null_listener
 *         else:
 */
  __pyx_t_1 = (__pyx_v_listener == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "pyrobuf_list.pyx":1099
 *         self._size = size
 *         if listener is None:
 *             self._listener = <PyObject *>null_listener             # <<<<<<<<<<<<<<
 *         else:
 *             self._listener = <PyObject *>listener
 */
    __pyx_v_self->_listener = ((PyObject *)null_listener);

    /* "pyrobuf_list.pyx":1098
 *         self._n_items = 0
 *         self._size = size
 *         if listener is None:             # <<<<<<<<<<<<<<
 *             self._listener = <PyObject *>null_listener
 *         else:
 */
    goto __pyx_L4;
  }

  /* "pyrobuf_list.pyx":1101
 *             self._listener = <PyObject *>null_listener
 *         else:
 *             self._listener = <PyObject *>listener             # <<<<<<<<<<<<<<
 * 
 *     def __dealloc__(self):
 */
  /*else*/ {
    __pyx_v_self->_listener = ((PyObject *)__pyx_v_listener);
  }
  __pyx_L4:;

  /* "pyrobuf_list.pyx":1091
 * cdef class IntList:
 * 
 *     def __cinit__(self, size_t size=16, object listener=None):             # <<<<<<<<<<<<<<
 *         self._data = <int *>PyMem_Malloc(size * sizeof(int))
 *         if not self._data:
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyrobuf_list.IntList.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrobuf_list.pyx":1103
 *             self._listener = <PyObject *>listener
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         PyMem_Free(self._data)
 * 
 */

/* Python wrapper */
static void __pyx_pw_12pyrobuf_list_7IntList_3__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_12pyrobuf_list_7IntList_3__dealloc__(PyObject *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_pf_12pyrobuf_list_7IntList_2__dealloc__(((struct __pyx_obj_12pyrobuf_list_IntList *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

static void __pyx_pf_12pyrobuf_list_7IntList_2__dealloc__(struct __pyx_obj_12pyrobuf_list_IntList *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__", 0);

  /* "pyrobuf_list.pyx":1104
 * 
 *     def __dealloc__(self):
 *         PyMem_Free(self._data)             # <<<<<<<<<<<<<<
 * 
 *     def __contains__(self, int x):
 */
  PyMem_Free(__pyx_v_self->_data);

  /* "pyrobuf_list.pyx":1103
 *             self._listener = <PyObject *>listener
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         PyMem_Free(self._data)
 * 
 */

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

/* "pyrobuf_list.pyx":1106
 *         PyMem_Free(self._data)
 * 
 *     def __contains__(self, int x):             # <<<<<<<<<<<<<<
 *         cdef size_t i
 *         for i in range(self._n_items):
 */

/* Python wrapper */
static int __pyx_pw_12pyrobuf_list_7IntList_5__contains__(PyObject *__pyx_v_self, PyObject *__pyx_arg_x); /*proto*/
static int __pyx_pw_12pyrobuf_list_7IntList_5__contains__(PyObject *__pyx_v_self, PyObject *__pyx_arg_x) {
  int __pyx_v_x;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__contains__ (wrapper)", 0);
  assert(__pyx_arg_x); {
    __pyx_v_x = __Pyx_PyInt_As_int(__pyx_arg_x); if (unlikely((__pyx_v_x == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1106; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyrobuf_list.IntList.__contains__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_12pyrobuf_list_7IntList_4__contains__(((struct __pyx_obj_12pyrobuf_list_IntList *)__pyx_v_self), ((int)__pyx_v_x));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_12pyrobuf_list_7IntList_4__contains__(struct __pyx_obj_12pyrobuf_list_IntList *__pyx_v_self, int __pyx_v_x) {
  size_t __pyx_v_i;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  size_t __pyx_t_1;
  size_t __pyx_t_2;
  int __pyx_t_3;
  __Pyx_RefNannySetupContext("__contains__", 0);

  /* "pyrobuf_list.pyx":1108
 *     def __contains__(self, int x):
 *         cdef size_t i
 *         for i in range(self._n_items):             # <<<<<<<<<<<<<<
 *             if self._data[i] == x:
 *                 return True
 */
  __pyx_t_1 = __pyx_v_self->_n_items;
  for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
    __pyx_v_i = __pyx_t_2;

    /* "pyrobuf_list.pyx":1109
 *         cdef size_t i
 *         for i in range(self._n_items):
 *             if self._data[i] == x:             # <<<<<<<<<<<<<<
 *                 return True
 * 
 */
    __pyx_t_3 = (((__pyx_v_self->_data[__pyx_v_i]) == __pyx_v_x) != 0);
    if (__pyx_t_3) {

      /* "pyrobuf_list.pyx":1110
 *         for i in range(self._n_items):
 *             if self._data[i] == x:
 *                 return True             # <<<<<<<<<<<<<<
 * 
 *         return False
 */
      __pyx_r = 1;
      goto __pyx_L0;

      /* "pyrobuf_list.pyx":1109
 *         cdef size_t i
 *         for i in range(self._n_items):
 *             if self._data[i] == x:             # <<<<<<<<<<<<<<
 *                 return True
 * 
 */
    }
  }

  /* "pyrobuf_list.pyx":1112
 *                 return True
 * 
 *         return False             # <<<<<<<<<<<<<<
 * 
 *     def __delitem__(self, int i):
 */
  __pyx_r = 0;
  goto __pyx_L0;

  /* "pyrobuf_list.pyx":1106
 *         PyMem_Free(self._data)
 * 
 *     def __contains__(self, int x):             # <<<<<<<<<<<<<<
 *         cdef size_t i
 *         for i in range(self._n_items):
 */

  /* function exit code */
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrobuf_list.pyx":1114
 *         return False
 * 
 *     def __delitem__(self, int i):             # <<<<<<<<<<<<<<
 *         if i < 0:
 *             i += <int>self._n_items
 */

/* Python wrapper */
static int __pyx_pw_12pyrobuf_list_7IntList_7__delitem__(PyObject *__pyx_v_self, PyObject *__pyx_arg_i); /*proto*/
static int __pyx_pw_12pyrobuf_list_7IntList_7__delitem__(PyObject *__pyx_v_self, PyObject *__pyx_arg_i) {
  int __pyx_v_i;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__delitem__ (wrapper)", 0);
  assert(__pyx_arg_i); {
    __pyx_v_i = __Pyx_PyInt_As_int(__pyx_arg_i); if (unlikely((__pyx_v_i == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1114; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyrobuf_list.IntList.__delitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_12pyrobuf_list_7IntList_6__delitem__(((struct __pyx_obj_12pyrobuf_list_IntList *)__pyx_v_self), ((int)__pyx_v_i));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_12pyrobuf_list_7IntList_6__delitem__(struct __pyx_obj_12pyrobuf_list_IntList *__pyx_v_self, int __pyx_v_i) {
  size_t __pyx_v_j;
  PyObject *__pyx_v_listener = NULL;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  size_t __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;
  __Pyx_RefNannySetupContext("__delitem__", 0);

  /* "pyrobuf_list.pyx":1115
 * 
 *     def __delitem__(self, int i):
 *         if i < 0:             # <<<<<<<<<<<<<<
 *             i += <int>self._n_items
 * 
 */
  __pyx_t_1 = ((__pyx_v_i < 0) != 0);
  if (__pyx_t_1) {

    /* "pyrobuf_list.pyx":1116
 *     def __delitem__(self, int i):
 *         if i < 0:
 *             i += <int>self._n_items             # <<<<<<<<<<<<<<
 * 
 *         if i < 0 or <size_t>i >= self._n_items:
 */
    __pyx_v_i = (__pyx_v_i + ((int)__pyx_v_self->_n_items));

    /* "pyrobuf_list.pyx":1115
 * 
 *     def __delitem__(self, int i):
 *         if i < 0:             # <<<<<<<<<<<<<<
 *             i += <int>self._n_items
 * 
 */
  }

  /* "pyrobuf_list.pyx":1118
 *             i += <int>self._n_items
 * 
 *         if i < 0 or <size_t>i >= self._n_items:             # <<<<<<<<<<<<<<
 *             raise IndexError("list index out of range")
 * 
 */
  __pyx_t_2 = ((__pyx_v_i < 0) != 0);
  if (!__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L5_bool_binop_done;
  }
  __pyx_t_2 = ((((size_t)__pyx_v_i) >= __pyx_v_self->_n_items) != 0);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L5_bool_binop_done:;
  if (__pyx_t_1) {

    /* "pyrobuf_list.pyx":1119
 * 
 *         if i < 0 or <size_t>i >= self._n_items:
 *             raise IndexError("list index out of range")             # <<<<<<<<<<<<<<
 * 
 *         cdef size_t j
 */
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_IndexError, __pyx_tuple__36, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1119; __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 = 1119; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

    /* "pyrobuf_list.pyx":1118
 *             i += <int>self._n_items
 * 
 *         if i < 0 or <size_t>i >= self._n_items:             # <<<<<<<<<<<<<<
 *             raise IndexError("list index out of range")
 * 
 */
  }

  /* "pyrobuf_list.pyx":1122
 * 
 *         cdef size_t j
 *         for j in range(i, self._n_items):             # <<<<<<<<<<<<<<
 *             self._data[j] = self._data[j + 1]
 * 
 */
  __pyx_t_4 = __pyx_v_self->_n_items;
  for (__pyx_t_5 = __pyx_v_i; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
    __pyx_v_j = __pyx_t_5;

    /* "pyrobuf_list.pyx":1123
 *         cdef size_t j
 *         for j in range(i, self._n_items):
 *             self._data[j] = self._data[j + 1]             # <<<<<<<<<<<<<<
 * 
 *         self._n_items -= 1
 */
    (__pyx_v_self->_data[__pyx_v_j]) = (__pyx_v_self->_data[(__pyx_v_j + 1)]);
  }

  /* "pyrobuf_list.pyx":1125
 *             self._data[j] = self._data[j + 1]
 * 
 *         self._n_items -= 1             # <<<<<<<<<<<<<<
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:
 */
  __pyx_v_self->_n_items = (__pyx_v_self->_n_items - 1);

  /* "pyrobuf_list.pyx":1126
 * 
 *         self._n_items -= 1
 *         listener = <object>self._listener             # <<<<<<<<<<<<<<
 *         if not listener._is_present_in_parent:
 *             listener._Modified()
 */
  __pyx_t_3 = ((PyObject *)__pyx_v_self->_listener);
  __Pyx_INCREF(__pyx_t_3);
  __pyx_v_listener = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "pyrobuf_list.pyx":1127
 *         self._n_items -= 1
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:             # <<<<<<<<<<<<<<
 *             listener._Modified()
 * 
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_listener, __pyx_n_s_is_present_in_parent); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1127; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1127; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_2 = ((!__pyx_t_1) != 0);
  if (__pyx_t_2) {

    /* "pyrobuf_list.pyx":1128
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:
 *             listener._Modified()             # <<<<<<<<<<<<<<
 * 
 *     def __getitem__(self, int i):
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_listener, __pyx_n_s_Modified); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = NULL;
    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_6, function);
      }
    }
    if (__pyx_t_7) {
      __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_7); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    } else {
      __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1128; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "pyrobuf_list.pyx":1127
 *         self._n_items -= 1
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:             # <<<<<<<<<<<<<<
 *             listener._Modified()
 * 
 */
  }

  /* "pyrobuf_list.pyx":1114
 *         return False
 * 
 *     def __delitem__(self, int i):             # <<<<<<<<<<<<<<
 *         if i < 0:
 *             i += <int>self._n_items
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("pyrobuf_list.IntList.__delitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_listener);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrobuf_list.pyx":1130
 *             listener._Modified()
 * 
 *     def __getitem__(self, int i):             # <<<<<<<<<<<<<<
 *         if i < 0:
 *             i += <int>self._n_items
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrobuf_list_7IntList_9__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_arg_i); /*proto*/
static PyObject *__pyx_pw_12pyrobuf_list_7IntList_9__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_arg_i) {
  int __pyx_v_i;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0);
  assert(__pyx_arg_i); {
    __pyx_v_i = __Pyx_PyInt_As_int(__pyx_arg_i); if (unlikely((__pyx_v_i == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1130; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyrobuf_list.IntList.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_12pyrobuf_list_7IntList_8__getitem__(((struct __pyx_obj_12pyrobuf_list_IntList *)__pyx_v_self), ((int)__pyx_v_i));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_12pyrobuf_list_7IntList_8__getitem__(struct __pyx_obj_12pyrobuf_list_IntList *__pyx_v_self, int __pyx_v_i) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__getitem__", 0);

  /* "pyrobuf_list.pyx":1131
 * 
 *     def __getitem__(self, int i):
 *         if i < 0:             # <<<<<<<<<<<<<<
 *             i += <int>self._n_items
 * 
 */
  __pyx_t_1 = ((__pyx_v_i < 0) != 0);
  if (__pyx_t_1) {

    /* "pyrobuf_list.pyx":1132
 *     def __getitem__(self, int i):
 *         if i < 0:
 *             i += <int>self._n_items             # <<<<<<<<<<<<<<
 * 
 *         if i < 0 or <size_t>i >= self._n_items or i < 0:
 */
    __pyx_v_i = (__pyx_v_i + ((int)__pyx_v_self->_n_items));

    /* "pyrobuf_list.pyx":1131
 * 
 *     def __getitem__(self, int i):
 *         if i < 0:             # <<<<<<<<<<<<<<
 *             i += <int>self._n_items
 * 
 */
  }

  /* "pyrobuf_list.pyx":1134
 *             i += <int>self._n_items
 * 
 *         if i < 0 or <size_t>i >= self._n_items or i < 0:             # <<<<<<<<<<<<<<
 *             raise IndexError("list index out of range")
 * 
 */
  __pyx_t_2 = ((__pyx_v_i < 0) != 0);
  if (!__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L5_bool_binop_done;
  }
  __pyx_t_2 = ((((size_t)__pyx_v_i) >= __pyx_v_self->_n_items) != 0);
  if (!__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L5_bool_binop_done;
  }
  __pyx_t_2 = ((__pyx_v_i < 0) != 0);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L5_bool_binop_done:;
  if (__pyx_t_1) {

    /* "pyrobuf_list.pyx":1135
 * 
 *         if i < 0 or <size_t>i >= self._n_items or i < 0:
 *             raise IndexError("list index out of range")             # <<<<<<<<<<<<<<
 * 
 *         return self._data[i]
 */
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_IndexError, __pyx_tuple__37, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1135; __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 = 1135; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

    /* "pyrobuf_list.pyx":1134
 *             i += <int>self._n_items
 * 
 *         if i < 0 or <size_t>i >= self._n_items or i < 0:             # <<<<<<<<<<<<<<
 *             raise IndexError("list index out of range")
 * 
 */
  }

  /* "pyrobuf_list.pyx":1137
 *             raise IndexError("list index out of range")
 * 
 *         return self._data[i]             # <<<<<<<<<<<<<<
 * 
 *     def __iter__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = __Pyx_PyInt_From_int((__pyx_v_self->_data[__pyx_v_i])); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1137; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "pyrobuf_list.pyx":1130
 *             listener._Modified()
 * 
 *     def __getitem__(self, int i):             # <<<<<<<<<<<<<<
 *         if i < 0:
 *             i += <int>self._n_items
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pyrobuf_list.IntList.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_12pyrobuf_list_7IntList_12generator4(__pyx_CoroutineObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */

/* "pyrobuf_list.pyx":1139
 *         return self._data[i]
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         cdef size_t idx = 0
 *         while idx < self._n_items:
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrobuf_list_7IntList_11__iter__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_12pyrobuf_list_7IntList_11__iter__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrobuf_list_7IntList_10__iter__(((struct __pyx_obj_12pyrobuf_list_IntList *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_12pyrobuf_list_7IntList_10__iter__(struct __pyx_obj_12pyrobuf_list_IntList *__pyx_v_self) {
  struct __pyx_obj_12pyrobuf_list___pyx_scope_struct_4___iter__ *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__iter__", 0);
  __pyx_cur_scope = (struct __pyx_obj_12pyrobuf_list___pyx_scope_struct_4___iter__ *)__pyx_tp_new_12pyrobuf_list___pyx_scope_struct_4___iter__(__pyx_ptype_12pyrobuf_list___pyx_scope_struct_4___iter__, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __Pyx_GOTREF(__pyx_cur_scope);
  __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
  __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  {
    __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_12pyrobuf_list_7IntList_12generator4, (PyObject *) __pyx_cur_scope, __pyx_n_s_iter, __pyx_n_s_IntList___iter); if (unlikely(!gen)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1139; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyrobuf_list.IntList.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_gb_12pyrobuf_list_7IntList_12generator4(__pyx_CoroutineObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_12pyrobuf_list___pyx_scope_struct_4___iter__ *__pyx_cur_scope = ((struct __pyx_obj_12pyrobuf_list___pyx_scope_struct_4___iter__ *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("None", 0);
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    case 1: goto __pyx_L6_resume_from_yield;
    default: /* CPython raises the right error here */
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __pyx_L3_first_run:;
  if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1139; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pyrobuf_list.pyx":1140
 * 
 *     def __iter__(self):
 *         cdef size_t idx = 0             # <<<<<<<<<<<<<<
 *         while idx < self._n_items:
 *             yield self._data[idx]
 */
  __pyx_cur_scope->__pyx_v_idx = 0;

  /* "pyrobuf_list.pyx":1141
 *     def __iter__(self):
 *         cdef size_t idx = 0
 *         while idx < self._n_items:             # <<<<<<<<<<<<<<
 *             yield self._data[idx]
 *             idx += 1
 */
  while (1) {
    __pyx_t_1 = ((__pyx_cur_scope->__pyx_v_idx < __pyx_cur_scope->__pyx_v_self->_n_items) != 0);
    if (!__pyx_t_1) break;

    /* "pyrobuf_list.pyx":1142
 *         cdef size_t idx = 0
 *         while idx < self._n_items:
 *             yield self._data[idx]             # <<<<<<<<<<<<<<
 *             idx += 1
 * 
 */
    __pyx_t_2 = __Pyx_PyInt_From_int((__pyx_cur_scope->__pyx_v_self->_data[__pyx_cur_scope->__pyx_v_idx])); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1142; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    __Pyx_XGIVEREF(__pyx_r);
    __Pyx_RefNannyFinishContext();
    /* return from generator, yielding value */
    __pyx_generator->resume_label = 1;
    return __pyx_r;
    __pyx_L6_resume_from_yield:;
    if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1142; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

    /* "pyrobuf_list.pyx":1143
 *         while idx < self._n_items:
 *             yield self._data[idx]
 *             idx += 1             # <<<<<<<<<<<<<<
 * 
 *     def __len__(self):
 */
    __pyx_cur_scope->__pyx_v_idx = (__pyx_cur_scope->__pyx_v_idx + 1);
  }

  /* "pyrobuf_list.pyx":1139
 *         return self._data[i]
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         cdef size_t idx = 0
 *         while idx < self._n_items:
 */

  /* function exit code */
  PyErr_SetNone(PyExc_StopIteration);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
  __pyx_generator->resume_label = -1;
  __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrobuf_list.pyx":1145
 *             idx += 1
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         return self._n_items
 * 
 */

/* Python wrapper */
static Py_ssize_t __pyx_pw_12pyrobuf_list_7IntList_14__len__(PyObject *__pyx_v_self); /*proto*/
static Py_ssize_t __pyx_pw_12pyrobuf_list_7IntList_14__len__(PyObject *__pyx_v_self) {
  Py_ssize_t __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__len__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrobuf_list_7IntList_13__len__(((struct __pyx_obj_12pyrobuf_list_IntList *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static Py_ssize_t __pyx_pf_12pyrobuf_list_7IntList_13__len__(struct __pyx_obj_12pyrobuf_list_IntList *__pyx_v_self) {
  Py_ssize_t __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__len__", 0);

  /* "pyrobuf_list.pyx":1146
 * 
 *     def __len__(self):
 *         return self._n_items             # <<<<<<<<<<<<<<
 * 
 *     def __repr__(self):
 */
  __pyx_r = __pyx_v_self->_n_items;
  goto __pyx_L0;

  /* "pyrobuf_list.pyx":1145
 *             idx += 1
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         return self._n_items
 * 
 */

  /* function exit code */
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrobuf_list.pyx":1148
 *         return self._n_items
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return repr(list(self))
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrobuf_list_7IntList_16__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_12pyrobuf_list_7IntList_16__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrobuf_list_7IntList_15__repr__(((struct __pyx_obj_12pyrobuf_list_IntList *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_12pyrobuf_list_7IntList_15__repr__(struct __pyx_obj_12pyrobuf_list_IntList *__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__", 0);

  /* "pyrobuf_list.pyx":1149
 * 
 *     def __repr__(self):
 *         return repr(list(self))             # <<<<<<<<<<<<<<
 * 
 *     def __setitem__(self, int i, int x):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PySequence_List(((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1149; __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 = 1149; __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;

  /* "pyrobuf_list.pyx":1148
 *         return self._n_items
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return repr(list(self))
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pyrobuf_list.IntList.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrobuf_list.pyx":1151
 *         return repr(list(self))
 * 
 *     def __setitem__(self, int i, int x):             # <<<<<<<<<<<<<<
 *         if i < 0:
 *             i += <int>self._n_items
 */

/* Python wrapper */
static int __pyx_pw_12pyrobuf_list_7IntList_18__setitem__(PyObject *__pyx_v_self, PyObject *__pyx_arg_i, PyObject *__pyx_arg_x); /*proto*/
static int __pyx_pw_12pyrobuf_list_7IntList_18__setitem__(PyObject *__pyx_v_self, PyObject *__pyx_arg_i, PyObject *__pyx_arg_x) {
  int __pyx_v_i;
  int __pyx_v_x;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setitem__ (wrapper)", 0);
  assert(__pyx_arg_i); {
    __pyx_v_i = __Pyx_PyInt_As_int(__pyx_arg_i); if (unlikely((__pyx_v_i == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1151; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  }
  assert(__pyx_arg_x); {
    __pyx_v_x = __Pyx_PyInt_As_int(__pyx_arg_x); if (unlikely((__pyx_v_x == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1151; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyrobuf_list.IntList.__setitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_12pyrobuf_list_7IntList_17__setitem__(((struct __pyx_obj_12pyrobuf_list_IntList *)__pyx_v_self), ((int)__pyx_v_i), ((int)__pyx_v_x));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_12pyrobuf_list_7IntList_17__setitem__(struct __pyx_obj_12pyrobuf_list_IntList *__pyx_v_self, int __pyx_v_i, int __pyx_v_x) {
  PyObject *__pyx_v_listener = NULL;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  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;
  __Pyx_RefNannySetupContext("__setitem__", 0);

  /* "pyrobuf_list.pyx":1152
 * 
 *     def __setitem__(self, int i, int x):
 *         if i < 0:             # <<<<<<<<<<<<<<
 *             i += <int>self._n_items
 * 
 */
  __pyx_t_1 = ((__pyx_v_i < 0) != 0);
  if (__pyx_t_1) {

    /* "pyrobuf_list.pyx":1153
 *     def __setitem__(self, int i, int x):
 *         if i < 0:
 *             i += <int>self._n_items             # <<<<<<<<<<<<<<
 * 
 *         if i < 0 or <size_t>i >= self._n_items:
 */
    __pyx_v_i = (__pyx_v_i + ((int)__pyx_v_self->_n_items));

    /* "pyrobuf_list.pyx":1152
 * 
 *     def __setitem__(self, int i, int x):
 *         if i < 0:             # <<<<<<<<<<<<<<
 *             i += <int>self._n_items
 * 
 */
  }

  /* "pyrobuf_list.pyx":1155
 *             i += <int>self._n_items
 * 
 *         if i < 0 or <size_t>i >= self._n_items:             # <<<<<<<<<<<<<<
 *             raise IndexError("list index out of range")
 * 
 */
  __pyx_t_2 = ((__pyx_v_i < 0) != 0);
  if (!__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L5_bool_binop_done;
  }
  __pyx_t_2 = ((((size_t)__pyx_v_i) >= __pyx_v_self->_n_items) != 0);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L5_bool_binop_done:;
  if (__pyx_t_1) {

    /* "pyrobuf_list.pyx":1156
 * 
 *         if i < 0 or <size_t>i >= self._n_items:
 *             raise IndexError("list index out of range")             # <<<<<<<<<<<<<<
 * 
 *         self._data[i] = x
 */
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_IndexError, __pyx_tuple__38, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1156; __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 = 1156; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

    /* "pyrobuf_list.pyx":1155
 *             i += <int>self._n_items
 * 
 *         if i < 0 or <size_t>i >= self._n_items:             # <<<<<<<<<<<<<<
 *             raise IndexError("list index out of range")
 * 
 */
  }

  /* "pyrobuf_list.pyx":1158
 *             raise IndexError("list index out of range")
 * 
 *         self._data[i] = x             # <<<<<<<<<<<<<<
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:
 */
  (__pyx_v_self->_data[__pyx_v_i]) = __pyx_v_x;

  /* "pyrobuf_list.pyx":1159
 * 
 *         self._data[i] = x
 *         listener = <object>self._listener             # <<<<<<<<<<<<<<
 *         if not listener._is_present_in_parent:
 *             listener._Modified()
 */
  __pyx_t_3 = ((PyObject *)__pyx_v_self->_listener);
  __Pyx_INCREF(__pyx_t_3);
  __pyx_v_listener = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "pyrobuf_list.pyx":1160
 *         self._data[i] = x
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:             # <<<<<<<<<<<<<<
 *             listener._Modified()
 * 
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_listener, __pyx_n_s_is_present_in_parent); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1160; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1160; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_2 = ((!__pyx_t_1) != 0);
  if (__pyx_t_2) {

    /* "pyrobuf_list.pyx":1161
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:
 *             listener._Modified()             # <<<<<<<<<<<<<<
 * 
 *     def __str__(self):
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_listener, __pyx_n_s_Modified); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1161; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = NULL;
    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    if (__pyx_t_5) {
      __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1161; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    } else {
      __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1161; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "pyrobuf_list.pyx":1160
 *         self._data[i] = x
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:             # <<<<<<<<<<<<<<
 *             listener._Modified()
 * 
 */
  }

  /* "pyrobuf_list.pyx":1151
 *         return repr(list(self))
 * 
 *     def __setitem__(self, int i, int x):             # <<<<<<<<<<<<<<
 *         if i < 0:
 *             i += <int>self._n_items
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pyrobuf_list.IntList.__setitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_listener);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrobuf_list.pyx":1163
 *             listener._Modified()
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return str(list(self))
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrobuf_list_7IntList_20__str__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_12pyrobuf_list_7IntList_20__str__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrobuf_list_7IntList_19__str__(((struct __pyx_obj_12pyrobuf_list_IntList *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_12pyrobuf_list_7IntList_19__str__(struct __pyx_obj_12pyrobuf_list_IntList *__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__", 0);

  /* "pyrobuf_list.pyx":1164
 * 
 *     def __str__(self):
 *         return str(list(self))             # <<<<<<<<<<<<<<
 * 
 *     def __getbuffer__(self, Py_buffer *buffer, int flags):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PySequence_List(((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1164; __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 = 1164; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)(&PyString_Type)), __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1164; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyrobuf_list.pyx":1163
 *             listener._Modified()
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return str(list(self))
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pyrobuf_list.IntList.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrobuf_list.pyx":1166
 *         return str(list(self))
 * 
 *     def __getbuffer__(self, Py_buffer *buffer, int flags):             # <<<<<<<<<<<<<<
 * 
 *         cdef Py_ssize_t itemsize = sizeof(int)
 */

/* Python wrapper */
static CYTHON_UNUSED int __pyx_pw_12pyrobuf_list_7IntList_22__getbuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_buffer, int __pyx_v_flags); /*proto*/
static CYTHON_UNUSED int __pyx_pw_12pyrobuf_list_7IntList_22__getbuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_buffer, int __pyx_v_flags) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__getbuffer__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrobuf_list_7IntList_21__getbuffer__(((struct __pyx_obj_12pyrobuf_list_IntList *)__pyx_v_self), ((Py_buffer *)__pyx_v_buffer), ((int)__pyx_v_flags));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_12pyrobuf_list_7IntList_21__getbuffer__(struct __pyx_obj_12pyrobuf_list_IntList *__pyx_v_self, Py_buffer *__pyx_v_buffer, CYTHON_UNUSED int __pyx_v_flags) {
  Py_ssize_t __pyx_v_itemsize;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  size_t __pyx_t_1;
  Py_ssize_t *__pyx_t_2;
  __Pyx_RefNannySetupContext("__getbuffer__", 0);
  if (__pyx_v_buffer != NULL) {
    __pyx_v_buffer->obj = Py_None; __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(__pyx_v_buffer->obj);
  }

  /* "pyrobuf_list.pyx":1168
 *     def __getbuffer__(self, Py_buffer *buffer, int flags):
 * 
 *         cdef Py_ssize_t itemsize = sizeof(int)             # <<<<<<<<<<<<<<
 *         self.shape[0] = self._n_items
 *         self.strides[0] = 1
 */
  __pyx_v_itemsize = (sizeof(int));

  /* "pyrobuf_list.pyx":1169
 * 
 *         cdef Py_ssize_t itemsize = sizeof(int)
 *         self.shape[0] = self._n_items             # <<<<<<<<<<<<<<
 *         self.strides[0] = 1
 * 
 */
  __pyx_t_1 = __pyx_v_self->_n_items;
  (__pyx_v_self->shape[0]) = __pyx_t_1;

  /* "pyrobuf_list.pyx":1170
 *         cdef Py_ssize_t itemsize = sizeof(int)
 *         self.shape[0] = self._n_items
 *         self.strides[0] = 1             # <<<<<<<<<<<<<<
 * 
 *         buffer.buf = <char *>(self._data)
 */
  (__pyx_v_self->strides[0]) = 1;

  /* "pyrobuf_list.pyx":1172
 *         self.strides[0] = 1
 * 
 *         buffer.buf = <char *>(self._data)             # <<<<<<<<<<<<<<
 *         buffer.format = 'i'
 *         buffer.internal = NULL                  # see References
 */
  __pyx_v_buffer->buf = ((char *)__pyx_v_self->_data);

  /* "pyrobuf_list.pyx":1173
 * 
 *         buffer.buf = <char *>(self._data)
 *         buffer.format = 'i'             # <<<<<<<<<<<<<<
 *         buffer.internal = NULL                  # see References
 *         buffer.itemsize = itemsize
 */
  __pyx_v_buffer->format = __pyx_k_i;

  /* "pyrobuf_list.pyx":1174
 *         buffer.buf = <char *>(self._data)
 *         buffer.format = 'i'
 *         buffer.internal = NULL                  # see References             # <<<<<<<<<<<<<<
 *         buffer.itemsize = itemsize
 *         buffer.len = self._n_items
 */
  __pyx_v_buffer->internal = NULL;

  /* "pyrobuf_list.pyx":1175
 *         buffer.format = 'i'
 *         buffer.internal = NULL                  # see References
 *         buffer.itemsize = itemsize             # <<<<<<<<<<<<<<
 *         buffer.len = self._n_items
 *         buffer.ndim = 1
 */
  __pyx_v_buffer->itemsize = __pyx_v_itemsize;

  /* "pyrobuf_list.pyx":1176
 *         buffer.internal = NULL                  # see References
 *         buffer.itemsize = itemsize
 *         buffer.len = self._n_items             # <<<<<<<<<<<<<<
 *         buffer.ndim = 1
 *         buffer.obj = self
 */
  __pyx_t_1 = __pyx_v_self->_n_items;
  __pyx_v_buffer->len = __pyx_t_1;

  /* "pyrobuf_list.pyx":1177
 *         buffer.itemsize = itemsize
 *         buffer.len = self._n_items
 *         buffer.ndim = 1             # <<<<<<<<<<<<<<
 *         buffer.obj = self
 *         buffer.readonly = 1
 */
  __pyx_v_buffer->ndim = 1;

  /* "pyrobuf_list.pyx":1178
 *         buffer.len = self._n_items
 *         buffer.ndim = 1
 *         buffer.obj = self             # <<<<<<<<<<<<<<
 *         buffer.readonly = 1
 *         buffer.shape = self.shape
 */
  __Pyx_INCREF(((PyObject *)__pyx_v_self));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
  __Pyx_GOTREF(__pyx_v_buffer->obj);
  __Pyx_DECREF(__pyx_v_buffer->obj);
  __pyx_v_buffer->obj = ((PyObject *)__pyx_v_self);

  /* "pyrobuf_list.pyx":1179
 *         buffer.ndim = 1
 *         buffer.obj = self
 *         buffer.readonly = 1             # <<<<<<<<<<<<<<
 *         buffer.shape = self.shape
 *         buffer.strides = self.strides
 */
  __pyx_v_buffer->readonly = 1;

  /* "pyrobuf_list.pyx":1180
 *         buffer.obj = self
 *         buffer.readonly = 1
 *         buffer.shape = self.shape             # <<<<<<<<<<<<<<
 *         buffer.strides = self.strides
 *         buffer.suboffsets = NULL                # for pointer arrays only
 */
  __pyx_t_2 = __pyx_v_self->shape;
  __pyx_v_buffer->shape = __pyx_t_2;

  /* "pyrobuf_list.pyx":1181
 *         buffer.readonly = 1
 *         buffer.shape = self.shape
 *         buffer.strides = self.strides             # <<<<<<<<<<<<<<
 *         buffer.suboffsets = NULL                # for pointer arrays only
 * 
 */
  __pyx_t_2 = __pyx_v_self->strides;
  __pyx_v_buffer->strides = __pyx_t_2;

  /* "pyrobuf_list.pyx":1182
 *         buffer.shape = self.shape
 *         buffer.strides = self.strides
 *         buffer.suboffsets = NULL                # for pointer arrays only             # <<<<<<<<<<<<<<
 * 
 *     def __releasebuffer__(self, Py_buffer *buffer):
 */
  __pyx_v_buffer->suboffsets = NULL;

  /* "pyrobuf_list.pyx":1166
 *         return str(list(self))
 * 
 *     def __getbuffer__(self, Py_buffer *buffer, int flags):             # <<<<<<<<<<<<<<
 * 
 *         cdef Py_ssize_t itemsize = sizeof(int)
 */

  /* function exit code */
  __pyx_r = 0;
  if (__pyx_v_buffer != NULL && __pyx_v_buffer->obj == Py_None) {
    __Pyx_GOTREF(Py_None);
    __Pyx_DECREF(Py_None); __pyx_v_buffer->obj = NULL;
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrobuf_list.pyx":1184
 *         buffer.suboffsets = NULL                # for pointer arrays only
 * 
 *     def __releasebuffer__(self, Py_buffer *buffer):             # <<<<<<<<<<<<<<
 *         pass
 * 
 */

/* Python wrapper */
static CYTHON_UNUSED void __pyx_pw_12pyrobuf_list_7IntList_24__releasebuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_buffer); /*proto*/
static CYTHON_UNUSED void __pyx_pw_12pyrobuf_list_7IntList_24__releasebuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_buffer) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__releasebuffer__ (wrapper)", 0);
  __pyx_pf_12pyrobuf_list_7IntList_23__releasebuffer__(((struct __pyx_obj_12pyrobuf_list_IntList *)__pyx_v_self), ((Py_buffer *)__pyx_v_buffer));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

static void __pyx_pf_12pyrobuf_list_7IntList_23__releasebuffer__(CYTHON_UNUSED struct __pyx_obj_12pyrobuf_list_IntList *__pyx_v_self, CYTHON_UNUSED Py_buffer *__pyx_v_buffer) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__releasebuffer__", 0);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

/* "pyrobuf_list.pyx":1187
 *         pass
 * 
 *     cpdef append(self, int x):             # <<<<<<<<<<<<<<
 *         self._append(x)
 *         listener = <object>self._listener
 */

static PyObject *__pyx_pw_12pyrobuf_list_7IntList_26append(PyObject *__pyx_v_self, PyObject *__pyx_arg_x); /*proto*/
static PyObject *__pyx_f_12pyrobuf_list_7IntList_append(struct __pyx_obj_12pyrobuf_list_IntList *__pyx_v_self, int __pyx_v_x, int __pyx_skip_dispatch) {
  PyObject *__pyx_v_listener = NULL;
  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;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  int __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("append", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_append); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1187; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_12pyrobuf_list_7IntList_26append)) {
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_x); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1187; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_4 = __pyx_t_1; __pyx_t_5 = NULL;
      if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_4))) {
        __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
        if (likely(__pyx_t_5)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_5);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_4, function);
        }
      }
      if (!__pyx_t_5) {
        __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1187; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_GOTREF(__pyx_t_2);
      } else {
        __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1187; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL;
        __Pyx_GIVEREF(__pyx_t_3);
        PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_3);
        __pyx_t_3 = 0;
        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1187; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 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;
  }

  /* "pyrobuf_list.pyx":1188
 * 
 *     cpdef append(self, int x):
 *         self._append(x)             # <<<<<<<<<<<<<<
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:
 */
  ((struct __pyx_vtabstruct_12pyrobuf_list_IntList *)__pyx_v_self->__pyx_vtab)->_append(__pyx_v_self, __pyx_v_x);

  /* "pyrobuf_list.pyx":1189
 *     cpdef append(self, int x):
 *         self._append(x)
 *         listener = <object>self._listener             # <<<<<<<<<<<<<<
 *         if not listener._is_present_in_parent:
 *             listener._Modified()
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_self->_listener);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_v_listener = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pyrobuf_list.pyx":1190
 *         self._append(x)
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:             # <<<<<<<<<<<<<<
 *             listener._Modified()
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_listener, __pyx_n_s_is_present_in_parent); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1190; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1190; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_8 = ((!__pyx_t_7) != 0);
  if (__pyx_t_8) {

    /* "pyrobuf_list.pyx":1191
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:
 *             listener._Modified()             # <<<<<<<<<<<<<<
 * 
 *     cpdef extend(self, IntList x):
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_listener, __pyx_n_s_Modified); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1191; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = NULL;
    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    if (__pyx_t_4) {
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1191; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    } else {
      __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1191; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "pyrobuf_list.pyx":1190
 *         self._append(x)
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:             # <<<<<<<<<<<<<<
 *             listener._Modified()
 * 
 */
  }

  /* "pyrobuf_list.pyx":1187
 *         pass
 * 
 *     cpdef append(self, int x):             # <<<<<<<<<<<<<<
 *         self._append(x)
 *         listener = <object>self._listener
 */

  /* function exit code */
  __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_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("pyrobuf_list.IntList.append", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_listener);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrobuf_list_7IntList_26append(PyObject *__pyx_v_self, PyObject *__pyx_arg_x); /*proto*/
static PyObject *__pyx_pw_12pyrobuf_list_7IntList_26append(PyObject *__pyx_v_self, PyObject *__pyx_arg_x) {
  int __pyx_v_x;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("append (wrapper)", 0);
  assert(__pyx_arg_x); {
    __pyx_v_x = __Pyx_PyInt_As_int(__pyx_arg_x); if (unlikely((__pyx_v_x == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1187; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyrobuf_list.IntList.append", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_12pyrobuf_list_7IntList_25append(((struct __pyx_obj_12pyrobuf_list_IntList *)__pyx_v_self), ((int)__pyx_v_x));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_12pyrobuf_list_7IntList_25append(struct __pyx_obj_12pyrobuf_list_IntList *__pyx_v_self, int __pyx_v_x) {
  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", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_12pyrobuf_list_7IntList_append(__pyx_v_self, __pyx_v_x, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1187; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyrobuf_list.IntList.append", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrobuf_list.pyx":1193
 *             listener._Modified()
 * 
 *     cpdef extend(self, IntList x):             # <<<<<<<<<<<<<<
 *         cdef int *mem
 *         cdef size_t new_len = self._n_items + len(x)
 */

static PyObject *__pyx_pw_12pyrobuf_list_7IntList_28extend(PyObject *__pyx_v_self, PyObject *__pyx_v_x); /*proto*/
static PyObject *__pyx_f_12pyrobuf_list_7IntList_extend(struct __pyx_obj_12pyrobuf_list_IntList *__pyx_v_self, struct __pyx_obj_12pyrobuf_list_IntList *__pyx_v_x, int __pyx_skip_dispatch) {
  int *__pyx_v_mem;
  size_t __pyx_v_new_len;
  size_t __pyx_v_new_size;
  int __pyx_v_i;
  PyObject *__pyx_v_listener = NULL;
  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;
  PyObject *__pyx_t_5 = NULL;
  Py_ssize_t __pyx_t_6;
  int __pyx_t_7;
  size_t __pyx_t_8;
  size_t __pyx_t_9;
  size_t __pyx_t_10;
  int __pyx_t_11;
  int __pyx_t_12;
  int __pyx_t_13;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("extend", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_extend); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1193; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_12pyrobuf_list_7IntList_28extend)) {
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
      if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_4)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
        }
      }
      if (!__pyx_t_4) {
        __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_v_x)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1193; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
      } else {
        __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1193; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL;
        __Pyx_INCREF(((PyObject *)__pyx_v_x));
        __Pyx_GIVEREF(((PyObject *)__pyx_v_x));
        PyTuple_SET_ITEM(__pyx_t_5, 0+1, ((PyObject *)__pyx_v_x));
        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1193; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      }
      __Pyx_DECREF(__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;
  }

  /* "pyrobuf_list.pyx":1195
 *     cpdef extend(self, IntList x):
 *         cdef int *mem
 *         cdef size_t new_len = self._n_items + len(x)             # <<<<<<<<<<<<<<
 *         cdef size_t new_size
 *         cdef int i
 */
  __pyx_t_6 = PyObject_Length(((PyObject *)__pyx_v_x)); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1195; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_new_len = (__pyx_v_self->_n_items + __pyx_t_6);

  /* "pyrobuf_list.pyx":1199
 *         cdef int i
 * 
 *         if new_len > self._size:             # <<<<<<<<<<<<<<
 *             new_size = max(new_len, 2 * self._size)
 *             mem = <int *>PyMem_Realloc(self._data, new_size * sizeof(int))
 */
  __pyx_t_7 = ((__pyx_v_new_len > __pyx_v_self->_size) != 0);
  if (__pyx_t_7) {

    /* "pyrobuf_list.pyx":1200
 * 
 *         if new_len > self._size:
 *             new_size = max(new_len, 2 * self._size)             # <<<<<<<<<<<<<<
 *             mem = <int *>PyMem_Realloc(self._data, new_size * sizeof(int))
 *             if not mem:
 */
    __pyx_t_8 = (2 * __pyx_v_self->_size);
    __pyx_t_9 = __pyx_v_new_len;
    if (((__pyx_t_8 > __pyx_t_9) != 0)) {
      __pyx_t_10 = __pyx_t_8;
    } else {
      __pyx_t_10 = __pyx_t_9;
    }
    __pyx_v_new_size = __pyx_t_10;

    /* "pyrobuf_list.pyx":1201
 *         if new_len > self._size:
 *             new_size = max(new_len, 2 * self._size)
 *             mem = <int *>PyMem_Realloc(self._data, new_size * sizeof(int))             # <<<<<<<<<<<<<<
 *             if not mem:
 *                 raise MemoryError()
 */
    __pyx_v_mem = ((int *)PyMem_Realloc(__pyx_v_self->_data, (__pyx_v_new_size * (sizeof(int)))));

    /* "pyrobuf_list.pyx":1202
 *             new_size = max(new_len, 2 * self._size)
 *             mem = <int *>PyMem_Realloc(self._data, new_size * sizeof(int))
 *             if not mem:             # <<<<<<<<<<<<<<
 *                 raise MemoryError()
 * 
 */
    __pyx_t_7 = ((!(__pyx_v_mem != 0)) != 0);
    if (__pyx_t_7) {

      /* "pyrobuf_list.pyx":1203
 *             mem = <int *>PyMem_Realloc(self._data, new_size * sizeof(int))
 *             if not mem:
 *                 raise MemoryError()             # <<<<<<<<<<<<<<
 * 
 *             self._data = mem
 */
      PyErr_NoMemory(); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1203; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

      /* "pyrobuf_list.pyx":1202
 *             new_size = max(new_len, 2 * self._size)
 *             mem = <int *>PyMem_Realloc(self._data, new_size * sizeof(int))
 *             if not mem:             # <<<<<<<<<<<<<<
 *                 raise MemoryError()
 * 
 */
    }

    /* "pyrobuf_list.pyx":1205
 *                 raise MemoryError()
 * 
 *             self._data = mem             # <<<<<<<<<<<<<<
 *             self._size = new_size
 * 
 */
    __pyx_v_self->_data = __pyx_v_mem;

    /* "pyrobuf_list.pyx":1206
 * 
 *             self._data = mem
 *             self._size = new_size             # <<<<<<<<<<<<<<
 * 
 *         for i in range(len(x)):
 */
    __pyx_v_self->_size = __pyx_v_new_size;

    /* "pyrobuf_list.pyx":1199
 *         cdef int i
 * 
 *         if new_len > self._size:             # <<<<<<<<<<<<<<
 *             new_size = max(new_len, 2 * self._size)
 *             mem = <int *>PyMem_Realloc(self._data, new_size * sizeof(int))
 */
  }

  /* "pyrobuf_list.pyx":1208
 *             self._size = new_size
 * 
 *         for i in range(len(x)):             # <<<<<<<<<<<<<<
 *             self._data[self._n_items + i] = x[i]
 * 
 */
  __pyx_t_6 = PyObject_Length(((PyObject *)__pyx_v_x)); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1208; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_6; __pyx_t_11+=1) {
    __pyx_v_i = __pyx_t_11;

    /* "pyrobuf_list.pyx":1209
 * 
 *         for i in range(len(x)):
 *             self._data[self._n_items + i] = x[i]             # <<<<<<<<<<<<<<
 * 
 *         if new_len != self._n_items:
 */
    __pyx_t_1 = __Pyx_GetItemInt(((PyObject *)__pyx_v_x), __pyx_v_i, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1209; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_12 = __Pyx_PyInt_As_int(__pyx_t_1); if (unlikely((__pyx_t_12 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1209; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    (__pyx_v_self->_data[(__pyx_v_self->_n_items + __pyx_v_i)]) = __pyx_t_12;
  }

  /* "pyrobuf_list.pyx":1211
 *             self._data[self._n_items + i] = x[i]
 * 
 *         if new_len != self._n_items:             # <<<<<<<<<<<<<<
 *             listener = <object>self._listener
 *             if not listener._is_present_in_parent:
 */
  __pyx_t_7 = ((__pyx_v_new_len != __pyx_v_self->_n_items) != 0);
  if (__pyx_t_7) {

    /* "pyrobuf_list.pyx":1212
 * 
 *         if new_len != self._n_items:
 *             listener = <object>self._listener             # <<<<<<<<<<<<<<
 *             if not listener._is_present_in_parent:
 *                 listener._Modified()
 */
    __pyx_t_1 = ((PyObject *)__pyx_v_self->_listener);
    __Pyx_INCREF(__pyx_t_1);
    __pyx_v_listener = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "pyrobuf_list.pyx":1213
 *         if new_len != self._n_items:
 *             listener = <object>self._listener
 *             if not listener._is_present_in_parent:             # <<<<<<<<<<<<<<
 *                 listener._Modified()
 *         self._n_items = new_len
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_listener, __pyx_n_s_is_present_in_parent); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1213; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1213; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_13 = ((!__pyx_t_7) != 0);
    if (__pyx_t_13) {

      /* "pyrobuf_list.pyx":1214
 *             listener = <object>self._listener
 *             if not listener._is_present_in_parent:
 *                 listener._Modified()             # <<<<<<<<<<<<<<
 *         self._n_items = new_len
 * 
 */
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_listener, __pyx_n_s_Modified); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1214; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = NULL;
      if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
        __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
        if (likely(__pyx_t_3)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_2, function);
        }
      }
      if (__pyx_t_3) {
        __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1214; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      } else {
        __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1214; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "pyrobuf_list.pyx":1213
 *         if new_len != self._n_items:
 *             listener = <object>self._listener
 *             if not listener._is_present_in_parent:             # <<<<<<<<<<<<<<
 *                 listener._Modified()
 *         self._n_items = new_len
 */
    }

    /* "pyrobuf_list.pyx":1211
 *             self._data[self._n_items + i] = x[i]
 * 
 *         if new_len != self._n_items:             # <<<<<<<<<<<<<<
 *             listener = <object>self._listener
 *             if not listener._is_present_in_parent:
 */
  }

  /* "pyrobuf_list.pyx":1215
 *             if not listener._is_present_in_parent:
 *                 listener._Modified()
 *         self._n_items = new_len             # <<<<<<<<<<<<<<
 * 
 *     cpdef insert(self, int i, int x):
 */
  __pyx_v_self->_n_items = __pyx_v_new_len;

  /* "pyrobuf_list.pyx":1193
 *             listener._Modified()
 * 
 *     cpdef extend(self, IntList x):             # <<<<<<<<<<<<<<
 *         cdef int *mem
 *         cdef size_t new_len = self._n_items + len(x)
 */

  /* function exit code */
  __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_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pyrobuf_list.IntList.extend", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_listener);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrobuf_list_7IntList_28extend(PyObject *__pyx_v_self, PyObject *__pyx_v_x); /*proto*/
static PyObject *__pyx_pw_12pyrobuf_list_7IntList_28extend(PyObject *__pyx_v_self, PyObject *__pyx_v_x) {
  CYTHON_UNUSED int __pyx_lineno = 0;
  CYTHON_UNUSED const char *__pyx_filename = NULL;
  CYTHON_UNUSED int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("extend (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_x), __pyx_ptype_12pyrobuf_list_IntList, 1, "x", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1193; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_12pyrobuf_list_7IntList_27extend(((struct __pyx_obj_12pyrobuf_list_IntList *)__pyx_v_self), ((struct __pyx_obj_12pyrobuf_list_IntList *)__pyx_v_x));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_12pyrobuf_list_7IntList_27extend(struct __pyx_obj_12pyrobuf_list_IntList *__pyx_v_self, struct __pyx_obj_12pyrobuf_list_IntList *__pyx_v_x) {
  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", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_12pyrobuf_list_7IntList_extend(__pyx_v_self, __pyx_v_x, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1193; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyrobuf_list.IntList.extend", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrobuf_list.pyx":1217
 *         self._n_items = new_len
 * 
 *     cpdef insert(self, int i, int x):             # <<<<<<<<<<<<<<
 *         cdef int *mem
 *         cdef size_t j
 */

static PyObject *__pyx_pw_12pyrobuf_list_7IntList_30insert(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_12pyrobuf_list_7IntList_insert(struct __pyx_obj_12pyrobuf_list_IntList *__pyx_v_self, int __pyx_v_i, int __pyx_v_x, int __pyx_skip_dispatch) {
  int *__pyx_v_mem;
  size_t __pyx_v_j;
  PyObject *__pyx_v_listener = NULL;
  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;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  Py_ssize_t __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  int __pyx_t_10;
  size_t __pyx_t_11;
  size_t __pyx_t_12;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("insert", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_insert); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1217; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_12pyrobuf_list_7IntList_30insert)) {
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_i); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1217; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = __Pyx_PyInt_From_int(__pyx_v_x); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1217; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_5 = __pyx_t_1; __pyx_t_6 = NULL;
      __pyx_t_7 = 0;
      if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_5))) {
        __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
        if (likely(__pyx_t_6)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
          __Pyx_INCREF(__pyx_t_6);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_5, function);
          __pyx_t_7 = 1;
        }
      }
      __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1217; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_8);
      if (__pyx_t_6) {
        __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL;
      }
      __Pyx_GIVEREF(__pyx_t_3);
      PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_t_3);
      __Pyx_GIVEREF(__pyx_t_4);
      PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_t_4);
      __pyx_t_3 = 0;
      __pyx_t_4 = 0;
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1217; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 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;
  }

  /* "pyrobuf_list.pyx":1221
 *         cdef size_t j
 * 
 *         if i < 0:             # <<<<<<<<<<<<<<
 *             i += <int>self._n_items
 * 
 */
  __pyx_t_9 = ((__pyx_v_i < 0) != 0);
  if (__pyx_t_9) {

    /* "pyrobuf_list.pyx":1222
 * 
 *         if i < 0:
 *             i += <int>self._n_items             # <<<<<<<<<<<<<<
 * 
 *         if i < 0 or <size_t>i > self._n_items:
 */
    __pyx_v_i = (__pyx_v_i + ((int)__pyx_v_self->_n_items));

    /* "pyrobuf_list.pyx":1221
 *         cdef size_t j
 * 
 *         if i < 0:             # <<<<<<<<<<<<<<
 *             i += <int>self._n_items
 * 
 */
  }

  /* "pyrobuf_list.pyx":1224
 *             i += <int>self._n_items
 * 
 *         if i < 0 or <size_t>i > self._n_items:             # <<<<<<<<<<<<<<
 *             raise IndexError("list index out of range")
 * 
 */
  __pyx_t_10 = ((__pyx_v_i < 0) != 0);
  if (!__pyx_t_10) {
  } else {
    __pyx_t_9 = __pyx_t_10;
    goto __pyx_L5_bool_binop_done;
  }
  __pyx_t_10 = ((((size_t)__pyx_v_i) > __pyx_v_self->_n_items) != 0);
  __pyx_t_9 = __pyx_t_10;
  __pyx_L5_bool_binop_done:;
  if (__pyx_t_9) {

    /* "pyrobuf_list.pyx":1225
 * 
 *         if i < 0 or <size_t>i > self._n_items:
 *             raise IndexError("list index out of range")             # <<<<<<<<<<<<<<
 * 
 *         if self._n_items == self._size:
 */
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_IndexError, __pyx_tuple__39, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1225; __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 = 1225; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

    /* "pyrobuf_list.pyx":1224
 *             i += <int>self._n_items
 * 
 *         if i < 0 or <size_t>i > self._n_items:             # <<<<<<<<<<<<<<
 *             raise IndexError("list index out of range")
 * 
 */
  }

  /* "pyrobuf_list.pyx":1227
 *             raise IndexError("list index out of range")
 * 
 *         if self._n_items == self._size:             # <<<<<<<<<<<<<<
 *             mem = <int *>PyMem_Realloc(self._data, 2 * self._size * sizeof(int))
 *             if not mem:
 */
  __pyx_t_9 = ((__pyx_v_self->_n_items == __pyx_v_self->_size) != 0);
  if (__pyx_t_9) {

    /* "pyrobuf_list.pyx":1228
 * 
 *         if self._n_items == self._size:
 *             mem = <int *>PyMem_Realloc(self._data, 2 * self._size * sizeof(int))             # <<<<<<<<<<<<<<
 *             if not mem:
 *                 raise MemoryError()
 */
    __pyx_v_mem = ((int *)PyMem_Realloc(__pyx_v_self->_data, ((2 * __pyx_v_self->_size) * (sizeof(int)))));

    /* "pyrobuf_list.pyx":1229
 *         if self._n_items == self._size:
 *             mem = <int *>PyMem_Realloc(self._data, 2 * self._size * sizeof(int))
 *             if not mem:             # <<<<<<<<<<<<<<
 *                 raise MemoryError()
 * 
 */
    __pyx_t_9 = ((!(__pyx_v_mem != 0)) != 0);
    if (__pyx_t_9) {

      /* "pyrobuf_list.pyx":1230
 *             mem = <int *>PyMem_Realloc(self._data, 2 * self._size * sizeof(int))
 *             if not mem:
 *                 raise MemoryError()             # <<<<<<<<<<<<<<
 * 
 *             self._data = mem
 */
      PyErr_NoMemory(); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1230; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

      /* "pyrobuf_list.pyx":1229
 *         if self._n_items == self._size:
 *             mem = <int *>PyMem_Realloc(self._data, 2 * self._size * sizeof(int))
 *             if not mem:             # <<<<<<<<<<<<<<
 *                 raise MemoryError()
 * 
 */
    }

    /* "pyrobuf_list.pyx":1232
 *                 raise MemoryError()
 * 
 *             self._data = mem             # <<<<<<<<<<<<<<
 *             self._size *= 2
 * 
 */
    __pyx_v_self->_data = __pyx_v_mem;

    /* "pyrobuf_list.pyx":1233
 * 
 *             self._data = mem
 *             self._size *= 2             # <<<<<<<<<<<<<<
 * 
 *         for j in range(self._n_items, <size_t>i, -1):
 */
    __pyx_v_self->_size = (__pyx_v_self->_size * 2);

    /* "pyrobuf_list.pyx":1227
 *             raise IndexError("list index out of range")
 * 
 *         if self._n_items == self._size:             # <<<<<<<<<<<<<<
 *             mem = <int *>PyMem_Realloc(self._data, 2 * self._size * sizeof(int))
 *             if not mem:
 */
  }

  /* "pyrobuf_list.pyx":1235
 *             self._size *= 2
 * 
 *         for j in range(self._n_items, <size_t>i, -1):             # <<<<<<<<<<<<<<
 *             self._data[j] = self._data[j - 1]
 * 
 */
  __pyx_t_11 = ((size_t)__pyx_v_i);
  for (__pyx_t_12 = __pyx_v_self->_n_items + 1; __pyx_t_12 > __pyx_t_11 + 1; ) { __pyx_t_12-=1;
    __pyx_v_j = __pyx_t_12;

    /* "pyrobuf_list.pyx":1236
 * 
 *         for j in range(self._n_items, <size_t>i, -1):
 *             self._data[j] = self._data[j - 1]             # <<<<<<<<<<<<<<
 * 
 *         self._data[i] = x
 */
    (__pyx_v_self->_data[__pyx_v_j]) = (__pyx_v_self->_data[(__pyx_v_j - 1)]);
  }

  /* "pyrobuf_list.pyx":1238
 *             self._data[j] = self._data[j - 1]
 * 
 *         self._data[i] = x             # <<<<<<<<<<<<<<
 *         self._n_items += 1
 *         listener = <object>self._listener
 */
  (__pyx_v_self->_data[__pyx_v_i]) = __pyx_v_x;

  /* "pyrobuf_list.pyx":1239
 * 
 *         self._data[i] = x
 *         self._n_items += 1             # <<<<<<<<<<<<<<
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:
 */
  __pyx_v_self->_n_items = (__pyx_v_self->_n_items + 1);

  /* "pyrobuf_list.pyx":1240
 *         self._data[i] = x
 *         self._n_items += 1
 *         listener = <object>self._listener             # <<<<<<<<<<<<<<
 *         if not listener._is_present_in_parent:
 *             listener._Modified()
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_self->_listener);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_v_listener = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pyrobuf_list.pyx":1241
 *         self._n_items += 1
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:             # <<<<<<<<<<<<<<
 *             listener._Modified()
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_listener, __pyx_n_s_is_present_in_parent); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1241; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1241; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_10 = ((!__pyx_t_9) != 0);
  if (__pyx_t_10) {

    /* "pyrobuf_list.pyx":1242
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:
 *             listener._Modified()             # <<<<<<<<<<<<<<
 * 
 *     cpdef pop(self):
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_listener, __pyx_n_s_Modified); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1242; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_5 = NULL;
    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    if (__pyx_t_5) {
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_5); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1242; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    } else {
      __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1242; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "pyrobuf_list.pyx":1241
 *         self._n_items += 1
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:             # <<<<<<<<<<<<<<
 *             listener._Modified()
 * 
 */
  }

  /* "pyrobuf_list.pyx":1217
 *         self._n_items = new_len
 * 
 *     cpdef insert(self, int i, int x):             # <<<<<<<<<<<<<<
 *         cdef int *mem
 *         cdef size_t j
 */

  /* function exit code */
  __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_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("pyrobuf_list.IntList.insert", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_listener);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrobuf_list_7IntList_30insert(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_12pyrobuf_list_7IntList_30insert(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_v_i;
  int __pyx_v_x;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("insert (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_i,&__pyx_n_s_x,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_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 (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_x)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("insert", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1217; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "insert") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1217; __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_i = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_i == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1217; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    __pyx_v_x = __Pyx_PyInt_As_int(values[1]); if (unlikely((__pyx_v_x == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1217; __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 = 1217; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyrobuf_list.IntList.insert", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_12pyrobuf_list_7IntList_29insert(((struct __pyx_obj_12pyrobuf_list_IntList *)__pyx_v_self), __pyx_v_i, __pyx_v_x);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_12pyrobuf_list_7IntList_29insert(struct __pyx_obj_12pyrobuf_list_IntList *__pyx_v_self, int __pyx_v_i, int __pyx_v_x) {
  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("insert", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_12pyrobuf_list_7IntList_insert(__pyx_v_self, __pyx_v_i, __pyx_v_x, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1217; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyrobuf_list.IntList.insert", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrobuf_list.pyx":1244
 *             listener._Modified()
 * 
 *     cpdef pop(self):             # <<<<<<<<<<<<<<
 *         if self._n_items == 0:
 *             raise IndexError("pop from empty list")
 */

static PyObject *__pyx_pw_12pyrobuf_list_7IntList_32pop(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_f_12pyrobuf_list_7IntList_pop(struct __pyx_obj_12pyrobuf_list_IntList *__pyx_v_self, int __pyx_skip_dispatch) {
  PyObject *__pyx_v_listener = NULL;
  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;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("pop", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_pop); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1244; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_12pyrobuf_list_7IntList_32pop)) {
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
      if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_4)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
        }
      }
      if (__pyx_t_4) {
        __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1244; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else {
        __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1244; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__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;
  }

  /* "pyrobuf_list.pyx":1245
 * 
 *     cpdef pop(self):
 *         if self._n_items == 0:             # <<<<<<<<<<<<<<
 *             raise IndexError("pop from empty list")
 * 
 */
  __pyx_t_5 = ((__pyx_v_self->_n_items == 0) != 0);
  if (__pyx_t_5) {

    /* "pyrobuf_list.pyx":1246
 *     cpdef pop(self):
 *         if self._n_items == 0:
 *             raise IndexError("pop from empty list")             # <<<<<<<<<<<<<<
 * 
 *         self._n_items -= 1
 */
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_IndexError, __pyx_tuple__40, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1246; __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 = 1246; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

    /* "pyrobuf_list.pyx":1245
 * 
 *     cpdef pop(self):
 *         if self._n_items == 0:             # <<<<<<<<<<<<<<
 *             raise IndexError("pop from empty list")
 * 
 */
  }

  /* "pyrobuf_list.pyx":1248
 *             raise IndexError("pop from empty list")
 * 
 *         self._n_items -= 1             # <<<<<<<<<<<<<<
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:
 */
  __pyx_v_self->_n_items = (__pyx_v_self->_n_items - 1);

  /* "pyrobuf_list.pyx":1249
 * 
 *         self._n_items -= 1
 *         listener = <object>self._listener             # <<<<<<<<<<<<<<
 *         if not listener._is_present_in_parent:
 *             listener._Modified()
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_self->_listener);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_v_listener = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pyrobuf_list.pyx":1250
 *         self._n_items -= 1
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:             # <<<<<<<<<<<<<<
 *             listener._Modified()
 *         return self._data[self._n_items]
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_listener, __pyx_n_s_is_present_in_parent); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1250; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1250; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_6 = ((!__pyx_t_5) != 0);
  if (__pyx_t_6) {

    /* "pyrobuf_list.pyx":1251
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:
 *             listener._Modified()             # <<<<<<<<<<<<<<
 *         return self._data[self._n_items]
 * 
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_listener, __pyx_n_s_Modified); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1251; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = NULL;
    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    if (__pyx_t_3) {
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1251; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    } else {
      __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1251; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "pyrobuf_list.pyx":1250
 *         self._n_items -= 1
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:             # <<<<<<<<<<<<<<
 *             listener._Modified()
 *         return self._data[self._n_items]
 */
  }

  /* "pyrobuf_list.pyx":1252
 *         if not listener._is_present_in_parent:
 *             listener._Modified()
 *         return self._data[self._n_items]             # <<<<<<<<<<<<<<
 * 
 *     cpdef remove(self, int x):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_int((__pyx_v_self->_data[__pyx_v_self->_n_items])); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1252; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyrobuf_list.pyx":1244
 *             listener._Modified()
 * 
 *     cpdef pop(self):             # <<<<<<<<<<<<<<
 *         if self._n_items == 0:
 *             raise IndexError("pop from empty list")
 */

  /* function exit code */
  __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("pyrobuf_list.IntList.pop", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_listener);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrobuf_list_7IntList_32pop(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_12pyrobuf_list_7IntList_32pop(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("pop (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrobuf_list_7IntList_31pop(((struct __pyx_obj_12pyrobuf_list_IntList *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_12pyrobuf_list_7IntList_31pop(struct __pyx_obj_12pyrobuf_list_IntList *__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("pop", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_12pyrobuf_list_7IntList_pop(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1244; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyrobuf_list.IntList.pop", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrobuf_list.pyx":1254
 *         return self._data[self._n_items]
 * 
 *     cpdef remove(self, int x):             # <<<<<<<<<<<<<<
 *         cdef size_t i
 *         cdef size_t j
 */

static PyObject *__pyx_pw_12pyrobuf_list_7IntList_34remove(PyObject *__pyx_v_self, PyObject *__pyx_arg_x); /*proto*/
static PyObject *__pyx_f_12pyrobuf_list_7IntList_remove(struct __pyx_obj_12pyrobuf_list_IntList *__pyx_v_self, int __pyx_v_x, int __pyx_skip_dispatch) {
  size_t __pyx_v_i;
  size_t __pyx_v_j;
  int __pyx_v_found;
  PyObject *__pyx_v_listener = NULL;
  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;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  size_t __pyx_t_7;
  size_t __pyx_t_8;
  int __pyx_t_9;
  int __pyx_t_10;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("remove", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_remove); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1254; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_12pyrobuf_list_7IntList_34remove)) {
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_x); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1254; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_4 = __pyx_t_1; __pyx_t_5 = NULL;
      if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_4))) {
        __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
        if (likely(__pyx_t_5)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_5);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_4, function);
        }
      }
      if (!__pyx_t_5) {
        __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1254; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_GOTREF(__pyx_t_2);
      } else {
        __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1254; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL;
        __Pyx_GIVEREF(__pyx_t_3);
        PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_3);
        __pyx_t_3 = 0;
        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1254; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 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;
  }

  /* "pyrobuf_list.pyx":1257
 *         cdef size_t i
 *         cdef size_t j
 *         cdef bint found = 0             # <<<<<<<<<<<<<<
 * 
 *         for i in range(self._n_items):
 */
  __pyx_v_found = 0;

  /* "pyrobuf_list.pyx":1259
 *         cdef bint found = 0
 * 
 *         for i in range(self._n_items):             # <<<<<<<<<<<<<<
 *             if self._data[i] == x:
 *                 found = 1
 */
  __pyx_t_7 = __pyx_v_self->_n_items;
  for (__pyx_t_8 = 0; __pyx_t_8 < __pyx_t_7; __pyx_t_8+=1) {
    __pyx_v_i = __pyx_t_8;

    /* "pyrobuf_list.pyx":1260
 * 
 *         for i in range(self._n_items):
 *             if self._data[i] == x:             # <<<<<<<<<<<<<<
 *                 found = 1
 *                 break
 */
    __pyx_t_9 = (((__pyx_v_self->_data[__pyx_v_i]) == __pyx_v_x) != 0);
    if (__pyx_t_9) {

      /* "pyrobuf_list.pyx":1261
 *         for i in range(self._n_items):
 *             if self._data[i] == x:
 *                 found = 1             # <<<<<<<<<<<<<<
 *                 break
 * 
 */
      __pyx_v_found = 1;

      /* "pyrobuf_list.pyx":1262
 *             if self._data[i] == x:
 *                 found = 1
 *                 break             # <<<<<<<<<<<<<<
 * 
 *         if found == 0:
 */
      goto __pyx_L4_break;

      /* "pyrobuf_list.pyx":1260
 * 
 *         for i in range(self._n_items):
 *             if self._data[i] == x:             # <<<<<<<<<<<<<<
 *                 found = 1
 *                 break
 */
    }
  }
  __pyx_L4_break:;

  /* "pyrobuf_list.pyx":1264
 *                 break
 * 
 *         if found == 0:             # <<<<<<<<<<<<<<
 *             raise ValueError("x not in list")
 * 
 */
  __pyx_t_9 = ((__pyx_v_found == 0) != 0);
  if (__pyx_t_9) {

    /* "pyrobuf_list.pyx":1265
 * 
 *         if found == 0:
 *             raise ValueError("x not in list")             # <<<<<<<<<<<<<<
 * 
 *         for j in range(i, self._n_items):
 */
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__41, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1265; __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 = 1265; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

    /* "pyrobuf_list.pyx":1264
 *                 break
 * 
 *         if found == 0:             # <<<<<<<<<<<<<<
 *             raise ValueError("x not in list")
 * 
 */
  }

  /* "pyrobuf_list.pyx":1267
 *             raise ValueError("x not in list")
 * 
 *         for j in range(i, self._n_items):             # <<<<<<<<<<<<<<
 *             self._data[j] = self._data[j + 1]
 * 
 */
  __pyx_t_7 = __pyx_v_self->_n_items;
  for (__pyx_t_8 = __pyx_v_i; __pyx_t_8 < __pyx_t_7; __pyx_t_8+=1) {
    __pyx_v_j = __pyx_t_8;

    /* "pyrobuf_list.pyx":1268
 * 
 *         for j in range(i, self._n_items):
 *             self._data[j] = self._data[j + 1]             # <<<<<<<<<<<<<<
 * 
 *         self._n_items -= 1
 */
    (__pyx_v_self->_data[__pyx_v_j]) = (__pyx_v_self->_data[(__pyx_v_j + 1)]);
  }

  /* "pyrobuf_list.pyx":1270
 *             self._data[j] = self._data[j + 1]
 * 
 *         self._n_items -= 1             # <<<<<<<<<<<<<<
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:
 */
  __pyx_v_self->_n_items = (__pyx_v_self->_n_items - 1);

  /* "pyrobuf_list.pyx":1271
 * 
 *         self._n_items -= 1
 *         listener = <object>self._listener             # <<<<<<<<<<<<<<
 *         if not listener._is_present_in_parent:
 *             listener._Modified()
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_self->_listener);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_v_listener = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pyrobuf_list.pyx":1272
 *         self._n_items -= 1
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:             # <<<<<<<<<<<<<<
 *             listener._Modified()
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_listener, __pyx_n_s_is_present_in_parent); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1272; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1272; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_10 = ((!__pyx_t_9) != 0);
  if (__pyx_t_10) {

    /* "pyrobuf_list.pyx":1273
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:
 *             listener._Modified()             # <<<<<<<<<<<<<<
 * 
 *     cdef void _append(self, int x):
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_listener, __pyx_n_s_Modified); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1273; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = NULL;
    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    if (__pyx_t_4) {
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1273; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    } else {
      __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1273; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "pyrobuf_list.pyx":1272
 *         self._n_items -= 1
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:             # <<<<<<<<<<<<<<
 *             listener._Modified()
 * 
 */
  }

  /* "pyrobuf_list.pyx":1254
 *         return self._data[self._n_items]
 * 
 *     cpdef remove(self, int x):             # <<<<<<<<<<<<<<
 *         cdef size_t i
 *         cdef size_t j
 */

  /* function exit code */
  __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_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("pyrobuf_list.IntList.remove", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_listener);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrobuf_list_7IntList_34remove(PyObject *__pyx_v_self, PyObject *__pyx_arg_x); /*proto*/
static PyObject *__pyx_pw_12pyrobuf_list_7IntList_34remove(PyObject *__pyx_v_self, PyObject *__pyx_arg_x) {
  int __pyx_v_x;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("remove (wrapper)", 0);
  assert(__pyx_arg_x); {
    __pyx_v_x = __Pyx_PyInt_As_int(__pyx_arg_x); if (unlikely((__pyx_v_x == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1254; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyrobuf_list.IntList.remove", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_12pyrobuf_list_7IntList_33remove(((struct __pyx_obj_12pyrobuf_list_IntList *)__pyx_v_self), ((int)__pyx_v_x));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_12pyrobuf_list_7IntList_33remove(struct __pyx_obj_12pyrobuf_list_IntList *__pyx_v_self, int __pyx_v_x) {
  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", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_12pyrobuf_list_7IntList_remove(__pyx_v_self, __pyx_v_x, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1254; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyrobuf_list.IntList.remove", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrobuf_list.pyx":1275
 *             listener._Modified()
 * 
 *     cdef void _append(self, int x):             # <<<<<<<<<<<<<<
 *         cdef int *mem
 * 
 */

static void __pyx_f_12pyrobuf_list_7IntList__append(struct __pyx_obj_12pyrobuf_list_IntList *__pyx_v_self, int __pyx_v_x) {
  int *__pyx_v_mem;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_append", 0);

  /* "pyrobuf_list.pyx":1278
 *         cdef int *mem
 * 
 *         if self._n_items == self._size:             # <<<<<<<<<<<<<<
 *             mem = <int *>PyMem_Realloc(self._data, 2 * self._size * sizeof(int))
 *             if not mem:
 */
  __pyx_t_1 = ((__pyx_v_self->_n_items == __pyx_v_self->_size) != 0);
  if (__pyx_t_1) {

    /* "pyrobuf_list.pyx":1279
 * 
 *         if self._n_items == self._size:
 *             mem = <int *>PyMem_Realloc(self._data, 2 * self._size * sizeof(int))             # <<<<<<<<<<<<<<
 *             if not mem:
 *                 raise MemoryError()
 */
    __pyx_v_mem = ((int *)PyMem_Realloc(__pyx_v_self->_data, ((2 * __pyx_v_self->_size) * (sizeof(int)))));

    /* "pyrobuf_list.pyx":1280
 *         if self._n_items == self._size:
 *             mem = <int *>PyMem_Realloc(self._data, 2 * self._size * sizeof(int))
 *             if not mem:             # <<<<<<<<<<<<<<
 *                 raise MemoryError()
 * 
 */
    __pyx_t_1 = ((!(__pyx_v_mem != 0)) != 0);
    if (__pyx_t_1) {

      /* "pyrobuf_list.pyx":1281
 *             mem = <int *>PyMem_Realloc(self._data, 2 * self._size * sizeof(int))
 *             if not mem:
 *                 raise MemoryError()             # <<<<<<<<<<<<<<
 * 
 *             self._data = mem
 */
      PyErr_NoMemory(); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1281; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

      /* "pyrobuf_list.pyx":1280
 *         if self._n_items == self._size:
 *             mem = <int *>PyMem_Realloc(self._data, 2 * self._size * sizeof(int))
 *             if not mem:             # <<<<<<<<<<<<<<
 *                 raise MemoryError()
 * 
 */
    }

    /* "pyrobuf_list.pyx":1283
 *                 raise MemoryError()
 * 
 *             self._data = mem             # <<<<<<<<<<<<<<
 *             self._size *= 2
 * 
 */
    __pyx_v_self->_data = __pyx_v_mem;

    /* "pyrobuf_list.pyx":1284
 * 
 *             self._data = mem
 *             self._size *= 2             # <<<<<<<<<<<<<<
 * 
 *         self._data[self._n_items] = x
 */
    __pyx_v_self->_size = (__pyx_v_self->_size * 2);

    /* "pyrobuf_list.pyx":1278
 *         cdef int *mem
 * 
 *         if self._n_items == self._size:             # <<<<<<<<<<<<<<
 *             mem = <int *>PyMem_Realloc(self._data, 2 * self._size * sizeof(int))
 *             if not mem:
 */
  }

  /* "pyrobuf_list.pyx":1286
 *             self._size *= 2
 * 
 *         self._data[self._n_items] = x             # <<<<<<<<<<<<<<
 *         self._n_items += 1
 * 
 */
  (__pyx_v_self->_data[__pyx_v_self->_n_items]) = __pyx_v_x;

  /* "pyrobuf_list.pyx":1287
 * 
 *         self._data[self._n_items] = x
 *         self._n_items += 1             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_v_self->_n_items = (__pyx_v_self->_n_items + 1);

  /* "pyrobuf_list.pyx":1275
 *             listener._Modified()
 * 
 *     cdef void _append(self, int x):             # <<<<<<<<<<<<<<
 *         cdef int *mem
 * 
 */

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_WriteUnraisable("pyrobuf_list.IntList._append", __pyx_clineno, __pyx_lineno, __pyx_filename, 0, 0);
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
}

/* "pyrobuf_list.pyx":1293
 * cdef class DoubleList:
 * 
 *     def __cinit__(self, size_t size=16, object listener=None):             # <<<<<<<<<<<<<<
 *         self._data = <double *>PyMem_Malloc(size * sizeof(double))
 *         if not self._data:
 */

/* Python wrapper */
static int __pyx_pw_12pyrobuf_list_10DoubleList_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_12pyrobuf_list_10DoubleList_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  size_t __pyx_v_size;
  PyObject *__pyx_v_listener = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_size,&__pyx_n_s_listener,0};
    PyObject* values[2] = {0,0};
    values[1] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_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 (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_size);
          if (value) { values[0] = value; kw_args--; }
        }
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_listener);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1293; __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;
      }
    }
    if (values[0]) {
      __pyx_v_size = __Pyx_PyInt_As_size_t(values[0]); if (unlikely((__pyx_v_size == (size_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1293; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    } else {
      __pyx_v_size = ((size_t)16);
    }
    __pyx_v_listener = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1293; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyrobuf_list.DoubleList.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_12pyrobuf_list_10DoubleList___cinit__(((struct __pyx_obj_12pyrobuf_list_DoubleList *)__pyx_v_self), __pyx_v_size, __pyx_v_listener);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_12pyrobuf_list_10DoubleList___cinit__(struct __pyx_obj_12pyrobuf_list_DoubleList *__pyx_v_self, size_t __pyx_v_size, PyObject *__pyx_v_listener) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);

  /* "pyrobuf_list.pyx":1294
 * 
 *     def __cinit__(self, size_t size=16, object listener=None):
 *         self._data = <double *>PyMem_Malloc(size * sizeof(double))             # <<<<<<<<<<<<<<
 *         if not self._data:
 *             raise MemoryError()
 */
  __pyx_v_self->_data = ((double *)PyMem_Malloc((__pyx_v_size * (sizeof(double)))));

  /* "pyrobuf_list.pyx":1295
 *     def __cinit__(self, size_t size=16, object listener=None):
 *         self._data = <double *>PyMem_Malloc(size * sizeof(double))
 *         if not self._data:             # <<<<<<<<<<<<<<
 *             raise MemoryError()
 * 
 */
  __pyx_t_1 = ((!(__pyx_v_self->_data != 0)) != 0);
  if (__pyx_t_1) {

    /* "pyrobuf_list.pyx":1296
 *         self._data = <double *>PyMem_Malloc(size * sizeof(double))
 *         if not self._data:
 *             raise MemoryError()             # <<<<<<<<<<<<<<
 * 
 *         self._n_items = 0
 */
    PyErr_NoMemory(); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1296; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

    /* "pyrobuf_list.pyx":1295
 *     def __cinit__(self, size_t size=16, object listener=None):
 *         self._data = <double *>PyMem_Malloc(size * sizeof(double))
 *         if not self._data:             # <<<<<<<<<<<<<<
 *             raise MemoryError()
 * 
 */
  }

  /* "pyrobuf_list.pyx":1298
 *             raise MemoryError()
 * 
 *         self._n_items = 0             # <<<<<<<<<<<<<<
 *         self._size = size
 *         if listener is None:
 */
  __pyx_v_self->_n_items = 0;

  /* "pyrobuf_list.pyx":1299
 * 
 *         self._n_items = 0
 *         self._size = size             # <<<<<<<<<<<<<<
 *         if listener is None:
 *             self._listener = <PyObject *>null_listener
 */
  __pyx_v_self->_size = __pyx_v_size;

  /* "pyrobuf_list.pyx":1300
 *         self._n_items = 0
 *         self._size = size
 *         if listener is None:             # <<<<<<<<<<<<<<
 *             self._listener = <PyObject *>null_listener
 *         else:
 */
  __pyx_t_1 = (__pyx_v_listener == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "pyrobuf_list.pyx":1301
 *         self._size = size
 *         if listener is None:
 *             self._listener = <PyObject *>null_listener             # <<<<<<<<<<<<<<
 *         else:
 *             self._listener = <PyObject *>listener
 */
    __pyx_v_self->_listener = ((PyObject *)null_listener);

    /* "pyrobuf_list.pyx":1300
 *         self._n_items = 0
 *         self._size = size
 *         if listener is None:             # <<<<<<<<<<<<<<
 *             self._listener = <PyObject *>null_listener
 *         else:
 */
    goto __pyx_L4;
  }

  /* "pyrobuf_list.pyx":1303
 *             self._listener = <PyObject *>null_listener
 *         else:
 *             self._listener = <PyObject *>listener             # <<<<<<<<<<<<<<
 * 
 *     def __dealloc__(self):
 */
  /*else*/ {
    __pyx_v_self->_listener = ((PyObject *)__pyx_v_listener);
  }
  __pyx_L4:;

  /* "pyrobuf_list.pyx":1293
 * cdef class DoubleList:
 * 
 *     def __cinit__(self, size_t size=16, object listener=None):             # <<<<<<<<<<<<<<
 *         self._data = <double *>PyMem_Malloc(size * sizeof(double))
 *         if not self._data:
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyrobuf_list.DoubleList.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrobuf_list.pyx":1305
 *             self._listener = <PyObject *>listener
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         PyMem_Free(self._data)
 * 
 */

/* Python wrapper */
static void __pyx_pw_12pyrobuf_list_10DoubleList_3__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_12pyrobuf_list_10DoubleList_3__dealloc__(PyObject *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_pf_12pyrobuf_list_10DoubleList_2__dealloc__(((struct __pyx_obj_12pyrobuf_list_DoubleList *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

static void __pyx_pf_12pyrobuf_list_10DoubleList_2__dealloc__(struct __pyx_obj_12pyrobuf_list_DoubleList *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__", 0);

  /* "pyrobuf_list.pyx":1306
 * 
 *     def __dealloc__(self):
 *         PyMem_Free(self._data)             # <<<<<<<<<<<<<<
 * 
 *     def __contains__(self, double x):
 */
  PyMem_Free(__pyx_v_self->_data);

  /* "pyrobuf_list.pyx":1305
 *             self._listener = <PyObject *>listener
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         PyMem_Free(self._data)
 * 
 */

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

/* "pyrobuf_list.pyx":1308
 *         PyMem_Free(self._data)
 * 
 *     def __contains__(self, double x):             # <<<<<<<<<<<<<<
 *         cdef size_t i
 *         for i in range(self._n_items):
 */

/* Python wrapper */
static int __pyx_pw_12pyrobuf_list_10DoubleList_5__contains__(PyObject *__pyx_v_self, PyObject *__pyx_arg_x); /*proto*/
static int __pyx_pw_12pyrobuf_list_10DoubleList_5__contains__(PyObject *__pyx_v_self, PyObject *__pyx_arg_x) {
  double __pyx_v_x;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__contains__ (wrapper)", 0);
  assert(__pyx_arg_x); {
    __pyx_v_x = __pyx_PyFloat_AsDouble(__pyx_arg_x); if (unlikely((__pyx_v_x == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1308; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyrobuf_list.DoubleList.__contains__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_12pyrobuf_list_10DoubleList_4__contains__(((struct __pyx_obj_12pyrobuf_list_DoubleList *)__pyx_v_self), ((double)__pyx_v_x));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_12pyrobuf_list_10DoubleList_4__contains__(struct __pyx_obj_12pyrobuf_list_DoubleList *__pyx_v_self, double __pyx_v_x) {
  size_t __pyx_v_i;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  size_t __pyx_t_1;
  size_t __pyx_t_2;
  int __pyx_t_3;
  __Pyx_RefNannySetupContext("__contains__", 0);

  /* "pyrobuf_list.pyx":1310
 *     def __contains__(self, double x):
 *         cdef size_t i
 *         for i in range(self._n_items):             # <<<<<<<<<<<<<<
 *             if self._data[i] == x:
 *                 return True
 */
  __pyx_t_1 = __pyx_v_self->_n_items;
  for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
    __pyx_v_i = __pyx_t_2;

    /* "pyrobuf_list.pyx":1311
 *         cdef size_t i
 *         for i in range(self._n_items):
 *             if self._data[i] == x:             # <<<<<<<<<<<<<<
 *                 return True
 * 
 */
    __pyx_t_3 = (((__pyx_v_self->_data[__pyx_v_i]) == __pyx_v_x) != 0);
    if (__pyx_t_3) {

      /* "pyrobuf_list.pyx":1312
 *         for i in range(self._n_items):
 *             if self._data[i] == x:
 *                 return True             # <<<<<<<<<<<<<<
 * 
 *         return False
 */
      __pyx_r = 1;
      goto __pyx_L0;

      /* "pyrobuf_list.pyx":1311
 *         cdef size_t i
 *         for i in range(self._n_items):
 *             if self._data[i] == x:             # <<<<<<<<<<<<<<
 *                 return True
 * 
 */
    }
  }

  /* "pyrobuf_list.pyx":1314
 *                 return True
 * 
 *         return False             # <<<<<<<<<<<<<<
 * 
 *     def __delitem__(self, int i):
 */
  __pyx_r = 0;
  goto __pyx_L0;

  /* "pyrobuf_list.pyx":1308
 *         PyMem_Free(self._data)
 * 
 *     def __contains__(self, double x):             # <<<<<<<<<<<<<<
 *         cdef size_t i
 *         for i in range(self._n_items):
 */

  /* function exit code */
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrobuf_list.pyx":1316
 *         return False
 * 
 *     def __delitem__(self, int i):             # <<<<<<<<<<<<<<
 *         if i < 0:
 *             i += <int>self._n_items
 */

/* Python wrapper */
static int __pyx_pw_12pyrobuf_list_10DoubleList_7__delitem__(PyObject *__pyx_v_self, PyObject *__pyx_arg_i); /*proto*/
static int __pyx_pw_12pyrobuf_list_10DoubleList_7__delitem__(PyObject *__pyx_v_self, PyObject *__pyx_arg_i) {
  int __pyx_v_i;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__delitem__ (wrapper)", 0);
  assert(__pyx_arg_i); {
    __pyx_v_i = __Pyx_PyInt_As_int(__pyx_arg_i); if (unlikely((__pyx_v_i == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1316; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyrobuf_list.DoubleList.__delitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_12pyrobuf_list_10DoubleList_6__delitem__(((struct __pyx_obj_12pyrobuf_list_DoubleList *)__pyx_v_self), ((int)__pyx_v_i));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_12pyrobuf_list_10DoubleList_6__delitem__(struct __pyx_obj_12pyrobuf_list_DoubleList *__pyx_v_self, int __pyx_v_i) {
  size_t __pyx_v_j;
  PyObject *__pyx_v_listener = NULL;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  size_t __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;
  __Pyx_RefNannySetupContext("__delitem__", 0);

  /* "pyrobuf_list.pyx":1317
 * 
 *     def __delitem__(self, int i):
 *         if i < 0:             # <<<<<<<<<<<<<<
 *             i += <int>self._n_items
 * 
 */
  __pyx_t_1 = ((__pyx_v_i < 0) != 0);
  if (__pyx_t_1) {

    /* "pyrobuf_list.pyx":1318
 *     def __delitem__(self, int i):
 *         if i < 0:
 *             i += <int>self._n_items             # <<<<<<<<<<<<<<
 * 
 *         if i < 0 or <size_t>i >= self._n_items:
 */
    __pyx_v_i = (__pyx_v_i + ((int)__pyx_v_self->_n_items));

    /* "pyrobuf_list.pyx":1317
 * 
 *     def __delitem__(self, int i):
 *         if i < 0:             # <<<<<<<<<<<<<<
 *             i += <int>self._n_items
 * 
 */
  }

  /* "pyrobuf_list.pyx":1320
 *             i += <int>self._n_items
 * 
 *         if i < 0 or <size_t>i >= self._n_items:             # <<<<<<<<<<<<<<
 *             raise IndexError("list index out of range")
 * 
 */
  __pyx_t_2 = ((__pyx_v_i < 0) != 0);
  if (!__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L5_bool_binop_done;
  }
  __pyx_t_2 = ((((size_t)__pyx_v_i) >= __pyx_v_self->_n_items) != 0);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L5_bool_binop_done:;
  if (__pyx_t_1) {

    /* "pyrobuf_list.pyx":1321
 * 
 *         if i < 0 or <size_t>i >= self._n_items:
 *             raise IndexError("list index out of range")             # <<<<<<<<<<<<<<
 * 
 *         cdef size_t j
 */
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_IndexError, __pyx_tuple__42, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1321; __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 = 1321; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

    /* "pyrobuf_list.pyx":1320
 *             i += <int>self._n_items
 * 
 *         if i < 0 or <size_t>i >= self._n_items:             # <<<<<<<<<<<<<<
 *             raise IndexError("list index out of range")
 * 
 */
  }

  /* "pyrobuf_list.pyx":1324
 * 
 *         cdef size_t j
 *         for j in range(i, self._n_items):             # <<<<<<<<<<<<<<
 *             self._data[j] = self._data[j + 1]
 * 
 */
  __pyx_t_4 = __pyx_v_self->_n_items;
  for (__pyx_t_5 = __pyx_v_i; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
    __pyx_v_j = __pyx_t_5;

    /* "pyrobuf_list.pyx":1325
 *         cdef size_t j
 *         for j in range(i, self._n_items):
 *             self._data[j] = self._data[j + 1]             # <<<<<<<<<<<<<<
 * 
 *         self._n_items -= 1
 */
    (__pyx_v_self->_data[__pyx_v_j]) = (__pyx_v_self->_data[(__pyx_v_j + 1)]);
  }

  /* "pyrobuf_list.pyx":1327
 *             self._data[j] = self._data[j + 1]
 * 
 *         self._n_items -= 1             # <<<<<<<<<<<<<<
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:
 */
  __pyx_v_self->_n_items = (__pyx_v_self->_n_items - 1);

  /* "pyrobuf_list.pyx":1328
 * 
 *         self._n_items -= 1
 *         listener = <object>self._listener             # <<<<<<<<<<<<<<
 *         if not listener._is_present_in_parent:
 *             listener._Modified()
 */
  __pyx_t_3 = ((PyObject *)__pyx_v_self->_listener);
  __Pyx_INCREF(__pyx_t_3);
  __pyx_v_listener = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "pyrobuf_list.pyx":1329
 *         self._n_items -= 1
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:             # <<<<<<<<<<<<<<
 *             listener._Modified()
 * 
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_listener, __pyx_n_s_is_present_in_parent); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1329; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1329; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_2 = ((!__pyx_t_1) != 0);
  if (__pyx_t_2) {

    /* "pyrobuf_list.pyx":1330
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:
 *             listener._Modified()             # <<<<<<<<<<<<<<
 * 
 *     def __getitem__(self, int i):
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_listener, __pyx_n_s_Modified); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1330; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = NULL;
    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_6, function);
      }
    }
    if (__pyx_t_7) {
      __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_7); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1330; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    } else {
      __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1330; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "pyrobuf_list.pyx":1329
 *         self._n_items -= 1
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:             # <<<<<<<<<<<<<<
 *             listener._Modified()
 * 
 */
  }

  /* "pyrobuf_list.pyx":1316
 *         return False
 * 
 *     def __delitem__(self, int i):             # <<<<<<<<<<<<<<
 *         if i < 0:
 *             i += <int>self._n_items
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("pyrobuf_list.DoubleList.__delitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_listener);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrobuf_list.pyx":1332
 *             listener._Modified()
 * 
 *     def __getitem__(self, int i):             # <<<<<<<<<<<<<<
 *         if i < 0:
 *             i += <int>self._n_items
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrobuf_list_10DoubleList_9__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_arg_i); /*proto*/
static PyObject *__pyx_pw_12pyrobuf_list_10DoubleList_9__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_arg_i) {
  int __pyx_v_i;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0);
  assert(__pyx_arg_i); {
    __pyx_v_i = __Pyx_PyInt_As_int(__pyx_arg_i); if (unlikely((__pyx_v_i == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1332; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyrobuf_list.DoubleList.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_12pyrobuf_list_10DoubleList_8__getitem__(((struct __pyx_obj_12pyrobuf_list_DoubleList *)__pyx_v_self), ((int)__pyx_v_i));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_12pyrobuf_list_10DoubleList_8__getitem__(struct __pyx_obj_12pyrobuf_list_DoubleList *__pyx_v_self, int __pyx_v_i) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__getitem__", 0);

  /* "pyrobuf_list.pyx":1333
 * 
 *     def __getitem__(self, int i):
 *         if i < 0:             # <<<<<<<<<<<<<<
 *             i += <int>self._n_items
 * 
 */
  __pyx_t_1 = ((__pyx_v_i < 0) != 0);
  if (__pyx_t_1) {

    /* "pyrobuf_list.pyx":1334
 *     def __getitem__(self, int i):
 *         if i < 0:
 *             i += <int>self._n_items             # <<<<<<<<<<<<<<
 * 
 *         if i < 0 or <size_t>i >= self._n_items or i < 0:
 */
    __pyx_v_i = (__pyx_v_i + ((int)__pyx_v_self->_n_items));

    /* "pyrobuf_list.pyx":1333
 * 
 *     def __getitem__(self, int i):
 *         if i < 0:             # <<<<<<<<<<<<<<
 *             i += <int>self._n_items
 * 
 */
  }

  /* "pyrobuf_list.pyx":1336
 *             i += <int>self._n_items
 * 
 *         if i < 0 or <size_t>i >= self._n_items or i < 0:             # <<<<<<<<<<<<<<
 *             raise IndexError("list index out of range")
 * 
 */
  __pyx_t_2 = ((__pyx_v_i < 0) != 0);
  if (!__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L5_bool_binop_done;
  }
  __pyx_t_2 = ((((size_t)__pyx_v_i) >= __pyx_v_self->_n_items) != 0);
  if (!__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L5_bool_binop_done;
  }
  __pyx_t_2 = ((__pyx_v_i < 0) != 0);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L5_bool_binop_done:;
  if (__pyx_t_1) {

    /* "pyrobuf_list.pyx":1337
 * 
 *         if i < 0 or <size_t>i >= self._n_items or i < 0:
 *             raise IndexError("list index out of range")             # <<<<<<<<<<<<<<
 * 
 *         return self._data[i]
 */
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_IndexError, __pyx_tuple__43, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1337; __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 = 1337; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

    /* "pyrobuf_list.pyx":1336
 *             i += <int>self._n_items
 * 
 *         if i < 0 or <size_t>i >= self._n_items or i < 0:             # <<<<<<<<<<<<<<
 *             raise IndexError("list index out of range")
 * 
 */
  }

  /* "pyrobuf_list.pyx":1339
 *             raise IndexError("list index out of range")
 * 
 *         return self._data[i]             # <<<<<<<<<<<<<<
 * 
 *     def __iter__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = PyFloat_FromDouble((__pyx_v_self->_data[__pyx_v_i])); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1339; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "pyrobuf_list.pyx":1332
 *             listener._Modified()
 * 
 *     def __getitem__(self, int i):             # <<<<<<<<<<<<<<
 *         if i < 0:
 *             i += <int>self._n_items
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pyrobuf_list.DoubleList.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_12pyrobuf_list_10DoubleList_12generator5(__pyx_CoroutineObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */

/* "pyrobuf_list.pyx":1341
 *         return self._data[i]
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         cdef size_t idx = 0
 *         while idx < self._n_items:
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrobuf_list_10DoubleList_11__iter__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_12pyrobuf_list_10DoubleList_11__iter__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrobuf_list_10DoubleList_10__iter__(((struct __pyx_obj_12pyrobuf_list_DoubleList *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_12pyrobuf_list_10DoubleList_10__iter__(struct __pyx_obj_12pyrobuf_list_DoubleList *__pyx_v_self) {
  struct __pyx_obj_12pyrobuf_list___pyx_scope_struct_5___iter__ *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__iter__", 0);
  __pyx_cur_scope = (struct __pyx_obj_12pyrobuf_list___pyx_scope_struct_5___iter__ *)__pyx_tp_new_12pyrobuf_list___pyx_scope_struct_5___iter__(__pyx_ptype_12pyrobuf_list___pyx_scope_struct_5___iter__, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __Pyx_GOTREF(__pyx_cur_scope);
  __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
  __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  {
    __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_12pyrobuf_list_10DoubleList_12generator5, (PyObject *) __pyx_cur_scope, __pyx_n_s_iter, __pyx_n_s_DoubleList___iter); if (unlikely(!gen)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1341; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyrobuf_list.DoubleList.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_gb_12pyrobuf_list_10DoubleList_12generator5(__pyx_CoroutineObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_12pyrobuf_list___pyx_scope_struct_5___iter__ *__pyx_cur_scope = ((struct __pyx_obj_12pyrobuf_list___pyx_scope_struct_5___iter__ *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("None", 0);
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    case 1: goto __pyx_L6_resume_from_yield;
    default: /* CPython raises the right error here */
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __pyx_L3_first_run:;
  if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1341; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pyrobuf_list.pyx":1342
 * 
 *     def __iter__(self):
 *         cdef size_t idx = 0             # <<<<<<<<<<<<<<
 *         while idx < self._n_items:
 *             yield self._data[idx]
 */
  __pyx_cur_scope->__pyx_v_idx = 0;

  /* "pyrobuf_list.pyx":1343
 *     def __iter__(self):
 *         cdef size_t idx = 0
 *         while idx < self._n_items:             # <<<<<<<<<<<<<<
 *             yield self._data[idx]
 *             idx += 1
 */
  while (1) {
    __pyx_t_1 = ((__pyx_cur_scope->__pyx_v_idx < __pyx_cur_scope->__pyx_v_self->_n_items) != 0);
    if (!__pyx_t_1) break;

    /* "pyrobuf_list.pyx":1344
 *         cdef size_t idx = 0
 *         while idx < self._n_items:
 *             yield self._data[idx]             # <<<<<<<<<<<<<<
 *             idx += 1
 * 
 */
    __pyx_t_2 = PyFloat_FromDouble((__pyx_cur_scope->__pyx_v_self->_data[__pyx_cur_scope->__pyx_v_idx])); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1344; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    __Pyx_XGIVEREF(__pyx_r);
    __Pyx_RefNannyFinishContext();
    /* return from generator, yielding value */
    __pyx_generator->resume_label = 1;
    return __pyx_r;
    __pyx_L6_resume_from_yield:;
    if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1344; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

    /* "pyrobuf_list.pyx":1345
 *         while idx < self._n_items:
 *             yield self._data[idx]
 *             idx += 1             # <<<<<<<<<<<<<<
 * 
 *     def __len__(self):
 */
    __pyx_cur_scope->__pyx_v_idx = (__pyx_cur_scope->__pyx_v_idx + 1);
  }

  /* "pyrobuf_list.pyx":1341
 *         return self._data[i]
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         cdef size_t idx = 0
 *         while idx < self._n_items:
 */

  /* function exit code */
  PyErr_SetNone(PyExc_StopIteration);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
  __pyx_generator->resume_label = -1;
  __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrobuf_list.pyx":1347
 *             idx += 1
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         return self._n_items
 * 
 */

/* Python wrapper */
static Py_ssize_t __pyx_pw_12pyrobuf_list_10DoubleList_14__len__(PyObject *__pyx_v_self); /*proto*/
static Py_ssize_t __pyx_pw_12pyrobuf_list_10DoubleList_14__len__(PyObject *__pyx_v_self) {
  Py_ssize_t __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__len__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrobuf_list_10DoubleList_13__len__(((struct __pyx_obj_12pyrobuf_list_DoubleList *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static Py_ssize_t __pyx_pf_12pyrobuf_list_10DoubleList_13__len__(struct __pyx_obj_12pyrobuf_list_DoubleList *__pyx_v_self) {
  Py_ssize_t __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__len__", 0);

  /* "pyrobuf_list.pyx":1348
 * 
 *     def __len__(self):
 *         return self._n_items             # <<<<<<<<<<<<<<
 * 
 *     def __repr__(self):
 */
  __pyx_r = __pyx_v_self->_n_items;
  goto __pyx_L0;

  /* "pyrobuf_list.pyx":1347
 *             idx += 1
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         return self._n_items
 * 
 */

  /* function exit code */
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrobuf_list.pyx":1350
 *         return self._n_items
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return repr(list(self))
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrobuf_list_10DoubleList_16__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_12pyrobuf_list_10DoubleList_16__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrobuf_list_10DoubleList_15__repr__(((struct __pyx_obj_12pyrobuf_list_DoubleList *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_12pyrobuf_list_10DoubleList_15__repr__(struct __pyx_obj_12pyrobuf_list_DoubleList *__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__", 0);

  /* "pyrobuf_list.pyx":1351
 * 
 *     def __repr__(self):
 *         return repr(list(self))             # <<<<<<<<<<<<<<
 * 
 *     def __setitem__(self, int i, double x):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PySequence_List(((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1351; __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 = 1351; __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;

  /* "pyrobuf_list.pyx":1350
 *         return self._n_items
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return repr(list(self))
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pyrobuf_list.DoubleList.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrobuf_list.pyx":1353
 *         return repr(list(self))
 * 
 *     def __setitem__(self, int i, double x):             # <<<<<<<<<<<<<<
 *         if i < 0:
 *             i += <int>self._n_items
 */

/* Python wrapper */
static int __pyx_pw_12pyrobuf_list_10DoubleList_18__setitem__(PyObject *__pyx_v_self, PyObject *__pyx_arg_i, PyObject *__pyx_arg_x); /*proto*/
static int __pyx_pw_12pyrobuf_list_10DoubleList_18__setitem__(PyObject *__pyx_v_self, PyObject *__pyx_arg_i, PyObject *__pyx_arg_x) {
  int __pyx_v_i;
  double __pyx_v_x;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setitem__ (wrapper)", 0);
  assert(__pyx_arg_i); {
    __pyx_v_i = __Pyx_PyInt_As_int(__pyx_arg_i); if (unlikely((__pyx_v_i == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1353; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  }
  assert(__pyx_arg_x); {
    __pyx_v_x = __pyx_PyFloat_AsDouble(__pyx_arg_x); if (unlikely((__pyx_v_x == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1353; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyrobuf_list.DoubleList.__setitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_12pyrobuf_list_10DoubleList_17__setitem__(((struct __pyx_obj_12pyrobuf_list_DoubleList *)__pyx_v_self), ((int)__pyx_v_i), ((double)__pyx_v_x));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_12pyrobuf_list_10DoubleList_17__setitem__(struct __pyx_obj_12pyrobuf_list_DoubleList *__pyx_v_self, int __pyx_v_i, double __pyx_v_x) {
  PyObject *__pyx_v_listener = NULL;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  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;
  __Pyx_RefNannySetupContext("__setitem__", 0);

  /* "pyrobuf_list.pyx":1354
 * 
 *     def __setitem__(self, int i, double x):
 *         if i < 0:             # <<<<<<<<<<<<<<
 *             i += <int>self._n_items
 * 
 */
  __pyx_t_1 = ((__pyx_v_i < 0) != 0);
  if (__pyx_t_1) {

    /* "pyrobuf_list.pyx":1355
 *     def __setitem__(self, int i, double x):
 *         if i < 0:
 *             i += <int>self._n_items             # <<<<<<<<<<<<<<
 * 
 *         if i < 0 or <size_t>i >= self._n_items:
 */
    __pyx_v_i = (__pyx_v_i + ((int)__pyx_v_self->_n_items));

    /* "pyrobuf_list.pyx":1354
 * 
 *     def __setitem__(self, int i, double x):
 *         if i < 0:             # <<<<<<<<<<<<<<
 *             i += <int>self._n_items
 * 
 */
  }

  /* "pyrobuf_list.pyx":1357
 *             i += <int>self._n_items
 * 
 *         if i < 0 or <size_t>i >= self._n_items:             # <<<<<<<<<<<<<<
 *             raise IndexError("list index out of range")
 * 
 */
  __pyx_t_2 = ((__pyx_v_i < 0) != 0);
  if (!__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L5_bool_binop_done;
  }
  __pyx_t_2 = ((((size_t)__pyx_v_i) >= __pyx_v_self->_n_items) != 0);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L5_bool_binop_done:;
  if (__pyx_t_1) {

    /* "pyrobuf_list.pyx":1358
 * 
 *         if i < 0 or <size_t>i >= self._n_items:
 *             raise IndexError("list index out of range")             # <<<<<<<<<<<<<<
 * 
 *         self._data[i] = x
 */
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_IndexError, __pyx_tuple__44, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1358; __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 = 1358; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

    /* "pyrobuf_list.pyx":1357
 *             i += <int>self._n_items
 * 
 *         if i < 0 or <size_t>i >= self._n_items:             # <<<<<<<<<<<<<<
 *             raise IndexError("list index out of range")
 * 
 */
  }

  /* "pyrobuf_list.pyx":1360
 *             raise IndexError("list index out of range")
 * 
 *         self._data[i] = x             # <<<<<<<<<<<<<<
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:
 */
  (__pyx_v_self->_data[__pyx_v_i]) = __pyx_v_x;

  /* "pyrobuf_list.pyx":1361
 * 
 *         self._data[i] = x
 *         listener = <object>self._listener             # <<<<<<<<<<<<<<
 *         if not listener._is_present_in_parent:
 *             listener._Modified()
 */
  __pyx_t_3 = ((PyObject *)__pyx_v_self->_listener);
  __Pyx_INCREF(__pyx_t_3);
  __pyx_v_listener = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "pyrobuf_list.pyx":1362
 *         self._data[i] = x
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:             # <<<<<<<<<<<<<<
 *             listener._Modified()
 * 
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_listener, __pyx_n_s_is_present_in_parent); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1362; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1362; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_2 = ((!__pyx_t_1) != 0);
  if (__pyx_t_2) {

    /* "pyrobuf_list.pyx":1363
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:
 *             listener._Modified()             # <<<<<<<<<<<<<<
 * 
 *     def __str__(self):
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_listener, __pyx_n_s_Modified); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1363; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = NULL;
    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    if (__pyx_t_5) {
      __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1363; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    } else {
      __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1363; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "pyrobuf_list.pyx":1362
 *         self._data[i] = x
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:             # <<<<<<<<<<<<<<
 *             listener._Modified()
 * 
 */
  }

  /* "pyrobuf_list.pyx":1353
 *         return repr(list(self))
 * 
 *     def __setitem__(self, int i, double x):             # <<<<<<<<<<<<<<
 *         if i < 0:
 *             i += <int>self._n_items
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pyrobuf_list.DoubleList.__setitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_listener);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrobuf_list.pyx":1365
 *             listener._Modified()
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return str(list(self))
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrobuf_list_10DoubleList_20__str__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_12pyrobuf_list_10DoubleList_20__str__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrobuf_list_10DoubleList_19__str__(((struct __pyx_obj_12pyrobuf_list_DoubleList *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_12pyrobuf_list_10DoubleList_19__str__(struct __pyx_obj_12pyrobuf_list_DoubleList *__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__", 0);

  /* "pyrobuf_list.pyx":1366
 * 
 *     def __str__(self):
 *         return str(list(self))             # <<<<<<<<<<<<<<
 * 
 *     def __getbuffer__(self, Py_buffer *buffer, int flags):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PySequence_List(((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1366; __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 = 1366; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)(&PyString_Type)), __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1366; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyrobuf_list.pyx":1365
 *             listener._Modified()
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return str(list(self))
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pyrobuf_list.DoubleList.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrobuf_list.pyx":1368
 *         return str(list(self))
 * 
 *     def __getbuffer__(self, Py_buffer *buffer, int flags):             # <<<<<<<<<<<<<<
 * 
 *         cdef Py_ssize_t itemsize = sizeof(double)
 */

/* Python wrapper */
static CYTHON_UNUSED int __pyx_pw_12pyrobuf_list_10DoubleList_22__getbuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_buffer, int __pyx_v_flags); /*proto*/
static CYTHON_UNUSED int __pyx_pw_12pyrobuf_list_10DoubleList_22__getbuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_buffer, int __pyx_v_flags) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__getbuffer__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrobuf_list_10DoubleList_21__getbuffer__(((struct __pyx_obj_12pyrobuf_list_DoubleList *)__pyx_v_self), ((Py_buffer *)__pyx_v_buffer), ((int)__pyx_v_flags));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_12pyrobuf_list_10DoubleList_21__getbuffer__(struct __pyx_obj_12pyrobuf_list_DoubleList *__pyx_v_self, Py_buffer *__pyx_v_buffer, CYTHON_UNUSED int __pyx_v_flags) {
  Py_ssize_t __pyx_v_itemsize;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  size_t __pyx_t_1;
  Py_ssize_t *__pyx_t_2;
  __Pyx_RefNannySetupContext("__getbuffer__", 0);
  if (__pyx_v_buffer != NULL) {
    __pyx_v_buffer->obj = Py_None; __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(__pyx_v_buffer->obj);
  }

  /* "pyrobuf_list.pyx":1370
 *     def __getbuffer__(self, Py_buffer *buffer, int flags):
 * 
 *         cdef Py_ssize_t itemsize = sizeof(double)             # <<<<<<<<<<<<<<
 *         self.shape[0] = self._n_items
 *         self.strides[0] = 1
 */
  __pyx_v_itemsize = (sizeof(double));

  /* "pyrobuf_list.pyx":1371
 * 
 *         cdef Py_ssize_t itemsize = sizeof(double)
 *         self.shape[0] = self._n_items             # <<<<<<<<<<<<<<
 *         self.strides[0] = 1
 * 
 */
  __pyx_t_1 = __pyx_v_self->_n_items;
  (__pyx_v_self->shape[0]) = __pyx_t_1;

  /* "pyrobuf_list.pyx":1372
 *         cdef Py_ssize_t itemsize = sizeof(double)
 *         self.shape[0] = self._n_items
 *         self.strides[0] = 1             # <<<<<<<<<<<<<<
 * 
 *         buffer.buf = <char *>(self._data)
 */
  (__pyx_v_self->strides[0]) = 1;

  /* "pyrobuf_list.pyx":1374
 *         self.strides[0] = 1
 * 
 *         buffer.buf = <char *>(self._data)             # <<<<<<<<<<<<<<
 *         buffer.format = 'd'
 *         buffer.internal = NULL                  # see References
 */
  __pyx_v_buffer->buf = ((char *)__pyx_v_self->_data);

  /* "pyrobuf_list.pyx":1375
 * 
 *         buffer.buf = <char *>(self._data)
 *         buffer.format = 'd'             # <<<<<<<<<<<<<<
 *         buffer.internal = NULL                  # see References
 *         buffer.itemsize = itemsize
 */
  __pyx_v_buffer->format = __pyx_k_d;

  /* "pyrobuf_list.pyx":1376
 *         buffer.buf = <char *>(self._data)
 *         buffer.format = 'd'
 *         buffer.internal = NULL                  # see References             # <<<<<<<<<<<<<<
 *         buffer.itemsize = itemsize
 *         buffer.len = self._n_items
 */
  __pyx_v_buffer->internal = NULL;

  /* "pyrobuf_list.pyx":1377
 *         buffer.format = 'd'
 *         buffer.internal = NULL                  # see References
 *         buffer.itemsize = itemsize             # <<<<<<<<<<<<<<
 *         buffer.len = self._n_items
 *         buffer.ndim = 1
 */
  __pyx_v_buffer->itemsize = __pyx_v_itemsize;

  /* "pyrobuf_list.pyx":1378
 *         buffer.internal = NULL                  # see References
 *         buffer.itemsize = itemsize
 *         buffer.len = self._n_items             # <<<<<<<<<<<<<<
 *         buffer.ndim = 1
 *         buffer.obj = self
 */
  __pyx_t_1 = __pyx_v_self->_n_items;
  __pyx_v_buffer->len = __pyx_t_1;

  /* "pyrobuf_list.pyx":1379
 *         buffer.itemsize = itemsize
 *         buffer.len = self._n_items
 *         buffer.ndim = 1             # <<<<<<<<<<<<<<
 *         buffer.obj = self
 *         buffer.readonly = 1
 */
  __pyx_v_buffer->ndim = 1;

  /* "pyrobuf_list.pyx":1380
 *         buffer.len = self._n_items
 *         buffer.ndim = 1
 *         buffer.obj = self             # <<<<<<<<<<<<<<
 *         buffer.readonly = 1
 *         buffer.shape = self.shape
 */
  __Pyx_INCREF(((PyObject *)__pyx_v_self));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
  __Pyx_GOTREF(__pyx_v_buffer->obj);
  __Pyx_DECREF(__pyx_v_buffer->obj);
  __pyx_v_buffer->obj = ((PyObject *)__pyx_v_self);

  /* "pyrobuf_list.pyx":1381
 *         buffer.ndim = 1
 *         buffer.obj = self
 *         buffer.readonly = 1             # <<<<<<<<<<<<<<
 *         buffer.shape = self.shape
 *         buffer.strides = self.strides
 */
  __pyx_v_buffer->readonly = 1;

  /* "pyrobuf_list.pyx":1382
 *         buffer.obj = self
 *         buffer.readonly = 1
 *         buffer.shape = self.shape             # <<<<<<<<<<<<<<
 *         buffer.strides = self.strides
 *         buffer.suboffsets = NULL                # for pointer arrays only
 */
  __pyx_t_2 = __pyx_v_self->shape;
  __pyx_v_buffer->shape = __pyx_t_2;

  /* "pyrobuf_list.pyx":1383
 *         buffer.readonly = 1
 *         buffer.shape = self.shape
 *         buffer.strides = self.strides             # <<<<<<<<<<<<<<
 *         buffer.suboffsets = NULL                # for pointer arrays only
 * 
 */
  __pyx_t_2 = __pyx_v_self->strides;
  __pyx_v_buffer->strides = __pyx_t_2;

  /* "pyrobuf_list.pyx":1384
 *         buffer.shape = self.shape
 *         buffer.strides = self.strides
 *         buffer.suboffsets = NULL                # for pointer arrays only             # <<<<<<<<<<<<<<
 * 
 *     def __releasebuffer__(self, Py_buffer *buffer):
 */
  __pyx_v_buffer->suboffsets = NULL;

  /* "pyrobuf_list.pyx":1368
 *         return str(list(self))
 * 
 *     def __getbuffer__(self, Py_buffer *buffer, int flags):             # <<<<<<<<<<<<<<
 * 
 *         cdef Py_ssize_t itemsize = sizeof(double)
 */

  /* function exit code */
  __pyx_r = 0;
  if (__pyx_v_buffer != NULL && __pyx_v_buffer->obj == Py_None) {
    __Pyx_GOTREF(Py_None);
    __Pyx_DECREF(Py_None); __pyx_v_buffer->obj = NULL;
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrobuf_list.pyx":1386
 *         buffer.suboffsets = NULL                # for pointer arrays only
 * 
 *     def __releasebuffer__(self, Py_buffer *buffer):             # <<<<<<<<<<<<<<
 *         pass
 * 
 */

/* Python wrapper */
static CYTHON_UNUSED void __pyx_pw_12pyrobuf_list_10DoubleList_24__releasebuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_buffer); /*proto*/
static CYTHON_UNUSED void __pyx_pw_12pyrobuf_list_10DoubleList_24__releasebuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_buffer) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__releasebuffer__ (wrapper)", 0);
  __pyx_pf_12pyrobuf_list_10DoubleList_23__releasebuffer__(((struct __pyx_obj_12pyrobuf_list_DoubleList *)__pyx_v_self), ((Py_buffer *)__pyx_v_buffer));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

static void __pyx_pf_12pyrobuf_list_10DoubleList_23__releasebuffer__(CYTHON_UNUSED struct __pyx_obj_12pyrobuf_list_DoubleList *__pyx_v_self, CYTHON_UNUSED Py_buffer *__pyx_v_buffer) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__releasebuffer__", 0);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

/* "pyrobuf_list.pyx":1389
 *         pass
 * 
 *     cpdef append(self, double x):             # <<<<<<<<<<<<<<
 *         self._append(x)
 *         listener = <object>self._listener
 */

static PyObject *__pyx_pw_12pyrobuf_list_10DoubleList_26append(PyObject *__pyx_v_self, PyObject *__pyx_arg_x); /*proto*/
static PyObject *__pyx_f_12pyrobuf_list_10DoubleList_append(struct __pyx_obj_12pyrobuf_list_DoubleList *__pyx_v_self, double __pyx_v_x, int __pyx_skip_dispatch) {
  PyObject *__pyx_v_listener = NULL;
  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;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  int __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("append", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_append); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1389; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_12pyrobuf_list_10DoubleList_26append)) {
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_3 = PyFloat_FromDouble(__pyx_v_x); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1389; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_4 = __pyx_t_1; __pyx_t_5 = NULL;
      if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_4))) {
        __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
        if (likely(__pyx_t_5)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_5);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_4, function);
        }
      }
      if (!__pyx_t_5) {
        __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1389; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_GOTREF(__pyx_t_2);
      } else {
        __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1389; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL;
        __Pyx_GIVEREF(__pyx_t_3);
        PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_3);
        __pyx_t_3 = 0;
        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1389; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 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;
  }

  /* "pyrobuf_list.pyx":1390
 * 
 *     cpdef append(self, double x):
 *         self._append(x)             # <<<<<<<<<<<<<<
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:
 */
  ((struct __pyx_vtabstruct_12pyrobuf_list_DoubleList *)__pyx_v_self->__pyx_vtab)->_append(__pyx_v_self, __pyx_v_x);

  /* "pyrobuf_list.pyx":1391
 *     cpdef append(self, double x):
 *         self._append(x)
 *         listener = <object>self._listener             # <<<<<<<<<<<<<<
 *         if not listener._is_present_in_parent:
 *             listener._Modified()
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_self->_listener);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_v_listener = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pyrobuf_list.pyx":1392
 *         self._append(x)
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:             # <<<<<<<<<<<<<<
 *             listener._Modified()
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_listener, __pyx_n_s_is_present_in_parent); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1392; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1392; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_8 = ((!__pyx_t_7) != 0);
  if (__pyx_t_8) {

    /* "pyrobuf_list.pyx":1393
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:
 *             listener._Modified()             # <<<<<<<<<<<<<<
 * 
 *     cpdef extend(self, DoubleList x):
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_listener, __pyx_n_s_Modified); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1393; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = NULL;
    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    if (__pyx_t_4) {
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1393; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    } else {
      __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1393; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "pyrobuf_list.pyx":1392
 *         self._append(x)
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:             # <<<<<<<<<<<<<<
 *             listener._Modified()
 * 
 */
  }

  /* "pyrobuf_list.pyx":1389
 *         pass
 * 
 *     cpdef append(self, double x):             # <<<<<<<<<<<<<<
 *         self._append(x)
 *         listener = <object>self._listener
 */

  /* function exit code */
  __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_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("pyrobuf_list.DoubleList.append", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_listener);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrobuf_list_10DoubleList_26append(PyObject *__pyx_v_self, PyObject *__pyx_arg_x); /*proto*/
static PyObject *__pyx_pw_12pyrobuf_list_10DoubleList_26append(PyObject *__pyx_v_self, PyObject *__pyx_arg_x) {
  double __pyx_v_x;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("append (wrapper)", 0);
  assert(__pyx_arg_x); {
    __pyx_v_x = __pyx_PyFloat_AsDouble(__pyx_arg_x); if (unlikely((__pyx_v_x == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1389; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyrobuf_list.DoubleList.append", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_12pyrobuf_list_10DoubleList_25append(((struct __pyx_obj_12pyrobuf_list_DoubleList *)__pyx_v_self), ((double)__pyx_v_x));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_12pyrobuf_list_10DoubleList_25append(struct __pyx_obj_12pyrobuf_list_DoubleList *__pyx_v_self, double __pyx_v_x) {
  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", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_12pyrobuf_list_10DoubleList_append(__pyx_v_self, __pyx_v_x, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1389; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyrobuf_list.DoubleList.append", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrobuf_list.pyx":1395
 *             listener._Modified()
 * 
 *     cpdef extend(self, DoubleList x):             # <<<<<<<<<<<<<<
 *         cdef double *mem
 *         cdef size_t new_len = self._n_items + len(x)
 */

static PyObject *__pyx_pw_12pyrobuf_list_10DoubleList_28extend(PyObject *__pyx_v_self, PyObject *__pyx_v_x); /*proto*/
static PyObject *__pyx_f_12pyrobuf_list_10DoubleList_extend(struct __pyx_obj_12pyrobuf_list_DoubleList *__pyx_v_self, struct __pyx_obj_12pyrobuf_list_DoubleList *__pyx_v_x, int __pyx_skip_dispatch) {
  double *__pyx_v_mem;
  size_t __pyx_v_new_len;
  size_t __pyx_v_new_size;
  int __pyx_v_i;
  PyObject *__pyx_v_listener = NULL;
  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;
  PyObject *__pyx_t_5 = NULL;
  Py_ssize_t __pyx_t_6;
  int __pyx_t_7;
  size_t __pyx_t_8;
  size_t __pyx_t_9;
  size_t __pyx_t_10;
  int __pyx_t_11;
  double __pyx_t_12;
  int __pyx_t_13;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("extend", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_extend); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1395; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_12pyrobuf_list_10DoubleList_28extend)) {
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
      if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_4)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
        }
      }
      if (!__pyx_t_4) {
        __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_v_x)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1395; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
      } else {
        __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1395; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL;
        __Pyx_INCREF(((PyObject *)__pyx_v_x));
        __Pyx_GIVEREF(((PyObject *)__pyx_v_x));
        PyTuple_SET_ITEM(__pyx_t_5, 0+1, ((PyObject *)__pyx_v_x));
        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1395; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      }
      __Pyx_DECREF(__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;
  }

  /* "pyrobuf_list.pyx":1397
 *     cpdef extend(self, DoubleList x):
 *         cdef double *mem
 *         cdef size_t new_len = self._n_items + len(x)             # <<<<<<<<<<<<<<
 *         cdef size_t new_size
 *         cdef int i
 */
  __pyx_t_6 = PyObject_Length(((PyObject *)__pyx_v_x)); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1397; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_new_len = (__pyx_v_self->_n_items + __pyx_t_6);

  /* "pyrobuf_list.pyx":1401
 *         cdef int i
 * 
 *         if new_len > self._size:             # <<<<<<<<<<<<<<
 *             new_size = max(new_len, 2 * self._size)
 *             mem = <double *>PyMem_Realloc(self._data, new_size * sizeof(double))
 */
  __pyx_t_7 = ((__pyx_v_new_len > __pyx_v_self->_size) != 0);
  if (__pyx_t_7) {

    /* "pyrobuf_list.pyx":1402
 * 
 *         if new_len > self._size:
 *             new_size = max(new_len, 2 * self._size)             # <<<<<<<<<<<<<<
 *             mem = <double *>PyMem_Realloc(self._data, new_size * sizeof(double))
 *             if not mem:
 */
    __pyx_t_8 = (2 * __pyx_v_self->_size);
    __pyx_t_9 = __pyx_v_new_len;
    if (((__pyx_t_8 > __pyx_t_9) != 0)) {
      __pyx_t_10 = __pyx_t_8;
    } else {
      __pyx_t_10 = __pyx_t_9;
    }
    __pyx_v_new_size = __pyx_t_10;

    /* "pyrobuf_list.pyx":1403
 *         if new_len > self._size:
 *             new_size = max(new_len, 2 * self._size)
 *             mem = <double *>PyMem_Realloc(self._data, new_size * sizeof(double))             # <<<<<<<<<<<<<<
 *             if not mem:
 *                 raise MemoryError()
 */
    __pyx_v_mem = ((double *)PyMem_Realloc(__pyx_v_self->_data, (__pyx_v_new_size * (sizeof(double)))));

    /* "pyrobuf_list.pyx":1404
 *             new_size = max(new_len, 2 * self._size)
 *             mem = <double *>PyMem_Realloc(self._data, new_size * sizeof(double))
 *             if not mem:             # <<<<<<<<<<<<<<
 *                 raise MemoryError()
 * 
 */
    __pyx_t_7 = ((!(__pyx_v_mem != 0)) != 0);
    if (__pyx_t_7) {

      /* "pyrobuf_list.pyx":1405
 *             mem = <double *>PyMem_Realloc(self._data, new_size * sizeof(double))
 *             if not mem:
 *                 raise MemoryError()             # <<<<<<<<<<<<<<
 * 
 *             self._data = mem
 */
      PyErr_NoMemory(); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1405; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

      /* "pyrobuf_list.pyx":1404
 *             new_size = max(new_len, 2 * self._size)
 *             mem = <double *>PyMem_Realloc(self._data, new_size * sizeof(double))
 *             if not mem:             # <<<<<<<<<<<<<<
 *                 raise MemoryError()
 * 
 */
    }

    /* "pyrobuf_list.pyx":1407
 *                 raise MemoryError()
 * 
 *             self._data = mem             # <<<<<<<<<<<<<<
 *             self._size = new_size
 * 
 */
    __pyx_v_self->_data = __pyx_v_mem;

    /* "pyrobuf_list.pyx":1408
 * 
 *             self._data = mem
 *             self._size = new_size             # <<<<<<<<<<<<<<
 * 
 *         for i in range(len(x)):
 */
    __pyx_v_self->_size = __pyx_v_new_size;

    /* "pyrobuf_list.pyx":1401
 *         cdef int i
 * 
 *         if new_len > self._size:             # <<<<<<<<<<<<<<
 *             new_size = max(new_len, 2 * self._size)
 *             mem = <double *>PyMem_Realloc(self._data, new_size * sizeof(double))
 */
  }

  /* "pyrobuf_list.pyx":1410
 *             self._size = new_size
 * 
 *         for i in range(len(x)):             # <<<<<<<<<<<<<<
 *             self._data[self._n_items + i] = x[i]
 * 
 */
  __pyx_t_6 = PyObject_Length(((PyObject *)__pyx_v_x)); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1410; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_6; __pyx_t_11+=1) {
    __pyx_v_i = __pyx_t_11;

    /* "pyrobuf_list.pyx":1411
 * 
 *         for i in range(len(x)):
 *             self._data[self._n_items + i] = x[i]             # <<<<<<<<<<<<<<
 * 
 *         if new_len != self._n_items:
 */
    __pyx_t_1 = __Pyx_GetItemInt(((PyObject *)__pyx_v_x), __pyx_v_i, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1411; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_12 = __pyx_PyFloat_AsDouble(__pyx_t_1); if (unlikely((__pyx_t_12 == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1411; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    (__pyx_v_self->_data[(__pyx_v_self->_n_items + __pyx_v_i)]) = __pyx_t_12;
  }

  /* "pyrobuf_list.pyx":1413
 *             self._data[self._n_items + i] = x[i]
 * 
 *         if new_len != self._n_items:             # <<<<<<<<<<<<<<
 *             listener = <object>self._listener
 *             if not listener._is_present_in_parent:
 */
  __pyx_t_7 = ((__pyx_v_new_len != __pyx_v_self->_n_items) != 0);
  if (__pyx_t_7) {

    /* "pyrobuf_list.pyx":1414
 * 
 *         if new_len != self._n_items:
 *             listener = <object>self._listener             # <<<<<<<<<<<<<<
 *             if not listener._is_present_in_parent:
 *                 listener._Modified()
 */
    __pyx_t_1 = ((PyObject *)__pyx_v_self->_listener);
    __Pyx_INCREF(__pyx_t_1);
    __pyx_v_listener = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "pyrobuf_list.pyx":1415
 *         if new_len != self._n_items:
 *             listener = <object>self._listener
 *             if not listener._is_present_in_parent:             # <<<<<<<<<<<<<<
 *                 listener._Modified()
 *         self._n_items = new_len
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_listener, __pyx_n_s_is_present_in_parent); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1415; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1415; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_13 = ((!__pyx_t_7) != 0);
    if (__pyx_t_13) {

      /* "pyrobuf_list.pyx":1416
 *             listener = <object>self._listener
 *             if not listener._is_present_in_parent:
 *                 listener._Modified()             # <<<<<<<<<<<<<<
 *         self._n_items = new_len
 * 
 */
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_listener, __pyx_n_s_Modified); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1416; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = NULL;
      if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
        __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
        if (likely(__pyx_t_3)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_2, function);
        }
      }
      if (__pyx_t_3) {
        __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1416; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      } else {
        __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1416; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "pyrobuf_list.pyx":1415
 *         if new_len != self._n_items:
 *             listener = <object>self._listener
 *             if not listener._is_present_in_parent:             # <<<<<<<<<<<<<<
 *                 listener._Modified()
 *         self._n_items = new_len
 */
    }

    /* "pyrobuf_list.pyx":1413
 *             self._data[self._n_items + i] = x[i]
 * 
 *         if new_len != self._n_items:             # <<<<<<<<<<<<<<
 *             listener = <object>self._listener
 *             if not listener._is_present_in_parent:
 */
  }

  /* "pyrobuf_list.pyx":1417
 *             if not listener._is_present_in_parent:
 *                 listener._Modified()
 *         self._n_items = new_len             # <<<<<<<<<<<<<<
 * 
 *     cpdef insert(self, int i, double x):
 */
  __pyx_v_self->_n_items = __pyx_v_new_len;

  /* "pyrobuf_list.pyx":1395
 *             listener._Modified()
 * 
 *     cpdef extend(self, DoubleList x):             # <<<<<<<<<<<<<<
 *         cdef double *mem
 *         cdef size_t new_len = self._n_items + len(x)
 */

  /* function exit code */
  __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_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pyrobuf_list.DoubleList.extend", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_listener);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrobuf_list_10DoubleList_28extend(PyObject *__pyx_v_self, PyObject *__pyx_v_x); /*proto*/
static PyObject *__pyx_pw_12pyrobuf_list_10DoubleList_28extend(PyObject *__pyx_v_self, PyObject *__pyx_v_x) {
  CYTHON_UNUSED int __pyx_lineno = 0;
  CYTHON_UNUSED const char *__pyx_filename = NULL;
  CYTHON_UNUSED int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("extend (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_x), __pyx_ptype_12pyrobuf_list_DoubleList, 1, "x", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1395; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_12pyrobuf_list_10DoubleList_27extend(((struct __pyx_obj_12pyrobuf_list_DoubleList *)__pyx_v_self), ((struct __pyx_obj_12pyrobuf_list_DoubleList *)__pyx_v_x));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_12pyrobuf_list_10DoubleList_27extend(struct __pyx_obj_12pyrobuf_list_DoubleList *__pyx_v_self, struct __pyx_obj_12pyrobuf_list_DoubleList *__pyx_v_x) {
  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", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_12pyrobuf_list_10DoubleList_extend(__pyx_v_self, __pyx_v_x, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1395; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyrobuf_list.DoubleList.extend", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrobuf_list.pyx":1419
 *         self._n_items = new_len
 * 
 *     cpdef insert(self, int i, double x):             # <<<<<<<<<<<<<<
 *         cdef double *mem
 *         cdef size_t j
 */

static PyObject *__pyx_pw_12pyrobuf_list_10DoubleList_30insert(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_12pyrobuf_list_10DoubleList_insert(struct __pyx_obj_12pyrobuf_list_DoubleList *__pyx_v_self, int __pyx_v_i, double __pyx_v_x, int __pyx_skip_dispatch) {
  double *__pyx_v_mem;
  size_t __pyx_v_j;
  PyObject *__pyx_v_listener = NULL;
  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;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  Py_ssize_t __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  int __pyx_t_10;
  size_t __pyx_t_11;
  size_t __pyx_t_12;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("insert", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_insert); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1419; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_12pyrobuf_list_10DoubleList_30insert)) {
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_i); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1419; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = PyFloat_FromDouble(__pyx_v_x); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1419; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_5 = __pyx_t_1; __pyx_t_6 = NULL;
      __pyx_t_7 = 0;
      if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_5))) {
        __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
        if (likely(__pyx_t_6)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
          __Pyx_INCREF(__pyx_t_6);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_5, function);
          __pyx_t_7 = 1;
        }
      }
      __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1419; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_8);
      if (__pyx_t_6) {
        __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL;
      }
      __Pyx_GIVEREF(__pyx_t_3);
      PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_t_3);
      __Pyx_GIVEREF(__pyx_t_4);
      PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_t_4);
      __pyx_t_3 = 0;
      __pyx_t_4 = 0;
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1419; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 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;
  }

  /* "pyrobuf_list.pyx":1423
 *         cdef size_t j
 * 
 *         if i < 0:             # <<<<<<<<<<<<<<
 *             i += <int>self._n_items
 * 
 */
  __pyx_t_9 = ((__pyx_v_i < 0) != 0);
  if (__pyx_t_9) {

    /* "pyrobuf_list.pyx":1424
 * 
 *         if i < 0:
 *             i += <int>self._n_items             # <<<<<<<<<<<<<<
 * 
 *         if i < 0 or <size_t>i > self._n_items:
 */
    __pyx_v_i = (__pyx_v_i + ((int)__pyx_v_self->_n_items));

    /* "pyrobuf_list.pyx":1423
 *         cdef size_t j
 * 
 *         if i < 0:             # <<<<<<<<<<<<<<
 *             i += <int>self._n_items
 * 
 */
  }

  /* "pyrobuf_list.pyx":1426
 *             i += <int>self._n_items
 * 
 *         if i < 0 or <size_t>i > self._n_items:             # <<<<<<<<<<<<<<
 *             raise IndexError("list index out of range")
 * 
 */
  __pyx_t_10 = ((__pyx_v_i < 0) != 0);
  if (!__pyx_t_10) {
  } else {
    __pyx_t_9 = __pyx_t_10;
    goto __pyx_L5_bool_binop_done;
  }
  __pyx_t_10 = ((((size_t)__pyx_v_i) > __pyx_v_self->_n_items) != 0);
  __pyx_t_9 = __pyx_t_10;
  __pyx_L5_bool_binop_done:;
  if (__pyx_t_9) {

    /* "pyrobuf_list.pyx":1427
 * 
 *         if i < 0 or <size_t>i > self._n_items:
 *             raise IndexError("list index out of range")             # <<<<<<<<<<<<<<
 * 
 *         if self._n_items == self._size:
 */
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_IndexError, __pyx_tuple__45, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1427; __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 = 1427; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

    /* "pyrobuf_list.pyx":1426
 *             i += <int>self._n_items
 * 
 *         if i < 0 or <size_t>i > self._n_items:             # <<<<<<<<<<<<<<
 *             raise IndexError("list index out of range")
 * 
 */
  }

  /* "pyrobuf_list.pyx":1429
 *             raise IndexError("list index out of range")
 * 
 *         if self._n_items == self._size:             # <<<<<<<<<<<<<<
 *             mem = <double *>PyMem_Realloc(self._data, 2 * self._size * sizeof(double))
 *             if not mem:
 */
  __pyx_t_9 = ((__pyx_v_self->_n_items == __pyx_v_self->_size) != 0);
  if (__pyx_t_9) {

    /* "pyrobuf_list.pyx":1430
 * 
 *         if self._n_items == self._size:
 *             mem = <double *>PyMem_Realloc(self._data, 2 * self._size * sizeof(double))             # <<<<<<<<<<<<<<
 *             if not mem:
 *                 raise MemoryError()
 */
    __pyx_v_mem = ((double *)PyMem_Realloc(__pyx_v_self->_data, ((2 * __pyx_v_self->_size) * (sizeof(double)))));

    /* "pyrobuf_list.pyx":1431
 *         if self._n_items == self._size:
 *             mem = <double *>PyMem_Realloc(self._data, 2 * self._size * sizeof(double))
 *             if not mem:             # <<<<<<<<<<<<<<
 *                 raise MemoryError()
 * 
 */
    __pyx_t_9 = ((!(__pyx_v_mem != 0)) != 0);
    if (__pyx_t_9) {

      /* "pyrobuf_list.pyx":1432
 *             mem = <double *>PyMem_Realloc(self._data, 2 * self._size * sizeof(double))
 *             if not mem:
 *                 raise MemoryError()             # <<<<<<<<<<<<<<
 * 
 *             self._data = mem
 */
      PyErr_NoMemory(); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1432; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

      /* "pyrobuf_list.pyx":1431
 *         if self._n_items == self._size:
 *             mem = <double *>PyMem_Realloc(self._data, 2 * self._size * sizeof(double))
 *             if not mem:             # <<<<<<<<<<<<<<
 *                 raise MemoryError()
 * 
 */
    }

    /* "pyrobuf_list.pyx":1434
 *                 raise MemoryError()
 * 
 *             self._data = mem             # <<<<<<<<<<<<<<
 *             self._size *= 2
 * 
 */
    __pyx_v_self->_data = __pyx_v_mem;

    /* "pyrobuf_list.pyx":1435
 * 
 *             self._data = mem
 *             self._size *= 2             # <<<<<<<<<<<<<<
 * 
 *         for j in range(self._n_items, <size_t>i, -1):
 */
    __pyx_v_self->_size = (__pyx_v_self->_size * 2);

    /* "pyrobuf_list.pyx":1429
 *             raise IndexError("list index out of range")
 * 
 *         if self._n_items == self._size:             # <<<<<<<<<<<<<<
 *             mem = <double *>PyMem_Realloc(self._data, 2 * self._size * sizeof(double))
 *             if not mem:
 */
  }

  /* "pyrobuf_list.pyx":1437
 *             self._size *= 2
 * 
 *         for j in range(self._n_items, <size_t>i, -1):             # <<<<<<<<<<<<<<
 *             self._data[j] = self._data[j - 1]
 * 
 */
  __pyx_t_11 = ((size_t)__pyx_v_i);
  for (__pyx_t_12 = __pyx_v_self->_n_items + 1; __pyx_t_12 > __pyx_t_11 + 1; ) { __pyx_t_12-=1;
    __pyx_v_j = __pyx_t_12;

    /* "pyrobuf_list.pyx":1438
 * 
 *         for j in range(self._n_items, <size_t>i, -1):
 *             self._data[j] = self._data[j - 1]             # <<<<<<<<<<<<<<
 * 
 *         self._data[i] = x
 */
    (__pyx_v_self->_data[__pyx_v_j]) = (__pyx_v_self->_data[(__pyx_v_j - 1)]);
  }

  /* "pyrobuf_list.pyx":1440
 *             self._data[j] = self._data[j - 1]
 * 
 *         self._data[i] = x             # <<<<<<<<<<<<<<
 *         self._n_items += 1
 *         listener = <object>self._listener
 */
  (__pyx_v_self->_data[__pyx_v_i]) = __pyx_v_x;

  /* "pyrobuf_list.pyx":1441
 * 
 *         self._data[i] = x
 *         self._n_items += 1             # <<<<<<<<<<<<<<
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:
 */
  __pyx_v_self->_n_items = (__pyx_v_self->_n_items + 1);

  /* "pyrobuf_list.pyx":1442
 *         self._data[i] = x
 *         self._n_items += 1
 *         listener = <object>self._listener             # <<<<<<<<<<<<<<
 *         if not listener._is_present_in_parent:
 *             listener._Modified()
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_self->_listener);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_v_listener = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pyrobuf_list.pyx":1443
 *         self._n_items += 1
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:             # <<<<<<<<<<<<<<
 *             listener._Modified()
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_listener, __pyx_n_s_is_present_in_parent); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1443; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1443; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_10 = ((!__pyx_t_9) != 0);
  if (__pyx_t_10) {

    /* "pyrobuf_list.pyx":1444
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:
 *             listener._Modified()             # <<<<<<<<<<<<<<
 * 
 *     cpdef pop(self):
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_listener, __pyx_n_s_Modified); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1444; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_5 = NULL;
    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    if (__pyx_t_5) {
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_5); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1444; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    } else {
      __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1444; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "pyrobuf_list.pyx":1443
 *         self._n_items += 1
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:             # <<<<<<<<<<<<<<
 *             listener._Modified()
 * 
 */
  }

  /* "pyrobuf_list.pyx":1419
 *         self._n_items = new_len
 * 
 *     cpdef insert(self, int i, double x):             # <<<<<<<<<<<<<<
 *         cdef double *mem
 *         cdef size_t j
 */

  /* function exit code */
  __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_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("pyrobuf_list.DoubleList.insert", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_listener);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrobuf_list_10DoubleList_30insert(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_12pyrobuf_list_10DoubleList_30insert(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_v_i;
  double __pyx_v_x;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("insert (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_i,&__pyx_n_s_x,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_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 (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_x)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("insert", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1419; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "insert") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1419; __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_i = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_i == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1419; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    __pyx_v_x = __pyx_PyFloat_AsDouble(values[1]); if (unlikely((__pyx_v_x == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1419; __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 = 1419; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyrobuf_list.DoubleList.insert", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_12pyrobuf_list_10DoubleList_29insert(((struct __pyx_obj_12pyrobuf_list_DoubleList *)__pyx_v_self), __pyx_v_i, __pyx_v_x);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_12pyrobuf_list_10DoubleList_29insert(struct __pyx_obj_12pyrobuf_list_DoubleList *__pyx_v_self, int __pyx_v_i, double __pyx_v_x) {
  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("insert", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_12pyrobuf_list_10DoubleList_insert(__pyx_v_self, __pyx_v_i, __pyx_v_x, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1419; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyrobuf_list.DoubleList.insert", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrobuf_list.pyx":1446
 *             listener._Modified()
 * 
 *     cpdef pop(self):             # <<<<<<<<<<<<<<
 *         if self._n_items == 0:
 *             raise IndexError("pop from empty list")
 */

static PyObject *__pyx_pw_12pyrobuf_list_10DoubleList_32pop(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_f_12pyrobuf_list_10DoubleList_pop(struct __pyx_obj_12pyrobuf_list_DoubleList *__pyx_v_self, int __pyx_skip_dispatch) {
  PyObject *__pyx_v_listener = NULL;
  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;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("pop", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_pop); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1446; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_12pyrobuf_list_10DoubleList_32pop)) {
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
      if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_4)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
        }
      }
      if (__pyx_t_4) {
        __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1446; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else {
        __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1446; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__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;
  }

  /* "pyrobuf_list.pyx":1447
 * 
 *     cpdef pop(self):
 *         if self._n_items == 0:             # <<<<<<<<<<<<<<
 *             raise IndexError("pop from empty list")
 * 
 */
  __pyx_t_5 = ((__pyx_v_self->_n_items == 0) != 0);
  if (__pyx_t_5) {

    /* "pyrobuf_list.pyx":1448
 *     cpdef pop(self):
 *         if self._n_items == 0:
 *             raise IndexError("pop from empty list")             # <<<<<<<<<<<<<<
 * 
 *         self._n_items -= 1
 */
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_IndexError, __pyx_tuple__46, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1448; __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 = 1448; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

    /* "pyrobuf_list.pyx":1447
 * 
 *     cpdef pop(self):
 *         if self._n_items == 0:             # <<<<<<<<<<<<<<
 *             raise IndexError("pop from empty list")
 * 
 */
  }

  /* "pyrobuf_list.pyx":1450
 *             raise IndexError("pop from empty list")
 * 
 *         self._n_items -= 1             # <<<<<<<<<<<<<<
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:
 */
  __pyx_v_self->_n_items = (__pyx_v_self->_n_items - 1);

  /* "pyrobuf_list.pyx":1451
 * 
 *         self._n_items -= 1
 *         listener = <object>self._listener             # <<<<<<<<<<<<<<
 *         if not listener._is_present_in_parent:
 *             listener._Modified()
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_self->_listener);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_v_listener = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pyrobuf_list.pyx":1452
 *         self._n_items -= 1
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:             # <<<<<<<<<<<<<<
 *             listener._Modified()
 *         return self._data[self._n_items]
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_listener, __pyx_n_s_is_present_in_parent); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1452; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1452; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_6 = ((!__pyx_t_5) != 0);
  if (__pyx_t_6) {

    /* "pyrobuf_list.pyx":1453
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:
 *             listener._Modified()             # <<<<<<<<<<<<<<
 *         return self._data[self._n_items]
 * 
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_listener, __pyx_n_s_Modified); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1453; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = NULL;
    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    if (__pyx_t_3) {
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1453; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    } else {
      __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1453; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "pyrobuf_list.pyx":1452
 *         self._n_items -= 1
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:             # <<<<<<<<<<<<<<
 *             listener._Modified()
 *         return self._data[self._n_items]
 */
  }

  /* "pyrobuf_list.pyx":1454
 *         if not listener._is_present_in_parent:
 *             listener._Modified()
 *         return self._data[self._n_items]             # <<<<<<<<<<<<<<
 * 
 *     cpdef remove(self, double x):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble((__pyx_v_self->_data[__pyx_v_self->_n_items])); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1454; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyrobuf_list.pyx":1446
 *             listener._Modified()
 * 
 *     cpdef pop(self):             # <<<<<<<<<<<<<<
 *         if self._n_items == 0:
 *             raise IndexError("pop from empty list")
 */

  /* function exit code */
  __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("pyrobuf_list.DoubleList.pop", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_listener);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrobuf_list_10DoubleList_32pop(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_12pyrobuf_list_10DoubleList_32pop(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("pop (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrobuf_list_10DoubleList_31pop(((struct __pyx_obj_12pyrobuf_list_DoubleList *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_12pyrobuf_list_10DoubleList_31pop(struct __pyx_obj_12pyrobuf_list_DoubleList *__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("pop", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_12pyrobuf_list_10DoubleList_pop(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1446; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyrobuf_list.DoubleList.pop", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrobuf_list.pyx":1456
 *         return self._data[self._n_items]
 * 
 *     cpdef remove(self, double x):             # <<<<<<<<<<<<<<
 *         cdef size_t i
 *         cdef size_t j
 */

static PyObject *__pyx_pw_12pyrobuf_list_10DoubleList_34remove(PyObject *__pyx_v_self, PyObject *__pyx_arg_x); /*proto*/
static PyObject *__pyx_f_12pyrobuf_list_10DoubleList_remove(struct __pyx_obj_12pyrobuf_list_DoubleList *__pyx_v_self, double __pyx_v_x, int __pyx_skip_dispatch) {
  size_t __pyx_v_i;
  size_t __pyx_v_j;
  int __pyx_v_found;
  PyObject *__pyx_v_listener = NULL;
  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;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  size_t __pyx_t_7;
  size_t __pyx_t_8;
  int __pyx_t_9;
  int __pyx_t_10;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("remove", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_remove); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1456; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_12pyrobuf_list_10DoubleList_34remove)) {
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_3 = PyFloat_FromDouble(__pyx_v_x); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1456; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_4 = __pyx_t_1; __pyx_t_5 = NULL;
      if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_4))) {
        __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
        if (likely(__pyx_t_5)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_5);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_4, function);
        }
      }
      if (!__pyx_t_5) {
        __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1456; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_GOTREF(__pyx_t_2);
      } else {
        __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1456; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL;
        __Pyx_GIVEREF(__pyx_t_3);
        PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_3);
        __pyx_t_3 = 0;
        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1456; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 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;
  }

  /* "pyrobuf_list.pyx":1459
 *         cdef size_t i
 *         cdef size_t j
 *         cdef bint found = 0             # <<<<<<<<<<<<<<
 * 
 *         for i in range(self._n_items):
 */
  __pyx_v_found = 0;

  /* "pyrobuf_list.pyx":1461
 *         cdef bint found = 0
 * 
 *         for i in range(self._n_items):             # <<<<<<<<<<<<<<
 *             if self._data[i] == x:
 *                 found = 1
 */
  __pyx_t_7 = __pyx_v_self->_n_items;
  for (__pyx_t_8 = 0; __pyx_t_8 < __pyx_t_7; __pyx_t_8+=1) {
    __pyx_v_i = __pyx_t_8;

    /* "pyrobuf_list.pyx":1462
 * 
 *         for i in range(self._n_items):
 *             if self._data[i] == x:             # <<<<<<<<<<<<<<
 *                 found = 1
 *                 break
 */
    __pyx_t_9 = (((__pyx_v_self->_data[__pyx_v_i]) == __pyx_v_x) != 0);
    if (__pyx_t_9) {

      /* "pyrobuf_list.pyx":1463
 *         for i in range(self._n_items):
 *             if self._data[i] == x:
 *                 found = 1             # <<<<<<<<<<<<<<
 *                 break
 * 
 */
      __pyx_v_found = 1;

      /* "pyrobuf_list.pyx":1464
 *             if self._data[i] == x:
 *                 found = 1
 *                 break             # <<<<<<<<<<<<<<
 * 
 *         if found == 0:
 */
      goto __pyx_L4_break;

      /* "pyrobuf_list.pyx":1462
 * 
 *         for i in range(self._n_items):
 *             if self._data[i] == x:             # <<<<<<<<<<<<<<
 *                 found = 1
 *                 break
 */
    }
  }
  __pyx_L4_break:;

  /* "pyrobuf_list.pyx":1466
 *                 break
 * 
 *         if found == 0:             # <<<<<<<<<<<<<<
 *             raise ValueError("x not in list")
 * 
 */
  __pyx_t_9 = ((__pyx_v_found == 0) != 0);
  if (__pyx_t_9) {

    /* "pyrobuf_list.pyx":1467
 * 
 *         if found == 0:
 *             raise ValueError("x not in list")             # <<<<<<<<<<<<<<
 * 
 *         for j in range(i, self._n_items):
 */
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__47, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1467; __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 = 1467; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

    /* "pyrobuf_list.pyx":1466
 *                 break
 * 
 *         if found == 0:             # <<<<<<<<<<<<<<
 *             raise ValueError("x not in list")
 * 
 */
  }

  /* "pyrobuf_list.pyx":1469
 *             raise ValueError("x not in list")
 * 
 *         for j in range(i, self._n_items):             # <<<<<<<<<<<<<<
 *             self._data[j] = self._data[j + 1]
 * 
 */
  __pyx_t_7 = __pyx_v_self->_n_items;
  for (__pyx_t_8 = __pyx_v_i; __pyx_t_8 < __pyx_t_7; __pyx_t_8+=1) {
    __pyx_v_j = __pyx_t_8;

    /* "pyrobuf_list.pyx":1470
 * 
 *         for j in range(i, self._n_items):
 *             self._data[j] = self._data[j + 1]             # <<<<<<<<<<<<<<
 * 
 *         self._n_items -= 1
 */
    (__pyx_v_self->_data[__pyx_v_j]) = (__pyx_v_self->_data[(__pyx_v_j + 1)]);
  }

  /* "pyrobuf_list.pyx":1472
 *             self._data[j] = self._data[j + 1]
 * 
 *         self._n_items -= 1             # <<<<<<<<<<<<<<
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:
 */
  __pyx_v_self->_n_items = (__pyx_v_self->_n_items - 1);

  /* "pyrobuf_list.pyx":1473
 * 
 *         self._n_items -= 1
 *         listener = <object>self._listener             # <<<<<<<<<<<<<<
 *         if not listener._is_present_in_parent:
 *             listener._Modified()
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_self->_listener);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_v_listener = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pyrobuf_list.pyx":1474
 *         self._n_items -= 1
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:             # <<<<<<<<<<<<<<
 *             listener._Modified()
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_listener, __pyx_n_s_is_present_in_parent); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1474; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1474; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_10 = ((!__pyx_t_9) != 0);
  if (__pyx_t_10) {

    /* "pyrobuf_list.pyx":1475
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:
 *             listener._Modified()             # <<<<<<<<<<<<<<
 * 
 *     cdef void _append(self, double x):
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_listener, __pyx_n_s_Modified); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1475; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = NULL;
    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    if (__pyx_t_4) {
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1475; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    } else {
      __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1475; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "pyrobuf_list.pyx":1474
 *         self._n_items -= 1
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:             # <<<<<<<<<<<<<<
 *             listener._Modified()
 * 
 */
  }

  /* "pyrobuf_list.pyx":1456
 *         return self._data[self._n_items]
 * 
 *     cpdef remove(self, double x):             # <<<<<<<<<<<<<<
 *         cdef size_t i
 *         cdef size_t j
 */

  /* function exit code */
  __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_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("pyrobuf_list.DoubleList.remove", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_listener);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrobuf_list_10DoubleList_34remove(PyObject *__pyx_v_self, PyObject *__pyx_arg_x); /*proto*/
static PyObject *__pyx_pw_12pyrobuf_list_10DoubleList_34remove(PyObject *__pyx_v_self, PyObject *__pyx_arg_x) {
  double __pyx_v_x;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("remove (wrapper)", 0);
  assert(__pyx_arg_x); {
    __pyx_v_x = __pyx_PyFloat_AsDouble(__pyx_arg_x); if (unlikely((__pyx_v_x == (double)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1456; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyrobuf_list.DoubleList.remove", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_12pyrobuf_list_10DoubleList_33remove(((struct __pyx_obj_12pyrobuf_list_DoubleList *)__pyx_v_self), ((double)__pyx_v_x));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_12pyrobuf_list_10DoubleList_33remove(struct __pyx_obj_12pyrobuf_list_DoubleList *__pyx_v_self, double __pyx_v_x) {
  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", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_12pyrobuf_list_10DoubleList_remove(__pyx_v_self, __pyx_v_x, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1456; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyrobuf_list.DoubleList.remove", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrobuf_list.pyx":1477
 *             listener._Modified()
 * 
 *     cdef void _append(self, double x):             # <<<<<<<<<<<<<<
 *         cdef double *mem
 * 
 */

static void __pyx_f_12pyrobuf_list_10DoubleList__append(struct __pyx_obj_12pyrobuf_list_DoubleList *__pyx_v_self, double __pyx_v_x) {
  double *__pyx_v_mem;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_append", 0);

  /* "pyrobuf_list.pyx":1480
 *         cdef double *mem
 * 
 *         if self._n_items == self._size:             # <<<<<<<<<<<<<<
 *             mem = <double *>PyMem_Realloc(self._data, 2 * self._size * sizeof(double))
 *             if not mem:
 */
  __pyx_t_1 = ((__pyx_v_self->_n_items == __pyx_v_self->_size) != 0);
  if (__pyx_t_1) {

    /* "pyrobuf_list.pyx":1481
 * 
 *         if self._n_items == self._size:
 *             mem = <double *>PyMem_Realloc(self._data, 2 * self._size * sizeof(double))             # <<<<<<<<<<<<<<
 *             if not mem:
 *                 raise MemoryError()
 */
    __pyx_v_mem = ((double *)PyMem_Realloc(__pyx_v_self->_data, ((2 * __pyx_v_self->_size) * (sizeof(double)))));

    /* "pyrobuf_list.pyx":1482
 *         if self._n_items == self._size:
 *             mem = <double *>PyMem_Realloc(self._data, 2 * self._size * sizeof(double))
 *             if not mem:             # <<<<<<<<<<<<<<
 *                 raise MemoryError()
 * 
 */
    __pyx_t_1 = ((!(__pyx_v_mem != 0)) != 0);
    if (__pyx_t_1) {

      /* "pyrobuf_list.pyx":1483
 *             mem = <double *>PyMem_Realloc(self._data, 2 * self._size * sizeof(double))
 *             if not mem:
 *                 raise MemoryError()             # <<<<<<<<<<<<<<
 * 
 *             self._data = mem
 */
      PyErr_NoMemory(); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1483; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

      /* "pyrobuf_list.pyx":1482
 *         if self._n_items == self._size:
 *             mem = <double *>PyMem_Realloc(self._data, 2 * self._size * sizeof(double))
 *             if not mem:             # <<<<<<<<<<<<<<
 *                 raise MemoryError()
 * 
 */
    }

    /* "pyrobuf_list.pyx":1485
 *                 raise MemoryError()
 * 
 *             self._data = mem             # <<<<<<<<<<<<<<
 *             self._size *= 2
 * 
 */
    __pyx_v_self->_data = __pyx_v_mem;

    /* "pyrobuf_list.pyx":1486
 * 
 *             self._data = mem
 *             self._size *= 2             # <<<<<<<<<<<<<<
 * 
 *         self._data[self._n_items] = x
 */
    __pyx_v_self->_size = (__pyx_v_self->_size * 2);

    /* "pyrobuf_list.pyx":1480
 *         cdef double *mem
 * 
 *         if self._n_items == self._size:             # <<<<<<<<<<<<<<
 *             mem = <double *>PyMem_Realloc(self._data, 2 * self._size * sizeof(double))
 *             if not mem:
 */
  }

  /* "pyrobuf_list.pyx":1488
 *             self._size *= 2
 * 
 *         self._data[self._n_items] = x             # <<<<<<<<<<<<<<
 *         self._n_items += 1
 * 
 */
  (__pyx_v_self->_data[__pyx_v_self->_n_items]) = __pyx_v_x;

  /* "pyrobuf_list.pyx":1489
 * 
 *         self._data[self._n_items] = x
 *         self._n_items += 1             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_v_self->_n_items = (__pyx_v_self->_n_items + 1);

  /* "pyrobuf_list.pyx":1477
 *             listener._Modified()
 * 
 *     cdef void _append(self, double x):             # <<<<<<<<<<<<<<
 *         cdef double *mem
 * 
 */

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_WriteUnraisable("pyrobuf_list.DoubleList._append", __pyx_clineno, __pyx_lineno, __pyx_filename, 0, 0);
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
}

/* "pyrobuf_list.pyx":1495
 * cdef class FloatList:
 * 
 *     def __cinit__(self, size_t size=16, object listener=None):             # <<<<<<<<<<<<<<
 *         self._data = <float *>PyMem_Malloc(size * sizeof(float))
 *         if not self._data:
 */

/* Python wrapper */
static int __pyx_pw_12pyrobuf_list_9FloatList_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_12pyrobuf_list_9FloatList_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  size_t __pyx_v_size;
  PyObject *__pyx_v_listener = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_size,&__pyx_n_s_listener,0};
    PyObject* values[2] = {0,0};
    values[1] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_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 (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_size);
          if (value) { values[0] = value; kw_args--; }
        }
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_listener);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1495; __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;
      }
    }
    if (values[0]) {
      __pyx_v_size = __Pyx_PyInt_As_size_t(values[0]); if (unlikely((__pyx_v_size == (size_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1495; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    } else {
      __pyx_v_size = ((size_t)16);
    }
    __pyx_v_listener = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1495; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyrobuf_list.FloatList.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_12pyrobuf_list_9FloatList___cinit__(((struct __pyx_obj_12pyrobuf_list_FloatList *)__pyx_v_self), __pyx_v_size, __pyx_v_listener);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_12pyrobuf_list_9FloatList___cinit__(struct __pyx_obj_12pyrobuf_list_FloatList *__pyx_v_self, size_t __pyx_v_size, PyObject *__pyx_v_listener) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);

  /* "pyrobuf_list.pyx":1496
 * 
 *     def __cinit__(self, size_t size=16, object listener=None):
 *         self._data = <float *>PyMem_Malloc(size * sizeof(float))             # <<<<<<<<<<<<<<
 *         if not self._data:
 *             raise MemoryError()
 */
  __pyx_v_self->_data = ((float *)PyMem_Malloc((__pyx_v_size * (sizeof(float)))));

  /* "pyrobuf_list.pyx":1497
 *     def __cinit__(self, size_t size=16, object listener=None):
 *         self._data = <float *>PyMem_Malloc(size * sizeof(float))
 *         if not self._data:             # <<<<<<<<<<<<<<
 *             raise MemoryError()
 * 
 */
  __pyx_t_1 = ((!(__pyx_v_self->_data != 0)) != 0);
  if (__pyx_t_1) {

    /* "pyrobuf_list.pyx":1498
 *         self._data = <float *>PyMem_Malloc(size * sizeof(float))
 *         if not self._data:
 *             raise MemoryError()             # <<<<<<<<<<<<<<
 * 
 *         self._n_items = 0
 */
    PyErr_NoMemory(); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1498; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

    /* "pyrobuf_list.pyx":1497
 *     def __cinit__(self, size_t size=16, object listener=None):
 *         self._data = <float *>PyMem_Malloc(size * sizeof(float))
 *         if not self._data:             # <<<<<<<<<<<<<<
 *             raise MemoryError()
 * 
 */
  }

  /* "pyrobuf_list.pyx":1500
 *             raise MemoryError()
 * 
 *         self._n_items = 0             # <<<<<<<<<<<<<<
 *         self._size = size
 *         if listener is None:
 */
  __pyx_v_self->_n_items = 0;

  /* "pyrobuf_list.pyx":1501
 * 
 *         self._n_items = 0
 *         self._size = size             # <<<<<<<<<<<<<<
 *         if listener is None:
 *             self._listener = <PyObject *>null_listener
 */
  __pyx_v_self->_size = __pyx_v_size;

  /* "pyrobuf_list.pyx":1502
 *         self._n_items = 0
 *         self._size = size
 *         if listener is None:             # <<<<<<<<<<<<<<
 *             self._listener = <PyObject *>null_listener
 *         else:
 */
  __pyx_t_1 = (__pyx_v_listener == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "pyrobuf_list.pyx":1503
 *         self._size = size
 *         if listener is None:
 *             self._listener = <PyObject *>null_listener             # <<<<<<<<<<<<<<
 *         else:
 *             self._listener = <PyObject *>listener
 */
    __pyx_v_self->_listener = ((PyObject *)null_listener);

    /* "pyrobuf_list.pyx":1502
 *         self._n_items = 0
 *         self._size = size
 *         if listener is None:             # <<<<<<<<<<<<<<
 *             self._listener = <PyObject *>null_listener
 *         else:
 */
    goto __pyx_L4;
  }

  /* "pyrobuf_list.pyx":1505
 *             self._listener = <PyObject *>null_listener
 *         else:
 *             self._listener = <PyObject *>listener             # <<<<<<<<<<<<<<
 * 
 *     def __dealloc__(self):
 */
  /*else*/ {
    __pyx_v_self->_listener = ((PyObject *)__pyx_v_listener);
  }
  __pyx_L4:;

  /* "pyrobuf_list.pyx":1495
 * cdef class FloatList:
 * 
 *     def __cinit__(self, size_t size=16, object listener=None):             # <<<<<<<<<<<<<<
 *         self._data = <float *>PyMem_Malloc(size * sizeof(float))
 *         if not self._data:
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyrobuf_list.FloatList.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrobuf_list.pyx":1507
 *             self._listener = <PyObject *>listener
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         PyMem_Free(self._data)
 * 
 */

/* Python wrapper */
static void __pyx_pw_12pyrobuf_list_9FloatList_3__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_12pyrobuf_list_9FloatList_3__dealloc__(PyObject *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_pf_12pyrobuf_list_9FloatList_2__dealloc__(((struct __pyx_obj_12pyrobuf_list_FloatList *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

static void __pyx_pf_12pyrobuf_list_9FloatList_2__dealloc__(struct __pyx_obj_12pyrobuf_list_FloatList *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__", 0);

  /* "pyrobuf_list.pyx":1508
 * 
 *     def __dealloc__(self):
 *         PyMem_Free(self._data)             # <<<<<<<<<<<<<<
 * 
 *     def __contains__(self, float x):
 */
  PyMem_Free(__pyx_v_self->_data);

  /* "pyrobuf_list.pyx":1507
 *             self._listener = <PyObject *>listener
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         PyMem_Free(self._data)
 * 
 */

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

/* "pyrobuf_list.pyx":1510
 *         PyMem_Free(self._data)
 * 
 *     def __contains__(self, float x):             # <<<<<<<<<<<<<<
 *         cdef size_t i
 *         for i in range(self._n_items):
 */

/* Python wrapper */
static int __pyx_pw_12pyrobuf_list_9FloatList_5__contains__(PyObject *__pyx_v_self, PyObject *__pyx_arg_x); /*proto*/
static int __pyx_pw_12pyrobuf_list_9FloatList_5__contains__(PyObject *__pyx_v_self, PyObject *__pyx_arg_x) {
  float __pyx_v_x;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__contains__ (wrapper)", 0);
  assert(__pyx_arg_x); {
    __pyx_v_x = __pyx_PyFloat_AsFloat(__pyx_arg_x); if (unlikely((__pyx_v_x == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1510; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyrobuf_list.FloatList.__contains__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_12pyrobuf_list_9FloatList_4__contains__(((struct __pyx_obj_12pyrobuf_list_FloatList *)__pyx_v_self), ((float)__pyx_v_x));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_12pyrobuf_list_9FloatList_4__contains__(struct __pyx_obj_12pyrobuf_list_FloatList *__pyx_v_self, float __pyx_v_x) {
  size_t __pyx_v_i;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  size_t __pyx_t_1;
  size_t __pyx_t_2;
  int __pyx_t_3;
  __Pyx_RefNannySetupContext("__contains__", 0);

  /* "pyrobuf_list.pyx":1512
 *     def __contains__(self, float x):
 *         cdef size_t i
 *         for i in range(self._n_items):             # <<<<<<<<<<<<<<
 *             if self._data[i] == x:
 *                 return True
 */
  __pyx_t_1 = __pyx_v_self->_n_items;
  for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
    __pyx_v_i = __pyx_t_2;

    /* "pyrobuf_list.pyx":1513
 *         cdef size_t i
 *         for i in range(self._n_items):
 *             if self._data[i] == x:             # <<<<<<<<<<<<<<
 *                 return True
 * 
 */
    __pyx_t_3 = (((__pyx_v_self->_data[__pyx_v_i]) == __pyx_v_x) != 0);
    if (__pyx_t_3) {

      /* "pyrobuf_list.pyx":1514
 *         for i in range(self._n_items):
 *             if self._data[i] == x:
 *                 return True             # <<<<<<<<<<<<<<
 * 
 *         return False
 */
      __pyx_r = 1;
      goto __pyx_L0;

      /* "pyrobuf_list.pyx":1513
 *         cdef size_t i
 *         for i in range(self._n_items):
 *             if self._data[i] == x:             # <<<<<<<<<<<<<<
 *                 return True
 * 
 */
    }
  }

  /* "pyrobuf_list.pyx":1516
 *                 return True
 * 
 *         return False             # <<<<<<<<<<<<<<
 * 
 *     def __delitem__(self, int i):
 */
  __pyx_r = 0;
  goto __pyx_L0;

  /* "pyrobuf_list.pyx":1510
 *         PyMem_Free(self._data)
 * 
 *     def __contains__(self, float x):             # <<<<<<<<<<<<<<
 *         cdef size_t i
 *         for i in range(self._n_items):
 */

  /* function exit code */
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrobuf_list.pyx":1518
 *         return False
 * 
 *     def __delitem__(self, int i):             # <<<<<<<<<<<<<<
 *         if i < 0:
 *             i += <int>self._n_items
 */

/* Python wrapper */
static int __pyx_pw_12pyrobuf_list_9FloatList_7__delitem__(PyObject *__pyx_v_self, PyObject *__pyx_arg_i); /*proto*/
static int __pyx_pw_12pyrobuf_list_9FloatList_7__delitem__(PyObject *__pyx_v_self, PyObject *__pyx_arg_i) {
  int __pyx_v_i;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__delitem__ (wrapper)", 0);
  assert(__pyx_arg_i); {
    __pyx_v_i = __Pyx_PyInt_As_int(__pyx_arg_i); if (unlikely((__pyx_v_i == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1518; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyrobuf_list.FloatList.__delitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_12pyrobuf_list_9FloatList_6__delitem__(((struct __pyx_obj_12pyrobuf_list_FloatList *)__pyx_v_self), ((int)__pyx_v_i));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_12pyrobuf_list_9FloatList_6__delitem__(struct __pyx_obj_12pyrobuf_list_FloatList *__pyx_v_self, int __pyx_v_i) {
  size_t __pyx_v_j;
  PyObject *__pyx_v_listener = NULL;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  size_t __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;
  __Pyx_RefNannySetupContext("__delitem__", 0);

  /* "pyrobuf_list.pyx":1519
 * 
 *     def __delitem__(self, int i):
 *         if i < 0:             # <<<<<<<<<<<<<<
 *             i += <int>self._n_items
 * 
 */
  __pyx_t_1 = ((__pyx_v_i < 0) != 0);
  if (__pyx_t_1) {

    /* "pyrobuf_list.pyx":1520
 *     def __delitem__(self, int i):
 *         if i < 0:
 *             i += <int>self._n_items             # <<<<<<<<<<<<<<
 * 
 *         if i < 0 or <size_t>i >= self._n_items:
 */
    __pyx_v_i = (__pyx_v_i + ((int)__pyx_v_self->_n_items));

    /* "pyrobuf_list.pyx":1519
 * 
 *     def __delitem__(self, int i):
 *         if i < 0:             # <<<<<<<<<<<<<<
 *             i += <int>self._n_items
 * 
 */
  }

  /* "pyrobuf_list.pyx":1522
 *             i += <int>self._n_items
 * 
 *         if i < 0 or <size_t>i >= self._n_items:             # <<<<<<<<<<<<<<
 *             raise IndexError("list index out of range")
 * 
 */
  __pyx_t_2 = ((__pyx_v_i < 0) != 0);
  if (!__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L5_bool_binop_done;
  }
  __pyx_t_2 = ((((size_t)__pyx_v_i) >= __pyx_v_self->_n_items) != 0);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L5_bool_binop_done:;
  if (__pyx_t_1) {

    /* "pyrobuf_list.pyx":1523
 * 
 *         if i < 0 or <size_t>i >= self._n_items:
 *             raise IndexError("list index out of range")             # <<<<<<<<<<<<<<
 * 
 *         cdef size_t j
 */
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_IndexError, __pyx_tuple__48, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1523; __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 = 1523; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

    /* "pyrobuf_list.pyx":1522
 *             i += <int>self._n_items
 * 
 *         if i < 0 or <size_t>i >= self._n_items:             # <<<<<<<<<<<<<<
 *             raise IndexError("list index out of range")
 * 
 */
  }

  /* "pyrobuf_list.pyx":1526
 * 
 *         cdef size_t j
 *         for j in range(i, self._n_items):             # <<<<<<<<<<<<<<
 *             self._data[j] = self._data[j + 1]
 * 
 */
  __pyx_t_4 = __pyx_v_self->_n_items;
  for (__pyx_t_5 = __pyx_v_i; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
    __pyx_v_j = __pyx_t_5;

    /* "pyrobuf_list.pyx":1527
 *         cdef size_t j
 *         for j in range(i, self._n_items):
 *             self._data[j] = self._data[j + 1]             # <<<<<<<<<<<<<<
 * 
 *         self._n_items -= 1
 */
    (__pyx_v_self->_data[__pyx_v_j]) = (__pyx_v_self->_data[(__pyx_v_j + 1)]);
  }

  /* "pyrobuf_list.pyx":1529
 *             self._data[j] = self._data[j + 1]
 * 
 *         self._n_items -= 1             # <<<<<<<<<<<<<<
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:
 */
  __pyx_v_self->_n_items = (__pyx_v_self->_n_items - 1);

  /* "pyrobuf_list.pyx":1530
 * 
 *         self._n_items -= 1
 *         listener = <object>self._listener             # <<<<<<<<<<<<<<
 *         if not listener._is_present_in_parent:
 *             listener._Modified()
 */
  __pyx_t_3 = ((PyObject *)__pyx_v_self->_listener);
  __Pyx_INCREF(__pyx_t_3);
  __pyx_v_listener = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "pyrobuf_list.pyx":1531
 *         self._n_items -= 1
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:             # <<<<<<<<<<<<<<
 *             listener._Modified()
 * 
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_listener, __pyx_n_s_is_present_in_parent); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1531; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1531; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_2 = ((!__pyx_t_1) != 0);
  if (__pyx_t_2) {

    /* "pyrobuf_list.pyx":1532
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:
 *             listener._Modified()             # <<<<<<<<<<<<<<
 * 
 *     def __getitem__(self, int i):
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_listener, __pyx_n_s_Modified); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1532; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = NULL;
    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_6, function);
      }
    }
    if (__pyx_t_7) {
      __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_7); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1532; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    } else {
      __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1532; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "pyrobuf_list.pyx":1531
 *         self._n_items -= 1
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:             # <<<<<<<<<<<<<<
 *             listener._Modified()
 * 
 */
  }

  /* "pyrobuf_list.pyx":1518
 *         return False
 * 
 *     def __delitem__(self, int i):             # <<<<<<<<<<<<<<
 *         if i < 0:
 *             i += <int>self._n_items
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("pyrobuf_list.FloatList.__delitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_listener);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrobuf_list.pyx":1534
 *             listener._Modified()
 * 
 *     def __getitem__(self, int i):             # <<<<<<<<<<<<<<
 *         if i < 0:
 *             i += <int>self._n_items
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrobuf_list_9FloatList_9__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_arg_i); /*proto*/
static PyObject *__pyx_pw_12pyrobuf_list_9FloatList_9__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_arg_i) {
  int __pyx_v_i;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0);
  assert(__pyx_arg_i); {
    __pyx_v_i = __Pyx_PyInt_As_int(__pyx_arg_i); if (unlikely((__pyx_v_i == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1534; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyrobuf_list.FloatList.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_12pyrobuf_list_9FloatList_8__getitem__(((struct __pyx_obj_12pyrobuf_list_FloatList *)__pyx_v_self), ((int)__pyx_v_i));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_12pyrobuf_list_9FloatList_8__getitem__(struct __pyx_obj_12pyrobuf_list_FloatList *__pyx_v_self, int __pyx_v_i) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__getitem__", 0);

  /* "pyrobuf_list.pyx":1535
 * 
 *     def __getitem__(self, int i):
 *         if i < 0:             # <<<<<<<<<<<<<<
 *             i += <int>self._n_items
 * 
 */
  __pyx_t_1 = ((__pyx_v_i < 0) != 0);
  if (__pyx_t_1) {

    /* "pyrobuf_list.pyx":1536
 *     def __getitem__(self, int i):
 *         if i < 0:
 *             i += <int>self._n_items             # <<<<<<<<<<<<<<
 * 
 *         if i < 0 or <size_t>i >= self._n_items or i < 0:
 */
    __pyx_v_i = (__pyx_v_i + ((int)__pyx_v_self->_n_items));

    /* "pyrobuf_list.pyx":1535
 * 
 *     def __getitem__(self, int i):
 *         if i < 0:             # <<<<<<<<<<<<<<
 *             i += <int>self._n_items
 * 
 */
  }

  /* "pyrobuf_list.pyx":1538
 *             i += <int>self._n_items
 * 
 *         if i < 0 or <size_t>i >= self._n_items or i < 0:             # <<<<<<<<<<<<<<
 *             raise IndexError("list index out of range")
 * 
 */
  __pyx_t_2 = ((__pyx_v_i < 0) != 0);
  if (!__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L5_bool_binop_done;
  }
  __pyx_t_2 = ((((size_t)__pyx_v_i) >= __pyx_v_self->_n_items) != 0);
  if (!__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L5_bool_binop_done;
  }
  __pyx_t_2 = ((__pyx_v_i < 0) != 0);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L5_bool_binop_done:;
  if (__pyx_t_1) {

    /* "pyrobuf_list.pyx":1539
 * 
 *         if i < 0 or <size_t>i >= self._n_items or i < 0:
 *             raise IndexError("list index out of range")             # <<<<<<<<<<<<<<
 * 
 *         return self._data[i]
 */
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_IndexError, __pyx_tuple__49, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1539; __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 = 1539; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

    /* "pyrobuf_list.pyx":1538
 *             i += <int>self._n_items
 * 
 *         if i < 0 or <size_t>i >= self._n_items or i < 0:             # <<<<<<<<<<<<<<
 *             raise IndexError("list index out of range")
 * 
 */
  }

  /* "pyrobuf_list.pyx":1541
 *             raise IndexError("list index out of range")
 * 
 *         return self._data[i]             # <<<<<<<<<<<<<<
 * 
 *     def __iter__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = PyFloat_FromDouble((__pyx_v_self->_data[__pyx_v_i])); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1541; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "pyrobuf_list.pyx":1534
 *             listener._Modified()
 * 
 *     def __getitem__(self, int i):             # <<<<<<<<<<<<<<
 *         if i < 0:
 *             i += <int>self._n_items
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pyrobuf_list.FloatList.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_12pyrobuf_list_9FloatList_12generator6(__pyx_CoroutineObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */

/* "pyrobuf_list.pyx":1543
 *         return self._data[i]
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         cdef size_t idx = 0
 *         while idx < self._n_items:
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrobuf_list_9FloatList_11__iter__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_12pyrobuf_list_9FloatList_11__iter__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrobuf_list_9FloatList_10__iter__(((struct __pyx_obj_12pyrobuf_list_FloatList *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_12pyrobuf_list_9FloatList_10__iter__(struct __pyx_obj_12pyrobuf_list_FloatList *__pyx_v_self) {
  struct __pyx_obj_12pyrobuf_list___pyx_scope_struct_6___iter__ *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__iter__", 0);
  __pyx_cur_scope = (struct __pyx_obj_12pyrobuf_list___pyx_scope_struct_6___iter__ *)__pyx_tp_new_12pyrobuf_list___pyx_scope_struct_6___iter__(__pyx_ptype_12pyrobuf_list___pyx_scope_struct_6___iter__, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __Pyx_GOTREF(__pyx_cur_scope);
  __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
  __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  {
    __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_12pyrobuf_list_9FloatList_12generator6, (PyObject *) __pyx_cur_scope, __pyx_n_s_iter, __pyx_n_s_FloatList___iter); if (unlikely(!gen)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1543; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyrobuf_list.FloatList.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_gb_12pyrobuf_list_9FloatList_12generator6(__pyx_CoroutineObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_12pyrobuf_list___pyx_scope_struct_6___iter__ *__pyx_cur_scope = ((struct __pyx_obj_12pyrobuf_list___pyx_scope_struct_6___iter__ *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("None", 0);
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    case 1: goto __pyx_L6_resume_from_yield;
    default: /* CPython raises the right error here */
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __pyx_L3_first_run:;
  if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1543; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pyrobuf_list.pyx":1544
 * 
 *     def __iter__(self):
 *         cdef size_t idx = 0             # <<<<<<<<<<<<<<
 *         while idx < self._n_items:
 *             yield self._data[idx]
 */
  __pyx_cur_scope->__pyx_v_idx = 0;

  /* "pyrobuf_list.pyx":1545
 *     def __iter__(self):
 *         cdef size_t idx = 0
 *         while idx < self._n_items:             # <<<<<<<<<<<<<<
 *             yield self._data[idx]
 *             idx += 1
 */
  while (1) {
    __pyx_t_1 = ((__pyx_cur_scope->__pyx_v_idx < __pyx_cur_scope->__pyx_v_self->_n_items) != 0);
    if (!__pyx_t_1) break;

    /* "pyrobuf_list.pyx":1546
 *         cdef size_t idx = 0
 *         while idx < self._n_items:
 *             yield self._data[idx]             # <<<<<<<<<<<<<<
 *             idx += 1
 * 
 */
    __pyx_t_2 = PyFloat_FromDouble((__pyx_cur_scope->__pyx_v_self->_data[__pyx_cur_scope->__pyx_v_idx])); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1546; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    __Pyx_XGIVEREF(__pyx_r);
    __Pyx_RefNannyFinishContext();
    /* return from generator, yielding value */
    __pyx_generator->resume_label = 1;
    return __pyx_r;
    __pyx_L6_resume_from_yield:;
    if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1546; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

    /* "pyrobuf_list.pyx":1547
 *         while idx < self._n_items:
 *             yield self._data[idx]
 *             idx += 1             # <<<<<<<<<<<<<<
 * 
 *     def __len__(self):
 */
    __pyx_cur_scope->__pyx_v_idx = (__pyx_cur_scope->__pyx_v_idx + 1);
  }

  /* "pyrobuf_list.pyx":1543
 *         return self._data[i]
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         cdef size_t idx = 0
 *         while idx < self._n_items:
 */

  /* function exit code */
  PyErr_SetNone(PyExc_StopIteration);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
  __pyx_generator->resume_label = -1;
  __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrobuf_list.pyx":1549
 *             idx += 1
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         return self._n_items
 * 
 */

/* Python wrapper */
static Py_ssize_t __pyx_pw_12pyrobuf_list_9FloatList_14__len__(PyObject *__pyx_v_self); /*proto*/
static Py_ssize_t __pyx_pw_12pyrobuf_list_9FloatList_14__len__(PyObject *__pyx_v_self) {
  Py_ssize_t __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__len__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrobuf_list_9FloatList_13__len__(((struct __pyx_obj_12pyrobuf_list_FloatList *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static Py_ssize_t __pyx_pf_12pyrobuf_list_9FloatList_13__len__(struct __pyx_obj_12pyrobuf_list_FloatList *__pyx_v_self) {
  Py_ssize_t __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__len__", 0);

  /* "pyrobuf_list.pyx":1550
 * 
 *     def __len__(self):
 *         return self._n_items             # <<<<<<<<<<<<<<
 * 
 *     def __repr__(self):
 */
  __pyx_r = __pyx_v_self->_n_items;
  goto __pyx_L0;

  /* "pyrobuf_list.pyx":1549
 *             idx += 1
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         return self._n_items
 * 
 */

  /* function exit code */
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrobuf_list.pyx":1552
 *         return self._n_items
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return repr(list(self))
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrobuf_list_9FloatList_16__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_12pyrobuf_list_9FloatList_16__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrobuf_list_9FloatList_15__repr__(((struct __pyx_obj_12pyrobuf_list_FloatList *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_12pyrobuf_list_9FloatList_15__repr__(struct __pyx_obj_12pyrobuf_list_FloatList *__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__", 0);

  /* "pyrobuf_list.pyx":1553
 * 
 *     def __repr__(self):
 *         return repr(list(self))             # <<<<<<<<<<<<<<
 * 
 *     def __setitem__(self, int i, float x):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PySequence_List(((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1553; __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 = 1553; __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;

  /* "pyrobuf_list.pyx":1552
 *         return self._n_items
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return repr(list(self))
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pyrobuf_list.FloatList.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrobuf_list.pyx":1555
 *         return repr(list(self))
 * 
 *     def __setitem__(self, int i, float x):             # <<<<<<<<<<<<<<
 *         if i < 0:
 *             i += <int>self._n_items
 */

/* Python wrapper */
static int __pyx_pw_12pyrobuf_list_9FloatList_18__setitem__(PyObject *__pyx_v_self, PyObject *__pyx_arg_i, PyObject *__pyx_arg_x); /*proto*/
static int __pyx_pw_12pyrobuf_list_9FloatList_18__setitem__(PyObject *__pyx_v_self, PyObject *__pyx_arg_i, PyObject *__pyx_arg_x) {
  int __pyx_v_i;
  float __pyx_v_x;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setitem__ (wrapper)", 0);
  assert(__pyx_arg_i); {
    __pyx_v_i = __Pyx_PyInt_As_int(__pyx_arg_i); if (unlikely((__pyx_v_i == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1555; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  }
  assert(__pyx_arg_x); {
    __pyx_v_x = __pyx_PyFloat_AsFloat(__pyx_arg_x); if (unlikely((__pyx_v_x == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1555; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyrobuf_list.FloatList.__setitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_12pyrobuf_list_9FloatList_17__setitem__(((struct __pyx_obj_12pyrobuf_list_FloatList *)__pyx_v_self), ((int)__pyx_v_i), ((float)__pyx_v_x));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_12pyrobuf_list_9FloatList_17__setitem__(struct __pyx_obj_12pyrobuf_list_FloatList *__pyx_v_self, int __pyx_v_i, float __pyx_v_x) {
  PyObject *__pyx_v_listener = NULL;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  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;
  __Pyx_RefNannySetupContext("__setitem__", 0);

  /* "pyrobuf_list.pyx":1556
 * 
 *     def __setitem__(self, int i, float x):
 *         if i < 0:             # <<<<<<<<<<<<<<
 *             i += <int>self._n_items
 * 
 */
  __pyx_t_1 = ((__pyx_v_i < 0) != 0);
  if (__pyx_t_1) {

    /* "pyrobuf_list.pyx":1557
 *     def __setitem__(self, int i, float x):
 *         if i < 0:
 *             i += <int>self._n_items             # <<<<<<<<<<<<<<
 * 
 *         if i < 0 or <size_t>i >= self._n_items:
 */
    __pyx_v_i = (__pyx_v_i + ((int)__pyx_v_self->_n_items));

    /* "pyrobuf_list.pyx":1556
 * 
 *     def __setitem__(self, int i, float x):
 *         if i < 0:             # <<<<<<<<<<<<<<
 *             i += <int>self._n_items
 * 
 */
  }

  /* "pyrobuf_list.pyx":1559
 *             i += <int>self._n_items
 * 
 *         if i < 0 or <size_t>i >= self._n_items:             # <<<<<<<<<<<<<<
 *             raise IndexError("list index out of range")
 * 
 */
  __pyx_t_2 = ((__pyx_v_i < 0) != 0);
  if (!__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L5_bool_binop_done;
  }
  __pyx_t_2 = ((((size_t)__pyx_v_i) >= __pyx_v_self->_n_items) != 0);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L5_bool_binop_done:;
  if (__pyx_t_1) {

    /* "pyrobuf_list.pyx":1560
 * 
 *         if i < 0 or <size_t>i >= self._n_items:
 *             raise IndexError("list index out of range")             # <<<<<<<<<<<<<<
 * 
 *         self._data[i] = x
 */
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_IndexError, __pyx_tuple__50, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1560; __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 = 1560; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

    /* "pyrobuf_list.pyx":1559
 *             i += <int>self._n_items
 * 
 *         if i < 0 or <size_t>i >= self._n_items:             # <<<<<<<<<<<<<<
 *             raise IndexError("list index out of range")
 * 
 */
  }

  /* "pyrobuf_list.pyx":1562
 *             raise IndexError("list index out of range")
 * 
 *         self._data[i] = x             # <<<<<<<<<<<<<<
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:
 */
  (__pyx_v_self->_data[__pyx_v_i]) = __pyx_v_x;

  /* "pyrobuf_list.pyx":1563
 * 
 *         self._data[i] = x
 *         listener = <object>self._listener             # <<<<<<<<<<<<<<
 *         if not listener._is_present_in_parent:
 *             listener._Modified()
 */
  __pyx_t_3 = ((PyObject *)__pyx_v_self->_listener);
  __Pyx_INCREF(__pyx_t_3);
  __pyx_v_listener = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "pyrobuf_list.pyx":1564
 *         self._data[i] = x
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:             # <<<<<<<<<<<<<<
 *             listener._Modified()
 * 
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_listener, __pyx_n_s_is_present_in_parent); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1564; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1564; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_2 = ((!__pyx_t_1) != 0);
  if (__pyx_t_2) {

    /* "pyrobuf_list.pyx":1565
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:
 *             listener._Modified()             # <<<<<<<<<<<<<<
 * 
 *     def __str__(self):
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_listener, __pyx_n_s_Modified); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1565; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = NULL;
    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    if (__pyx_t_5) {
      __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1565; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    } else {
      __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1565; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "pyrobuf_list.pyx":1564
 *         self._data[i] = x
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:             # <<<<<<<<<<<<<<
 *             listener._Modified()
 * 
 */
  }

  /* "pyrobuf_list.pyx":1555
 *         return repr(list(self))
 * 
 *     def __setitem__(self, int i, float x):             # <<<<<<<<<<<<<<
 *         if i < 0:
 *             i += <int>self._n_items
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pyrobuf_list.FloatList.__setitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_listener);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrobuf_list.pyx":1567
 *             listener._Modified()
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return str(list(self))
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrobuf_list_9FloatList_20__str__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_12pyrobuf_list_9FloatList_20__str__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrobuf_list_9FloatList_19__str__(((struct __pyx_obj_12pyrobuf_list_FloatList *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_12pyrobuf_list_9FloatList_19__str__(struct __pyx_obj_12pyrobuf_list_FloatList *__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__", 0);

  /* "pyrobuf_list.pyx":1568
 * 
 *     def __str__(self):
 *         return str(list(self))             # <<<<<<<<<<<<<<
 * 
 *     def __getbuffer__(self, Py_buffer *buffer, int flags):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PySequence_List(((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1568; __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 = 1568; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)(&PyString_Type)), __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1568; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyrobuf_list.pyx":1567
 *             listener._Modified()
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return str(list(self))
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pyrobuf_list.FloatList.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrobuf_list.pyx":1570
 *         return str(list(self))
 * 
 *     def __getbuffer__(self, Py_buffer *buffer, int flags):             # <<<<<<<<<<<<<<
 * 
 *         cdef Py_ssize_t itemsize = sizeof(float)
 */

/* Python wrapper */
static CYTHON_UNUSED int __pyx_pw_12pyrobuf_list_9FloatList_22__getbuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_buffer, int __pyx_v_flags); /*proto*/
static CYTHON_UNUSED int __pyx_pw_12pyrobuf_list_9FloatList_22__getbuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_buffer, int __pyx_v_flags) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__getbuffer__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrobuf_list_9FloatList_21__getbuffer__(((struct __pyx_obj_12pyrobuf_list_FloatList *)__pyx_v_self), ((Py_buffer *)__pyx_v_buffer), ((int)__pyx_v_flags));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_12pyrobuf_list_9FloatList_21__getbuffer__(struct __pyx_obj_12pyrobuf_list_FloatList *__pyx_v_self, Py_buffer *__pyx_v_buffer, CYTHON_UNUSED int __pyx_v_flags) {
  Py_ssize_t __pyx_v_itemsize;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  size_t __pyx_t_1;
  Py_ssize_t *__pyx_t_2;
  __Pyx_RefNannySetupContext("__getbuffer__", 0);
  if (__pyx_v_buffer != NULL) {
    __pyx_v_buffer->obj = Py_None; __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(__pyx_v_buffer->obj);
  }

  /* "pyrobuf_list.pyx":1572
 *     def __getbuffer__(self, Py_buffer *buffer, int flags):
 * 
 *         cdef Py_ssize_t itemsize = sizeof(float)             # <<<<<<<<<<<<<<
 *         self.shape[0] = self._n_items
 *         self.strides[0] = 1
 */
  __pyx_v_itemsize = (sizeof(float));

  /* "pyrobuf_list.pyx":1573
 * 
 *         cdef Py_ssize_t itemsize = sizeof(float)
 *         self.shape[0] = self._n_items             # <<<<<<<<<<<<<<
 *         self.strides[0] = 1
 * 
 */
  __pyx_t_1 = __pyx_v_self->_n_items;
  (__pyx_v_self->shape[0]) = __pyx_t_1;

  /* "pyrobuf_list.pyx":1574
 *         cdef Py_ssize_t itemsize = sizeof(float)
 *         self.shape[0] = self._n_items
 *         self.strides[0] = 1             # <<<<<<<<<<<<<<
 * 
 *         buffer.buf = <char *>(self._data)
 */
  (__pyx_v_self->strides[0]) = 1;

  /* "pyrobuf_list.pyx":1576
 *         self.strides[0] = 1
 * 
 *         buffer.buf = <char *>(self._data)             # <<<<<<<<<<<<<<
 *         buffer.format = 'f'
 *         buffer.internal = NULL                  # see References
 */
  __pyx_v_buffer->buf = ((char *)__pyx_v_self->_data);

  /* "pyrobuf_list.pyx":1577
 * 
 *         buffer.buf = <char *>(self._data)
 *         buffer.format = 'f'             # <<<<<<<<<<<<<<
 *         buffer.internal = NULL                  # see References
 *         buffer.itemsize = itemsize
 */
  __pyx_v_buffer->format = __pyx_k_f;

  /* "pyrobuf_list.pyx":1578
 *         buffer.buf = <char *>(self._data)
 *         buffer.format = 'f'
 *         buffer.internal = NULL                  # see References             # <<<<<<<<<<<<<<
 *         buffer.itemsize = itemsize
 *         buffer.len = self._n_items
 */
  __pyx_v_buffer->internal = NULL;

  /* "pyrobuf_list.pyx":1579
 *         buffer.format = 'f'
 *         buffer.internal = NULL                  # see References
 *         buffer.itemsize = itemsize             # <<<<<<<<<<<<<<
 *         buffer.len = self._n_items
 *         buffer.ndim = 1
 */
  __pyx_v_buffer->itemsize = __pyx_v_itemsize;

  /* "pyrobuf_list.pyx":1580
 *         buffer.internal = NULL                  # see References
 *         buffer.itemsize = itemsize
 *         buffer.len = self._n_items             # <<<<<<<<<<<<<<
 *         buffer.ndim = 1
 *         buffer.obj = self
 */
  __pyx_t_1 = __pyx_v_self->_n_items;
  __pyx_v_buffer->len = __pyx_t_1;

  /* "pyrobuf_list.pyx":1581
 *         buffer.itemsize = itemsize
 *         buffer.len = self._n_items
 *         buffer.ndim = 1             # <<<<<<<<<<<<<<
 *         buffer.obj = self
 *         buffer.readonly = 1
 */
  __pyx_v_buffer->ndim = 1;

  /* "pyrobuf_list.pyx":1582
 *         buffer.len = self._n_items
 *         buffer.ndim = 1
 *         buffer.obj = self             # <<<<<<<<<<<<<<
 *         buffer.readonly = 1
 *         buffer.shape = self.shape
 */
  __Pyx_INCREF(((PyObject *)__pyx_v_self));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
  __Pyx_GOTREF(__pyx_v_buffer->obj);
  __Pyx_DECREF(__pyx_v_buffer->obj);
  __pyx_v_buffer->obj = ((PyObject *)__pyx_v_self);

  /* "pyrobuf_list.pyx":1583
 *         buffer.ndim = 1
 *         buffer.obj = self
 *         buffer.readonly = 1             # <<<<<<<<<<<<<<
 *         buffer.shape = self.shape
 *         buffer.strides = self.strides
 */
  __pyx_v_buffer->readonly = 1;

  /* "pyrobuf_list.pyx":1584
 *         buffer.obj = self
 *         buffer.readonly = 1
 *         buffer.shape = self.shape             # <<<<<<<<<<<<<<
 *         buffer.strides = self.strides
 *         buffer.suboffsets = NULL                # for pointer arrays only
 */
  __pyx_t_2 = __pyx_v_self->shape;
  __pyx_v_buffer->shape = __pyx_t_2;

  /* "pyrobuf_list.pyx":1585
 *         buffer.readonly = 1
 *         buffer.shape = self.shape
 *         buffer.strides = self.strides             # <<<<<<<<<<<<<<
 *         buffer.suboffsets = NULL                # for pointer arrays only
 * 
 */
  __pyx_t_2 = __pyx_v_self->strides;
  __pyx_v_buffer->strides = __pyx_t_2;

  /* "pyrobuf_list.pyx":1586
 *         buffer.shape = self.shape
 *         buffer.strides = self.strides
 *         buffer.suboffsets = NULL                # for pointer arrays only             # <<<<<<<<<<<<<<
 * 
 *     def __releasebuffer__(self, Py_buffer *buffer):
 */
  __pyx_v_buffer->suboffsets = NULL;

  /* "pyrobuf_list.pyx":1570
 *         return str(list(self))
 * 
 *     def __getbuffer__(self, Py_buffer *buffer, int flags):             # <<<<<<<<<<<<<<
 * 
 *         cdef Py_ssize_t itemsize = sizeof(float)
 */

  /* function exit code */
  __pyx_r = 0;
  if (__pyx_v_buffer != NULL && __pyx_v_buffer->obj == Py_None) {
    __Pyx_GOTREF(Py_None);
    __Pyx_DECREF(Py_None); __pyx_v_buffer->obj = NULL;
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrobuf_list.pyx":1588
 *         buffer.suboffsets = NULL                # for pointer arrays only
 * 
 *     def __releasebuffer__(self, Py_buffer *buffer):             # <<<<<<<<<<<<<<
 *         pass
 * 
 */

/* Python wrapper */
static CYTHON_UNUSED void __pyx_pw_12pyrobuf_list_9FloatList_24__releasebuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_buffer); /*proto*/
static CYTHON_UNUSED void __pyx_pw_12pyrobuf_list_9FloatList_24__releasebuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_buffer) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__releasebuffer__ (wrapper)", 0);
  __pyx_pf_12pyrobuf_list_9FloatList_23__releasebuffer__(((struct __pyx_obj_12pyrobuf_list_FloatList *)__pyx_v_self), ((Py_buffer *)__pyx_v_buffer));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

static void __pyx_pf_12pyrobuf_list_9FloatList_23__releasebuffer__(CYTHON_UNUSED struct __pyx_obj_12pyrobuf_list_FloatList *__pyx_v_self, CYTHON_UNUSED Py_buffer *__pyx_v_buffer) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__releasebuffer__", 0);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

/* "pyrobuf_list.pyx":1591
 *         pass
 * 
 *     cpdef append(self, float x):             # <<<<<<<<<<<<<<
 *         self._append(x)
 *         listener = <object>self._listener
 */

static PyObject *__pyx_pw_12pyrobuf_list_9FloatList_26append(PyObject *__pyx_v_self, PyObject *__pyx_arg_x); /*proto*/
static PyObject *__pyx_f_12pyrobuf_list_9FloatList_append(struct __pyx_obj_12pyrobuf_list_FloatList *__pyx_v_self, float __pyx_v_x, int __pyx_skip_dispatch) {
  PyObject *__pyx_v_listener = NULL;
  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;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  int __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("append", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_append); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1591; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_12pyrobuf_list_9FloatList_26append)) {
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_3 = PyFloat_FromDouble(__pyx_v_x); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1591; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_4 = __pyx_t_1; __pyx_t_5 = NULL;
      if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_4))) {
        __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
        if (likely(__pyx_t_5)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_5);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_4, function);
        }
      }
      if (!__pyx_t_5) {
        __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1591; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_GOTREF(__pyx_t_2);
      } else {
        __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1591; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL;
        __Pyx_GIVEREF(__pyx_t_3);
        PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_3);
        __pyx_t_3 = 0;
        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1591; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 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;
  }

  /* "pyrobuf_list.pyx":1592
 * 
 *     cpdef append(self, float x):
 *         self._append(x)             # <<<<<<<<<<<<<<
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:
 */
  ((struct __pyx_vtabstruct_12pyrobuf_list_FloatList *)__pyx_v_self->__pyx_vtab)->_append(__pyx_v_self, __pyx_v_x);

  /* "pyrobuf_list.pyx":1593
 *     cpdef append(self, float x):
 *         self._append(x)
 *         listener = <object>self._listener             # <<<<<<<<<<<<<<
 *         if not listener._is_present_in_parent:
 *             listener._Modified()
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_self->_listener);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_v_listener = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pyrobuf_list.pyx":1594
 *         self._append(x)
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:             # <<<<<<<<<<<<<<
 *             listener._Modified()
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_listener, __pyx_n_s_is_present_in_parent); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1594; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1594; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_8 = ((!__pyx_t_7) != 0);
  if (__pyx_t_8) {

    /* "pyrobuf_list.pyx":1595
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:
 *             listener._Modified()             # <<<<<<<<<<<<<<
 * 
 *     cpdef extend(self, FloatList x):
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_listener, __pyx_n_s_Modified); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1595; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = NULL;
    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    if (__pyx_t_4) {
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1595; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    } else {
      __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1595; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "pyrobuf_list.pyx":1594
 *         self._append(x)
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:             # <<<<<<<<<<<<<<
 *             listener._Modified()
 * 
 */
  }

  /* "pyrobuf_list.pyx":1591
 *         pass
 * 
 *     cpdef append(self, float x):             # <<<<<<<<<<<<<<
 *         self._append(x)
 *         listener = <object>self._listener
 */

  /* function exit code */
  __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_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("pyrobuf_list.FloatList.append", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_listener);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrobuf_list_9FloatList_26append(PyObject *__pyx_v_self, PyObject *__pyx_arg_x); /*proto*/
static PyObject *__pyx_pw_12pyrobuf_list_9FloatList_26append(PyObject *__pyx_v_self, PyObject *__pyx_arg_x) {
  float __pyx_v_x;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("append (wrapper)", 0);
  assert(__pyx_arg_x); {
    __pyx_v_x = __pyx_PyFloat_AsFloat(__pyx_arg_x); if (unlikely((__pyx_v_x == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1591; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyrobuf_list.FloatList.append", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_12pyrobuf_list_9FloatList_25append(((struct __pyx_obj_12pyrobuf_list_FloatList *)__pyx_v_self), ((float)__pyx_v_x));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_12pyrobuf_list_9FloatList_25append(struct __pyx_obj_12pyrobuf_list_FloatList *__pyx_v_self, float __pyx_v_x) {
  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", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_12pyrobuf_list_9FloatList_append(__pyx_v_self, __pyx_v_x, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1591; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyrobuf_list.FloatList.append", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrobuf_list.pyx":1597
 *             listener._Modified()
 * 
 *     cpdef extend(self, FloatList x):             # <<<<<<<<<<<<<<
 *         cdef float *mem
 *         cdef size_t new_len = self._n_items + len(x)
 */

static PyObject *__pyx_pw_12pyrobuf_list_9FloatList_28extend(PyObject *__pyx_v_self, PyObject *__pyx_v_x); /*proto*/
static PyObject *__pyx_f_12pyrobuf_list_9FloatList_extend(struct __pyx_obj_12pyrobuf_list_FloatList *__pyx_v_self, struct __pyx_obj_12pyrobuf_list_FloatList *__pyx_v_x, int __pyx_skip_dispatch) {
  float *__pyx_v_mem;
  size_t __pyx_v_new_len;
  size_t __pyx_v_new_size;
  int __pyx_v_i;
  PyObject *__pyx_v_listener = NULL;
  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;
  PyObject *__pyx_t_5 = NULL;
  Py_ssize_t __pyx_t_6;
  int __pyx_t_7;
  size_t __pyx_t_8;
  size_t __pyx_t_9;
  size_t __pyx_t_10;
  int __pyx_t_11;
  float __pyx_t_12;
  int __pyx_t_13;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("extend", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_extend); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1597; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_12pyrobuf_list_9FloatList_28extend)) {
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
      if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_4)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
        }
      }
      if (!__pyx_t_4) {
        __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_v_x)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1597; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
      } else {
        __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1597; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL;
        __Pyx_INCREF(((PyObject *)__pyx_v_x));
        __Pyx_GIVEREF(((PyObject *)__pyx_v_x));
        PyTuple_SET_ITEM(__pyx_t_5, 0+1, ((PyObject *)__pyx_v_x));
        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1597; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      }
      __Pyx_DECREF(__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;
  }

  /* "pyrobuf_list.pyx":1599
 *     cpdef extend(self, FloatList x):
 *         cdef float *mem
 *         cdef size_t new_len = self._n_items + len(x)             # <<<<<<<<<<<<<<
 *         cdef size_t new_size
 *         cdef int i
 */
  __pyx_t_6 = PyObject_Length(((PyObject *)__pyx_v_x)); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1599; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_new_len = (__pyx_v_self->_n_items + __pyx_t_6);

  /* "pyrobuf_list.pyx":1603
 *         cdef int i
 * 
 *         if new_len > self._size:             # <<<<<<<<<<<<<<
 *             new_size = max(new_len, 2 * self._size)
 *             mem = <float *>PyMem_Realloc(self._data, new_size * sizeof(float))
 */
  __pyx_t_7 = ((__pyx_v_new_len > __pyx_v_self->_size) != 0);
  if (__pyx_t_7) {

    /* "pyrobuf_list.pyx":1604
 * 
 *         if new_len > self._size:
 *             new_size = max(new_len, 2 * self._size)             # <<<<<<<<<<<<<<
 *             mem = <float *>PyMem_Realloc(self._data, new_size * sizeof(float))
 *             if not mem:
 */
    __pyx_t_8 = (2 * __pyx_v_self->_size);
    __pyx_t_9 = __pyx_v_new_len;
    if (((__pyx_t_8 > __pyx_t_9) != 0)) {
      __pyx_t_10 = __pyx_t_8;
    } else {
      __pyx_t_10 = __pyx_t_9;
    }
    __pyx_v_new_size = __pyx_t_10;

    /* "pyrobuf_list.pyx":1605
 *         if new_len > self._size:
 *             new_size = max(new_len, 2 * self._size)
 *             mem = <float *>PyMem_Realloc(self._data, new_size * sizeof(float))             # <<<<<<<<<<<<<<
 *             if not mem:
 *                 raise MemoryError()
 */
    __pyx_v_mem = ((float *)PyMem_Realloc(__pyx_v_self->_data, (__pyx_v_new_size * (sizeof(float)))));

    /* "pyrobuf_list.pyx":1606
 *             new_size = max(new_len, 2 * self._size)
 *             mem = <float *>PyMem_Realloc(self._data, new_size * sizeof(float))
 *             if not mem:             # <<<<<<<<<<<<<<
 *                 raise MemoryError()
 * 
 */
    __pyx_t_7 = ((!(__pyx_v_mem != 0)) != 0);
    if (__pyx_t_7) {

      /* "pyrobuf_list.pyx":1607
 *             mem = <float *>PyMem_Realloc(self._data, new_size * sizeof(float))
 *             if not mem:
 *                 raise MemoryError()             # <<<<<<<<<<<<<<
 * 
 *             self._data = mem
 */
      PyErr_NoMemory(); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1607; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

      /* "pyrobuf_list.pyx":1606
 *             new_size = max(new_len, 2 * self._size)
 *             mem = <float *>PyMem_Realloc(self._data, new_size * sizeof(float))
 *             if not mem:             # <<<<<<<<<<<<<<
 *                 raise MemoryError()
 * 
 */
    }

    /* "pyrobuf_list.pyx":1609
 *                 raise MemoryError()
 * 
 *             self._data = mem             # <<<<<<<<<<<<<<
 *             self._size = new_size
 * 
 */
    __pyx_v_self->_data = __pyx_v_mem;

    /* "pyrobuf_list.pyx":1610
 * 
 *             self._data = mem
 *             self._size = new_size             # <<<<<<<<<<<<<<
 * 
 *         for i in range(len(x)):
 */
    __pyx_v_self->_size = __pyx_v_new_size;

    /* "pyrobuf_list.pyx":1603
 *         cdef int i
 * 
 *         if new_len > self._size:             # <<<<<<<<<<<<<<
 *             new_size = max(new_len, 2 * self._size)
 *             mem = <float *>PyMem_Realloc(self._data, new_size * sizeof(float))
 */
  }

  /* "pyrobuf_list.pyx":1612
 *             self._size = new_size
 * 
 *         for i in range(len(x)):             # <<<<<<<<<<<<<<
 *             self._data[self._n_items + i] = x[i]
 * 
 */
  __pyx_t_6 = PyObject_Length(((PyObject *)__pyx_v_x)); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1612; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_6; __pyx_t_11+=1) {
    __pyx_v_i = __pyx_t_11;

    /* "pyrobuf_list.pyx":1613
 * 
 *         for i in range(len(x)):
 *             self._data[self._n_items + i] = x[i]             # <<<<<<<<<<<<<<
 * 
 *         if new_len != self._n_items:
 */
    __pyx_t_1 = __Pyx_GetItemInt(((PyObject *)__pyx_v_x), __pyx_v_i, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1613; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_12 = __pyx_PyFloat_AsFloat(__pyx_t_1); if (unlikely((__pyx_t_12 == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1613; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    (__pyx_v_self->_data[(__pyx_v_self->_n_items + __pyx_v_i)]) = __pyx_t_12;
  }

  /* "pyrobuf_list.pyx":1615
 *             self._data[self._n_items + i] = x[i]
 * 
 *         if new_len != self._n_items:             # <<<<<<<<<<<<<<
 *             listener = <object>self._listener
 *             if not listener._is_present_in_parent:
 */
  __pyx_t_7 = ((__pyx_v_new_len != __pyx_v_self->_n_items) != 0);
  if (__pyx_t_7) {

    /* "pyrobuf_list.pyx":1616
 * 
 *         if new_len != self._n_items:
 *             listener = <object>self._listener             # <<<<<<<<<<<<<<
 *             if not listener._is_present_in_parent:
 *                 listener._Modified()
 */
    __pyx_t_1 = ((PyObject *)__pyx_v_self->_listener);
    __Pyx_INCREF(__pyx_t_1);
    __pyx_v_listener = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "pyrobuf_list.pyx":1617
 *         if new_len != self._n_items:
 *             listener = <object>self._listener
 *             if not listener._is_present_in_parent:             # <<<<<<<<<<<<<<
 *                 listener._Modified()
 *         self._n_items = new_len
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_listener, __pyx_n_s_is_present_in_parent); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1617; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1617; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_13 = ((!__pyx_t_7) != 0);
    if (__pyx_t_13) {

      /* "pyrobuf_list.pyx":1618
 *             listener = <object>self._listener
 *             if not listener._is_present_in_parent:
 *                 listener._Modified()             # <<<<<<<<<<<<<<
 *         self._n_items = new_len
 * 
 */
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_listener, __pyx_n_s_Modified); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1618; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = NULL;
      if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
        __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
        if (likely(__pyx_t_3)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_2, function);
        }
      }
      if (__pyx_t_3) {
        __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1618; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      } else {
        __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1618; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "pyrobuf_list.pyx":1617
 *         if new_len != self._n_items:
 *             listener = <object>self._listener
 *             if not listener._is_present_in_parent:             # <<<<<<<<<<<<<<
 *                 listener._Modified()
 *         self._n_items = new_len
 */
    }

    /* "pyrobuf_list.pyx":1615
 *             self._data[self._n_items + i] = x[i]
 * 
 *         if new_len != self._n_items:             # <<<<<<<<<<<<<<
 *             listener = <object>self._listener
 *             if not listener._is_present_in_parent:
 */
  }

  /* "pyrobuf_list.pyx":1619
 *             if not listener._is_present_in_parent:
 *                 listener._Modified()
 *         self._n_items = new_len             # <<<<<<<<<<<<<<
 * 
 *     cpdef insert(self, int i, float x):
 */
  __pyx_v_self->_n_items = __pyx_v_new_len;

  /* "pyrobuf_list.pyx":1597
 *             listener._Modified()
 * 
 *     cpdef extend(self, FloatList x):             # <<<<<<<<<<<<<<
 *         cdef float *mem
 *         cdef size_t new_len = self._n_items + len(x)
 */

  /* function exit code */
  __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_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pyrobuf_list.FloatList.extend", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_listener);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrobuf_list_9FloatList_28extend(PyObject *__pyx_v_self, PyObject *__pyx_v_x); /*proto*/
static PyObject *__pyx_pw_12pyrobuf_list_9FloatList_28extend(PyObject *__pyx_v_self, PyObject *__pyx_v_x) {
  CYTHON_UNUSED int __pyx_lineno = 0;
  CYTHON_UNUSED const char *__pyx_filename = NULL;
  CYTHON_UNUSED int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("extend (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_x), __pyx_ptype_12pyrobuf_list_FloatList, 1, "x", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1597; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_12pyrobuf_list_9FloatList_27extend(((struct __pyx_obj_12pyrobuf_list_FloatList *)__pyx_v_self), ((struct __pyx_obj_12pyrobuf_list_FloatList *)__pyx_v_x));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_12pyrobuf_list_9FloatList_27extend(struct __pyx_obj_12pyrobuf_list_FloatList *__pyx_v_self, struct __pyx_obj_12pyrobuf_list_FloatList *__pyx_v_x) {
  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", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_12pyrobuf_list_9FloatList_extend(__pyx_v_self, __pyx_v_x, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1597; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyrobuf_list.FloatList.extend", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrobuf_list.pyx":1621
 *         self._n_items = new_len
 * 
 *     cpdef insert(self, int i, float x):             # <<<<<<<<<<<<<<
 *         cdef float *mem
 *         cdef size_t j
 */

static PyObject *__pyx_pw_12pyrobuf_list_9FloatList_30insert(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_12pyrobuf_list_9FloatList_insert(struct __pyx_obj_12pyrobuf_list_FloatList *__pyx_v_self, int __pyx_v_i, float __pyx_v_x, int __pyx_skip_dispatch) {
  float *__pyx_v_mem;
  size_t __pyx_v_j;
  PyObject *__pyx_v_listener = NULL;
  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;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  Py_ssize_t __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  int __pyx_t_10;
  size_t __pyx_t_11;
  size_t __pyx_t_12;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("insert", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_insert); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1621; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_12pyrobuf_list_9FloatList_30insert)) {
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_i); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1621; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = PyFloat_FromDouble(__pyx_v_x); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1621; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_5 = __pyx_t_1; __pyx_t_6 = NULL;
      __pyx_t_7 = 0;
      if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_5))) {
        __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
        if (likely(__pyx_t_6)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
          __Pyx_INCREF(__pyx_t_6);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_5, function);
          __pyx_t_7 = 1;
        }
      }
      __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1621; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_8);
      if (__pyx_t_6) {
        __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL;
      }
      __Pyx_GIVEREF(__pyx_t_3);
      PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_t_3);
      __Pyx_GIVEREF(__pyx_t_4);
      PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_t_4);
      __pyx_t_3 = 0;
      __pyx_t_4 = 0;
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1621; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 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;
  }

  /* "pyrobuf_list.pyx":1625
 *         cdef size_t j
 * 
 *         if i < 0:             # <<<<<<<<<<<<<<
 *             i += <int>self._n_items
 * 
 */
  __pyx_t_9 = ((__pyx_v_i < 0) != 0);
  if (__pyx_t_9) {

    /* "pyrobuf_list.pyx":1626
 * 
 *         if i < 0:
 *             i += <int>self._n_items             # <<<<<<<<<<<<<<
 * 
 *         if i < 0 or <size_t>i > self._n_items:
 */
    __pyx_v_i = (__pyx_v_i + ((int)__pyx_v_self->_n_items));

    /* "pyrobuf_list.pyx":1625
 *         cdef size_t j
 * 
 *         if i < 0:             # <<<<<<<<<<<<<<
 *             i += <int>self._n_items
 * 
 */
  }

  /* "pyrobuf_list.pyx":1628
 *             i += <int>self._n_items
 * 
 *         if i < 0 or <size_t>i > self._n_items:             # <<<<<<<<<<<<<<
 *             raise IndexError("list index out of range")
 * 
 */
  __pyx_t_10 = ((__pyx_v_i < 0) != 0);
  if (!__pyx_t_10) {
  } else {
    __pyx_t_9 = __pyx_t_10;
    goto __pyx_L5_bool_binop_done;
  }
  __pyx_t_10 = ((((size_t)__pyx_v_i) > __pyx_v_self->_n_items) != 0);
  __pyx_t_9 = __pyx_t_10;
  __pyx_L5_bool_binop_done:;
  if (__pyx_t_9) {

    /* "pyrobuf_list.pyx":1629
 * 
 *         if i < 0 or <size_t>i > self._n_items:
 *             raise IndexError("list index out of range")             # <<<<<<<<<<<<<<
 * 
 *         if self._n_items == self._size:
 */
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_IndexError, __pyx_tuple__51, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1629; __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 = 1629; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

    /* "pyrobuf_list.pyx":1628
 *             i += <int>self._n_items
 * 
 *         if i < 0 or <size_t>i > self._n_items:             # <<<<<<<<<<<<<<
 *             raise IndexError("list index out of range")
 * 
 */
  }

  /* "pyrobuf_list.pyx":1631
 *             raise IndexError("list index out of range")
 * 
 *         if self._n_items == self._size:             # <<<<<<<<<<<<<<
 *             mem = <float *>PyMem_Realloc(self._data, 2 * self._size * sizeof(float))
 *             if not mem:
 */
  __pyx_t_9 = ((__pyx_v_self->_n_items == __pyx_v_self->_size) != 0);
  if (__pyx_t_9) {

    /* "pyrobuf_list.pyx":1632
 * 
 *         if self._n_items == self._size:
 *             mem = <float *>PyMem_Realloc(self._data, 2 * self._size * sizeof(float))             # <<<<<<<<<<<<<<
 *             if not mem:
 *                 raise MemoryError()
 */
    __pyx_v_mem = ((float *)PyMem_Realloc(__pyx_v_self->_data, ((2 * __pyx_v_self->_size) * (sizeof(float)))));

    /* "pyrobuf_list.pyx":1633
 *         if self._n_items == self._size:
 *             mem = <float *>PyMem_Realloc(self._data, 2 * self._size * sizeof(float))
 *             if not mem:             # <<<<<<<<<<<<<<
 *                 raise MemoryError()
 * 
 */
    __pyx_t_9 = ((!(__pyx_v_mem != 0)) != 0);
    if (__pyx_t_9) {

      /* "pyrobuf_list.pyx":1634
 *             mem = <float *>PyMem_Realloc(self._data, 2 * self._size * sizeof(float))
 *             if not mem:
 *                 raise MemoryError()             # <<<<<<<<<<<<<<
 * 
 *             self._data = mem
 */
      PyErr_NoMemory(); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1634; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

      /* "pyrobuf_list.pyx":1633
 *         if self._n_items == self._size:
 *             mem = <float *>PyMem_Realloc(self._data, 2 * self._size * sizeof(float))
 *             if not mem:             # <<<<<<<<<<<<<<
 *                 raise MemoryError()
 * 
 */
    }

    /* "pyrobuf_list.pyx":1636
 *                 raise MemoryError()
 * 
 *             self._data = mem             # <<<<<<<<<<<<<<
 *             self._size *= 2
 * 
 */
    __pyx_v_self->_data = __pyx_v_mem;

    /* "pyrobuf_list.pyx":1637
 * 
 *             self._data = mem
 *             self._size *= 2             # <<<<<<<<<<<<<<
 * 
 *         for j in range(self._n_items, <size_t>i, -1):
 */
    __pyx_v_self->_size = (__pyx_v_self->_size * 2);

    /* "pyrobuf_list.pyx":1631
 *             raise IndexError("list index out of range")
 * 
 *         if self._n_items == self._size:             # <<<<<<<<<<<<<<
 *             mem = <float *>PyMem_Realloc(self._data, 2 * self._size * sizeof(float))
 *             if not mem:
 */
  }

  /* "pyrobuf_list.pyx":1639
 *             self._size *= 2
 * 
 *         for j in range(self._n_items, <size_t>i, -1):             # <<<<<<<<<<<<<<
 *             self._data[j] = self._data[j - 1]
 * 
 */
  __pyx_t_11 = ((size_t)__pyx_v_i);
  for (__pyx_t_12 = __pyx_v_self->_n_items + 1; __pyx_t_12 > __pyx_t_11 + 1; ) { __pyx_t_12-=1;
    __pyx_v_j = __pyx_t_12;

    /* "pyrobuf_list.pyx":1640
 * 
 *         for j in range(self._n_items, <size_t>i, -1):
 *             self._data[j] = self._data[j - 1]             # <<<<<<<<<<<<<<
 * 
 *         self._data[i] = x
 */
    (__pyx_v_self->_data[__pyx_v_j]) = (__pyx_v_self->_data[(__pyx_v_j - 1)]);
  }

  /* "pyrobuf_list.pyx":1642
 *             self._data[j] = self._data[j - 1]
 * 
 *         self._data[i] = x             # <<<<<<<<<<<<<<
 *         self._n_items += 1
 *         listener = <object>self._listener
 */
  (__pyx_v_self->_data[__pyx_v_i]) = __pyx_v_x;

  /* "pyrobuf_list.pyx":1643
 * 
 *         self._data[i] = x
 *         self._n_items += 1             # <<<<<<<<<<<<<<
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:
 */
  __pyx_v_self->_n_items = (__pyx_v_self->_n_items + 1);

  /* "pyrobuf_list.pyx":1644
 *         self._data[i] = x
 *         self._n_items += 1
 *         listener = <object>self._listener             # <<<<<<<<<<<<<<
 *         if not listener._is_present_in_parent:
 *             listener._Modified()
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_self->_listener);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_v_listener = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pyrobuf_list.pyx":1645
 *         self._n_items += 1
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:             # <<<<<<<<<<<<<<
 *             listener._Modified()
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_listener, __pyx_n_s_is_present_in_parent); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1645; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1645; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_10 = ((!__pyx_t_9) != 0);
  if (__pyx_t_10) {

    /* "pyrobuf_list.pyx":1646
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:
 *             listener._Modified()             # <<<<<<<<<<<<<<
 * 
 *     cpdef pop(self):
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_listener, __pyx_n_s_Modified); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1646; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_5 = NULL;
    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    if (__pyx_t_5) {
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_5); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1646; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    } else {
      __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1646; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "pyrobuf_list.pyx":1645
 *         self._n_items += 1
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:             # <<<<<<<<<<<<<<
 *             listener._Modified()
 * 
 */
  }

  /* "pyrobuf_list.pyx":1621
 *         self._n_items = new_len
 * 
 *     cpdef insert(self, int i, float x):             # <<<<<<<<<<<<<<
 *         cdef float *mem
 *         cdef size_t j
 */

  /* function exit code */
  __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_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("pyrobuf_list.FloatList.insert", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_listener);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrobuf_list_9FloatList_30insert(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_12pyrobuf_list_9FloatList_30insert(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_v_i;
  float __pyx_v_x;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("insert (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_i,&__pyx_n_s_x,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_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 (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_x)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("insert", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1621; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "insert") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1621; __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_i = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_i == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1621; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    __pyx_v_x = __pyx_PyFloat_AsFloat(values[1]); if (unlikely((__pyx_v_x == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1621; __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 = 1621; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyrobuf_list.FloatList.insert", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_12pyrobuf_list_9FloatList_29insert(((struct __pyx_obj_12pyrobuf_list_FloatList *)__pyx_v_self), __pyx_v_i, __pyx_v_x);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_12pyrobuf_list_9FloatList_29insert(struct __pyx_obj_12pyrobuf_list_FloatList *__pyx_v_self, int __pyx_v_i, float __pyx_v_x) {
  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("insert", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_12pyrobuf_list_9FloatList_insert(__pyx_v_self, __pyx_v_i, __pyx_v_x, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1621; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyrobuf_list.FloatList.insert", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrobuf_list.pyx":1648
 *             listener._Modified()
 * 
 *     cpdef pop(self):             # <<<<<<<<<<<<<<
 *         if self._n_items == 0:
 *             raise IndexError("pop from empty list")
 */

static PyObject *__pyx_pw_12pyrobuf_list_9FloatList_32pop(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_f_12pyrobuf_list_9FloatList_pop(struct __pyx_obj_12pyrobuf_list_FloatList *__pyx_v_self, int __pyx_skip_dispatch) {
  PyObject *__pyx_v_listener = NULL;
  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;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("pop", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_pop); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1648; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_12pyrobuf_list_9FloatList_32pop)) {
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
      if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_4)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
        }
      }
      if (__pyx_t_4) {
        __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1648; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else {
        __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1648; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__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;
  }

  /* "pyrobuf_list.pyx":1649
 * 
 *     cpdef pop(self):
 *         if self._n_items == 0:             # <<<<<<<<<<<<<<
 *             raise IndexError("pop from empty list")
 * 
 */
  __pyx_t_5 = ((__pyx_v_self->_n_items == 0) != 0);
  if (__pyx_t_5) {

    /* "pyrobuf_list.pyx":1650
 *     cpdef pop(self):
 *         if self._n_items == 0:
 *             raise IndexError("pop from empty list")             # <<<<<<<<<<<<<<
 * 
 *         self._n_items -= 1
 */
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_IndexError, __pyx_tuple__52, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1650; __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 = 1650; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

    /* "pyrobuf_list.pyx":1649
 * 
 *     cpdef pop(self):
 *         if self._n_items == 0:             # <<<<<<<<<<<<<<
 *             raise IndexError("pop from empty list")
 * 
 */
  }

  /* "pyrobuf_list.pyx":1652
 *             raise IndexError("pop from empty list")
 * 
 *         self._n_items -= 1             # <<<<<<<<<<<<<<
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:
 */
  __pyx_v_self->_n_items = (__pyx_v_self->_n_items - 1);

  /* "pyrobuf_list.pyx":1653
 * 
 *         self._n_items -= 1
 *         listener = <object>self._listener             # <<<<<<<<<<<<<<
 *         if not listener._is_present_in_parent:
 *             listener._Modified()
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_self->_listener);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_v_listener = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pyrobuf_list.pyx":1654
 *         self._n_items -= 1
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:             # <<<<<<<<<<<<<<
 *             listener._Modified()
 *         return self._data[self._n_items]
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_listener, __pyx_n_s_is_present_in_parent); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1654; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1654; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_6 = ((!__pyx_t_5) != 0);
  if (__pyx_t_6) {

    /* "pyrobuf_list.pyx":1655
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:
 *             listener._Modified()             # <<<<<<<<<<<<<<
 *         return self._data[self._n_items]
 * 
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_listener, __pyx_n_s_Modified); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1655; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = NULL;
    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    if (__pyx_t_3) {
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1655; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    } else {
      __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1655; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "pyrobuf_list.pyx":1654
 *         self._n_items -= 1
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:             # <<<<<<<<<<<<<<
 *             listener._Modified()
 *         return self._data[self._n_items]
 */
  }

  /* "pyrobuf_list.pyx":1656
 *         if not listener._is_present_in_parent:
 *             listener._Modified()
 *         return self._data[self._n_items]             # <<<<<<<<<<<<<<
 * 
 *     cpdef remove(self, float x):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PyFloat_FromDouble((__pyx_v_self->_data[__pyx_v_self->_n_items])); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1656; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyrobuf_list.pyx":1648
 *             listener._Modified()
 * 
 *     cpdef pop(self):             # <<<<<<<<<<<<<<
 *         if self._n_items == 0:
 *             raise IndexError("pop from empty list")
 */

  /* function exit code */
  __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("pyrobuf_list.FloatList.pop", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_listener);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrobuf_list_9FloatList_32pop(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_12pyrobuf_list_9FloatList_32pop(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("pop (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrobuf_list_9FloatList_31pop(((struct __pyx_obj_12pyrobuf_list_FloatList *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_12pyrobuf_list_9FloatList_31pop(struct __pyx_obj_12pyrobuf_list_FloatList *__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("pop", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_12pyrobuf_list_9FloatList_pop(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1648; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyrobuf_list.FloatList.pop", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrobuf_list.pyx":1658
 *         return self._data[self._n_items]
 * 
 *     cpdef remove(self, float x):             # <<<<<<<<<<<<<<
 *         cdef size_t i
 *         cdef size_t j
 */

static PyObject *__pyx_pw_12pyrobuf_list_9FloatList_34remove(PyObject *__pyx_v_self, PyObject *__pyx_arg_x); /*proto*/
static PyObject *__pyx_f_12pyrobuf_list_9FloatList_remove(struct __pyx_obj_12pyrobuf_list_FloatList *__pyx_v_self, float __pyx_v_x, int __pyx_skip_dispatch) {
  size_t __pyx_v_i;
  size_t __pyx_v_j;
  int __pyx_v_found;
  PyObject *__pyx_v_listener = NULL;
  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;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  size_t __pyx_t_7;
  size_t __pyx_t_8;
  int __pyx_t_9;
  int __pyx_t_10;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("remove", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_remove); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1658; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_12pyrobuf_list_9FloatList_34remove)) {
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_3 = PyFloat_FromDouble(__pyx_v_x); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1658; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_4 = __pyx_t_1; __pyx_t_5 = NULL;
      if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_4))) {
        __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
        if (likely(__pyx_t_5)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_5);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_4, function);
        }
      }
      if (!__pyx_t_5) {
        __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1658; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_GOTREF(__pyx_t_2);
      } else {
        __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1658; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL;
        __Pyx_GIVEREF(__pyx_t_3);
        PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_3);
        __pyx_t_3 = 0;
        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1658; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 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;
  }

  /* "pyrobuf_list.pyx":1661
 *         cdef size_t i
 *         cdef size_t j
 *         cdef bint found = 0             # <<<<<<<<<<<<<<
 * 
 *         for i in range(self._n_items):
 */
  __pyx_v_found = 0;

  /* "pyrobuf_list.pyx":1663
 *         cdef bint found = 0
 * 
 *         for i in range(self._n_items):             # <<<<<<<<<<<<<<
 *             if self._data[i] == x:
 *                 found = 1
 */
  __pyx_t_7 = __pyx_v_self->_n_items;
  for (__pyx_t_8 = 0; __pyx_t_8 < __pyx_t_7; __pyx_t_8+=1) {
    __pyx_v_i = __pyx_t_8;

    /* "pyrobuf_list.pyx":1664
 * 
 *         for i in range(self._n_items):
 *             if self._data[i] == x:             # <<<<<<<<<<<<<<
 *                 found = 1
 *                 break
 */
    __pyx_t_9 = (((__pyx_v_self->_data[__pyx_v_i]) == __pyx_v_x) != 0);
    if (__pyx_t_9) {

      /* "pyrobuf_list.pyx":1665
 *         for i in range(self._n_items):
 *             if self._data[i] == x:
 *                 found = 1             # <<<<<<<<<<<<<<
 *                 break
 * 
 */
      __pyx_v_found = 1;

      /* "pyrobuf_list.pyx":1666
 *             if self._data[i] == x:
 *                 found = 1
 *                 break             # <<<<<<<<<<<<<<
 * 
 *         if found == 0:
 */
      goto __pyx_L4_break;

      /* "pyrobuf_list.pyx":1664
 * 
 *         for i in range(self._n_items):
 *             if self._data[i] == x:             # <<<<<<<<<<<<<<
 *                 found = 1
 *                 break
 */
    }
  }
  __pyx_L4_break:;

  /* "pyrobuf_list.pyx":1668
 *                 break
 * 
 *         if found == 0:             # <<<<<<<<<<<<<<
 *             raise ValueError("x not in list")
 * 
 */
  __pyx_t_9 = ((__pyx_v_found == 0) != 0);
  if (__pyx_t_9) {

    /* "pyrobuf_list.pyx":1669
 * 
 *         if found == 0:
 *             raise ValueError("x not in list")             # <<<<<<<<<<<<<<
 * 
 *         for j in range(i, self._n_items):
 */
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__53, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1669; __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 = 1669; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

    /* "pyrobuf_list.pyx":1668
 *                 break
 * 
 *         if found == 0:             # <<<<<<<<<<<<<<
 *             raise ValueError("x not in list")
 * 
 */
  }

  /* "pyrobuf_list.pyx":1671
 *             raise ValueError("x not in list")
 * 
 *         for j in range(i, self._n_items):             # <<<<<<<<<<<<<<
 *             self._data[j] = self._data[j + 1]
 * 
 */
  __pyx_t_7 = __pyx_v_self->_n_items;
  for (__pyx_t_8 = __pyx_v_i; __pyx_t_8 < __pyx_t_7; __pyx_t_8+=1) {
    __pyx_v_j = __pyx_t_8;

    /* "pyrobuf_list.pyx":1672
 * 
 *         for j in range(i, self._n_items):
 *             self._data[j] = self._data[j + 1]             # <<<<<<<<<<<<<<
 * 
 *         self._n_items -= 1
 */
    (__pyx_v_self->_data[__pyx_v_j]) = (__pyx_v_self->_data[(__pyx_v_j + 1)]);
  }

  /* "pyrobuf_list.pyx":1674
 *             self._data[j] = self._data[j + 1]
 * 
 *         self._n_items -= 1             # <<<<<<<<<<<<<<
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:
 */
  __pyx_v_self->_n_items = (__pyx_v_self->_n_items - 1);

  /* "pyrobuf_list.pyx":1675
 * 
 *         self._n_items -= 1
 *         listener = <object>self._listener             # <<<<<<<<<<<<<<
 *         if not listener._is_present_in_parent:
 *             listener._Modified()
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_self->_listener);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_v_listener = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pyrobuf_list.pyx":1676
 *         self._n_items -= 1
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:             # <<<<<<<<<<<<<<
 *             listener._Modified()
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_listener, __pyx_n_s_is_present_in_parent); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1676; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1676; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_10 = ((!__pyx_t_9) != 0);
  if (__pyx_t_10) {

    /* "pyrobuf_list.pyx":1677
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:
 *             listener._Modified()             # <<<<<<<<<<<<<<
 * 
 *     cdef void _append(self, float x):
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_listener, __pyx_n_s_Modified); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1677; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = NULL;
    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    if (__pyx_t_4) {
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1677; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    } else {
      __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1677; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "pyrobuf_list.pyx":1676
 *         self._n_items -= 1
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:             # <<<<<<<<<<<<<<
 *             listener._Modified()
 * 
 */
  }

  /* "pyrobuf_list.pyx":1658
 *         return self._data[self._n_items]
 * 
 *     cpdef remove(self, float x):             # <<<<<<<<<<<<<<
 *         cdef size_t i
 *         cdef size_t j
 */

  /* function exit code */
  __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_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("pyrobuf_list.FloatList.remove", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_listener);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrobuf_list_9FloatList_34remove(PyObject *__pyx_v_self, PyObject *__pyx_arg_x); /*proto*/
static PyObject *__pyx_pw_12pyrobuf_list_9FloatList_34remove(PyObject *__pyx_v_self, PyObject *__pyx_arg_x) {
  float __pyx_v_x;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("remove (wrapper)", 0);
  assert(__pyx_arg_x); {
    __pyx_v_x = __pyx_PyFloat_AsFloat(__pyx_arg_x); if (unlikely((__pyx_v_x == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1658; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyrobuf_list.FloatList.remove", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_12pyrobuf_list_9FloatList_33remove(((struct __pyx_obj_12pyrobuf_list_FloatList *)__pyx_v_self), ((float)__pyx_v_x));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_12pyrobuf_list_9FloatList_33remove(struct __pyx_obj_12pyrobuf_list_FloatList *__pyx_v_self, float __pyx_v_x) {
  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", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_12pyrobuf_list_9FloatList_remove(__pyx_v_self, __pyx_v_x, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1658; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyrobuf_list.FloatList.remove", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrobuf_list.pyx":1679
 *             listener._Modified()
 * 
 *     cdef void _append(self, float x):             # <<<<<<<<<<<<<<
 *         cdef float *mem
 * 
 */

static void __pyx_f_12pyrobuf_list_9FloatList__append(struct __pyx_obj_12pyrobuf_list_FloatList *__pyx_v_self, float __pyx_v_x) {
  float *__pyx_v_mem;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_append", 0);

  /* "pyrobuf_list.pyx":1682
 *         cdef float *mem
 * 
 *         if self._n_items == self._size:             # <<<<<<<<<<<<<<
 *             mem = <float *>PyMem_Realloc(self._data, 2 * self._size * sizeof(float))
 *             if not mem:
 */
  __pyx_t_1 = ((__pyx_v_self->_n_items == __pyx_v_self->_size) != 0);
  if (__pyx_t_1) {

    /* "pyrobuf_list.pyx":1683
 * 
 *         if self._n_items == self._size:
 *             mem = <float *>PyMem_Realloc(self._data, 2 * self._size * sizeof(float))             # <<<<<<<<<<<<<<
 *             if not mem:
 *                 raise MemoryError()
 */
    __pyx_v_mem = ((float *)PyMem_Realloc(__pyx_v_self->_data, ((2 * __pyx_v_self->_size) * (sizeof(float)))));

    /* "pyrobuf_list.pyx":1684
 *         if self._n_items == self._size:
 *             mem = <float *>PyMem_Realloc(self._data, 2 * self._size * sizeof(float))
 *             if not mem:             # <<<<<<<<<<<<<<
 *                 raise MemoryError()
 * 
 */
    __pyx_t_1 = ((!(__pyx_v_mem != 0)) != 0);
    if (__pyx_t_1) {

      /* "pyrobuf_list.pyx":1685
 *             mem = <float *>PyMem_Realloc(self._data, 2 * self._size * sizeof(float))
 *             if not mem:
 *                 raise MemoryError()             # <<<<<<<<<<<<<<
 * 
 *             self._data = mem
 */
      PyErr_NoMemory(); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1685; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

      /* "pyrobuf_list.pyx":1684
 *         if self._n_items == self._size:
 *             mem = <float *>PyMem_Realloc(self._data, 2 * self._size * sizeof(float))
 *             if not mem:             # <<<<<<<<<<<<<<
 *                 raise MemoryError()
 * 
 */
    }

    /* "pyrobuf_list.pyx":1687
 *                 raise MemoryError()
 * 
 *             self._data = mem             # <<<<<<<<<<<<<<
 *             self._size *= 2
 * 
 */
    __pyx_v_self->_data = __pyx_v_mem;

    /* "pyrobuf_list.pyx":1688
 * 
 *             self._data = mem
 *             self._size *= 2             # <<<<<<<<<<<<<<
 * 
 *         self._data[self._n_items] = x
 */
    __pyx_v_self->_size = (__pyx_v_self->_size * 2);

    /* "pyrobuf_list.pyx":1682
 *         cdef float *mem
 * 
 *         if self._n_items == self._size:             # <<<<<<<<<<<<<<
 *             mem = <float *>PyMem_Realloc(self._data, 2 * self._size * sizeof(float))
 *             if not mem:
 */
  }

  /* "pyrobuf_list.pyx":1690
 *             self._size *= 2
 * 
 *         self._data[self._n_items] = x             # <<<<<<<<<<<<<<
 *         self._n_items += 1
 * 
 */
  (__pyx_v_self->_data[__pyx_v_self->_n_items]) = __pyx_v_x;

  /* "pyrobuf_list.pyx":1691
 * 
 *         self._data[self._n_items] = x
 *         self._n_items += 1             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_v_self->_n_items = (__pyx_v_self->_n_items + 1);

  /* "pyrobuf_list.pyx":1679
 *             listener._Modified()
 * 
 *     cdef void _append(self, float x):             # <<<<<<<<<<<<<<
 *         cdef float *mem
 * 
 */

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_WriteUnraisable("pyrobuf_list.FloatList._append", __pyx_clineno, __pyx_lineno, __pyx_filename, 0, 0);
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
}

/* "pyrobuf_list.pyx":1697
 * cdef class Uint32List:
 * 
 *     def __cinit__(self, size_t size=16, object listener=None):             # <<<<<<<<<<<<<<
 *         self._data = <uint32_t *>PyMem_Malloc(size * sizeof(uint32_t))
 *         if not self._data:
 */

/* Python wrapper */
static int __pyx_pw_12pyrobuf_list_10Uint32List_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static int __pyx_pw_12pyrobuf_list_10Uint32List_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  size_t __pyx_v_size;
  PyObject *__pyx_v_listener = 0;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_size,&__pyx_n_s_listener,0};
    PyObject* values[2] = {0,0};
    values[1] = ((PyObject *)Py_None);
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_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 (pos_args) {
        case  0:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_size);
          if (value) { values[0] = value; kw_args--; }
        }
        case  1:
        if (kw_args > 0) {
          PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_listener);
          if (value) { values[1] = value; kw_args--; }
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "__cinit__") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1697; __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;
      }
    }
    if (values[0]) {
      __pyx_v_size = __Pyx_PyInt_As_size_t(values[0]); if (unlikely((__pyx_v_size == (size_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1697; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    } else {
      __pyx_v_size = ((size_t)16);
    }
    __pyx_v_listener = values[1];
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L5_argtuple_error:;
  __Pyx_RaiseArgtupleInvalid("__cinit__", 0, 0, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1697; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyrobuf_list.Uint32List.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_12pyrobuf_list_10Uint32List___cinit__(((struct __pyx_obj_12pyrobuf_list_Uint32List *)__pyx_v_self), __pyx_v_size, __pyx_v_listener);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_12pyrobuf_list_10Uint32List___cinit__(struct __pyx_obj_12pyrobuf_list_Uint32List *__pyx_v_self, size_t __pyx_v_size, PyObject *__pyx_v_listener) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__cinit__", 0);

  /* "pyrobuf_list.pyx":1698
 * 
 *     def __cinit__(self, size_t size=16, object listener=None):
 *         self._data = <uint32_t *>PyMem_Malloc(size * sizeof(uint32_t))             # <<<<<<<<<<<<<<
 *         if not self._data:
 *             raise MemoryError()
 */
  __pyx_v_self->_data = ((uint32_t *)PyMem_Malloc((__pyx_v_size * (sizeof(uint32_t)))));

  /* "pyrobuf_list.pyx":1699
 *     def __cinit__(self, size_t size=16, object listener=None):
 *         self._data = <uint32_t *>PyMem_Malloc(size * sizeof(uint32_t))
 *         if not self._data:             # <<<<<<<<<<<<<<
 *             raise MemoryError()
 * 
 */
  __pyx_t_1 = ((!(__pyx_v_self->_data != 0)) != 0);
  if (__pyx_t_1) {

    /* "pyrobuf_list.pyx":1700
 *         self._data = <uint32_t *>PyMem_Malloc(size * sizeof(uint32_t))
 *         if not self._data:
 *             raise MemoryError()             # <<<<<<<<<<<<<<
 * 
 *         self._n_items = 0
 */
    PyErr_NoMemory(); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1700; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

    /* "pyrobuf_list.pyx":1699
 *     def __cinit__(self, size_t size=16, object listener=None):
 *         self._data = <uint32_t *>PyMem_Malloc(size * sizeof(uint32_t))
 *         if not self._data:             # <<<<<<<<<<<<<<
 *             raise MemoryError()
 * 
 */
  }

  /* "pyrobuf_list.pyx":1702
 *             raise MemoryError()
 * 
 *         self._n_items = 0             # <<<<<<<<<<<<<<
 *         self._size = size
 *         if listener is None:
 */
  __pyx_v_self->_n_items = 0;

  /* "pyrobuf_list.pyx":1703
 * 
 *         self._n_items = 0
 *         self._size = size             # <<<<<<<<<<<<<<
 *         if listener is None:
 *             self._listener = <PyObject *>null_listener
 */
  __pyx_v_self->_size = __pyx_v_size;

  /* "pyrobuf_list.pyx":1704
 *         self._n_items = 0
 *         self._size = size
 *         if listener is None:             # <<<<<<<<<<<<<<
 *             self._listener = <PyObject *>null_listener
 *         else:
 */
  __pyx_t_1 = (__pyx_v_listener == Py_None);
  __pyx_t_2 = (__pyx_t_1 != 0);
  if (__pyx_t_2) {

    /* "pyrobuf_list.pyx":1705
 *         self._size = size
 *         if listener is None:
 *             self._listener = <PyObject *>null_listener             # <<<<<<<<<<<<<<
 *         else:
 *             self._listener = <PyObject *>listener
 */
    __pyx_v_self->_listener = ((PyObject *)null_listener);

    /* "pyrobuf_list.pyx":1704
 *         self._n_items = 0
 *         self._size = size
 *         if listener is None:             # <<<<<<<<<<<<<<
 *             self._listener = <PyObject *>null_listener
 *         else:
 */
    goto __pyx_L4;
  }

  /* "pyrobuf_list.pyx":1707
 *             self._listener = <PyObject *>null_listener
 *         else:
 *             self._listener = <PyObject *>listener             # <<<<<<<<<<<<<<
 * 
 *     def __dealloc__(self):
 */
  /*else*/ {
    __pyx_v_self->_listener = ((PyObject *)__pyx_v_listener);
  }
  __pyx_L4:;

  /* "pyrobuf_list.pyx":1697
 * cdef class Uint32List:
 * 
 *     def __cinit__(self, size_t size=16, object listener=None):             # <<<<<<<<<<<<<<
 *         self._data = <uint32_t *>PyMem_Malloc(size * sizeof(uint32_t))
 *         if not self._data:
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyrobuf_list.Uint32List.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrobuf_list.pyx":1709
 *             self._listener = <PyObject *>listener
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         PyMem_Free(self._data)
 * 
 */

/* Python wrapper */
static void __pyx_pw_12pyrobuf_list_10Uint32List_3__dealloc__(PyObject *__pyx_v_self); /*proto*/
static void __pyx_pw_12pyrobuf_list_10Uint32List_3__dealloc__(PyObject *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0);
  __pyx_pf_12pyrobuf_list_10Uint32List_2__dealloc__(((struct __pyx_obj_12pyrobuf_list_Uint32List *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

static void __pyx_pf_12pyrobuf_list_10Uint32List_2__dealloc__(struct __pyx_obj_12pyrobuf_list_Uint32List *__pyx_v_self) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__dealloc__", 0);

  /* "pyrobuf_list.pyx":1710
 * 
 *     def __dealloc__(self):
 *         PyMem_Free(self._data)             # <<<<<<<<<<<<<<
 * 
 *     def __contains__(self, uint32_t x):
 */
  PyMem_Free(__pyx_v_self->_data);

  /* "pyrobuf_list.pyx":1709
 *             self._listener = <PyObject *>listener
 * 
 *     def __dealloc__(self):             # <<<<<<<<<<<<<<
 *         PyMem_Free(self._data)
 * 
 */

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

/* "pyrobuf_list.pyx":1712
 *         PyMem_Free(self._data)
 * 
 *     def __contains__(self, uint32_t x):             # <<<<<<<<<<<<<<
 *         cdef size_t i
 *         for i in range(self._n_items):
 */

/* Python wrapper */
static int __pyx_pw_12pyrobuf_list_10Uint32List_5__contains__(PyObject *__pyx_v_self, PyObject *__pyx_arg_x); /*proto*/
static int __pyx_pw_12pyrobuf_list_10Uint32List_5__contains__(PyObject *__pyx_v_self, PyObject *__pyx_arg_x) {
  uint32_t __pyx_v_x;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__contains__ (wrapper)", 0);
  assert(__pyx_arg_x); {
    __pyx_v_x = __Pyx_PyInt_As_uint32_t(__pyx_arg_x); if (unlikely((__pyx_v_x == (uint32_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1712; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyrobuf_list.Uint32List.__contains__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_12pyrobuf_list_10Uint32List_4__contains__(((struct __pyx_obj_12pyrobuf_list_Uint32List *)__pyx_v_self), ((uint32_t)__pyx_v_x));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_12pyrobuf_list_10Uint32List_4__contains__(struct __pyx_obj_12pyrobuf_list_Uint32List *__pyx_v_self, uint32_t __pyx_v_x) {
  size_t __pyx_v_i;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  size_t __pyx_t_1;
  size_t __pyx_t_2;
  int __pyx_t_3;
  __Pyx_RefNannySetupContext("__contains__", 0);

  /* "pyrobuf_list.pyx":1714
 *     def __contains__(self, uint32_t x):
 *         cdef size_t i
 *         for i in range(self._n_items):             # <<<<<<<<<<<<<<
 *             if self._data[i] == x:
 *                 return True
 */
  __pyx_t_1 = __pyx_v_self->_n_items;
  for (__pyx_t_2 = 0; __pyx_t_2 < __pyx_t_1; __pyx_t_2+=1) {
    __pyx_v_i = __pyx_t_2;

    /* "pyrobuf_list.pyx":1715
 *         cdef size_t i
 *         for i in range(self._n_items):
 *             if self._data[i] == x:             # <<<<<<<<<<<<<<
 *                 return True
 * 
 */
    __pyx_t_3 = (((__pyx_v_self->_data[__pyx_v_i]) == __pyx_v_x) != 0);
    if (__pyx_t_3) {

      /* "pyrobuf_list.pyx":1716
 *         for i in range(self._n_items):
 *             if self._data[i] == x:
 *                 return True             # <<<<<<<<<<<<<<
 * 
 *         return False
 */
      __pyx_r = 1;
      goto __pyx_L0;

      /* "pyrobuf_list.pyx":1715
 *         cdef size_t i
 *         for i in range(self._n_items):
 *             if self._data[i] == x:             # <<<<<<<<<<<<<<
 *                 return True
 * 
 */
    }
  }

  /* "pyrobuf_list.pyx":1718
 *                 return True
 * 
 *         return False             # <<<<<<<<<<<<<<
 * 
 *     def __delitem__(self, int i):
 */
  __pyx_r = 0;
  goto __pyx_L0;

  /* "pyrobuf_list.pyx":1712
 *         PyMem_Free(self._data)
 * 
 *     def __contains__(self, uint32_t x):             # <<<<<<<<<<<<<<
 *         cdef size_t i
 *         for i in range(self._n_items):
 */

  /* function exit code */
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrobuf_list.pyx":1720
 *         return False
 * 
 *     def __delitem__(self, int i):             # <<<<<<<<<<<<<<
 *         if i < 0:
 *             i += <int>self._n_items
 */

/* Python wrapper */
static int __pyx_pw_12pyrobuf_list_10Uint32List_7__delitem__(PyObject *__pyx_v_self, PyObject *__pyx_arg_i); /*proto*/
static int __pyx_pw_12pyrobuf_list_10Uint32List_7__delitem__(PyObject *__pyx_v_self, PyObject *__pyx_arg_i) {
  int __pyx_v_i;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__delitem__ (wrapper)", 0);
  assert(__pyx_arg_i); {
    __pyx_v_i = __Pyx_PyInt_As_int(__pyx_arg_i); if (unlikely((__pyx_v_i == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1720; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyrobuf_list.Uint32List.__delitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_12pyrobuf_list_10Uint32List_6__delitem__(((struct __pyx_obj_12pyrobuf_list_Uint32List *)__pyx_v_self), ((int)__pyx_v_i));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_12pyrobuf_list_10Uint32List_6__delitem__(struct __pyx_obj_12pyrobuf_list_Uint32List *__pyx_v_self, int __pyx_v_i) {
  size_t __pyx_v_j;
  PyObject *__pyx_v_listener = NULL;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  size_t __pyx_t_4;
  size_t __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;
  __Pyx_RefNannySetupContext("__delitem__", 0);

  /* "pyrobuf_list.pyx":1721
 * 
 *     def __delitem__(self, int i):
 *         if i < 0:             # <<<<<<<<<<<<<<
 *             i += <int>self._n_items
 * 
 */
  __pyx_t_1 = ((__pyx_v_i < 0) != 0);
  if (__pyx_t_1) {

    /* "pyrobuf_list.pyx":1722
 *     def __delitem__(self, int i):
 *         if i < 0:
 *             i += <int>self._n_items             # <<<<<<<<<<<<<<
 * 
 *         if i < 0 or <size_t>i >= self._n_items:
 */
    __pyx_v_i = (__pyx_v_i + ((int)__pyx_v_self->_n_items));

    /* "pyrobuf_list.pyx":1721
 * 
 *     def __delitem__(self, int i):
 *         if i < 0:             # <<<<<<<<<<<<<<
 *             i += <int>self._n_items
 * 
 */
  }

  /* "pyrobuf_list.pyx":1724
 *             i += <int>self._n_items
 * 
 *         if i < 0 or <size_t>i >= self._n_items:             # <<<<<<<<<<<<<<
 *             raise IndexError("list index out of range")
 * 
 */
  __pyx_t_2 = ((__pyx_v_i < 0) != 0);
  if (!__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L5_bool_binop_done;
  }
  __pyx_t_2 = ((((size_t)__pyx_v_i) >= __pyx_v_self->_n_items) != 0);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L5_bool_binop_done:;
  if (__pyx_t_1) {

    /* "pyrobuf_list.pyx":1725
 * 
 *         if i < 0 or <size_t>i >= self._n_items:
 *             raise IndexError("list index out of range")             # <<<<<<<<<<<<<<
 * 
 *         cdef size_t j
 */
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_IndexError, __pyx_tuple__54, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1725; __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 = 1725; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

    /* "pyrobuf_list.pyx":1724
 *             i += <int>self._n_items
 * 
 *         if i < 0 or <size_t>i >= self._n_items:             # <<<<<<<<<<<<<<
 *             raise IndexError("list index out of range")
 * 
 */
  }

  /* "pyrobuf_list.pyx":1728
 * 
 *         cdef size_t j
 *         for j in range(i, self._n_items):             # <<<<<<<<<<<<<<
 *             self._data[j] = self._data[j + 1]
 * 
 */
  __pyx_t_4 = __pyx_v_self->_n_items;
  for (__pyx_t_5 = __pyx_v_i; __pyx_t_5 < __pyx_t_4; __pyx_t_5+=1) {
    __pyx_v_j = __pyx_t_5;

    /* "pyrobuf_list.pyx":1729
 *         cdef size_t j
 *         for j in range(i, self._n_items):
 *             self._data[j] = self._data[j + 1]             # <<<<<<<<<<<<<<
 * 
 *         self._n_items -= 1
 */
    (__pyx_v_self->_data[__pyx_v_j]) = (__pyx_v_self->_data[(__pyx_v_j + 1)]);
  }

  /* "pyrobuf_list.pyx":1731
 *             self._data[j] = self._data[j + 1]
 * 
 *         self._n_items -= 1             # <<<<<<<<<<<<<<
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:
 */
  __pyx_v_self->_n_items = (__pyx_v_self->_n_items - 1);

  /* "pyrobuf_list.pyx":1732
 * 
 *         self._n_items -= 1
 *         listener = <object>self._listener             # <<<<<<<<<<<<<<
 *         if not listener._is_present_in_parent:
 *             listener._Modified()
 */
  __pyx_t_3 = ((PyObject *)__pyx_v_self->_listener);
  __Pyx_INCREF(__pyx_t_3);
  __pyx_v_listener = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "pyrobuf_list.pyx":1733
 *         self._n_items -= 1
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:             # <<<<<<<<<<<<<<
 *             listener._Modified()
 * 
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_listener, __pyx_n_s_is_present_in_parent); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1733; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1733; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_2 = ((!__pyx_t_1) != 0);
  if (__pyx_t_2) {

    /* "pyrobuf_list.pyx":1734
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:
 *             listener._Modified()             # <<<<<<<<<<<<<<
 * 
 *     def __getitem__(self, int i):
 */
    __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_v_listener, __pyx_n_s_Modified); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1734; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_6);
    __pyx_t_7 = NULL;
    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_6))) {
      __pyx_t_7 = PyMethod_GET_SELF(__pyx_t_6);
      if (likely(__pyx_t_7)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_6);
        __Pyx_INCREF(__pyx_t_7);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_6, function);
      }
    }
    if (__pyx_t_7) {
      __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_6, __pyx_t_7); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1734; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
    } else {
      __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_6); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1734; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "pyrobuf_list.pyx":1733
 *         self._n_items -= 1
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:             # <<<<<<<<<<<<<<
 *             listener._Modified()
 * 
 */
  }

  /* "pyrobuf_list.pyx":1720
 *         return False
 * 
 *     def __delitem__(self, int i):             # <<<<<<<<<<<<<<
 *         if i < 0:
 *             i += <int>self._n_items
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_7);
  __Pyx_AddTraceback("pyrobuf_list.Uint32List.__delitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_listener);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrobuf_list.pyx":1736
 *             listener._Modified()
 * 
 *     def __getitem__(self, int i):             # <<<<<<<<<<<<<<
 *         if i < 0:
 *             i += <int>self._n_items
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrobuf_list_10Uint32List_9__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_arg_i); /*proto*/
static PyObject *__pyx_pw_12pyrobuf_list_10Uint32List_9__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_arg_i) {
  int __pyx_v_i;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0);
  assert(__pyx_arg_i); {
    __pyx_v_i = __Pyx_PyInt_As_int(__pyx_arg_i); if (unlikely((__pyx_v_i == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1736; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyrobuf_list.Uint32List.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_12pyrobuf_list_10Uint32List_8__getitem__(((struct __pyx_obj_12pyrobuf_list_Uint32List *)__pyx_v_self), ((int)__pyx_v_i));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_12pyrobuf_list_10Uint32List_8__getitem__(struct __pyx_obj_12pyrobuf_list_Uint32List *__pyx_v_self, int __pyx_v_i) {
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  PyObject *__pyx_t_3 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__getitem__", 0);

  /* "pyrobuf_list.pyx":1737
 * 
 *     def __getitem__(self, int i):
 *         if i < 0:             # <<<<<<<<<<<<<<
 *             i += <int>self._n_items
 * 
 */
  __pyx_t_1 = ((__pyx_v_i < 0) != 0);
  if (__pyx_t_1) {

    /* "pyrobuf_list.pyx":1738
 *     def __getitem__(self, int i):
 *         if i < 0:
 *             i += <int>self._n_items             # <<<<<<<<<<<<<<
 * 
 *         if i < 0 or <size_t>i >= self._n_items or i < 0:
 */
    __pyx_v_i = (__pyx_v_i + ((int)__pyx_v_self->_n_items));

    /* "pyrobuf_list.pyx":1737
 * 
 *     def __getitem__(self, int i):
 *         if i < 0:             # <<<<<<<<<<<<<<
 *             i += <int>self._n_items
 * 
 */
  }

  /* "pyrobuf_list.pyx":1740
 *             i += <int>self._n_items
 * 
 *         if i < 0 or <size_t>i >= self._n_items or i < 0:             # <<<<<<<<<<<<<<
 *             raise IndexError("list index out of range")
 * 
 */
  __pyx_t_2 = ((__pyx_v_i < 0) != 0);
  if (!__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L5_bool_binop_done;
  }
  __pyx_t_2 = ((((size_t)__pyx_v_i) >= __pyx_v_self->_n_items) != 0);
  if (!__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L5_bool_binop_done;
  }
  __pyx_t_2 = ((__pyx_v_i < 0) != 0);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L5_bool_binop_done:;
  if (__pyx_t_1) {

    /* "pyrobuf_list.pyx":1741
 * 
 *         if i < 0 or <size_t>i >= self._n_items or i < 0:
 *             raise IndexError("list index out of range")             # <<<<<<<<<<<<<<
 * 
 *         return self._data[i]
 */
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_IndexError, __pyx_tuple__55, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1741; __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 = 1741; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

    /* "pyrobuf_list.pyx":1740
 *             i += <int>self._n_items
 * 
 *         if i < 0 or <size_t>i >= self._n_items or i < 0:             # <<<<<<<<<<<<<<
 *             raise IndexError("list index out of range")
 * 
 */
  }

  /* "pyrobuf_list.pyx":1743
 *             raise IndexError("list index out of range")
 * 
 *         return self._data[i]             # <<<<<<<<<<<<<<
 * 
 *     def __iter__(self):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_3 = __Pyx_PyInt_From_uint32_t((__pyx_v_self->_data[__pyx_v_i])); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1743; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_r = __pyx_t_3;
  __pyx_t_3 = 0;
  goto __pyx_L0;

  /* "pyrobuf_list.pyx":1736
 *             listener._Modified()
 * 
 *     def __getitem__(self, int i):             # <<<<<<<<<<<<<<
 *         if i < 0:
 *             i += <int>self._n_items
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_AddTraceback("pyrobuf_list.Uint32List.__getitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}
static PyObject *__pyx_gb_12pyrobuf_list_10Uint32List_12generator7(__pyx_CoroutineObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */

/* "pyrobuf_list.pyx":1745
 *         return self._data[i]
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         cdef size_t idx = 0
 *         while idx < self._n_items:
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrobuf_list_10Uint32List_11__iter__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_12pyrobuf_list_10Uint32List_11__iter__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrobuf_list_10Uint32List_10__iter__(((struct __pyx_obj_12pyrobuf_list_Uint32List *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_12pyrobuf_list_10Uint32List_10__iter__(struct __pyx_obj_12pyrobuf_list_Uint32List *__pyx_v_self) {
  struct __pyx_obj_12pyrobuf_list___pyx_scope_struct_7___iter__ *__pyx_cur_scope;
  PyObject *__pyx_r = NULL;
  __Pyx_RefNannyDeclarations
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("__iter__", 0);
  __pyx_cur_scope = (struct __pyx_obj_12pyrobuf_list___pyx_scope_struct_7___iter__ *)__pyx_tp_new_12pyrobuf_list___pyx_scope_struct_7___iter__(__pyx_ptype_12pyrobuf_list___pyx_scope_struct_7___iter__, __pyx_empty_tuple, NULL);
  if (unlikely(!__pyx_cur_scope)) {
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __Pyx_GOTREF(__pyx_cur_scope);
  __pyx_cur_scope->__pyx_v_self = __pyx_v_self;
  __Pyx_INCREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self);
  {
    __pyx_CoroutineObject *gen = __Pyx_Generator_New((__pyx_coroutine_body_t) __pyx_gb_12pyrobuf_list_10Uint32List_12generator7, (PyObject *) __pyx_cur_scope, __pyx_n_s_iter, __pyx_n_s_Uint32List___iter); if (unlikely(!gen)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1745; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_cur_scope);
    __Pyx_RefNannyFinishContext();
    return (PyObject *) gen;
  }

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_AddTraceback("pyrobuf_list.Uint32List.__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __Pyx_DECREF(((PyObject *)__pyx_cur_scope));
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_gb_12pyrobuf_list_10Uint32List_12generator7(__pyx_CoroutineObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */
{
  struct __pyx_obj_12pyrobuf_list___pyx_scope_struct_7___iter__ *__pyx_cur_scope = ((struct __pyx_obj_12pyrobuf_list___pyx_scope_struct_7___iter__ *)__pyx_generator->closure);
  PyObject *__pyx_r = NULL;
  int __pyx_t_1;
  PyObject *__pyx_t_2 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("None", 0);
  switch (__pyx_generator->resume_label) {
    case 0: goto __pyx_L3_first_run;
    case 1: goto __pyx_L6_resume_from_yield;
    default: /* CPython raises the right error here */
    __Pyx_RefNannyFinishContext();
    return NULL;
  }
  __pyx_L3_first_run:;
  if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1745; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

  /* "pyrobuf_list.pyx":1746
 * 
 *     def __iter__(self):
 *         cdef size_t idx = 0             # <<<<<<<<<<<<<<
 *         while idx < self._n_items:
 *             yield self._data[idx]
 */
  __pyx_cur_scope->__pyx_v_idx = 0;

  /* "pyrobuf_list.pyx":1747
 *     def __iter__(self):
 *         cdef size_t idx = 0
 *         while idx < self._n_items:             # <<<<<<<<<<<<<<
 *             yield self._data[idx]
 *             idx += 1
 */
  while (1) {
    __pyx_t_1 = ((__pyx_cur_scope->__pyx_v_idx < __pyx_cur_scope->__pyx_v_self->_n_items) != 0);
    if (!__pyx_t_1) break;

    /* "pyrobuf_list.pyx":1748
 *         cdef size_t idx = 0
 *         while idx < self._n_items:
 *             yield self._data[idx]             # <<<<<<<<<<<<<<
 *             idx += 1
 * 
 */
    __pyx_t_2 = __Pyx_PyInt_From_uint32_t((__pyx_cur_scope->__pyx_v_self->_data[__pyx_cur_scope->__pyx_v_idx])); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1748; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_r = __pyx_t_2;
    __pyx_t_2 = 0;
    __Pyx_XGIVEREF(__pyx_r);
    __Pyx_RefNannyFinishContext();
    /* return from generator, yielding value */
    __pyx_generator->resume_label = 1;
    return __pyx_r;
    __pyx_L6_resume_from_yield:;
    if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1748; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

    /* "pyrobuf_list.pyx":1749
 *         while idx < self._n_items:
 *             yield self._data[idx]
 *             idx += 1             # <<<<<<<<<<<<<<
 * 
 *     def __len__(self):
 */
    __pyx_cur_scope->__pyx_v_idx = (__pyx_cur_scope->__pyx_v_idx + 1);
  }

  /* "pyrobuf_list.pyx":1745
 *         return self._data[i]
 * 
 *     def __iter__(self):             # <<<<<<<<<<<<<<
 *         cdef size_t idx = 0
 *         while idx < self._n_items:
 */

  /* function exit code */
  PyErr_SetNone(PyExc_StopIteration);
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("__iter__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_r); __pyx_r = 0;
  __pyx_generator->resume_label = -1;
  __Pyx_Coroutine_clear((PyObject*)__pyx_generator);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrobuf_list.pyx":1751
 *             idx += 1
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         return self._n_items
 * 
 */

/* Python wrapper */
static Py_ssize_t __pyx_pw_12pyrobuf_list_10Uint32List_14__len__(PyObject *__pyx_v_self); /*proto*/
static Py_ssize_t __pyx_pw_12pyrobuf_list_10Uint32List_14__len__(PyObject *__pyx_v_self) {
  Py_ssize_t __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__len__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrobuf_list_10Uint32List_13__len__(((struct __pyx_obj_12pyrobuf_list_Uint32List *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static Py_ssize_t __pyx_pf_12pyrobuf_list_10Uint32List_13__len__(struct __pyx_obj_12pyrobuf_list_Uint32List *__pyx_v_self) {
  Py_ssize_t __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__len__", 0);

  /* "pyrobuf_list.pyx":1752
 * 
 *     def __len__(self):
 *         return self._n_items             # <<<<<<<<<<<<<<
 * 
 *     def __repr__(self):
 */
  __pyx_r = __pyx_v_self->_n_items;
  goto __pyx_L0;

  /* "pyrobuf_list.pyx":1751
 *             idx += 1
 * 
 *     def __len__(self):             # <<<<<<<<<<<<<<
 *         return self._n_items
 * 
 */

  /* function exit code */
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrobuf_list.pyx":1754
 *         return self._n_items
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return repr(list(self))
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrobuf_list_10Uint32List_16__repr__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_12pyrobuf_list_10Uint32List_16__repr__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrobuf_list_10Uint32List_15__repr__(((struct __pyx_obj_12pyrobuf_list_Uint32List *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_12pyrobuf_list_10Uint32List_15__repr__(struct __pyx_obj_12pyrobuf_list_Uint32List *__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__", 0);

  /* "pyrobuf_list.pyx":1755
 * 
 *     def __repr__(self):
 *         return repr(list(self))             # <<<<<<<<<<<<<<
 * 
 *     def __setitem__(self, int i, uint32_t x):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PySequence_List(((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1755; __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 = 1755; __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;

  /* "pyrobuf_list.pyx":1754
 *         return self._n_items
 * 
 *     def __repr__(self):             # <<<<<<<<<<<<<<
 *         return repr(list(self))
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pyrobuf_list.Uint32List.__repr__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrobuf_list.pyx":1757
 *         return repr(list(self))
 * 
 *     def __setitem__(self, int i, uint32_t x):             # <<<<<<<<<<<<<<
 *         if i < 0:
 *             i += <int>self._n_items
 */

/* Python wrapper */
static int __pyx_pw_12pyrobuf_list_10Uint32List_18__setitem__(PyObject *__pyx_v_self, PyObject *__pyx_arg_i, PyObject *__pyx_arg_x); /*proto*/
static int __pyx_pw_12pyrobuf_list_10Uint32List_18__setitem__(PyObject *__pyx_v_self, PyObject *__pyx_arg_i, PyObject *__pyx_arg_x) {
  int __pyx_v_i;
  uint32_t __pyx_v_x;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__setitem__ (wrapper)", 0);
  assert(__pyx_arg_i); {
    __pyx_v_i = __Pyx_PyInt_As_int(__pyx_arg_i); if (unlikely((__pyx_v_i == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1757; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  }
  assert(__pyx_arg_x); {
    __pyx_v_x = __Pyx_PyInt_As_uint32_t(__pyx_arg_x); if (unlikely((__pyx_v_x == (uint32_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1757; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyrobuf_list.Uint32List.__setitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return -1;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_12pyrobuf_list_10Uint32List_17__setitem__(((struct __pyx_obj_12pyrobuf_list_Uint32List *)__pyx_v_self), ((int)__pyx_v_i), ((uint32_t)__pyx_v_x));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_12pyrobuf_list_10Uint32List_17__setitem__(struct __pyx_obj_12pyrobuf_list_Uint32List *__pyx_v_self, int __pyx_v_i, uint32_t __pyx_v_x) {
  PyObject *__pyx_v_listener = NULL;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_t_2;
  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;
  __Pyx_RefNannySetupContext("__setitem__", 0);

  /* "pyrobuf_list.pyx":1758
 * 
 *     def __setitem__(self, int i, uint32_t x):
 *         if i < 0:             # <<<<<<<<<<<<<<
 *             i += <int>self._n_items
 * 
 */
  __pyx_t_1 = ((__pyx_v_i < 0) != 0);
  if (__pyx_t_1) {

    /* "pyrobuf_list.pyx":1759
 *     def __setitem__(self, int i, uint32_t x):
 *         if i < 0:
 *             i += <int>self._n_items             # <<<<<<<<<<<<<<
 * 
 *         if i < 0 or <size_t>i >= self._n_items:
 */
    __pyx_v_i = (__pyx_v_i + ((int)__pyx_v_self->_n_items));

    /* "pyrobuf_list.pyx":1758
 * 
 *     def __setitem__(self, int i, uint32_t x):
 *         if i < 0:             # <<<<<<<<<<<<<<
 *             i += <int>self._n_items
 * 
 */
  }

  /* "pyrobuf_list.pyx":1761
 *             i += <int>self._n_items
 * 
 *         if i < 0 or <size_t>i >= self._n_items:             # <<<<<<<<<<<<<<
 *             raise IndexError("list index out of range")
 * 
 */
  __pyx_t_2 = ((__pyx_v_i < 0) != 0);
  if (!__pyx_t_2) {
  } else {
    __pyx_t_1 = __pyx_t_2;
    goto __pyx_L5_bool_binop_done;
  }
  __pyx_t_2 = ((((size_t)__pyx_v_i) >= __pyx_v_self->_n_items) != 0);
  __pyx_t_1 = __pyx_t_2;
  __pyx_L5_bool_binop_done:;
  if (__pyx_t_1) {

    /* "pyrobuf_list.pyx":1762
 * 
 *         if i < 0 or <size_t>i >= self._n_items:
 *             raise IndexError("list index out of range")             # <<<<<<<<<<<<<<
 * 
 *         self._data[i] = x
 */
    __pyx_t_3 = __Pyx_PyObject_Call(__pyx_builtin_IndexError, __pyx_tuple__56, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1762; __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 = 1762; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

    /* "pyrobuf_list.pyx":1761
 *             i += <int>self._n_items
 * 
 *         if i < 0 or <size_t>i >= self._n_items:             # <<<<<<<<<<<<<<
 *             raise IndexError("list index out of range")
 * 
 */
  }

  /* "pyrobuf_list.pyx":1764
 *             raise IndexError("list index out of range")
 * 
 *         self._data[i] = x             # <<<<<<<<<<<<<<
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:
 */
  (__pyx_v_self->_data[__pyx_v_i]) = __pyx_v_x;

  /* "pyrobuf_list.pyx":1765
 * 
 *         self._data[i] = x
 *         listener = <object>self._listener             # <<<<<<<<<<<<<<
 *         if not listener._is_present_in_parent:
 *             listener._Modified()
 */
  __pyx_t_3 = ((PyObject *)__pyx_v_self->_listener);
  __Pyx_INCREF(__pyx_t_3);
  __pyx_v_listener = __pyx_t_3;
  __pyx_t_3 = 0;

  /* "pyrobuf_list.pyx":1766
 *         self._data[i] = x
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:             # <<<<<<<<<<<<<<
 *             listener._Modified()
 * 
 */
  __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_listener, __pyx_n_s_is_present_in_parent); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1766; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_3);
  __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1766; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
  __pyx_t_2 = ((!__pyx_t_1) != 0);
  if (__pyx_t_2) {

    /* "pyrobuf_list.pyx":1767
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:
 *             listener._Modified()             # <<<<<<<<<<<<<<
 * 
 *     def __str__(self):
 */
    __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_listener, __pyx_n_s_Modified); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1767; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_4);
    __pyx_t_5 = NULL;
    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_4))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_4, function);
      }
    }
    if (__pyx_t_5) {
      __pyx_t_3 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_5); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1767; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    } else {
      __pyx_t_3 = __Pyx_PyObject_CallNoArg(__pyx_t_4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1767; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __Pyx_GOTREF(__pyx_t_3);
    __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    /* "pyrobuf_list.pyx":1766
 *         self._data[i] = x
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:             # <<<<<<<<<<<<<<
 *             listener._Modified()
 * 
 */
  }

  /* "pyrobuf_list.pyx":1757
 *         return repr(list(self))
 * 
 *     def __setitem__(self, int i, uint32_t x):             # <<<<<<<<<<<<<<
 *         if i < 0:
 *             i += <int>self._n_items
 */

  /* function exit code */
  __pyx_r = 0;
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_3);
  __Pyx_XDECREF(__pyx_t_4);
  __Pyx_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pyrobuf_list.Uint32List.__setitem__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = -1;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_listener);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrobuf_list.pyx":1769
 *             listener._Modified()
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return str(list(self))
 * 
 */

/* Python wrapper */
static PyObject *__pyx_pw_12pyrobuf_list_10Uint32List_20__str__(PyObject *__pyx_v_self); /*proto*/
static PyObject *__pyx_pw_12pyrobuf_list_10Uint32List_20__str__(PyObject *__pyx_v_self) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__str__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrobuf_list_10Uint32List_19__str__(((struct __pyx_obj_12pyrobuf_list_Uint32List *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_12pyrobuf_list_10Uint32List_19__str__(struct __pyx_obj_12pyrobuf_list_Uint32List *__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__", 0);

  /* "pyrobuf_list.pyx":1770
 * 
 *     def __str__(self):
 *         return str(list(self))             # <<<<<<<<<<<<<<
 * 
 *     def __getbuffer__(self, Py_buffer *buffer, int flags):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = PySequence_List(((PyObject *)__pyx_v_self)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1770; __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 = 1770; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_2);
  __Pyx_GIVEREF(__pyx_t_1);
  PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1);
  __pyx_t_1 = 0;
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)(&PyString_Type)), __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1770; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyrobuf_list.pyx":1769
 *             listener._Modified()
 * 
 *     def __str__(self):             # <<<<<<<<<<<<<<
 *         return str(list(self))
 * 
 */

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_XDECREF(__pyx_t_2);
  __Pyx_AddTraceback("pyrobuf_list.Uint32List.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrobuf_list.pyx":1772
 *         return str(list(self))
 * 
 *     def __getbuffer__(self, Py_buffer *buffer, int flags):             # <<<<<<<<<<<<<<
 * 
 *         cdef Py_ssize_t itemsize = sizeof(uint32_t)
 */

/* Python wrapper */
static CYTHON_UNUSED int __pyx_pw_12pyrobuf_list_10Uint32List_22__getbuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_buffer, int __pyx_v_flags); /*proto*/
static CYTHON_UNUSED int __pyx_pw_12pyrobuf_list_10Uint32List_22__getbuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_buffer, int __pyx_v_flags) {
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__getbuffer__ (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrobuf_list_10Uint32List_21__getbuffer__(((struct __pyx_obj_12pyrobuf_list_Uint32List *)__pyx_v_self), ((Py_buffer *)__pyx_v_buffer), ((int)__pyx_v_flags));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static int __pyx_pf_12pyrobuf_list_10Uint32List_21__getbuffer__(struct __pyx_obj_12pyrobuf_list_Uint32List *__pyx_v_self, Py_buffer *__pyx_v_buffer, CYTHON_UNUSED int __pyx_v_flags) {
  Py_ssize_t __pyx_v_itemsize;
  int __pyx_r;
  __Pyx_RefNannyDeclarations
  size_t __pyx_t_1;
  Py_ssize_t *__pyx_t_2;
  __Pyx_RefNannySetupContext("__getbuffer__", 0);
  if (__pyx_v_buffer != NULL) {
    __pyx_v_buffer->obj = Py_None; __Pyx_INCREF(Py_None);
    __Pyx_GIVEREF(__pyx_v_buffer->obj);
  }

  /* "pyrobuf_list.pyx":1774
 *     def __getbuffer__(self, Py_buffer *buffer, int flags):
 * 
 *         cdef Py_ssize_t itemsize = sizeof(uint32_t)             # <<<<<<<<<<<<<<
 *         self.shape[0] = self._n_items
 *         self.strides[0] = 1
 */
  __pyx_v_itemsize = (sizeof(uint32_t));

  /* "pyrobuf_list.pyx":1775
 * 
 *         cdef Py_ssize_t itemsize = sizeof(uint32_t)
 *         self.shape[0] = self._n_items             # <<<<<<<<<<<<<<
 *         self.strides[0] = 1
 * 
 */
  __pyx_t_1 = __pyx_v_self->_n_items;
  (__pyx_v_self->shape[0]) = __pyx_t_1;

  /* "pyrobuf_list.pyx":1776
 *         cdef Py_ssize_t itemsize = sizeof(uint32_t)
 *         self.shape[0] = self._n_items
 *         self.strides[0] = 1             # <<<<<<<<<<<<<<
 * 
 *         buffer.buf = <char *>(self._data)
 */
  (__pyx_v_self->strides[0]) = 1;

  /* "pyrobuf_list.pyx":1778
 *         self.strides[0] = 1
 * 
 *         buffer.buf = <char *>(self._data)             # <<<<<<<<<<<<<<
 *         buffer.format = 'I'
 *         buffer.internal = NULL                  # see References
 */
  __pyx_v_buffer->buf = ((char *)__pyx_v_self->_data);

  /* "pyrobuf_list.pyx":1779
 * 
 *         buffer.buf = <char *>(self._data)
 *         buffer.format = 'I'             # <<<<<<<<<<<<<<
 *         buffer.internal = NULL                  # see References
 *         buffer.itemsize = itemsize
 */
  __pyx_v_buffer->format = __pyx_k_I;

  /* "pyrobuf_list.pyx":1780
 *         buffer.buf = <char *>(self._data)
 *         buffer.format = 'I'
 *         buffer.internal = NULL                  # see References             # <<<<<<<<<<<<<<
 *         buffer.itemsize = itemsize
 *         buffer.len = self._n_items
 */
  __pyx_v_buffer->internal = NULL;

  /* "pyrobuf_list.pyx":1781
 *         buffer.format = 'I'
 *         buffer.internal = NULL                  # see References
 *         buffer.itemsize = itemsize             # <<<<<<<<<<<<<<
 *         buffer.len = self._n_items
 *         buffer.ndim = 1
 */
  __pyx_v_buffer->itemsize = __pyx_v_itemsize;

  /* "pyrobuf_list.pyx":1782
 *         buffer.internal = NULL                  # see References
 *         buffer.itemsize = itemsize
 *         buffer.len = self._n_items             # <<<<<<<<<<<<<<
 *         buffer.ndim = 1
 *         buffer.obj = self
 */
  __pyx_t_1 = __pyx_v_self->_n_items;
  __pyx_v_buffer->len = __pyx_t_1;

  /* "pyrobuf_list.pyx":1783
 *         buffer.itemsize = itemsize
 *         buffer.len = self._n_items
 *         buffer.ndim = 1             # <<<<<<<<<<<<<<
 *         buffer.obj = self
 *         buffer.readonly = 1
 */
  __pyx_v_buffer->ndim = 1;

  /* "pyrobuf_list.pyx":1784
 *         buffer.len = self._n_items
 *         buffer.ndim = 1
 *         buffer.obj = self             # <<<<<<<<<<<<<<
 *         buffer.readonly = 1
 *         buffer.shape = self.shape
 */
  __Pyx_INCREF(((PyObject *)__pyx_v_self));
  __Pyx_GIVEREF(((PyObject *)__pyx_v_self));
  __Pyx_GOTREF(__pyx_v_buffer->obj);
  __Pyx_DECREF(__pyx_v_buffer->obj);
  __pyx_v_buffer->obj = ((PyObject *)__pyx_v_self);

  /* "pyrobuf_list.pyx":1785
 *         buffer.ndim = 1
 *         buffer.obj = self
 *         buffer.readonly = 1             # <<<<<<<<<<<<<<
 *         buffer.shape = self.shape
 *         buffer.strides = self.strides
 */
  __pyx_v_buffer->readonly = 1;

  /* "pyrobuf_list.pyx":1786
 *         buffer.obj = self
 *         buffer.readonly = 1
 *         buffer.shape = self.shape             # <<<<<<<<<<<<<<
 *         buffer.strides = self.strides
 *         buffer.suboffsets = NULL                # for pointer arrays only
 */
  __pyx_t_2 = __pyx_v_self->shape;
  __pyx_v_buffer->shape = __pyx_t_2;

  /* "pyrobuf_list.pyx":1787
 *         buffer.readonly = 1
 *         buffer.shape = self.shape
 *         buffer.strides = self.strides             # <<<<<<<<<<<<<<
 *         buffer.suboffsets = NULL                # for pointer arrays only
 * 
 */
  __pyx_t_2 = __pyx_v_self->strides;
  __pyx_v_buffer->strides = __pyx_t_2;

  /* "pyrobuf_list.pyx":1788
 *         buffer.shape = self.shape
 *         buffer.strides = self.strides
 *         buffer.suboffsets = NULL                # for pointer arrays only             # <<<<<<<<<<<<<<
 * 
 *     def __releasebuffer__(self, Py_buffer *buffer):
 */
  __pyx_v_buffer->suboffsets = NULL;

  /* "pyrobuf_list.pyx":1772
 *         return str(list(self))
 * 
 *     def __getbuffer__(self, Py_buffer *buffer, int flags):             # <<<<<<<<<<<<<<
 * 
 *         cdef Py_ssize_t itemsize = sizeof(uint32_t)
 */

  /* function exit code */
  __pyx_r = 0;
  if (__pyx_v_buffer != NULL && __pyx_v_buffer->obj == Py_None) {
    __Pyx_GOTREF(Py_None);
    __Pyx_DECREF(Py_None); __pyx_v_buffer->obj = NULL;
  }
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrobuf_list.pyx":1790
 *         buffer.suboffsets = NULL                # for pointer arrays only
 * 
 *     def __releasebuffer__(self, Py_buffer *buffer):             # <<<<<<<<<<<<<<
 *         pass
 * 
 */

/* Python wrapper */
static CYTHON_UNUSED void __pyx_pw_12pyrobuf_list_10Uint32List_24__releasebuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_buffer); /*proto*/
static CYTHON_UNUSED void __pyx_pw_12pyrobuf_list_10Uint32List_24__releasebuffer__(PyObject *__pyx_v_self, Py_buffer *__pyx_v_buffer) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__releasebuffer__ (wrapper)", 0);
  __pyx_pf_12pyrobuf_list_10Uint32List_23__releasebuffer__(((struct __pyx_obj_12pyrobuf_list_Uint32List *)__pyx_v_self), ((Py_buffer *)__pyx_v_buffer));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

static void __pyx_pf_12pyrobuf_list_10Uint32List_23__releasebuffer__(CYTHON_UNUSED struct __pyx_obj_12pyrobuf_list_Uint32List *__pyx_v_self, CYTHON_UNUSED Py_buffer *__pyx_v_buffer) {
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("__releasebuffer__", 0);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
}

/* "pyrobuf_list.pyx":1793
 *         pass
 * 
 *     cpdef append(self, uint32_t x):             # <<<<<<<<<<<<<<
 *         self._append(x)
 *         listener = <object>self._listener
 */

static PyObject *__pyx_pw_12pyrobuf_list_10Uint32List_26append(PyObject *__pyx_v_self, PyObject *__pyx_arg_x); /*proto*/
static PyObject *__pyx_f_12pyrobuf_list_10Uint32List_append(struct __pyx_obj_12pyrobuf_list_Uint32List *__pyx_v_self, uint32_t __pyx_v_x, int __pyx_skip_dispatch) {
  PyObject *__pyx_v_listener = NULL;
  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;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  int __pyx_t_7;
  int __pyx_t_8;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("append", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_append); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1793; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_12pyrobuf_list_10Uint32List_26append)) {
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_3 = __Pyx_PyInt_From_uint32_t(__pyx_v_x); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1793; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_4 = __pyx_t_1; __pyx_t_5 = NULL;
      if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_4))) {
        __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
        if (likely(__pyx_t_5)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_5);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_4, function);
        }
      }
      if (!__pyx_t_5) {
        __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1793; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_GOTREF(__pyx_t_2);
      } else {
        __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1793; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL;
        __Pyx_GIVEREF(__pyx_t_3);
        PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_3);
        __pyx_t_3 = 0;
        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1793; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 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;
  }

  /* "pyrobuf_list.pyx":1794
 * 
 *     cpdef append(self, uint32_t x):
 *         self._append(x)             # <<<<<<<<<<<<<<
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:
 */
  ((struct __pyx_vtabstruct_12pyrobuf_list_Uint32List *)__pyx_v_self->__pyx_vtab)->_append(__pyx_v_self, __pyx_v_x);

  /* "pyrobuf_list.pyx":1795
 *     cpdef append(self, uint32_t x):
 *         self._append(x)
 *         listener = <object>self._listener             # <<<<<<<<<<<<<<
 *         if not listener._is_present_in_parent:
 *             listener._Modified()
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_self->_listener);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_v_listener = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pyrobuf_list.pyx":1796
 *         self._append(x)
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:             # <<<<<<<<<<<<<<
 *             listener._Modified()
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_listener, __pyx_n_s_is_present_in_parent); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1796; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1796; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_8 = ((!__pyx_t_7) != 0);
  if (__pyx_t_8) {

    /* "pyrobuf_list.pyx":1797
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:
 *             listener._Modified()             # <<<<<<<<<<<<<<
 * 
 *     cpdef extend(self, Uint32List x):
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_listener, __pyx_n_s_Modified); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1797; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = NULL;
    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    if (__pyx_t_4) {
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1797; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    } else {
      __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1797; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "pyrobuf_list.pyx":1796
 *         self._append(x)
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:             # <<<<<<<<<<<<<<
 *             listener._Modified()
 * 
 */
  }

  /* "pyrobuf_list.pyx":1793
 *         pass
 * 
 *     cpdef append(self, uint32_t x):             # <<<<<<<<<<<<<<
 *         self._append(x)
 *         listener = <object>self._listener
 */

  /* function exit code */
  __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_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("pyrobuf_list.Uint32List.append", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_listener);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrobuf_list_10Uint32List_26append(PyObject *__pyx_v_self, PyObject *__pyx_arg_x); /*proto*/
static PyObject *__pyx_pw_12pyrobuf_list_10Uint32List_26append(PyObject *__pyx_v_self, PyObject *__pyx_arg_x) {
  uint32_t __pyx_v_x;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("append (wrapper)", 0);
  assert(__pyx_arg_x); {
    __pyx_v_x = __Pyx_PyInt_As_uint32_t(__pyx_arg_x); if (unlikely((__pyx_v_x == (uint32_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1793; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyrobuf_list.Uint32List.append", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_12pyrobuf_list_10Uint32List_25append(((struct __pyx_obj_12pyrobuf_list_Uint32List *)__pyx_v_self), ((uint32_t)__pyx_v_x));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_12pyrobuf_list_10Uint32List_25append(struct __pyx_obj_12pyrobuf_list_Uint32List *__pyx_v_self, uint32_t __pyx_v_x) {
  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", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_12pyrobuf_list_10Uint32List_append(__pyx_v_self, __pyx_v_x, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1793; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyrobuf_list.Uint32List.append", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrobuf_list.pyx":1799
 *             listener._Modified()
 * 
 *     cpdef extend(self, Uint32List x):             # <<<<<<<<<<<<<<
 *         cdef uint32_t *mem
 *         cdef size_t new_len = self._n_items + len(x)
 */

static PyObject *__pyx_pw_12pyrobuf_list_10Uint32List_28extend(PyObject *__pyx_v_self, PyObject *__pyx_v_x); /*proto*/
static PyObject *__pyx_f_12pyrobuf_list_10Uint32List_extend(struct __pyx_obj_12pyrobuf_list_Uint32List *__pyx_v_self, struct __pyx_obj_12pyrobuf_list_Uint32List *__pyx_v_x, int __pyx_skip_dispatch) {
  uint32_t *__pyx_v_mem;
  size_t __pyx_v_new_len;
  size_t __pyx_v_new_size;
  int __pyx_v_i;
  PyObject *__pyx_v_listener = NULL;
  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;
  PyObject *__pyx_t_5 = NULL;
  Py_ssize_t __pyx_t_6;
  int __pyx_t_7;
  size_t __pyx_t_8;
  size_t __pyx_t_9;
  size_t __pyx_t_10;
  int __pyx_t_11;
  uint32_t __pyx_t_12;
  int __pyx_t_13;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("extend", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_extend); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1799; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_12pyrobuf_list_10Uint32List_28extend)) {
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
      if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_4)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
        }
      }
      if (!__pyx_t_4) {
        __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, ((PyObject *)__pyx_v_x)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1799; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
      } else {
        __pyx_t_5 = PyTuple_New(1+1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1799; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_5);
        __Pyx_GIVEREF(__pyx_t_4); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_4); __pyx_t_4 = NULL;
        __Pyx_INCREF(((PyObject *)__pyx_v_x));
        __Pyx_GIVEREF(((PyObject *)__pyx_v_x));
        PyTuple_SET_ITEM(__pyx_t_5, 0+1, ((PyObject *)__pyx_v_x));
        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1799; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      }
      __Pyx_DECREF(__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;
  }

  /* "pyrobuf_list.pyx":1801
 *     cpdef extend(self, Uint32List x):
 *         cdef uint32_t *mem
 *         cdef size_t new_len = self._n_items + len(x)             # <<<<<<<<<<<<<<
 *         cdef size_t new_size
 *         cdef int i
 */
  __pyx_t_6 = PyObject_Length(((PyObject *)__pyx_v_x)); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1801; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_v_new_len = (__pyx_v_self->_n_items + __pyx_t_6);

  /* "pyrobuf_list.pyx":1805
 *         cdef int i
 * 
 *         if new_len > self._size:             # <<<<<<<<<<<<<<
 *             new_size = max(new_len, 2 * self._size)
 *             mem = <uint32_t *>PyMem_Realloc(self._data, new_size * sizeof(uint32_t))
 */
  __pyx_t_7 = ((__pyx_v_new_len > __pyx_v_self->_size) != 0);
  if (__pyx_t_7) {

    /* "pyrobuf_list.pyx":1806
 * 
 *         if new_len > self._size:
 *             new_size = max(new_len, 2 * self._size)             # <<<<<<<<<<<<<<
 *             mem = <uint32_t *>PyMem_Realloc(self._data, new_size * sizeof(uint32_t))
 *             if not mem:
 */
    __pyx_t_8 = (2 * __pyx_v_self->_size);
    __pyx_t_9 = __pyx_v_new_len;
    if (((__pyx_t_8 > __pyx_t_9) != 0)) {
      __pyx_t_10 = __pyx_t_8;
    } else {
      __pyx_t_10 = __pyx_t_9;
    }
    __pyx_v_new_size = __pyx_t_10;

    /* "pyrobuf_list.pyx":1807
 *         if new_len > self._size:
 *             new_size = max(new_len, 2 * self._size)
 *             mem = <uint32_t *>PyMem_Realloc(self._data, new_size * sizeof(uint32_t))             # <<<<<<<<<<<<<<
 *             if not mem:
 *                 raise MemoryError()
 */
    __pyx_v_mem = ((uint32_t *)PyMem_Realloc(__pyx_v_self->_data, (__pyx_v_new_size * (sizeof(uint32_t)))));

    /* "pyrobuf_list.pyx":1808
 *             new_size = max(new_len, 2 * self._size)
 *             mem = <uint32_t *>PyMem_Realloc(self._data, new_size * sizeof(uint32_t))
 *             if not mem:             # <<<<<<<<<<<<<<
 *                 raise MemoryError()
 * 
 */
    __pyx_t_7 = ((!(__pyx_v_mem != 0)) != 0);
    if (__pyx_t_7) {

      /* "pyrobuf_list.pyx":1809
 *             mem = <uint32_t *>PyMem_Realloc(self._data, new_size * sizeof(uint32_t))
 *             if not mem:
 *                 raise MemoryError()             # <<<<<<<<<<<<<<
 * 
 *             self._data = mem
 */
      PyErr_NoMemory(); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1809; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

      /* "pyrobuf_list.pyx":1808
 *             new_size = max(new_len, 2 * self._size)
 *             mem = <uint32_t *>PyMem_Realloc(self._data, new_size * sizeof(uint32_t))
 *             if not mem:             # <<<<<<<<<<<<<<
 *                 raise MemoryError()
 * 
 */
    }

    /* "pyrobuf_list.pyx":1811
 *                 raise MemoryError()
 * 
 *             self._data = mem             # <<<<<<<<<<<<<<
 *             self._size = new_size
 * 
 */
    __pyx_v_self->_data = __pyx_v_mem;

    /* "pyrobuf_list.pyx":1812
 * 
 *             self._data = mem
 *             self._size = new_size             # <<<<<<<<<<<<<<
 * 
 *         for i in range(len(x)):
 */
    __pyx_v_self->_size = __pyx_v_new_size;

    /* "pyrobuf_list.pyx":1805
 *         cdef int i
 * 
 *         if new_len > self._size:             # <<<<<<<<<<<<<<
 *             new_size = max(new_len, 2 * self._size)
 *             mem = <uint32_t *>PyMem_Realloc(self._data, new_size * sizeof(uint32_t))
 */
  }

  /* "pyrobuf_list.pyx":1814
 *             self._size = new_size
 * 
 *         for i in range(len(x)):             # <<<<<<<<<<<<<<
 *             self._data[self._n_items + i] = x[i]
 * 
 */
  __pyx_t_6 = PyObject_Length(((PyObject *)__pyx_v_x)); if (unlikely(__pyx_t_6 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1814; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  for (__pyx_t_11 = 0; __pyx_t_11 < __pyx_t_6; __pyx_t_11+=1) {
    __pyx_v_i = __pyx_t_11;

    /* "pyrobuf_list.pyx":1815
 * 
 *         for i in range(len(x)):
 *             self._data[self._n_items + i] = x[i]             # <<<<<<<<<<<<<<
 * 
 *         if new_len != self._n_items:
 */
    __pyx_t_1 = __Pyx_GetItemInt(((PyObject *)__pyx_v_x), __pyx_v_i, int, 1, __Pyx_PyInt_From_int, 0, 1, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1815; __pyx_clineno = __LINE__; goto __pyx_L1_error;};
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_12 = __Pyx_PyInt_As_uint32_t(__pyx_t_1); if (unlikely((__pyx_t_12 == (uint32_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1815; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    (__pyx_v_self->_data[(__pyx_v_self->_n_items + __pyx_v_i)]) = __pyx_t_12;
  }

  /* "pyrobuf_list.pyx":1817
 *             self._data[self._n_items + i] = x[i]
 * 
 *         if new_len != self._n_items:             # <<<<<<<<<<<<<<
 *             listener = <object>self._listener
 *             if not listener._is_present_in_parent:
 */
  __pyx_t_7 = ((__pyx_v_new_len != __pyx_v_self->_n_items) != 0);
  if (__pyx_t_7) {

    /* "pyrobuf_list.pyx":1818
 * 
 *         if new_len != self._n_items:
 *             listener = <object>self._listener             # <<<<<<<<<<<<<<
 *             if not listener._is_present_in_parent:
 *                 listener._Modified()
 */
    __pyx_t_1 = ((PyObject *)__pyx_v_self->_listener);
    __Pyx_INCREF(__pyx_t_1);
    __pyx_v_listener = __pyx_t_1;
    __pyx_t_1 = 0;

    /* "pyrobuf_list.pyx":1819
 *         if new_len != self._n_items:
 *             listener = <object>self._listener
 *             if not listener._is_present_in_parent:             # <<<<<<<<<<<<<<
 *                 listener._Modified()
 *         self._n_items = new_len
 */
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_listener, __pyx_n_s_is_present_in_parent); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1819; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    __pyx_t_7 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_7 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1819; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
    __pyx_t_13 = ((!__pyx_t_7) != 0);
    if (__pyx_t_13) {

      /* "pyrobuf_list.pyx":1820
 *             listener = <object>self._listener
 *             if not listener._is_present_in_parent:
 *                 listener._Modified()             # <<<<<<<<<<<<<<
 *         self._n_items = new_len
 * 
 */
      __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_listener, __pyx_n_s_Modified); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1820; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_t_3 = NULL;
      if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
        __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
        if (likely(__pyx_t_3)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
          __Pyx_INCREF(__pyx_t_3);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_2, function);
        }
      }
      if (__pyx_t_3) {
        __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1820; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      } else {
        __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1820; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

      /* "pyrobuf_list.pyx":1819
 *         if new_len != self._n_items:
 *             listener = <object>self._listener
 *             if not listener._is_present_in_parent:             # <<<<<<<<<<<<<<
 *                 listener._Modified()
 *         self._n_items = new_len
 */
    }

    /* "pyrobuf_list.pyx":1817
 *             self._data[self._n_items + i] = x[i]
 * 
 *         if new_len != self._n_items:             # <<<<<<<<<<<<<<
 *             listener = <object>self._listener
 *             if not listener._is_present_in_parent:
 */
  }

  /* "pyrobuf_list.pyx":1821
 *             if not listener._is_present_in_parent:
 *                 listener._Modified()
 *         self._n_items = new_len             # <<<<<<<<<<<<<<
 * 
 *     cpdef insert(self, int i, uint32_t x):
 */
  __pyx_v_self->_n_items = __pyx_v_new_len;

  /* "pyrobuf_list.pyx":1799
 *             listener._Modified()
 * 
 *     cpdef extend(self, Uint32List x):             # <<<<<<<<<<<<<<
 *         cdef uint32_t *mem
 *         cdef size_t new_len = self._n_items + len(x)
 */

  /* function exit code */
  __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_XDECREF(__pyx_t_5);
  __Pyx_AddTraceback("pyrobuf_list.Uint32List.extend", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_listener);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrobuf_list_10Uint32List_28extend(PyObject *__pyx_v_self, PyObject *__pyx_v_x); /*proto*/
static PyObject *__pyx_pw_12pyrobuf_list_10Uint32List_28extend(PyObject *__pyx_v_self, PyObject *__pyx_v_x) {
  CYTHON_UNUSED int __pyx_lineno = 0;
  CYTHON_UNUSED const char *__pyx_filename = NULL;
  CYTHON_UNUSED int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("extend (wrapper)", 0);
  if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_x), __pyx_ptype_12pyrobuf_list_Uint32List, 1, "x", 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1799; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_r = __pyx_pf_12pyrobuf_list_10Uint32List_27extend(((struct __pyx_obj_12pyrobuf_list_Uint32List *)__pyx_v_self), ((struct __pyx_obj_12pyrobuf_list_Uint32List *)__pyx_v_x));

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_12pyrobuf_list_10Uint32List_27extend(struct __pyx_obj_12pyrobuf_list_Uint32List *__pyx_v_self, struct __pyx_obj_12pyrobuf_list_Uint32List *__pyx_v_x) {
  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", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_12pyrobuf_list_10Uint32List_extend(__pyx_v_self, __pyx_v_x, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1799; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyrobuf_list.Uint32List.extend", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrobuf_list.pyx":1823
 *         self._n_items = new_len
 * 
 *     cpdef insert(self, int i, uint32_t x):             # <<<<<<<<<<<<<<
 *         cdef uint32_t *mem
 *         cdef size_t j
 */

static PyObject *__pyx_pw_12pyrobuf_list_10Uint32List_30insert(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_f_12pyrobuf_list_10Uint32List_insert(struct __pyx_obj_12pyrobuf_list_Uint32List *__pyx_v_self, int __pyx_v_i, uint32_t __pyx_v_x, int __pyx_skip_dispatch) {
  uint32_t *__pyx_v_mem;
  size_t __pyx_v_j;
  PyObject *__pyx_v_listener = NULL;
  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;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  Py_ssize_t __pyx_t_7;
  PyObject *__pyx_t_8 = NULL;
  int __pyx_t_9;
  int __pyx_t_10;
  size_t __pyx_t_11;
  size_t __pyx_t_12;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("insert", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_insert); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1823; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_12pyrobuf_list_10Uint32List_30insert)) {
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_3 = __Pyx_PyInt_From_int(__pyx_v_i); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1823; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_t_4 = __Pyx_PyInt_From_uint32_t(__pyx_v_x); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1823; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_4);
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_5 = __pyx_t_1; __pyx_t_6 = NULL;
      __pyx_t_7 = 0;
      if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_5))) {
        __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_5);
        if (likely(__pyx_t_6)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_5);
          __Pyx_INCREF(__pyx_t_6);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_5, function);
          __pyx_t_7 = 1;
        }
      }
      __pyx_t_8 = PyTuple_New(2+__pyx_t_7); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1823; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_8);
      if (__pyx_t_6) {
        __Pyx_GIVEREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __pyx_t_6 = NULL;
      }
      __Pyx_GIVEREF(__pyx_t_3);
      PyTuple_SET_ITEM(__pyx_t_8, 0+__pyx_t_7, __pyx_t_3);
      __Pyx_GIVEREF(__pyx_t_4);
      PyTuple_SET_ITEM(__pyx_t_8, 1+__pyx_t_7, __pyx_t_4);
      __pyx_t_3 = 0;
      __pyx_t_4 = 0;
      __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1823; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 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;
  }

  /* "pyrobuf_list.pyx":1827
 *         cdef size_t j
 * 
 *         if i < 0:             # <<<<<<<<<<<<<<
 *             i += <int>self._n_items
 * 
 */
  __pyx_t_9 = ((__pyx_v_i < 0) != 0);
  if (__pyx_t_9) {

    /* "pyrobuf_list.pyx":1828
 * 
 *         if i < 0:
 *             i += <int>self._n_items             # <<<<<<<<<<<<<<
 * 
 *         if i < 0 or <size_t>i > self._n_items:
 */
    __pyx_v_i = (__pyx_v_i + ((int)__pyx_v_self->_n_items));

    /* "pyrobuf_list.pyx":1827
 *         cdef size_t j
 * 
 *         if i < 0:             # <<<<<<<<<<<<<<
 *             i += <int>self._n_items
 * 
 */
  }

  /* "pyrobuf_list.pyx":1830
 *             i += <int>self._n_items
 * 
 *         if i < 0 or <size_t>i > self._n_items:             # <<<<<<<<<<<<<<
 *             raise IndexError("list index out of range")
 * 
 */
  __pyx_t_10 = ((__pyx_v_i < 0) != 0);
  if (!__pyx_t_10) {
  } else {
    __pyx_t_9 = __pyx_t_10;
    goto __pyx_L5_bool_binop_done;
  }
  __pyx_t_10 = ((((size_t)__pyx_v_i) > __pyx_v_self->_n_items) != 0);
  __pyx_t_9 = __pyx_t_10;
  __pyx_L5_bool_binop_done:;
  if (__pyx_t_9) {

    /* "pyrobuf_list.pyx":1831
 * 
 *         if i < 0 or <size_t>i > self._n_items:
 *             raise IndexError("list index out of range")             # <<<<<<<<<<<<<<
 * 
 *         if self._n_items == self._size:
 */
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_IndexError, __pyx_tuple__57, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1831; __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 = 1831; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

    /* "pyrobuf_list.pyx":1830
 *             i += <int>self._n_items
 * 
 *         if i < 0 or <size_t>i > self._n_items:             # <<<<<<<<<<<<<<
 *             raise IndexError("list index out of range")
 * 
 */
  }

  /* "pyrobuf_list.pyx":1833
 *             raise IndexError("list index out of range")
 * 
 *         if self._n_items == self._size:             # <<<<<<<<<<<<<<
 *             mem = <uint32_t *>PyMem_Realloc(self._data, 2 * self._size * sizeof(uint32_t))
 *             if not mem:
 */
  __pyx_t_9 = ((__pyx_v_self->_n_items == __pyx_v_self->_size) != 0);
  if (__pyx_t_9) {

    /* "pyrobuf_list.pyx":1834
 * 
 *         if self._n_items == self._size:
 *             mem = <uint32_t *>PyMem_Realloc(self._data, 2 * self._size * sizeof(uint32_t))             # <<<<<<<<<<<<<<
 *             if not mem:
 *                 raise MemoryError()
 */
    __pyx_v_mem = ((uint32_t *)PyMem_Realloc(__pyx_v_self->_data, ((2 * __pyx_v_self->_size) * (sizeof(uint32_t)))));

    /* "pyrobuf_list.pyx":1835
 *         if self._n_items == self._size:
 *             mem = <uint32_t *>PyMem_Realloc(self._data, 2 * self._size * sizeof(uint32_t))
 *             if not mem:             # <<<<<<<<<<<<<<
 *                 raise MemoryError()
 * 
 */
    __pyx_t_9 = ((!(__pyx_v_mem != 0)) != 0);
    if (__pyx_t_9) {

      /* "pyrobuf_list.pyx":1836
 *             mem = <uint32_t *>PyMem_Realloc(self._data, 2 * self._size * sizeof(uint32_t))
 *             if not mem:
 *                 raise MemoryError()             # <<<<<<<<<<<<<<
 * 
 *             self._data = mem
 */
      PyErr_NoMemory(); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1836; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

      /* "pyrobuf_list.pyx":1835
 *         if self._n_items == self._size:
 *             mem = <uint32_t *>PyMem_Realloc(self._data, 2 * self._size * sizeof(uint32_t))
 *             if not mem:             # <<<<<<<<<<<<<<
 *                 raise MemoryError()
 * 
 */
    }

    /* "pyrobuf_list.pyx":1838
 *                 raise MemoryError()
 * 
 *             self._data = mem             # <<<<<<<<<<<<<<
 *             self._size *= 2
 * 
 */
    __pyx_v_self->_data = __pyx_v_mem;

    /* "pyrobuf_list.pyx":1839
 * 
 *             self._data = mem
 *             self._size *= 2             # <<<<<<<<<<<<<<
 * 
 *         for j in range(self._n_items, <size_t>i, -1):
 */
    __pyx_v_self->_size = (__pyx_v_self->_size * 2);

    /* "pyrobuf_list.pyx":1833
 *             raise IndexError("list index out of range")
 * 
 *         if self._n_items == self._size:             # <<<<<<<<<<<<<<
 *             mem = <uint32_t *>PyMem_Realloc(self._data, 2 * self._size * sizeof(uint32_t))
 *             if not mem:
 */
  }

  /* "pyrobuf_list.pyx":1841
 *             self._size *= 2
 * 
 *         for j in range(self._n_items, <size_t>i, -1):             # <<<<<<<<<<<<<<
 *             self._data[j] = self._data[j - 1]
 * 
 */
  __pyx_t_11 = ((size_t)__pyx_v_i);
  for (__pyx_t_12 = __pyx_v_self->_n_items + 1; __pyx_t_12 > __pyx_t_11 + 1; ) { __pyx_t_12-=1;
    __pyx_v_j = __pyx_t_12;

    /* "pyrobuf_list.pyx":1842
 * 
 *         for j in range(self._n_items, <size_t>i, -1):
 *             self._data[j] = self._data[j - 1]             # <<<<<<<<<<<<<<
 * 
 *         self._data[i] = x
 */
    (__pyx_v_self->_data[__pyx_v_j]) = (__pyx_v_self->_data[(__pyx_v_j - 1)]);
  }

  /* "pyrobuf_list.pyx":1844
 *             self._data[j] = self._data[j - 1]
 * 
 *         self._data[i] = x             # <<<<<<<<<<<<<<
 *         self._n_items += 1
 *         listener = <object>self._listener
 */
  (__pyx_v_self->_data[__pyx_v_i]) = __pyx_v_x;

  /* "pyrobuf_list.pyx":1845
 * 
 *         self._data[i] = x
 *         self._n_items += 1             # <<<<<<<<<<<<<<
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:
 */
  __pyx_v_self->_n_items = (__pyx_v_self->_n_items + 1);

  /* "pyrobuf_list.pyx":1846
 *         self._data[i] = x
 *         self._n_items += 1
 *         listener = <object>self._listener             # <<<<<<<<<<<<<<
 *         if not listener._is_present_in_parent:
 *             listener._Modified()
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_self->_listener);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_v_listener = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pyrobuf_list.pyx":1847
 *         self._n_items += 1
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:             # <<<<<<<<<<<<<<
 *             listener._Modified()
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_listener, __pyx_n_s_is_present_in_parent); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1847; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1847; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_10 = ((!__pyx_t_9) != 0);
  if (__pyx_t_10) {

    /* "pyrobuf_list.pyx":1848
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:
 *             listener._Modified()             # <<<<<<<<<<<<<<
 * 
 *     cpdef pop(self):
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_listener, __pyx_n_s_Modified); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1848; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_5 = NULL;
    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_5)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_5);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    if (__pyx_t_5) {
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_5); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1848; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
    } else {
      __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1848; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "pyrobuf_list.pyx":1847
 *         self._n_items += 1
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:             # <<<<<<<<<<<<<<
 *             listener._Modified()
 * 
 */
  }

  /* "pyrobuf_list.pyx":1823
 *         self._n_items = new_len
 * 
 *     cpdef insert(self, int i, uint32_t x):             # <<<<<<<<<<<<<<
 *         cdef uint32_t *mem
 *         cdef size_t j
 */

  /* function exit code */
  __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_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_XDECREF(__pyx_t_8);
  __Pyx_AddTraceback("pyrobuf_list.Uint32List.insert", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_listener);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrobuf_list_10Uint32List_30insert(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/
static PyObject *__pyx_pw_12pyrobuf_list_10Uint32List_30insert(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) {
  int __pyx_v_i;
  uint32_t __pyx_v_x;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("insert (wrapper)", 0);
  {
    static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_i,&__pyx_n_s_x,0};
    PyObject* values[2] = {0,0};
    if (unlikely(__pyx_kwds)) {
      Py_ssize_t kw_args;
      const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args);
      switch (pos_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 (pos_args) {
        case  0:
        if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_i)) != 0)) kw_args--;
        else goto __pyx_L5_argtuple_error;
        case  1:
        if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_x)) != 0)) kw_args--;
        else {
          __Pyx_RaiseArgtupleInvalid("insert", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1823; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
        }
      }
      if (unlikely(kw_args > 0)) {
        if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "insert") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1823; __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_i = __Pyx_PyInt_As_int(values[0]); if (unlikely((__pyx_v_i == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1823; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
    __pyx_v_x = __Pyx_PyInt_As_uint32_t(values[1]); if (unlikely((__pyx_v_x == (uint32_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1823; __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 = 1823; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyrobuf_list.Uint32List.insert", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_12pyrobuf_list_10Uint32List_29insert(((struct __pyx_obj_12pyrobuf_list_Uint32List *)__pyx_v_self), __pyx_v_i, __pyx_v_x);

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_12pyrobuf_list_10Uint32List_29insert(struct __pyx_obj_12pyrobuf_list_Uint32List *__pyx_v_self, int __pyx_v_i, uint32_t __pyx_v_x) {
  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("insert", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_12pyrobuf_list_10Uint32List_insert(__pyx_v_self, __pyx_v_i, __pyx_v_x, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1823; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyrobuf_list.Uint32List.insert", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrobuf_list.pyx":1850
 *             listener._Modified()
 * 
 *     cpdef pop(self):             # <<<<<<<<<<<<<<
 *         if self._n_items == 0:
 *             raise IndexError("pop from empty list")
 */

static PyObject *__pyx_pw_12pyrobuf_list_10Uint32List_32pop(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_f_12pyrobuf_list_10Uint32List_pop(struct __pyx_obj_12pyrobuf_list_Uint32List *__pyx_v_self, int __pyx_skip_dispatch) {
  PyObject *__pyx_v_listener = NULL;
  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;
  int __pyx_t_6;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("pop", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_pop); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1850; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_12pyrobuf_list_10Uint32List_32pop)) {
      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_3 = __pyx_t_1; __pyx_t_4 = NULL;
      if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_3))) {
        __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_3);
        if (likely(__pyx_t_4)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_3);
          __Pyx_INCREF(__pyx_t_4);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_3, function);
        }
      }
      if (__pyx_t_4) {
        __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_3, __pyx_t_4); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1850; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
      } else {
        __pyx_t_2 = __Pyx_PyObject_CallNoArg(__pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1850; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      }
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_DECREF(__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;
  }

  /* "pyrobuf_list.pyx":1851
 * 
 *     cpdef pop(self):
 *         if self._n_items == 0:             # <<<<<<<<<<<<<<
 *             raise IndexError("pop from empty list")
 * 
 */
  __pyx_t_5 = ((__pyx_v_self->_n_items == 0) != 0);
  if (__pyx_t_5) {

    /* "pyrobuf_list.pyx":1852
 *     cpdef pop(self):
 *         if self._n_items == 0:
 *             raise IndexError("pop from empty list")             # <<<<<<<<<<<<<<
 * 
 *         self._n_items -= 1
 */
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_IndexError, __pyx_tuple__58, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1852; __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 = 1852; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

    /* "pyrobuf_list.pyx":1851
 * 
 *     cpdef pop(self):
 *         if self._n_items == 0:             # <<<<<<<<<<<<<<
 *             raise IndexError("pop from empty list")
 * 
 */
  }

  /* "pyrobuf_list.pyx":1854
 *             raise IndexError("pop from empty list")
 * 
 *         self._n_items -= 1             # <<<<<<<<<<<<<<
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:
 */
  __pyx_v_self->_n_items = (__pyx_v_self->_n_items - 1);

  /* "pyrobuf_list.pyx":1855
 * 
 *         self._n_items -= 1
 *         listener = <object>self._listener             # <<<<<<<<<<<<<<
 *         if not listener._is_present_in_parent:
 *             listener._Modified()
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_self->_listener);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_v_listener = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pyrobuf_list.pyx":1856
 *         self._n_items -= 1
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:             # <<<<<<<<<<<<<<
 *             listener._Modified()
 *         return self._data[self._n_items]
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_listener, __pyx_n_s_is_present_in_parent); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1856; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_5 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_5 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1856; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_6 = ((!__pyx_t_5) != 0);
  if (__pyx_t_6) {

    /* "pyrobuf_list.pyx":1857
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:
 *             listener._Modified()             # <<<<<<<<<<<<<<
 *         return self._data[self._n_items]
 * 
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_listener, __pyx_n_s_Modified); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1857; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_3 = NULL;
    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_3 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_3)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_3);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    if (__pyx_t_3) {
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1857; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
    } else {
      __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1857; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "pyrobuf_list.pyx":1856
 *         self._n_items -= 1
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:             # <<<<<<<<<<<<<<
 *             listener._Modified()
 *         return self._data[self._n_items]
 */
  }

  /* "pyrobuf_list.pyx":1858
 *         if not listener._is_present_in_parent:
 *             listener._Modified()
 *         return self._data[self._n_items]             # <<<<<<<<<<<<<<
 * 
 *     cpdef remove(self, uint32_t x):
 */
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __Pyx_PyInt_From_uint32_t((__pyx_v_self->_data[__pyx_v_self->_n_items])); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1858; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* "pyrobuf_list.pyx":1850
 *             listener._Modified()
 * 
 *     cpdef pop(self):             # <<<<<<<<<<<<<<
 *         if self._n_items == 0:
 *             raise IndexError("pop from empty list")
 */

  /* function exit code */
  __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("pyrobuf_list.Uint32List.pop", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_listener);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrobuf_list_10Uint32List_32pop(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/
static PyObject *__pyx_pw_12pyrobuf_list_10Uint32List_32pop(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) {
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("pop (wrapper)", 0);
  __pyx_r = __pyx_pf_12pyrobuf_list_10Uint32List_31pop(((struct __pyx_obj_12pyrobuf_list_Uint32List *)__pyx_v_self));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_12pyrobuf_list_10Uint32List_31pop(struct __pyx_obj_12pyrobuf_list_Uint32List *__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("pop", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_12pyrobuf_list_10Uint32List_pop(__pyx_v_self, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1850; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyrobuf_list.Uint32List.pop", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrobuf_list.pyx":1860
 *         return self._data[self._n_items]
 * 
 *     cpdef remove(self, uint32_t x):             # <<<<<<<<<<<<<<
 *         cdef size_t i
 *         cdef size_t j
 */

static PyObject *__pyx_pw_12pyrobuf_list_10Uint32List_34remove(PyObject *__pyx_v_self, PyObject *__pyx_arg_x); /*proto*/
static PyObject *__pyx_f_12pyrobuf_list_10Uint32List_remove(struct __pyx_obj_12pyrobuf_list_Uint32List *__pyx_v_self, uint32_t __pyx_v_x, int __pyx_skip_dispatch) {
  size_t __pyx_v_i;
  size_t __pyx_v_j;
  int __pyx_v_found;
  PyObject *__pyx_v_listener = NULL;
  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;
  PyObject *__pyx_t_5 = NULL;
  PyObject *__pyx_t_6 = NULL;
  size_t __pyx_t_7;
  size_t __pyx_t_8;
  int __pyx_t_9;
  int __pyx_t_10;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("remove", 0);
  /* Check if called by wrapper */
  if (unlikely(__pyx_skip_dispatch)) ;
  /* Check if overridden in Python */
  else if (unlikely(Py_TYPE(((PyObject *)__pyx_v_self))->tp_dictoffset != 0)) {
    __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_remove); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1860; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_1);
    if (!PyCFunction_Check(__pyx_t_1) || (PyCFunction_GET_FUNCTION(__pyx_t_1) != (PyCFunction)__pyx_pw_12pyrobuf_list_10Uint32List_34remove)) {
      __Pyx_XDECREF(__pyx_r);
      __pyx_t_3 = __Pyx_PyInt_From_uint32_t(__pyx_v_x); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1860; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_GOTREF(__pyx_t_3);
      __Pyx_INCREF(__pyx_t_1);
      __pyx_t_4 = __pyx_t_1; __pyx_t_5 = NULL;
      if (CYTHON_COMPILING_IN_CPYTHON && unlikely(PyMethod_Check(__pyx_t_4))) {
        __pyx_t_5 = PyMethod_GET_SELF(__pyx_t_4);
        if (likely(__pyx_t_5)) {
          PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_4);
          __Pyx_INCREF(__pyx_t_5);
          __Pyx_INCREF(function);
          __Pyx_DECREF_SET(__pyx_t_4, function);
        }
      }
      if (!__pyx_t_5) {
        __pyx_t_2 = __Pyx_PyObject_CallOneArg(__pyx_t_4, __pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1860; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __Pyx_GOTREF(__pyx_t_2);
      } else {
        __pyx_t_6 = PyTuple_New(1+1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1860; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_6);
        __Pyx_GIVEREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __pyx_t_5 = NULL;
        __Pyx_GIVEREF(__pyx_t_3);
        PyTuple_SET_ITEM(__pyx_t_6, 0+1, __pyx_t_3);
        __pyx_t_3 = 0;
        __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_6, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1860; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
      }
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 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;
  }

  /* "pyrobuf_list.pyx":1863
 *         cdef size_t i
 *         cdef size_t j
 *         cdef bint found = 0             # <<<<<<<<<<<<<<
 * 
 *         for i in range(self._n_items):
 */
  __pyx_v_found = 0;

  /* "pyrobuf_list.pyx":1865
 *         cdef bint found = 0
 * 
 *         for i in range(self._n_items):             # <<<<<<<<<<<<<<
 *             if self._data[i] == x:
 *                 found = 1
 */
  __pyx_t_7 = __pyx_v_self->_n_items;
  for (__pyx_t_8 = 0; __pyx_t_8 < __pyx_t_7; __pyx_t_8+=1) {
    __pyx_v_i = __pyx_t_8;

    /* "pyrobuf_list.pyx":1866
 * 
 *         for i in range(self._n_items):
 *             if self._data[i] == x:             # <<<<<<<<<<<<<<
 *                 found = 1
 *                 break
 */
    __pyx_t_9 = (((__pyx_v_self->_data[__pyx_v_i]) == __pyx_v_x) != 0);
    if (__pyx_t_9) {

      /* "pyrobuf_list.pyx":1867
 *         for i in range(self._n_items):
 *             if self._data[i] == x:
 *                 found = 1             # <<<<<<<<<<<<<<
 *                 break
 * 
 */
      __pyx_v_found = 1;

      /* "pyrobuf_list.pyx":1868
 *             if self._data[i] == x:
 *                 found = 1
 *                 break             # <<<<<<<<<<<<<<
 * 
 *         if found == 0:
 */
      goto __pyx_L4_break;

      /* "pyrobuf_list.pyx":1866
 * 
 *         for i in range(self._n_items):
 *             if self._data[i] == x:             # <<<<<<<<<<<<<<
 *                 found = 1
 *                 break
 */
    }
  }
  __pyx_L4_break:;

  /* "pyrobuf_list.pyx":1870
 *                 break
 * 
 *         if found == 0:             # <<<<<<<<<<<<<<
 *             raise ValueError("x not in list")
 * 
 */
  __pyx_t_9 = ((__pyx_v_found == 0) != 0);
  if (__pyx_t_9) {

    /* "pyrobuf_list.pyx":1871
 * 
 *         if found == 0:
 *             raise ValueError("x not in list")             # <<<<<<<<<<<<<<
 * 
 *         for j in range(i, self._n_items):
 */
    __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_ValueError, __pyx_tuple__59, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1871; __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 = 1871; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

    /* "pyrobuf_list.pyx":1870
 *                 break
 * 
 *         if found == 0:             # <<<<<<<<<<<<<<
 *             raise ValueError("x not in list")
 * 
 */
  }

  /* "pyrobuf_list.pyx":1873
 *             raise ValueError("x not in list")
 * 
 *         for j in range(i, self._n_items):             # <<<<<<<<<<<<<<
 *             self._data[j] = self._data[j + 1]
 * 
 */
  __pyx_t_7 = __pyx_v_self->_n_items;
  for (__pyx_t_8 = __pyx_v_i; __pyx_t_8 < __pyx_t_7; __pyx_t_8+=1) {
    __pyx_v_j = __pyx_t_8;

    /* "pyrobuf_list.pyx":1874
 * 
 *         for j in range(i, self._n_items):
 *             self._data[j] = self._data[j + 1]             # <<<<<<<<<<<<<<
 * 
 *         self._n_items -= 1
 */
    (__pyx_v_self->_data[__pyx_v_j]) = (__pyx_v_self->_data[(__pyx_v_j + 1)]);
  }

  /* "pyrobuf_list.pyx":1876
 *             self._data[j] = self._data[j + 1]
 * 
 *         self._n_items -= 1             # <<<<<<<<<<<<<<
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:
 */
  __pyx_v_self->_n_items = (__pyx_v_self->_n_items - 1);

  /* "pyrobuf_list.pyx":1877
 * 
 *         self._n_items -= 1
 *         listener = <object>self._listener             # <<<<<<<<<<<<<<
 *         if not listener._is_present_in_parent:
 *             listener._Modified()
 */
  __pyx_t_1 = ((PyObject *)__pyx_v_self->_listener);
  __Pyx_INCREF(__pyx_t_1);
  __pyx_v_listener = __pyx_t_1;
  __pyx_t_1 = 0;

  /* "pyrobuf_list.pyx":1878
 *         self._n_items -= 1
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:             # <<<<<<<<<<<<<<
 *             listener._Modified()
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_listener, __pyx_n_s_is_present_in_parent); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1878; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_t_9 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_9 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1878; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
  __pyx_t_10 = ((!__pyx_t_9) != 0);
  if (__pyx_t_10) {

    /* "pyrobuf_list.pyx":1879
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:
 *             listener._Modified()             # <<<<<<<<<<<<<<
 * 
 *     cdef void _append(self, uint32_t x):
 */
    __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_listener, __pyx_n_s_Modified); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1879; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    __Pyx_GOTREF(__pyx_t_2);
    __pyx_t_4 = NULL;
    if (CYTHON_COMPILING_IN_CPYTHON && likely(PyMethod_Check(__pyx_t_2))) {
      __pyx_t_4 = PyMethod_GET_SELF(__pyx_t_2);
      if (likely(__pyx_t_4)) {
        PyObject* function = PyMethod_GET_FUNCTION(__pyx_t_2);
        __Pyx_INCREF(__pyx_t_4);
        __Pyx_INCREF(function);
        __Pyx_DECREF_SET(__pyx_t_2, function);
      }
    }
    if (__pyx_t_4) {
      __pyx_t_1 = __Pyx_PyObject_CallOneArg(__pyx_t_2, __pyx_t_4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1879; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
      __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
    } else {
      __pyx_t_1 = __Pyx_PyObject_CallNoArg(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1879; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
    __Pyx_GOTREF(__pyx_t_1);
    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

    /* "pyrobuf_list.pyx":1878
 *         self._n_items -= 1
 *         listener = <object>self._listener
 *         if not listener._is_present_in_parent:             # <<<<<<<<<<<<<<
 *             listener._Modified()
 * 
 */
  }

  /* "pyrobuf_list.pyx":1860
 *         return self._data[self._n_items]
 * 
 *     cpdef remove(self, uint32_t x):             # <<<<<<<<<<<<<<
 *         cdef size_t i
 *         cdef size_t j
 */

  /* function exit code */
  __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_XDECREF(__pyx_t_5);
  __Pyx_XDECREF(__pyx_t_6);
  __Pyx_AddTraceback("pyrobuf_list.Uint32List.remove", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = 0;
  __pyx_L0:;
  __Pyx_XDECREF(__pyx_v_listener);
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* Python wrapper */
static PyObject *__pyx_pw_12pyrobuf_list_10Uint32List_34remove(PyObject *__pyx_v_self, PyObject *__pyx_arg_x); /*proto*/
static PyObject *__pyx_pw_12pyrobuf_list_10Uint32List_34remove(PyObject *__pyx_v_self, PyObject *__pyx_arg_x) {
  uint32_t __pyx_v_x;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  PyObject *__pyx_r = 0;
  __Pyx_RefNannyDeclarations
  __Pyx_RefNannySetupContext("remove (wrapper)", 0);
  assert(__pyx_arg_x); {
    __pyx_v_x = __Pyx_PyInt_As_uint32_t(__pyx_arg_x); if (unlikely((__pyx_v_x == (uint32_t)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1860; __pyx_clineno = __LINE__; goto __pyx_L3_error;}
  }
  goto __pyx_L4_argument_unpacking_done;
  __pyx_L3_error:;
  __Pyx_AddTraceback("pyrobuf_list.Uint32List.remove", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __Pyx_RefNannyFinishContext();
  return NULL;
  __pyx_L4_argument_unpacking_done:;
  __pyx_r = __pyx_pf_12pyrobuf_list_10Uint32List_33remove(((struct __pyx_obj_12pyrobuf_list_Uint32List *)__pyx_v_self), ((uint32_t)__pyx_v_x));

  /* function exit code */
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

static PyObject *__pyx_pf_12pyrobuf_list_10Uint32List_33remove(struct __pyx_obj_12pyrobuf_list_Uint32List *__pyx_v_self, uint32_t __pyx_v_x) {
  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", 0);
  __Pyx_XDECREF(__pyx_r);
  __pyx_t_1 = __pyx_f_12pyrobuf_list_10Uint32List_remove(__pyx_v_self, __pyx_v_x, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1860; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  __pyx_r = __pyx_t_1;
  __pyx_t_1 = 0;
  goto __pyx_L0;

  /* function exit code */
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  __Pyx_AddTraceback("pyrobuf_list.Uint32List.remove", __pyx_clineno, __pyx_lineno, __pyx_filename);
  __pyx_r = NULL;
  __pyx_L0:;
  __Pyx_XGIVEREF(__pyx_r);
  __Pyx_RefNannyFinishContext();
  return __pyx_r;
}

/* "pyrobuf_list.pyx":1881
 *             listener._Modified()
 * 
 *     cdef void _append(self, uint32_t x):             # <<<<<<<<<<<<<<
 *         cdef uint32_t *mem
 * 
 */

static void __pyx_f_12pyrobuf_list_10Uint32List__append(struct __pyx_obj_12pyrobuf_list_Uint32List *__pyx_v_self, uint32_t __pyx_v_x) {
  uint32_t *__pyx_v_mem;
  __Pyx_RefNannyDeclarations
  int __pyx_t_1;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __Pyx_RefNannySetupContext("_append", 0);

  /* "pyrobuf_list.pyx":1884
 *         cdef uint32_t *mem
 * 
 *         if self._n_items == self._size:             # <<<<<<<<<<<<<<
 *             mem = <uint32_t *>PyMem_Realloc(self._data, 2 * self._size * sizeof(uint32_t))
 *             if not mem:
 */
  __pyx_t_1 = ((__pyx_v_self->_n_items == __pyx_v_self->_size) != 0);
  if (__pyx_t_1) {

    /* "pyrobuf_list.pyx":1885
 * 
 *         if self._n_items == self._size:
 *             mem = <uint32_t *>PyMem_Realloc(self._data, 2 * self._size * sizeof(uint32_t))             # <<<<<<<<<<<<<<
 *             if not mem:
 *                 raise MemoryError()
 */
    __pyx_v_mem = ((uint32_t *)PyMem_Realloc(__pyx_v_self->_data, ((2 * __pyx_v_self->_size) * (sizeof(uint32_t)))));

    /* "pyrobuf_list.pyx":1886
 *         if self._n_items == self._size:
 *             mem = <uint32_t *>PyMem_Realloc(self._data, 2 * self._size * sizeof(uint32_t))
 *             if not mem:             # <<<<<<<<<<<<<<
 *                 raise MemoryError()
 * 
 */
    __pyx_t_1 = ((!(__pyx_v_mem != 0)) != 0);
    if (__pyx_t_1) {

      /* "pyrobuf_list.pyx":1887
 *             mem = <uint32_t *>PyMem_Realloc(self._data, 2 * self._size * sizeof(uint32_t))
 *             if not mem:
 *                 raise MemoryError()             # <<<<<<<<<<<<<<
 * 
 *             self._data = mem
 */
      PyErr_NoMemory(); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1887; __pyx_clineno = __LINE__; goto __pyx_L1_error;}

      /* "pyrobuf_list.pyx":1886
 *         if self._n_items == self._size:
 *             mem = <uint32_t *>PyMem_Realloc(self._data, 2 * self._size * sizeof(uint32_t))
 *             if not mem:             # <<<<<<<<<<<<<<
 *                 raise MemoryError()
 * 
 */
    }

    /* "pyrobuf_list.pyx":1889
 *                 raise MemoryError()
 * 
 *             self._data = mem             # <<<<<<<<<<<<<<
 *             self._size *= 2
 * 
 */
    __pyx_v_self->_data = __pyx_v_mem;

    /* "pyrobuf_list.pyx":1890
 * 
 *             self._data = mem
 *             self._size *= 2             # <<<<<<<<<<<<<<
 * 
 *         self._data[self._n_items] = x
 */
    __pyx_v_self->_size = (__pyx_v_self->_size * 2);

    /* "pyrobuf_list.pyx":1884
 *         cdef uint32_t *mem
 * 
 *         if self._n_items == self._size:             # <<<<<<<<<<<<<<
 *             mem = <uint32_t *>PyMem_Realloc(self._data, 2 * self._size * sizeof(uint32_t))
 *             if not mem:
 */
  }

  /* "pyrobuf_list.pyx":1892
 *             self._size *= 2
 * 
 *         self._data[self._n_items] = x             # <<<<<<<<<<<<<<
 *         self._n_items += 1
 * 
 */
  (__pyx_v_self->_data[__pyx_v_self->_n_items]) = __pyx_v_x;

  /* "pyrobuf_list.pyx":1893
 * 
 *         self._data[self._n_items] = x
 *         self._n_items += 1             # <<<<<<<<<<<<<<
 * 
 */
  __pyx_v_self->_n_items = (__pyx_v_self->_n_items + 1);

  /* "pyrobuf_list.pyx":1881
 *             listener._Modified()
 * 
 *     cdef void _append(self, uint32_t x):             # <<<<<<<<<<<<<<
 *         cdef uint32_t *mem
 * 
 */

  /* function exit code */
  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_WriteUnraisable("pyrobuf_list.Uint32List._append", __pyx_clineno, __pyx_lineno, __pyx_filename, 0, 0);
  __pyx_L0:;
  __Pyx_RefNannyFinishContext();
}
static struct __pyx_vtabstruct_12pyrobuf_list_NullListener __pyx_vtable_12pyrobuf_list_NullListener;

static PyObject *__pyx_tp_new_12pyrobuf_list_NullListener(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  struct __pyx_obj_12pyrobuf_list_NullListener *p;
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_12pyrobuf_list_NullListener *)o);
  p->__pyx_vtab = __pyx_vtabptr_12pyrobuf_list_NullListener;
  return o;
}

static void __pyx_tp_dealloc_12pyrobuf_list_NullListener(PyObject *o) {
  #if PY_VERSION_HEX >= 0x030400a1
  if (unlikely(Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  (*Py_TYPE(o)->tp_free)(o);
}

static PyObject *__pyx_getprop_12pyrobuf_list_12NullListener__is_present_in_parent(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_12pyrobuf_list_12NullListener_21_is_present_in_parent_1__get__(o);
}

static PyMethodDef __pyx_methods_12pyrobuf_list_NullListener[] = {
  {"_Modified", (PyCFunction)__pyx_pw_12pyrobuf_list_12NullListener_1_Modified, METH_NOARGS, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_12pyrobuf_list_NullListener[] = {
  {(char *)"_is_present_in_parent", __pyx_getprop_12pyrobuf_list_12NullListener__is_present_in_parent, 0, 0, 0},
  {0, 0, 0, 0, 0}
};

static PyTypeObject __pyx_type_12pyrobuf_list_NullListener = {
  PyVarObject_HEAD_INIT(0, 0)
  "pyrobuf_list.NullListener", /*tp_name*/
  sizeof(struct __pyx_obj_12pyrobuf_list_NullListener), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_12pyrobuf_list_NullListener, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|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_12pyrobuf_list_NullListener, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_12pyrobuf_list_NullListener, /*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_12pyrobuf_list_NullListener, /*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*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};

static PyObject *__pyx_tp_new_12pyrobuf_list_TypedList(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_12pyrobuf_list_TypedList *p;
  PyObject *o = (&PyList_Type)->tp_new(t, a, k);
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_12pyrobuf_list_TypedList *)o);
  p->_list_type = ((PyTypeObject*)Py_None); Py_INCREF(Py_None);
  return o;
}

static void __pyx_tp_dealloc_12pyrobuf_list_TypedList(PyObject *o) {
  struct __pyx_obj_12pyrobuf_list_TypedList *p = (struct __pyx_obj_12pyrobuf_list_TypedList *)o;
  #if PY_VERSION_HEX >= 0x030400a1
  if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->_list_type);
  PyObject_GC_Track(o);
  (&PyList_Type)->tp_dealloc(o);
}

static int __pyx_tp_traverse_12pyrobuf_list_TypedList(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_12pyrobuf_list_TypedList *p = (struct __pyx_obj_12pyrobuf_list_TypedList *)o;
  if (!(&PyList_Type)->tp_traverse); else { e = (&PyList_Type)->tp_traverse(o,v,a); if (e) return e; }
  if (p->_list_type) {
    e = (*v)(p->_list_type, a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_12pyrobuf_list_TypedList(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_12pyrobuf_list_TypedList *p = (struct __pyx_obj_12pyrobuf_list_TypedList *)o;
  if (!(&PyList_Type)->tp_clear); else (&PyList_Type)->tp_clear(o);
  tmp = ((PyObject*)p->_list_type);
  p->_list_type = ((PyTypeObject*)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static int __pyx_mp_ass_subscript_12pyrobuf_list_TypedList(PyObject *o, PyObject *i, PyObject *v) {
  if (v) {
    return __pyx_pw_12pyrobuf_list_9TypedList_3__setitem__(o, i, v);
  }
  else {
    if ((&PyList_Type)->tp_as_mapping && (&PyList_Type)->tp_as_mapping->mp_ass_subscript)
      return (&PyList_Type)->tp_as_mapping->mp_ass_subscript(o, i, v);
    PyErr_Format(PyExc_NotImplementedError,
      "Subscript deletion not supported by %.200s", Py_TYPE(o)->tp_name);
    return -1;
  }
}
#if PY_MAJOR_VERSION >= 3
#error __getslice__, __setslice__, and __delslice__ not supported in Python 3.
#endif

static int __pyx_sq_ass_slice_12pyrobuf_list_TypedList(PyObject *o, Py_ssize_t i, Py_ssize_t j, PyObject *v) {
  if (v) {
    return __pyx_pw_12pyrobuf_list_9TypedList_5__setslice__(o, i, j, v);
  }
  else {
    if ((&PyList_Type)->tp_as_sequence && (&PyList_Type)->tp_as_sequence->sq_ass_slice)
      return (&PyList_Type)->tp_as_sequence->sq_ass_slice(o, i, j, v);
    PyErr_Format(PyExc_NotImplementedError,
      "2-element slice deletion not supported by %.200s", Py_TYPE(o)->tp_name);
    return -1;
  }
}

static PyObject *__pyx_getprop_12pyrobuf_list_9TypedList_list_type(PyObject *o, CYTHON_UNUSED void *x) {
  return __pyx_pw_12pyrobuf_list_9TypedList_9list_type_1__get__(o);
}

static PyMethodDef __pyx_methods_12pyrobuf_list_TypedList[] = {
  {"add", (PyCFunction)__pyx_pw_12pyrobuf_list_9TypedList_7add, METH_VARARGS|METH_KEYWORDS, 0},
  {"append", (PyCFunction)__pyx_pw_12pyrobuf_list_9TypedList_9append, METH_O, 0},
  {"extend", (PyCFunction)__pyx_pw_12pyrobuf_list_9TypedList_11extend, METH_O, 0},
  {"insert", (PyCFunction)__pyx_pw_12pyrobuf_list_9TypedList_13insert, METH_VARARGS|METH_KEYWORDS, 0},
  {0, 0, 0, 0}
};

static struct PyGetSetDef __pyx_getsets_12pyrobuf_list_TypedList[] = {
  {(char *)"list_type", __pyx_getprop_12pyrobuf_list_9TypedList_list_type, 0, 0, 0},
  {0, 0, 0, 0, 0}
};

static PySequenceMethods __pyx_tp_as_sequence_TypedList = {
  0, /*sq_length*/
  0, /*sq_concat*/
  0, /*sq_repeat*/
  0, /*sq_item*/
  0, /*sq_slice*/
  0, /*sq_ass_item*/
  __pyx_sq_ass_slice_12pyrobuf_list_TypedList, /*sq_ass_slice*/
  0, /*sq_contains*/
  0, /*sq_inplace_concat*/
  0, /*sq_inplace_repeat*/
};

static PyMappingMethods __pyx_tp_as_mapping_TypedList = {
  0, /*mp_length*/
  0, /*mp_subscript*/
  __pyx_mp_ass_subscript_12pyrobuf_list_TypedList, /*mp_ass_subscript*/
};

static PyTypeObject __pyx_type_12pyrobuf_list_TypedList = {
  PyVarObject_HEAD_INIT(0, 0)
  "pyrobuf_list.TypedList", /*tp_name*/
  sizeof(struct __pyx_obj_12pyrobuf_list_TypedList), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_12pyrobuf_list_TypedList, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  &__pyx_tp_as_sequence_TypedList, /*tp_as_sequence*/
  &__pyx_tp_as_mapping_TypedList, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_12pyrobuf_list_TypedList, /*tp_traverse*/
  __pyx_tp_clear_12pyrobuf_list_TypedList, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_12pyrobuf_list_TypedList, /*tp_methods*/
  0, /*tp_members*/
  __pyx_getsets_12pyrobuf_list_TypedList, /*tp_getset*/
  0, /*tp_base*/
  0, /*tp_dict*/
  0, /*tp_descr_get*/
  0, /*tp_descr_set*/
  0, /*tp_dictoffset*/
  __pyx_pw_12pyrobuf_list_9TypedList_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_12pyrobuf_list_TypedList, /*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*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};

static PyObject *__pyx_tp_new_12pyrobuf_list_BytesList(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o = (&PyList_Type)->tp_new(t, a, k);
  if (unlikely(!o)) return 0;
  return o;
}

static void __pyx_tp_dealloc_12pyrobuf_list_BytesList(PyObject *o) {
  #if PY_VERSION_HEX >= 0x030400a1
  if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  PyObject_GC_Track(o);
  (&PyList_Type)->tp_dealloc(o);
}

static int __pyx_tp_traverse_12pyrobuf_list_BytesList(PyObject *o, visitproc v, void *a) {
  int e;
  if (!(&PyList_Type)->tp_traverse); else { e = (&PyList_Type)->tp_traverse(o,v,a); if (e) return e; }
  return 0;
}

static int __pyx_tp_clear_12pyrobuf_list_BytesList(PyObject *o) {
  if (!(&PyList_Type)->tp_clear); else (&PyList_Type)->tp_clear(o);
  return 0;
}

static int __pyx_mp_ass_subscript_12pyrobuf_list_BytesList(PyObject *o, PyObject *i, PyObject *v) {
  if (v) {
    return __pyx_pw_12pyrobuf_list_9BytesList_3__setitem__(o, i, v);
  }
  else {
    if ((&PyList_Type)->tp_as_mapping && (&PyList_Type)->tp_as_mapping->mp_ass_subscript)
      return (&PyList_Type)->tp_as_mapping->mp_ass_subscript(o, i, v);
    PyErr_Format(PyExc_NotImplementedError,
      "Subscript deletion not supported by %.200s", Py_TYPE(o)->tp_name);
    return -1;
  }
}
#if PY_MAJOR_VERSION >= 3
#error __getslice__, __setslice__, and __delslice__ not supported in Python 3.
#endif

static int __pyx_sq_ass_slice_12pyrobuf_list_BytesList(PyObject *o, Py_ssize_t i, Py_ssize_t j, PyObject *v) {
  if (v) {
    return __pyx_pw_12pyrobuf_list_9BytesList_5__setslice__(o, i, j, v);
  }
  else {
    if ((&PyList_Type)->tp_as_sequence && (&PyList_Type)->tp_as_sequence->sq_ass_slice)
      return (&PyList_Type)->tp_as_sequence->sq_ass_slice(o, i, j, v);
    PyErr_Format(PyExc_NotImplementedError,
      "2-element slice deletion not supported by %.200s", Py_TYPE(o)->tp_name);
    return -1;
  }
}

static PyMethodDef __pyx_methods_12pyrobuf_list_BytesList[] = {
  {"append", (PyCFunction)__pyx_pw_12pyrobuf_list_9BytesList_7append, METH_O, 0},
  {"extend", (PyCFunction)__pyx_pw_12pyrobuf_list_9BytesList_9extend, METH_O, 0},
  {"insert", (PyCFunction)__pyx_pw_12pyrobuf_list_9BytesList_11insert, METH_VARARGS|METH_KEYWORDS, 0},
  {0, 0, 0, 0}
};

static PySequenceMethods __pyx_tp_as_sequence_BytesList = {
  0, /*sq_length*/
  0, /*sq_concat*/
  0, /*sq_repeat*/
  0, /*sq_item*/
  0, /*sq_slice*/
  0, /*sq_ass_item*/
  __pyx_sq_ass_slice_12pyrobuf_list_BytesList, /*sq_ass_slice*/
  0, /*sq_contains*/
  0, /*sq_inplace_concat*/
  0, /*sq_inplace_repeat*/
};

static PyMappingMethods __pyx_tp_as_mapping_BytesList = {
  0, /*mp_length*/
  0, /*mp_subscript*/
  __pyx_mp_ass_subscript_12pyrobuf_list_BytesList, /*mp_ass_subscript*/
};

static PyTypeObject __pyx_type_12pyrobuf_list_BytesList = {
  PyVarObject_HEAD_INIT(0, 0)
  "pyrobuf_list.BytesList", /*tp_name*/
  sizeof(struct __pyx_obj_12pyrobuf_list_BytesList), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_12pyrobuf_list_BytesList, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  &__pyx_tp_as_sequence_BytesList, /*tp_as_sequence*/
  &__pyx_tp_as_mapping_BytesList, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_12pyrobuf_list_BytesList, /*tp_traverse*/
  __pyx_tp_clear_12pyrobuf_list_BytesList, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_12pyrobuf_list_BytesList, /*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_pw_12pyrobuf_list_9BytesList_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_12pyrobuf_list_BytesList, /*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*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};

static PyObject *__pyx_tp_new_12pyrobuf_list_StringList(PyTypeObject *t, PyObject *a, PyObject *k) {
  PyObject *o = (&PyList_Type)->tp_new(t, a, k);
  if (unlikely(!o)) return 0;
  return o;
}

static void __pyx_tp_dealloc_12pyrobuf_list_StringList(PyObject *o) {
  #if PY_VERSION_HEX >= 0x030400a1
  if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  PyObject_GC_UnTrack(o);
  PyObject_GC_Track(o);
  (&PyList_Type)->tp_dealloc(o);
}

static int __pyx_tp_traverse_12pyrobuf_list_StringList(PyObject *o, visitproc v, void *a) {
  int e;
  if (!(&PyList_Type)->tp_traverse); else { e = (&PyList_Type)->tp_traverse(o,v,a); if (e) return e; }
  return 0;
}

static int __pyx_tp_clear_12pyrobuf_list_StringList(PyObject *o) {
  if (!(&PyList_Type)->tp_clear); else (&PyList_Type)->tp_clear(o);
  return 0;
}

static int __pyx_mp_ass_subscript_12pyrobuf_list_StringList(PyObject *o, PyObject *i, PyObject *v) {
  if (v) {
    return __pyx_pw_12pyrobuf_list_10StringList_3__setitem__(o, i, v);
  }
  else {
    if ((&PyList_Type)->tp_as_mapping && (&PyList_Type)->tp_as_mapping->mp_ass_subscript)
      return (&PyList_Type)->tp_as_mapping->mp_ass_subscript(o, i, v);
    PyErr_Format(PyExc_NotImplementedError,
      "Subscript deletion not supported by %.200s", Py_TYPE(o)->tp_name);
    return -1;
  }
}
#if PY_MAJOR_VERSION >= 3
#error __getslice__, __setslice__, and __delslice__ not supported in Python 3.
#endif

static int __pyx_sq_ass_slice_12pyrobuf_list_StringList(PyObject *o, Py_ssize_t i, Py_ssize_t j, PyObject *v) {
  if (v) {
    return __pyx_pw_12pyrobuf_list_10StringList_5__setslice__(o, i, j, v);
  }
  else {
    if ((&PyList_Type)->tp_as_sequence && (&PyList_Type)->tp_as_sequence->sq_ass_slice)
      return (&PyList_Type)->tp_as_sequence->sq_ass_slice(o, i, j, v);
    PyErr_Format(PyExc_NotImplementedError,
      "2-element slice deletion not supported by %.200s", Py_TYPE(o)->tp_name);
    return -1;
  }
}

static PyMethodDef __pyx_methods_12pyrobuf_list_StringList[] = {
  {"append", (PyCFunction)__pyx_pw_12pyrobuf_list_10StringList_7append, METH_O, 0},
  {"extend", (PyCFunction)__pyx_pw_12pyrobuf_list_10StringList_9extend, METH_O, 0},
  {"insert", (PyCFunction)__pyx_pw_12pyrobuf_list_10StringList_11insert, METH_VARARGS|METH_KEYWORDS, 0},
  {0, 0, 0, 0}
};

static PySequenceMethods __pyx_tp_as_sequence_StringList = {
  0, /*sq_length*/
  0, /*sq_concat*/
  0, /*sq_repeat*/
  0, /*sq_item*/
  0, /*sq_slice*/
  0, /*sq_ass_item*/
  __pyx_sq_ass_slice_12pyrobuf_list_StringList, /*sq_ass_slice*/
  0, /*sq_contains*/
  0, /*sq_inplace_concat*/
  0, /*sq_inplace_repeat*/
};

static PyMappingMethods __pyx_tp_as_mapping_StringList = {
  0, /*mp_length*/
  0, /*mp_subscript*/
  __pyx_mp_ass_subscript_12pyrobuf_list_StringList, /*mp_ass_subscript*/
};

static PyTypeObject __pyx_type_12pyrobuf_list_StringList = {
  PyVarObject_HEAD_INIT(0, 0)
  "pyrobuf_list.StringList", /*tp_name*/
  sizeof(struct __pyx_obj_12pyrobuf_list_StringList), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_12pyrobuf_list_StringList, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  &__pyx_tp_as_sequence_StringList, /*tp_as_sequence*/
  &__pyx_tp_as_mapping_StringList, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_12pyrobuf_list_StringList, /*tp_traverse*/
  __pyx_tp_clear_12pyrobuf_list_StringList, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_12pyrobuf_list_StringList, /*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_pw_12pyrobuf_list_10StringList_1__init__, /*tp_init*/
  0, /*tp_alloc*/
  __pyx_tp_new_12pyrobuf_list_StringList, /*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*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};
static struct __pyx_vtabstruct_12pyrobuf_list_Int64List __pyx_vtable_12pyrobuf_list_Int64List;

static PyObject *__pyx_tp_new_12pyrobuf_list_Int64List(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_12pyrobuf_list_Int64List *p;
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_12pyrobuf_list_Int64List *)o);
  p->__pyx_vtab = __pyx_vtabptr_12pyrobuf_list_Int64List;
  if (unlikely(__pyx_pw_12pyrobuf_list_9Int64List_1__cinit__(o, a, k) < 0)) {
    Py_DECREF(o); o = 0;
  }
  return o;
}

static void __pyx_tp_dealloc_12pyrobuf_list_Int64List(PyObject *o) {
  #if PY_VERSION_HEX >= 0x030400a1
  if (unlikely(Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    ++Py_REFCNT(o);
    __pyx_pw_12pyrobuf_list_9Int64List_3__dealloc__(o);
    --Py_REFCNT(o);
    PyErr_Restore(etype, eval, etb);
  }
  (*Py_TYPE(o)->tp_free)(o);
}
static PyObject *__pyx_sq_item_12pyrobuf_list_Int64List(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_12pyrobuf_list_Int64List(PyObject *o, PyObject *i, PyObject *v) {
  if (v) {
    return __pyx_pw_12pyrobuf_list_9Int64List_18__setitem__(o, i, v);
  }
  else {
    return __pyx_pw_12pyrobuf_list_9Int64List_7__delitem__(o, i);
  }
}

static PyMethodDef __pyx_methods_12pyrobuf_list_Int64List[] = {
  {"append", (PyCFunction)__pyx_pw_12pyrobuf_list_9Int64List_26append, METH_O, 0},
  {"extend", (PyCFunction)__pyx_pw_12pyrobuf_list_9Int64List_28extend, METH_O, 0},
  {"insert", (PyCFunction)__pyx_pw_12pyrobuf_list_9Int64List_30insert, METH_VARARGS|METH_KEYWORDS, 0},
  {"pop", (PyCFunction)__pyx_pw_12pyrobuf_list_9Int64List_32pop, METH_NOARGS, 0},
  {"remove", (PyCFunction)__pyx_pw_12pyrobuf_list_9Int64List_34remove, METH_O, 0},
  {0, 0, 0, 0}
};

static PySequenceMethods __pyx_tp_as_sequence_Int64List = {
  __pyx_pw_12pyrobuf_list_9Int64List_14__len__, /*sq_length*/
  0, /*sq_concat*/
  0, /*sq_repeat*/
  __pyx_sq_item_12pyrobuf_list_Int64List, /*sq_item*/
  0, /*sq_slice*/
  0, /*sq_ass_item*/
  0, /*sq_ass_slice*/
  __pyx_pw_12pyrobuf_list_9Int64List_5__contains__, /*sq_contains*/
  0, /*sq_inplace_concat*/
  0, /*sq_inplace_repeat*/
};

static PyMappingMethods __pyx_tp_as_mapping_Int64List = {
  __pyx_pw_12pyrobuf_list_9Int64List_14__len__, /*mp_length*/
  __pyx_pw_12pyrobuf_list_9Int64List_9__getitem__, /*mp_subscript*/
  __pyx_mp_ass_subscript_12pyrobuf_list_Int64List, /*mp_ass_subscript*/
};

static PyBufferProcs __pyx_tp_as_buffer_Int64List = {
  #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
  __pyx_pw_12pyrobuf_list_9Int64List_22__getbuffer__, /*bf_getbuffer*/
  __pyx_pw_12pyrobuf_list_9Int64List_24__releasebuffer__, /*bf_releasebuffer*/
};

static PyTypeObject __pyx_type_12pyrobuf_list_Int64List = {
  PyVarObject_HEAD_INIT(0, 0)
  "pyrobuf_list.Int64List", /*tp_name*/
  sizeof(struct __pyx_obj_12pyrobuf_list_Int64List), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_12pyrobuf_list_Int64List, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_pw_12pyrobuf_list_9Int64List_16__repr__, /*tp_repr*/
  0, /*tp_as_number*/
  &__pyx_tp_as_sequence_Int64List, /*tp_as_sequence*/
  &__pyx_tp_as_mapping_Int64List, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  __pyx_pw_12pyrobuf_list_9Int64List_20__str__, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  &__pyx_tp_as_buffer_Int64List, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|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_pw_12pyrobuf_list_9Int64List_11__iter__, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_12pyrobuf_list_Int64List, /*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_12pyrobuf_list_Int64List, /*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*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};
static struct __pyx_vtabstruct_12pyrobuf_list_Uint64List __pyx_vtable_12pyrobuf_list_Uint64List;

static PyObject *__pyx_tp_new_12pyrobuf_list_Uint64List(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_12pyrobuf_list_Uint64List *p;
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_12pyrobuf_list_Uint64List *)o);
  p->__pyx_vtab = __pyx_vtabptr_12pyrobuf_list_Uint64List;
  if (unlikely(__pyx_pw_12pyrobuf_list_10Uint64List_1__cinit__(o, a, k) < 0)) {
    Py_DECREF(o); o = 0;
  }
  return o;
}

static void __pyx_tp_dealloc_12pyrobuf_list_Uint64List(PyObject *o) {
  #if PY_VERSION_HEX >= 0x030400a1
  if (unlikely(Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    ++Py_REFCNT(o);
    __pyx_pw_12pyrobuf_list_10Uint64List_3__dealloc__(o);
    --Py_REFCNT(o);
    PyErr_Restore(etype, eval, etb);
  }
  (*Py_TYPE(o)->tp_free)(o);
}
static PyObject *__pyx_sq_item_12pyrobuf_list_Uint64List(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_12pyrobuf_list_Uint64List(PyObject *o, PyObject *i, PyObject *v) {
  if (v) {
    return __pyx_pw_12pyrobuf_list_10Uint64List_18__setitem__(o, i, v);
  }
  else {
    return __pyx_pw_12pyrobuf_list_10Uint64List_7__delitem__(o, i);
  }
}

static PyMethodDef __pyx_methods_12pyrobuf_list_Uint64List[] = {
  {"append", (PyCFunction)__pyx_pw_12pyrobuf_list_10Uint64List_26append, METH_O, 0},
  {"extend", (PyCFunction)__pyx_pw_12pyrobuf_list_10Uint64List_28extend, METH_O, 0},
  {"insert", (PyCFunction)__pyx_pw_12pyrobuf_list_10Uint64List_30insert, METH_VARARGS|METH_KEYWORDS, 0},
  {"pop", (PyCFunction)__pyx_pw_12pyrobuf_list_10Uint64List_32pop, METH_NOARGS, 0},
  {"remove", (PyCFunction)__pyx_pw_12pyrobuf_list_10Uint64List_34remove, METH_O, 0},
  {0, 0, 0, 0}
};

static PySequenceMethods __pyx_tp_as_sequence_Uint64List = {
  __pyx_pw_12pyrobuf_list_10Uint64List_14__len__, /*sq_length*/
  0, /*sq_concat*/
  0, /*sq_repeat*/
  __pyx_sq_item_12pyrobuf_list_Uint64List, /*sq_item*/
  0, /*sq_slice*/
  0, /*sq_ass_item*/
  0, /*sq_ass_slice*/
  __pyx_pw_12pyrobuf_list_10Uint64List_5__contains__, /*sq_contains*/
  0, /*sq_inplace_concat*/
  0, /*sq_inplace_repeat*/
};

static PyMappingMethods __pyx_tp_as_mapping_Uint64List = {
  __pyx_pw_12pyrobuf_list_10Uint64List_14__len__, /*mp_length*/
  __pyx_pw_12pyrobuf_list_10Uint64List_9__getitem__, /*mp_subscript*/
  __pyx_mp_ass_subscript_12pyrobuf_list_Uint64List, /*mp_ass_subscript*/
};

static PyBufferProcs __pyx_tp_as_buffer_Uint64List = {
  #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
  __pyx_pw_12pyrobuf_list_10Uint64List_22__getbuffer__, /*bf_getbuffer*/
  __pyx_pw_12pyrobuf_list_10Uint64List_24__releasebuffer__, /*bf_releasebuffer*/
};

static PyTypeObject __pyx_type_12pyrobuf_list_Uint64List = {
  PyVarObject_HEAD_INIT(0, 0)
  "pyrobuf_list.Uint64List", /*tp_name*/
  sizeof(struct __pyx_obj_12pyrobuf_list_Uint64List), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_12pyrobuf_list_Uint64List, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_pw_12pyrobuf_list_10Uint64List_16__repr__, /*tp_repr*/
  0, /*tp_as_number*/
  &__pyx_tp_as_sequence_Uint64List, /*tp_as_sequence*/
  &__pyx_tp_as_mapping_Uint64List, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  __pyx_pw_12pyrobuf_list_10Uint64List_20__str__, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  &__pyx_tp_as_buffer_Uint64List, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|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_pw_12pyrobuf_list_10Uint64List_11__iter__, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_12pyrobuf_list_Uint64List, /*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_12pyrobuf_list_Uint64List, /*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*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};
static struct __pyx_vtabstruct_12pyrobuf_list_CharList __pyx_vtable_12pyrobuf_list_CharList;

static PyObject *__pyx_tp_new_12pyrobuf_list_CharList(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_12pyrobuf_list_CharList *p;
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_12pyrobuf_list_CharList *)o);
  p->__pyx_vtab = __pyx_vtabptr_12pyrobuf_list_CharList;
  if (unlikely(__pyx_pw_12pyrobuf_list_8CharList_1__cinit__(o, a, k) < 0)) {
    Py_DECREF(o); o = 0;
  }
  return o;
}

static void __pyx_tp_dealloc_12pyrobuf_list_CharList(PyObject *o) {
  #if PY_VERSION_HEX >= 0x030400a1
  if (unlikely(Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    ++Py_REFCNT(o);
    __pyx_pw_12pyrobuf_list_8CharList_3__dealloc__(o);
    --Py_REFCNT(o);
    PyErr_Restore(etype, eval, etb);
  }
  (*Py_TYPE(o)->tp_free)(o);
}
static PyObject *__pyx_sq_item_12pyrobuf_list_CharList(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_12pyrobuf_list_CharList(PyObject *o, PyObject *i, PyObject *v) {
  if (v) {
    return __pyx_pw_12pyrobuf_list_8CharList_18__setitem__(o, i, v);
  }
  else {
    return __pyx_pw_12pyrobuf_list_8CharList_7__delitem__(o, i);
  }
}

static PyMethodDef __pyx_methods_12pyrobuf_list_CharList[] = {
  {"append", (PyCFunction)__pyx_pw_12pyrobuf_list_8CharList_26append, METH_O, 0},
  {"extend", (PyCFunction)__pyx_pw_12pyrobuf_list_8CharList_28extend, METH_O, 0},
  {"insert", (PyCFunction)__pyx_pw_12pyrobuf_list_8CharList_30insert, METH_VARARGS|METH_KEYWORDS, 0},
  {"pop", (PyCFunction)__pyx_pw_12pyrobuf_list_8CharList_32pop, METH_NOARGS, 0},
  {"remove", (PyCFunction)__pyx_pw_12pyrobuf_list_8CharList_34remove, METH_O, 0},
  {0, 0, 0, 0}
};

static PySequenceMethods __pyx_tp_as_sequence_CharList = {
  __pyx_pw_12pyrobuf_list_8CharList_14__len__, /*sq_length*/
  0, /*sq_concat*/
  0, /*sq_repeat*/
  __pyx_sq_item_12pyrobuf_list_CharList, /*sq_item*/
  0, /*sq_slice*/
  0, /*sq_ass_item*/
  0, /*sq_ass_slice*/
  __pyx_pw_12pyrobuf_list_8CharList_5__contains__, /*sq_contains*/
  0, /*sq_inplace_concat*/
  0, /*sq_inplace_repeat*/
};

static PyMappingMethods __pyx_tp_as_mapping_CharList = {
  __pyx_pw_12pyrobuf_list_8CharList_14__len__, /*mp_length*/
  __pyx_pw_12pyrobuf_list_8CharList_9__getitem__, /*mp_subscript*/
  __pyx_mp_ass_subscript_12pyrobuf_list_CharList, /*mp_ass_subscript*/
};

static PyBufferProcs __pyx_tp_as_buffer_CharList = {
  #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
  __pyx_pw_12pyrobuf_list_8CharList_22__getbuffer__, /*bf_getbuffer*/
  __pyx_pw_12pyrobuf_list_8CharList_24__releasebuffer__, /*bf_releasebuffer*/
};

static PyTypeObject __pyx_type_12pyrobuf_list_CharList = {
  PyVarObject_HEAD_INIT(0, 0)
  "pyrobuf_list.CharList", /*tp_name*/
  sizeof(struct __pyx_obj_12pyrobuf_list_CharList), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_12pyrobuf_list_CharList, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_pw_12pyrobuf_list_8CharList_16__repr__, /*tp_repr*/
  0, /*tp_as_number*/
  &__pyx_tp_as_sequence_CharList, /*tp_as_sequence*/
  &__pyx_tp_as_mapping_CharList, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  __pyx_pw_12pyrobuf_list_8CharList_20__str__, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  &__pyx_tp_as_buffer_CharList, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|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_pw_12pyrobuf_list_8CharList_11__iter__, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_12pyrobuf_list_CharList, /*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_12pyrobuf_list_CharList, /*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*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};
static struct __pyx_vtabstruct_12pyrobuf_list_Int32List __pyx_vtable_12pyrobuf_list_Int32List;

static PyObject *__pyx_tp_new_12pyrobuf_list_Int32List(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_12pyrobuf_list_Int32List *p;
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_12pyrobuf_list_Int32List *)o);
  p->__pyx_vtab = __pyx_vtabptr_12pyrobuf_list_Int32List;
  if (unlikely(__pyx_pw_12pyrobuf_list_9Int32List_1__cinit__(o, a, k) < 0)) {
    Py_DECREF(o); o = 0;
  }
  return o;
}

static void __pyx_tp_dealloc_12pyrobuf_list_Int32List(PyObject *o) {
  #if PY_VERSION_HEX >= 0x030400a1
  if (unlikely(Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    ++Py_REFCNT(o);
    __pyx_pw_12pyrobuf_list_9Int32List_3__dealloc__(o);
    --Py_REFCNT(o);
    PyErr_Restore(etype, eval, etb);
  }
  (*Py_TYPE(o)->tp_free)(o);
}
static PyObject *__pyx_sq_item_12pyrobuf_list_Int32List(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_12pyrobuf_list_Int32List(PyObject *o, PyObject *i, PyObject *v) {
  if (v) {
    return __pyx_pw_12pyrobuf_list_9Int32List_18__setitem__(o, i, v);
  }
  else {
    return __pyx_pw_12pyrobuf_list_9Int32List_7__delitem__(o, i);
  }
}

static PyMethodDef __pyx_methods_12pyrobuf_list_Int32List[] = {
  {"append", (PyCFunction)__pyx_pw_12pyrobuf_list_9Int32List_26append, METH_O, 0},
  {"extend", (PyCFunction)__pyx_pw_12pyrobuf_list_9Int32List_28extend, METH_O, 0},
  {"insert", (PyCFunction)__pyx_pw_12pyrobuf_list_9Int32List_30insert, METH_VARARGS|METH_KEYWORDS, 0},
  {"pop", (PyCFunction)__pyx_pw_12pyrobuf_list_9Int32List_32pop, METH_NOARGS, 0},
  {"remove", (PyCFunction)__pyx_pw_12pyrobuf_list_9Int32List_34remove, METH_O, 0},
  {0, 0, 0, 0}
};

static PySequenceMethods __pyx_tp_as_sequence_Int32List = {
  __pyx_pw_12pyrobuf_list_9Int32List_14__len__, /*sq_length*/
  0, /*sq_concat*/
  0, /*sq_repeat*/
  __pyx_sq_item_12pyrobuf_list_Int32List, /*sq_item*/
  0, /*sq_slice*/
  0, /*sq_ass_item*/
  0, /*sq_ass_slice*/
  __pyx_pw_12pyrobuf_list_9Int32List_5__contains__, /*sq_contains*/
  0, /*sq_inplace_concat*/
  0, /*sq_inplace_repeat*/
};

static PyMappingMethods __pyx_tp_as_mapping_Int32List = {
  __pyx_pw_12pyrobuf_list_9Int32List_14__len__, /*mp_length*/
  __pyx_pw_12pyrobuf_list_9Int32List_9__getitem__, /*mp_subscript*/
  __pyx_mp_ass_subscript_12pyrobuf_list_Int32List, /*mp_ass_subscript*/
};

static PyBufferProcs __pyx_tp_as_buffer_Int32List = {
  #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
  __pyx_pw_12pyrobuf_list_9Int32List_22__getbuffer__, /*bf_getbuffer*/
  __pyx_pw_12pyrobuf_list_9Int32List_24__releasebuffer__, /*bf_releasebuffer*/
};

static PyTypeObject __pyx_type_12pyrobuf_list_Int32List = {
  PyVarObject_HEAD_INIT(0, 0)
  "pyrobuf_list.Int32List", /*tp_name*/
  sizeof(struct __pyx_obj_12pyrobuf_list_Int32List), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_12pyrobuf_list_Int32List, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_pw_12pyrobuf_list_9Int32List_16__repr__, /*tp_repr*/
  0, /*tp_as_number*/
  &__pyx_tp_as_sequence_Int32List, /*tp_as_sequence*/
  &__pyx_tp_as_mapping_Int32List, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  __pyx_pw_12pyrobuf_list_9Int32List_20__str__, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  &__pyx_tp_as_buffer_Int32List, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|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_pw_12pyrobuf_list_9Int32List_11__iter__, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_12pyrobuf_list_Int32List, /*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_12pyrobuf_list_Int32List, /*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*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};
static struct __pyx_vtabstruct_12pyrobuf_list_IntList __pyx_vtable_12pyrobuf_list_IntList;

static PyObject *__pyx_tp_new_12pyrobuf_list_IntList(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_12pyrobuf_list_IntList *p;
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_12pyrobuf_list_IntList *)o);
  p->__pyx_vtab = __pyx_vtabptr_12pyrobuf_list_IntList;
  if (unlikely(__pyx_pw_12pyrobuf_list_7IntList_1__cinit__(o, a, k) < 0)) {
    Py_DECREF(o); o = 0;
  }
  return o;
}

static void __pyx_tp_dealloc_12pyrobuf_list_IntList(PyObject *o) {
  #if PY_VERSION_HEX >= 0x030400a1
  if (unlikely(Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    ++Py_REFCNT(o);
    __pyx_pw_12pyrobuf_list_7IntList_3__dealloc__(o);
    --Py_REFCNT(o);
    PyErr_Restore(etype, eval, etb);
  }
  (*Py_TYPE(o)->tp_free)(o);
}
static PyObject *__pyx_sq_item_12pyrobuf_list_IntList(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_12pyrobuf_list_IntList(PyObject *o, PyObject *i, PyObject *v) {
  if (v) {
    return __pyx_pw_12pyrobuf_list_7IntList_18__setitem__(o, i, v);
  }
  else {
    return __pyx_pw_12pyrobuf_list_7IntList_7__delitem__(o, i);
  }
}

static PyMethodDef __pyx_methods_12pyrobuf_list_IntList[] = {
  {"append", (PyCFunction)__pyx_pw_12pyrobuf_list_7IntList_26append, METH_O, 0},
  {"extend", (PyCFunction)__pyx_pw_12pyrobuf_list_7IntList_28extend, METH_O, 0},
  {"insert", (PyCFunction)__pyx_pw_12pyrobuf_list_7IntList_30insert, METH_VARARGS|METH_KEYWORDS, 0},
  {"pop", (PyCFunction)__pyx_pw_12pyrobuf_list_7IntList_32pop, METH_NOARGS, 0},
  {"remove", (PyCFunction)__pyx_pw_12pyrobuf_list_7IntList_34remove, METH_O, 0},
  {0, 0, 0, 0}
};

static PySequenceMethods __pyx_tp_as_sequence_IntList = {
  __pyx_pw_12pyrobuf_list_7IntList_14__len__, /*sq_length*/
  0, /*sq_concat*/
  0, /*sq_repeat*/
  __pyx_sq_item_12pyrobuf_list_IntList, /*sq_item*/
  0, /*sq_slice*/
  0, /*sq_ass_item*/
  0, /*sq_ass_slice*/
  __pyx_pw_12pyrobuf_list_7IntList_5__contains__, /*sq_contains*/
  0, /*sq_inplace_concat*/
  0, /*sq_inplace_repeat*/
};

static PyMappingMethods __pyx_tp_as_mapping_IntList = {
  __pyx_pw_12pyrobuf_list_7IntList_14__len__, /*mp_length*/
  __pyx_pw_12pyrobuf_list_7IntList_9__getitem__, /*mp_subscript*/
  __pyx_mp_ass_subscript_12pyrobuf_list_IntList, /*mp_ass_subscript*/
};

static PyBufferProcs __pyx_tp_as_buffer_IntList = {
  #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
  __pyx_pw_12pyrobuf_list_7IntList_22__getbuffer__, /*bf_getbuffer*/
  __pyx_pw_12pyrobuf_list_7IntList_24__releasebuffer__, /*bf_releasebuffer*/
};

static PyTypeObject __pyx_type_12pyrobuf_list_IntList = {
  PyVarObject_HEAD_INIT(0, 0)
  "pyrobuf_list.IntList", /*tp_name*/
  sizeof(struct __pyx_obj_12pyrobuf_list_IntList), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_12pyrobuf_list_IntList, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_pw_12pyrobuf_list_7IntList_16__repr__, /*tp_repr*/
  0, /*tp_as_number*/
  &__pyx_tp_as_sequence_IntList, /*tp_as_sequence*/
  &__pyx_tp_as_mapping_IntList, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  __pyx_pw_12pyrobuf_list_7IntList_20__str__, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  &__pyx_tp_as_buffer_IntList, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|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_pw_12pyrobuf_list_7IntList_11__iter__, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_12pyrobuf_list_IntList, /*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_12pyrobuf_list_IntList, /*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*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};
static struct __pyx_vtabstruct_12pyrobuf_list_DoubleList __pyx_vtable_12pyrobuf_list_DoubleList;

static PyObject *__pyx_tp_new_12pyrobuf_list_DoubleList(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_12pyrobuf_list_DoubleList *p;
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_12pyrobuf_list_DoubleList *)o);
  p->__pyx_vtab = __pyx_vtabptr_12pyrobuf_list_DoubleList;
  if (unlikely(__pyx_pw_12pyrobuf_list_10DoubleList_1__cinit__(o, a, k) < 0)) {
    Py_DECREF(o); o = 0;
  }
  return o;
}

static void __pyx_tp_dealloc_12pyrobuf_list_DoubleList(PyObject *o) {
  #if PY_VERSION_HEX >= 0x030400a1
  if (unlikely(Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    ++Py_REFCNT(o);
    __pyx_pw_12pyrobuf_list_10DoubleList_3__dealloc__(o);
    --Py_REFCNT(o);
    PyErr_Restore(etype, eval, etb);
  }
  (*Py_TYPE(o)->tp_free)(o);
}
static PyObject *__pyx_sq_item_12pyrobuf_list_DoubleList(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_12pyrobuf_list_DoubleList(PyObject *o, PyObject *i, PyObject *v) {
  if (v) {
    return __pyx_pw_12pyrobuf_list_10DoubleList_18__setitem__(o, i, v);
  }
  else {
    return __pyx_pw_12pyrobuf_list_10DoubleList_7__delitem__(o, i);
  }
}

static PyMethodDef __pyx_methods_12pyrobuf_list_DoubleList[] = {
  {"append", (PyCFunction)__pyx_pw_12pyrobuf_list_10DoubleList_26append, METH_O, 0},
  {"extend", (PyCFunction)__pyx_pw_12pyrobuf_list_10DoubleList_28extend, METH_O, 0},
  {"insert", (PyCFunction)__pyx_pw_12pyrobuf_list_10DoubleList_30insert, METH_VARARGS|METH_KEYWORDS, 0},
  {"pop", (PyCFunction)__pyx_pw_12pyrobuf_list_10DoubleList_32pop, METH_NOARGS, 0},
  {"remove", (PyCFunction)__pyx_pw_12pyrobuf_list_10DoubleList_34remove, METH_O, 0},
  {0, 0, 0, 0}
};

static PySequenceMethods __pyx_tp_as_sequence_DoubleList = {
  __pyx_pw_12pyrobuf_list_10DoubleList_14__len__, /*sq_length*/
  0, /*sq_concat*/
  0, /*sq_repeat*/
  __pyx_sq_item_12pyrobuf_list_DoubleList, /*sq_item*/
  0, /*sq_slice*/
  0, /*sq_ass_item*/
  0, /*sq_ass_slice*/
  __pyx_pw_12pyrobuf_list_10DoubleList_5__contains__, /*sq_contains*/
  0, /*sq_inplace_concat*/
  0, /*sq_inplace_repeat*/
};

static PyMappingMethods __pyx_tp_as_mapping_DoubleList = {
  __pyx_pw_12pyrobuf_list_10DoubleList_14__len__, /*mp_length*/
  __pyx_pw_12pyrobuf_list_10DoubleList_9__getitem__, /*mp_subscript*/
  __pyx_mp_ass_subscript_12pyrobuf_list_DoubleList, /*mp_ass_subscript*/
};

static PyBufferProcs __pyx_tp_as_buffer_DoubleList = {
  #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
  __pyx_pw_12pyrobuf_list_10DoubleList_22__getbuffer__, /*bf_getbuffer*/
  __pyx_pw_12pyrobuf_list_10DoubleList_24__releasebuffer__, /*bf_releasebuffer*/
};

static PyTypeObject __pyx_type_12pyrobuf_list_DoubleList = {
  PyVarObject_HEAD_INIT(0, 0)
  "pyrobuf_list.DoubleList", /*tp_name*/
  sizeof(struct __pyx_obj_12pyrobuf_list_DoubleList), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_12pyrobuf_list_DoubleList, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_pw_12pyrobuf_list_10DoubleList_16__repr__, /*tp_repr*/
  0, /*tp_as_number*/
  &__pyx_tp_as_sequence_DoubleList, /*tp_as_sequence*/
  &__pyx_tp_as_mapping_DoubleList, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  __pyx_pw_12pyrobuf_list_10DoubleList_20__str__, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  &__pyx_tp_as_buffer_DoubleList, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|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_pw_12pyrobuf_list_10DoubleList_11__iter__, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_12pyrobuf_list_DoubleList, /*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_12pyrobuf_list_DoubleList, /*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*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};
static struct __pyx_vtabstruct_12pyrobuf_list_FloatList __pyx_vtable_12pyrobuf_list_FloatList;

static PyObject *__pyx_tp_new_12pyrobuf_list_FloatList(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_12pyrobuf_list_FloatList *p;
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_12pyrobuf_list_FloatList *)o);
  p->__pyx_vtab = __pyx_vtabptr_12pyrobuf_list_FloatList;
  if (unlikely(__pyx_pw_12pyrobuf_list_9FloatList_1__cinit__(o, a, k) < 0)) {
    Py_DECREF(o); o = 0;
  }
  return o;
}

static void __pyx_tp_dealloc_12pyrobuf_list_FloatList(PyObject *o) {
  #if PY_VERSION_HEX >= 0x030400a1
  if (unlikely(Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    ++Py_REFCNT(o);
    __pyx_pw_12pyrobuf_list_9FloatList_3__dealloc__(o);
    --Py_REFCNT(o);
    PyErr_Restore(etype, eval, etb);
  }
  (*Py_TYPE(o)->tp_free)(o);
}
static PyObject *__pyx_sq_item_12pyrobuf_list_FloatList(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_12pyrobuf_list_FloatList(PyObject *o, PyObject *i, PyObject *v) {
  if (v) {
    return __pyx_pw_12pyrobuf_list_9FloatList_18__setitem__(o, i, v);
  }
  else {
    return __pyx_pw_12pyrobuf_list_9FloatList_7__delitem__(o, i);
  }
}

static PyMethodDef __pyx_methods_12pyrobuf_list_FloatList[] = {
  {"append", (PyCFunction)__pyx_pw_12pyrobuf_list_9FloatList_26append, METH_O, 0},
  {"extend", (PyCFunction)__pyx_pw_12pyrobuf_list_9FloatList_28extend, METH_O, 0},
  {"insert", (PyCFunction)__pyx_pw_12pyrobuf_list_9FloatList_30insert, METH_VARARGS|METH_KEYWORDS, 0},
  {"pop", (PyCFunction)__pyx_pw_12pyrobuf_list_9FloatList_32pop, METH_NOARGS, 0},
  {"remove", (PyCFunction)__pyx_pw_12pyrobuf_list_9FloatList_34remove, METH_O, 0},
  {0, 0, 0, 0}
};

static PySequenceMethods __pyx_tp_as_sequence_FloatList = {
  __pyx_pw_12pyrobuf_list_9FloatList_14__len__, /*sq_length*/
  0, /*sq_concat*/
  0, /*sq_repeat*/
  __pyx_sq_item_12pyrobuf_list_FloatList, /*sq_item*/
  0, /*sq_slice*/
  0, /*sq_ass_item*/
  0, /*sq_ass_slice*/
  __pyx_pw_12pyrobuf_list_9FloatList_5__contains__, /*sq_contains*/
  0, /*sq_inplace_concat*/
  0, /*sq_inplace_repeat*/
};

static PyMappingMethods __pyx_tp_as_mapping_FloatList = {
  __pyx_pw_12pyrobuf_list_9FloatList_14__len__, /*mp_length*/
  __pyx_pw_12pyrobuf_list_9FloatList_9__getitem__, /*mp_subscript*/
  __pyx_mp_ass_subscript_12pyrobuf_list_FloatList, /*mp_ass_subscript*/
};

static PyBufferProcs __pyx_tp_as_buffer_FloatList = {
  #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
  __pyx_pw_12pyrobuf_list_9FloatList_22__getbuffer__, /*bf_getbuffer*/
  __pyx_pw_12pyrobuf_list_9FloatList_24__releasebuffer__, /*bf_releasebuffer*/
};

static PyTypeObject __pyx_type_12pyrobuf_list_FloatList = {
  PyVarObject_HEAD_INIT(0, 0)
  "pyrobuf_list.FloatList", /*tp_name*/
  sizeof(struct __pyx_obj_12pyrobuf_list_FloatList), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_12pyrobuf_list_FloatList, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_pw_12pyrobuf_list_9FloatList_16__repr__, /*tp_repr*/
  0, /*tp_as_number*/
  &__pyx_tp_as_sequence_FloatList, /*tp_as_sequence*/
  &__pyx_tp_as_mapping_FloatList, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  __pyx_pw_12pyrobuf_list_9FloatList_20__str__, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  &__pyx_tp_as_buffer_FloatList, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|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_pw_12pyrobuf_list_9FloatList_11__iter__, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_12pyrobuf_list_FloatList, /*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_12pyrobuf_list_FloatList, /*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*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};
static struct __pyx_vtabstruct_12pyrobuf_list_Uint32List __pyx_vtable_12pyrobuf_list_Uint32List;

static PyObject *__pyx_tp_new_12pyrobuf_list_Uint32List(PyTypeObject *t, PyObject *a, PyObject *k) {
  struct __pyx_obj_12pyrobuf_list_Uint32List *p;
  PyObject *o;
  if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) {
    o = (*t->tp_alloc)(t, 0);
  } else {
    o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0);
  }
  if (unlikely(!o)) return 0;
  p = ((struct __pyx_obj_12pyrobuf_list_Uint32List *)o);
  p->__pyx_vtab = __pyx_vtabptr_12pyrobuf_list_Uint32List;
  if (unlikely(__pyx_pw_12pyrobuf_list_10Uint32List_1__cinit__(o, a, k) < 0)) {
    Py_DECREF(o); o = 0;
  }
  return o;
}

static void __pyx_tp_dealloc_12pyrobuf_list_Uint32List(PyObject *o) {
  #if PY_VERSION_HEX >= 0x030400a1
  if (unlikely(Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) {
    if (PyObject_CallFinalizerFromDealloc(o)) return;
  }
  #endif
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    ++Py_REFCNT(o);
    __pyx_pw_12pyrobuf_list_10Uint32List_3__dealloc__(o);
    --Py_REFCNT(o);
    PyErr_Restore(etype, eval, etb);
  }
  (*Py_TYPE(o)->tp_free)(o);
}
static PyObject *__pyx_sq_item_12pyrobuf_list_Uint32List(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_12pyrobuf_list_Uint32List(PyObject *o, PyObject *i, PyObject *v) {
  if (v) {
    return __pyx_pw_12pyrobuf_list_10Uint32List_18__setitem__(o, i, v);
  }
  else {
    return __pyx_pw_12pyrobuf_list_10Uint32List_7__delitem__(o, i);
  }
}

static PyMethodDef __pyx_methods_12pyrobuf_list_Uint32List[] = {
  {"append", (PyCFunction)__pyx_pw_12pyrobuf_list_10Uint32List_26append, METH_O, 0},
  {"extend", (PyCFunction)__pyx_pw_12pyrobuf_list_10Uint32List_28extend, METH_O, 0},
  {"insert", (PyCFunction)__pyx_pw_12pyrobuf_list_10Uint32List_30insert, METH_VARARGS|METH_KEYWORDS, 0},
  {"pop", (PyCFunction)__pyx_pw_12pyrobuf_list_10Uint32List_32pop, METH_NOARGS, 0},
  {"remove", (PyCFunction)__pyx_pw_12pyrobuf_list_10Uint32List_34remove, METH_O, 0},
  {0, 0, 0, 0}
};

static PySequenceMethods __pyx_tp_as_sequence_Uint32List = {
  __pyx_pw_12pyrobuf_list_10Uint32List_14__len__, /*sq_length*/
  0, /*sq_concat*/
  0, /*sq_repeat*/
  __pyx_sq_item_12pyrobuf_list_Uint32List, /*sq_item*/
  0, /*sq_slice*/
  0, /*sq_ass_item*/
  0, /*sq_ass_slice*/
  __pyx_pw_12pyrobuf_list_10Uint32List_5__contains__, /*sq_contains*/
  0, /*sq_inplace_concat*/
  0, /*sq_inplace_repeat*/
};

static PyMappingMethods __pyx_tp_as_mapping_Uint32List = {
  __pyx_pw_12pyrobuf_list_10Uint32List_14__len__, /*mp_length*/
  __pyx_pw_12pyrobuf_list_10Uint32List_9__getitem__, /*mp_subscript*/
  __pyx_mp_ass_subscript_12pyrobuf_list_Uint32List, /*mp_ass_subscript*/
};

static PyBufferProcs __pyx_tp_as_buffer_Uint32List = {
  #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
  __pyx_pw_12pyrobuf_list_10Uint32List_22__getbuffer__, /*bf_getbuffer*/
  __pyx_pw_12pyrobuf_list_10Uint32List_24__releasebuffer__, /*bf_releasebuffer*/
};

static PyTypeObject __pyx_type_12pyrobuf_list_Uint32List = {
  PyVarObject_HEAD_INIT(0, 0)
  "pyrobuf_list.Uint32List", /*tp_name*/
  sizeof(struct __pyx_obj_12pyrobuf_list_Uint32List), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_12pyrobuf_list_Uint32List, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  __pyx_pw_12pyrobuf_list_10Uint32List_16__repr__, /*tp_repr*/
  0, /*tp_as_number*/
  &__pyx_tp_as_sequence_Uint32List, /*tp_as_sequence*/
  &__pyx_tp_as_mapping_Uint32List, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  __pyx_pw_12pyrobuf_list_10Uint32List_20__str__, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  &__pyx_tp_as_buffer_Uint32List, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|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_pw_12pyrobuf_list_10Uint32List_11__iter__, /*tp_iter*/
  0, /*tp_iternext*/
  __pyx_methods_12pyrobuf_list_Uint32List, /*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_12pyrobuf_list_Uint32List, /*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*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};

static struct __pyx_obj_12pyrobuf_list___pyx_scope_struct____iter__ *__pyx_freelist_12pyrobuf_list___pyx_scope_struct____iter__[8];
static int __pyx_freecount_12pyrobuf_list___pyx_scope_struct____iter__ = 0;

static PyObject *__pyx_tp_new_12pyrobuf_list___pyx_scope_struct____iter__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_12pyrobuf_list___pyx_scope_struct____iter__ > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_12pyrobuf_list___pyx_scope_struct____iter__)))) {
    o = (PyObject*)__pyx_freelist_12pyrobuf_list___pyx_scope_struct____iter__[--__pyx_freecount_12pyrobuf_list___pyx_scope_struct____iter__];
    memset(o, 0, sizeof(struct __pyx_obj_12pyrobuf_list___pyx_scope_struct____iter__));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_12pyrobuf_list___pyx_scope_struct____iter__(PyObject *o) {
  struct __pyx_obj_12pyrobuf_list___pyx_scope_struct____iter__ *p = (struct __pyx_obj_12pyrobuf_list___pyx_scope_struct____iter__ *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_self);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_12pyrobuf_list___pyx_scope_struct____iter__ < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_12pyrobuf_list___pyx_scope_struct____iter__)))) {
    __pyx_freelist_12pyrobuf_list___pyx_scope_struct____iter__[__pyx_freecount_12pyrobuf_list___pyx_scope_struct____iter__++] = ((struct __pyx_obj_12pyrobuf_list___pyx_scope_struct____iter__ *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_12pyrobuf_list___pyx_scope_struct____iter__(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_12pyrobuf_list___pyx_scope_struct____iter__ *p = (struct __pyx_obj_12pyrobuf_list___pyx_scope_struct____iter__ *)o;
  if (p->__pyx_v_self) {
    e = (*v)(((PyObject*)p->__pyx_v_self), a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_12pyrobuf_list___pyx_scope_struct____iter__(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_12pyrobuf_list___pyx_scope_struct____iter__ *p = (struct __pyx_obj_12pyrobuf_list___pyx_scope_struct____iter__ *)o;
  tmp = ((PyObject*)p->__pyx_v_self);
  p->__pyx_v_self = ((struct __pyx_obj_12pyrobuf_list_Int64List *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyTypeObject __pyx_type_12pyrobuf_list___pyx_scope_struct____iter__ = {
  PyVarObject_HEAD_INIT(0, 0)
  "pyrobuf_list.__pyx_scope_struct____iter__", /*tp_name*/
  sizeof(struct __pyx_obj_12pyrobuf_list___pyx_scope_struct____iter__), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_12pyrobuf_list___pyx_scope_struct____iter__, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_12pyrobuf_list___pyx_scope_struct____iter__, /*tp_traverse*/
  __pyx_tp_clear_12pyrobuf_list___pyx_scope_struct____iter__, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*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_12pyrobuf_list___pyx_scope_struct____iter__, /*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*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};

static struct __pyx_obj_12pyrobuf_list___pyx_scope_struct_1___iter__ *__pyx_freelist_12pyrobuf_list___pyx_scope_struct_1___iter__[8];
static int __pyx_freecount_12pyrobuf_list___pyx_scope_struct_1___iter__ = 0;

static PyObject *__pyx_tp_new_12pyrobuf_list___pyx_scope_struct_1___iter__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_12pyrobuf_list___pyx_scope_struct_1___iter__ > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_12pyrobuf_list___pyx_scope_struct_1___iter__)))) {
    o = (PyObject*)__pyx_freelist_12pyrobuf_list___pyx_scope_struct_1___iter__[--__pyx_freecount_12pyrobuf_list___pyx_scope_struct_1___iter__];
    memset(o, 0, sizeof(struct __pyx_obj_12pyrobuf_list___pyx_scope_struct_1___iter__));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_12pyrobuf_list___pyx_scope_struct_1___iter__(PyObject *o) {
  struct __pyx_obj_12pyrobuf_list___pyx_scope_struct_1___iter__ *p = (struct __pyx_obj_12pyrobuf_list___pyx_scope_struct_1___iter__ *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_self);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_12pyrobuf_list___pyx_scope_struct_1___iter__ < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_12pyrobuf_list___pyx_scope_struct_1___iter__)))) {
    __pyx_freelist_12pyrobuf_list___pyx_scope_struct_1___iter__[__pyx_freecount_12pyrobuf_list___pyx_scope_struct_1___iter__++] = ((struct __pyx_obj_12pyrobuf_list___pyx_scope_struct_1___iter__ *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_12pyrobuf_list___pyx_scope_struct_1___iter__(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_12pyrobuf_list___pyx_scope_struct_1___iter__ *p = (struct __pyx_obj_12pyrobuf_list___pyx_scope_struct_1___iter__ *)o;
  if (p->__pyx_v_self) {
    e = (*v)(((PyObject*)p->__pyx_v_self), a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_12pyrobuf_list___pyx_scope_struct_1___iter__(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_12pyrobuf_list___pyx_scope_struct_1___iter__ *p = (struct __pyx_obj_12pyrobuf_list___pyx_scope_struct_1___iter__ *)o;
  tmp = ((PyObject*)p->__pyx_v_self);
  p->__pyx_v_self = ((struct __pyx_obj_12pyrobuf_list_Uint64List *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyTypeObject __pyx_type_12pyrobuf_list___pyx_scope_struct_1___iter__ = {
  PyVarObject_HEAD_INIT(0, 0)
  "pyrobuf_list.__pyx_scope_struct_1___iter__", /*tp_name*/
  sizeof(struct __pyx_obj_12pyrobuf_list___pyx_scope_struct_1___iter__), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_12pyrobuf_list___pyx_scope_struct_1___iter__, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_12pyrobuf_list___pyx_scope_struct_1___iter__, /*tp_traverse*/
  __pyx_tp_clear_12pyrobuf_list___pyx_scope_struct_1___iter__, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*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_12pyrobuf_list___pyx_scope_struct_1___iter__, /*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*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};

static struct __pyx_obj_12pyrobuf_list___pyx_scope_struct_2___iter__ *__pyx_freelist_12pyrobuf_list___pyx_scope_struct_2___iter__[8];
static int __pyx_freecount_12pyrobuf_list___pyx_scope_struct_2___iter__ = 0;

static PyObject *__pyx_tp_new_12pyrobuf_list___pyx_scope_struct_2___iter__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_12pyrobuf_list___pyx_scope_struct_2___iter__ > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_12pyrobuf_list___pyx_scope_struct_2___iter__)))) {
    o = (PyObject*)__pyx_freelist_12pyrobuf_list___pyx_scope_struct_2___iter__[--__pyx_freecount_12pyrobuf_list___pyx_scope_struct_2___iter__];
    memset(o, 0, sizeof(struct __pyx_obj_12pyrobuf_list___pyx_scope_struct_2___iter__));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_12pyrobuf_list___pyx_scope_struct_2___iter__(PyObject *o) {
  struct __pyx_obj_12pyrobuf_list___pyx_scope_struct_2___iter__ *p = (struct __pyx_obj_12pyrobuf_list___pyx_scope_struct_2___iter__ *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_self);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_12pyrobuf_list___pyx_scope_struct_2___iter__ < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_12pyrobuf_list___pyx_scope_struct_2___iter__)))) {
    __pyx_freelist_12pyrobuf_list___pyx_scope_struct_2___iter__[__pyx_freecount_12pyrobuf_list___pyx_scope_struct_2___iter__++] = ((struct __pyx_obj_12pyrobuf_list___pyx_scope_struct_2___iter__ *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_12pyrobuf_list___pyx_scope_struct_2___iter__(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_12pyrobuf_list___pyx_scope_struct_2___iter__ *p = (struct __pyx_obj_12pyrobuf_list___pyx_scope_struct_2___iter__ *)o;
  if (p->__pyx_v_self) {
    e = (*v)(((PyObject*)p->__pyx_v_self), a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_12pyrobuf_list___pyx_scope_struct_2___iter__(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_12pyrobuf_list___pyx_scope_struct_2___iter__ *p = (struct __pyx_obj_12pyrobuf_list___pyx_scope_struct_2___iter__ *)o;
  tmp = ((PyObject*)p->__pyx_v_self);
  p->__pyx_v_self = ((struct __pyx_obj_12pyrobuf_list_CharList *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyTypeObject __pyx_type_12pyrobuf_list___pyx_scope_struct_2___iter__ = {
  PyVarObject_HEAD_INIT(0, 0)
  "pyrobuf_list.__pyx_scope_struct_2___iter__", /*tp_name*/
  sizeof(struct __pyx_obj_12pyrobuf_list___pyx_scope_struct_2___iter__), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_12pyrobuf_list___pyx_scope_struct_2___iter__, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_12pyrobuf_list___pyx_scope_struct_2___iter__, /*tp_traverse*/
  __pyx_tp_clear_12pyrobuf_list___pyx_scope_struct_2___iter__, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*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_12pyrobuf_list___pyx_scope_struct_2___iter__, /*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*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};

static struct __pyx_obj_12pyrobuf_list___pyx_scope_struct_3___iter__ *__pyx_freelist_12pyrobuf_list___pyx_scope_struct_3___iter__[8];
static int __pyx_freecount_12pyrobuf_list___pyx_scope_struct_3___iter__ = 0;

static PyObject *__pyx_tp_new_12pyrobuf_list___pyx_scope_struct_3___iter__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_12pyrobuf_list___pyx_scope_struct_3___iter__ > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_12pyrobuf_list___pyx_scope_struct_3___iter__)))) {
    o = (PyObject*)__pyx_freelist_12pyrobuf_list___pyx_scope_struct_3___iter__[--__pyx_freecount_12pyrobuf_list___pyx_scope_struct_3___iter__];
    memset(o, 0, sizeof(struct __pyx_obj_12pyrobuf_list___pyx_scope_struct_3___iter__));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_12pyrobuf_list___pyx_scope_struct_3___iter__(PyObject *o) {
  struct __pyx_obj_12pyrobuf_list___pyx_scope_struct_3___iter__ *p = (struct __pyx_obj_12pyrobuf_list___pyx_scope_struct_3___iter__ *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_self);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_12pyrobuf_list___pyx_scope_struct_3___iter__ < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_12pyrobuf_list___pyx_scope_struct_3___iter__)))) {
    __pyx_freelist_12pyrobuf_list___pyx_scope_struct_3___iter__[__pyx_freecount_12pyrobuf_list___pyx_scope_struct_3___iter__++] = ((struct __pyx_obj_12pyrobuf_list___pyx_scope_struct_3___iter__ *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_12pyrobuf_list___pyx_scope_struct_3___iter__(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_12pyrobuf_list___pyx_scope_struct_3___iter__ *p = (struct __pyx_obj_12pyrobuf_list___pyx_scope_struct_3___iter__ *)o;
  if (p->__pyx_v_self) {
    e = (*v)(((PyObject*)p->__pyx_v_self), a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_12pyrobuf_list___pyx_scope_struct_3___iter__(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_12pyrobuf_list___pyx_scope_struct_3___iter__ *p = (struct __pyx_obj_12pyrobuf_list___pyx_scope_struct_3___iter__ *)o;
  tmp = ((PyObject*)p->__pyx_v_self);
  p->__pyx_v_self = ((struct __pyx_obj_12pyrobuf_list_Int32List *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyTypeObject __pyx_type_12pyrobuf_list___pyx_scope_struct_3___iter__ = {
  PyVarObject_HEAD_INIT(0, 0)
  "pyrobuf_list.__pyx_scope_struct_3___iter__", /*tp_name*/
  sizeof(struct __pyx_obj_12pyrobuf_list___pyx_scope_struct_3___iter__), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_12pyrobuf_list___pyx_scope_struct_3___iter__, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_12pyrobuf_list___pyx_scope_struct_3___iter__, /*tp_traverse*/
  __pyx_tp_clear_12pyrobuf_list___pyx_scope_struct_3___iter__, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*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_12pyrobuf_list___pyx_scope_struct_3___iter__, /*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*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};

static struct __pyx_obj_12pyrobuf_list___pyx_scope_struct_4___iter__ *__pyx_freelist_12pyrobuf_list___pyx_scope_struct_4___iter__[8];
static int __pyx_freecount_12pyrobuf_list___pyx_scope_struct_4___iter__ = 0;

static PyObject *__pyx_tp_new_12pyrobuf_list___pyx_scope_struct_4___iter__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_12pyrobuf_list___pyx_scope_struct_4___iter__ > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_12pyrobuf_list___pyx_scope_struct_4___iter__)))) {
    o = (PyObject*)__pyx_freelist_12pyrobuf_list___pyx_scope_struct_4___iter__[--__pyx_freecount_12pyrobuf_list___pyx_scope_struct_4___iter__];
    memset(o, 0, sizeof(struct __pyx_obj_12pyrobuf_list___pyx_scope_struct_4___iter__));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_12pyrobuf_list___pyx_scope_struct_4___iter__(PyObject *o) {
  struct __pyx_obj_12pyrobuf_list___pyx_scope_struct_4___iter__ *p = (struct __pyx_obj_12pyrobuf_list___pyx_scope_struct_4___iter__ *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_self);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_12pyrobuf_list___pyx_scope_struct_4___iter__ < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_12pyrobuf_list___pyx_scope_struct_4___iter__)))) {
    __pyx_freelist_12pyrobuf_list___pyx_scope_struct_4___iter__[__pyx_freecount_12pyrobuf_list___pyx_scope_struct_4___iter__++] = ((struct __pyx_obj_12pyrobuf_list___pyx_scope_struct_4___iter__ *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_12pyrobuf_list___pyx_scope_struct_4___iter__(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_12pyrobuf_list___pyx_scope_struct_4___iter__ *p = (struct __pyx_obj_12pyrobuf_list___pyx_scope_struct_4___iter__ *)o;
  if (p->__pyx_v_self) {
    e = (*v)(((PyObject*)p->__pyx_v_self), a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_12pyrobuf_list___pyx_scope_struct_4___iter__(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_12pyrobuf_list___pyx_scope_struct_4___iter__ *p = (struct __pyx_obj_12pyrobuf_list___pyx_scope_struct_4___iter__ *)o;
  tmp = ((PyObject*)p->__pyx_v_self);
  p->__pyx_v_self = ((struct __pyx_obj_12pyrobuf_list_IntList *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyTypeObject __pyx_type_12pyrobuf_list___pyx_scope_struct_4___iter__ = {
  PyVarObject_HEAD_INIT(0, 0)
  "pyrobuf_list.__pyx_scope_struct_4___iter__", /*tp_name*/
  sizeof(struct __pyx_obj_12pyrobuf_list___pyx_scope_struct_4___iter__), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_12pyrobuf_list___pyx_scope_struct_4___iter__, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_12pyrobuf_list___pyx_scope_struct_4___iter__, /*tp_traverse*/
  __pyx_tp_clear_12pyrobuf_list___pyx_scope_struct_4___iter__, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*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_12pyrobuf_list___pyx_scope_struct_4___iter__, /*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*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};

static struct __pyx_obj_12pyrobuf_list___pyx_scope_struct_5___iter__ *__pyx_freelist_12pyrobuf_list___pyx_scope_struct_5___iter__[8];
static int __pyx_freecount_12pyrobuf_list___pyx_scope_struct_5___iter__ = 0;

static PyObject *__pyx_tp_new_12pyrobuf_list___pyx_scope_struct_5___iter__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_12pyrobuf_list___pyx_scope_struct_5___iter__ > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_12pyrobuf_list___pyx_scope_struct_5___iter__)))) {
    o = (PyObject*)__pyx_freelist_12pyrobuf_list___pyx_scope_struct_5___iter__[--__pyx_freecount_12pyrobuf_list___pyx_scope_struct_5___iter__];
    memset(o, 0, sizeof(struct __pyx_obj_12pyrobuf_list___pyx_scope_struct_5___iter__));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_12pyrobuf_list___pyx_scope_struct_5___iter__(PyObject *o) {
  struct __pyx_obj_12pyrobuf_list___pyx_scope_struct_5___iter__ *p = (struct __pyx_obj_12pyrobuf_list___pyx_scope_struct_5___iter__ *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_self);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_12pyrobuf_list___pyx_scope_struct_5___iter__ < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_12pyrobuf_list___pyx_scope_struct_5___iter__)))) {
    __pyx_freelist_12pyrobuf_list___pyx_scope_struct_5___iter__[__pyx_freecount_12pyrobuf_list___pyx_scope_struct_5___iter__++] = ((struct __pyx_obj_12pyrobuf_list___pyx_scope_struct_5___iter__ *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_12pyrobuf_list___pyx_scope_struct_5___iter__(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_12pyrobuf_list___pyx_scope_struct_5___iter__ *p = (struct __pyx_obj_12pyrobuf_list___pyx_scope_struct_5___iter__ *)o;
  if (p->__pyx_v_self) {
    e = (*v)(((PyObject*)p->__pyx_v_self), a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_12pyrobuf_list___pyx_scope_struct_5___iter__(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_12pyrobuf_list___pyx_scope_struct_5___iter__ *p = (struct __pyx_obj_12pyrobuf_list___pyx_scope_struct_5___iter__ *)o;
  tmp = ((PyObject*)p->__pyx_v_self);
  p->__pyx_v_self = ((struct __pyx_obj_12pyrobuf_list_DoubleList *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyTypeObject __pyx_type_12pyrobuf_list___pyx_scope_struct_5___iter__ = {
  PyVarObject_HEAD_INIT(0, 0)
  "pyrobuf_list.__pyx_scope_struct_5___iter__", /*tp_name*/
  sizeof(struct __pyx_obj_12pyrobuf_list___pyx_scope_struct_5___iter__), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_12pyrobuf_list___pyx_scope_struct_5___iter__, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_12pyrobuf_list___pyx_scope_struct_5___iter__, /*tp_traverse*/
  __pyx_tp_clear_12pyrobuf_list___pyx_scope_struct_5___iter__, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*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_12pyrobuf_list___pyx_scope_struct_5___iter__, /*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*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};

static struct __pyx_obj_12pyrobuf_list___pyx_scope_struct_6___iter__ *__pyx_freelist_12pyrobuf_list___pyx_scope_struct_6___iter__[8];
static int __pyx_freecount_12pyrobuf_list___pyx_scope_struct_6___iter__ = 0;

static PyObject *__pyx_tp_new_12pyrobuf_list___pyx_scope_struct_6___iter__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_12pyrobuf_list___pyx_scope_struct_6___iter__ > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_12pyrobuf_list___pyx_scope_struct_6___iter__)))) {
    o = (PyObject*)__pyx_freelist_12pyrobuf_list___pyx_scope_struct_6___iter__[--__pyx_freecount_12pyrobuf_list___pyx_scope_struct_6___iter__];
    memset(o, 0, sizeof(struct __pyx_obj_12pyrobuf_list___pyx_scope_struct_6___iter__));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_12pyrobuf_list___pyx_scope_struct_6___iter__(PyObject *o) {
  struct __pyx_obj_12pyrobuf_list___pyx_scope_struct_6___iter__ *p = (struct __pyx_obj_12pyrobuf_list___pyx_scope_struct_6___iter__ *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_self);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_12pyrobuf_list___pyx_scope_struct_6___iter__ < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_12pyrobuf_list___pyx_scope_struct_6___iter__)))) {
    __pyx_freelist_12pyrobuf_list___pyx_scope_struct_6___iter__[__pyx_freecount_12pyrobuf_list___pyx_scope_struct_6___iter__++] = ((struct __pyx_obj_12pyrobuf_list___pyx_scope_struct_6___iter__ *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_12pyrobuf_list___pyx_scope_struct_6___iter__(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_12pyrobuf_list___pyx_scope_struct_6___iter__ *p = (struct __pyx_obj_12pyrobuf_list___pyx_scope_struct_6___iter__ *)o;
  if (p->__pyx_v_self) {
    e = (*v)(((PyObject*)p->__pyx_v_self), a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_12pyrobuf_list___pyx_scope_struct_6___iter__(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_12pyrobuf_list___pyx_scope_struct_6___iter__ *p = (struct __pyx_obj_12pyrobuf_list___pyx_scope_struct_6___iter__ *)o;
  tmp = ((PyObject*)p->__pyx_v_self);
  p->__pyx_v_self = ((struct __pyx_obj_12pyrobuf_list_FloatList *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyTypeObject __pyx_type_12pyrobuf_list___pyx_scope_struct_6___iter__ = {
  PyVarObject_HEAD_INIT(0, 0)
  "pyrobuf_list.__pyx_scope_struct_6___iter__", /*tp_name*/
  sizeof(struct __pyx_obj_12pyrobuf_list___pyx_scope_struct_6___iter__), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_12pyrobuf_list___pyx_scope_struct_6___iter__, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_12pyrobuf_list___pyx_scope_struct_6___iter__, /*tp_traverse*/
  __pyx_tp_clear_12pyrobuf_list___pyx_scope_struct_6___iter__, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*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_12pyrobuf_list___pyx_scope_struct_6___iter__, /*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*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};

static struct __pyx_obj_12pyrobuf_list___pyx_scope_struct_7___iter__ *__pyx_freelist_12pyrobuf_list___pyx_scope_struct_7___iter__[8];
static int __pyx_freecount_12pyrobuf_list___pyx_scope_struct_7___iter__ = 0;

static PyObject *__pyx_tp_new_12pyrobuf_list___pyx_scope_struct_7___iter__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) {
  PyObject *o;
  if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_12pyrobuf_list___pyx_scope_struct_7___iter__ > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_12pyrobuf_list___pyx_scope_struct_7___iter__)))) {
    o = (PyObject*)__pyx_freelist_12pyrobuf_list___pyx_scope_struct_7___iter__[--__pyx_freecount_12pyrobuf_list___pyx_scope_struct_7___iter__];
    memset(o, 0, sizeof(struct __pyx_obj_12pyrobuf_list___pyx_scope_struct_7___iter__));
    (void) PyObject_INIT(o, t);
    PyObject_GC_Track(o);
  } else {
    o = (*t->tp_alloc)(t, 0);
    if (unlikely(!o)) return 0;
  }
  return o;
}

static void __pyx_tp_dealloc_12pyrobuf_list___pyx_scope_struct_7___iter__(PyObject *o) {
  struct __pyx_obj_12pyrobuf_list___pyx_scope_struct_7___iter__ *p = (struct __pyx_obj_12pyrobuf_list___pyx_scope_struct_7___iter__ *)o;
  PyObject_GC_UnTrack(o);
  Py_CLEAR(p->__pyx_v_self);
  if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_12pyrobuf_list___pyx_scope_struct_7___iter__ < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_12pyrobuf_list___pyx_scope_struct_7___iter__)))) {
    __pyx_freelist_12pyrobuf_list___pyx_scope_struct_7___iter__[__pyx_freecount_12pyrobuf_list___pyx_scope_struct_7___iter__++] = ((struct __pyx_obj_12pyrobuf_list___pyx_scope_struct_7___iter__ *)o);
  } else {
    (*Py_TYPE(o)->tp_free)(o);
  }
}

static int __pyx_tp_traverse_12pyrobuf_list___pyx_scope_struct_7___iter__(PyObject *o, visitproc v, void *a) {
  int e;
  struct __pyx_obj_12pyrobuf_list___pyx_scope_struct_7___iter__ *p = (struct __pyx_obj_12pyrobuf_list___pyx_scope_struct_7___iter__ *)o;
  if (p->__pyx_v_self) {
    e = (*v)(((PyObject*)p->__pyx_v_self), a); if (e) return e;
  }
  return 0;
}

static int __pyx_tp_clear_12pyrobuf_list___pyx_scope_struct_7___iter__(PyObject *o) {
  PyObject* tmp;
  struct __pyx_obj_12pyrobuf_list___pyx_scope_struct_7___iter__ *p = (struct __pyx_obj_12pyrobuf_list___pyx_scope_struct_7___iter__ *)o;
  tmp = ((PyObject*)p->__pyx_v_self);
  p->__pyx_v_self = ((struct __pyx_obj_12pyrobuf_list_Uint32List *)Py_None); Py_INCREF(Py_None);
  Py_XDECREF(tmp);
  return 0;
}

static PyTypeObject __pyx_type_12pyrobuf_list___pyx_scope_struct_7___iter__ = {
  PyVarObject_HEAD_INIT(0, 0)
  "pyrobuf_list.__pyx_scope_struct_7___iter__", /*tp_name*/
  sizeof(struct __pyx_obj_12pyrobuf_list___pyx_scope_struct_7___iter__), /*tp_basicsize*/
  0, /*tp_itemsize*/
  __pyx_tp_dealloc_12pyrobuf_list___pyx_scope_struct_7___iter__, /*tp_dealloc*/
  0, /*tp_print*/
  0, /*tp_getattr*/
  0, /*tp_setattr*/
  #if PY_MAJOR_VERSION < 3
  0, /*tp_compare*/
  #endif
  #if PY_MAJOR_VERSION >= 3
  0, /*tp_as_async*/
  #endif
  0, /*tp_repr*/
  0, /*tp_as_number*/
  0, /*tp_as_sequence*/
  0, /*tp_as_mapping*/
  0, /*tp_hash*/
  0, /*tp_call*/
  0, /*tp_str*/
  0, /*tp_getattro*/
  0, /*tp_setattro*/
  0, /*tp_as_buffer*/
  Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/
  0, /*tp_doc*/
  __pyx_tp_traverse_12pyrobuf_list___pyx_scope_struct_7___iter__, /*tp_traverse*/
  __pyx_tp_clear_12pyrobuf_list___pyx_scope_struct_7___iter__, /*tp_clear*/
  0, /*tp_richcompare*/
  0, /*tp_weaklistoffset*/
  0, /*tp_iter*/
  0, /*tp_iternext*/
  0, /*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_12pyrobuf_list___pyx_scope_struct_7___iter__, /*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*/
  0, /*tp_version_tag*/
  #if PY_VERSION_HEX >= 0x030400a1
  0, /*tp_finalize*/
  #endif
};

static PyMethodDef __pyx_methods[] = {
  {0, 0, 0, 0}
};

#if PY_MAJOR_VERSION >= 3
static struct PyModuleDef __pyx_moduledef = {
  #if PY_VERSION_HEX < 0x03020000
    { PyObject_HEAD_INIT(NULL) NULL, 0, NULL },
  #else
    PyModuleDef_HEAD_INIT,
  #endif
    "pyrobuf_list",
    0, /* 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_n_s_AssertionError, __pyx_k_AssertionError, sizeof(__pyx_k_AssertionError), 0, 0, 1, 1},
  {&__pyx_n_s_CharList___iter, __pyx_k_CharList___iter, sizeof(__pyx_k_CharList___iter), 0, 0, 1, 1},
  {&__pyx_n_s_DoubleList___iter, __pyx_k_DoubleList___iter, sizeof(__pyx_k_DoubleList___iter), 0, 0, 1, 1},
  {&__pyx_n_s_Exception, __pyx_k_Exception, sizeof(__pyx_k_Exception), 0, 0, 1, 1},
  {&__pyx_n_s_FloatList___iter, __pyx_k_FloatList___iter, sizeof(__pyx_k_FloatList___iter), 0, 0, 1, 1},
  {&__pyx_n_s_IndexError, __pyx_k_IndexError, sizeof(__pyx_k_IndexError), 0, 0, 1, 1},
  {&__pyx_n_s_Int32List___iter, __pyx_k_Int32List___iter, sizeof(__pyx_k_Int32List___iter), 0, 0, 1, 1},
  {&__pyx_n_s_Int64List___iter, __pyx_k_Int64List___iter, sizeof(__pyx_k_Int64List___iter), 0, 0, 1, 1},
  {&__pyx_n_s_IntList___iter, __pyx_k_IntList___iter, sizeof(__pyx_k_IntList___iter), 0, 0, 1, 1},
  {&__pyx_n_s_MemoryError, __pyx_k_MemoryError, sizeof(__pyx_k_MemoryError), 0, 0, 1, 1},
  {&__pyx_n_s_Modified, __pyx_k_Modified, sizeof(__pyx_k_Modified), 0, 0, 1, 1},
  {&__pyx_n_s_TypeError, __pyx_k_TypeError, sizeof(__pyx_k_TypeError), 0, 0, 1, 1},
  {&__pyx_n_s_Uint32List___iter, __pyx_k_Uint32List___iter, sizeof(__pyx_k_Uint32List___iter), 0, 0, 1, 1},
  {&__pyx_n_s_Uint64List___iter, __pyx_k_Uint64List___iter, sizeof(__pyx_k_Uint64List___iter), 0, 0, 1, 1},
  {&__pyx_n_s_ValueError, __pyx_k_ValueError, sizeof(__pyx_k_ValueError), 0, 0, 1, 1},
  {&__pyx_n_s_append, __pyx_k_append, sizeof(__pyx_k_append), 0, 0, 1, 1},
  {&__pyx_n_s_args, __pyx_k_args, sizeof(__pyx_k_args), 0, 0, 1, 1},
  {&__pyx_n_s_close, __pyx_k_close, sizeof(__pyx_k_close), 0, 0, 1, 1},
  {&__pyx_n_s_decode, __pyx_k_decode, sizeof(__pyx_k_decode), 0, 0, 1, 1},
  {&__pyx_n_s_extend, __pyx_k_extend, sizeof(__pyx_k_extend), 0, 0, 1, 1},
  {&__pyx_n_s_i, __pyx_k_i, sizeof(__pyx_k_i), 0, 0, 1, 1},
  {&__pyx_n_s_insert, __pyx_k_insert, sizeof(__pyx_k_insert), 0, 0, 1, 1},
  {&__pyx_n_s_is_present_in_parent, __pyx_k_is_present_in_parent, sizeof(__pyx_k_is_present_in_parent), 0, 0, 1, 1},
  {&__pyx_n_s_iter, __pyx_k_iter, sizeof(__pyx_k_iter), 0, 0, 1, 1},
  {&__pyx_kp_s_list_index_out_of_range, __pyx_k_list_index_out_of_range, sizeof(__pyx_k_list_index_out_of_range), 0, 0, 1, 0},
  {&__pyx_kp_s_list_indices_must_be_integers_no, __pyx_k_list_indices_must_be_integers_no, sizeof(__pyx_k_list_indices_must_be_integers_no), 0, 0, 1, 0},
  {&__pyx_n_s_list_type, __pyx_k_list_type, sizeof(__pyx_k_list_type), 0, 0, 1, 1},
  {&__pyx_n_s_listener, __pyx_k_listener, sizeof(__pyx_k_listener), 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_null_listener, __pyx_k_null_listener, sizeof(__pyx_k_null_listener), 0, 0, 1, 1},
  {&__pyx_n_s_pop, __pyx_k_pop, sizeof(__pyx_k_pop), 0, 0, 1, 1},
  {&__pyx_kp_s_pop_from_empty_list, __pyx_k_pop_from_empty_list, sizeof(__pyx_k_pop_from_empty_list), 0, 0, 1, 0},
  {&__pyx_n_s_pyx_capi, __pyx_k_pyx_capi, sizeof(__pyx_k_pyx_capi), 0, 0, 1, 1},
  {&__pyx_n_s_pyx_vtable, __pyx_k_pyx_vtable, sizeof(__pyx_k_pyx_vtable), 0, 0, 1, 1},
  {&__pyx_kp_s_r_has_type_s_but_expected_one_o, __pyx_k_r_has_type_s_but_expected_one_o, sizeof(__pyx_k_r_has_type_s_but_expected_one_o), 0, 0, 1, 0},
  {&__pyx_kp_s_r_has_type_s_but_expected_one_o_2, __pyx_k_r_has_type_s_but_expected_one_o_2, sizeof(__pyx_k_r_has_type_s_but_expected_one_o_2), 0, 0, 1, 0},
  {&__pyx_n_s_range, __pyx_k_range, sizeof(__pyx_k_range), 0, 0, 1, 1},
  {&__pyx_n_s_remove, __pyx_k_remove, sizeof(__pyx_k_remove), 0, 0, 1, 1},
  {&__pyx_n_s_send, __pyx_k_send, sizeof(__pyx_k_send), 0, 0, 1, 1},
  {&__pyx_n_s_setitem, __pyx_k_setitem, sizeof(__pyx_k_setitem), 0, 0, 1, 1},
  {&__pyx_n_s_setslice, __pyx_k_setslice, sizeof(__pyx_k_setslice), 0, 0, 1, 1},
  {&__pyx_n_s_size, __pyx_k_size, sizeof(__pyx_k_size), 0, 0, 1, 1},
  {&__pyx_n_s_super, __pyx_k_super, sizeof(__pyx_k_super), 0, 0, 1, 1},
  {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1},
  {&__pyx_n_s_throw, __pyx_k_throw, sizeof(__pyx_k_throw), 0, 0, 1, 1},
  {&__pyx_kp_s_type_mismatch, __pyx_k_type_mismatch, sizeof(__pyx_k_type_mismatch), 0, 0, 1, 0},
  {&__pyx_kp_s_utf_8, __pyx_k_utf_8, sizeof(__pyx_k_utf_8), 0, 0, 1, 0},
  {&__pyx_n_s_x, __pyx_k_x, sizeof(__pyx_k_x), 0, 0, 1, 1},
  {&__pyx_kp_s_x_not_in_list, __pyx_k_x_not_in_list, sizeof(__pyx_k_x_not_in_list), 0, 0, 1, 0},
  {0, 0, 0, 0, 0, 0, 0}
};
static int __Pyx_InitCachedBuiltins(void) {
  __pyx_builtin_AssertionError = __Pyx_GetBuiltinName(__pyx_n_s_AssertionError); if (!__pyx_builtin_AssertionError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 33; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_builtin_Exception = __Pyx_GetBuiltinName(__pyx_n_s_Exception); if (!__pyx_builtin_Exception) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_builtin_super = __Pyx_GetBuiltinName(__pyx_n_s_super); if (!__pyx_builtin_super) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 36; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 110; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_builtin_MemoryError = __Pyx_GetBuiltinName(__pyx_n_s_MemoryError); if (!__pyx_builtin_MemoryError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 286; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 300; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_builtin_IndexError = __Pyx_GetBuiltinName(__pyx_n_s_IndexError); if (!__pyx_builtin_IndexError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 311; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 457; __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", 0);

  /* "pyrobuf_list.pyx":34
 *             assert isinstance(x, self._list_type)
 *         except AssertionError:
 *             raise Exception("type mismatch")             # <<<<<<<<<<<<<<
 * 
 *         super(TypedList, self).__setitem__(i, x)
 */
  __pyx_tuple_ = PyTuple_Pack(1, __pyx_kp_s_type_mismatch); if (unlikely(!__pyx_tuple_)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 34; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple_);
  __Pyx_GIVEREF(__pyx_tuple_);

  /* "pyrobuf_list.pyx":47
 *             assert self._list_type == x.list_type
 *         except AssertionError:
 *             raise Exception("type mismatch")             # <<<<<<<<<<<<<<
 * 
 *         super(TypedList, self).__setslice__(i, j, x)
 */
  __pyx_tuple__2 = PyTuple_Pack(1, __pyx_kp_s_type_mismatch); if (unlikely(!__pyx_tuple__2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 47; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__2);
  __Pyx_GIVEREF(__pyx_tuple__2);

  /* "pyrobuf_list.pyx":66
 *             assert isinstance(x, self._list_type)
 *         except AssertionError:
 *             raise Exception("type mismatch")             # <<<<<<<<<<<<<<
 * 
 *         super(TypedList, self).append(x)
 */
  __pyx_tuple__3 = PyTuple_Pack(1, __pyx_kp_s_type_mismatch); if (unlikely(!__pyx_tuple__3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__3);
  __Pyx_GIVEREF(__pyx_tuple__3);

  /* "pyrobuf_list.pyx":78
 *             assert self._list_type == x.list_type
 *         except AssertionError:
 *             raise Exception("type mismatch")             # <<<<<<<<<<<<<<
 * 
 *         super(TypedList, self).extend(x)
 */
  __pyx_tuple__4 = PyTuple_Pack(1, __pyx_kp_s_type_mismatch); if (unlikely(!__pyx_tuple__4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__4);
  __Pyx_GIVEREF(__pyx_tuple__4);

  /* "pyrobuf_list.pyx":89
 *             assert isinstance(x, self._list_type)
 *         except AssertionError:
 *             raise Exception("type mismatch")             # <<<<<<<<<<<<<<
 * 
 *         super(TypedList, self).insert(i, x)
 */
  __pyx_tuple__5 = PyTuple_Pack(1, __pyx_kp_s_type_mismatch); if (unlikely(!__pyx_tuple__5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 89; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__5);
  __Pyx_GIVEREF(__pyx_tuple__5);

  /* "pyrobuf_list.pyx":189
 *         if isinstance(i, (int, long)):
 *             if isinstance(x, str):
 *                 value = x.decode('utf-8')             # <<<<<<<<<<<<<<
 *             elif isinstance(x, unicode):
 *                 value = x
 */
  __pyx_tuple__6 = PyTuple_Pack(1, __pyx_kp_s_utf_8); if (unlikely(!__pyx_tuple__6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 189; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__6);
  __Pyx_GIVEREF(__pyx_tuple__6);

  /* "pyrobuf_list.pyx":201
 *             for val in x:
 *                 if isinstance(val, str):
 *                     values.append(val.decode('utf-8'))             # <<<<<<<<<<<<<<
 *                 elif isinstance(val, unicode):
 *                     values.append(val)
 */
  __pyx_tuple__7 = PyTuple_Pack(1, __pyx_kp_s_utf_8); if (unlikely(!__pyx_tuple__7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 201; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__7);
  __Pyx_GIVEREF(__pyx_tuple__7);

  /* "pyrobuf_list.pyx":221
 *         for val in x:
 *             if isinstance(val, str):
 *                 values.append(val.decode('utf-8'))             # <<<<<<<<<<<<<<
 *             elif isinstance(val, unicode):
 *                 values.append(val)
 */
  __pyx_tuple__8 = PyTuple_Pack(1, __pyx_kp_s_utf_8); if (unlikely(!__pyx_tuple__8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__8);
  __Pyx_GIVEREF(__pyx_tuple__8);

  /* "pyrobuf_list.pyx":237
 *             value = x
 *         elif isinstance(x, str):
 *             value = x.decode('utf-8')             # <<<<<<<<<<<<<<
 *         else:
 *             raise TypeError("%r has type %s, but expected one of: (%s, %s)" % (x, type(x), str, unicode))
 */
  __pyx_tuple__9 = PyTuple_Pack(1, __pyx_kp_s_utf_8); if (unlikely(!__pyx_tuple__9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 237; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__9);
  __Pyx_GIVEREF(__pyx_tuple__9);

  /* "pyrobuf_list.pyx":251
 *         for val in x:
 *             if isinstance(val, str):
 *                 value = val.decode('utf-8')             # <<<<<<<<<<<<<<
 *             elif isinstance(val, unicode):
 *                 value = val
 */
  __pyx_tuple__10 = PyTuple_Pack(1, __pyx_kp_s_utf_8); if (unlikely(!__pyx_tuple__10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 251; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__10);
  __Pyx_GIVEREF(__pyx_tuple__10);

  /* "pyrobuf_list.pyx":265
 *         cdef unicode value
 *         if isinstance(x, str):
 *             value = x.decode('utf-8')             # <<<<<<<<<<<<<<
 *         elif isinstance(x, unicode):
 *             value = x
 */
  __pyx_tuple__11 = PyTuple_Pack(1, __pyx_kp_s_utf_8); if (unlikely(!__pyx_tuple__11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 265; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__11);
  __Pyx_GIVEREF(__pyx_tuple__11);

  /* "pyrobuf_list.pyx":311
 * 
 *         if i < 0 or <size_t>i >= self._n_items:
 *             raise IndexError("list index out of range")             # <<<<<<<<<<<<<<
 * 
 *         cdef size_t j
 */
  __pyx_tuple__12 = PyTuple_Pack(1, __pyx_kp_s_list_index_out_of_range); if (unlikely(!__pyx_tuple__12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 311; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__12);
  __Pyx_GIVEREF(__pyx_tuple__12);

  /* "pyrobuf_list.pyx":327
 * 
 *         if i < 0 or <size_t>i >= self._n_items or i < 0:
 *             raise IndexError("list index out of range")             # <<<<<<<<<<<<<<
 * 
 *         return self._data[i]
 */
  __pyx_tuple__13 = PyTuple_Pack(1, __pyx_kp_s_list_index_out_of_range); if (unlikely(!__pyx_tuple__13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 327; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__13);
  __Pyx_GIVEREF(__pyx_tuple__13);

  /* "pyrobuf_list.pyx":348
 * 
 *         if i < 0 or <size_t>i >= self._n_items:
 *             raise IndexError("list index out of range")             # <<<<<<<<<<<<<<
 * 
 *         self._data[i] = x
 */
  __pyx_tuple__14 = PyTuple_Pack(1, __pyx_kp_s_list_index_out_of_range); if (unlikely(!__pyx_tuple__14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 348; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__14);
  __Pyx_GIVEREF(__pyx_tuple__14);

  /* "pyrobuf_list.pyx":417
 * 
 *         if i < 0 or <size_t>i > self._n_items:
 *             raise IndexError("list index out of range")             # <<<<<<<<<<<<<<
 * 
 *         if self._n_items == self._size:
 */
  __pyx_tuple__15 = PyTuple_Pack(1, __pyx_kp_s_list_index_out_of_range); if (unlikely(!__pyx_tuple__15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 417; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__15);
  __Pyx_GIVEREF(__pyx_tuple__15);

  /* "pyrobuf_list.pyx":438
 *     cpdef pop(self):
 *         if self._n_items == 0:
 *             raise IndexError("pop from empty list")             # <<<<<<<<<<<<<<
 * 
 *         self._n_items -= 1
 */
  __pyx_tuple__16 = PyTuple_Pack(1, __pyx_kp_s_pop_from_empty_list); if (unlikely(!__pyx_tuple__16)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 438; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__16);
  __Pyx_GIVEREF(__pyx_tuple__16);

  /* "pyrobuf_list.pyx":457
 * 
 *         if found == 0:
 *             raise ValueError("x not in list")             # <<<<<<<<<<<<<<
 * 
 *         for j in range(i, self._n_items):
 */
  __pyx_tuple__17 = PyTuple_Pack(1, __pyx_kp_s_x_not_in_list); if (unlikely(!__pyx_tuple__17)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 457; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__17);
  __Pyx_GIVEREF(__pyx_tuple__17);

  /* "pyrobuf_list.pyx":513
 * 
 *         if i < 0 or <size_t>i >= self._n_items:
 *             raise IndexError("list index out of range")             # <<<<<<<<<<<<<<
 * 
 *         cdef size_t j
 */
  __pyx_tuple__18 = PyTuple_Pack(1, __pyx_kp_s_list_index_out_of_range); if (unlikely(!__pyx_tuple__18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 513; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__18);
  __Pyx_GIVEREF(__pyx_tuple__18);

  /* "pyrobuf_list.pyx":529
 * 
 *         if i < 0 or <size_t>i >= self._n_items or i < 0:
 *             raise IndexError("list index out of range")             # <<<<<<<<<<<<<<
 * 
 *         return self._data[i]
 */
  __pyx_tuple__19 = PyTuple_Pack(1, __pyx_kp_s_list_index_out_of_range); if (unlikely(!__pyx_tuple__19)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 529; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__19);
  __Pyx_GIVEREF(__pyx_tuple__19);

  /* "pyrobuf_list.pyx":550
 * 
 *         if i < 0 or <size_t>i >= self._n_items:
 *             raise IndexError("list index out of range")             # <<<<<<<<<<<<<<
 * 
 *         self._data[i] = x
 */
  __pyx_tuple__20 = PyTuple_Pack(1, __pyx_kp_s_list_index_out_of_range); if (unlikely(!__pyx_tuple__20)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 550; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__20);
  __Pyx_GIVEREF(__pyx_tuple__20);

  /* "pyrobuf_list.pyx":619
 * 
 *         if i < 0 or <size_t>i > self._n_items:
 *             raise IndexError("list index out of range")             # <<<<<<<<<<<<<<
 * 
 *         if self._n_items == self._size:
 */
  __pyx_tuple__21 = PyTuple_Pack(1, __pyx_kp_s_list_index_out_of_range); if (unlikely(!__pyx_tuple__21)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 619; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__21);
  __Pyx_GIVEREF(__pyx_tuple__21);

  /* "pyrobuf_list.pyx":640
 *     cpdef pop(self):
 *         if self._n_items == 0:
 *             raise IndexError("pop from empty list")             # <<<<<<<<<<<<<<
 * 
 *         self._n_items -= 1
 */
  __pyx_tuple__22 = PyTuple_Pack(1, __pyx_kp_s_pop_from_empty_list); if (unlikely(!__pyx_tuple__22)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 640; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__22);
  __Pyx_GIVEREF(__pyx_tuple__22);

  /* "pyrobuf_list.pyx":659
 * 
 *         if found == 0:
 *             raise ValueError("x not in list")             # <<<<<<<<<<<<<<
 * 
 *         for j in range(i, self._n_items):
 */
  __pyx_tuple__23 = PyTuple_Pack(1, __pyx_kp_s_x_not_in_list); if (unlikely(!__pyx_tuple__23)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 659; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__23);
  __Pyx_GIVEREF(__pyx_tuple__23);

  /* "pyrobuf_list.pyx":715
 * 
 *         if i < 0 or <size_t>i >= self._n_items:
 *             raise IndexError("list index out of range")             # <<<<<<<<<<<<<<
 * 
 *         cdef size_t j
 */
  __pyx_tuple__24 = PyTuple_Pack(1, __pyx_kp_s_list_index_out_of_range); if (unlikely(!__pyx_tuple__24)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 715; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__24);
  __Pyx_GIVEREF(__pyx_tuple__24);

  /* "pyrobuf_list.pyx":731
 * 
 *         if i < 0 or <size_t>i >= self._n_items or i < 0:
 *             raise IndexError("list index out of range")             # <<<<<<<<<<<<<<
 * 
 *         return self._data[i]
 */
  __pyx_tuple__25 = PyTuple_Pack(1, __pyx_kp_s_list_index_out_of_range); if (unlikely(!__pyx_tuple__25)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 731; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__25);
  __Pyx_GIVEREF(__pyx_tuple__25);

  /* "pyrobuf_list.pyx":752
 * 
 *         if i < 0 or <size_t>i >= self._n_items:
 *             raise IndexError("list index out of range")             # <<<<<<<<<<<<<<
 * 
 *         self._data[i] = x
 */
  __pyx_tuple__26 = PyTuple_Pack(1, __pyx_kp_s_list_index_out_of_range); if (unlikely(!__pyx_tuple__26)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 752; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__26);
  __Pyx_GIVEREF(__pyx_tuple__26);

  /* "pyrobuf_list.pyx":821
 * 
 *         if i < 0 or <size_t>i > self._n_items:
 *             raise IndexError("list index out of range")             # <<<<<<<<<<<<<<
 * 
 *         if self._n_items == self._size:
 */
  __pyx_tuple__27 = PyTuple_Pack(1, __pyx_kp_s_list_index_out_of_range); if (unlikely(!__pyx_tuple__27)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 821; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__27);
  __Pyx_GIVEREF(__pyx_tuple__27);

  /* "pyrobuf_list.pyx":842
 *     cpdef pop(self):
 *         if self._n_items == 0:
 *             raise IndexError("pop from empty list")             # <<<<<<<<<<<<<<
 * 
 *         self._n_items -= 1
 */
  __pyx_tuple__28 = PyTuple_Pack(1, __pyx_kp_s_pop_from_empty_list); if (unlikely(!__pyx_tuple__28)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 842; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__28);
  __Pyx_GIVEREF(__pyx_tuple__28);

  /* "pyrobuf_list.pyx":861
 * 
 *         if found == 0:
 *             raise ValueError("x not in list")             # <<<<<<<<<<<<<<
 * 
 *         for j in range(i, self._n_items):
 */
  __pyx_tuple__29 = PyTuple_Pack(1, __pyx_kp_s_x_not_in_list); if (unlikely(!__pyx_tuple__29)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 861; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__29);
  __Pyx_GIVEREF(__pyx_tuple__29);

  /* "pyrobuf_list.pyx":917
 * 
 *         if i < 0 or <size_t>i >= self._n_items:
 *             raise IndexError("list index out of range")             # <<<<<<<<<<<<<<
 * 
 *         cdef size_t j
 */
  __pyx_tuple__30 = PyTuple_Pack(1, __pyx_kp_s_list_index_out_of_range); if (unlikely(!__pyx_tuple__30)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 917; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__30);
  __Pyx_GIVEREF(__pyx_tuple__30);

  /* "pyrobuf_list.pyx":933
 * 
 *         if i < 0 or <size_t>i >= self._n_items or i < 0:
 *             raise IndexError("list index out of range")             # <<<<<<<<<<<<<<
 * 
 *         return self._data[i]
 */
  __pyx_tuple__31 = PyTuple_Pack(1, __pyx_kp_s_list_index_out_of_range); if (unlikely(!__pyx_tuple__31)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 933; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__31);
  __Pyx_GIVEREF(__pyx_tuple__31);

  /* "pyrobuf_list.pyx":954
 * 
 *         if i < 0 or <size_t>i >= self._n_items:
 *             raise IndexError("list index out of range")             # <<<<<<<<<<<<<<
 * 
 *         self._data[i] = x
 */
  __pyx_tuple__32 = PyTuple_Pack(1, __pyx_kp_s_list_index_out_of_range); if (unlikely(!__pyx_tuple__32)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 954; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__32);
  __Pyx_GIVEREF(__pyx_tuple__32);

  /* "pyrobuf_list.pyx":1023
 * 
 *         if i < 0 or <size_t>i > self._n_items:
 *             raise IndexError("list index out of range")             # <<<<<<<<<<<<<<
 * 
 *         if self._n_items == self._size:
 */
  __pyx_tuple__33 = PyTuple_Pack(1, __pyx_kp_s_list_index_out_of_range); if (unlikely(!__pyx_tuple__33)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1023; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__33);
  __Pyx_GIVEREF(__pyx_tuple__33);

  /* "pyrobuf_list.pyx":1044
 *     cpdef pop(self):
 *         if self._n_items == 0:
 *             raise IndexError("pop from empty list")             # <<<<<<<<<<<<<<
 * 
 *         self._n_items -= 1
 */
  __pyx_tuple__34 = PyTuple_Pack(1, __pyx_kp_s_pop_from_empty_list); if (unlikely(!__pyx_tuple__34)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1044; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__34);
  __Pyx_GIVEREF(__pyx_tuple__34);

  /* "pyrobuf_list.pyx":1063
 * 
 *         if found == 0:
 *             raise ValueError("x not in list")             # <<<<<<<<<<<<<<
 * 
 *         for j in range(i, self._n_items):
 */
  __pyx_tuple__35 = PyTuple_Pack(1, __pyx_kp_s_x_not_in_list); if (unlikely(!__pyx_tuple__35)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1063; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__35);
  __Pyx_GIVEREF(__pyx_tuple__35);

  /* "pyrobuf_list.pyx":1119
 * 
 *         if i < 0 or <size_t>i >= self._n_items:
 *             raise IndexError("list index out of range")             # <<<<<<<<<<<<<<
 * 
 *         cdef size_t j
 */
  __pyx_tuple__36 = PyTuple_Pack(1, __pyx_kp_s_list_index_out_of_range); if (unlikely(!__pyx_tuple__36)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1119; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__36);
  __Pyx_GIVEREF(__pyx_tuple__36);

  /* "pyrobuf_list.pyx":1135
 * 
 *         if i < 0 or <size_t>i >= self._n_items or i < 0:
 *             raise IndexError("list index out of range")             # <<<<<<<<<<<<<<
 * 
 *         return self._data[i]
 */
  __pyx_tuple__37 = PyTuple_Pack(1, __pyx_kp_s_list_index_out_of_range); if (unlikely(!__pyx_tuple__37)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1135; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__37);
  __Pyx_GIVEREF(__pyx_tuple__37);

  /* "pyrobuf_list.pyx":1156
 * 
 *         if i < 0 or <size_t>i >= self._n_items:
 *             raise IndexError("list index out of range")             # <<<<<<<<<<<<<<
 * 
 *         self._data[i] = x
 */
  __pyx_tuple__38 = PyTuple_Pack(1, __pyx_kp_s_list_index_out_of_range); if (unlikely(!__pyx_tuple__38)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1156; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__38);
  __Pyx_GIVEREF(__pyx_tuple__38);

  /* "pyrobuf_list.pyx":1225
 * 
 *         if i < 0 or <size_t>i > self._n_items:
 *             raise IndexError("list index out of range")             # <<<<<<<<<<<<<<
 * 
 *         if self._n_items == self._size:
 */
  __pyx_tuple__39 = PyTuple_Pack(1, __pyx_kp_s_list_index_out_of_range); if (unlikely(!__pyx_tuple__39)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1225; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__39);
  __Pyx_GIVEREF(__pyx_tuple__39);

  /* "pyrobuf_list.pyx":1246
 *     cpdef pop(self):
 *         if self._n_items == 0:
 *             raise IndexError("pop from empty list")             # <<<<<<<<<<<<<<
 * 
 *         self._n_items -= 1
 */
  __pyx_tuple__40 = PyTuple_Pack(1, __pyx_kp_s_pop_from_empty_list); if (unlikely(!__pyx_tuple__40)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1246; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__40);
  __Pyx_GIVEREF(__pyx_tuple__40);

  /* "pyrobuf_list.pyx":1265
 * 
 *         if found == 0:
 *             raise ValueError("x not in list")             # <<<<<<<<<<<<<<
 * 
 *         for j in range(i, self._n_items):
 */
  __pyx_tuple__41 = PyTuple_Pack(1, __pyx_kp_s_x_not_in_list); if (unlikely(!__pyx_tuple__41)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1265; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__41);
  __Pyx_GIVEREF(__pyx_tuple__41);

  /* "pyrobuf_list.pyx":1321
 * 
 *         if i < 0 or <size_t>i >= self._n_items:
 *             raise IndexError("list index out of range")             # <<<<<<<<<<<<<<
 * 
 *         cdef size_t j
 */
  __pyx_tuple__42 = PyTuple_Pack(1, __pyx_kp_s_list_index_out_of_range); if (unlikely(!__pyx_tuple__42)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1321; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__42);
  __Pyx_GIVEREF(__pyx_tuple__42);

  /* "pyrobuf_list.pyx":1337
 * 
 *         if i < 0 or <size_t>i >= self._n_items or i < 0:
 *             raise IndexError("list index out of range")             # <<<<<<<<<<<<<<
 * 
 *         return self._data[i]
 */
  __pyx_tuple__43 = PyTuple_Pack(1, __pyx_kp_s_list_index_out_of_range); if (unlikely(!__pyx_tuple__43)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1337; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__43);
  __Pyx_GIVEREF(__pyx_tuple__43);

  /* "pyrobuf_list.pyx":1358
 * 
 *         if i < 0 or <size_t>i >= self._n_items:
 *             raise IndexError("list index out of range")             # <<<<<<<<<<<<<<
 * 
 *         self._data[i] = x
 */
  __pyx_tuple__44 = PyTuple_Pack(1, __pyx_kp_s_list_index_out_of_range); if (unlikely(!__pyx_tuple__44)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1358; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__44);
  __Pyx_GIVEREF(__pyx_tuple__44);

  /* "pyrobuf_list.pyx":1427
 * 
 *         if i < 0 or <size_t>i > self._n_items:
 *             raise IndexError("list index out of range")             # <<<<<<<<<<<<<<
 * 
 *         if self._n_items == self._size:
 */
  __pyx_tuple__45 = PyTuple_Pack(1, __pyx_kp_s_list_index_out_of_range); if (unlikely(!__pyx_tuple__45)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1427; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__45);
  __Pyx_GIVEREF(__pyx_tuple__45);

  /* "pyrobuf_list.pyx":1448
 *     cpdef pop(self):
 *         if self._n_items == 0:
 *             raise IndexError("pop from empty list")             # <<<<<<<<<<<<<<
 * 
 *         self._n_items -= 1
 */
  __pyx_tuple__46 = PyTuple_Pack(1, __pyx_kp_s_pop_from_empty_list); if (unlikely(!__pyx_tuple__46)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1448; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__46);
  __Pyx_GIVEREF(__pyx_tuple__46);

  /* "pyrobuf_list.pyx":1467
 * 
 *         if found == 0:
 *             raise ValueError("x not in list")             # <<<<<<<<<<<<<<
 * 
 *         for j in range(i, self._n_items):
 */
  __pyx_tuple__47 = PyTuple_Pack(1, __pyx_kp_s_x_not_in_list); if (unlikely(!__pyx_tuple__47)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1467; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__47);
  __Pyx_GIVEREF(__pyx_tuple__47);

  /* "pyrobuf_list.pyx":1523
 * 
 *         if i < 0 or <size_t>i >= self._n_items:
 *             raise IndexError("list index out of range")             # <<<<<<<<<<<<<<
 * 
 *         cdef size_t j
 */
  __pyx_tuple__48 = PyTuple_Pack(1, __pyx_kp_s_list_index_out_of_range); if (unlikely(!__pyx_tuple__48)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1523; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__48);
  __Pyx_GIVEREF(__pyx_tuple__48);

  /* "pyrobuf_list.pyx":1539
 * 
 *         if i < 0 or <size_t>i >= self._n_items or i < 0:
 *             raise IndexError("list index out of range")             # <<<<<<<<<<<<<<
 * 
 *         return self._data[i]
 */
  __pyx_tuple__49 = PyTuple_Pack(1, __pyx_kp_s_list_index_out_of_range); if (unlikely(!__pyx_tuple__49)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1539; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__49);
  __Pyx_GIVEREF(__pyx_tuple__49);

  /* "pyrobuf_list.pyx":1560
 * 
 *         if i < 0 or <size_t>i >= self._n_items:
 *             raise IndexError("list index out of range")             # <<<<<<<<<<<<<<
 * 
 *         self._data[i] = x
 */
  __pyx_tuple__50 = PyTuple_Pack(1, __pyx_kp_s_list_index_out_of_range); if (unlikely(!__pyx_tuple__50)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1560; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__50);
  __Pyx_GIVEREF(__pyx_tuple__50);

  /* "pyrobuf_list.pyx":1629
 * 
 *         if i < 0 or <size_t>i > self._n_items:
 *             raise IndexError("list index out of range")             # <<<<<<<<<<<<<<
 * 
 *         if self._n_items == self._size:
 */
  __pyx_tuple__51 = PyTuple_Pack(1, __pyx_kp_s_list_index_out_of_range); if (unlikely(!__pyx_tuple__51)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1629; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__51);
  __Pyx_GIVEREF(__pyx_tuple__51);

  /* "pyrobuf_list.pyx":1650
 *     cpdef pop(self):
 *         if self._n_items == 0:
 *             raise IndexError("pop from empty list")             # <<<<<<<<<<<<<<
 * 
 *         self._n_items -= 1
 */
  __pyx_tuple__52 = PyTuple_Pack(1, __pyx_kp_s_pop_from_empty_list); if (unlikely(!__pyx_tuple__52)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1650; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__52);
  __Pyx_GIVEREF(__pyx_tuple__52);

  /* "pyrobuf_list.pyx":1669
 * 
 *         if found == 0:
 *             raise ValueError("x not in list")             # <<<<<<<<<<<<<<
 * 
 *         for j in range(i, self._n_items):
 */
  __pyx_tuple__53 = PyTuple_Pack(1, __pyx_kp_s_x_not_in_list); if (unlikely(!__pyx_tuple__53)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1669; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__53);
  __Pyx_GIVEREF(__pyx_tuple__53);

  /* "pyrobuf_list.pyx":1725
 * 
 *         if i < 0 or <size_t>i >= self._n_items:
 *             raise IndexError("list index out of range")             # <<<<<<<<<<<<<<
 * 
 *         cdef size_t j
 */
  __pyx_tuple__54 = PyTuple_Pack(1, __pyx_kp_s_list_index_out_of_range); if (unlikely(!__pyx_tuple__54)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1725; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__54);
  __Pyx_GIVEREF(__pyx_tuple__54);

  /* "pyrobuf_list.pyx":1741
 * 
 *         if i < 0 or <size_t>i >= self._n_items or i < 0:
 *             raise IndexError("list index out of range")             # <<<<<<<<<<<<<<
 * 
 *         return self._data[i]
 */
  __pyx_tuple__55 = PyTuple_Pack(1, __pyx_kp_s_list_index_out_of_range); if (unlikely(!__pyx_tuple__55)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1741; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__55);
  __Pyx_GIVEREF(__pyx_tuple__55);

  /* "pyrobuf_list.pyx":1762
 * 
 *         if i < 0 or <size_t>i >= self._n_items:
 *             raise IndexError("list index out of range")             # <<<<<<<<<<<<<<
 * 
 *         self._data[i] = x
 */
  __pyx_tuple__56 = PyTuple_Pack(1, __pyx_kp_s_list_index_out_of_range); if (unlikely(!__pyx_tuple__56)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1762; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__56);
  __Pyx_GIVEREF(__pyx_tuple__56);

  /* "pyrobuf_list.pyx":1831
 * 
 *         if i < 0 or <size_t>i > self._n_items:
 *             raise IndexError("list index out of range")             # <<<<<<<<<<<<<<
 * 
 *         if self._n_items == self._size:
 */
  __pyx_tuple__57 = PyTuple_Pack(1, __pyx_kp_s_list_index_out_of_range); if (unlikely(!__pyx_tuple__57)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1831; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__57);
  __Pyx_GIVEREF(__pyx_tuple__57);

  /* "pyrobuf_list.pyx":1852
 *     cpdef pop(self):
 *         if self._n_items == 0:
 *             raise IndexError("pop from empty list")             # <<<<<<<<<<<<<<
 * 
 *         self._n_items -= 1
 */
  __pyx_tuple__58 = PyTuple_Pack(1, __pyx_kp_s_pop_from_empty_list); if (unlikely(!__pyx_tuple__58)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1852; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__58);
  __Pyx_GIVEREF(__pyx_tuple__58);

  /* "pyrobuf_list.pyx":1871
 * 
 *         if found == 0:
 *             raise ValueError("x not in list")             # <<<<<<<<<<<<<<
 * 
 *         for j in range(i, self._n_items):
 */
  __pyx_tuple__59 = PyTuple_Pack(1, __pyx_kp_s_x_not_in_list); if (unlikely(!__pyx_tuple__59)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1871; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_tuple__59);
  __Pyx_GIVEREF(__pyx_tuple__59);
  __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 initpyrobuf_list(void); /*proto*/
PyMODINIT_FUNC initpyrobuf_list(void)
#else
PyMODINIT_FUNC PyInit_pyrobuf_list(void); /*proto*/
PyMODINIT_FUNC PyInit_pyrobuf_list(void)
#endif
{
  PyObject *__pyx_t_1 = NULL;
  int __pyx_lineno = 0;
  const char *__pyx_filename = NULL;
  int __pyx_clineno = 0;
  __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_pyrobuf_list(void)", 0);
  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_CyFunction_USED
  if (__pyx_CyFunction_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  #endif
  #ifdef __Pyx_FusedFunction_USED
  if (__pyx_FusedFunction_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  #endif
  #ifdef __Pyx_Coroutine_USED
  if (__pyx_Coroutine_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  #endif
  #ifdef __Pyx_Generator_USED
  if (__pyx_Generator_init() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  #endif
  #ifdef __Pyx_StopAsyncIteration_USED
  if (__pyx_StopAsyncIteration_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("pyrobuf_list", __pyx_methods, 0, 0, PYTHON_API_VERSION); Py_XINCREF(__pyx_m);
  #else
  __pyx_m = PyModule_Create(&__pyx_moduledef);
  #endif
  if (unlikely(!__pyx_m)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  Py_INCREF(__pyx_d);
  __pyx_b = PyImport_AddModule(__Pyx_BUILTIN_MODULE_NAME); if (unlikely(!__pyx_b)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  #if CYTHON_COMPILING_IN_PYPY
  Py_INCREF(__pyx_b);
  #endif
  if (PyObject_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 (__Pyx_InitGlobals() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  #if PY_MAJOR_VERSION < 3 && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT)
  if (__Pyx_init_sys_getdefaultencoding_params() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  #endif
  if (__pyx_module_is_main_pyrobuf_list) {
    if (PyObject_SetAttrString(__pyx_m, "__name__", __pyx_n_s_main) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  }
  #if PY_MAJOR_VERSION >= 3
  {
    PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    if (!PyDict_GetItemString(modules, "pyrobuf_list")) {
      if (unlikely(PyDict_SetItemString(modules, "pyrobuf_list", __pyx_m) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
    }
  }
  #endif
  /*--- Builtin init code ---*/
  if (__Pyx_InitCachedBuiltins() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  /*--- Constants init code ---*/
  if (__Pyx_InitCachedConstants() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  /*--- Global init code ---*/
  null_listener = ((struct __pyx_obj_12pyrobuf_list_NullListener *)Py_None); Py_INCREF(Py_None);
  /*--- Variable export code ---*/
  if (__Pyx_ExportVoidPtr(__pyx_n_s_null_listener, (void *)&null_listener, "struct __pyx_obj_12pyrobuf_list_NullListener *") < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  /*--- Function export code ---*/
  /*--- Type init code ---*/
  __pyx_vtabptr_12pyrobuf_list_NullListener = &__pyx_vtable_12pyrobuf_list_NullListener;
  __pyx_vtable_12pyrobuf_list_NullListener._Modified = (void (*)(struct __pyx_obj_12pyrobuf_list_NullListener *, int __pyx_skip_dispatch))__pyx_f_12pyrobuf_list_12NullListener__Modified;
  if (PyType_Ready(&__pyx_type_12pyrobuf_list_NullListener) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_type_12pyrobuf_list_NullListener.tp_print = 0;
  if (__Pyx_SetVtable(__pyx_type_12pyrobuf_list_NullListener.tp_dict, __pyx_vtabptr_12pyrobuf_list_NullListener) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyObject_SetAttrString(__pyx_m, "NullListener", (PyObject *)&__pyx_type_12pyrobuf_list_NullListener) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_12pyrobuf_list_NullListener = &__pyx_type_12pyrobuf_list_NullListener;
  __pyx_type_12pyrobuf_list_TypedList.tp_base = (&PyList_Type);
  if (PyType_Ready(&__pyx_type_12pyrobuf_list_TypedList) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 17; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_type_12pyrobuf_list_TypedList.tp_print = 0;
  if (PyObject_SetAttrString(__pyx_m, "TypedList", (PyObject *)&__pyx_type_12pyrobuf_list_TypedList) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 17; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_12pyrobuf_list_TypedList = &__pyx_type_12pyrobuf_list_TypedList;
  __pyx_type_12pyrobuf_list_BytesList.tp_base = (&PyList_Type);
  if (PyType_Ready(&__pyx_type_12pyrobuf_list_BytesList) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_type_12pyrobuf_list_BytesList.tp_print = 0;
  if (PyObject_SetAttrString(__pyx_m, "BytesList", (PyObject *)&__pyx_type_12pyrobuf_list_BytesList) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 97; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_12pyrobuf_list_BytesList = &__pyx_type_12pyrobuf_list_BytesList;
  __pyx_type_12pyrobuf_list_StringList.tp_base = (&PyList_Type);
  if (PyType_Ready(&__pyx_type_12pyrobuf_list_StringList) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_type_12pyrobuf_list_StringList.tp_print = 0;
  if (PyObject_SetAttrString(__pyx_m, "StringList", (PyObject *)&__pyx_type_12pyrobuf_list_StringList) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_12pyrobuf_list_StringList = &__pyx_type_12pyrobuf_list_StringList;
  __pyx_vtabptr_12pyrobuf_list_Int64List = &__pyx_vtable_12pyrobuf_list_Int64List;
  __pyx_vtable_12pyrobuf_list_Int64List._append = (void (*)(struct __pyx_obj_12pyrobuf_list_Int64List *, int64_t))__pyx_f_12pyrobuf_list_9Int64List__append;
  __pyx_vtable_12pyrobuf_list_Int64List.append = (PyObject *(*)(struct __pyx_obj_12pyrobuf_list_Int64List *, int64_t, int __pyx_skip_dispatch))__pyx_f_12pyrobuf_list_9Int64List_append;
  __pyx_vtable_12pyrobuf_list_Int64List.extend = (PyObject *(*)(struct __pyx_obj_12pyrobuf_list_Int64List *, struct __pyx_obj_12pyrobuf_list_Int64List *, int __pyx_skip_dispatch))__pyx_f_12pyrobuf_list_9Int64List_extend;
  __pyx_vtable_12pyrobuf_list_Int64List.insert = (PyObject *(*)(struct __pyx_obj_12pyrobuf_list_Int64List *, int, int64_t, int __pyx_skip_dispatch))__pyx_f_12pyrobuf_list_9Int64List_insert;
  __pyx_vtable_12pyrobuf_list_Int64List.pop = (PyObject *(*)(struct __pyx_obj_12pyrobuf_list_Int64List *, int __pyx_skip_dispatch))__pyx_f_12pyrobuf_list_9Int64List_pop;
  __pyx_vtable_12pyrobuf_list_Int64List.remove = (PyObject *(*)(struct __pyx_obj_12pyrobuf_list_Int64List *, int64_t, int __pyx_skip_dispatch))__pyx_f_12pyrobuf_list_9Int64List_remove;
  if (PyType_Ready(&__pyx_type_12pyrobuf_list_Int64List) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 281; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_type_12pyrobuf_list_Int64List.tp_print = 0;
  if (__Pyx_SetVtable(__pyx_type_12pyrobuf_list_Int64List.tp_dict, __pyx_vtabptr_12pyrobuf_list_Int64List) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 281; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyObject_SetAttrString(__pyx_m, "Int64List", (PyObject *)&__pyx_type_12pyrobuf_list_Int64List) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 281; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_12pyrobuf_list_Int64List = &__pyx_type_12pyrobuf_list_Int64List;
  __pyx_vtabptr_12pyrobuf_list_Uint64List = &__pyx_vtable_12pyrobuf_list_Uint64List;
  __pyx_vtable_12pyrobuf_list_Uint64List._append = (void (*)(struct __pyx_obj_12pyrobuf_list_Uint64List *, uint64_t))__pyx_f_12pyrobuf_list_10Uint64List__append;
  __pyx_vtable_12pyrobuf_list_Uint64List.append = (PyObject *(*)(struct __pyx_obj_12pyrobuf_list_Uint64List *, uint64_t, int __pyx_skip_dispatch))__pyx_f_12pyrobuf_list_10Uint64List_append;
  __pyx_vtable_12pyrobuf_list_Uint64List.extend = (PyObject *(*)(struct __pyx_obj_12pyrobuf_list_Uint64List *, struct __pyx_obj_12pyrobuf_list_Uint64List *, int __pyx_skip_dispatch))__pyx_f_12pyrobuf_list_10Uint64List_extend;
  __pyx_vtable_12pyrobuf_list_Uint64List.insert = (PyObject *(*)(struct __pyx_obj_12pyrobuf_list_Uint64List *, int, uint64_t, int __pyx_skip_dispatch))__pyx_f_12pyrobuf_list_10Uint64List_insert;
  __pyx_vtable_12pyrobuf_list_Uint64List.pop = (PyObject *(*)(struct __pyx_obj_12pyrobuf_list_Uint64List *, int __pyx_skip_dispatch))__pyx_f_12pyrobuf_list_10Uint64List_pop;
  __pyx_vtable_12pyrobuf_list_Uint64List.remove = (PyObject *(*)(struct __pyx_obj_12pyrobuf_list_Uint64List *, uint64_t, int __pyx_skip_dispatch))__pyx_f_12pyrobuf_list_10Uint64List_remove;
  if (PyType_Ready(&__pyx_type_12pyrobuf_list_Uint64List) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 483; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_type_12pyrobuf_list_Uint64List.tp_print = 0;
  if (__Pyx_SetVtable(__pyx_type_12pyrobuf_list_Uint64List.tp_dict, __pyx_vtabptr_12pyrobuf_list_Uint64List) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 483; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyObject_SetAttrString(__pyx_m, "Uint64List", (PyObject *)&__pyx_type_12pyrobuf_list_Uint64List) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 483; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_12pyrobuf_list_Uint64List = &__pyx_type_12pyrobuf_list_Uint64List;
  __pyx_vtabptr_12pyrobuf_list_CharList = &__pyx_vtable_12pyrobuf_list_CharList;
  __pyx_vtable_12pyrobuf_list_CharList._append = (void (*)(struct __pyx_obj_12pyrobuf_list_CharList *, char))__pyx_f_12pyrobuf_list_8CharList__append;
  __pyx_vtable_12pyrobuf_list_CharList.append = (PyObject *(*)(struct __pyx_obj_12pyrobuf_list_CharList *, char, int __pyx_skip_dispatch))__pyx_f_12pyrobuf_list_8CharList_append;
  __pyx_vtable_12pyrobuf_list_CharList.extend = (PyObject *(*)(struct __pyx_obj_12pyrobuf_list_CharList *, struct __pyx_obj_12pyrobuf_list_CharList *, int __pyx_skip_dispatch))__pyx_f_12pyrobuf_list_8CharList_extend;
  __pyx_vtable_12pyrobuf_list_CharList.insert = (PyObject *(*)(struct __pyx_obj_12pyrobuf_list_CharList *, int, char, int __pyx_skip_dispatch))__pyx_f_12pyrobuf_list_8CharList_insert;
  __pyx_vtable_12pyrobuf_list_CharList.pop = (PyObject *(*)(struct __pyx_obj_12pyrobuf_list_CharList *, int __pyx_skip_dispatch))__pyx_f_12pyrobuf_list_8CharList_pop;
  __pyx_vtable_12pyrobuf_list_CharList.remove = (PyObject *(*)(struct __pyx_obj_12pyrobuf_list_CharList *, char, int __pyx_skip_dispatch))__pyx_f_12pyrobuf_list_8CharList_remove;
  if (PyType_Ready(&__pyx_type_12pyrobuf_list_CharList) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 685; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_type_12pyrobuf_list_CharList.tp_print = 0;
  if (__Pyx_SetVtable(__pyx_type_12pyrobuf_list_CharList.tp_dict, __pyx_vtabptr_12pyrobuf_list_CharList) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 685; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyObject_SetAttrString(__pyx_m, "CharList", (PyObject *)&__pyx_type_12pyrobuf_list_CharList) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 685; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_12pyrobuf_list_CharList = &__pyx_type_12pyrobuf_list_CharList;
  __pyx_vtabptr_12pyrobuf_list_Int32List = &__pyx_vtable_12pyrobuf_list_Int32List;
  __pyx_vtable_12pyrobuf_list_Int32List._append = (void (*)(struct __pyx_obj_12pyrobuf_list_Int32List *, int32_t))__pyx_f_12pyrobuf_list_9Int32List__append;
  __pyx_vtable_12pyrobuf_list_Int32List.append = (PyObject *(*)(struct __pyx_obj_12pyrobuf_list_Int32List *, int32_t, int __pyx_skip_dispatch))__pyx_f_12pyrobuf_list_9Int32List_append;
  __pyx_vtable_12pyrobuf_list_Int32List.extend = (PyObject *(*)(struct __pyx_obj_12pyrobuf_list_Int32List *, struct __pyx_obj_12pyrobuf_list_Int32List *, int __pyx_skip_dispatch))__pyx_f_12pyrobuf_list_9Int32List_extend;
  __pyx_vtable_12pyrobuf_list_Int32List.insert = (PyObject *(*)(struct __pyx_obj_12pyrobuf_list_Int32List *, int, int32_t, int __pyx_skip_dispatch))__pyx_f_12pyrobuf_list_9Int32List_insert;
  __pyx_vtable_12pyrobuf_list_Int32List.pop = (PyObject *(*)(struct __pyx_obj_12pyrobuf_list_Int32List *, int __pyx_skip_dispatch))__pyx_f_12pyrobuf_list_9Int32List_pop;
  __pyx_vtable_12pyrobuf_list_Int32List.remove = (PyObject *(*)(struct __pyx_obj_12pyrobuf_list_Int32List *, int32_t, int __pyx_skip_dispatch))__pyx_f_12pyrobuf_list_9Int32List_remove;
  if (PyType_Ready(&__pyx_type_12pyrobuf_list_Int32List) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 887; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_type_12pyrobuf_list_Int32List.tp_print = 0;
  if (__Pyx_SetVtable(__pyx_type_12pyrobuf_list_Int32List.tp_dict, __pyx_vtabptr_12pyrobuf_list_Int32List) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 887; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyObject_SetAttrString(__pyx_m, "Int32List", (PyObject *)&__pyx_type_12pyrobuf_list_Int32List) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 887; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_12pyrobuf_list_Int32List = &__pyx_type_12pyrobuf_list_Int32List;
  __pyx_vtabptr_12pyrobuf_list_IntList = &__pyx_vtable_12pyrobuf_list_IntList;
  __pyx_vtable_12pyrobuf_list_IntList._append = (void (*)(struct __pyx_obj_12pyrobuf_list_IntList *, int))__pyx_f_12pyrobuf_list_7IntList__append;
  __pyx_vtable_12pyrobuf_list_IntList.append = (PyObject *(*)(struct __pyx_obj_12pyrobuf_list_IntList *, int, int __pyx_skip_dispatch))__pyx_f_12pyrobuf_list_7IntList_append;
  __pyx_vtable_12pyrobuf_list_IntList.extend = (PyObject *(*)(struct __pyx_obj_12pyrobuf_list_IntList *, struct __pyx_obj_12pyrobuf_list_IntList *, int __pyx_skip_dispatch))__pyx_f_12pyrobuf_list_7IntList_extend;
  __pyx_vtable_12pyrobuf_list_IntList.insert = (PyObject *(*)(struct __pyx_obj_12pyrobuf_list_IntList *, int, int, int __pyx_skip_dispatch))__pyx_f_12pyrobuf_list_7IntList_insert;
  __pyx_vtable_12pyrobuf_list_IntList.pop = (PyObject *(*)(struct __pyx_obj_12pyrobuf_list_IntList *, int __pyx_skip_dispatch))__pyx_f_12pyrobuf_list_7IntList_pop;
  __pyx_vtable_12pyrobuf_list_IntList.remove = (PyObject *(*)(struct __pyx_obj_12pyrobuf_list_IntList *, int, int __pyx_skip_dispatch))__pyx_f_12pyrobuf_list_7IntList_remove;
  if (PyType_Ready(&__pyx_type_12pyrobuf_list_IntList) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1089; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_type_12pyrobuf_list_IntList.tp_print = 0;
  if (__Pyx_SetVtable(__pyx_type_12pyrobuf_list_IntList.tp_dict, __pyx_vtabptr_12pyrobuf_list_IntList) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1089; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyObject_SetAttrString(__pyx_m, "IntList", (PyObject *)&__pyx_type_12pyrobuf_list_IntList) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1089; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_12pyrobuf_list_IntList = &__pyx_type_12pyrobuf_list_IntList;
  __pyx_vtabptr_12pyrobuf_list_DoubleList = &__pyx_vtable_12pyrobuf_list_DoubleList;
  __pyx_vtable_12pyrobuf_list_DoubleList._append = (void (*)(struct __pyx_obj_12pyrobuf_list_DoubleList *, double))__pyx_f_12pyrobuf_list_10DoubleList__append;
  __pyx_vtable_12pyrobuf_list_DoubleList.append = (PyObject *(*)(struct __pyx_obj_12pyrobuf_list_DoubleList *, double, int __pyx_skip_dispatch))__pyx_f_12pyrobuf_list_10DoubleList_append;
  __pyx_vtable_12pyrobuf_list_DoubleList.extend = (PyObject *(*)(struct __pyx_obj_12pyrobuf_list_DoubleList *, struct __pyx_obj_12pyrobuf_list_DoubleList *, int __pyx_skip_dispatch))__pyx_f_12pyrobuf_list_10DoubleList_extend;
  __pyx_vtable_12pyrobuf_list_DoubleList.insert = (PyObject *(*)(struct __pyx_obj_12pyrobuf_list_DoubleList *, int, double, int __pyx_skip_dispatch))__pyx_f_12pyrobuf_list_10DoubleList_insert;
  __pyx_vtable_12pyrobuf_list_DoubleList.pop = (PyObject *(*)(struct __pyx_obj_12pyrobuf_list_DoubleList *, int __pyx_skip_dispatch))__pyx_f_12pyrobuf_list_10DoubleList_pop;
  __pyx_vtable_12pyrobuf_list_DoubleList.remove = (PyObject *(*)(struct __pyx_obj_12pyrobuf_list_DoubleList *, double, int __pyx_skip_dispatch))__pyx_f_12pyrobuf_list_10DoubleList_remove;
  if (PyType_Ready(&__pyx_type_12pyrobuf_list_DoubleList) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1291; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_type_12pyrobuf_list_DoubleList.tp_print = 0;
  if (__Pyx_SetVtable(__pyx_type_12pyrobuf_list_DoubleList.tp_dict, __pyx_vtabptr_12pyrobuf_list_DoubleList) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1291; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyObject_SetAttrString(__pyx_m, "DoubleList", (PyObject *)&__pyx_type_12pyrobuf_list_DoubleList) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1291; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_12pyrobuf_list_DoubleList = &__pyx_type_12pyrobuf_list_DoubleList;
  __pyx_vtabptr_12pyrobuf_list_FloatList = &__pyx_vtable_12pyrobuf_list_FloatList;
  __pyx_vtable_12pyrobuf_list_FloatList._append = (void (*)(struct __pyx_obj_12pyrobuf_list_FloatList *, float))__pyx_f_12pyrobuf_list_9FloatList__append;
  __pyx_vtable_12pyrobuf_list_FloatList.append = (PyObject *(*)(struct __pyx_obj_12pyrobuf_list_FloatList *, float, int __pyx_skip_dispatch))__pyx_f_12pyrobuf_list_9FloatList_append;
  __pyx_vtable_12pyrobuf_list_FloatList.extend = (PyObject *(*)(struct __pyx_obj_12pyrobuf_list_FloatList *, struct __pyx_obj_12pyrobuf_list_FloatList *, int __pyx_skip_dispatch))__pyx_f_12pyrobuf_list_9FloatList_extend;
  __pyx_vtable_12pyrobuf_list_FloatList.insert = (PyObject *(*)(struct __pyx_obj_12pyrobuf_list_FloatList *, int, float, int __pyx_skip_dispatch))__pyx_f_12pyrobuf_list_9FloatList_insert;
  __pyx_vtable_12pyrobuf_list_FloatList.pop = (PyObject *(*)(struct __pyx_obj_12pyrobuf_list_FloatList *, int __pyx_skip_dispatch))__pyx_f_12pyrobuf_list_9FloatList_pop;
  __pyx_vtable_12pyrobuf_list_FloatList.remove = (PyObject *(*)(struct __pyx_obj_12pyrobuf_list_FloatList *, float, int __pyx_skip_dispatch))__pyx_f_12pyrobuf_list_9FloatList_remove;
  if (PyType_Ready(&__pyx_type_12pyrobuf_list_FloatList) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1493; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_type_12pyrobuf_list_FloatList.tp_print = 0;
  if (__Pyx_SetVtable(__pyx_type_12pyrobuf_list_FloatList.tp_dict, __pyx_vtabptr_12pyrobuf_list_FloatList) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1493; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyObject_SetAttrString(__pyx_m, "FloatList", (PyObject *)&__pyx_type_12pyrobuf_list_FloatList) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1493; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_12pyrobuf_list_FloatList = &__pyx_type_12pyrobuf_list_FloatList;
  __pyx_vtabptr_12pyrobuf_list_Uint32List = &__pyx_vtable_12pyrobuf_list_Uint32List;
  __pyx_vtable_12pyrobuf_list_Uint32List._append = (void (*)(struct __pyx_obj_12pyrobuf_list_Uint32List *, uint32_t))__pyx_f_12pyrobuf_list_10Uint32List__append;
  __pyx_vtable_12pyrobuf_list_Uint32List.append = (PyObject *(*)(struct __pyx_obj_12pyrobuf_list_Uint32List *, uint32_t, int __pyx_skip_dispatch))__pyx_f_12pyrobuf_list_10Uint32List_append;
  __pyx_vtable_12pyrobuf_list_Uint32List.extend = (PyObject *(*)(struct __pyx_obj_12pyrobuf_list_Uint32List *, struct __pyx_obj_12pyrobuf_list_Uint32List *, int __pyx_skip_dispatch))__pyx_f_12pyrobuf_list_10Uint32List_extend;
  __pyx_vtable_12pyrobuf_list_Uint32List.insert = (PyObject *(*)(struct __pyx_obj_12pyrobuf_list_Uint32List *, int, uint32_t, int __pyx_skip_dispatch))__pyx_f_12pyrobuf_list_10Uint32List_insert;
  __pyx_vtable_12pyrobuf_list_Uint32List.pop = (PyObject *(*)(struct __pyx_obj_12pyrobuf_list_Uint32List *, int __pyx_skip_dispatch))__pyx_f_12pyrobuf_list_10Uint32List_pop;
  __pyx_vtable_12pyrobuf_list_Uint32List.remove = (PyObject *(*)(struct __pyx_obj_12pyrobuf_list_Uint32List *, uint32_t, int __pyx_skip_dispatch))__pyx_f_12pyrobuf_list_10Uint32List_remove;
  if (PyType_Ready(&__pyx_type_12pyrobuf_list_Uint32List) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1695; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_type_12pyrobuf_list_Uint32List.tp_print = 0;
  if (__Pyx_SetVtable(__pyx_type_12pyrobuf_list_Uint32List.tp_dict, __pyx_vtabptr_12pyrobuf_list_Uint32List) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1695; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  if (PyObject_SetAttrString(__pyx_m, "Uint32List", (PyObject *)&__pyx_type_12pyrobuf_list_Uint32List) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1695; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_12pyrobuf_list_Uint32List = &__pyx_type_12pyrobuf_list_Uint32List;
  if (PyType_Ready(&__pyx_type_12pyrobuf_list___pyx_scope_struct____iter__) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 331; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_type_12pyrobuf_list___pyx_scope_struct____iter__.tp_print = 0;
  __pyx_ptype_12pyrobuf_list___pyx_scope_struct____iter__ = &__pyx_type_12pyrobuf_list___pyx_scope_struct____iter__;
  if (PyType_Ready(&__pyx_type_12pyrobuf_list___pyx_scope_struct_1___iter__) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 533; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_type_12pyrobuf_list___pyx_scope_struct_1___iter__.tp_print = 0;
  __pyx_ptype_12pyrobuf_list___pyx_scope_struct_1___iter__ = &__pyx_type_12pyrobuf_list___pyx_scope_struct_1___iter__;
  if (PyType_Ready(&__pyx_type_12pyrobuf_list___pyx_scope_struct_2___iter__) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 735; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_type_12pyrobuf_list___pyx_scope_struct_2___iter__.tp_print = 0;
  __pyx_ptype_12pyrobuf_list___pyx_scope_struct_2___iter__ = &__pyx_type_12pyrobuf_list___pyx_scope_struct_2___iter__;
  if (PyType_Ready(&__pyx_type_12pyrobuf_list___pyx_scope_struct_3___iter__) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 937; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_type_12pyrobuf_list___pyx_scope_struct_3___iter__.tp_print = 0;
  __pyx_ptype_12pyrobuf_list___pyx_scope_struct_3___iter__ = &__pyx_type_12pyrobuf_list___pyx_scope_struct_3___iter__;
  if (PyType_Ready(&__pyx_type_12pyrobuf_list___pyx_scope_struct_4___iter__) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1139; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_type_12pyrobuf_list___pyx_scope_struct_4___iter__.tp_print = 0;
  __pyx_ptype_12pyrobuf_list___pyx_scope_struct_4___iter__ = &__pyx_type_12pyrobuf_list___pyx_scope_struct_4___iter__;
  if (PyType_Ready(&__pyx_type_12pyrobuf_list___pyx_scope_struct_5___iter__) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1341; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_type_12pyrobuf_list___pyx_scope_struct_5___iter__.tp_print = 0;
  __pyx_ptype_12pyrobuf_list___pyx_scope_struct_5___iter__ = &__pyx_type_12pyrobuf_list___pyx_scope_struct_5___iter__;
  if (PyType_Ready(&__pyx_type_12pyrobuf_list___pyx_scope_struct_6___iter__) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1543; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_type_12pyrobuf_list___pyx_scope_struct_6___iter__.tp_print = 0;
  __pyx_ptype_12pyrobuf_list___pyx_scope_struct_6___iter__ = &__pyx_type_12pyrobuf_list___pyx_scope_struct_6___iter__;
  if (PyType_Ready(&__pyx_type_12pyrobuf_list___pyx_scope_struct_7___iter__) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1745; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_type_12pyrobuf_list___pyx_scope_struct_7___iter__.tp_print = 0;
  __pyx_ptype_12pyrobuf_list___pyx_scope_struct_7___iter__ = &__pyx_type_12pyrobuf_list___pyx_scope_struct_7___iter__;
  /*--- Type import code ---*/
  __pyx_ptype_7cpython_4type_type = __Pyx_ImportType(__Pyx_BUILTIN_MODULE_NAME, "type", 
  #if CYTHON_COMPILING_IN_PYPY
  sizeof(PyTypeObject),
  #else
  sizeof(PyHeapTypeObject),
  #endif
  0); if (unlikely(!__pyx_ptype_7cpython_4type_type)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 9; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_7cpython_4bool_bool = __Pyx_ImportType(__Pyx_BUILTIN_MODULE_NAME, "bool", sizeof(PyBoolObject), 0); if (unlikely(!__pyx_ptype_7cpython_4bool_bool)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 8; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __pyx_ptype_7cpython_7complex_complex = __Pyx_ImportType(__Pyx_BUILTIN_MODULE_NAME, "complex", sizeof(PyComplexObject), 0); if (unlikely(!__pyx_ptype_7cpython_7complex_complex)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 15; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  /*--- Variable import code ---*/
  /*--- Function import code ---*/
  /*--- Execution code ---*/
  #if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
  if (__Pyx_patch_abc() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  #endif

  /* "pyrobuf_list.pyx":14
 *         return
 * 
 * cdef public NullListener null_listener = NullListener()             # <<<<<<<<<<<<<<
 * 
 * 
 */
  __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)__pyx_ptype_12pyrobuf_list_NullListener), __pyx_empty_tuple, NULL); 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);
  __Pyx_XGOTREF(((PyObject *)null_listener));
  __Pyx_DECREF_SET(null_listener, ((struct __pyx_obj_12pyrobuf_list_NullListener *)__pyx_t_1));
  __Pyx_GIVEREF(__pyx_t_1);
  __pyx_t_1 = 0;

  /* "pyrobuf_list.pyx":1
 * from cpython.mem cimport PyMem_Malloc, PyMem_Realloc, PyMem_Free             # <<<<<<<<<<<<<<
 * from libc.stdint cimport *
 * from cpython.ref cimport PyObject
 */
  __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_GOTREF(__pyx_t_1);
  if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
  __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;

  /*--- Wrapped vars code ---*/

  goto __pyx_L0;
  __pyx_L1_error:;
  __Pyx_XDECREF(__pyx_t_1);
  if (__pyx_m) {
    if (__pyx_d) {
      __Pyx_AddTraceback("init pyrobuf_list", __pyx_clineno, __pyx_lineno, __pyx_filename);
    }
    Py_DECREF(__pyx_m); __pyx_m = 0;
  } else if (!PyErr_Occurred()) {
    PyErr_SetString(PyExc_ImportError, "init pyrobuf_list");
  }
  __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

static PyObject *__Pyx_GetBuiltinName(PyObject *name) {
    PyObject* result = __Pyx_PyObject_GetAttrStr(__pyx_b, name);
    if (unlikely(!result)) {
        PyErr_Format(PyExc_NameError,
#if PY_MAJOR_VERSION >= 3
            "name '%U' is not defined", name);
#else
            "name '%.200s' is not defined", PyString_AS_STRING(name));
#endif
    }
    return result;
}

#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) {
    PyObject *result;
    ternaryfunc call = func->ob_type->tp_call;
    if (unlikely(!call))
        return PyObject_Call(func, arg, kw);
    if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
        return NULL;
    result = (*call)(func, arg, kw);
    Py_LeaveRecursiveCall();
    if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
        PyErr_SetString(
            PyExc_SystemError,
            "NULL result without error in PyObject_Call");
    }
    return result;
}
#endif

#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallMethO(PyObject *func, PyObject *arg) {
    PyObject *self, *result;
    PyCFunction cfunc;
    cfunc = PyCFunction_GET_FUNCTION(func);
    self = PyCFunction_GET_SELF(func);
    if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object")))
        return NULL;
    result = cfunc(self, arg);
    Py_LeaveRecursiveCall();
    if (unlikely(!result) && unlikely(!PyErr_Occurred())) {
        PyErr_SetString(
            PyExc_SystemError,
            "NULL result without error in PyObject_Call");
    }
    return result;
}
#endif

#if CYTHON_COMPILING_IN_CPYTHON
static PyObject* __Pyx__PyObject_CallOneArg(PyObject *func, PyObject *arg) {
    PyObject *result;
    PyObject *args = PyTuple_New(1);
    if (unlikely(!args)) return NULL;
    Py_INCREF(arg);
    PyTuple_SET_ITEM(args, 0, arg);
    result = __Pyx_PyObject_Call(func, args, NULL);
    Py_DECREF(args);
    return result;
}
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
#ifdef __Pyx_CyFunction_USED
    if (likely(PyCFunction_Check(func) || PyObject_TypeCheck(func, __pyx_CyFunctionType))) {
#else
    if (likely(PyCFunction_Check(func))) {
#endif
        if (likely(PyCFunction_GET_FLAGS(func) & METH_O)) {
            return __Pyx_PyObject_CallMethO(func, arg);
        }
    }
    return __Pyx__PyObject_CallOneArg(func, arg);
}
#else
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallOneArg(PyObject *func, PyObject *arg) {
    PyObject *result;
    PyObject *args = PyTuple_Pack(1, arg);
    if (unlikely(!args)) return NULL;
    result = __Pyx_PyObject_Call(func, args, NULL);
    Py_DECREF(args);
    return result;
}
#endif

#if CYTHON_COMPILING_IN_CPYTHON
static CYTHON_INLINE PyObject* __Pyx_PyObject_CallNoArg(PyObject *func) {
#ifdef __Pyx_CyFunction_USED
    if (likely(PyCFunction_Check(func) || PyObject_TypeCheck(func, __pyx_CyFunctionType))) {
#else
    if (likely(PyCFunction_Check(func))) {
#endif
        if (likely(PyCFunction_GET_FLAGS(func) & METH_NOARGS)) {
            return __Pyx_PyObject_CallMethO(func, NULL);
        }
    }
    return __Pyx_PyObject_Call(func, __pyx_empty_tuple, NULL);
}
#endif

static CYTHON_INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb) {
#if CYTHON_COMPILING_IN_CPYTHON
    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);
#else
    PyErr_Restore(type, value, tb);
#endif
}
static CYTHON_INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb) {
#if CYTHON_COMPILING_IN_CPYTHON
    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;
#else
    PyErr_Fetch(type, value, tb);
#endif
}

static void __Pyx_WriteUnraisable(const char *name, CYTHON_UNUSED int clineno,
                                  CYTHON_UNUSED int lineno, CYTHON_UNUSED const char *filename,
                                  int full_traceback, CYTHON_UNUSED int nogil) {
    PyObject *old_exc, *old_val, *old_tb;
    PyObject *ctx;
#ifdef WITH_THREAD
    PyGILState_STATE state;
    if (nogil)
        state = PyGILState_Ensure();
#endif
    __Pyx_ErrFetch(&old_exc, &old_val, &old_tb);
    if (full_traceback) {
        Py_XINCREF(old_exc);
        Py_XINCREF(old_val);
        Py_XINCREF(old_tb);
        __Pyx_ErrRestore(old_exc, old_val, old_tb);
        PyErr_PrintEx(1);
    }
    #if PY_MAJOR_VERSION < 3
    ctx = PyString_FromString(name);
    #else
    ctx = PyUnicode_FromString(name);
    #endif
    __Pyx_ErrRestore(old_exc, old_val, old_tb);
    if (!ctx) {
        PyErr_WriteUnraisable(Py_None);
    } else {
        PyErr_WriteUnraisable(ctx);
        Py_DECREF(ctx);
    }
#ifdef WITH_THREAD
    if (nogil)
        PyGILState_Release(state);
#endif
}

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_AsString(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;
            continue;
        }
        name = first_kw_arg;
        #if PY_MAJOR_VERSION < 3
        if (likely(PyString_CheckExact(key)) || likely(PyString_Check(key))) {
            while (*name) {
                if ((CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**name) == PyString_GET_SIZE(key))
                        && _PyString_Eq(**name, key)) {
                    values[name-argnames] = value;
                    break;
                }
                name++;
            }
            if (*name) continue;
            else {
                PyObject*** argname = argnames;
                while (argname != first_kw_arg) {
                    if ((**argname == key) || (
                            (CYTHON_COMPILING_IN_PYPY || PyString_GET_SIZE(**argname) == PyString_GET_SIZE(key))
                             && _PyString_Eq(**argname, key))) {
                        goto arg_passed_twice;
                    }
                    argname++;
                }
            }
        } else
        #endif
        if (likely(PyUnicode_Check(key))) {
            while (*name) {
                int cmp = (**name == key) ? 0 :
                #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
                    (PyUnicode_GET_SIZE(**name) != PyUnicode_GET_SIZE(key)) ? 1 :
                #endif
                    PyUnicode_Compare(**name, key);
                if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
                if (cmp == 0) {
                    values[name-argnames] = value;
                    break;
                }
                name++;
            }
            if (*name) continue;
            else {
                PyObject*** argname = argnames;
                while (argname != first_kw_arg) {
                    int cmp = (**argname == key) ? 0 :
                    #if !CYTHON_COMPILING_IN_PYPY && PY_MAJOR_VERSION >= 3
                        (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
                    #endif
                        PyUnicode_Compare(**argname, key);
                    if (cmp < 0 && unlikely(PyErr_Occurred())) goto bad;
                    if (cmp == 0) goto arg_passed_twice;
                    argname++;
                }
            }
        } else
            goto invalid_keyword_type;
        if (kwds2) {
            if (unlikely(PyDict_SetItem(kwds2, key, value))) goto bad;
        } else {
            goto invalid_keyword;
        }
    }
    return 0;
arg_passed_twice:
    __Pyx_RaiseDoubleKeywordsError(function_name, key);
    goto bad;
invalid_keyword_type:
    PyErr_Format(PyExc_TypeError,
        "%.200s() keywords must be strings", function_name);
    goto bad;
invalid_keyword:
    PyErr_Format(PyExc_TypeError,
    #if PY_MAJOR_VERSION < 3
        "%.200s() got an unexpected keyword argument '%.200s'",
        function_name, PyString_AsString(key));
    #else
        "%s() got an unexpected keyword argument '%U'",
        function_name, key);
    #endif
bad:
    return -1;
}

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,
                 "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T "d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T "d given)",
                 func_name, more_or_less, num_expected,
                 (num_expected == 1) ? "" : "s", num_found);
}

static void __Pyx_RaiseArgumentTypeInvalid(const char* name, PyObject *obj, PyTypeObject *type) {
    PyErr_Format(PyExc_TypeError,
        "Argument '%.200s' has incorrect type (expected %.200s, got %.200s)",
        name, type->tp_name, Py_TYPE(obj)->tp_name);
}
static CYTHON_INLINE int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed,
    const char *name, int exact)
{
    if (unlikely(!type)) {
        PyErr_SetString(PyExc_SystemError, "Missing type object");
        return 0;
    }
    if (none_allowed && obj == Py_None) return 1;
    else if (exact) {
        if (likely(Py_TYPE(obj) == type)) return 1;
        #if PY_MAJOR_VERSION == 2
        else if ((type == &PyBaseString_Type) && likely(__Pyx_PyBaseString_CheckExact(obj))) return 1;
        #endif
    }
    else {
        if (likely(PyObject_TypeCheck(obj, type))) return 1;
    }
    __Pyx_RaiseArgumentTypeInvalid(name, obj, type);
    return 0;
}

static CYTHON_INLINE void __Pyx_ExceptionSave(PyObject **type, PyObject **value, PyObject **tb) {
#if CYTHON_COMPILING_IN_CPYTHON
    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);
#else
    PyErr_GetExcInfo(type, value, tb);
#endif
}
static void __Pyx_ExceptionReset(PyObject *type, PyObject *value, PyObject *tb) {
#if CYTHON_COMPILING_IN_CPYTHON
    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);
#else
    PyErr_SetExcInfo(type, value, tb);
#endif
}

static int __Pyx_GetException(PyObject **type, PyObject **value, PyObject **tb) {
    PyObject *local_type, *local_value, *local_tb;
#if CYTHON_COMPILING_IN_CPYTHON
    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;
#else
    PyErr_Fetch(&local_type, &local_value, &local_tb);
#endif
    PyErr_NormalizeException(&local_type, &local_value, &local_tb);
#if CYTHON_COMPILING_IN_CPYTHON
    if (unlikely(tstate->curexc_type))
#else
    if (unlikely(PyErr_Occurred()))
#endif
        goto bad;
    #if PY_MAJOR_VERSION >= 3
    if (local_tb) {
        if (unlikely(PyException_SetTraceback(local_value, local_tb) < 0))
            goto bad;
    }
    #endif
    Py_XINCREF(local_tb);
    Py_XINCREF(local_type);
    Py_XINCREF(local_value);
    *type = local_type;
    *value = local_value;
    *tb = local_tb;
#if CYTHON_COMPILING_IN_CPYTHON
    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;
    Py_XDECREF(tmp_type);
    Py_XDECREF(tmp_value);
    Py_XDECREF(tmp_tb);
#else
    PyErr_SetExcInfo(local_type, local_value, local_tb);
#endif
    return 0;
bad:
    *type = 0;
    *value = 0;
    *tb = 0;
    Py_XDECREF(local_type);
    Py_XDECREF(local_value);
    Py_XDECREF(local_tb);
    return -1;
}

#if PY_MAJOR_VERSION < 3
static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb,
                        CYTHON_UNUSED PyObject *cause) {
    Py_XINCREF(type);
    if (!value || value == Py_None)
        value = NULL;
    else
        Py_INCREF(value);
    if (!tb || tb == Py_None)
        tb = NULL;
    else {
        Py_INCREF(tb);
        if (!PyTraceBack_Check(tb)) {
            PyErr_SetString(PyExc_TypeError,
                "raise: arg 3 must be a traceback or None");
            goto raise_error;
        }
    }
    if (PyType_Check(type)) {
#if CYTHON_COMPILING_IN_PYPY
        if (!value) {
            Py_INCREF(Py_None);
            value = Py_None;
        }
#endif
        PyErr_NormalizeException(&type, &value, &tb);
    } else {
        if (value) {
            PyErr_SetString(PyExc_TypeError,
                "instance exception may not have a separate value");
            goto raise_error;
        }
        value = type;
        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;
        }
    }
    __Pyx_ErrRestore(type, value, tb);
    return;
raise_error:
    Py_XDECREF(value);
    Py_XDECREF(type);
    Py_XDECREF(tb);
    return;
}
#else
static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) {
    PyObject* owned_instance = NULL;
    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)) {
        PyObject *instance_class = NULL;
        if (value && PyExceptionInstance_Check(value)) {
            instance_class = (PyObject*) Py_TYPE(value);
            if (instance_class != type) {
                int is_subclass = PyObject_IsSubclass(instance_class, type);
                if (!is_subclass) {
                    instance_class = NULL;
                } else if (unlikely(is_subclass == -1)) {
                    goto bad;
                } else {
                    type = instance_class;
                }
            }
        }
        if (!instance_class) {
            PyObject *args;
            if (!value)
                args = PyTuple_New(0);
            else if (PyTuple_Check(value)) {
                Py_INCREF(value);
                args = value;
            } else
                args = PyTuple_Pack(1, value);
            if (!args)
                goto bad;
            owned_instance = PyObject_Call(type, args, NULL);
            Py_DECREF(args);
            if (!owned_instance)
                goto bad;
            value = owned_instance;
            if (!PyExceptionInstance_Check(value)) {
                PyErr_Format(PyExc_TypeError,
                             "calling %R should have returned an instance of "
                             "BaseException, not %R",
                             type, Py_TYPE(value));
                goto bad;
            }
        }
    } else {
        PyErr_SetString(PyExc_TypeError,
            "raise: exception class must be a subclass of BaseException");
        goto bad;
    }
#if PY_VERSION_HEX >= 0x03030000
    if (cause) {
#else
    if (cause && cause != Py_None) {
#endif
        PyObject *fixed_cause;
        if (cause == Py_None) {
            fixed_cause = NULL;
        } else 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;
        }
        PyException_SetCause(value, fixed_cause);
    }
    PyErr_SetObject(type, value);
    if (tb) {
#if CYTHON_COMPILING_IN_PYPY
        PyObject *tmp_type, *tmp_value, *tmp_tb;
        PyErr_Fetch(&tmp_type, &tmp_value, &tmp_tb);
        Py_INCREF(tb);
        PyErr_Restore(tmp_type, tmp_value, tb);
        Py_XDECREF(tmp_tb);
#else
        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);
        }
#endif
    }
bad:
    Py_XDECREF(owned_instance);
    return;
}
#endif

static CYTHON_INLINE int __Pyx_CheckKeywordStrings(
    PyObject *kwdict,
    const char* function_name,
    int kw_allowed)
{
    PyObject* key = 0;
    Py_ssize_t pos = 0;
#if CYTHON_COMPILING_IN_PYPY
    if (!kw_allowed && PyDict_Next(kwdict, &pos, &key, 0))
        goto invalid_keyword;
    return 1;
#else
    while (PyDict_Next(kwdict, &pos, &key, 0)) {
        #if PY_MAJOR_VERSION < 3
        if (unlikely(!PyString_CheckExact(key)) && unlikely(!PyString_Check(key)))
        #endif
            if (unlikely(!PyUnicode_Check(key)))
                goto invalid_keyword_type;
    }
    if ((!kw_allowed) && unlikely(key))
        goto invalid_keyword;
    return 1;
invalid_keyword_type:
    PyErr_Format(PyExc_TypeError,
        "%.200s() keywords must be strings", function_name);
    return 0;
#endif
invalid_keyword:
    PyErr_Format(PyExc_TypeError,
    #if PY_MAJOR_VERSION < 3
        "%.200s() got an unexpected keyword argument '%.200s'",
        function_name, PyString_AsString(key));
    #else
        "%s() got an unexpected keyword argument '%U'",
        function_name, key);
    #endif
    return 0;
}

static PyObject* __Pyx_PyObject_CallMethod1(PyObject* obj, PyObject* method_name, PyObject* arg) {
    PyObject *method, *result = NULL;
    method = __Pyx_PyObject_GetAttrStr(obj, method_name);
    if (unlikely(!method)) goto bad;
#if CYTHON_COMPILING_IN_CPYTHON
    if (likely(PyMethod_Check(method))) {
        PyObject *self = PyMethod_GET_SELF(method);
        if (likely(self)) {
            PyObject *args;
            PyObject *function = PyMethod_GET_FUNCTION(method);
            args = PyTuple_New(2);
            if (unlikely(!args)) goto bad;
            Py_INCREF(self);
            PyTuple_SET_ITEM(args, 0, self);
            Py_INCREF(arg);
            PyTuple_SET_ITEM(args, 1, arg);
            Py_INCREF(function);
            Py_DECREF(method); method = NULL;
            result = __Pyx_PyObject_Call(function, args, NULL);
            Py_DECREF(args);
            Py_DECREF(function);
            return result;
        }
    }
#endif
    result = __Pyx_PyObject_CallOneArg(method, arg);
bad:
    Py_XDECREF(method);
    return result;
}

static CYTHON_INLINE int __Pyx_PyObject_Append(PyObject* L, PyObject* x) {
    if (likely(PyList_CheckExact(L))) {
        if (unlikely(__Pyx_PyList_Append(L, x) < 0)) return -1;
    } else {
        PyObject* retval = __Pyx_PyObject_CallMethod1(L, __pyx_n_s_append, x);
        if (unlikely(!retval))
            return -1;
        Py_DECREF(retval);
    }
    return 0;
}

static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) {
    PyObject *r;
    if (!j) return NULL;
    r = PyObject_GetItem(o, j);
    Py_DECREF(j);
    return r;
}
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i,
                                                              CYTHON_NCP_UNUSED int wraparound,
                                                              CYTHON_NCP_UNUSED int boundscheck) {
#if CYTHON_COMPILING_IN_CPYTHON
    if (wraparound & unlikely(i < 0)) i += PyList_GET_SIZE(o);
    if ((!boundscheck) || likely((0 <= i) & (i < PyList_GET_SIZE(o)))) {
        PyObject *r = PyList_GET_ITEM(o, i);
        Py_INCREF(r);
        return r;
    }
    return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
#else
    return PySequence_GetItem(o, i);
#endif
}
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i,
                                                              CYTHON_NCP_UNUSED int wraparound,
                                                              CYTHON_NCP_UNUSED int boundscheck) {
#if CYTHON_COMPILING_IN_CPYTHON
    if (wraparound & unlikely(i < 0)) i += PyTuple_GET_SIZE(o);
    if ((!boundscheck) || likely((0 <= i) & (i < PyTuple_GET_SIZE(o)))) {
        PyObject *r = PyTuple_GET_ITEM(o, i);
        Py_INCREF(r);
        return r;
    }
    return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
#else
    return PySequence_GetItem(o, i);
#endif
}
static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, int is_list,
                                                     CYTHON_NCP_UNUSED int wraparound,
                                                     CYTHON_NCP_UNUSED int boundscheck) {
#if CYTHON_COMPILING_IN_CPYTHON
    if (is_list || PyList_CheckExact(o)) {
        Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyList_GET_SIZE(o);
        if ((!boundscheck) || (likely((n >= 0) & (n < PyList_GET_SIZE(o))))) {
            PyObject *r = PyList_GET_ITEM(o, n);
            Py_INCREF(r);
            return r;
        }
    }
    else if (PyTuple_CheckExact(o)) {
        Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o);
        if ((!boundscheck) || likely((n >= 0) & (n < PyTuple_GET_SIZE(o)))) {
            PyObject *r = PyTuple_GET_ITEM(o, n);
            Py_INCREF(r);
            return r;
        }
    } else {
        PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence;
        if (likely(m && m->sq_item)) {
            if (wraparound && unlikely(i < 0) && likely(m->sq_length)) {
                Py_ssize_t l = m->sq_length(o);
                if (likely(l >= 0)) {
                    i += l;
                } else {
                    if (PyErr_ExceptionMatches(PyExc_OverflowError))
                        PyErr_Clear();
                    else
                        return NULL;
                }
            }
            return m->sq_item(o, i);
        }
    }
#else
    if (is_list || PySequence_Check(o)) {
        return PySequence_GetItem(o, i);
    }
#endif
    return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i));
}

static int __Pyx_SetVtable(PyObject *dict, void *vtable) {
#if PY_VERSION_HEX >= 0x02070000
    PyObject *ob = PyCapsule_New(vtable, 0, 0);
#else
    PyObject *ob = PyCObject_FromVoidPtr(vtable, 0);
#endif
    if (!ob)
        goto bad;
    if (PyDict_SetItem(dict, __pyx_n_s_pyx_vtable, ob) < 0)
        goto bad;
    Py_DECREF(ob);
    return 0;
bad:
    Py_XDECREF(ob);
    return -1;
}

static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) {
    int start = 0, mid = 0, end = count - 1;
    if (end >= 0 && code_line > entries[end].code_line) {
        return count;
    }
    while (start < end) {
        mid = start + (end - start) / 2;
        if (code_line < entries[mid].code_line) {
            end = mid;
        } else if (code_line > entries[mid].code_line) {
             start = mid + 1;
        } else {
            return mid;
        }
    }
    if (code_line <= entries[mid].code_line) {
        return mid;
    } else {
        return mid + 1;
    }
}
static PyCodeObject *__pyx_find_code_object(int code_line) {
    PyCodeObject* code_object;
    int pos;
    if (unlikely(!code_line) || unlikely(!__pyx_code_cache.entries)) {
        return NULL;
    }
    pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
    if (unlikely(pos >= __pyx_code_cache.count) || unlikely(__pyx_code_cache.entries[pos].code_line != code_line)) {
        return NULL;
    }
    code_object = __pyx_code_cache.entries[pos].code_object;
    Py_INCREF(code_object);
    return code_object;
}
static void __pyx_insert_code_object(int code_line, PyCodeObject* code_object) {
    int pos, i;
    __Pyx_CodeObjectCacheEntry* entries = __pyx_code_cache.entries;
    if (unlikely(!code_line)) {
        return;
    }
    if (unlikely(!entries)) {
        entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Malloc(64*sizeof(__Pyx_CodeObjectCacheEntry));
        if (likely(entries)) {
            __pyx_code_cache.entries = entries;
            __pyx_code_cache.max_count = 64;
            __pyx_code_cache.count = 1;
            entries[0].code_line = code_line;
            entries[0].code_object = code_object;
            Py_INCREF(code_object);
        }
        return;
    }
    pos = __pyx_bisect_code_objects(__pyx_code_cache.entries, __pyx_code_cache.count, code_line);
    if ((pos < __pyx_code_cache.count) && unlikely(__pyx_code_cache.entries[pos].code_line == code_line)) {
        PyCodeObject* tmp = entries[pos].code_object;
        entries[pos].code_object = code_object;
        Py_DECREF(tmp);
        return;
    }
    if (__pyx_code_cache.count == __pyx_code_cache.max_count) {
        int new_max = __pyx_code_cache.max_count + 64;
        entries = (__Pyx_CodeObjectCacheEntry*)PyMem_Realloc(
            __pyx_code_cache.entries, (size_t)new_max*sizeof(__Pyx_CodeObjectCacheEntry));
        if (unlikely(!entries)) {
            return;
        }
        __pyx_code_cache.entries = entries;
        __pyx_code_cache.max_count = new_max;
    }
    for (i=__pyx_code_cache.count; i>pos; i--) {
        entries[i] = entries[i-1];
    }
    entries[pos].code_line = code_line;
    entries[pos].code_object = code_object;
    __pyx_code_cache.count++;
    Py_INCREF(code_object);
}

#include "compile.h"
#include "frameobject.h"
#include "traceback.h"
static PyCodeObject* __Pyx_CreateCodeObjectForTraceback(
            const char *funcname, int c_line,
            int py_line, const char *filename) {
    PyCodeObject *py_code = 0;
    PyObject *py_srcfile = 0;
    PyObject *py_funcname = 0;
    #if PY_MAJOR_VERSION < 3
    py_srcfile = PyString_FromString(filename);
    #else
    py_srcfile = PyUnicode_FromString(filename);
    #endif
    if (!py_srcfile) goto bad;
    if (c_line) {
        #if PY_MAJOR_VERSION < 3
        py_funcname = PyString_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
        #else
        py_funcname = PyUnicode_FromFormat( "%s (%s:%d)", funcname, __pyx_cfilenm, c_line);
        #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_code = __Pyx_PyCode_New(
        0,
        0,
        0,
        0,
        0,
        __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,*/
        py_line,
        __pyx_empty_bytes  /*PyObject *lnotab*/
    );
    Py_DECREF(py_srcfile);
    Py_DECREF(py_funcname);
    return py_code;
bad:
    Py_XDECREF(py_srcfile);
    Py_XDECREF(py_funcname);
    return NULL;
}
static void __Pyx_AddTraceback(const char *funcname, int c_line,
                               int py_line, const char *filename) {
    PyCodeObject *py_code = 0;
    PyFrameObject *py_frame = 0;
    py_code = __pyx_find_code_object(c_line ? c_line : py_line);
    if (!py_code) {
        py_code = __Pyx_CreateCodeObjectForTraceback(
            funcname, c_line, py_line, filename);
        if (!py_code) goto bad;
        __pyx_insert_code_object(c_line ? c_line : py_line, py_code);
    }
    py_frame = PyFrame_New(
        PyThreadState_GET(), /*PyThreadState *tstate,*/
        py_code,             /*PyCodeObject *code,*/
        __pyx_d,      /*PyObject *globals,*/
        0                    /*PyObject *locals*/
    );
    if (!py_frame) goto bad;
    py_frame->f_lineno = py_line;
    PyTraceBack_Here(py_frame);
bad:
    Py_XDECREF(py_code);
    Py_XDECREF(py_frame);
}

#define __PYX_VERIFY_RETURN_INT(target_type, func_type, func_value)\
    __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 0)
#define __PYX_VERIFY_RETURN_INT_EXC(target_type, func_type, func_value)\
    __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, 1)
#define __PYX__VERIFY_RETURN_INT(target_type, func_type, func_value, exc)\
    {\
        func_type value = func_value;\
        if (sizeof(target_type) < sizeof(func_type)) {\
            if (unlikely(value != (func_type) (target_type) value)) {\
                func_type zero = 0;\
                if (exc && unlikely(value == (func_type)-1 && PyErr_Occurred()))\
                    return (target_type) -1;\
                if (is_unsigned && unlikely(value < zero))\
                    goto raise_neg_overflow;\
                else\
                    goto raise_overflow;\
            }\
        }\
        return (target_type) value;\
    }

#if CYTHON_USE_PYLONG_INTERNALS
  #include "longintrepr.h"
#endif

static CYTHON_INLINE size_t __Pyx_PyInt_As_size_t(PyObject *x) {
    const size_t neg_one = (size_t) -1, const_zero = (size_t) 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(size_t) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(size_t, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (size_t) val;
        }
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (size_t) 0;
                case  1: __PYX_VERIFY_RETURN_INT(size_t, digit, digits[0])
                case 2:
                    if (8 * sizeof(size_t) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(size_t) >= 2 * PyLong_SHIFT) {
                            return (size_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(size_t) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(size_t) >= 3 * PyLong_SHIFT) {
                            return (size_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(size_t) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(size_t) >= 4 * PyLong_SHIFT) {
                            return (size_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
                        }
                    }
                    break;
            }
#endif
#if CYTHON_COMPILING_IN_CPYTHON
            if (unlikely(Py_SIZE(x) < 0)) {
                goto raise_neg_overflow;
            }
#else
            {
                int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
                if (unlikely(result < 0))
                    return (size_t) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(size_t) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(size_t, unsigned long, PyLong_AsUnsignedLong(x))
            } else if (sizeof(size_t) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(size_t, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (size_t) 0;
                case -1: __PYX_VERIFY_RETURN_INT(size_t, sdigit, -(sdigit) digits[0])
                case  1: __PYX_VERIFY_RETURN_INT(size_t,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(size_t) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(size_t, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(size_t) - 1 > 2 * PyLong_SHIFT) {
                            return (size_t) (((size_t)-1)*(((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(size_t) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(size_t) - 1 > 2 * PyLong_SHIFT) {
                            return (size_t) ((((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(size_t) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(size_t, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(size_t) - 1 > 3 * PyLong_SHIFT) {
                            return (size_t) (((size_t)-1)*(((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(size_t) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(size_t) - 1 > 3 * PyLong_SHIFT) {
                            return (size_t) ((((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(size_t) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(size_t, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(size_t) - 1 > 4 * PyLong_SHIFT) {
                            return (size_t) (((size_t)-1)*(((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(size_t) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(size_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(size_t) - 1 > 4 * PyLong_SHIFT) {
                            return (size_t) ((((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(size_t) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(size_t, long, PyLong_AsLong(x))
            } else if (sizeof(size_t) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(size_t, PY_LONG_LONG, PyLong_AsLongLong(x))
            }
        }
        {
#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
#else
            size_t val;
            PyObject *v = __Pyx_PyNumber_Int(x);
 #if PY_MAJOR_VERSION < 3
            if (likely(v) && !PyLong_Check(v)) {
                PyObject *tmp = v;
                v = PyNumber_Long(tmp);
                Py_DECREF(tmp);
            }
 #endif
            if (likely(v)) {
                int one = 1; int is_little = (int)*(unsigned char *)&one;
                unsigned char *bytes = (unsigned char *)&val;
                int ret = _PyLong_AsByteArray((PyLongObject *)v,
                                              bytes, sizeof(val),
                                              is_little, !is_unsigned);
                Py_DECREF(v);
                if (likely(!ret))
                    return val;
            }
#endif
            return (size_t) -1;
        }
    } else {
        size_t val;
        PyObject *tmp = __Pyx_PyNumber_Int(x);
        if (!tmp) return (size_t) -1;
        val = __Pyx_PyInt_As_size_t(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to size_t");
    return (size_t) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to size_t");
    return (size_t) -1;
}

static CYTHON_INLINE int64_t __Pyx_PyInt_As_int64_t(PyObject *x) {
    const int64_t neg_one = (int64_t) -1, const_zero = (int64_t) 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(int64_t) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(int64_t, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (int64_t) val;
        }
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (int64_t) 0;
                case  1: __PYX_VERIFY_RETURN_INT(int64_t, digit, digits[0])
                case 2:
                    if (8 * sizeof(int64_t) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int64_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int64_t) >= 2 * PyLong_SHIFT) {
                            return (int64_t) (((((int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(int64_t) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int64_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int64_t) >= 3 * PyLong_SHIFT) {
                            return (int64_t) (((((((int64_t)digits[2]) << PyLong_SHIFT) | (int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(int64_t) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int64_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int64_t) >= 4 * PyLong_SHIFT) {
                            return (int64_t) (((((((((int64_t)digits[3]) << PyLong_SHIFT) | (int64_t)digits[2]) << PyLong_SHIFT) | (int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0]));
                        }
                    }
                    break;
            }
#endif
#if CYTHON_COMPILING_IN_CPYTHON
            if (unlikely(Py_SIZE(x) < 0)) {
                goto raise_neg_overflow;
            }
#else
            {
                int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
                if (unlikely(result < 0))
                    return (int64_t) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(int64_t) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(int64_t, unsigned long, PyLong_AsUnsignedLong(x))
            } else if (sizeof(int64_t) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(int64_t, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (int64_t) 0;
                case -1: __PYX_VERIFY_RETURN_INT(int64_t, sdigit, -(sdigit) digits[0])
                case  1: __PYX_VERIFY_RETURN_INT(int64_t,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(int64_t) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int64_t, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int64_t) - 1 > 2 * PyLong_SHIFT) {
                            return (int64_t) (((int64_t)-1)*(((((int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(int64_t) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int64_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int64_t) - 1 > 2 * PyLong_SHIFT) {
                            return (int64_t) ((((((int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(int64_t) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int64_t, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int64_t) - 1 > 3 * PyLong_SHIFT) {
                            return (int64_t) (((int64_t)-1)*(((((((int64_t)digits[2]) << PyLong_SHIFT) | (int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(int64_t) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int64_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int64_t) - 1 > 3 * PyLong_SHIFT) {
                            return (int64_t) ((((((((int64_t)digits[2]) << PyLong_SHIFT) | (int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(int64_t) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int64_t, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int64_t) - 1 > 4 * PyLong_SHIFT) {
                            return (int64_t) (((int64_t)-1)*(((((((((int64_t)digits[3]) << PyLong_SHIFT) | (int64_t)digits[2]) << PyLong_SHIFT) | (int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(int64_t) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int64_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int64_t) - 1 > 4 * PyLong_SHIFT) {
                            return (int64_t) ((((((((((int64_t)digits[3]) << PyLong_SHIFT) | (int64_t)digits[2]) << PyLong_SHIFT) | (int64_t)digits[1]) << PyLong_SHIFT) | (int64_t)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(int64_t) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(int64_t, long, PyLong_AsLong(x))
            } else if (sizeof(int64_t) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(int64_t, PY_LONG_LONG, PyLong_AsLongLong(x))
            }
        }
        {
#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
#else
            int64_t val;
            PyObject *v = __Pyx_PyNumber_Int(x);
 #if PY_MAJOR_VERSION < 3
            if (likely(v) && !PyLong_Check(v)) {
                PyObject *tmp = v;
                v = PyNumber_Long(tmp);
                Py_DECREF(tmp);
            }
 #endif
            if (likely(v)) {
                int one = 1; int is_little = (int)*(unsigned char *)&one;
                unsigned char *bytes = (unsigned char *)&val;
                int ret = _PyLong_AsByteArray((PyLongObject *)v,
                                              bytes, sizeof(val),
                                              is_little, !is_unsigned);
                Py_DECREF(v);
                if (likely(!ret))
                    return val;
            }
#endif
            return (int64_t) -1;
        }
    } else {
        int64_t val;
        PyObject *tmp = __Pyx_PyNumber_Int(x);
        if (!tmp) return (int64_t) -1;
        val = __Pyx_PyInt_As_int64_t(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to int64_t");
    return (int64_t) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to int64_t");
    return (int64_t) -1;
}

static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) {
    const int neg_one = (int) -1, const_zero = (int) 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(int) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(int, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (int) val;
        }
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (int) 0;
                case  1: __PYX_VERIFY_RETURN_INT(int, digit, digits[0])
                case 2:
                    if (8 * sizeof(int) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) >= 2 * PyLong_SHIFT) {
                            return (int) (((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(int) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) >= 3 * PyLong_SHIFT) {
                            return (int) (((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(int) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) >= 4 * PyLong_SHIFT) {
                            return (int) (((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0]));
                        }
                    }
                    break;
            }
#endif
#if CYTHON_COMPILING_IN_CPYTHON
            if (unlikely(Py_SIZE(x) < 0)) {
                goto raise_neg_overflow;
            }
#else
            {
                int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
                if (unlikely(result < 0))
                    return (int) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(int) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(int, unsigned long, PyLong_AsUnsignedLong(x))
            } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(int, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (int) 0;
                case -1: __PYX_VERIFY_RETURN_INT(int, sdigit, -(sdigit) digits[0])
                case  1: __PYX_VERIFY_RETURN_INT(int,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(int) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
                            return (int) (((int)-1)*(((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(int) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
                            return (int) ((((((int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(int) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
                            return (int) (((int)-1)*(((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(int) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
                            return (int) ((((((((int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(int) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) {
                            return (int) (((int)-1)*(((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(int) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int) - 1 > 4 * PyLong_SHIFT) {
                            return (int) ((((((((((int)digits[3]) << PyLong_SHIFT) | (int)digits[2]) << PyLong_SHIFT) | (int)digits[1]) << PyLong_SHIFT) | (int)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(int) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(int, long, PyLong_AsLong(x))
            } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(int, PY_LONG_LONG, PyLong_AsLongLong(x))
            }
        }
        {
#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
#else
            int val;
            PyObject *v = __Pyx_PyNumber_Int(x);
 #if PY_MAJOR_VERSION < 3
            if (likely(v) && !PyLong_Check(v)) {
                PyObject *tmp = v;
                v = PyNumber_Long(tmp);
                Py_DECREF(tmp);
            }
 #endif
            if (likely(v)) {
                int one = 1; int is_little = (int)*(unsigned char *)&one;
                unsigned char *bytes = (unsigned char *)&val;
                int ret = _PyLong_AsByteArray((PyLongObject *)v,
                                              bytes, sizeof(val),
                                              is_little, !is_unsigned);
                Py_DECREF(v);
                if (likely(!ret))
                    return val;
            }
#endif
            return (int) -1;
        }
    } else {
        int val;
        PyObject *tmp = __Pyx_PyNumber_Int(x);
        if (!tmp) return (int) -1;
        val = __Pyx_PyInt_As_int(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to int");
    return (int) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to int");
    return (int) -1;
}

static CYTHON_INLINE uint64_t __Pyx_PyInt_As_uint64_t(PyObject *x) {
    const uint64_t neg_one = (uint64_t) -1, const_zero = (uint64_t) 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(uint64_t) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(uint64_t, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (uint64_t) val;
        }
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (uint64_t) 0;
                case  1: __PYX_VERIFY_RETURN_INT(uint64_t, digit, digits[0])
                case 2:
                    if (8 * sizeof(uint64_t) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(uint64_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(uint64_t) >= 2 * PyLong_SHIFT) {
                            return (uint64_t) (((((uint64_t)digits[1]) << PyLong_SHIFT) | (uint64_t)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(uint64_t) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(uint64_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(uint64_t) >= 3 * PyLong_SHIFT) {
                            return (uint64_t) (((((((uint64_t)digits[2]) << PyLong_SHIFT) | (uint64_t)digits[1]) << PyLong_SHIFT) | (uint64_t)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(uint64_t) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(uint64_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(uint64_t) >= 4 * PyLong_SHIFT) {
                            return (uint64_t) (((((((((uint64_t)digits[3]) << PyLong_SHIFT) | (uint64_t)digits[2]) << PyLong_SHIFT) | (uint64_t)digits[1]) << PyLong_SHIFT) | (uint64_t)digits[0]));
                        }
                    }
                    break;
            }
#endif
#if CYTHON_COMPILING_IN_CPYTHON
            if (unlikely(Py_SIZE(x) < 0)) {
                goto raise_neg_overflow;
            }
#else
            {
                int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
                if (unlikely(result < 0))
                    return (uint64_t) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(uint64_t) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(uint64_t, unsigned long, PyLong_AsUnsignedLong(x))
            } else if (sizeof(uint64_t) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(uint64_t, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (uint64_t) 0;
                case -1: __PYX_VERIFY_RETURN_INT(uint64_t, sdigit, -(sdigit) digits[0])
                case  1: __PYX_VERIFY_RETURN_INT(uint64_t,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(uint64_t) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(uint64_t, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(uint64_t) - 1 > 2 * PyLong_SHIFT) {
                            return (uint64_t) (((uint64_t)-1)*(((((uint64_t)digits[1]) << PyLong_SHIFT) | (uint64_t)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(uint64_t) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(uint64_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(uint64_t) - 1 > 2 * PyLong_SHIFT) {
                            return (uint64_t) ((((((uint64_t)digits[1]) << PyLong_SHIFT) | (uint64_t)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(uint64_t) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(uint64_t, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(uint64_t) - 1 > 3 * PyLong_SHIFT) {
                            return (uint64_t) (((uint64_t)-1)*(((((((uint64_t)digits[2]) << PyLong_SHIFT) | (uint64_t)digits[1]) << PyLong_SHIFT) | (uint64_t)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(uint64_t) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(uint64_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(uint64_t) - 1 > 3 * PyLong_SHIFT) {
                            return (uint64_t) ((((((((uint64_t)digits[2]) << PyLong_SHIFT) | (uint64_t)digits[1]) << PyLong_SHIFT) | (uint64_t)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(uint64_t) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(uint64_t, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(uint64_t) - 1 > 4 * PyLong_SHIFT) {
                            return (uint64_t) (((uint64_t)-1)*(((((((((uint64_t)digits[3]) << PyLong_SHIFT) | (uint64_t)digits[2]) << PyLong_SHIFT) | (uint64_t)digits[1]) << PyLong_SHIFT) | (uint64_t)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(uint64_t) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(uint64_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(uint64_t) - 1 > 4 * PyLong_SHIFT) {
                            return (uint64_t) ((((((((((uint64_t)digits[3]) << PyLong_SHIFT) | (uint64_t)digits[2]) << PyLong_SHIFT) | (uint64_t)digits[1]) << PyLong_SHIFT) | (uint64_t)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(uint64_t) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(uint64_t, long, PyLong_AsLong(x))
            } else if (sizeof(uint64_t) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(uint64_t, PY_LONG_LONG, PyLong_AsLongLong(x))
            }
        }
        {
#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
#else
            uint64_t val;
            PyObject *v = __Pyx_PyNumber_Int(x);
 #if PY_MAJOR_VERSION < 3
            if (likely(v) && !PyLong_Check(v)) {
                PyObject *tmp = v;
                v = PyNumber_Long(tmp);
                Py_DECREF(tmp);
            }
 #endif
            if (likely(v)) {
                int one = 1; int is_little = (int)*(unsigned char *)&one;
                unsigned char *bytes = (unsigned char *)&val;
                int ret = _PyLong_AsByteArray((PyLongObject *)v,
                                              bytes, sizeof(val),
                                              is_little, !is_unsigned);
                Py_DECREF(v);
                if (likely(!ret))
                    return val;
            }
#endif
            return (uint64_t) -1;
        }
    } else {
        uint64_t val;
        PyObject *tmp = __Pyx_PyNumber_Int(x);
        if (!tmp) return (uint64_t) -1;
        val = __Pyx_PyInt_As_uint64_t(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to uint64_t");
    return (uint64_t) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to uint64_t");
    return (uint64_t) -1;
}

static CYTHON_INLINE char __Pyx_PyInt_As_char(PyObject *x) {
    const char neg_one = (char) -1, const_zero = (char) 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(char) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(char, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (char) val;
        }
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (char) 0;
                case  1: __PYX_VERIFY_RETURN_INT(char, digit, digits[0])
                case 2:
                    if (8 * sizeof(char) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(char) >= 2 * PyLong_SHIFT) {
                            return (char) (((((char)digits[1]) << PyLong_SHIFT) | (char)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(char) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(char) >= 3 * PyLong_SHIFT) {
                            return (char) (((((((char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(char) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(char) >= 4 * PyLong_SHIFT) {
                            return (char) (((((((((char)digits[3]) << PyLong_SHIFT) | (char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0]));
                        }
                    }
                    break;
            }
#endif
#if CYTHON_COMPILING_IN_CPYTHON
            if (unlikely(Py_SIZE(x) < 0)) {
                goto raise_neg_overflow;
            }
#else
            {
                int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
                if (unlikely(result < 0))
                    return (char) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(char) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(char, unsigned long, PyLong_AsUnsignedLong(x))
            } else if (sizeof(char) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(char, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (char) 0;
                case -1: __PYX_VERIFY_RETURN_INT(char, sdigit, -(sdigit) digits[0])
                case  1: __PYX_VERIFY_RETURN_INT(char,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(char) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(char, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(char) - 1 > 2 * PyLong_SHIFT) {
                            return (char) (((char)-1)*(((((char)digits[1]) << PyLong_SHIFT) | (char)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(char) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(char) - 1 > 2 * PyLong_SHIFT) {
                            return (char) ((((((char)digits[1]) << PyLong_SHIFT) | (char)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(char) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(char, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(char) - 1 > 3 * PyLong_SHIFT) {
                            return (char) (((char)-1)*(((((((char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(char) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(char) - 1 > 3 * PyLong_SHIFT) {
                            return (char) ((((((((char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(char) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(char, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(char) - 1 > 4 * PyLong_SHIFT) {
                            return (char) (((char)-1)*(((((((((char)digits[3]) << PyLong_SHIFT) | (char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(char) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(char, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(char) - 1 > 4 * PyLong_SHIFT) {
                            return (char) ((((((((((char)digits[3]) << PyLong_SHIFT) | (char)digits[2]) << PyLong_SHIFT) | (char)digits[1]) << PyLong_SHIFT) | (char)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(char) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(char, long, PyLong_AsLong(x))
            } else if (sizeof(char) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(char, PY_LONG_LONG, PyLong_AsLongLong(x))
            }
        }
        {
#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
#else
            char val;
            PyObject *v = __Pyx_PyNumber_Int(x);
 #if PY_MAJOR_VERSION < 3
            if (likely(v) && !PyLong_Check(v)) {
                PyObject *tmp = v;
                v = PyNumber_Long(tmp);
                Py_DECREF(tmp);
            }
 #endif
            if (likely(v)) {
                int one = 1; int is_little = (int)*(unsigned char *)&one;
                unsigned char *bytes = (unsigned char *)&val;
                int ret = _PyLong_AsByteArray((PyLongObject *)v,
                                              bytes, sizeof(val),
                                              is_little, !is_unsigned);
                Py_DECREF(v);
                if (likely(!ret))
                    return val;
            }
#endif
            return (char) -1;
        }
    } else {
        char val;
        PyObject *tmp = __Pyx_PyNumber_Int(x);
        if (!tmp) return (char) -1;
        val = __Pyx_PyInt_As_char(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to char");
    return (char) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to char");
    return (char) -1;
}

static CYTHON_INLINE int32_t __Pyx_PyInt_As_int32_t(PyObject *x) {
    const int32_t neg_one = (int32_t) -1, const_zero = (int32_t) 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(int32_t) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(int32_t, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (int32_t) val;
        }
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (int32_t) 0;
                case  1: __PYX_VERIFY_RETURN_INT(int32_t, digit, digits[0])
                case 2:
                    if (8 * sizeof(int32_t) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int32_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int32_t) >= 2 * PyLong_SHIFT) {
                            return (int32_t) (((((int32_t)digits[1]) << PyLong_SHIFT) | (int32_t)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(int32_t) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int32_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int32_t) >= 3 * PyLong_SHIFT) {
                            return (int32_t) (((((((int32_t)digits[2]) << PyLong_SHIFT) | (int32_t)digits[1]) << PyLong_SHIFT) | (int32_t)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(int32_t) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int32_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int32_t) >= 4 * PyLong_SHIFT) {
                            return (int32_t) (((((((((int32_t)digits[3]) << PyLong_SHIFT) | (int32_t)digits[2]) << PyLong_SHIFT) | (int32_t)digits[1]) << PyLong_SHIFT) | (int32_t)digits[0]));
                        }
                    }
                    break;
            }
#endif
#if CYTHON_COMPILING_IN_CPYTHON
            if (unlikely(Py_SIZE(x) < 0)) {
                goto raise_neg_overflow;
            }
#else
            {
                int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
                if (unlikely(result < 0))
                    return (int32_t) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(int32_t) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(int32_t, unsigned long, PyLong_AsUnsignedLong(x))
            } else if (sizeof(int32_t) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(int32_t, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (int32_t) 0;
                case -1: __PYX_VERIFY_RETURN_INT(int32_t, sdigit, -(sdigit) digits[0])
                case  1: __PYX_VERIFY_RETURN_INT(int32_t,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(int32_t) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int32_t, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int32_t) - 1 > 2 * PyLong_SHIFT) {
                            return (int32_t) (((int32_t)-1)*(((((int32_t)digits[1]) << PyLong_SHIFT) | (int32_t)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(int32_t) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int32_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int32_t) - 1 > 2 * PyLong_SHIFT) {
                            return (int32_t) ((((((int32_t)digits[1]) << PyLong_SHIFT) | (int32_t)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(int32_t) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int32_t, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int32_t) - 1 > 3 * PyLong_SHIFT) {
                            return (int32_t) (((int32_t)-1)*(((((((int32_t)digits[2]) << PyLong_SHIFT) | (int32_t)digits[1]) << PyLong_SHIFT) | (int32_t)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(int32_t) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int32_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int32_t) - 1 > 3 * PyLong_SHIFT) {
                            return (int32_t) ((((((((int32_t)digits[2]) << PyLong_SHIFT) | (int32_t)digits[1]) << PyLong_SHIFT) | (int32_t)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(int32_t) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int32_t, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int32_t) - 1 > 4 * PyLong_SHIFT) {
                            return (int32_t) (((int32_t)-1)*(((((((((int32_t)digits[3]) << PyLong_SHIFT) | (int32_t)digits[2]) << PyLong_SHIFT) | (int32_t)digits[1]) << PyLong_SHIFT) | (int32_t)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(int32_t) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(int32_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(int32_t) - 1 > 4 * PyLong_SHIFT) {
                            return (int32_t) ((((((((((int32_t)digits[3]) << PyLong_SHIFT) | (int32_t)digits[2]) << PyLong_SHIFT) | (int32_t)digits[1]) << PyLong_SHIFT) | (int32_t)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(int32_t) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(int32_t, long, PyLong_AsLong(x))
            } else if (sizeof(int32_t) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(int32_t, PY_LONG_LONG, PyLong_AsLongLong(x))
            }
        }
        {
#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
#else
            int32_t val;
            PyObject *v = __Pyx_PyNumber_Int(x);
 #if PY_MAJOR_VERSION < 3
            if (likely(v) && !PyLong_Check(v)) {
                PyObject *tmp = v;
                v = PyNumber_Long(tmp);
                Py_DECREF(tmp);
            }
 #endif
            if (likely(v)) {
                int one = 1; int is_little = (int)*(unsigned char *)&one;
                unsigned char *bytes = (unsigned char *)&val;
                int ret = _PyLong_AsByteArray((PyLongObject *)v,
                                              bytes, sizeof(val),
                                              is_little, !is_unsigned);
                Py_DECREF(v);
                if (likely(!ret))
                    return val;
            }
#endif
            return (int32_t) -1;
        }
    } else {
        int32_t val;
        PyObject *tmp = __Pyx_PyNumber_Int(x);
        if (!tmp) return (int32_t) -1;
        val = __Pyx_PyInt_As_int32_t(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to int32_t");
    return (int32_t) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to int32_t");
    return (int32_t) -1;
}

static CYTHON_INLINE uint32_t __Pyx_PyInt_As_uint32_t(PyObject *x) {
    const uint32_t neg_one = (uint32_t) -1, const_zero = (uint32_t) 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(uint32_t) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(uint32_t, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (uint32_t) val;
        }
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (uint32_t) 0;
                case  1: __PYX_VERIFY_RETURN_INT(uint32_t, digit, digits[0])
                case 2:
                    if (8 * sizeof(uint32_t) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(uint32_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(uint32_t) >= 2 * PyLong_SHIFT) {
                            return (uint32_t) (((((uint32_t)digits[1]) << PyLong_SHIFT) | (uint32_t)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(uint32_t) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(uint32_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(uint32_t) >= 3 * PyLong_SHIFT) {
                            return (uint32_t) (((((((uint32_t)digits[2]) << PyLong_SHIFT) | (uint32_t)digits[1]) << PyLong_SHIFT) | (uint32_t)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(uint32_t) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(uint32_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(uint32_t) >= 4 * PyLong_SHIFT) {
                            return (uint32_t) (((((((((uint32_t)digits[3]) << PyLong_SHIFT) | (uint32_t)digits[2]) << PyLong_SHIFT) | (uint32_t)digits[1]) << PyLong_SHIFT) | (uint32_t)digits[0]));
                        }
                    }
                    break;
            }
#endif
#if CYTHON_COMPILING_IN_CPYTHON
            if (unlikely(Py_SIZE(x) < 0)) {
                goto raise_neg_overflow;
            }
#else
            {
                int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
                if (unlikely(result < 0))
                    return (uint32_t) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(uint32_t) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(uint32_t, unsigned long, PyLong_AsUnsignedLong(x))
            } else if (sizeof(uint32_t) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(uint32_t, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (uint32_t) 0;
                case -1: __PYX_VERIFY_RETURN_INT(uint32_t, sdigit, -(sdigit) digits[0])
                case  1: __PYX_VERIFY_RETURN_INT(uint32_t,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(uint32_t) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(uint32_t, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(uint32_t) - 1 > 2 * PyLong_SHIFT) {
                            return (uint32_t) (((uint32_t)-1)*(((((uint32_t)digits[1]) << PyLong_SHIFT) | (uint32_t)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(uint32_t) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(uint32_t, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(uint32_t) - 1 > 2 * PyLong_SHIFT) {
                            return (uint32_t) ((((((uint32_t)digits[1]) << PyLong_SHIFT) | (uint32_t)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(uint32_t) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(uint32_t, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(uint32_t) - 1 > 3 * PyLong_SHIFT) {
                            return (uint32_t) (((uint32_t)-1)*(((((((uint32_t)digits[2]) << PyLong_SHIFT) | (uint32_t)digits[1]) << PyLong_SHIFT) | (uint32_t)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(uint32_t) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(uint32_t, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(uint32_t) - 1 > 3 * PyLong_SHIFT) {
                            return (uint32_t) ((((((((uint32_t)digits[2]) << PyLong_SHIFT) | (uint32_t)digits[1]) << PyLong_SHIFT) | (uint32_t)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(uint32_t) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(uint32_t, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(uint32_t) - 1 > 4 * PyLong_SHIFT) {
                            return (uint32_t) (((uint32_t)-1)*(((((((((uint32_t)digits[3]) << PyLong_SHIFT) | (uint32_t)digits[2]) << PyLong_SHIFT) | (uint32_t)digits[1]) << PyLong_SHIFT) | (uint32_t)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(uint32_t) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(uint32_t, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(uint32_t) - 1 > 4 * PyLong_SHIFT) {
                            return (uint32_t) ((((((((((uint32_t)digits[3]) << PyLong_SHIFT) | (uint32_t)digits[2]) << PyLong_SHIFT) | (uint32_t)digits[1]) << PyLong_SHIFT) | (uint32_t)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(uint32_t) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(uint32_t, long, PyLong_AsLong(x))
            } else if (sizeof(uint32_t) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(uint32_t, PY_LONG_LONG, PyLong_AsLongLong(x))
            }
        }
        {
#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
#else
            uint32_t val;
            PyObject *v = __Pyx_PyNumber_Int(x);
 #if PY_MAJOR_VERSION < 3
            if (likely(v) && !PyLong_Check(v)) {
                PyObject *tmp = v;
                v = PyNumber_Long(tmp);
                Py_DECREF(tmp);
            }
 #endif
            if (likely(v)) {
                int one = 1; int is_little = (int)*(unsigned char *)&one;
                unsigned char *bytes = (unsigned char *)&val;
                int ret = _PyLong_AsByteArray((PyLongObject *)v,
                                              bytes, sizeof(val),
                                              is_little, !is_unsigned);
                Py_DECREF(v);
                if (likely(!ret))
                    return val;
            }
#endif
            return (uint32_t) -1;
        }
    } else {
        uint32_t val;
        PyObject *tmp = __Pyx_PyNumber_Int(x);
        if (!tmp) return (uint32_t) -1;
        val = __Pyx_PyInt_As_uint32_t(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to uint32_t");
    return (uint32_t) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to uint32_t");
    return (uint32_t) -1;
}

static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) {
    const int neg_one = (int) -1, const_zero = (int) 0;
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(int) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(int) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
        } else if (sizeof(int) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
        }
    } else {
        if (sizeof(int) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(int) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(int),
                                     little, !is_unsigned);
    }
}

static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int64_t(int64_t value) {
    const int64_t neg_one = (int64_t) -1, const_zero = (int64_t) 0;
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(int64_t) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(int64_t) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
        } else if (sizeof(int64_t) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
        }
    } else {
        if (sizeof(int64_t) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(int64_t) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(int64_t),
                                     little, !is_unsigned);
    }
}

static CYTHON_INLINE PyObject* __Pyx_PyInt_From_uint64_t(uint64_t value) {
    const uint64_t neg_one = (uint64_t) -1, const_zero = (uint64_t) 0;
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(uint64_t) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(uint64_t) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
        } else if (sizeof(uint64_t) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
        }
    } else {
        if (sizeof(uint64_t) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(uint64_t) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(uint64_t),
                                     little, !is_unsigned);
    }
}

static CYTHON_INLINE PyObject* __Pyx_PyInt_From_char(char value) {
    const char neg_one = (char) -1, const_zero = (char) 0;
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(char) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(char) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
        } else if (sizeof(char) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
        }
    } else {
        if (sizeof(char) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(char) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(char),
                                     little, !is_unsigned);
    }
}

static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int32_t(int32_t value) {
    const int32_t neg_one = (int32_t) -1, const_zero = (int32_t) 0;
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(int32_t) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(int32_t) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
        } else if (sizeof(int32_t) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
        }
    } else {
        if (sizeof(int32_t) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(int32_t) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(int32_t),
                                     little, !is_unsigned);
    }
}

static CYTHON_INLINE PyObject* __Pyx_PyInt_From_uint32_t(uint32_t value) {
    const uint32_t neg_one = (uint32_t) -1, const_zero = (uint32_t) 0;
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(uint32_t) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(uint32_t) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
        } else if (sizeof(uint32_t) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
        }
    } else {
        if (sizeof(uint32_t) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(uint32_t) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(uint32_t),
                                     little, !is_unsigned);
    }
}

static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) {
    const long neg_one = (long) -1, const_zero = (long) 0;
    const int is_unsigned = neg_one > const_zero;
    if (is_unsigned) {
        if (sizeof(long) < sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(long) <= sizeof(unsigned long)) {
            return PyLong_FromUnsignedLong((unsigned long) value);
        } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
            return PyLong_FromUnsignedLongLong((unsigned PY_LONG_LONG) value);
        }
    } else {
        if (sizeof(long) <= sizeof(long)) {
            return PyInt_FromLong((long) value);
        } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
            return PyLong_FromLongLong((PY_LONG_LONG) value);
        }
    }
    {
        int one = 1; int little = (int)*(unsigned char *)&one;
        unsigned char *bytes = (unsigned char *)&value;
        return _PyLong_FromByteArray(bytes, sizeof(long),
                                     little, !is_unsigned);
    }
}

static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) {
    const long neg_one = (long) -1, const_zero = (long) 0;
    const int is_unsigned = neg_one > const_zero;
#if PY_MAJOR_VERSION < 3
    if (likely(PyInt_Check(x))) {
        if (sizeof(long) < sizeof(long)) {
            __PYX_VERIFY_RETURN_INT(long, long, PyInt_AS_LONG(x))
        } else {
            long val = PyInt_AS_LONG(x);
            if (is_unsigned && unlikely(val < 0)) {
                goto raise_neg_overflow;
            }
            return (long) val;
        }
    } else
#endif
    if (likely(PyLong_Check(x))) {
        if (is_unsigned) {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (long) 0;
                case  1: __PYX_VERIFY_RETURN_INT(long, digit, digits[0])
                case 2:
                    if (8 * sizeof(long) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) >= 2 * PyLong_SHIFT) {
                            return (long) (((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(long) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) >= 3 * PyLong_SHIFT) {
                            return (long) (((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(long) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) >= 4 * PyLong_SHIFT) {
                            return (long) (((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0]));
                        }
                    }
                    break;
            }
#endif
#if CYTHON_COMPILING_IN_CPYTHON
            if (unlikely(Py_SIZE(x) < 0)) {
                goto raise_neg_overflow;
            }
#else
            {
                int result = PyObject_RichCompareBool(x, Py_False, Py_LT);
                if (unlikely(result < 0))
                    return (long) -1;
                if (unlikely(result == 1))
                    goto raise_neg_overflow;
            }
#endif
            if (sizeof(long) <= sizeof(unsigned long)) {
                __PYX_VERIFY_RETURN_INT_EXC(long, unsigned long, PyLong_AsUnsignedLong(x))
            } else if (sizeof(long) <= sizeof(unsigned PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(long, unsigned PY_LONG_LONG, PyLong_AsUnsignedLongLong(x))
            }
        } else {
#if CYTHON_USE_PYLONG_INTERNALS
            const digit* digits = ((PyLongObject*)x)->ob_digit;
            switch (Py_SIZE(x)) {
                case  0: return (long) 0;
                case -1: __PYX_VERIFY_RETURN_INT(long, sdigit, -(sdigit) digits[0])
                case  1: __PYX_VERIFY_RETURN_INT(long,  digit, +digits[0])
                case -2:
                    if (8 * sizeof(long) - 1 > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                            return (long) (((long)-1)*(((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case 2:
                    if (8 * sizeof(long) > 1 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 2 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                            return (long) ((((((long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case -3:
                    if (8 * sizeof(long) - 1 > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                            return (long) (((long)-1)*(((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case 3:
                    if (8 * sizeof(long) > 2 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 3 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                            return (long) ((((((((long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case -4:
                    if (8 * sizeof(long) - 1 > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, long, -(long) (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                            return (long) (((long)-1)*(((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
                case 4:
                    if (8 * sizeof(long) > 3 * PyLong_SHIFT) {
                        if (8 * sizeof(unsigned long) > 4 * PyLong_SHIFT) {
                            __PYX_VERIFY_RETURN_INT(long, unsigned long, (((((((((unsigned long)digits[3]) << PyLong_SHIFT) | (unsigned long)digits[2]) << PyLong_SHIFT) | (unsigned long)digits[1]) << PyLong_SHIFT) | (unsigned long)digits[0])))
                        } else if (8 * sizeof(long) - 1 > 4 * PyLong_SHIFT) {
                            return (long) ((((((((((long)digits[3]) << PyLong_SHIFT) | (long)digits[2]) << PyLong_SHIFT) | (long)digits[1]) << PyLong_SHIFT) | (long)digits[0])));
                        }
                    }
                    break;
            }
#endif
            if (sizeof(long) <= sizeof(long)) {
                __PYX_VERIFY_RETURN_INT_EXC(long, long, PyLong_AsLong(x))
            } else if (sizeof(long) <= sizeof(PY_LONG_LONG)) {
                __PYX_VERIFY_RETURN_INT_EXC(long, PY_LONG_LONG, PyLong_AsLongLong(x))
            }
        }
        {
#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray)
            PyErr_SetString(PyExc_RuntimeError,
                            "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers");
#else
            long val;
            PyObject *v = __Pyx_PyNumber_Int(x);
 #if PY_MAJOR_VERSION < 3
            if (likely(v) && !PyLong_Check(v)) {
                PyObject *tmp = v;
                v = PyNumber_Long(tmp);
                Py_DECREF(tmp);
            }
 #endif
            if (likely(v)) {
                int one = 1; int is_little = (int)*(unsigned char *)&one;
                unsigned char *bytes = (unsigned char *)&val;
                int ret = _PyLong_AsByteArray((PyLongObject *)v,
                                              bytes, sizeof(val),
                                              is_little, !is_unsigned);
                Py_DECREF(v);
                if (likely(!ret))
                    return val;
            }
#endif
            return (long) -1;
        }
    } else {
        long val;
        PyObject *tmp = __Pyx_PyNumber_Int(x);
        if (!tmp) return (long) -1;
        val = __Pyx_PyInt_As_long(tmp);
        Py_DECREF(tmp);
        return val;
    }
raise_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "value too large to convert to long");
    return (long) -1;
raise_neg_overflow:
    PyErr_SetString(PyExc_OverflowError,
        "can't convert negative value to long");
    return (long) -1;
}

static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type) {
    PyObject* fake_module;
    PyTypeObject* cached_type = NULL;
    fake_module = PyImport_AddModule((char*) "_cython_" CYTHON_ABI);
    if (!fake_module) return NULL;
    Py_INCREF(fake_module);
    cached_type = (PyTypeObject*) PyObject_GetAttrString(fake_module, type->tp_name);
    if (cached_type) {
        if (!PyType_Check((PyObject*)cached_type)) {
            PyErr_Format(PyExc_TypeError,
                "Shared Cython type %.200s is not a type object",
                type->tp_name);
            goto bad;
        }
        if (cached_type->tp_basicsize != type->tp_basicsize) {
            PyErr_Format(PyExc_TypeError,
                "Shared Cython type %.200s has the wrong size, try recompiling",
                type->tp_name);
            goto bad;
        }
    } else {
        if (!PyErr_ExceptionMatches(PyExc_AttributeError)) goto bad;
        PyErr_Clear();
        if (PyType_Ready(type) < 0) goto bad;
        if (PyObject_SetAttrString(fake_module, type->tp_name, (PyObject*) type) < 0)
            goto bad;
        Py_INCREF(type);
        cached_type = type;
    }
done:
    Py_DECREF(fake_module);
    return cached_type;
bad:
    Py_XDECREF(cached_type);
    cached_type = NULL;
    goto done;
}

static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb) {
    PyObject *tmp_type, *tmp_value, *tmp_tb;
#if CYTHON_COMPILING_IN_CPYTHON
    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;
#else
    PyErr_GetExcInfo(&tmp_type, &tmp_value, &tmp_tb);
    PyErr_SetExcInfo(*type, *value, *tb);
#endif
    *type = tmp_type;
    *value = tmp_value;
    *tb = tmp_tb;
}

#include <structmember.h>
#include <frameobject.h>
static PyObject *__Pyx_Coroutine_Send(PyObject *self, PyObject *value);
static PyObject *__Pyx_Coroutine_Close(PyObject *self);
static PyObject *__Pyx_Coroutine_Throw(PyObject *gen, PyObject *args);
#define __Pyx_Coroutine_Undelegate(gen) Py_CLEAR((gen)->yieldfrom)
#if 1 || PY_VERSION_HEX < 0x030300B0
static int __Pyx_PyGen_FetchStopIterationValue(PyObject **pvalue) {
    PyObject *et, *ev, *tb;
    PyObject *value = NULL;
    __Pyx_ErrFetch(&et, &ev, &tb);
    if (!et) {
        Py_XDECREF(tb);
        Py_XDECREF(ev);
        Py_INCREF(Py_None);
        *pvalue = Py_None;
        return 0;
    }
    if (likely(et == PyExc_StopIteration)) {
#if PY_VERSION_HEX >= 0x030300A0
        if (ev && Py_TYPE(ev) == (PyTypeObject*)PyExc_StopIteration) {
            value = ((PyStopIterationObject *)ev)->value;
            Py_INCREF(value);
            Py_DECREF(ev);
            Py_XDECREF(tb);
            Py_DECREF(et);
            *pvalue = value;
            return 0;
        }
#endif
        if (!ev || !PyObject_TypeCheck(ev, (PyTypeObject*)PyExc_StopIteration)) {
            if (!ev) {
                Py_INCREF(Py_None);
                ev = Py_None;
            } else if (PyTuple_Check(ev)) {
                if (PyTuple_GET_SIZE(ev) >= 1) {
                    PyObject *value;
#if CYTHON_COMPILING_IN_CPYTHON
                    value = PySequence_ITEM(ev, 0);
#else
                    value = PyTuple_GET_ITEM(ev, 0);
                    Py_INCREF(value);
#endif
                    Py_DECREF(ev);
                    ev = value;
                } else {
                    Py_INCREF(Py_None);
                    Py_DECREF(ev);
                    ev = Py_None;
                }
            }
            Py_XDECREF(tb);
            Py_DECREF(et);
            *pvalue = ev;
            return 0;
        }
    } else if (!PyErr_GivenExceptionMatches(et, PyExc_StopIteration)) {
        __Pyx_ErrRestore(et, ev, tb);
        return -1;
    }
    PyErr_NormalizeException(&et, &ev, &tb);
    if (unlikely(!PyObject_TypeCheck(ev, (PyTypeObject*)PyExc_StopIteration))) {
        __Pyx_ErrRestore(et, ev, tb);
        return -1;
    }
    Py_XDECREF(tb);
    Py_DECREF(et);
#if PY_VERSION_HEX >= 0x030300A0
    value = ((PyStopIterationObject *)ev)->value;
    Py_INCREF(value);
    Py_DECREF(ev);
#else
    {
        PyObject* args = __Pyx_PyObject_GetAttrStr(ev, __pyx_n_s_args);
        Py_DECREF(ev);
        if (likely(args)) {
            value = PySequence_GetItem(args, 0);
            Py_DECREF(args);
        }
        if (unlikely(!value)) {
            __Pyx_ErrRestore(NULL, NULL, NULL);
            Py_INCREF(Py_None);
            value = Py_None;
        }
    }
#endif
    *pvalue = value;
    return 0;
}
#endif
static CYTHON_INLINE
void __Pyx_Coroutine_ExceptionClear(__pyx_CoroutineObject *self) {
    PyObject *exc_type = self->exc_type;
    PyObject *exc_value = self->exc_value;
    PyObject *exc_traceback = self->exc_traceback;
    self->exc_type = NULL;
    self->exc_value = NULL;
    self->exc_traceback = NULL;
    Py_XDECREF(exc_type);
    Py_XDECREF(exc_value);
    Py_XDECREF(exc_traceback);
}
static CYTHON_INLINE
int __Pyx_Coroutine_CheckRunning(__pyx_CoroutineObject *gen) {
    if (unlikely(gen->is_running)) {
        PyErr_SetString(PyExc_ValueError,
                        "generator already executing");
        return 1;
    }
    return 0;
}
static CYTHON_INLINE
PyObject *__Pyx_Coroutine_SendEx(__pyx_CoroutineObject *self, PyObject *value) {
    PyObject *retval;
    assert(!self->is_running);
    if (unlikely(self->resume_label == 0)) {
        if (unlikely(value && value != Py_None)) {
            PyErr_SetString(PyExc_TypeError,
                            "can't send non-None value to a "
                            "just-started generator");
            return NULL;
        }
    }
    if (unlikely(self->resume_label == -1)) {
        PyErr_SetNone(PyExc_StopIteration);
        return NULL;
    }
    if (value) {
#if CYTHON_COMPILING_IN_PYPY
#else
        if (self->exc_traceback) {
            PyThreadState *tstate = PyThreadState_GET();
            PyTracebackObject *tb = (PyTracebackObject *) self->exc_traceback;
            PyFrameObject *f = tb->tb_frame;
            Py_XINCREF(tstate->frame);
            assert(f->f_back == NULL);
            f->f_back = tstate->frame;
        }
#endif
        __Pyx_ExceptionSwap(&self->exc_type, &self->exc_value,
                            &self->exc_traceback);
    } else {
        __Pyx_Coroutine_ExceptionClear(self);
    }
    self->is_running = 1;
    retval = self->body((PyObject *) self, value);
    self->is_running = 0;
    if (retval) {
        __Pyx_ExceptionSwap(&self->exc_type, &self->exc_value,
                            &self->exc_traceback);
#if CYTHON_COMPILING_IN_PYPY
#else
        if (self->exc_traceback) {
            PyTracebackObject *tb = (PyTracebackObject *) self->exc_traceback;
            PyFrameObject *f = tb->tb_frame;
            Py_CLEAR(f->f_back);
        }
#endif
    } else {
        __Pyx_Coroutine_ExceptionClear(self);
    }
    return retval;
}
static CYTHON_INLINE
PyObject *__Pyx_Coroutine_MethodReturn(PyObject *retval) {
    if (unlikely(!retval && !PyErr_Occurred())) {
        PyErr_SetNone(PyExc_StopIteration);
    }
    return retval;
}
static CYTHON_INLINE
PyObject *__Pyx_Coroutine_FinishDelegation(__pyx_CoroutineObject *gen) {
    PyObject *ret;
    PyObject *val = NULL;
    __Pyx_Coroutine_Undelegate(gen);
    __Pyx_PyGen_FetchStopIterationValue(&val);
    ret = __Pyx_Coroutine_SendEx(gen, val);
    Py_XDECREF(val);
    return ret;
}
static PyObject *__Pyx_Coroutine_Send(PyObject *self, PyObject *value) {
    PyObject *retval;
    __pyx_CoroutineObject *gen = (__pyx_CoroutineObject*) self;
    PyObject *yf = gen->yieldfrom;
    if (unlikely(__Pyx_Coroutine_CheckRunning(gen)))
        return NULL;
    if (yf) {
        PyObject *ret;
        gen->is_running = 1;
        #ifdef __Pyx_Generator_USED
        if (__Pyx_Generator_CheckExact(yf)) {
            ret = __Pyx_Coroutine_Send(yf, value);
        } else
        #endif
        #ifdef __Pyx_Coroutine_USED
        if (__Pyx_Coroutine_CheckExact(yf)) {
            ret = __Pyx_Coroutine_Send(yf, value);
        } else
        #endif
        {
            if (value == Py_None)
                ret = PyIter_Next(yf);
            else
                ret = __Pyx_PyObject_CallMethod1(yf, __pyx_n_s_send, value);
        }
        gen->is_running = 0;
        if (likely(ret)) {
            return ret;
        }
        retval = __Pyx_Coroutine_FinishDelegation(gen);
    } else {
        retval = __Pyx_Coroutine_SendEx(gen, value);
    }
    return __Pyx_Coroutine_MethodReturn(retval);
}
static int __Pyx_Coroutine_CloseIter(__pyx_CoroutineObject *gen, PyObject *yf) {
    PyObject *retval = NULL;
    int err = 0;
    #ifdef __Pyx_Generator_USED
    if (__Pyx_Generator_CheckExact(yf)) {
        retval = __Pyx_Coroutine_Close(yf);
        if (!retval)
            return -1;
    } else
    #endif
    #ifdef __Pyx_Coroutine_USED
    if (__Pyx_Coroutine_CheckExact(yf)) {
        retval = __Pyx_Coroutine_Close(yf);
        if (!retval)
            return -1;
    } else
    #endif
    {
        PyObject *meth;
        gen->is_running = 1;
        meth = __Pyx_PyObject_GetAttrStr(yf, __pyx_n_s_close);
        if (unlikely(!meth)) {
            if (!PyErr_ExceptionMatches(PyExc_AttributeError)) {
                PyErr_WriteUnraisable(yf);
            }
            PyErr_Clear();
        } else {
            retval = PyObject_CallFunction(meth, NULL);
            Py_DECREF(meth);
            if (!retval)
                err = -1;
        }
        gen->is_running = 0;
    }
    Py_XDECREF(retval);
    return err;
}
static PyObject *__Pyx_Generator_Next(PyObject *self) {
    __pyx_CoroutineObject *gen = (__pyx_CoroutineObject*) self;
    PyObject *yf = gen->yieldfrom;
    if (unlikely(__Pyx_Coroutine_CheckRunning(gen)))
        return NULL;
    if (yf) {
        PyObject *ret;
        gen->is_running = 1;
        ret = Py_TYPE(yf)->tp_iternext(yf);
        gen->is_running = 0;
        if (likely(ret)) {
            return ret;
        }
        return __Pyx_Coroutine_FinishDelegation(gen);
    }
    return __Pyx_Coroutine_SendEx(gen, Py_None);
}
static PyObject *__Pyx_Coroutine_Close(PyObject *self) {
    __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
    PyObject *retval, *raised_exception;
    PyObject *yf = gen->yieldfrom;
    int err = 0;
    if (unlikely(__Pyx_Coroutine_CheckRunning(gen)))
        return NULL;
    if (yf) {
        Py_INCREF(yf);
        err = __Pyx_Coroutine_CloseIter(gen, yf);
        __Pyx_Coroutine_Undelegate(gen);
        Py_DECREF(yf);
    }
    if (err == 0)
        PyErr_SetNone(PyExc_GeneratorExit);
    retval = __Pyx_Coroutine_SendEx(gen, NULL);
    if (retval) {
        Py_DECREF(retval);
        PyErr_SetString(PyExc_RuntimeError,
                        "generator ignored GeneratorExit");
        return NULL;
    }
    raised_exception = PyErr_Occurred();
    if (!raised_exception
        || raised_exception == PyExc_StopIteration
        || raised_exception == PyExc_GeneratorExit
        || PyErr_GivenExceptionMatches(raised_exception, PyExc_GeneratorExit)
        || PyErr_GivenExceptionMatches(raised_exception, PyExc_StopIteration))
    {
        if (raised_exception) PyErr_Clear();
        Py_INCREF(Py_None);
        return Py_None;
    }
    return NULL;
}
static PyObject *__Pyx_Coroutine_Throw(PyObject *self, PyObject *args) {
    __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
    PyObject *typ;
    PyObject *tb = NULL;
    PyObject *val = NULL;
    PyObject *yf = gen->yieldfrom;
    if (!PyArg_UnpackTuple(args, (char *)"throw", 1, 3, &typ, &val, &tb))
        return NULL;
    if (unlikely(__Pyx_Coroutine_CheckRunning(gen)))
        return NULL;
    if (yf) {
        PyObject *ret;
        Py_INCREF(yf);
        if (PyErr_GivenExceptionMatches(typ, PyExc_GeneratorExit)) {
            int err = __Pyx_Coroutine_CloseIter(gen, yf);
            Py_DECREF(yf);
            __Pyx_Coroutine_Undelegate(gen);
            if (err < 0)
                return __Pyx_Coroutine_MethodReturn(__Pyx_Coroutine_SendEx(gen, NULL));
            goto throw_here;
        }
        gen->is_running = 1;
        #ifdef __Pyx_Generator_USED
        if (__Pyx_Generator_CheckExact(yf)) {
            ret = __Pyx_Coroutine_Throw(yf, args);
        } else
        #endif
        #ifdef __Pyx_Coroutine_USED
        if (__Pyx_Coroutine_CheckExact(yf)) {
            ret = __Pyx_Coroutine_Throw(yf, args);
        } else
        #endif
        {
            PyObject *meth = __Pyx_PyObject_GetAttrStr(yf, __pyx_n_s_throw);
            if (unlikely(!meth)) {
                Py_DECREF(yf);
                if (!PyErr_ExceptionMatches(PyExc_AttributeError)) {
                    gen->is_running = 0;
                    return NULL;
                }
                PyErr_Clear();
                __Pyx_Coroutine_Undelegate(gen);
                gen->is_running = 0;
                goto throw_here;
            }
            ret = PyObject_CallObject(meth, args);
            Py_DECREF(meth);
        }
        gen->is_running = 0;
        Py_DECREF(yf);
        if (!ret) {
            ret = __Pyx_Coroutine_FinishDelegation(gen);
        }
        return __Pyx_Coroutine_MethodReturn(ret);
    }
throw_here:
    __Pyx_Raise(typ, val, tb, NULL);
    return __Pyx_Coroutine_MethodReturn(__Pyx_Coroutine_SendEx(gen, NULL));
}
static int __Pyx_Coroutine_traverse(PyObject *self, visitproc visit, void *arg) {
    __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
    Py_VISIT(gen->closure);
    Py_VISIT(gen->classobj);
    Py_VISIT(gen->yieldfrom);
    Py_VISIT(gen->exc_type);
    Py_VISIT(gen->exc_value);
    Py_VISIT(gen->exc_traceback);
    return 0;
}
static int __Pyx_Coroutine_clear(PyObject *self) {
    __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
    Py_CLEAR(gen->closure);
    Py_CLEAR(gen->classobj);
    Py_CLEAR(gen->yieldfrom);
    Py_CLEAR(gen->exc_type);
    Py_CLEAR(gen->exc_value);
    Py_CLEAR(gen->exc_traceback);
    Py_CLEAR(gen->gi_name);
    Py_CLEAR(gen->gi_qualname);
    return 0;
}
static void __Pyx_Coroutine_dealloc(PyObject *self) {
    __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
    PyObject_GC_UnTrack(gen);
    if (gen->gi_weakreflist != NULL)
        PyObject_ClearWeakRefs(self);
    if (gen->resume_label > 0) {
        PyObject_GC_Track(self);
#if PY_VERSION_HEX >= 0x030400a1
        if (PyObject_CallFinalizerFromDealloc(self))
#else
        Py_TYPE(gen)->tp_del(self);
        if (self->ob_refcnt > 0)
#endif
        {
            return;
        }
        PyObject_GC_UnTrack(self);
    }
    __Pyx_Coroutine_clear(self);
    PyObject_GC_Del(gen);
}
static void __Pyx_Coroutine_del(PyObject *self) {
    PyObject *res;
    PyObject *error_type, *error_value, *error_traceback;
    __pyx_CoroutineObject *gen = (__pyx_CoroutineObject *) self;
    if (gen->resume_label <= 0)
        return ;
#if PY_VERSION_HEX < 0x030400a1
    assert(self->ob_refcnt == 0);
    self->ob_refcnt = 1;
#endif
    __Pyx_ErrFetch(&error_type, &error_value, &error_traceback);
    res = __Pyx_Coroutine_Close(self);
    if (res == NULL)
        PyErr_WriteUnraisable(self);
    else
        Py_DECREF(res);
    __Pyx_ErrRestore(error_type, error_value, error_traceback);
#if PY_VERSION_HEX < 0x030400a1
    assert(self->ob_refcnt > 0);
    if (--self->ob_refcnt == 0) {
        return;
    }
    {
        Py_ssize_t refcnt = self->ob_refcnt;
        _Py_NewReference(self);
        self->ob_refcnt = refcnt;
    }
#if CYTHON_COMPILING_IN_CPYTHON
    assert(PyType_IS_GC(self->ob_type) &&
           _Py_AS_GC(self)->gc.gc_refs != _PyGC_REFS_UNTRACKED);
    _Py_DEC_REFTOTAL;
#endif
#ifdef COUNT_ALLOCS
    --Py_TYPE(self)->tp_frees;
    --Py_TYPE(self)->tp_allocs;
#endif
#endif
}
static PyObject *
__Pyx_Coroutine_get_name(__pyx_CoroutineObject *self)
{
    Py_INCREF(self->gi_name);
    return self->gi_name;
}
static int
__Pyx_Coroutine_set_name(__pyx_CoroutineObject *self, PyObject *value)
{
    PyObject *tmp;
#if PY_MAJOR_VERSION >= 3
    if (unlikely(value == NULL || !PyUnicode_Check(value))) {
#else
    if (unlikely(value == NULL || !PyString_Check(value))) {
#endif
        PyErr_SetString(PyExc_TypeError,
                        "__name__ must be set to a string object");
        return -1;
    }
    tmp = self->gi_name;
    Py_INCREF(value);
    self->gi_name = value;
    Py_XDECREF(tmp);
    return 0;
}
static PyObject *
__Pyx_Coroutine_get_qualname(__pyx_CoroutineObject *self)
{
    Py_INCREF(self->gi_qualname);
    return self->gi_qualname;
}
static int
__Pyx_Coroutine_set_qualname(__pyx_CoroutineObject *self, PyObject *value)
{
    PyObject *tmp;
#if PY_MAJOR_VERSION >= 3
    if (unlikely(value == NULL || !PyUnicode_Check(value))) {
#else
    if (unlikely(value == NULL || !PyString_Check(value))) {
#endif
        PyErr_SetString(PyExc_TypeError,
                        "__qualname__ must be set to a string object");
        return -1;
    }
    tmp = self->gi_qualname;
    Py_INCREF(value);
    self->gi_qualname = value;
    Py_XDECREF(tmp);
    return 0;
}
static __pyx_CoroutineObject *__Pyx__Coroutine_New(PyTypeObject* type, __pyx_coroutine_body_t body,
                                                   PyObject *closure, PyObject *name, PyObject *qualname) {
    __pyx_CoroutineObject *gen = PyObject_GC_New(__pyx_CoroutineObject, type);
    if (gen == NULL)
        return NULL;
    gen->body = body;
    gen->closure = closure;
    Py_XINCREF(closure);
    gen->is_running = 0;
    gen->resume_label = 0;
    gen->classobj = NULL;
    gen->yieldfrom = NULL;
    gen->exc_type = NULL;
    gen->exc_value = NULL;
    gen->exc_traceback = NULL;
    gen->gi_weakreflist = NULL;
    Py_XINCREF(qualname);
    gen->gi_qualname = qualname;
    Py_XINCREF(name);
    gen->gi_name = name;
    PyObject_GC_Track(gen);
    return gen;
}

static PyObject* __Pyx_Coroutine_patch_module(PyObject* module, const char* py_code) {
#if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
    int result;
    PyObject *globals, *result_obj;
    globals = PyDict_New();  if (unlikely(!globals)) goto ignore;
    result = PyDict_SetItemString(globals, "_cython_coroutine_type",
    #ifdef __Pyx_Coroutine_USED
        (PyObject*)__pyx_CoroutineType);
    #else
        Py_None);
    #endif
    if (unlikely(result < 0)) goto ignore;
    result = PyDict_SetItemString(globals, "_cython_generator_type",
    #ifdef __Pyx_Generator_USED
        (PyObject*)__pyx_GeneratorType);
    #else
        Py_None);
    #endif
    if (unlikely(result < 0)) goto ignore;
    if (unlikely(PyDict_SetItemString(globals, "_module", module) < 0)) goto ignore;
    if (unlikely(PyDict_SetItemString(globals, "__builtins__", __pyx_b) < 0)) goto ignore;
    result_obj = PyRun_String(py_code, Py_file_input, globals, globals);
    if (unlikely(!result_obj)) goto ignore;
    Py_DECREF(result_obj);
    Py_DECREF(globals);
    return module;
ignore:
    Py_XDECREF(globals);
    PyErr_WriteUnraisable(module);
    if (unlikely(PyErr_WarnEx(PyExc_RuntimeWarning, "Cython module failed to patch module with custom type", 1) < 0)) {
        Py_DECREF(module);
        module = NULL;
    }
#else
    py_code++;
#endif
    return module;
}

#if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
static PyObject* __Pyx_patch_abc_module(PyObject *module);
static PyObject* __Pyx_patch_abc_module(PyObject *module) {
    module = __Pyx_Coroutine_patch_module(
        module, ""
"if _cython_generator_type is not None:\n"
"    try: Generator = _module.Generator\n"
"    except AttributeError: pass\n"
"    else: Generator.register(_cython_generator_type)\n"
"if _cython_coroutine_type is not None:\n"
"    try: Coroutine = _module.Coroutine\n"
"    except AttributeError: pass\n"
"    else: Coroutine.register(_cython_coroutine_type)\n"
    );
    return module;
}
#endif
static int __Pyx_patch_abc(void) {
#if defined(__Pyx_Generator_USED) || defined(__Pyx_Coroutine_USED)
    static int abc_patched = 0;
    if (!abc_patched) {
        PyObject *module;
        module = PyImport_ImportModule((PY_VERSION_HEX >= 0x03030000) ? "collections.abc" : "collections");
        if (!module) {
            PyErr_WriteUnraisable(NULL);
            if (unlikely(PyErr_WarnEx(PyExc_RuntimeWarning,
                    ((PY_VERSION_HEX >= 0x03030000) ?
                        "Cython module failed to register with collections.abc module" :
                        "Cython module failed to register with collections module"), 1) < 0)) {
                return -1;
            }
        } else {
            module = __Pyx_patch_abc_module(module);
            abc_patched = 1;
            if (unlikely(!module))
                return -1;
            Py_DECREF(module);
        }
        module = PyImport_ImportModule("backports_abc");
        if (module) {
            module = __Pyx_patch_abc_module(module);
            Py_XDECREF(module);
        }
        if (!module) {
            PyErr_Clear();
        }
    }
#else
    if (0) __Pyx_Coroutine_patch_module(NULL, NULL);
#endif
    return 0;
}

static PyMethodDef __pyx_Generator_methods[] = {
    {"send", (PyCFunction) __Pyx_Coroutine_Send, METH_O,
     (char*) PyDoc_STR("send(arg) -> send 'arg' into generator,\nreturn next yielded value or raise StopIteration.")},
    {"throw", (PyCFunction) __Pyx_Coroutine_Throw, METH_VARARGS,
     (char*) PyDoc_STR("throw(typ[,val[,tb]]) -> raise exception in generator,\nreturn next yielded value or raise StopIteration.")},
    {"close", (PyCFunction) __Pyx_Coroutine_Close, METH_NOARGS,
     (char*) PyDoc_STR("close() -> raise GeneratorExit inside generator.")},
    {0, 0, 0, 0}
};
static PyMemberDef __pyx_Generator_memberlist[] = {
    {(char *) "gi_running", T_BOOL, offsetof(__pyx_CoroutineObject, is_running), READONLY, NULL},
    {(char*) "gi_yieldfrom", T_OBJECT, offsetof(__pyx_CoroutineObject, yieldfrom), READONLY,
     (char*) PyDoc_STR("object being iterated by 'yield from', or None")},
    {0, 0, 0, 0, 0}
};
static PyGetSetDef __pyx_Generator_getsets[] = {
    {(char *) "__name__", (getter)__Pyx_Coroutine_get_name, (setter)__Pyx_Coroutine_set_name,
     (char*) PyDoc_STR("name of the generator"), 0},
    {(char *) "__qualname__", (getter)__Pyx_Coroutine_get_qualname, (setter)__Pyx_Coroutine_set_qualname,
     (char*) PyDoc_STR("qualified name of the generator"), 0},
    {0, 0, 0, 0, 0}
};
static PyTypeObject __pyx_GeneratorType_type = {
    PyVarObject_HEAD_INIT(0, 0)
    "generator",
    sizeof(__pyx_CoroutineObject),
    0,
    (destructor) __Pyx_Coroutine_dealloc,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_HAVE_FINALIZE,
    0,
    (traverseproc) __Pyx_Coroutine_traverse,
    0,
    0,
    offsetof(__pyx_CoroutineObject, gi_weakreflist),
    0,
    (iternextfunc) __Pyx_Generator_Next,
    __pyx_Generator_methods,
    __pyx_Generator_memberlist,
    __pyx_Generator_getsets,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
    0,
#if PY_VERSION_HEX >= 0x030400a1
    0,
#else
    __Pyx_Coroutine_del,
#endif
    0,
#if PY_VERSION_HEX >= 0x030400a1
    __Pyx_Coroutine_del,
#endif
};
static int __pyx_Generator_init(void) {
    __pyx_GeneratorType_type.tp_getattro = PyObject_GenericGetAttr;
    __pyx_GeneratorType_type.tp_iter = PyObject_SelfIter;
    __pyx_GeneratorType = __Pyx_FetchCommonType(&__pyx_GeneratorType_type);
    if (unlikely(!__pyx_GeneratorType)) {
        return -1;
    }
    return 0;
}

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);
        return PyErr_WarnEx(NULL, message, 1);
    }
    return 0;
}

static int __Pyx_ExportVoidPtr(PyObject *name, void *p, const char *sig) {
    PyObject *d;
    PyObject *cobj = 0;
    d = PyDict_GetItem(__pyx_d, __pyx_n_s_pyx_capi);
    Py_XINCREF(d);
    if (!d) {
        d = PyDict_New();
        if (!d)
            goto bad;
        if (__Pyx_PyObject_SetAttrStr(__pyx_m, __pyx_n_s_pyx_capi, d) < 0)
            goto bad;
    }
#if PY_VERSION_HEX >= 0x02070000
    cobj = PyCapsule_New(p, sig, 0);
#else
    cobj = PyCObject_FromVoidPtrAndDesc(p, (void *)sig, 0);
#endif
    if (!cobj)
        goto bad;
    if (PyDict_SetItem(d, name, cobj) < 0)
        goto bad;
    Py_DECREF(cobj);
    Py_DECREF(d);
    return 0;
bad:
    Py_XDECREF(cobj);
    Py_XDECREF(d);
    return -1;
}

#ifndef __PYX_HAVE_RT_ImportModule
#define __PYX_HAVE_RT_ImportModule
static PyObject *__Pyx_ImportModule(const char *name) {
    PyObject *py_name = 0;
    PyObject *py_module = 0;
    py_name = __Pyx_PyIdentifier_FromString(name);
    if (!py_name)
        goto bad;
    py_module = PyImport_Import(py_name);
    Py_DECREF(py_name);
    return py_module;
bad:
    Py_XDECREF(py_name);
    return 0;
}
#endif

#ifndef __PYX_HAVE_RT_ImportType
#define __PYX_HAVE_RT_ImportType
static PyTypeObject *__Pyx_ImportType(const char *module_name, const char *class_name,
    size_t size, int strict)
{
    PyObject *py_module = 0;
    PyObject *result = 0;
    PyObject *py_name = 0;
    char warning[200];
    Py_ssize_t basicsize;
#ifdef Py_LIMITED_API
    PyObject *py_basicsize;
#endif
    py_module = __Pyx_ImportModule(module_name);
    if (!py_module)
        goto bad;
    py_name = __Pyx_PyIdentifier_FromString(class_name);
    if (!py_name)
        goto bad;
    result = PyObject_GetAttr(py_module, py_name);
    Py_DECREF(py_name);
    py_name = 0;
    Py_DECREF(py_module);
    py_module = 0;
    if (!result)
        goto bad;
    if (!PyType_Check(result)) {
        PyErr_Format(PyExc_TypeError,
            "%.200s.%.200s is not a type object",
            module_name, class_name);
        goto bad;
    }
#ifndef Py_LIMITED_API
    basicsize = ((PyTypeObject *)result)->tp_basicsize;
#else
    py_basicsize = PyObject_GetAttrString(result, "__basicsize__");
    if (!py_basicsize)
        goto bad;
    basicsize = PyLong_AsSsize_t(py_basicsize);
    Py_DECREF(py_basicsize);
    py_basicsize = 0;
    if (basicsize == (Py_ssize_t)-1 && PyErr_Occurred())
        goto bad;
#endif
    if (!strict && (size_t)basicsize > size) {
        PyOS_snprintf(warning, sizeof(warning),
            "%s.%s size changed, may indicate binary incompatibility",
            module_name, class_name);
        if (PyErr_WarnEx(NULL, warning, 0) < 0) goto bad;
    }
    else if ((size_t)basicsize != size) {
        PyErr_Format(PyExc_ValueError,
            "%.200s.%.200s has the wrong size, try recompiling",
            module_name, class_name);
        goto bad;
    }
    return (PyTypeObject *)result;
bad:
    Py_XDECREF(py_module);
    Py_XDECREF(result);
    return NULL;
}
#endif

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
        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;
}

static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) {
    return __Pyx_PyUnicode_FromStringAndSize(c_str, (Py_ssize_t)strlen(c_str));
}
static CYTHON_INLINE char* __Pyx_PyObject_AsString(PyObject* o) {
    Py_ssize_t ignore;
    return __Pyx_PyObject_AsStringAndSize(o, &ignore);
}
static CYTHON_INLINE char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) {
#if CYTHON_COMPILING_IN_CPYTHON && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT)
    if (
#if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
            __Pyx_sys_getdefaultencoding_not_ascii &&
#endif
            PyUnicode_Check(o)) {
#if PY_VERSION_HEX < 0x03030000
        char* defenc_c;
        PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL);
        if (!defenc) return NULL;
        defenc_c = PyBytes_AS_STRING(defenc);
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
        {
            char* end = defenc_c + PyBytes_GET_SIZE(defenc);
            char* c;
            for (c = defenc_c; c < end; c++) {
                if ((unsigned char) (*c) >= 128) {
                    PyUnicode_AsASCIIString(o);
                    return NULL;
                }
            }
        }
#endif
        *length = PyBytes_GET_SIZE(defenc);
        return defenc_c;
#else
        if (__Pyx_PyUnicode_READY(o) == -1) return NULL;
#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII
        if (PyUnicode_IS_ASCII(o)) {
            *length = PyUnicode_GET_LENGTH(o);
            return PyUnicode_AsUTF8(o);
        } else {
            PyUnicode_AsASCIIString(o);
            return NULL;
        }
#else
        return PyUnicode_AsUTF8AndSize(o, length);
#endif
#endif
    } else
#endif
#if (!CYTHON_COMPILING_IN_PYPY) || (defined(PyByteArray_AS_STRING) && defined(PyByteArray_GET_SIZE))
    if (PyByteArray_Check(o)) {
        *length = PyByteArray_GET_SIZE(o);
        return PyByteArray_AS_STRING(o);
    } else
#endif
    {
        char* result;
        int r = PyBytes_AsStringAndSize(o, &result, length);
        if (unlikely(r < 0)) {
            return NULL;
        } else {
            return result;
        }
    }
}
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_MAJOR_VERSION < 3
  if (PyInt_Check(x) || PyLong_Check(x))
#else
  if (PyLong_Check(x))
#endif
    return __Pyx_NewRef(x);
  m = Py_TYPE(x)->tp_as_number;
#if PY_MAJOR_VERSION < 3
  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_MAJOR_VERSION < 3
    if (!PyInt_Check(res) && !PyLong_Check(res)) {
#else
    if (!PyLong_Check(res)) {
#endif
      PyErr_Format(PyExc_TypeError,
                   "__%.4s__ returned non-%.4s (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;
#if PY_MAJOR_VERSION < 3
  if (likely(PyInt_CheckExact(b))) {
    if (sizeof(Py_ssize_t) >= sizeof(long))
        return PyInt_AS_LONG(b);
    else
        return PyInt_AsSsize_t(x);
  }
#endif
  if (likely(PyLong_CheckExact(b))) {
    #if CYTHON_USE_PYLONG_INTERNALS
    const digit* digits = ((PyLongObject*)b)->ob_digit;
    const Py_ssize_t size = Py_SIZE(b);
    if (likely(__Pyx_sst_abs(size) <= 1)) {
        ival = likely(size) ? digits[0] : 0;
        if (size == -1) ival = -ival;
        return ival;
    } else {
      switch (size) {
         case 2:
           if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
             return (Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case -2:
           if (8 * sizeof(Py_ssize_t) > 2 * PyLong_SHIFT) {
             return -(Py_ssize_t) (((((size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case 3:
           if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
             return (Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case -3:
           if (8 * sizeof(Py_ssize_t) > 3 * PyLong_SHIFT) {
             return -(Py_ssize_t) (((((((size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case 4:
           if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
             return (Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
         case -4:
           if (8 * sizeof(Py_ssize_t) > 4 * PyLong_SHIFT) {
             return -(Py_ssize_t) (((((((((size_t)digits[3]) << PyLong_SHIFT) | (size_t)digits[2]) << PyLong_SHIFT) | (size_t)digits[1]) << PyLong_SHIFT) | (size_t)digits[0]));
           }
           break;
      }
    }
    #endif
    return PyLong_AsSsize_t(b);
  }
  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) {
    return PyInt_FromSize_t(ival);
}


#endif /* Py_PYTHON_H */
